/* =========================================================================
   LAMERK MAYHEM: style.css
   Menus & overlays. Sizes are rem-based and rem scales with the viewport,
   so 1080p / 1440p / 4K all render at identical proportions.
   ========================================================================= */
:root {
  --bg: #070506;
  --bg2: #130a0d;
  --brand: #c8193c;
  --panel: rgba(24, 12, 16, 0.88);
  --panel-2: rgba(40, 18, 25, 0.92);
  --line: rgba(255, 255, 255, 0.11);
  --text: #f8eef0;
  --muted: #b9a2a9;
  --accent: #ff3b5f;
  --accent-2: #ff5e7e;
  --accent-3: #3fe0ff;
  --good: #5fe06a;
  --bad: #ff4d5e;
  --radius: 1rem;
  --shadow: 0 0.6rem 1.8rem rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(.2, .9, .25, 1.15);
  --font-display: "Lilita One", "Arial Black", Impact, sans-serif;
  --font-body: Nunito, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { font-size: min(calc(100vh / 67.5), calc(100vw / 120)); }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font-body); font-weight: 700; user-select: none; -webkit-user-select: none; }
canvas#game { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; background: var(--bg); }
canvas#game.playing { cursor: none; }
button { font-family: inherit; }

#ui { position: fixed; inset: 0; pointer-events: none; }
#ui > * { pointer-events: auto; }
#ui > .menu-bg, #ui > .prompt-bar, #ui > .toast { pointer-events: none; }

/* ---------- animated background over the attract-mode canvas ---------- */
.menu-bg { position: fixed; inset: 0; background: radial-gradient(ellipse at 20% 10%, rgba(200, 25, 60, 0.35), transparent 60%), radial-gradient(ellipse at 90% 90%, rgba(200, 25, 60, 0.22), transparent 55%), linear-gradient(180deg, rgba(7, 5, 6, 0.9), rgba(7, 5, 6, 0.97)); transition: opacity .5s; overflow: hidden; }
.menu-bg { visibility: visible; }
/* fully hidden during a match so the browser stops compositing it behind the game */
.menu-bg.hidden { opacity: 0; visibility: hidden; transition: opacity .5s, visibility 0s .5s; }
.menu-bg.hidden * { animation-play-state: paused; }
.bg-grid { position: absolute; inset: -50%; background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px); background-size: 4rem 4rem; transform: rotate(-8deg); animation: gridmove 30s linear infinite; }
@keyframes gridmove { to { background-position: 4rem 8rem; } }
.bg-blob { position: absolute; width: 44rem; height: 44rem; border-radius: 50%; opacity: .16; animation: blob 18s ease-in-out infinite alternate; }
.bg-blob.b1 { background: radial-gradient(circle, #c8193c, transparent 65%); left: -15rem; top: 45%; }
.bg-blob.b2 { background: radial-gradient(circle, #ff3b5f, transparent 65%); right: -13rem; top: -15rem; animation-delay: -6s; }
.bg-blob.b3 { background: radial-gradient(circle, #7a0f25, transparent 65%); left: 40%; bottom: -21rem; animation-delay: -11s; }
.lowfx .bg-blob, .lowfx .bg-grid, .lowfx .end-rays { animation: none; }
.lowfx .overlay { backdrop-filter: none; }
.lowfx .screen.active, .lowfx .overlay.active { animation-duration: .15s; }
@keyframes blob { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(6rem,-4rem) scale(1.25); } }

/* ---------- screens ---------- */
.screen, .overlay { position: fixed; inset: 0; display: none; opacity: 0; }
.screen.active, .overlay.active { display: flex; animation: scrIn .38s var(--ease) forwards; }
.screen.leaving { display: flex; animation: scrOut .22s ease forwards; pointer-events: none; }
@keyframes scrIn { from { opacity: 0; transform: translateY(1.2rem) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes scrOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-.8rem); } }
.screen { flex-direction: column; padding: 2.2rem 3rem 4.5rem; }

.scr-head { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 1.4rem; }
.scr-head h2 { font-family: var(--font-display); font-weight: 400; font-size: 2.8rem; margin: 0; letter-spacing: .04em; text-shadow: 0 .2rem 0 rgba(0,0,0,.3); display: flex; align-items: baseline; gap: 1rem; }
.scr-head h2 small { font-family: var(--font-body); font-size: 1.1rem; color: var(--muted); letter-spacing: 0; text-shadow: none; }
.head-hint { margin-left: auto; color: var(--muted); font-size: 1rem; }
.cheat-head h2 { color: #ff6b7d; }

/* ---------- buttons ---------- */
.btn, .back-btn, .mini-btn { cursor: pointer; border: 1px solid var(--line); color: var(--text); background: var(--panel-2); border-radius: .8rem; padding: .9rem 1.6rem; font-family: var(--font-display); font-size: 1.35rem; letter-spacing: .05em; box-shadow: 0 .25rem 0 rgba(0,0,0,.3); transition: transform .15s var(--ease), background .15s, box-shadow .15s, color .15s; outline: none; position: relative; }
.back-btn { font-size: 1.1rem; padding: .6rem 1.1rem; background: rgba(255,255,255,.08); }
.mini-btn { font-size: .85rem; padding: .35rem .8rem; margin-left: .8rem; vertical-align: middle; }
.btn.primary { background: linear-gradient(180deg, #e8264d, #a8112f); color: #fff; border-color: transparent; }
.btn.big { font-size: 2rem; padding: 1.1rem 2rem; width: 100%; }
.nav.focused, .btn:hover, .back-btn:hover, .mini-btn:hover { transform: translateY(-.12rem); box-shadow: 0 .35rem 0 rgba(0,0,0,.3), 0 0 0 .2rem #fff, 0 0 1.2rem rgba(255,59,95,.55); }
.btn:active, .nav.pressed { transform: translateY(.1rem) scale(.98); box-shadow: 0 .1rem 0 rgba(0,0,0,.35); }
.btn:disabled, .btn.disabled { opacity: .4; filter: grayscale(1); cursor: not-allowed; }

/* ---------- LaMerk brand ---------- */
.brand { display: inline-flex; flex-direction: column; align-items: center; }
.brand-logo { width: 26rem; height: auto; mix-blend-mode: screen; }
.brand-logo.keyed { mix-blend-mode: normal; filter: drop-shadow(0 0 1.8rem rgba(200,25,60,.45)); }
.brand-sub { margin-top: -1.6rem; font-family: var(--font-display); font-size: 3.4rem; letter-spacing: .5em; padding-left: .5em; color: #fff; text-shadow: 0 .3rem 0 #5a0718, 0 0 1.6rem rgba(255,59,95,.5); }
.brand.big .brand-logo { width: 38rem; }
.brand.big .brand-sub { font-size: 4.6rem; margin-top: -2.2rem; }
.site-link { color: var(--accent); text-decoration: none; font-weight: 800; }
.site-link:hover { text-decoration: underline; }

/* ---------- title ---------- */
#scr-title { flex-direction: row; align-items: stretch; padding: 3rem 4rem; }
.title-wrap { display: flex; flex-direction: column; justify-content: center; width: 46rem; }
.logo { margin-bottom: .6rem; }
.tagline { color: var(--muted); font-size: 1.25rem; margin: 1.2rem 0 0 .3rem; }
.main-menu { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; max-width: 44rem; }
.menu-btn { display: flex; align-items: center; gap: 1rem; text-align: left; padding: .85rem 1.2rem; font-size: 1.45rem; }
.menu-btn svg { width: 2rem; height: 2rem; flex-shrink: 0; }
.menu-btn small { display: block; font-family: var(--font-body); font-size: .85rem; color: var(--muted); letter-spacing: 0; margin-top: .1rem; font-weight: 700; }
.menu-btn.hero { grid-column: span 2; font-size: 2.2rem; padding: 1.1rem 1.4rem; background: linear-gradient(180deg, #e8264d, #a8112f); color: #fff; border-color: transparent; }
.menu-btn.hero small { color: rgba(255,255,255,.8); font-size: 1rem; }
.menu-btn.cheat { color: #ff9aa6; }
.title-side { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; }
#title-hero { width: 30rem; height: 35.8rem; filter: drop-shadow(0 1.5rem 2rem rgba(0,0,0,.5)); }
.hero-caption { font-family: var(--font-display); font-size: 2rem; text-align: center; margin-top: -1rem; text-shadow: 0 .25rem 0 rgba(0,0,0,.5); }
.hero-caption small { display: block; font-family: var(--font-body); font-size: 1.05rem; color: var(--muted); text-shadow: none; }
.stats-chip { position: absolute; right: 2rem; top: 1.6rem; background: var(--panel); border: 2px solid var(--line); padding: .5rem 1rem; border-radius: 2rem; color: var(--muted); font-size: .95rem; }
.stats-chip b { color: var(--accent); }

/* ---------- lobby ---------- */
.lobby-grid { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; min-height: 0; }
.slot { position: relative; border-radius: 1.4rem; background: var(--panel); border: .2rem solid var(--line); display: flex; flex-direction: column; overflow: hidden; transition: transform .25s var(--ease), border-color .2s; box-shadow: var(--shadow); }
.slot.joined { border-color: var(--pc); }
.slot.ready { transform: translateY(-.4rem); }
.slot.empty { justify-content: center; align-items: center; border-style: dashed; }
.lobby-grid.many { grid-template-rows: 1fr 1fr; gap: .8rem; }
.lobby-grid.many .slot-tag, .lobby-grid.many .slot-dev { display: none; }
.lobby-grid.many .slot-prof { font-size: 1.2rem; }
.lobby-grid.many .slot-num { font-size: 1.5rem; }
.lobby-grid.many .slot-rows { gap: .2rem; }
.lobby-grid.many .slot-row { padding: .15rem .4rem; }
.lobby-grid.many .ready-bar { padding: .4rem; font-size: 1rem; margin: 0 .6rem .6rem; }
.lobby-grid.many .join-msg { font-size: 1.1rem; }
.slot .join-msg { text-align: center; color: var(--muted); font-family: var(--font-display); font-size: 1.6rem; animation: pulse 1.6s ease-in-out infinite; line-height: 1.5; }
.slot .join-msg .keycap, .slot .join-msg .padbtn { vertical-align: middle; }
@keyframes pulse { 50% { opacity: .45; } }
.slot-head { display: flex; flex-direction: column; align-items: flex-start; padding: .7rem 1rem .1rem; }
.slot-num { font-family: var(--font-display); font-size: 2.2rem; color: var(--pc); text-shadow: 0 .2rem 0 rgba(0,0,0,.4); }
.slot-dev { color: var(--muted); font-size: .9rem; display: flex; align-items: center; gap: .4rem; }
.slot-preview { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--pc) 35%, transparent), transparent 65%); }
.slot-preview canvas { width: 100%; height: 100%; object-fit: contain; }
.slot-info { padding: .2rem 1rem .6rem; text-align: center; }
.slot-prof { font-family: var(--font-display); font-size: 1.7rem; line-height: 1.1; }
.slot-tag { color: var(--muted); font-size: .95rem; min-height: 1.3rem; }
.slot-rows { padding: 0 .8rem .6rem; display: flex; flex-direction: column; gap: .4rem; }
.slot-row { display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.05); border-radius: .6rem; padding: .35rem .5rem; border: .15rem solid transparent; transition: border-color .15s, background .15s; }
.slot-row.sel { border-color: var(--pc); background: rgba(255,255,255,.1); }
.slot-row .lbl { color: var(--muted); font-size: .8rem; width: 4.2rem; }
.slot-row .val { flex: 1; text-align: center; font-family: var(--font-display); font-size: 1.1rem; }
.arrow { cursor: pointer; width: 2rem; height: 2rem; border: none; border-radius: .5rem; background: rgba(255,255,255,.1); color: #fff; font-family: var(--font-display); font-size: 1.2rem; }
.arrow:hover { background: var(--pc); color: #111; }
.swatches { display: flex; gap: .25rem; justify-content: center; flex-wrap: wrap; flex: 1; }
.sw { width: 1.25rem; height: 1.25rem; border-radius: 50%; border: .15rem solid rgba(0,0,0,.4); cursor: pointer; position: relative; }
.sw.on { outline: .18rem solid #fff; outline-offset: .1rem; }
.sw.taken { opacity: .25; }
.sw.locked::after { content: "🔒"; position: absolute; inset: -.1rem; font-size: .7rem; display: flex; align-items: center; justify-content: center; }
.ready-bar { margin: 0 .8rem .8rem; padding: .7rem; border-radius: .8rem; text-align: center; font-family: var(--font-display); font-size: 1.3rem; background: rgba(255,255,255,.08); cursor: pointer; border: none; color: #fff; }
.slot.ready .ready-bar { background: var(--good); color: #0e2a10; }
.slot .ready-stamp { position: absolute; top: 38%; left: 50%; transform: translate(-50%,-50%) rotate(-12deg) scale(0); font-family: var(--font-display); font-size: 3rem; color: var(--good); border: .35rem solid var(--good); padding: .1rem 1rem; border-radius: .6rem; background: rgba(10,30,12,.6); transition: transform .3s var(--ease); pointer-events: none; }
.slot.ready .ready-stamp { transform: translate(-50%,-50%) rotate(-12deg) scale(1); }
.leave-btn { position: absolute; top: .7rem; right: .7rem; background: rgba(255,255,255,.08); border: none; color: var(--muted); border-radius: .5rem; cursor: pointer; font-size: .8rem; padding: .25rem .5rem; }
.lobby-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 1.2rem; }
.lobby-status { font-family: var(--font-display); font-size: 1.5rem; color: var(--muted); }
.lobby-status b { color: var(--accent); }

/* ---------- glyphs ---------- */
.keycap { display: inline-flex; align-items: center; justify-content: center; min-width: 1.9rem; height: 1.9rem; padding: 0 .45rem; border-radius: .4rem; background: #f1f1f5; color: #1a1626; font-family: var(--font-display); font-size: .95rem; box-shadow: 0 .2rem 0 #9d9db1; margin: 0 .15rem; }
.padbtn { display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; color: #10131a; font-family: var(--font-display); font-size: 1rem; box-shadow: 0 .15rem 0 rgba(0,0,0,.4); margin: 0 .15rem; }
.padbtn.A { background: #5fe06a; } .padbtn.B { background: #ff4d5e; } .padbtn.X { background: #3fa7ff; } .padbtn.Y { background: #ffd23f; }
.padbtn.pill { width: auto; padding: 0 .55rem; border-radius: .6rem; background: #c9c9d6; font-size: .8rem; }
.prompt-bar { position: fixed; left: 0; right: 0; bottom: 0; height: 3.4rem; display: flex; align-items: center; justify-content: flex-end; gap: 1.6rem; padding: 0 2.4rem; background: linear-gradient(0deg, rgba(10,8,20,.9), transparent); font-size: 1rem; color: var(--muted); transition: opacity .3s; }
.prompt-bar.hidden { opacity: 0; }
.prompt-bar span { display: inline-flex; align-items: center; gap: .35rem; }

/* ---------- panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 1.2rem; padding: 1.2rem 1.4rem; box-shadow: var(--shadow); }
.panel h3 { margin: 0 0 .8rem; font-family: var(--font-display); font-weight: 400; font-size: 1.4rem; letter-spacing: .06em; color: var(--accent); }

/* ---------- play screen: worker + mode + map + rules ---------- */
.play-wrap { flex: 1; display: grid; grid-template-columns: 27rem 1fr 27rem; gap: 1.6rem; min-height: 0; }
.play-col { display: flex; flex-direction: column; gap: .8rem; min-height: 0; }
.sec-title { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: .1em; color: var(--muted); display: flex; align-items: center; gap: .6rem; }
.sec-title .mini-btn { margin-left: auto; }
.sec-note { font-family: var(--font-body); letter-spacing: 0; font-size: .95rem; color: var(--text); opacity: .8; }
.crew-list { flex: 1; display: flex; flex-direction: column; gap: .8rem; min-height: 0; }
.crew-card { flex: 1; min-height: 0; display: flex; flex-direction: column; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); border-top: .3rem solid var(--pc); padding: .8rem; box-shadow: var(--shadow); }
.crew-top { display: flex; align-items: baseline; gap: .7rem; }
.crew-top .pn { font-family: var(--font-display); font-size: 1.6rem; color: var(--pc); }
.crew-top .dev { color: var(--muted); font-size: .85rem; }
.crew-preview { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 75%, color-mix(in srgb, var(--pc) 30%, transparent), transparent 62%); }
.crew-preview canvas { height: 100%; max-width: 100%; aspect-ratio: 1; object-fit: contain; }
.crew-name { text-align: center; font-family: var(--font-display); font-size: 1.7rem; line-height: 1.1; margin-bottom: .5rem; }
.skin-badge.crew { background: #ffd23f; color: #1a1626; }
.skin-badge { display: block; width: max-content; margin: 0 auto .2rem; padding: .1rem .5rem; border-radius: 999px; background: var(--accent); color: #fff; font-family: var(--font-body); font-size: .7rem; font-weight: 800; letter-spacing: .08em; }
.crew-name small { display: block; font-family: var(--font-body); font-size: .9rem; color: var(--muted); font-weight: 700; margin-top: .15rem; }
.crew-row { display: flex; align-items: center; gap: .4rem; padding: .3rem; border-radius: .7rem; background: rgba(255,255,255,.04); border: .15rem solid transparent; margin-top: .35rem; }
.crew-row .val { flex: 1; text-align: center; font-family: var(--font-display); font-size: 1.1rem; }
.crew-row.focused { border-color: var(--accent); background: rgba(255,210,63,.07); box-shadow: none; transform: none; }
.crew-list.multi .crew-card { padding: .5rem .7rem; }
.crew-list.multi .crew-name { font-size: 1.2rem; margin-bottom: .2rem; }
.crew-list.multi .crew-name small { display: none; }
.crew-list.multi .crew-top .pn { font-size: 1.2rem; }
.crew-list.quad { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; }
.crew-list.quad .crew-top .dev { display: none; }
.crew-list.quad .crew-name { font-size: 1rem; }
.crew-list.quad .crew-row .val .sw { display: inline-block; vertical-align: middle; }
.crew-list.octo .crew-preview, .crew-list.octo .crew-rec, .crew-list.octo .crew-top .pn { display: none; }
.crew-list.octo .crew-card { padding: .35rem .5rem; }
.crew-list.octo .crew-row { margin-top: .2rem; padding: .1rem; }
.crew-rec { text-align: center; font-size: .78rem; color: var(--muted); margin: .2rem 0 0; }
.name-val { cursor: text; }
.name-input { flex: 1; min-width: 0; text-align: center; font-family: var(--font-display); font-size: 1.1rem; color: var(--text); background: rgba(0,0,0,.35); border: .12rem solid var(--accent); border-radius: .5rem; padding: .2rem .4rem; outline: none; }
.records { margin-top: .9rem; width: 100%; }
.rec-title { font-family: var(--font-display); color: var(--accent); letter-spacing: .08em; font-size: 1rem; margin-bottom: .3rem; }
.rec { display: flex; justify-content: space-between; gap: .6rem; font-size: .9rem; padding: .2rem 0; border-top: 1px solid var(--line); }
.rec span { color: var(--muted); }

.mode-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .5rem; } /* every mode on one row, however many there are */
.mode-strip .mode-tile { padding: .7rem .2rem .6rem; font-size: .88rem; }
.mode-strip .mode-tile .icon { width: 2.9rem; height: 2.9rem; }
.mode-tile { cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: .8rem .3rem .7rem; border-radius: var(--radius); background: var(--panel); border: .18rem solid transparent; text-align: center; font-family: var(--font-display); font-size: .95rem; line-height: 1.1; transition: transform .18s var(--ease), border-color .15s, background .15s; }
.mode-tile .icon { width: 3.2rem; height: 3.2rem; border-radius: .9rem; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--mc) 70%, #1a1430); }
.mode-tile .icon svg { width: 2rem; height: 2rem; }
.mode-tile.selected { border-color: var(--mc); background: color-mix(in srgb, var(--mc) 22%, rgba(24,19,48,.92)); }
.mode-tile.selected .icon { background: var(--mc); }
.mode-tile.focused, .map-tile.focused { transform: translateY(-.2rem); box-shadow: 0 0 0 .2rem var(--accent); }
.mode-info { border-radius: var(--radius); padding: .9rem 1.2rem; background: linear-gradient(100deg, color-mix(in srgb, var(--mc) 26%, rgba(24,19,48,.92)), var(--panel) 70%); border: 1px solid var(--line); }
.mi-head { display: flex; align-items: center; gap: .8rem; }
.mi-head b { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; }
.mi-head em { font-style: normal; font-size: .75rem; letter-spacing: .1em; padding: .15rem .5rem; border-radius: .4rem; background: rgba(255,255,255,.1); color: var(--muted); }
.mode-info p { margin: .25rem 0 .55rem; color: #d8d2f2; font-size: 1.05rem; }
.mi-rules { display: flex; flex-wrap: wrap; gap: .4rem; }
.mi-rules span { font-size: .85rem; padding: .25rem .6rem; border-radius: 1rem; background: rgba(255,255,255,.07); color: #cfc8ee; }

.map-strip { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: 1fr 1fr; gap: .6rem; }
.map-tile { cursor: pointer; position: relative; min-height: 0; border-radius: var(--radius); overflow: hidden; background: var(--panel); border: .2rem solid transparent; transition: transform .18s var(--ease), border-color .15s; }
.map-tile .thumb { position: absolute; inset: 0; }
.map-tile .thumb canvas { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 2.5s ease; }
.map-tile:hover .thumb canvas, .map-tile.focused .thumb canvas { transform: scale(1.1); }
.map-tile .thumb.rnd { display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 4rem; color: rgba(255,255,255,.3); background: repeating-linear-gradient(45deg, #2a2350, #2a2350 1.5rem, #231d44 1.5rem, #231d44 3rem); }
.map-tile span { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem .6rem .45rem; font-family: var(--font-display); font-size: .9rem; line-height: 1.1; background: linear-gradient(0deg, rgba(10,8,20,.92), transparent); }
.map-tile.selected { border-color: var(--accent); }
.map-tile.selected::after { content: "✔"; position: absolute; top: .5rem; right: .5rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1rem; }

.side-col .panel h3 { margin-bottom: .6rem; }
.side-col .roster-panel { flex: 1; min-height: 0; overflow-y: auto; }
.opt-list { display: flex; flex-direction: column; gap: .4rem; }
.opt { display: flex; align-items: center; justify-content: space-between; padding: .35rem .5rem .35rem .8rem; border-radius: .7rem; background: rgba(255,255,255,.04); border: .15rem solid transparent; transition: border-color .15s, background .15s; }
.opt.focused { border-color: var(--accent); background: rgba(255,210,63,.08); box-shadow: none; transform: none; }
.opt label { font-size: 1rem; color: #e3def8; }
.cycler { display: flex; align-items: center; gap: .4rem; }
.cycler .v { min-width: 8.5rem; text-align: center; font-family: var(--font-display); font-size: 1.15rem; }
.roster { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: flex; align-items: center; gap: .45rem; padding: .3rem .8rem .3rem .35rem; border-radius: 2rem; background: rgba(255,255,255,.07); font-size: .95rem; }
.chip b { font-family: var(--font-display); font-weight: 400; }
.chip i { width: 1.3rem; height: 1.3rem; border-radius: 50%; display: inline-block; }
.chip.bot { color: var(--muted); }

/* ---------- online ---------- */
.online-wrap { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 1.4rem; align-content: start; max-width: 76rem; width: 100%; margin: 0 auto; }
.online-card { display: flex; flex-direction: column; gap: .9rem; }
.ol-note { margin: 0; color: #d8d2f2; font-size: 1.05rem; line-height: 1.4; }
.room-code { font-family: var(--font-display); font-size: 5rem; letter-spacing: .3em; text-align: center; color: #fff; background: rgba(0,0,0,.35); border: .15rem dashed var(--accent); border-radius: 1rem; padding: .4rem 0 .4rem .3em; }
.room-code.small { font-size: 3rem; }
.ol-peers { display: flex; flex-wrap: wrap; gap: .5rem; min-height: 2.2rem; }
.ol-wait { color: var(--muted); animation: pulse 1.6s infinite; }
.ol-join { display: flex; gap: .8rem; }
.code-input { font-size: 2.2rem; letter-spacing: .3em; text-transform: uppercase; padding: .4rem .6rem; }
.ol-status { grid-column: span 2; text-align: center; color: var(--muted); font-size: 1.1rem; margin: 0; }
.btn:disabled { opacity: .35; pointer-events: none; }

/* ---------- settings ---------- */
.tabs { display: flex; gap: .6rem; margin-bottom: 1rem; }
.tab { cursor: pointer; padding: .6rem 1.3rem; border-radius: .8rem; background: rgba(255,255,255,.06); font-family: var(--font-display); font-size: 1.2rem; border: none; color: #fff; transition: background .15s, transform .15s; }
.tab.on { background: var(--accent); color: #fff; }
.settings-body { flex: 1; overflow-y: auto; max-width: 70rem; }
.set-row { display: flex; align-items: center; justify-content: space-between; padding: .7rem .9rem; border-radius: .8rem; border: .15rem solid transparent; }
.set-row + .set-row { margin-top: .3rem; }
.set-row.focused { border-color: var(--accent); background: rgba(255,210,63,.06); box-shadow: none; transform: none; }
.set-row .l { font-size: 1.15rem; }
.set-row .l small { display: block; color: var(--muted); font-size: .85rem; font-weight: 700; }
.slider { width: 22rem; height: 1rem; border-radius: 1rem; background: rgba(255,255,255,.12); position: relative; cursor: pointer; }
.slider .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 1rem; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.slider .knob { position: absolute; top: 50%; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #fff; transform: translate(-50%,-50%); box-shadow: 0 .2rem .4rem rgba(0,0,0,.4); }
.slider-wrap { display: flex; align-items: center; gap: 1rem; }
.slider-wrap .num { width: 3.5rem; text-align: right; font-family: var(--font-display); font-size: 1.2rem; }
.toggle { width: 4.4rem; height: 2.2rem; border-radius: 2rem; background: rgba(255,255,255,.14); position: relative; cursor: pointer; transition: background .2s; flex-shrink: 0; }
.toggle::after { content: ""; position: absolute; top: .25rem; left: .25rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.toggle.on { background: var(--good); }
.toggle.on::after { transform: translateX(2.2rem); }
.keybind { min-width: 8rem; padding: .5rem 1rem; border-radius: .6rem; background: #f1f1f5; color: #1a1626; font-family: var(--font-display); font-size: 1.1rem; text-align: center; cursor: pointer; box-shadow: 0 .2rem 0 #9d9db1; border: none; }
.keybind.listening { background: var(--accent); animation: pulse 0.8s infinite; }
.danger { background: #5a1a28 !important; color: #ffb3bd !important; }

/* ---------- cheats ---------- */
.cheat-wrap { flex: 1; display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.2rem; min-height: 0; overflow: hidden; }
.cheat-col { display: flex; flex-direction: column; gap: 1rem; overflow-y: auto; min-height: 0; padding-right: .4rem; }
.cheat-banner { background: repeating-linear-gradient(-45deg, #ffd23f, #ffd23f 1rem, #1a1626 1rem, #1a1626 2rem); padding: .3rem; border-radius: 1rem; }
.cheat-banner div { background: #2a0f18; border-radius: .8rem; padding: .7rem 1rem; color: #ffb3bd; font-size: 1rem; }
.cheat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.cheat { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .55rem .8rem; border-radius: .7rem; background: rgba(255,255,255,.05); cursor: pointer; border: .15rem solid transparent; }
.cheat .n { font-size: 1rem; }
.cheat .n small { display: block; color: var(--muted); font-size: .75rem; }
.cheat .toggle { transform: scale(.8); }
.cheat.focused { border-color: #ff6b7d; background: rgba(255,107,125,.08); box-shadow: none; transform: none; }
.spawn-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .45rem; }
.spawn-item { cursor: pointer; border-radius: .7rem; background: rgba(255,255,255,.06); border: .15rem solid transparent; padding: .4rem .2rem; display: flex; flex-direction: column; align-items: center; gap: .15rem; font-size: .7rem; color: #ddd; text-align: center; line-height: 1.1; }
.spawn-item canvas { width: 3rem; height: 3rem; }
.spawn-item.focused, .spawn-item:hover { border-color: #ff6b7d; background: rgba(255,107,125,.12); box-shadow: none; }
.spawn-item.disabled { opacity: .35; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.btn-row .btn { font-size: 1rem; padding: .6rem 1rem; }

/* ---------- controls ---------- */
.controls-wrap { flex: 1; display: grid; grid-template-columns: 1fr 1.2fr; gap: 1.2rem; min-height: 0; }
.ctl-list { display: grid; grid-template-columns: auto 1fr; gap: .55rem 1.2rem; align-items: center; font-size: 1.1rem; }
.ctl-list .k { text-align: right; white-space: nowrap; }
.pad-diagram { width: 100%; max-height: 22rem; }
.ctl-note { color: var(--muted); font-size: .95rem; margin-top: 1rem; line-height: 1.4; }

/* ---------- credits ---------- */
.credits { flex: 1; overflow-y: auto; max-width: 64rem; margin: 0 auto; text-align: center; font-size: 1.15rem; line-height: 1.6; color: #d8d2f2; }
.credits h3 { font-family: var(--font-display); font-weight: 400; color: var(--accent); font-size: 1.8rem; margin: 1.6rem 0 .3rem; }
.credits .fine { color: var(--muted); font-size: .95rem; }

/* ---------- overlays ---------- */
.overlay { align-items: center; justify-content: center; background: rgba(10,8,20,.62); backdrop-filter: blur(.25rem); }
.pause-card { width: 30rem; background: var(--panel); border: 1px solid var(--line); border-radius: 1.6rem; padding: 2rem; text-align: center; box-shadow: var(--shadow); }
.pause-card h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 3.4rem; color: var(--accent); }
.pause-card .sub { margin: 0 0 1.2rem; color: var(--muted); }
.pause-menu { display: flex; flex-direction: column; gap: .6rem; }
.pause-menu .btn { width: 100%; }
.pause-menu .pause-opt { display: flex; justify-content: space-between; align-items: center; font-size: 1.1rem; padding: .6rem 1.2rem; }
.pause-menu .pause-opt b { font-weight: 400; color: var(--accent); }
.end-card { --wc: #ffd23f; position: relative; width: min(84rem, 94vw); max-height: 94vh; overflow: auto; background: linear-gradient(180deg, color-mix(in srgb, var(--wc) 16%, #1b1636), #15112b 45%); border: 1px solid var(--line); border-radius: 1.8rem; padding: 0 2.2rem 1.8rem; box-shadow: 0 2rem 5rem rgba(0,0,0,.6); }
.end-hero { position: relative; text-align: center; margin: 0 -2.2rem; overflow: hidden; border-radius: 1.8rem 1.8rem 0 0; }
.end-rays { position: absolute; left: 50%; top: 62%; width: 90rem; height: 90rem; transform: translate(-50%, -50%); background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--wc) 16%, transparent) 0 8deg, transparent 8deg 20deg); mask-image: radial-gradient(circle, #000 10%, transparent 55%); -webkit-mask-image: radial-gradient(circle, #000 10%, transparent 55%); animation: rays 40s linear infinite; pointer-events: none; }
@keyframes rays { to { transform: translate(-50%, -50%) rotate(360deg); } }
.end-banner { position: relative; padding-top: 1.6rem; }
.end-kicker { display: inline-block; font-family: var(--font-display); font-size: .95rem; letter-spacing: .3em; color: var(--muted); padding: .25rem .9rem; border-radius: 2rem; background: rgba(255,255,255,.06); }
#end-podium { position: relative; display: block; width: 100%; height: auto; aspect-ratio: 1200 / 370; margin-top: -.5rem; }
#end-title { margin: .4rem 0 0; font-family: var(--font-display); font-weight: 400; font-size: 4.6rem; line-height: 1; -webkit-text-stroke: .25rem #1a1030; paint-order: stroke fill; text-shadow: 0 .4rem 0 #1a1030, 0 0 3rem color-mix(in srgb, var(--wc) 50%, transparent); animation: stampIn .6s var(--ease); }
@keyframes stampIn { from { transform: scale(2.2) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
#end-sub { margin: .5rem 0 0; color: #d8d2f2; font-size: 1.2rem; }
.awards { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .8rem; margin: 1rem 0 1.2rem; }
.award { display: flex; align-items: center; gap: .8rem; background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 1rem; padding: .7rem 1rem; font-size: .95rem; color: #d8d2f2; animation: scrIn .5s var(--ease) both; }
.award .ic { flex-shrink: 0; width: 2.6rem; height: 2.6rem; border-radius: .8rem; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; background: color-mix(in srgb, var(--ac) 25%, transparent); border: 1px solid color-mix(in srgb, var(--ac) 50%, transparent); }
.award b { color: var(--ac); font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; letter-spacing: .04em; display: block; }
.end-table-wrap { border-radius: 1rem; border: 1px solid var(--line); overflow: hidden; }
.end-table { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
.end-table th { color: var(--muted); font-size: .8rem; text-align: center; padding: .6rem .5rem; letter-spacing: .08em; background: rgba(255,255,255,.04); }
.end-table th:first-child, .end-table td:first-child { text-align: left; padding-left: 1rem; }
.end-table td { padding: .5rem; text-align: center; border-top: 1px solid var(--line); font-family: var(--font-display); font-size: 1.15rem; }
.end-table td.rk { width: 3rem; color: var(--muted); }
.end-table tr.win td { background: color-mix(in srgb, var(--wc) 10%, transparent); }
.end-table tr.win td.rk { color: var(--wc); }
.end-table .pn { display: flex; align-items: center; gap: .6rem; font-size: 1.2rem; }
.end-table .pn i { width: .9rem; height: .9rem; border-radius: 50%; display: inline-block; }
.end-table .pn small { font-family: var(--font-body); font-size: .85rem; color: var(--muted); }
.end-actions { display: flex; justify-content: center; gap: 1rem; margin-top: 1.4rem; }

.toast { position: fixed; top: 1.5rem; left: 50%; transform: translate(-50%, calc(-100% - 2rem)); opacity: 0; background: var(--brand); color: #fff; padding: .8rem 1.6rem; border-radius: 1rem; font-family: var(--font-display); font-size: 1.3rem; box-shadow: var(--shadow); transition: transform .35s var(--ease), opacity .2s; z-index: 50; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.6); z-index: 40; }
.modal.show { display: flex; }
.modal-card { background: var(--panel-2); padding: 2rem 3rem; border-radius: 1.4rem; text-align: center; border: .2rem solid var(--accent); }
.modal-card h3 { font-family: var(--font-display); font-weight: 400; font-size: 2rem; margin: 0 0 .5rem; }
.loading { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; flex-direction: column; background: var(--bg); z-index: 60; font-family: var(--font-display); font-size: 1.6rem; color: var(--muted); }
.loading.show { display: flex; }
.spinner { width: 4rem; height: 4rem; border-radius: 50%; border: .5rem solid rgba(255,255,255,.1); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

::-webkit-scrollbar { width: .6rem; } ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 1rem; } ::-webkit-scrollbar-track { background: transparent; }

@media (max-aspect-ratio: 4/3) {
  .main-menu { grid-template-columns: 1fr; }
  .menu-btn.hero { grid-column: span 1; }
  .title-side { display: none; }
  .lobby-grid { grid-template-columns: repeat(2, 1fr); }
  .play-wrap { grid-template-columns: 1fr 1fr; overflow-y: auto; }
  .crew-col { grid-row: span 2; }
  .mode-strip { grid-template-columns: repeat(5, 1fr); grid-auto-flow: row; }
}

/* ---------- Creative: hub & tier list maker ---------- */
.creative-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(24rem, 1fr)); gap: 1.4rem; align-content: start; }
.creative-card { display: flex; flex-direction: column; align-items: stretch; gap: 1rem; padding: 1.4rem; text-align: left; min-height: 16rem; }
.creative-card .cc-art { flex: 1; display: grid; place-items: center; background: rgba(0,0,0,.25); border-radius: .8rem; padding: 1rem; }
.creative-card .cc-art svg { width: 70%; max-height: 9rem; }
.creative-card .cc-name { font-family: var(--font-display); font-size: 1.8rem; }
.creative-card .cc-name small { display: block; font-family: var(--font-body); font-size: 1rem; color: var(--muted); margin-top: .2rem; }
.creative-card.soon { border: 2px dashed var(--line); border-radius: 1rem; justify-content: center; opacity: .6; }
.tier-tools { margin-left: auto; display: flex; gap: .6rem; }
.tier-tools .btn { font-size: 1.05rem; padding: .6rem 1.1rem; }
.tier-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 1rem; overflow-y: auto; padding: .3rem; }
.tier-board { display: flex; flex-direction: column; gap: .35rem; }
.tier-row { display: flex; min-height: 6.4rem; background: var(--panel); border: 1px solid var(--line); border-radius: .7rem; overflow: hidden; }
.tier-label { width: 6.4rem; flex-shrink: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 2.6rem; color: #1a1626; cursor: pointer; outline: none; }
.tier-label.focused { box-shadow: inset 0 0 0 .3rem #fff; }
.tier-zone { flex: 1; display: flex; flex-wrap: wrap; align-content: flex-start; gap: .35rem; padding: .35rem; min-height: 6.4rem; transition: background .15s; }
.tier-zone.over, .tier-label.over { background-color: rgba(255,255,255,.12); }
.tier-pool { background: var(--panel); border: 1px solid var(--line); border-radius: .9rem; padding: .6rem; }
.tier-pool-head { font-family: var(--font-display); font-size: 1.4rem; color: var(--accent); padding: .3rem .5rem; cursor: pointer; border-radius: .5rem; outline: none; }
.tier-pool-head small { font-family: var(--font-body); font-size: .9rem; color: var(--muted); margin-left: .6rem; }
.tier-pool-head.focused { box-shadow: 0 0 0 .2rem #fff; }
.tier-item { position: relative; width: 5.7rem; height: 5.7rem; background: rgba(255,255,255,.93); border-radius: .6rem; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; cursor: grab; outline: none; transition: transform .12s var(--ease), box-shadow .12s; }
.tier-item canvas { width: 4.4rem; height: 4.4rem; pointer-events: none; }
.tier-item span { font-size: .68rem; color: #1a1626; line-height: 1; text-align: center; padding: 0 .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; pointer-events: none; }
.tier-item .lv { position: absolute; top: .2rem; right: .25rem; background: #1a1626; color: #ffd23f; font-size: .7rem; border-radius: .4rem; padding: 0 .3rem; pointer-events: none; }
.tier-item.focused { transform: translateY(-.15rem); box-shadow: 0 0 0 .22rem #fff, 0 0 1rem rgba(255,59,95,.6); }
.tier-item.held { transform: scale(1.08) rotate(-4deg); box-shadow: 0 0 0 .25rem #ffd23f, 0 .6rem 1.2rem rgba(0,0,0,.5); z-index: 2; }
.tier-item.dragging { opacity: .35; }
.tier-board.view .tier-row, .tier-board.view .tier-zone { min-height: 5.2rem; }
.tier-board.view .tier-label { width: 5.2rem; font-size: 2.2rem; cursor: default; }
.tier-board.view .tier-item { width: 4.8rem; height: 4.8rem; cursor: default; }
.tier-board.view .tier-item canvas { width: 3.7rem; height: 3.7rem; }
/* official tier lists */
.to-side { width: 27rem; }
.to-save p { color: var(--muted); font-size: .95rem; margin: .3rem 0 .6rem; }
.to-save p b { color: #ffd23f; }
.to-save > .btn { width: 100%; margin-top: .6rem; }
.to-note { color: var(--muted); font-size: .95rem; padding: .3rem .2rem; }
.to-note.err { color: #ff8a80; }
.to-hist h3 small { color: var(--muted); font-size: .9rem; margin-left: .4rem; }
.to-ver { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .7rem; width: 100%; text-align: left; font: inherit; color: var(--text); background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: .6rem; padding: .5rem .7rem; margin-top: .4rem; cursor: pointer; outline: none; }
.to-ver .to-num { grid-row: span 2; align-self: center; font-family: var(--font-display); font-size: 1.5rem; color: var(--muted); }
.to-ver .to-name { font-family: var(--font-display); font-size: 1.05rem; }
.to-ver small { color: var(--muted); font-size: .8rem; }
.to-ver em, .to-title em { font-style: normal; font-size: .7em; background: #ffd23f; color: #1a1626; border-radius: .35rem; padding: .05rem .35rem; margin-left: .35rem; vertical-align: middle; }
.to-v { color: #ffd23f; font-weight: 800; }
.to-title .to-v { font-size: .7em; }
.opt-list.to-edit { flex-direction: row; gap: .6rem; align-items: center; max-width: 34rem; }
.to-edit .opt { flex: 1; }
.to-edit .btn { white-space: nowrap; }
.to-ver.on { background: rgba(255,59,95,.18); border-color: var(--accent); }
.to-ver.on .to-num { color: var(--accent); }
.to-ver.focused { box-shadow: 0 0 0 .2rem #fff; }
.to-view { flex: 1; min-width: 0; overflow-y: auto; display: flex; flex-direction: column; gap: .6rem; padding: .2rem; }
.to-title { display: flex; flex-direction: column; }
.to-title b { font-family: var(--font-display); font-size: 1.7rem; color: var(--accent); font-weight: normal; }
.to-title small { color: var(--muted); }
.to-empty { flex: 1; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.6rem; color: var(--muted); border: 2px dashed var(--line); border-radius: 1rem; }
.mk-wrap { flex: 1; min-height: 0; display: flex; gap: 1.4rem; }
.mk-stage { flex: 1; min-width: 0; display: grid; place-items: center; }
#mk-canvas { width: 100%; max-height: 100%; aspect-ratio: 25 / 15; object-fit: contain; border-radius: .8rem; box-shadow: var(--shadow); cursor: crosshair; outline: none; }
#mk-canvas.focused { box-shadow: 0 0 0 .25rem #ffd23f, var(--shadow); }
.mk-side { width: 30rem; flex-shrink: 0; overflow-y: auto; display: flex; flex-direction: column; gap: .8rem; }
.mk-name { font: inherit; font-size: 1.05rem; width: 15rem; padding: .35rem .6rem; border-radius: .5rem; border: 1px solid var(--line); background: rgba(0,0,0,.35); color: var(--text); }
.mk-head { font-family: var(--font-display); color: var(--accent); font-size: 1.15rem; letter-spacing: .05em; }
.mk-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.mk-tool { font-size: .95rem; padding: .5rem .4rem; display: flex; align-items: center; gap: .4rem; justify-content: center; }
.mk-tool i { width: 1rem; height: 1rem; border-radius: .25rem; border: 1px solid rgba(0,0,0,.5); flex-shrink: 0; }
.mk-tool.on { background: var(--accent); color: #fff; }
.mk-acts .btn { font-size: 1rem; padding: .6rem 1rem; }
.mk-help { font-size: .9rem; color: var(--muted); line-height: 1.4; margin: 0; }
.mk-help b { color: var(--text); }
.card-stage { flex: 1; min-width: 0; position: relative; }
#card-canvas { position: absolute; inset: 0; margin: auto; height: 100%; width: auto; max-width: 100%; aspect-ratio: 600 / 840; filter: drop-shadow(0 1rem 1.5rem rgba(0,0,0,.5)); }
.sb-wrap { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(34rem, 1fr)); gap: 1rem; align-content: start; padding: .3rem; }
.sb-grid { display: flex; flex-wrap: wrap; gap: .45rem; }
.sb-btn { font-size: 1rem; padding: .55rem .9rem; }
.sb-btn.on { background: var(--accent); color: #fff; }
.sb-btn.hit { animation: sbhit .3s ease; }
@keyframes sbhit { 0% { transform: scale(1.12); background: var(--accent-3); color: #1a1626; } 100% { transform: none; } }

/* ---------- Creative: forge, rules, rivals, beat lab ---------- */
.mk-side.wide { width: 36rem; }
.cr-swatches { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; max-width: 20rem; }
.cr-swatches i { width: 1.35rem; height: 1.35rem; border-radius: .35rem; border: 2px solid rgba(0,0,0,.4); cursor: pointer; }
.cr-swatches i.on { outline: .18rem solid #fff; outline-offset: .1rem; }
.fg-stage { flex: 1; min-width: 0; display: grid; place-items: center; }
.fg-card { width: 26rem; background: var(--panel); border: .25rem solid var(--fc); border-radius: 1.4rem; padding: 1.6rem; text-align: center; box-shadow: 0 0 2.5rem rgba(0,0,0,.4), 0 0 1.6rem color-mix(in srgb, var(--fc) 45%, transparent); }
.fg-card canvas { width: 13rem; height: 13rem; }
.fg-name { font-family: var(--font-display); font-size: 2.2rem; margin-top: .4rem; overflow-wrap: anywhere; }
.fg-type { color: var(--muted); letter-spacing: .1em; font-size: .9rem; }
.fg-meter { height: .7rem; border-radius: .4rem; background: rgba(255,255,255,.08); margin: 1rem 0 .3rem; overflow: hidden; }
.fg-meter span { display: block; height: 100%; border-radius: .4rem; transition: width .25s, background .25s; }
.fg-rate { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: .06em; }
.fg-desc { color: #e3def8; font-size: 1rem; line-height: 1.45; margin: .8rem 0 0; }
.rl-main { flex: 1; min-width: 0; overflow-y: auto; }
.rl-presets { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.rl-presets .btn { font-size: .9rem; padding: .55rem .5rem; }
.rl-summary { background: rgba(0,0,0,.25); border-radius: .8rem; padding: .9rem 1rem; font-size: .95rem; color: #e3def8; }
.rl-summary .rl-title { font-family: var(--font-display); font-size: 1.4rem; color: var(--accent); margin-bottom: .3rem; }
.rl-summary ul { margin: 0; padding-left: 1.1rem; line-height: 1.5; }
.rl-summary b { color: var(--muted); font-weight: 700; }
.rl-summary p { margin: 0; color: var(--muted); }
.rl-on { margin-top: .5rem; color: var(--good); font-family: var(--font-display); letter-spacing: .05em; }
.chip.rules-chip { cursor: pointer; }
.rv-grid { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; gap: .8rem; overflow-y: auto; align-content: start; }
.rv-card { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: .6rem; min-height: 14rem; text-align: center; }
.rv-card canvas { width: 12rem; height: 12rem; }
.rv-card b { font-size: 1.15rem; margin-top: .2rem; overflow-wrap: anywhere; }
.rv-card small { display: block; font-family: var(--font-body); font-size: .8rem; color: var(--muted); }
.rv-card.on { border-color: var(--accent); background: rgba(255,59,95,.14); }
.rv-card.empty { opacity: .6; border-style: dashed; }
.rv-card .plus { font-size: 3.2rem; line-height: 1; color: var(--muted); }
.rv-top { display: flex; align-items: center; gap: .8rem; }
.rv-top canvas { width: 13rem; height: 13rem; flex-shrink: 0; }
.rv-quote { font-size: 1.15rem; font-style: italic; color: #fff; background: rgba(255,255,255,.08); border-radius: 1rem; padding: .7rem 1rem; }
.bt-grid { flex: 1; min-width: 0; overflow-y: auto; display: flex; flex-direction: column; gap: .18rem; }
.bt-sec { font-family: var(--font-display); color: var(--accent); font-size: 1rem; letter-spacing: .06em; margin: .4rem 0 .1rem; }
.bt-row { display: flex; gap: .18rem; align-items: center; }
.bt-label { width: 4.2rem; flex-shrink: 0; font-size: .85rem; color: var(--muted); text-align: right; padding-right: .5rem; }
.bt-cell { flex: 1; height: 2.15rem; min-width: 0; border-radius: .3rem; border: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.06); cursor: pointer; padding: 0; outline: none; }
.bt-cell.beat { background: rgba(255,255,255,.12); }
.bt-row.lead .bt-cell.on { background: #ff3b5f; }
.bt-row.bass .bt-cell.on { background: #40c4ff; }
.bt-row.drum .bt-cell.on { background: #ffd23f; }
.bt-cell.now { box-shadow: inset 0 0 0 .15rem #fff; }
.bt-cell.focused { box-shadow: 0 0 0 .16rem #fff; transform: none; }

/* ---------- Controls handbook inside Settings ---------- */
.controls-wrap.in-settings { flex: none; }
.stats-chip { cursor: pointer; }
.stats-chip .acct-link { color: var(--text); text-decoration: underline; text-underline-offset: .2rem; }

/* ---------- LaMerk account card ---------- */
.acct-panel { display: flex; flex-direction: column; gap: 1rem; max-width: 46rem; }
.acct-head { display: flex; gap: 1.2rem; align-items: center; }
.acct-head h3 { margin: 0 0 .3rem; font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; color: var(--accent); letter-spacing: .05em; }
.acct-head p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.35; }
.acct-logo { width: 5rem; height: 5rem; border-radius: 1rem; object-fit: cover; flex-shrink: 0; }
.acct-methods { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .5rem; }
.acct-method { padding: .5rem .4rem; font-size: 1rem; opacity: .65; }
.acct-method.on { opacity: 1; background: var(--accent); border-color: var(--accent); color: #000; }
.acct-method.focused { opacity: 1; }
.acct-form { display: flex; flex-direction: column; gap: .6rem; } /* stacked so a controller walks straight down it */
.acct-form .acct-in[hidden] { display: none; }
.acct-form .acct-in { flex: none; width: 100%; box-sizing: border-box; font-size: 1.2rem; padding: .7rem 1rem; text-align: left; }
.acct-form .acct-in.focused { box-shadow: 0 0 0 .2rem #ffd23f; }
.acct-err { color: var(--bad); min-height: 1.2rem; font-size: 1rem; }
.acct-fine { color: var(--muted); font-size: .9rem; margin: 0; }
.acct-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: .6rem; }
.acct-stats div { background: rgba(255,255,255,.06); border-radius: .8rem; padding: .8rem; text-align: center; }
.acct-stats b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 2rem; color: #fff; }
.acct-stats small { color: var(--muted); letter-spacing: .08em; }

/* ---------- PLOTS ---------- */
.screen.plots-screen { padding: 0; }
body:has(#scr-plots.active) .menu-bg, body:has(#scr-plots.active) #prompt-bar { display: none; }
#plots-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }
#scr-plots[data-view="map"] #plots-canvas { cursor: grab; }
.pl-hud { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: flex-start; gap: .8rem; padding: 1rem 1.2rem; pointer-events: none; }
.pl-hud > * { pointer-events: auto; }
.pl-money { background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: .5rem 1rem; box-shadow: var(--shadow); }
.pl-money b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 2rem; color: #7dff8a; line-height: 1.1; }
.pl-lv { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--muted); }
.pl-lv i { width: 7rem; height: .45rem; border-radius: 1rem; background: rgba(255,255,255,.12); overflow: hidden; display: block; }
.pl-lv em { display: block; height: 100%; background: #ffd23f; }
.pl-wx { background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: .5rem .9rem; font-family: var(--font-display); font-size: 1.2rem; color: #ffd23f; box-shadow: var(--shadow); }
.pl-wx.rain { color: #9fd3f5; }
.pl-wx small { display: block; font-family: var(--font-body); font-size: .75rem; color: var(--muted); }
.pl-banner { flex: 1; text-align: center; align-self: center; font-family: var(--font-display); font-size: 1.3rem; text-shadow: 0 .15rem .3rem rgba(0,0,0,.7); }
.pl-banner small { display: block; font-family: var(--font-body); font-size: .85rem; color: #e6efe3; }
.pl-banner.build { background: rgba(16,12,32,.85); border-radius: 2rem; padding: .5rem 1rem; flex: 0 1 auto; margin: 0 auto; color: #ffd23f; }
.pl-banner .pl-hb { margin-left: .6rem; }
.pl-btns { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.pl-hb { cursor: pointer; border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: .7rem; padding: .45rem .7rem; font-family: var(--font-display); font-size: 1rem; letter-spacing: .04em; display: inline-flex; align-items: center; gap: .35rem; box-shadow: 0 .2rem 0 rgba(0,0,0,.3); }
.pl-hb:hover { background: var(--accent); }
.pl-hb .keycap { min-width: 1.4rem; height: 1.4rem; font-size: .7rem; }
.pl-hot { position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%); display: flex; gap: .4rem; align-items: flex-end; flex-wrap: wrap; justify-content: center; max-width: 96vw; }
.pl-slot { position: relative; width: 5.2rem; height: 5.6rem; cursor: pointer; border: .15rem solid var(--line); background: var(--panel); border-radius: .8rem; color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; padding: .2rem; box-shadow: var(--shadow); }
.pl-slot.on { border-color: #ffd23f; background: rgba(80,60,10,.9); transform: translateY(-.3rem); }
.pl-slot .k { position: absolute; left: .35rem; top: .2rem; font-size: .75rem; color: var(--muted); }
.pl-slot small { font-size: .65rem; line-height: 1; text-align: center; white-space: nowrap; overflow: hidden; max-width: 100%; }
.pl-slot em { position: absolute; right: .3rem; top: .2rem; font-style: normal; font-size: .75rem; color: #7dff8a; }
.pl-slot .pl-ic { width: 2.8rem; height: 2.8rem; }
.pl-hint { width: 100%; text-align: center; font-size: .85rem; color: #f3f7f1; text-shadow: 0 .1rem .3rem #000; }
.pl-ic { width: 2.6rem; height: 2.6rem; flex-shrink: 0; image-rendering: auto; }
.pl-gate { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: 1.2rem; }
#scr-plots[data-view="gate"] .pl-gate, #scr-plots[data-view="loading"] .pl-gate, #scr-plots[data-view="error"] .pl-gate { display: flex; }
.pl-gate-card { max-width: 52rem; width: 100%; display: flex; flex-direction: column; gap: 1rem; }
.pl-gate-card > .btn { align-self: flex-start; font-size: 1rem; }
.pl-title { font-family: var(--font-display); font-size: 4rem; color: #7dff8a; line-height: 1; letter-spacing: .04em; }
.pl-sub { color: var(--muted); font-size: 1.1rem; margin: 0; line-height: 1.4; }
.pl-panel { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.45); padding: 1.2rem; }
.pl-panel.open { display: flex; }
.pl-panel.side { background: none; justify-content: flex-end; align-items: flex-start; padding-top: 6rem; pointer-events: none; }
.pl-panel.side .pl-card { pointer-events: auto; max-width: 24rem; }
.pl-card { width: 100%; max-width: 54rem; max-height: 86vh; display: flex; flex-direction: column; }
.pl-head { display: flex; align-items: flex-start; gap: 1rem; }
.pl-h { flex: 1; }
.pl-h h3 { display: flex; align-items: center; gap: .6rem; margin: 0 0 .3rem; }
.pl-h p { margin: 0 0 .8rem; color: var(--muted); }
.pl-h p b { color: #fff; }
.pl-x { font-size: 1rem; padding: .4rem .8rem; }
.pl-body { overflow-y: auto; min-height: 0; padding-right: .3rem; }
.pl-tabs { margin-bottom: .8rem; }
.pl-row { display: flex; align-items: center; gap: .8rem; padding: .5rem .6rem; border-radius: .8rem; }
.pl-row:nth-child(odd) { background: rgba(255,255,255,.03); }
.pl-row.me { background: rgba(255,210,63,.12); }
.pl-rt { flex: 1; min-width: 0; }
.pl-rt b { font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; letter-spacing: .02em; }
.pl-rt small { display: block; color: var(--muted); font-size: .85rem; }
.pl-rr { display: flex; gap: .4rem; align-items: center; flex-shrink: 0; }
.pl-rr .btn { font-size: .95rem; padding: .45rem .8rem; }
.pl-n { color: var(--muted); font-size: .95rem; }
.pl-chip { font-family: var(--font-body); font-size: .75rem; background: #ffd23f; color: #1a1626; padding: .1rem .5rem; border-radius: 1rem; vertical-align: middle; }
.pl-lock { color: var(--muted); font-size: .85rem; padding: .3rem .6rem; border: 1px dashed var(--line); border-radius: .6rem; }
.pl-own { color: #7dff8a; font-family: var(--font-display); font-size: .95rem; }
.btn.poor { opacity: .55; }
.pl-empty { color: var(--muted); text-align: center; padding: 1rem; }
.pl-sec { font-family: var(--font-display); color: var(--accent); letter-spacing: .06em; margin: .8rem 0 .3rem; }
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr)); gap: .5rem; }
.pl-cell { position: relative; background: rgba(255,255,255,.05); border-radius: .8rem; padding: .5rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .2rem; }
.pl-cell.tool { background: rgba(255,210,63,.08); }
.pl-cell small { font-size: .75rem; color: var(--muted); }
.pl-cell em { position: absolute; right: .4rem; top: .3rem; font-style: normal; color: #fff; font-family: var(--font-display); }
.pl-bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .6rem; }
.pl-btile { cursor: pointer; text-align: left; border: .15rem solid var(--line); background: rgba(255,255,255,.04); color: var(--text); border-radius: .9rem; padding: .7rem; display: grid; grid-template-columns: 3.4rem 1fr; grid-template-rows: auto auto auto; column-gap: .6rem; align-items: center; font-family: var(--font-body); }
.pl-btile .pl-bic { grid-row: 1 / 4; width: 3.4rem; height: 3.4rem; }
.pl-btile b { font-family: var(--font-display); font-weight: 400; font-size: 1.1rem; }
.pl-btile small { color: var(--muted); font-size: .78rem; line-height: 1.25; }
.pl-btile em { font-style: normal; color: #7dff8a; font-size: .85rem; }
.pl-btile.locked { opacity: .45; }
.pl-btile.locked em { color: var(--muted); }
.pl-btile.poor em { color: var(--bad); }
.pl-btile.focused, .pl-btile:hover { border-color: #ffd23f; }
.pl-land p { color: var(--muted); line-height: 1.4; }
.pl-land b { color: #fff; }
.pl-rank { width: 2rem; text-align: center; font-family: var(--font-display); font-size: 1.4rem; color: #ffd23f; }
.pl-cash { font-family: var(--font-display); font-size: 1.2rem; color: #7dff8a; margin-right: .4rem; }
.pl-menu { display: flex; flex-direction: column; gap: .5rem; max-width: 24rem; }
.pl-help p { line-height: 1.45; color: #e9dde0; }
.pl-help .ctl-list { margin: 1rem 0; font-size: 1rem; }
.pl-cellbody p { margin: .2rem 0 .6rem; color: var(--muted); }
.pl-cellbody b { color: #fff; font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; }

/* Plots: searchable card lists (shop, selling, bag, crafting, build, factories) */
.pl-card { max-width: 68rem; max-height: 90vh; }
.pl-lvbar { display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.pl-search { flex: 1; min-width: 0; font-size: 1rem; padding: .55rem .9rem; border-radius: .8rem; text-transform: none; }
.pl-search.focused { outline: .15rem solid #ffd23f; }
.pl-sort { font-size: .9rem; padding: .5rem .8rem; white-space: nowrap; }
.pl-sort b { color: #ffd23f; font-weight: 400; }
.pl-cats { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .6rem; }
.btn.pl-cat { font-size: .82rem; padding: .3rem .7rem; border-radius: 2rem; background: rgba(255,255,255,.05); }
.btn.pl-cat small { margin-left: .35rem; opacity: .6; font-size: .75rem; }
.btn.pl-cat.on { background: #ffd23f; color: #1a1626; border-color: #ffd23f; }
.pl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(24rem, 1fr)); gap: .5rem; }
.pl-list > .pl-empty { grid-column: 1 / -1; }
.pl-it { display: grid; grid-template-columns: 3.6rem 1fr; grid-template-areas: "ic t" "a a"; gap: .35rem .75rem; align-items: center; padding: .65rem .75rem; border-radius: .9rem; background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.025)); border: 1px solid var(--line); transition: border-color .12s; }
.pl-it:hover, .pl-it:focus-within { border-color: rgba(255,210,63,.55); }
.pl-it.on { border-color: #7dff8a; background: rgba(125,255,138,.08); }
.pl-it.me { border-color: #ffd23f; background: rgba(255,210,63,.1); }
.pl-it.locked { opacity: .5; }
.pl-it-ic { grid-area: ic; position: relative; width: 3.6rem; height: 3.6rem; border-radius: .8rem; background: rgba(0,0,0,.28); display: flex; align-items: center; justify-content: center; }
.pl-it-ic .pl-ic { width: 3rem; height: 3rem; }
.pl-it-ic em { position: absolute; right: -.35rem; bottom: -.35rem; font-style: normal; font-family: var(--font-display); font-size: .8rem; background: #1a1626; border: 1px solid var(--line); border-radius: 1rem; padding: 0 .4rem; color: #fff; }
.pl-it-ic .pl-rank { width: auto; }
.pl-it-t { grid-area: t; min-width: 0; }
.pl-it-t b { font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; letter-spacing: .02em; display: block; }
.pl-it-t small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.3; }
.pl-it-m { display: block; font-size: .82rem; margin-top: .15rem; color: #d7cdd0; }
.pl-it-a { grid-area: a; display: flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; align-items: center; }
.pl-it-a .btn { font-size: .85rem; padding: .38rem .7rem; }
.pl-price { color: #7dff8a; font-family: var(--font-display); font-weight: 400; }
.pl-poor { color: var(--bad); font-family: var(--font-display); font-weight: 400; }
.btn.poor { opacity: .55; }
.pl-pager { display: flex; justify-content: center; align-items: center; gap: .6rem; margin: .7rem 0 .2rem; }
.pl-pager .btn { font-size: .85rem; padding: .35rem .8rem; }
.pl-pager .btn:disabled { opacity: .3; }
.pl-pinfo { color: var(--muted); font-size: .85rem; }
.pl-quick { margin-bottom: .6rem; flex-wrap: wrap; }
.pl-note { color: var(--muted); margin: 0 0 .6rem; line-height: 1.4; }
.pl-note b { color: #fff; }
.pl-fac { display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem; border-radius: .9rem; background: rgba(0,0,0,.25); border: 1px solid var(--line); margin-bottom: .6rem; }
.pl-fac.out { border-color: #7dff8a; background: rgba(125,255,138,.08); }
.pl-bar { display: block; height: .55rem; border-radius: 1rem; background: rgba(255,255,255,.1); overflow: hidden; margin-top: .4rem; }
.pl-bar em { display: block; height: 100%; background: linear-gradient(90deg, #5fe06a, #b6ff7a); transition: width .25s linear; }
@media (max-width: 700px) { .pl-list { grid-template-columns: 1fr; } .pl-lvbar { flex-wrap: wrap; } }
.pl-hot { width: max-content; }
.pl-drive { display: flex; align-items: center; gap: .8rem; background: var(--panel); border: .15rem solid #ffd23f; border-radius: 1rem; padding: .5rem .9rem; box-shadow: var(--shadow); max-width: 44rem; }
.pl-drive .pl-dic { width: 4.6rem; height: 4.6rem; }
.pl-drive .pl-rt small b { color: #fff; }
.pl-drive .pl-bar { width: 14rem; }
.pl-width { display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.pl-width > div { display: flex; align-items: center; gap: .35rem; }
.pl-width b { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; color: #ffd23f; min-width: 1.4rem; text-align: center; }
.pl-width small { font-size: .65rem; color: var(--muted); }
.pl-width .pl-hb { padding: .2rem .55rem; font-size: 1.1rem; }
.pl-it.resting .pl-it-ic { opacity: .55; filter: grayscale(.6); }

/* ---------- monthly themes (season.js) ---------- */
html[class*="season-"] .bg-blob.b1 { background: radial-gradient(circle, var(--season-1), transparent 65%); }
html[class*="season-"] .bg-blob.b2 { background: radial-gradient(circle, var(--season-2), transparent 65%); }
html[class*="season-"] .bg-blob.b3 { background: radial-gradient(circle, var(--season-3), transparent 65%); }
.bg-season { position: absolute; inset: 0; overflow: hidden; }
.bg-season span { position: absolute; top: -3rem; opacity: .5; animation: seasonfall linear infinite; will-change: transform; }
@keyframes seasonfall { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(var(--sway, 0), 110vh) rotate(320deg); } }
html.lowfx .bg-season span { animation-duration: 40s !important; }
.season-badge { display: inline-block; margin-top: .6rem; padding: .3rem .8rem; border-radius: 999px; font-family: 'Lilita One', sans-serif; font-size: .95rem; letter-spacing: .04em;
  color: #fff; background: color-mix(in srgb, var(--season-1, #c8193c) 55%, rgba(0,0,0,.4)); border: 2px solid var(--season-2, #fff); }

/* Plots at Low and Lowest quality: nothing fancy behind or around the menus */
/* (animations finish instantly rather than being removed: screens rely on them to end up visible) */
#scr-plots.pl-lowfx, #scr-plots.pl-lowfx * { box-shadow: none !important; text-shadow: none !important; backdrop-filter: none !important; transition-duration: 0s !important; animation-duration: .001s !important; animation-iteration-count: 1 !important; }

/* ---------- removing players ---------- */
.crew-top .crew-remove { margin-left: auto; background: rgba(255,255,255,.08); border: .12rem solid transparent; color: var(--muted); border-radius: .5rem; cursor: pointer; font-size: .75rem; padding: .2rem .45rem; font-family: inherit; font-weight: 800; }
.crew-top .crew-remove:hover, .crew-top .crew-remove.focused { color: #fff; background: #c62f3a; border-color: #fff; }

/* ---------- TV mode ---------- */
.tv-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.25fr 1fr; gap: 1.4rem; align-content: start; max-width: 72rem; width: 100%; margin: 0 auto; overflow-y: auto; padding: .3rem; }
.tv-wrap.gate { grid-template-columns: 1fr; max-width: 48rem; }
.tv-col { display: flex; flex-direction: column; gap: .8rem; min-width: 0; }
.tv-saved { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; justify-content: space-between; border-color: #3fd27a; }
.tv-saved b { font-family: var(--font-display); font-size: 1.2rem; font-weight: 400; display: block; }
.tv-saved small { color: var(--muted); overflow-wrap: anywhere; }
.tv-saved .btn { font-size: 1rem; padding: .6rem 1rem; }
.tv-channel { display: flex; gap: 1rem; align-items: center; text-align: left; padding: 1rem 1.2rem; border-radius: var(--radius); background: var(--panel); border: .2rem solid transparent; cursor: pointer; color: var(--text); font-family: inherit; width: 100%; }
.tv-channel svg { width: 3rem; height: 3rem; flex: none; color: #b81c3a; }
.tv-channel b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; letter-spacing: .03em; }
.tv-channel small { color: var(--muted); font-size: .95rem; line-height: 1.3; display: block; }
.tv-channel.selected { border-color: #b81c3a; background: rgba(184,28,58,.2); }
.tv-channel.focused, .tv-channel:hover { border-color: var(--accent); }
.tv-note { color: var(--muted); font-size: .9rem; line-height: 1.35; margin: 0; }
.tv-opts { display: flex; flex-direction: column; gap: .45rem; }
.tv-wrap .btn.big { width: 100%; }
#ov-tv { background: none; backdrop-filter: none; pointer-events: none; align-items: flex-start; justify-content: flex-end; padding: .8rem; }
.tv-bar { pointer-events: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .5rem; max-width: 100%; padding: .45rem .55rem; border-radius: 1rem; background: rgba(14,11,28,.82); border: 1px solid var(--line); }
.tv-bar .btn { font-size: .95rem; padding: .5rem .8rem; }
.tv-rec { display: none; align-items: center; gap: .4rem; font-family: var(--font-display); font-size: 1rem; color: #fff; padding: 0 .4rem; white-space: nowrap; }
.tv-rec.on { display: flex; }
.tv-rec i { width: .7rem; height: .7rem; border-radius: 50%; background: #ff3b4d; }
.tv-hint { position: fixed; left: 50%; bottom: 2.4rem; transform: translateX(-50%); padding: .55rem 1.1rem; border-radius: 2rem; background: rgba(14,11,28,.78); color: #fff; font-family: var(--font-display); font-size: 1.05rem; opacity: 0; transition: opacity .5s; white-space: nowrap; }
.tv-hint.show { opacity: 1; }
body.tv-vibe .tv-bar, body.tv-vibe #toast { display: none; }
body.tv-vibe, body.tv-vibe * { cursor: none !important; }
#scr-plots.tv-plot canvas { cursor: default; }
@media (max-width: 800px) { .tv-wrap { grid-template-columns: 1fr; } }
