/* Control panel — producer console. Dark vision-mixer look: near-black desk,
   team-colored event pods, red = live/destructive, gold = primary action. */

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
.btn, input, select, .toggle, .design-tile { touch-action: manipulation; }

:root {
  --bg: #0c0d10;
  --card: #15171c;
  --card-soft: #1b1e24;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f1f1ee;
  --muted: rgba(241, 241, 238, 0.55);
  --gold: #d9b24a;
  --live: #e8392e;
  --ok: #3ecf78;
  --radius: 12px;
}

body {
  background:
    radial-gradient(1200px 500px at 70% -10%, rgba(217, 178, 74, 0.05), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: 'Archivo', -apple-system, sans-serif;
  min-height: 100vh;
}

/* ---------- header ---------- */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 26px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(12, 13, 16, 0.92);
  backdrop-filter: blur(10px);
  z-index: 50;
  flex-wrap: wrap;
}
h1 { font-size: 19px; font-weight: 800; letter-spacing: 0.5px; }
h1 span { color: var(--gold); font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase; font-size: 13px; margin-left: 6px; }
.header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.room-chip {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700;
  letter-spacing: 1px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 12px;
}
.room-chip b { color: var(--gold); letter-spacing: 2px; }

.sync-pill {
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.sync-pill.onair { color: #fff; background: var(--live); border-color: var(--live); animation: pulse 2.2s ease-in-out infinite; }
.sync-pill.idle { color: var(--ok); border-color: rgba(62, 207, 120, 0.4); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(232,57,46,.5); } 50% { box-shadow: 0 0 0 7px rgba(232,57,46,0); } }

/* Trial live-feed meter (ADR 0006): amber while counting, red when used up. */
.feed-chip {
  appearance: none; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  padding: 7px 12px; border-radius: 999px; white-space: nowrap;
  color: #f0a04b; background: rgba(208,128,48,.1); border: 1px solid rgba(208,128,48,.55);
}
.feed-chip b { color: #fff; font-variant-numeric: tabular-nums; }
.feed-chip.live { background: rgba(208,128,48,.22); border-color: #d08030; }
.feed-chip.low { color: #fff; background: var(--live); border-color: var(--live); }
.trial-feed-note { color: #f0c58f; background: rgba(208,128,48,.1); border: 1px solid rgba(208,128,48,.45); border-radius: 10px; padding: 10px 12px; }
.feed-chip.done { color: #fff; background: #3a1414; border-color: var(--live); }

/* ---------- buttons & inputs ---------- */
.btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  background: var(--card-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 16px;
  cursor: pointer;
  transition: transform .06s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { background: #23262e; border-color: rgba(255,255,255,.18); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #1a1505; }
.btn.primary:hover { background: #e6c462; }
.btn.live { background: var(--live); border-color: var(--live); color: #fff; }
.btn.live:hover { background: #f04a40; }
.btn.ghost { background: transparent; }
.btn.danger { color: #ff7b72; border-color: rgba(232, 57, 46, 0.45); }
.btn.danger:hover { background: rgba(232, 57, 46, 0.12); }
.btn.small { font-size: 12.5px; padding: 6px 11px; }
.btn.wide { flex: 1; }
.btn:disabled { opacity: .45; cursor: default; }
a.btn { text-decoration: none; display: inline-block; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #fff; margin-right: 8px; animation: pulse 1.6s infinite; }

input[type="text"], input[type="number"], select {
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: #0f1014;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 0;
  width: 100%;
}
input:focus, select:focus { outline: none; border-color: var(--gold); }
input[type="color"] {
  width: 44px; height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f1014;
  padding: 3px;
  cursor: pointer;
}
input[type="range"] { width: 100%; accent-color: var(--gold); }

/* ---------- layout ---------- */
main.cards {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  padding: 20px 26px 60px;
  max-width: 1840px;
  margin: 0 auto;
}
.card {
  grid-column: span 3;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  min-width: 0;
}
.card.span2 { grid-column: span 2; }
.card.span4 { grid-column: span 4; }
.card.span5 { grid-column: span 5; }
.card.span6 { grid-column: span 6; }
.card.span12 { grid-column: span 12; }
@media (max-width: 1280px) {
  .card, .card.span2, .card.span4, .card.span5, .card.span6 { grid-column: span 6; }
}
@media (max-width: 820px) {
  .card, .card.span2, .card.span4, .card.span5, .card.span6, .card.span12 { grid-column: span 12; }
}

h2 {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
h2 small { font-weight: 600; letter-spacing: .5px; text-transform: none; opacity: .8; }
h2.gap { margin-top: 20px; }

.row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.row:last-child { margin-bottom: 0; }

.field { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.field input, .field select { margin-top: 5px; }
.field.color { flex: none; }
.field output { float: right; color: var(--gold); font-weight: 800; }

.toggle { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; padding: 7px 0; cursor: pointer; }
.toggle input { accent-color: var(--gold); width: 17px; height: 17px; }
.toggle.small { font-size: 12.5px; color: var(--muted); }

/* ---------- program monitor ---------- */
.monitor-shell {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
}
.monitor-shell .mon-pitch, .monitor-shell video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.mon-pitch svg { width: 100%; height: 100%; display: block; }
.monitor-shell video { object-fit: cover; display: none; background: #000; }
.monitor-shell.feed video { display: block; }
.monitor-shell.feed .mon-pitch { display: none; }
.monitor-shell iframe {
  position: absolute; top: 0; left: 0;
  border: 0;
  width: 1920px; height: 1080px;
  transform-origin: 0 0;
  pointer-events: none;
}
.mon-badge {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 5;
  font-size: 11px; font-weight: 800;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(0,0,0,.65);
  color: #fff;
}
.mon-badge.live { background: var(--live); }
.mon-controls { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.mon-note { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.5; }

/* ---------- clock ---------- */
.clock-display {
  font-size: 54px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
  text-align: center;
  margin: 4px 0 14px;
}
.stepper { justify-content: space-between; }
.stepper-display { font-size: 19px; font-weight: 800; letter-spacing: 1px; flex: 1; text-align: center; }

/* ---------- team event pods ---------- */
.team-pod { border-top: 4px solid var(--team-color, #555); }
.pod-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.pod-team { font-size: 15px; font-weight: 800; letter-spacing: .5px; }
.pod-score { font-size: 42px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; color: var(--gold); }
.score-btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-bottom: 10px; }
.btn.score {
  background: var(--team-color, #333);
  border-color: transparent;
  color: #fff;
  font-size: 14px;
  padding: 11px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.btn.score:hover { filter: brightness(1.18); background: var(--team-color, #333); }
.btn.score em { font-style: normal; font-size: 11px; opacity: .8; font-weight: 600; }
.pod-label { font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin: 14px 0 7px; }
.bins-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.bin-item {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 700;
  background: var(--card-soft);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 10px;
}
.bin-item .bi-time { margin-left: auto; color: #ffd24a; font-variant-numeric: tabular-nums; }
.bin-item.red .bi-time { color: #ff7b72; }
.bin-item button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 15px; padding: 0 2px; }
.bin-item button:hover { color: #ff7b72; }

/* ---------- attack / defence rating taps ---------- */
.header-right { display: flex; align-items: center; gap: 16px; }

.pro-toggle { 
  background: rgba(249, 116, 21, 0.1); 
  border: 1px solid rgba(249, 116, 21, 0.4); 
  border-radius: 6px; 
  padding: 6px 12px;
  color: #F97415;
}
.pro-toggle input:checked + span { font-weight: 700; }
.rate-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rate-row:last-of-type { margin-bottom: 0; }
.rate-name { flex: 1; font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: .3px; }
.rate-btns { display: grid; grid-template-columns: repeat(3, 44px); gap: 6px; flex: none; }
.btn.rate { padding: 10px 0; font-size: 16px; font-weight: 800; text-align: center; }
.btn.rate.active,
.btn.rate.active:hover { background: var(--team-color, var(--gold)); border-color: var(--team-color, var(--gold)); color: #fff; filter: none; }

/* Heat strip — 200x18 blue-to-red readout beneath each rating metric.
   READOUT ONLY: the 1/2/3 buttons stay the input. Dimmed until a rating exists,
   so an untouched panel never shows a marker parked at a value nobody chose. */
.rate-row { flex-wrap: wrap; }
.rate-heat {
  flex: 0 0 200px; width: 200px; height: 18px; margin: 7px 0 2px auto;
  position: relative; border-radius: 3px;
  background: linear-gradient(90deg,
    #1c4fd8 0%, #2f9bff 22%, #45d6c6 40%, #ffd23f 62%, #ff8a1f 80%, #ff2323 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
  opacity: .34; transition: opacity .18s ease;
}
.rate-heat.has-val { opacity: 1; }
.rate-heat i {
  position: absolute; top: -3px; bottom: -3px; left: 50%; width: 4px;
  transform: translateX(-50%); border-radius: 2px; background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 0 8px rgba(255,255,255,.75);
  opacity: 0; transition: left .22s cubic-bezier(.2,.8,.2,1), opacity .18s ease;
}
.rate-heat.has-val i { opacity: 1; }

/* ---------- sponsors ---------- */
.spon-editor { margin-top: 8px; }
.spon-preview { display: flex; gap: 14px; align-items: flex-start; margin: 4px 0 12px; }
.spon-crop {
  position: relative; flex: none;
  width: 260px; aspect-ratio: 10 / 1;
  background: #0f1014;
  border: 1px dashed var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.spon-crop.has { border-style: solid; border-color: var(--gold); }
.spon-crop img { width: 100%; height: 100%; object-fit: cover; display: none; }
.spon-crop.has img { display: block; }
.spon-crop-empty {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--muted);
}
.spon-crop.has .spon-crop-empty { display: none; }
.spon-hint { font-size: 12px; color: var(--muted); line-height: 1.55; }
.spon-hint p { margin-bottom: 6px; }
.spon-hint p:last-child { margin-bottom: 0; }
.spon-hint b { color: var(--text); }
.spon-warn { color: #ffcf6a; }
.spon-warn b { color: #ffcf6a; }
.spon-msg { font-size: 12.5px; font-weight: 700; color: var(--ok); }
.spon-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.spon-empty { font-size: 12.5px; color: var(--muted); }
.spon-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}
.spon-item-crop { flex: none; width: 150px; aspect-ratio: 10 / 1; border-radius: 4px; overflow: hidden; background: #0f1014; }
.spon-item-crop img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spon-item-name { flex: 1; font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spon-item button { background: none; border: 0; color: var(--muted); font-size: 15px; cursor: pointer; padding: 0 4px; }
.spon-item button:hover { color: #ff7b72; }

/* brand library (ADR 0007): crop boxes follow the slot the asset rotates in */
.brand-toggles { flex-wrap: wrap; gap: 18px; }
.brand-every { margin: 0 0 0 auto; display: flex; align-items: center; gap: 8px; }
.brand-every select { margin-top: 0; width: auto; }
.spon-crop[data-where="corner"], .spon-crop[data-where=""] { aspect-ratio: 2 / 1; width: 180px; }
.spon-crop[data-where="corner"] img, .spon-crop[data-where=""] img,
.spon-item-crop[data-where="corner"] img, .spon-item-crop[data-where=""] img { object-fit: contain; }
.spon-item-crop[data-where="corner"], .spon-item-crop[data-where=""] { width: 64px; aspect-ratio: 2 / 1; }
.spon-stat { color: var(--ok); font-weight: 700; }
.spon-item select { width: auto; margin: 0; padding: 4px 6px; font-size: 12px; }
.spon-item .btn.small { color: var(--text); padding: 4px 9px; }
.spon-item-host { font-size: 13px; color: var(--muted); cursor: help; }
.brand-sub { margin: 18px 0 8px; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; }
.brand-sub small { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 600; }
.brand-tk { flex-wrap: wrap; align-items: flex-end; }
.brand-tk .field { margin-bottom: 0; }
.cue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 10px; }
.cue-grid .field { margin-bottom: 8px; }
.spon-sync { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.spon-sync.warn { color: #ffcf6a; }

/* ---------- design tiles ---------- */
.design-tiles { display: flex; flex-direction: column; gap: 8px; }
.design-tile {
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
  position: relative;
}
.design-tile:hover { background: var(--card-soft); }
.design-tile input { position: absolute; opacity: 0; pointer-events: none; }
.design-tile:has(input:checked) { border-color: var(--gold); background: rgba(217, 178, 74, 0.07); }
.dt-name { display: block; font-size: 14.5px; font-weight: 800; }
.dt-desc { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.dt-swatch { display: flex; gap: 4px; margin-top: 8px; }
.dt-swatch i { height: 6px; flex: 1; border-radius: 3px; }

/* ---------- rosters ---------- */
.roster-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1100px) { .roster-cols { grid-template-columns: 1fr; } }
.roster h3 { font-size: 13.5px; font-weight: 800; margin-bottom: 10px; letter-spacing: .5px; }
.roster { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.roster table { width: 100%; min-width: 640px; border-collapse: collapse; }
.roster th {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 0 5px 7px;
}
.roster td { padding: 3px 4px; }
.roster input { padding: 6px 8px; font-size: 13px; border-radius: 6px; }
.roster .r-num { width: 52px; }
.roster .r-pos { width: 96px; }
.roster .r-stat { width: 56px; }
.roster .r-del { width: 30px; text-align: center; }
.roster .r-del button { background: none; border: 0; color: var(--muted); font-size: 15px; cursor: pointer; }
.roster .r-del button:hover { color: #ff7b72; }
.roster .add-row { margin-top: 9px; }

/* ---------- teams ---------- */
.team-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.team-col h3 { font-size: 13.5px; font-weight: 800; margin-bottom: 10px; }

/* ---------- stats ---------- */
.stat-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.stat-pair label { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; letter-spacing: .5px; min-width: 96px; }

/* ---------- format grid ---------- */
.fmt-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }

/* ---------- modals ---------- */
.modal-backdrop[hidden] { display: none; }
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(5, 6, 8, 0.72);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal {
  position: relative;
  width: 620px; max-width: 100%;
  max-height: 88vh;
  max-height: 88dvh;
  overflow: auto;
  background: var(--card);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  padding: 28px 30px 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.modal-x {
  position: absolute; top: 12px; right: 14px;
  background: none; border: 0;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
}
.modal-x:hover { color: #fff; }
.modal-title { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.modal-p { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 14px; }
.modal-steps { margin: 0 0 14px 18px; font-size: 14px; line-height: 1.7; color: var(--text); }
.modal-steps li { margin-bottom: 7px; }
.modal-note { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.modal-note code { background: #0f1014; padding: 1px 6px; border-radius: 4px; }
.copy-row { display: flex; gap: 8px; margin-bottom: 16px; }
.copy-row input { flex: 1; font-size: 13px; color: var(--gold); }
.cost-callout {
  border: 1px solid rgba(62, 207, 120, 0.35);
  background: rgba(62, 207, 120, 0.07);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 14px;
}
.cost-callout b { color: var(--ok); }

/* wizard */
.wiz-step { min-height: 250px; }
.wiz-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.wiz-step h3 { font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.wiz-step p, .wiz-step li { font-size: 14.5px; line-height: 1.65; color: var(--muted); margin-bottom: 10px; }
.wiz-step ul { margin-left: 18px; }
.wiz-step b { color: var(--text); }
.pill-ref {
  display: inline-block;
  font-size: 12px; font-weight: 700;
  background: var(--card-soft);
  border: 1px solid var(--line);
  padding: 2px 9px;
  border-radius: 999px;
  color: var(--text);
}
.modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.wiz-dots { display: flex; gap: 6px; }
.wiz-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.18); }
.wiz-dot.active { background: var(--gold); }
.wiz-btns { display: flex; gap: 8px; }

/* ---------- mobile (phones) ---------- */
@media (max-width: 820px) {

  /* compact sticky header — title row + actions row, no wasted space */
  header { padding: 10px 12px; gap: 8px; }
  h1 { font-size: 16px; }
  h1 span { display: block; margin-left: 0; font-size: 10.5px; letter-spacing: 2px; }
  .header-actions { gap: 7px; width: 100%; }
  .header-actions .btn { font-size: 12.5px; padding: 8px 11px; flex: 1; text-align: center; }
  .room-chip, .sync-pill { font-size: 11.5px; padding: 6px 9px; }

  main.cards { padding: 12px 12px 80px; gap: 12px; }
  .card { padding: 14px; }

  /* 16px inputs stop iOS zooming the page on focus */
  input[type="text"], input[type="number"], select, .roster input { font-size: 16px; }

  /* finger-sized targets for live match control */
  .btn { padding: 12px 16px; }
  .btn.small { font-size: 13px; padding: 10px 12px; }
  .btn.score { padding: 14px 4px; font-size: 15px; }
  .toggle { padding: 10px 0; }
  .toggle input { width: 20px; height: 20px; }
  input[type="color"] { width: 52px; height: 44px; }

  /* form rows reflow instead of crushing — selects/fields share or stack */
  .row { flex-wrap: wrap; }
  .row > .field { flex: 1 1 160px !important; } /* beats inline flex:2 on match-info fields */
  .row > select { flex: 1 1 140px; width: auto; }
  .stepper { flex-wrap: nowrap; }
  .stepper .btn { padding: 12px 22px; }

  .team-cols { grid-template-columns: 1fr; }
  .fmt-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-pair label { min-width: 64px; font-size: 11px; }

  .modal { padding: 20px 16px 16px; border-radius: 14px; }
  .modal-footer { flex-wrap: wrap; }
  .wiz-step { min-height: 0; }
}

@media (max-width: 400px) {
  .clock-display { font-size: 46px; }
  .pod-score { font-size: 36px; }
  .fmt-grid { gap: 7px; }
}

/* ---------- match actions (tag now, analyse after) ---------- */
.act-count { color: var(--muted); font-size: 12px; font-weight: 500; margin-left: 8px; }
.act-poss { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.act-poss .pod-label { margin: 0 6px 0 0; }
.act-poss .btn.active { background: var(--gold); color: #16130a; border-color: var(--gold); }
.act-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
.act-col h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.act-btns { display: flex; flex-wrap: wrap; gap: 7px; }
.act-btns .act-btn { flex: 1 1 44%; }
.act-log { max-height: 220px; overflow-y: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card-soft); }
.act-empty { color: var(--muted); font-size: 13px; padding: 14px; }
.act-item { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.act-item:last-child { border-bottom: 0; }
.act-item.auto .ai-what { color: var(--gold); }
.ai-time { color: var(--muted); min-width: 84px; font-variant-numeric: tabular-nums; }
.ai-team { min-width: 110px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-what { flex: 1; }
.ai-what i { color: var(--muted); font-style: normal; font-size: 12px; }
.act-item button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; }
.act-item button:hover { color: var(--live); }
@media (max-width: 720px) {
  .act-cols { grid-template-columns: 1fr; }
  .ai-team { display: none; }
}

#report-row[hidden] { display: none; }

/* ---------- control complexity levels ---------- */
.level-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.level-switch button { font: inherit; font-size: 12px; font-weight: 700; color: var(--muted);
  background: transparent; border: 0; padding: 8px 14px; cursor: pointer; }
.level-switch button + button { border-left: 1px solid var(--line); }
.level-switch button.active { background: var(--gold); color: #16130a; }
body[data-level="simple"] .lvl-standard, body[data-level="simple"] .lvl-pro { display: none !important; }
body[data-level="standard"] .lvl-pro { display: none !important; }
