/* LYGO Arena — shell styles.
   Same stone-and-cyan family as the rest of chatagent.ca, laid out for spectating: two
   team panels that stay readable while the fight happens, and a ring that keeps the ring. */
:root {
  --bg: #07080e; --panel: #0c1018ee; --panel-2: #0a0e16;
  --line: #1e2a3a; --line-2: #2b3a4f;
  --cyan: #5eead4; --gold: #fbbf24; --red: #f87171; --green: #4ade80;
  --mute: #94a3b8; --text: #e8eef5;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font-family: "Source Sans 3", system-ui, sans-serif; overflow: hidden; }
body { display: grid; grid-template-rows: auto 1fr auto; }
.hidden { display: none !important; }
b, strong { color: var(--text); }
button { font: inherit; color: inherit; }
h1, h2, h3, .brand, .kicker, .btn { font-family: Syne, sans-serif; }

/* ------------------------------------------------------------------- boot --- */
.boot { position: fixed; inset: 0; display: grid; place-content: center; text-align: center; gap: .4rem;
  background: radial-gradient(ellipse at 50% 30%, #1a1428 0%, #07080e 70%); z-index: 60; }
.boot h1 { margin: 0; letter-spacing: .06em; font-size: clamp(2rem, 6vw, 3.2rem); }
.kicker { letter-spacing: .22em; text-transform: uppercase; color: var(--cyan); font-size: .72rem; margin: 0 0 .2rem; }
.boot-msg { color: var(--mute); }

/* -------------------------------------------------------------------- top --- */
.top { display: flex; align-items: center; gap: .5rem; padding: .4rem .7rem; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); background: #080a10; }
.brand { color: var(--text); text-decoration: none; font-weight: 800; font-size: .95rem; }
.games-mini { color: var(--gold); text-decoration: none; font-size: .7rem; letter-spacing: .12em;
  text-transform: uppercase; font-weight: 700; }
.grow { flex: 1 1 auto; }
.phase-pill { font-family: "IBM Plex Mono", monospace; font-size: .72rem; letter-spacing: .14em;
  padding: .26rem .7rem; border: 1px solid var(--cyan); color: var(--cyan); border-radius: 999px; }
.paypal-mini { color: #fff; background: #0070ba; text-decoration: none; font-size: .7rem;
  padding: .26rem .55rem; border-radius: 7px; font-weight: 700; }
.speed { display: flex; gap: .22rem; }
.btn { border: 1px solid var(--line-2); background: #0d141f; color: var(--text); border-radius: 9px;
  padding: .34rem .7rem; cursor: pointer; font-weight: 700; font-size: .8rem; letter-spacing: .03em;
  transition: border-color .14s ease, transform .12s ease, background .14s ease; }
.btn:hover { border-color: var(--cyan); transform: translateY(-1px); }
.btn.ghost { background: transparent; font-size: .72rem; padding: .3rem .55rem; color: var(--mute); }
.btn.ghost:hover, .btn.ghost.on { color: var(--text); border-color: var(--cyan); }
.btn.gold { background: linear-gradient(180deg, #fde68a, #f59e0b); color: #1a1206; border-color: #f59e0b; }
.btn.gold b, .btn.gold span { color: #1a1206; }
.btn.on { border-color: var(--gold); }
.btn.big { padding: .6rem 1.1rem; font-size: .95rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

/* ----------------------------------------------------------------- battle --- */
.battle { min-height: 0; }
.stage { display: grid; grid-template-columns: 268px minmax(0, 1fr) 268px; height: 100%; min-height: 0; }
.viewport { position: relative; min-width: 0; min-height: 0; background: #05060a; }
#arena { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.team { background: var(--panel-2); border: 0 solid var(--line); padding: .5rem; display: flex; flex-direction: column; gap: .45rem; min-height: 0; overflow: hidden; }
.colbody { flex: 1 1 auto; min-height: 0; overflow: hidden auto; }
.team.left { border-right-width: 1px; }
.team.right { border-left-width: 1px; }
.theading { display: flex; align-items: baseline; justify-content: space-between; gap: .4rem; margin-bottom: .4rem; }
.theading h3 { margin: 0; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.theading .tag { font-family: "IBM Plex Mono", monospace; font-size: .66rem; color: var(--cyan); }
.trows { display: flex; flex-direction: column; gap: .38rem; }
.trow { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: .45rem; align-items: center;
  padding: .34rem; border: 1px solid var(--line); border-radius: 10px; background: #080c14; }
.trow.down { opacity: .42; filter: grayscale(.7); }
.tart { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; background: #0d121c;
  image-rendering: pixelated; }
.tname { display: flex; align-items: baseline; justify-content: space-between; gap: .3rem; font-size: .82rem; }
.tname b { font-weight: 600; }
.tname .tpw { font-family: "IBM Plex Mono", monospace; font-size: .62rem; color: var(--mute); }
.tbar { position: relative; height: 7px; margin: .22rem 0 .2rem; background: #16202e; border-radius: 99px; overflow: hidden; }
.tbar .hp { position: absolute; inset: 0 auto 0 0; width: 100%; background: linear-gradient(90deg, #34d399, #5eead4); }
.tbar .hp.foe { background: linear-gradient(90deg, #f87171, #fb923c); }
.tbar .hp.low { background: linear-gradient(90deg, #ef4444, #f59e0b); }
.tbar .shd { position: absolute; inset: 0 auto 0 0; width: 0; background: #60a5fa88; box-shadow: inset 0 0 6px #93c5fd; }
.tstatus { display: flex; flex-wrap: wrap; gap: .2rem; min-height: 13px; }
.tstatus .st { font-style: normal; font-size: .58rem; letter-spacing: .06em; text-transform: uppercase;
  padding: .05rem .3rem; border-radius: 5px; background: #1b2432; color: var(--mute); }
.tstatus .st.burn, .tstatus .st.bleed { color: #fdba74; }
.tstatus .st.stun, .tstatus .st.root, .tstatus .st.silence, .tstatus .st.hush { color: #fca5a5; }
.tstatus .st.wound, .tstatus .st.veil { color: #f0abfc; }
.tstatus .st.regen, .tstatus .st.swift, .tstatus .st.haste, .tstatus .st.rage { color: #86efac; }
.tstatus .st.shield, .tstatus .st.ward { color: #93c5fd; }
.tcds { display: flex; gap: .2rem; }
.tcds .cd { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px;
  font-family: "IBM Plex Mono", monospace; font-size: .56rem; font-style: normal; letter-spacing: 0;
  border: 1px solid var(--line); color: var(--mute); background:
    linear-gradient(90deg, #1f2b3d var(--p, 0%), #0b1017 0); }
.tcds .cd.ready { color: #0b1017; background: var(--cyan); border-color: var(--cyan); font-weight: 700; }
.tcds .cd.off { opacity: .3; }
.announce { position: absolute; left: 50%; top: 20%; transform: translate(-50%, -50%);
  font: 800 clamp(2rem, 7vw, 4.4rem) Syne, sans-serif; color: var(--gold);
  text-shadow: 0 3px 0 #000, 0 0 26px #fbbf2488; pointer-events: none; opacity: 0; letter-spacing: .04em;
  transition: opacity .18s ease; }
.announce.show { opacity: 1; }
.meters { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); display: flex; align-items: center;
  gap: .5rem; background: #05070ce8; border: 1px solid var(--line); border-radius: 999px; padding: .22rem .6rem;
  width: min(460px, 84%); }
.meters i { height: 6px; border-radius: 99px; display: block; }
.meters .mo { background: linear-gradient(90deg, #34d399, #5eead4); width: 50%; }
.meters .mf { background: linear-gradient(90deg, #fb923c, #f87171); width: 50%; margin-left: auto; }
.meters span { font-family: "IBM Plex Mono", monospace; font-size: .74rem; color: var(--text); flex: 0 0 auto; }
.meters span.hot { color: #fca5a5; }
.feed { position: absolute; left: 10px; bottom: 10px; width: min(330px, 56%); max-height: 40%;
  overflow: hidden; display: flex; flex-direction: column; gap: .18rem; pointer-events: none; }
.feed p { margin: 0; font-size: .88rem; line-height: 1.3; color: var(--text);
  background: #05070cd0; border-left: 2px solid var(--line-2); padding: .18rem .4rem; border-radius: 0 6px 6px 0;
  animation: feed-in .2s ease; }
.feed p span { font-family: "IBM Plex Mono", monospace; font-size: .64rem; color: var(--mute); margin-right: .35rem; }
.feed p.kill { border-left-color: var(--red); }
.feed p.move { border-left-color: var(--cyan); color: var(--cyan); }
.feed p.over { border-left-color: var(--gold); color: var(--gold); }
.feed p.law { border-left-color: var(--gold); color: var(--gold); }
@keyframes feed-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------- dock --- */
.dock { display: flex; align-items: center; gap: .6rem; padding: .35rem .7rem; flex-wrap: wrap;
  border-top: 1px solid var(--line); background: #080a10; }
body.in-menu .top, body.in-menu .dock { display: none !important; }
.radio-inline { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.radio-inline button {
  background: #13202c; color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: .28rem .55rem; cursor: pointer; font: 650 .72rem Syne, sans-serif;
}
.radio-title-inline { font-family: "IBM Plex Mono", monospace; font-size: .68rem; color: var(--mute);
  max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-vol { display: inline-flex; align-items: center; gap: .28rem;
  font: 650 .62rem "IBM Plex Mono", monospace; color: var(--mute); }
.radio-vol input { width: 88px; accent-color: var(--gold); cursor: pointer; }
.radio-dsp { font-size: .68rem; color: var(--mute); }
.radio-dsp a { color: var(--cyan); }
.dock-note { font-size: .74rem; color: var(--mute); }

/* ------------------------------------------------------------- title screen --- */
.menu { position: fixed; inset: 0; z-index: 30; background: #07080e; overflow: hidden; }
.title-screen { height: 100%; display: grid; grid-template-columns: 1.25fr minmax(280px, 420px); }
.title-art { position: relative; min-height: 0; background: #05060a; }
.title-art img, .title-art .menu-film { width: 100%; height: 100%; object-fit: cover; display: block; }
.title-art .menu-film { position: absolute; inset: 0; z-index: 1; }
.title-art .menu-live { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }
.title-panel { padding: 1.3rem 1.25rem 1.5rem; overflow: auto; border-left: 1px solid var(--line);
  height: 100%; background: #080b12; display: flex; flex-direction: column; gap: .15rem; }
.title-panel > .btn.ghost { align-self: flex-start; width: auto; }
/* A full-width transparent .btn.ghost inside a stretched flex column reads as an
   empty text input sitting exactly where the name field should be. Keep it a pill. */
.menu-actions { display: flex; flex-direction: column; gap: .45rem; margin: .35rem 0 .6rem; }
.menu-actions .btn { text-align: left; padding: .72rem .9rem; font-size: 1rem; }
.menu-actions .btn span { display: block; font-family: "Source Sans 3", sans-serif; font-weight: 600;
  font-size: .78rem; color: var(--mute); margin-top: .12rem; }
.menu-actions .btn.gold span { color: #5c3b08; }
.menu-actions .btn.tv { border-color: #fbbf24; }
.menu-actions .btn.tv b { letter-spacing: .12em; }
.menu-actions a.btn { display: block; text-decoration: none; }
.menu-actions .btn.unity { border-color: #f59e0b; }
.menu-actions .btn.unity b { letter-spacing: .12em; }
.tv-bug { position: absolute; left: 14px; bottom: 54px; z-index: 7; pointer-events: none;
  min-width: 7.2rem; padding: .35rem .6rem .4rem; background: rgba(3, 6, 12, .88);
  border: 1px solid #fbbf24; border-radius: 4px; color: #fbbf24;
  font-family: "IBM Plex Mono", monospace; letter-spacing: .14em; text-transform: uppercase; }
.tv-bug b { display: block; font-size: .62rem; font-weight: 700; }
.tv-bug strong { display: block; margin: .12rem 0 .05rem; font-size: 1.7rem; line-height: 1;
  letter-spacing: 0; color: #f8fafc; font-family: "Source Sans 3", sans-serif; }
.tv-bug em { font-style: normal; font-size: .58rem; color: #cbd5e1; letter-spacing: .08em; }
.tv-bug[hidden] { display: none; }
.plain-screen { height: 100%; overflow: auto; padding: 1.1rem 1.2rem 2rem; max-width: 760px; }
.plain-screen h1 { margin-top: .2rem; }
.team-screen { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: .45rem; padding: .65rem .75rem .7rem; }
.team-head { display: flex; flex-direction: column; align-items: stretch; gap: .4rem; }
.team-title { display: flex; align-items: center; gap: .55rem; }
.team-head h2 { margin: 0; font-size: 1.2rem; }
.team-head h2 span { font-family: "IBM Plex Mono", monospace; color: var(--gold); font-size: .82rem; margin-left: .35rem; }
.team-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.team-foot .tray { flex: 1 1 280px; margin: 0; }
.team-body { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: .7rem; min-height: 0; }
.roster-col { overflow: auto; display: flex; flex-direction: column; gap: .32rem; padding-right: .15rem; min-height: 0; }
.dossier { min-height: 0; }
#optRadio, .team-radio { margin: .35rem 0 .2rem; padding: .45rem .55rem; border: 1px solid var(--line); border-radius: 12px; background: #080c14; }
#optRadio .radio-title-inline, .team-radio .radio-title-inline { max-width: min(28rem, 70vw); }
.team-radio { flex: 1 1 100%; }
.team-radio:empty { display: none; }
.plain-screen h2 { margin: 1rem 0 .25rem; font-size: 1.05rem; }
.mix { display: flex; align-items: center; gap: .7rem; margin: .45rem 0 .2rem; max-width: 28rem; }
.mix input[type="range"] { flex: 1; }
.mix b { width: 2.2rem; font-variant-numeric: tabular-nums; }
.plain-screen.how { margin-top: 0; border-top: 0; padding-top: 1.1rem; }
.rpick { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: .45rem; align-items: center;
  text-align: left; border: 1px solid var(--line); background: #080c14; border-radius: 10px; padding: .28rem; cursor: pointer; }
.rpick img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; background: #10151f; }
.rpick b { display: block; font-family: Syne, sans-serif; font-size: .92rem; }
.rpick u { text-decoration: none; color: var(--mute); font-size: .72rem; }
.rpick.on { border-color: var(--cyan); }
.rpick.picked { box-shadow: inset 3px 0 0 var(--gold); }
.dossier { overflow: auto; border: 1px solid var(--line-2); border-radius: 14px; background: #0c1018; padding: .8rem .9rem 1rem; }
.dossier-hero { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: .8rem; align-items: start; }
.dossier-hero img { width: 168px; height: 210px; object-fit: cover; border-radius: 12px; background: #10151f; }
.dossier-hero img.spr { object-fit: contain; image-rendering: pixelated; background: radial-gradient(ellipse at 50% 40%, #1b2233, #0a0e16); }
.dossier h2 { margin: 0; font-size: 1.55rem; }
.dossier .tagline { color: var(--gold); margin: .1rem 0 .35rem; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; margin: .6rem 0; }
.stat-grid div { background: #080c14; border: 1px solid var(--line); border-radius: 8px; padding: .32rem .4rem; }
.stat-grid b { display: block; font-family: "IBM Plex Mono", monospace; font-size: .92rem; }
.stat-grid span { color: var(--mute); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }
.kit-list { list-style: none; margin: .2rem 0 .6rem; padding: 0; }
.kit-list li { margin: 0 0 .45rem; }
.kit-list b { font-family: Syne, sans-serif; }
.kit-list i { font-style: normal; margin-left: .35rem; color: var(--cyan); font-size: .68rem; letter-spacing: .06em; }
.kit-list span { display: block; color: #b6c2d0; font-size: .84rem; line-height: 1.35; }
.name-block { display: flex; flex-direction: column; gap: .25rem; flex: 1 1 200px; }
.name-block span { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.hall-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem .6rem;
  padding: .42rem .05rem; border-bottom: 1px solid var(--line); font-size: .88rem; }
.hall-line b { font-family: Syne, sans-serif; }
.hall-line em { grid-column: 1 / -1; font-style: normal; color: var(--mute); font-size: .76rem; }
.hall-line.local em::before { content: "this browser · "; color: var(--gold); }
.donate-row { display: flex; flex-wrap: wrap; gap: .45rem; margin: .9rem 0 .25rem; }
.donate-row a { text-decoration: none; font: 700 .78rem Syne, sans-serif; padding: .5rem .75rem; border-radius: 8px; }
.donate-paypal { background: #0070ba; color: #fff; }
.donate-patreon { background: #f96854; color: #111; }
.how ol { margin: .2rem 0 .4rem; padding-left: 1.15rem; color: #c7d3e0; }
.how li { margin: .35rem 0; font-size: .86rem; line-height: 1.4; }

/* ---------------------------------------------------------------- overlay --- */
.overlay { position: fixed; inset: 0; z-index: 40; display: none; align-items: flex-start; justify-content: center;
  padding: 2.2vh 1rem; overflow-y: auto; background: #04060bf2; backdrop-filter: blur(3px); }
.overlay.show { display: flex; }
.sheet { width: min(1160px, 100%); background: linear-gradient(180deg, #0d121ce6, #080c14f5);
  border: 1px solid var(--line-2); border-radius: 16px; padding: 1.1rem 1.2rem 1.3rem;
  box-shadow: 0 24px 60px #000b; }
.sheet h1 { margin: .1rem 0 .5rem; font-size: clamp(1.6rem, 4.4vw, 2.6rem); letter-spacing: .02em; }
.lede { color: #c7d3e0; font-size: .9rem; line-height: 1.45; margin: 0 0 .9rem; max-width: 96ch; }
.lede.center { text-align: center; margin-inline: auto; }
.muted { color: var(--mute); font-size: .84rem; margin: 0; }

/* mode cards */
.modes { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.mode-card { flex: 1 1 150px; min-width: 140px; text-align: left; border: 1px solid var(--line-2);
  background: #0a1018; border-radius: 12px; padding: .5rem .6rem; cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .12s ease; }
.mode-card:hover { transform: translateY(-1px); border-color: var(--cyan); }
.mode-card.on { border-color: var(--gold); box-shadow: 0 0 0 1px #fbbf2455 inset, 0 6px 18px #fbbf2422; }
.mode-card b { display: block; font-family: Syne, sans-serif; font-size: 1.02rem; }
.mode-card span { display: block; color: var(--mute); font-size: .72rem; line-height: 1.25; margin-top: .12rem; }

/* builder */
.builder { margin-top: .9rem; border-top: 1px solid var(--line); padding-top: .7rem; }
.builder-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; justify-content: space-between; }
.builder-head h2 { margin: 0; font-size: 1rem; letter-spacing: .04em; }
.builder-head h2 span { font-family: "IBM Plex Mono", monospace; font-size: .78rem; color: var(--gold); margin-left: .3rem; }
.filters { display: flex; flex-wrap: wrap; gap: .28rem; }
.tab { border: 1px solid var(--line); background: #0a0f18; color: var(--mute); border-radius: 8px;
  padding: .26rem .55rem; font-size: .72rem; cursor: pointer; letter-spacing: .05em; text-transform: uppercase; }
.tab:hover { color: var(--text); border-color: var(--line-2); }
.tab.on { color: #08130f; background: var(--cyan); border-color: var(--cyan); font-weight: 700; }
.tray { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .55rem 0 .6rem;
  min-height: 46px; border: 1px dashed var(--line-2); border-radius: 12px; padding: .4rem; }
.slot { display: flex; align-items: center; gap: .4rem; border: 1px solid var(--gold); background: #12100a;
  border-radius: 10px; padding: .18rem .5rem .18rem .18rem; cursor: pointer; }
.slot img { width: 32px; height: 32px; border-radius: 7px; object-fit: cover; image-rendering: pixelated; }
.slot b { font-size: .8rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem;
  max-height: 44vh; overflow-y: auto; padding-right: .2rem; }
.fcard { display: grid; gap: .28rem; text-align: left; border: 1px solid var(--line); background: #080c14;
  border-radius: 12px; padding: .45rem; cursor: pointer;
  transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease; }
.fcard:hover { transform: translateY(-2px); border-color: var(--cyan); }
.fcard.picked { border-color: var(--gold); box-shadow: 0 0 0 1px #fbbf2455 inset; }
.fart { position: relative; aspect-ratio: 5 / 4; border-radius: 9px; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 38%, #1b2233 0%, #0a0e16 72%); }
.fart img { width: 100%; height: 100%; object-fit: cover; }
.fart img.spr { width: auto; height: 68%; object-fit: contain; image-rendering: pixelated; }
.fart .cls { position: absolute; left: 5px; top: 5px; font-family: "IBM Plex Mono", monospace; font-size: .56rem;
  letter-spacing: .1em; text-transform: uppercase; padding: .1rem .32rem; border-radius: 5px;
  background: #05070cd0; color: var(--mute); border: 1px solid var(--line); }
.fart .cls.champ { color: var(--gold); border-color: #fbbf2455; }
.fart .cls.beast { color: #86efac; border-color: #4ade8055; }
.fart .cls.pet { color: #93c5fd; border-color: #60a5fa55; }
.fmeta { display: flex; align-items: baseline; gap: .35rem; flex-wrap: wrap; }
.fmeta b { font-family: Syne, sans-serif; font-size: .92rem; }
.fmeta u { text-decoration: none; color: var(--mute); font-size: .7rem; }
.fmeta .pw { margin-left: auto; font-family: "IBM Plex Mono", monospace; font-size: .66rem; color: var(--cyan); }
.fkit { display: flex; flex-wrap: wrap; gap: .2rem; }
.fkit em { font-style: normal; font-size: .66rem; color: var(--cyan); background: #0d1a1c;
  border: 1px solid #14343a; border-radius: 5px; padding: .06rem .3rem; }
.fcards { display: flex; flex-wrap: wrap; gap: .18rem; }
.fcards i { font-style: normal; font-size: .6rem; letter-spacing: .04em; text-transform: uppercase;
  color: #d8c9a3; background: #1a1508; border: 1px solid #4a3a14; border-radius: 5px; padding: .05rem .28rem; }
.fbio { font-size: .72rem; color: #b6c2d0; line-height: 1.3; }
.fcounter { font-size: .68rem; color: #8fa3b8; font-style: italic; line-height: 1.3; }
.menu-foot { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .8rem;
  border-top: 1px solid var(--line); padding-top: .7rem; }
.tally { font-size: .84rem; color: var(--mute); }
.tally b { color: var(--text); }
.tally .wins { color: var(--green); font-family: "IBM Plex Mono", monospace; }
.tally .losses { color: var(--red); font-family: "IBM Plex Mono", monospace; }
.callsign { font-size: .74rem; color: var(--mute); display: flex; align-items: center; gap: .35rem; }
.name-block input, .callsign input { background: #0a0f18; border: 1px solid var(--line); border-radius: 7px; color: var(--text);
  padding: .45rem .55rem; font: inherit; font-size: .92rem; width: 100%; max-width: 240px; }
.how { margin-top: .7rem; border-top: 1px solid var(--line); padding-top: .5rem; }
.how summary { cursor: pointer; color: var(--cyan); font-size: .8rem; letter-spacing: .04em; }
.how p { color: #b6c2d0; font-size: .82rem; line-height: 1.4; }

/* vs sheet */
.vs-sheet h1.vs { text-align: center; color: var(--gold); letter-spacing: .2em; }
.vsgrid { display: grid; grid-template-columns: 1fr auto 1fr; gap: .8rem; align-items: center; }
.vsmark { font-family: Syne, sans-serif; font-weight: 800; color: var(--mute); font-size: 1.1rem; }
.vside { display: grid; gap: .35rem; }
.vcard { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: .5rem; align-items: center;
  border: 1px solid var(--line); border-radius: 10px; padding: .3rem; background: #080c14; }
.vside.foe .vcard { border-color: #3b2325; }
.vcard img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; image-rendering: pixelated; }
.vcard b { font-size: .88rem; }
.vcard u { text-decoration: none; display: block; color: var(--mute); font-size: .68rem; }
.vcard em { font-style: normal; display: inline-block; margin: .18rem .22rem 0 0; font-size: .64rem;
  color: var(--cyan); background: #0d1a1c; border: 1px solid #14343a; border-radius: 5px; padding: .05rem .28rem; }
.vcard .pw { display: block; font-family: "IBM Plex Mono", monospace; font-size: .64rem; color: var(--gold); margin-top: .12rem; }

/* results */
.res-sheet h1 { text-align: center; }
.res-sheet.won h1 { color: var(--cyan); }
.res-sheet.lost h1 { color: var(--red); }
.table { margin: .8rem 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.thead, .trowline { display: grid; grid-template-columns: minmax(0, 2fr) .6fr .8fr .6fr .8fr .6fr;
  gap: .4rem; padding: .32rem .6rem; font-size: .8rem; }
.thead { background: #10161f; color: var(--mute); font-family: "IBM Plex Mono", monospace;
  font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; }
.trowline { border-top: 1px solid var(--line); }
.trowline.you { background: #0a1418; }
.trowline span:nth-child(n + 3) { font-family: "IBM Plex Mono", monospace; color: #cbd5e1; }
.res-sheet .modes { justify-content: center; }

/* -------------------------------------------------------------- responsive -- */
@media (max-width: 860px) {
  .title-screen { grid-template-columns: 1fr; grid-template-rows: 30vh minmax(0, 1fr); }
  .title-art { min-height: 0; max-height: none; }
  .title-art img { height: 100%; }
  .title-panel { border-left: 0; border-top: 1px solid var(--line); height: auto; min-height: 0; }
  .team-body { grid-template-columns: 1fr; grid-template-rows: minmax(220px, 46vh) minmax(160px, 1fr); }
  .dossier { order: -1; }
  .dossier-hero { grid-template-columns: 96px minmax(0, 1fr); }
  .dossier-hero img { width: 96px; height: 120px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .stage { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr) auto; }
  .team { max-height: 22vh; }
  .team.left { border-right-width: 0; border-bottom-width: 1px; }
  .team.right { border-left-width: 0; border-top-width: 1px; }
  .trows { flex-direction: row; flex-wrap: wrap; }
  .trow { flex: 1 1 200px; }
  .feed { width: min(280px, 72%); }
  .vsgrid { grid-template-columns: 1fr; }
  .vsmark { text-align: center; }
  .grid { max-height: 38vh; }
}
@media (max-width: 620px) {
  .top { gap: .34rem; padding: .34rem .45rem; }
  .dock-note { display: none; }
  .thead, .trowline { grid-template-columns: minmax(0, 1.6fr) .5fr .8fr; }
  .thead span:nth-child(n + 4), .trowline span:nth-child(n + 4) { display: none; }
}

/* the task chip: what this body has decided to do, in one word */
.st.task {
  background: rgba(94, 234, 212, 0.16);
  border: 1px solid rgba(94, 234, 212, 0.45);
  color: #99f6e4;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-variant: small-caps;
}
.st.task:empty { display: none; }

/* a button that will not start a fight should not look like one that will */
.btn.gold[data-ready='0'] { opacity: .62; filter: saturate(.55); }
.btn.gold[data-ready='0'] span { color: #4a2f05; }
h2 .need { font-style: normal; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--dim, #8b95a5); margin-left: 10px; }

/* --- best of three: the between-maps recap --- */
.res-sheet .sscore { color: #fbbf24; margin-left: .4em; }
.res-sheet .mapsum { text-align: center; color: #94a3b8; font-size: .82rem; margin: .2rem 0 .8rem; letter-spacing: .02em; }
.deathroll { margin: .5rem 0 .9rem; padding: .6rem .8rem; border: 1px solid #7f1d1d55; border-left: 3px solid #ef4444; background: #1c0f0f66; border-radius: 6px; }
.deathroll b { display: block; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: #fca5a5; margin-bottom: .3rem; }
.deathroll ul { margin: 0; padding-left: 1.1rem; max-height: 8.5rem; overflow: auto; }
.deathroll li { font-size: .84rem; color: #e5e7eb; line-height: 1.5; }
.trowline.ko span:last-child { color: #fca5a5; }
.trowline span:last-child { font-size: .78rem; }

/* --- the info module, docked under the team it belongs to --- */
.feed.docked { position: static; left: auto; bottom: auto; width: auto; max-height: 42%; flex: 0 0 auto;
  border: 1px solid var(--line); border-left: 3px solid var(--cyan); border-radius: 6px; background: #05070dcc; padding: .35rem .45rem; overflow: auto; }
.feed.docked p { font-size: .84rem; }
.feed p.talk { border-left-color: #a78bfa; color: #ddd6fe; }
.feed p.talk b { color: #c4b5fd; }
.feed p.cast { border-left-color: var(--gold); color: #fde68a; background: #fbbf2411; }

/* --- the caster: a photo and a mouth --- */
.caster { flex: 0 0 auto; position: relative; border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(#0b101c, #05070d); padding: .3rem; }
.caster .cface { display: block; width: 100%; height: auto; border-radius: 6px; background: #05070d; object-fit: cover; }
.caster .cface.is-hidden { display: none; }
.caster .cname { position: absolute; left: .55rem; bottom: .45rem; font-family: "IBM Plex Mono", monospace; font-size: .58rem;
  letter-spacing: .16em; color: #fbbf24; text-shadow: 0 1px 3px #000; }
.cbubble { position: relative; margin: 0 0 .35rem; padding: .4rem .5rem; min-height: 2.1rem; border: 1px solid #fbbf2455;
  border-left: 3px solid #fbbf24; border-radius: 6px; background: #0b101ccc; color: #fde68a; font-size: .74rem; line-height: 1.3; }
.cbubble:empty::after { content: "…"; color: #64748b; }
.cbubble.said { animation: cbpop .25s ease-out; }
@keyframes cbpop { from { transform: translateY(3px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (max-width: 900px) {
  .team { max-height: 34vh; }
  .feed.docked { max-height: 38%; }
  .caster .cface { max-height: 20vh; object-fit: contain; }
}

/* --- the programme before the bell, and who is talking ----------------------------------- */
.intro { position: absolute; inset: 0; display: none; flex-direction: column; gap: .35rem;
  padding: .45rem .6rem .4rem; z-index: 6;
  background: none; pointer-events: none; }
.intro.show { display: flex; animation: ifade .3s ease-out; }
@keyframes ifade { from { opacity: 0; } to { opacity: 1; } }
.intro .ihead { display: flex; align-items: center; gap: .6rem; }
.intro .iring { font-family: "IBM Plex Mono", monospace; font-size: .72rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold); }
.intro .iskip { margin-left: auto; pointer-events: auto; font-family: "IBM Plex Mono", monospace; font-size: .66rem;
  letter-spacing: .1em; color: var(--mute); background: #0b101c; border: 1px solid var(--line);
  border-radius: 5px; padding: .18rem .5rem; cursor: pointer; }
.intro .iskip:hover { color: var(--text); border-color: var(--line-2); }
/* Names sit in the middle, over the open sand, so the side gates stay visible. */
.intro .ifoot { display: none; }
.intro .isides { display: flex; position: absolute; top: 2.35rem; left: 50%; transform: translateX(-50%);
  width: min(480px, 58%); justify-content: center; align-items: flex-start; gap: .55rem; pointer-events: none; }
.intro .iside { width: min(220px, 48%); border: 1px solid var(--line); border-radius: .5rem; padding: .4rem .5rem; background: #0a0e16e6;
  opacity: .18; transform: translateY(7px); transition: opacity .35s ease, transform .35s ease, border-color .35s ease; }
.intro .iside.on { opacity: 1; transform: none; border-color: #fbbf2488; box-shadow: 0 0 0 1px #fbbf2433 inset; }
.intro .iside.isfoe.on { border-color: #f8717188; box-shadow: 0 0 0 1px #f8717133 inset; }
.intro .itag { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.intro .iside ul { list-style: none; margin: .3rem 0 0; padding: 0; }
.intro .iside li { font-size: .84rem; padding: .14rem 0; }
.intro .iside li + li { border-top: 1px solid var(--line); }
.intro .iring, .intro .ifoot { text-shadow: 0 1px 2px #000, 0 0 8px #000; }
.intro .ifoot { font-size: .68rem; color: var(--mute); text-align: left; }
.intro .ifoot b { color: var(--gold); }

/* exactly one thing is marked as talking, so a spectator never has to guess */
.caster .conair { position: absolute; top: .42rem; right: .45rem; font-family: "IBM Plex Mono", monospace;
  font-size: .56rem; letter-spacing: .14em; padding: .06rem .32rem; border-radius: .2rem;
  color: #fee2e2; background: #7f1d1d; border: 1px solid #7f1d1d; opacity: 0; transition: opacity .18s ease; }
.caster.onair .conair { opacity: 1; background: #b91c1c; border-color: #fecaca; box-shadow: 0 0 14px rgba(239,68,68,.55); }
.caster.onair .cface { box-shadow: 0 0 0 2px rgba(239,68,68,.7), 0 0 20px rgba(239,68,68,.3); }
.caster.onair .cbubble { border-color: #fecaca88; box-shadow: 0 0 14px rgba(239,68,68,.25); }
.trow.speaking { background: linear-gradient(90deg, rgba(251,191,36,.15), transparent 70%);
  box-shadow: inset 2px 0 0 var(--gold); border-radius: 4px; }
.feed p.live { background: rgba(251,191,36,.09); box-shadow: inset 2px 0 0 var(--gold); }
.feed p.cast.live { background: rgba(239,68,68,.1); box-shadow: inset 2px 0 0 var(--red); }

/* the shape each side opened in, on the intro card under the team tag */
.intro .iform { margin: 2px 0 6px; font: 700 11px/1.3 "Trebuchet MS", system-ui, sans-serif;
  letter-spacing: .07em; text-transform: uppercase; color: #fbbf24; opacity: .92; min-height: 14px; }
.intro .isfoe .iform { color: #f87171; }

/* the crew on the thinking chip: NAV / GUN / MED decided separately, shown separately */
.st.hem { opacity: .78; }
.st.hem.gun { color: #fca5a5; }
.st.hem.med { color: #7ee0c0; }
.st.hem.closer { color: #a5b4fc; }
.st.hem.closer.up { color: #fde68a; opacity: 1; font-weight: 700; }

/* Mobile battle: the arena gets the height; the two team strips are compact and scroll. */
@media (max-width: 980px) {
  .stage { grid-template-rows: minmax(0, 1fr) auto auto; }
  .viewport { order: -1; }
  .team { max-height: 18vh; }
  .caster { display: none; }
}
@media (max-width: 620px) {
  .team { max-height: 16vh; }
  .feed.docked { max-height: 45%; }
}
