/* SWARM // OPS — green-phosphor C2 console.
   Chrome is phosphor; the two armies are the only non-green things on screen,
   so the eye reads the battle before it reads the furniture. */

:root {
  --bg:        #040806;
  --bg-deep:   #020403;
  --panel:     #071310;
  --panel-2:   #09190f;
  --line:      #12302180;
  --line-hard: #164a2e;

  --phos:      #43f59a;
  --phos-hi:   #9dffd0;
  --phos-dim:  #1c9c5d;
  --phos-mute: #12603a;
  --phos-ghost:#0c3a24;

  --amber:     #ffbe4d;
  --red:       #ff6257;
  --red-dim:   #a32f2a;
  --blue:      #4fc9ff;
  --blue-dim:  #24708f;

  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r: 3px;
  --rail: 430px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg-deep);
  color: var(--phos);
  font-family: var(--mono);
  font-size: 13px;
  font-variant-ligatures: none;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

a { color: var(--phos-hi); text-decoration: none; border-bottom: 1px dotted var(--phos-mute); }
a:hover { color: #fff; border-bottom-color: var(--phos); }

/* ---- CRT shell ------------------------------------------------------- */

.crt {
  position: relative;
  height: 100dvh;
  display: grid;
  grid-template-rows: 46px 1fr 96px;
  background:
    radial-gradient(120% 90% at 50% 0%, #0a1a12 0%, var(--bg) 55%, var(--bg-deep) 100%);
}

.crt::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,.24) 0 1px, transparent 1px 3px),
    radial-gradient(130% 110% at 50% 50%, transparent 55%, rgba(0,0,0,.6) 100%);
  mix-blend-mode: multiply;
}

/* ---- header ---------------------------------------------------------- */

.bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--line-hard);
  background: linear-gradient(180deg, #08170f, #050d09);
}

.brand { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.mark { color: var(--phos); font-size: 15px; text-shadow: 0 0 10px var(--phos); }
.title { font-weight: 700; letter-spacing: .16em; font-size: 15px; color: var(--phos-hi); text-shadow: 0 0 14px #43f59a66; }
.title .sep { color: var(--phos-mute); margin: 0 2px; }
.sub { color: var(--phos-mute); font-size: 11px; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bar-right { display: flex; align-items: center; gap: 7px; flex: none; }

.chip {
  border: 1px solid var(--line-hard);
  background: #061410;
  color: var(--phos-dim);
  padding: 3px 7px;
  border-radius: var(--r);
  font-size: 10.5px;
  letter-spacing: .1em;
  white-space: nowrap;
}
#chip-doctrine { color: var(--amber); border-color: #5a3f14; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
#chip-clock { color: var(--phos-hi); font-variant-numeric: tabular-nums; }

.status { display: flex; align-items: center; gap: 6px; font-size: 10.5px; letter-spacing: .12em; color: var(--phos-dim); }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--phos-mute); }
.status.live i { background: var(--phos); box-shadow: 0 0 9px var(--phos); animation: pulse 1.6s infinite; }
.status.live span { color: var(--phos); }
.status.replay i { background: var(--amber); box-shadow: 0 0 9px var(--amber); }
.status.replay span { color: var(--amber); }
.status.mock i { background: var(--blue); box-shadow: 0 0 9px var(--blue); }
.status.mock span { color: var(--blue); }
.status.down i { background: var(--red); }
.status.down span { color: var(--red); }
/* A recording is not live, and the chip should not pretend otherwise: steady, not pulsing. */
.status.recorded i { background: var(--phos); box-shadow: 0 0 9px var(--phos); }
.status.recorded span { color: var(--phos); }

@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

/* ---- stage ----------------------------------------------------------- */

.stage {
  display: grid;
  grid-template-columns: 1fr var(--rail);
  min-height: 0;
}

.map-col { display: grid; grid-template-rows: 1fr auto auto auto; min-width: 0; min-height: 0; }
.map-col:fullscreen { background: var(--bg-deep); }
.map-col:fullscreen .map-wrap { border-right: 0; }

.map-wrap {
  position: relative;
  min-height: 0;
  background:
    radial-gradient(100% 80% at 50% 40%, #071511 0%, #030806 100%);
  border-right: 1px solid var(--line-hard);
  overflow: hidden;
}

#map { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#map:active { cursor: grabbing; }

.camera {
  position: absolute; top: 10px; right: 12px; z-index: 6;
  display: flex; flex-direction: column; gap: 4px; align-items: stretch;
}
.camera button {
  min-width: 34px; min-height: 30px;
  background: #050f0bd9; color: var(--phos-dim);
  border: 1px solid var(--line-hard); border-radius: var(--r);
  font: inherit; font-size: 10px; letter-spacing: .1em; cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
.camera button:hover { color: var(--phos-hi); background: #0a2418; border-color: var(--phos-mute); }
.camera button.on { color: var(--phos); border-color: var(--phos-mute); background: #0b2a1c; }
.camera button:focus-visible { outline: 2px solid var(--phos); outline-offset: 2px; }

.map-overlay {
  position: absolute; inset: 0; pointer-events: none;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 10px 12px;
  font-size: 10px; letter-spacing: .08em; color: var(--phos-mute);
}
.legend { display: flex; gap: 12px; }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend b { width: 8px; height: 8px; background: var(--phos-dim); display: inline-block; }
.legend .portrait { display: block; image-rendering: auto; }
.legend span { background: #030806a8; padding: 2px 6px 2px 2px; border-radius: var(--r); }
.hint { opacity: .75; background: #030806a8; padding: 2px 6px; border-radius: var(--r); }

.banner {
  position: absolute; left: 50%; top: 44%;
  transform: translate(-50%, -50%);
  padding: 14px 26px;
  border: 1px solid var(--line-hard);
  background: #04100bE6;
  color: var(--phos-hi);
  letter-spacing: .2em;
  font-size: 17px; font-weight: 700;
  text-align: center;
  text-shadow: 0 0 18px #43f59a88;
  box-shadow: 0 0 60px #000, inset 0 0 40px #0a2a1c;
  z-index: 5;
}
.banner small { display: block; margin-top: 7px; font-size: 10.5px; letter-spacing: .1em; font-weight: 400; color: var(--phos-dim); }

/* ---- poster and end card --------------------------------------------- */

.poster, .endcard {
  position: absolute; inset: 0; z-index: 8;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  /* Dimmed, not blacked out: the poster should show a battle, not a blank screen. */
  background: radial-gradient(85% 70% at 50% 45%, rgba(2,7,5,.5) 0%, rgba(1,3,2,.88) 100%);
  text-align: center;
  transition: opacity .35s ease, visibility .35s;
}
.poster.gone { opacity: 0; visibility: hidden; pointer-events: none; }
/* `display: flex` above would otherwise beat the `hidden` attribute. */
.poster[hidden], .endcard[hidden] { display: none; }

.poster-play {
  width: 84px; height: 84px; border-radius: 50%;
  border: 1px solid var(--phos-dim); background: #06170f;
  color: var(--phos); font-size: 30px; line-height: 1; padding-left: 6px;
  cursor: pointer;
  box-shadow: 0 0 34px #43f59a2e, inset 0 0 22px #0a2a1c;
  transition: transform .18s ease, box-shadow .18s ease, background .18s;
}
.poster-play:hover { transform: scale(1.06); background: #0a2418; box-shadow: 0 0 50px #43f59a55, inset 0 0 22px #0d3524; }
.poster-play:focus-visible, .pbtn:focus-visible, .scrub:focus-visible, .endcard button:focus-visible {
  outline: 2px solid var(--phos); outline-offset: 2px;
}

.poster-text h2, .endcard h2 {
  margin: 0; font-size: 22px; font-weight: 700; letter-spacing: .2em; color: var(--phos-hi);
  text-shadow: 0 0 18px #43f59a55;
}
.poster-text h2 .sep { color: var(--phos-mute); }
.poster-text p, .endcard p {
  margin: 7px 0 0; font-size: 11px; letter-spacing: .1em; color: var(--phos-dim);
}

.endcard { z-index: 9; background: radial-gradient(90% 70% at 50% 45%, #020705ee 0%, #010302f7 100%); }
.end-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.endcard button {
  background: #0a2418; color: var(--phos); border: 1px solid var(--line-hard); border-radius: var(--r);
  padding: 9px 16px; font: inherit; font-size: 11px; letter-spacing: .14em; cursor: pointer;
}
.endcard button:hover { background: #103a26; color: var(--phos-hi); }
.endcard a { font-size: 11px; letter-spacing: .08em; }

/* ---- player ----------------------------------------------------------- */

.player {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--line-hard);
  background: linear-gradient(180deg, #06140f, #040c08);
}

.pbtn {
  flex: none;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: #061410; color: var(--phos-dim);
  border: 1px solid var(--line-hard); border-radius: var(--r);
  font: inherit; font-size: 13px; line-height: 1; cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
.pbtn:hover { color: var(--phos-hi); background: #0a2418; border-color: var(--phos-mute); }
.pbtn.wide { width: 44px; font-size: 11px; letter-spacing: .06em; }
.pbtn.play { color: var(--phos); font-size: 14px; }
.pbtn.play.playing { font-size: 12px; }
#p-link.ok { color: var(--phos); border-color: var(--phos-mute); }
#p-link.no { color: var(--amber); border-color: #5a3f14; }

.ptime { flex: none; font-size: 11px; color: var(--phos-dim); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.ptime b { color: var(--phos-hi); font-weight: 500; }
.ptime em { color: var(--phos-ghost); font-style: normal; margin: 0 4px; }

.scrub {
  position: relative; flex: 1; min-width: 60px;
  height: 34px; cursor: pointer;
  touch-action: none;
  display: flex; align-items: center;
}
.scrub .heat {
  position: absolute; left: 0; right: 0; bottom: 50%;
  width: 100%; height: 12px; margin-bottom: 2px;
  opacity: .8; pointer-events: none;
}
.scrub .track {
  position: relative; width: 100%; height: 5px;
  background: #061b12; border: 1px solid #0d2a1c; overflow: hidden;
}
.scrub .track i {
  position: absolute; inset: 0; transform-origin: left center; transform: scaleX(0);
  background: linear-gradient(90deg, var(--phos-mute), var(--phos));
}
.scrub .marks { position: absolute; inset: 0; pointer-events: none; }
.scrub .mark {
  position: absolute; top: 50%; width: 2px; height: 15px; transform: translate(-1px, -50%);
}
.scrub .mark.contact { background: var(--phos-hi); opacity: .55; }
.scrub .mark.order-ok { background: var(--phos); box-shadow: 0 0 6px var(--phos); }
.scrub .mark.order-no { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.scrub .knob {
  position: absolute; top: 50%; width: 11px; height: 11px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--phos); box-shadow: 0 0 10px #43f59a99;
  pointer-events: none;
}
.scrub.dragging .knob, .scrub:hover .knob { width: 14px; height: 14px; }
.scrub .tip {
  position: absolute; bottom: 100%; transform: translateX(-50%);
  padding: 2px 6px; margin-bottom: 4px;
  background: #04100b; border: 1px solid var(--line-hard); border-radius: var(--r);
  font-size: 10px; color: var(--phos-hi); font-variant-numeric: tabular-nums;
  pointer-events: none; white-space: nowrap;
}

.honesty {
  margin: 0; padding: 7px 12px;
  border-top: 1px solid var(--line);
  background: #040c08;
  font-size: 10px; line-height: 1.4; letter-spacing: .04em; color: var(--phos-mute);
}

/* ---- orders ---------------------------------------------------------- */

.orders {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line-hard);
  background: #050f0b;
}
.order { padding: 9px 12px 10px; border-right: 1px solid var(--line); }
.order:last-child { border-right: 0; }
.order label { display: block; font-size: 9.5px; letter-spacing: .16em; color: var(--phos-mute); margin-bottom: 4px; }
.order.red label { color: var(--red-dim); }
.order.blue label { color: var(--blue-dim); }

.order .current {
  margin: 0 0 7px; font-size: 11px; line-height: 1.35;
  color: var(--phos-dim); min-height: 2.7em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.order.red .current { color: #e8938c; }
.order.blue .current { color: #93cfe8; }

.verdict { margin: 6px 0 0; font-size: 10px; letter-spacing: .06em; min-height: 1.2em; color: var(--phos-mute); }
.verdict.ok { color: var(--phos); }
.verdict.no { color: var(--amber); }

/* A scripted order landing: the card lights up with the verdict Jev actually gave. */
.order { transition: background .25s, box-shadow .25s; }
.order.flash-ok { background: #08201580; box-shadow: inset 0 0 0 1px var(--phos-mute); }
.order.flash-no { background: #20160880; box-shadow: inset 0 0 0 1px #5a3f14; }

/* ---- rail ------------------------------------------------------------ */

.rail { display: grid; grid-template-rows: 1fr 440px; min-height: 0; background: var(--panel); }

.panel { display: grid; grid-template-rows: auto 1fr; min-height: 0; border-bottom: 1px solid var(--line-hard); }
.panel:last-child { border-bottom: 0; }

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 11px;
  border-bottom: 1px solid var(--line);
  background: #06120d;
}
.panel-head h2 { margin: 0; font-size: 10px; letter-spacing: .2em; color: var(--phos-dim); font-weight: 500; }
.rate { font-size: 10px; letter-spacing: .1em; color: var(--phos-mute); font-variant-numeric: tabular-nums; }

/* ---- firehose -------------------------------------------------------- */

.log { overflow: hidden; padding: 3px 0; font-size: 10.5px; line-height: 1.5; }

.row-log {
  display: flex; gap: 6px; align-items: baseline;
  padding: 0 11px; white-space: nowrap;
  animation: streak .5s ease-out;
}
@keyframes streak {
  from { background: #12402a; opacity: .35; transform: translateY(-2px); }
  to   { background: transparent; opacity: 1; transform: none; }
}
.row-log .u { font-weight: 700; width: 38px; flex: none; }
.row-log.red .u { color: var(--red); }
.row-log.blue .u { color: var(--blue); }
.row-log .ty { color: var(--phos-ghost); width: 50px; flex: none; overflow: hidden; }
.row-log .ar { color: var(--phos-hi); width: 54px; flex: none; }
.row-log .dot { color: var(--phos-ghost); }
.row-log .kv { color: var(--phos-mute); }
.row-log .kv b { color: var(--phos-dim); font-weight: 400; }
.row-log .ms { margin-left: auto; color: var(--phos-ghost); font-variant-numeric: tabular-nums; }
.row-log.hot .ar { color: var(--amber); }
.row-log.death { color: var(--red-dim); }
.row-log.death .u { color: var(--red); }
.row-log.sys { color: var(--amber); white-space: normal; }
.row-log.sys .u { width: auto; color: var(--amber); }
.row-log.order { color: var(--phos-dim); }
.row-log.order .ar { color: var(--phos); width: 62px; }
.row-log.order.no .ar { color: var(--amber); }
.row-log.order .kv { overflow: hidden; text-overflow: ellipsis; }

/* ---- inspector ------------------------------------------------------- */

.insp-body { overflow-y: auto; padding: 9px 11px 12px; }
.insp-body::-webkit-scrollbar { width: 6px; }
.insp-body::-webkit-scrollbar-thumb { background: var(--phos-ghost); }
.empty { color: var(--phos-ghost); font-size: 11px; }

.insp-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; }
.insp-head .id { font-size: 16px; font-weight: 700; letter-spacing: .06em; }
.insp-head.red .id { color: var(--red); }
.insp-head.blue .id { color: var(--blue); }
.insp-head .ty { color: var(--phos-dim); font-size: 11px; }
.insp-head .hp { margin-left: auto; font-size: 11px; color: var(--phos-mute); font-variant-numeric: tabular-nums; }

.insp-order {
  font-size: 9.5px; line-height: 1.35; color: var(--phos-ghost);
  border-left: 2px solid var(--phos-ghost); padding-left: 7px; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.qgroup { margin-bottom: 8px; }
.qtitle { display: flex; justify-content: space-between; font-size: 9.5px; letter-spacing: .14em; color: var(--phos-mute); margin-bottom: 4px; }
.qtitle em { font-style: normal; color: var(--phos-ghost); }

.bars { display: grid; gap: 2px; }
.pbar { display: grid; grid-template-columns: 58px 1fr 32px; align-items: center; gap: 6px; font-size: 10px; }
.pbar .lbl { color: var(--phos-dim); overflow: hidden; text-overflow: ellipsis; }
.pbar .track { height: 7px; background: #061b12; border: 1px solid #0d2a1c; position: relative; overflow: hidden; }
.pbar .track i { position: absolute; inset: 0; transform-origin: left center; transform: scaleX(0); background: linear-gradient(90deg, var(--phos-mute), var(--phos-dim)); transition: transform .25s ease-out; }
.pbar .num { text-align: right; color: var(--phos-mute); font-variant-numeric: tabular-nums; }
.pbar.win .lbl { color: var(--phos-hi); }
.pbar.win .track i { background: linear-gradient(90deg, var(--phos-dim), var(--phos)); box-shadow: 0 0 9px #43f59a55; }
.pbar.win .num { color: var(--phos); }

.noul { display: grid; grid-template-columns: 1fr 34px; gap: 6px; align-items: center; }
.noul .track { height: 10px; background: #061b12; border: 1px solid #0d2a1c; position: relative; }
.noul .track i { position: absolute; inset: 0; transform-origin: left center; transform: scaleX(0); background: linear-gradient(90deg, #1c9c5d, var(--phos)); transition: transform .25s; }
.noul.hot .track i { background: linear-gradient(90deg, #a35e18, var(--amber)); }
.noul .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--phos-dim); }

/* decision graph */
.graph { border-top: 1px solid var(--line); padding-top: 9px; margin-top: 4px; }
.gate {
  display: grid; grid-template-columns: 14px 1fr auto; gap: 7px; align-items: center;
  padding: 3px 0; font-size: 10.5px; color: var(--phos-ghost);
  border-left: 1px solid var(--line); padding-left: 9px; margin-left: 5px;
}
.gate .pip { width: 8px; height: 8px; border: 1px solid var(--phos-ghost); border-radius: 50%; }
.gate .out { color: var(--phos-ghost); font-size: 9.5px; letter-spacing: .08em; }
.gate.fired { color: var(--phos-hi); }
.gate.fired .pip { background: var(--phos); border-color: var(--phos); box-shadow: 0 0 10px var(--phos); }
.gate.fired .out { color: var(--phos); }
.gate.skipped { opacity: .72; color: var(--phos-mute); }

.verdict-line {
  margin-top: 9px; padding: 7px 9px;
  border: 1px solid var(--line-hard); background: #06170f;
  display: flex; align-items: baseline; gap: 8px;
}
.verdict-line .k { font-size: 9.5px; letter-spacing: .14em; color: var(--phos-mute); }
.verdict-line .a { font-size: 14px; font-weight: 700; letter-spacing: .1em; color: var(--phos-hi); text-shadow: 0 0 12px #43f59a55; }
.verdict-line .t { margin-left: auto; font-size: 10.5px; color: var(--phos-dim); }

/* ---- counters -------------------------------------------------------- */

.counters {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr .85fr 1.15fr 1.05fr 1fr;
  border-top: 1px solid var(--line-hard);
  background: linear-gradient(180deg, #061410, #030907);
}
.counter {
  padding: 12px 16px;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
  min-width: 0;
}
.counter:last-child { border-right: 0; }
.counter .k { font-size: 9px; letter-spacing: .18em; color: var(--phos-mute); }
.counter .v { font-size: 22px; font-weight: 700; color: var(--phos-hi); font-variant-numeric: tabular-nums; letter-spacing: .02em; line-height: 1.1; }
.counter.big .v { font-size: 30px; text-shadow: 0 0 20px #43f59a55; }
.counter .fine { font-size: 9px; color: var(--phos-ghost); letter-spacing: .04em; }

.meter { display: block; height: 4px; background: #061b12; border: 1px solid #0d2a1c; margin-top: 4px; position: relative; overflow: hidden; }
.meter i { position: absolute; inset: 0; transform-origin: left center; transform: scaleX(0); background: var(--phos-dim); transition: transform .4s; }
.meter i.warn { background: var(--amber); }

.counter.strength .v { display: flex; align-items: baseline; gap: 7px; font-size: 24px; }
.counter.strength #c-red { color: var(--red); }
.counter.strength #c-blue { color: var(--blue); }
.counter.strength em { color: var(--phos-ghost); font-style: normal; font-size: 16px; }
.meter.split { background: var(--blue-dim); border-color: #0d2a1c; }
.meter.split i { background: var(--red); }

.counter.credit .v { font-size: 15px; }
.counter.credit a { color: var(--phos); border-bottom-color: var(--phos-ghost); }

/* ---- narrow ---------------------------------------------------------- */

@media (max-width: 1180px) {
  :root { --rail: 360px; }
  .counters { grid-template-columns: 1fr 1fr 1fr; grid-auto-rows: auto; }
  .crt { grid-template-rows: 46px 1fr auto; }
}

@media (max-width: 900px) {
  html, body { overflow-x: hidden; overflow-y: auto; }
  .crt { height: auto; grid-template-rows: auto; }
  .stage { grid-template-columns: 1fr; }
  .map-wrap { aspect-ratio: 16/9; border-right: 0; }
  .rail { grid-template-rows: 300px auto; border-top: 1px solid var(--line-hard); }
  .counters { grid-template-columns: 1fr 1fr; }
  .orders { grid-template-columns: 1fr; }
  .order { border-right: 0; border-bottom: 1px solid var(--line); }
  .insp-body { overflow: visible; }
}

/* Phone: the chrome has to give way so nothing pushes the page sideways. */
@media (max-width: 620px) {
  .bar { flex-wrap: wrap; height: auto; padding: 7px 10px; gap: 6px; }
  .crt { grid-template-rows: auto 1fr auto; }
  .brand .sub { display: none; }
  .bar-right { flex: 1 1 100%; flex-wrap: wrap; gap: 5px; }
  #chip-model, #chip-battle { display: none; }
  #chip-doctrine { max-width: 150px; }

  .log { font-size: 9.5px; }
  .row-log { gap: 4px; padding: 0 8px; }
  .row-log .u { width: 34px; }
  .row-log .ty { display: none; }
  .row-log .ar { width: 46px; }
  .row-log .ms { font-size: 9px; }

  .counters { grid-template-columns: 1fr 1fr; }
  .counter { padding: 9px 11px; }
  .counter.big .v { font-size: 22px; }
  .counter .v { font-size: 17px; }
  .counter.credit { grid-column: 1 / -1; }

  .legend { flex-wrap: wrap; gap: 7px; font-size: 9px; }
  .hint { display: none; }
  .banner { font-size: 13px; padding: 10px 16px; width: 86%; }

  /* Touch targets stay at 40 px, and the least-used controls step aside rather than
     squeeze the scrub bar into nothing. */
  .player { gap: 5px; padding: 7px 8px; }
  .pbtn { width: 40px; height: 40px; }
  .pbtn.wide { width: 46px; }
  #p-link, #p-full { display: none; }
  .ptime { font-size: 10px; }
  .scrub { height: 40px; }
  .poster-play { width: 70px; height: 70px; font-size: 26px; }
  .poster-text h2, .endcard h2 { font-size: 16px; }
  .end-actions { gap: 10px; }
}
