/* Inhouse draft screen. Dark board, gold accents, Radiant green / Dire red. */
:root {
  --bg: #090c11;
  --bg-2: #111722;
  --panel: #121823;
  --panel-2: #171e2b;
  --line: #263042;
  --line-2: #33405a;
  --text: #ebe7de;
  --muted: #8d95a5;
  --faint: #5c6578;
  --gold: #d6b062;
  --gold-2: #f3d995;
  --gold-dark: #9c7428;
  --radiant: #6cb43f;
  --radiant-soft: rgba(108, 180, 63, 0.16);
  --radiant-glow: rgba(108, 180, 63, 0.55);
  --dire: #d4493a;
  --dire-soft: rgba(212, 73, 58, 0.16);
  --dire-glow: rgba(212, 73, 58, 0.55);
  --reserve: #f0a63a;
  --str: #e0604c;
  --agi: #4fb560;
  --int: #4b93e6;
  --all: #a97de3;
  --radius: 5px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  background:
    radial-gradient(1200px 500px at 50% -120px, rgba(214, 176, 98, 0.10), transparent 70%),
    radial-gradient(900px 600px at 0% 0%, rgba(108, 180, 63, 0.06), transparent 60%),
    radial-gradient(900px 600px at 100% 0%, rgba(212, 73, 58, 0.07), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 14px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#app { height: 100%; }

button { font: inherit; color: inherit; }

/* ----- splash / empty states ----------------------------------------------------------- */
.splash {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}
.splash h1 { margin: 6px 0 0; color: var(--text); font-size: 22px; letter-spacing: 0.08em; text-transform: uppercase; }
.splash p { margin: 0; max-width: 460px; }
.splash .glyph { font-size: 40px; color: var(--gold); filter: drop-shadow(0 0 14px rgba(214, 176, 98, 0.4)); }
.splash.error .glyph { color: var(--dire); filter: none; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--line-2); border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ----- shared bits ---------------------------------------------------------------------- */
.badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(214, 176, 98, 0.14);
  color: var(--gold-2);
  border: 1px solid rgba(214, 176, 98, 0.35);
  white-space: nowrap;
}
.badge.you { background: rgba(255, 255, 255, 0.06); color: var(--text); border-color: var(--line-2); }

.btn {
  border-radius: 4px;
  padding: 11px 20px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, #1d2534, #151b27);
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.15s, transform 0.08s, box-shadow 0.15s;
}
.btn:hover:not(:disabled) { filter: brightness(1.18); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible, .card:focus-visible, .copy:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.btn.lock {
  background: linear-gradient(180deg, #f0cf7c, #c39034 60%, #a5761f);
  color: #1d1406;
  border-color: #f7e0a3;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 0 22px rgba(240, 207, 124, 0.35);
  min-width: 170px;
}
.btn.lock:disabled { filter: grayscale(0.85) brightness(0.55); cursor: not-allowed; box-shadow: none; }
.btn.radiant { border-color: var(--radiant); background: linear-gradient(180deg, rgba(108, 180, 63, 0.35), rgba(108, 180, 63, 0.12)); }
.btn.dire { border-color: var(--dire); background: linear-gradient(180deg, rgba(212, 73, 58, 0.35), rgba(212, 73, 58, 0.12)); }
.btn.first, .btn.second { border-color: var(--gold-dark); background: linear-gradient(180deg, rgba(214, 176, 98, 0.28), rgba(214, 176, 98, 0.08)); }

em { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ----- board layout --------------------------------------------------------------------- */
.board { height: 100%; display: flex; flex-direction: column; }

.titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.titlebar .title { color: var(--text); font-weight: 700; }
.titlebar .spacer { flex: 1; }
.conn { display: inline-flex; align-items: center; gap: 6px; }
.conn::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--radiant); box-shadow: 0 0 8px var(--radiant-glow); }
.conn.down::before { background: var(--reserve); box-shadow: none; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 230px) minmax(0, 1fr);
  gap: 12px;
  padding: 8px 14px 8px;
}

.team {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 9px 11px 10px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-top: 3px solid var(--side, var(--line-2));
  min-width: 0;
  transition: box-shadow 0.3s, background 0.3s;
}
.team.radiant { --side: var(--radiant); --side-soft: var(--radiant-soft); --side-glow: var(--radiant-glow); }
.team.dire { --side: var(--dire); --side-soft: var(--dire-soft); --side-glow: var(--dire-glow); }
.team.active {
  background: linear-gradient(180deg, var(--side-soft), var(--panel) 75%);
  box-shadow: 0 0 0 1px var(--side), 0 0 26px -6px var(--side-glow);
}
.team-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; }
.team.dire .team-head { flex-direction: row-reverse; }
.side-name { font-size: 18px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--side); }
.team-head .spacer { flex: 1; }
.reserve { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.reserve.draining { color: var(--reserve); }

.picks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.bans { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.team.dire .bans { flex-direction: row-reverse; }
.bans .lbl { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin: 0 3px; }

.slot {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 3px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.025) 50%, rgba(255, 255, 255, 0.025) 75%, transparent 75%) 0 0 / 10px 10px,
    linear-gradient(180deg, #161d29, #0d1219);
  border: 1px solid var(--line);
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot .hname {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 8px 4px 2px;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em;
  color: #fff; text-shadow: 0 1px 2px #000;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-align: center;
}
.slot.filled { border-color: color-mix(in srgb, var(--side) 55%, transparent); }
.slot.current {
  color: var(--side);
  border-color: var(--side);
  box-shadow: inset 0 0 18px -4px var(--side-glow), 0 0 14px -2px var(--side-glow);
  animation: pulse 1.3s ease-in-out infinite;
}
.slot.current .pno { font-weight: 800; }
.slot.ghost img { opacity: 0.45; filter: saturate(0.6); }
.slot.ban-slot { width: 54px; flex: 0 0 auto; }
.slot.ban-slot.filled { border-color: rgba(212, 73, 58, 0.45); }
.slot.ban-slot.filled img { filter: grayscale(1) brightness(0.55); }
.slot.ban-slot.filled::after, .card.banned::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top right, transparent calc(50% - 1.2px), rgba(232, 72, 58, 0.95) calc(50% - 1.2px),
    rgba(232, 72, 58, 0.95) calc(50% + 1.2px), transparent calc(50% + 1.2px));
}
.slot.skipped { color: var(--faint); font-size: 9px; }
@keyframes pulse { 50% { box-shadow: inset 0 0 6px -4px var(--side-glow), 0 0 4px -2px var(--side-glow); } }

.roster { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); min-height: 16px; }
.team.dire .roster { justify-content: flex-end; }
.roster .pl { white-space: nowrap; }
.roster .pl.cap { color: var(--text); font-weight: 600; }
.roster .pl.me { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.roster em { margin-left: 4px; font-size: 11px; }
.role {
  display: inline-block;
  margin-right: 6px;
  padding: 0 5px;
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 1px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  border: 1px solid var(--line-2);
}
.role.fit-pref { color: #b4e48f; border-color: rgba(108, 180, 63, 0.5); background: var(--radiant-soft); }
.role.fit-avoid { color: #f3a092; border-color: rgba(212, 73, 58, 0.5); background: var(--dire-soft); }
.fit { font-size: 11px; margin-left: 4px; }
.fit.fit-pref { color: var(--radiant); }
.fit.fit-avoid { color: var(--reserve); }
.prefs { margin-left: 8px; font-size: 11px; color: var(--faint); }
.delta-up { color: var(--radiant) !important; font-weight: 700; }
.delta-down { color: var(--dire) !important; font-weight: 700; }

/* center clock */
.clock {
  --side: var(--gold);
  --side-glow: rgba(214, 176, 98, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 10px 9px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.05), transparent 60%), var(--panel);
  text-align: center;
  min-width: 0;
}
.clock.radiant { --side: var(--radiant); --side-glow: var(--radiant-glow); }
.clock.dire { --side: var(--dire); --side-glow: var(--dire-glow); }
.phase-label { font-size: 12px; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: var(--side); }
.time {
  font-size: 46px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-shadow: 0 0 24px var(--side-glow);
}
.time.reserve { color: var(--reserve); text-shadow: 0 0 22px rgba(240, 166, 58, 0.5); }
.time.urgent { animation: urgent 0.5s ease-in-out infinite alternate; }
.time.small { font-size: 26px; letter-spacing: 0.12em; text-transform: uppercase; }
@keyframes urgent { to { color: #ff6a52; transform: scale(1.04); } }
.bar { width: 100%; height: 4px; border-radius: 2px; background: #1c2331; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--side); transition: width 0.2s linear; }
.time.reserve + .bar i { background: var(--reserve); }
.time-sub { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.notice { font-size: 12px; color: var(--muted); min-height: 1.3em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* order strip */
.order {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 14px 9px;
  overflow-x: auto;
  scrollbar-width: none;
}
.order::-webkit-scrollbar { display: none; }
.olabel { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin-right: 3px; flex: 0 0 auto; }
.sep { flex: 0 0 auto; width: 1px; height: 18px; background: var(--line-2); margin: 0 8px; }
.chip {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 23px;
  border-radius: 3px;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  border: 1px solid;
}
.chip.ban { width: 32px; }
.chip.radiant { border-color: rgba(108, 180, 63, 0.55); color: #b4e48f; background: var(--radiant-soft); --side-glow: var(--radiant-glow); }
.chip.dire { border-color: rgba(212, 73, 58, 0.55); color: #f3a092; background: var(--dire-soft); --side-glow: var(--dire-glow); }
.chip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chip.done { opacity: 0.6; }
.chip.done.ban img { filter: grayscale(1) brightness(0.6); }
.chip.done b { display: none; }
.chip.current { opacity: 1; box-shadow: 0 0 0 1px currentColor, 0 0 12px var(--side-glow); }

/* hero pool */
.pool {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: 12px;
  padding: 2px 14px 12px;
}
.attr h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 7px;
  padding-bottom: 5px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.attr h3 i { width: 9px; height: 9px; border-radius: 50%; background: var(--attr); box-shadow: 0 0 8px var(--attr); }
.attr h3 .count { margin-left: auto; color: var(--faint); letter-spacing: 0.06em; }
.attr.str { --attr: var(--str); }
.attr.agi { --attr: var(--agi); }
.attr.int { --attr: var(--int); }
.attr.all { --attr: var(--all); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 7px; }

.card {
  position: relative;
  aspect-ratio: 16 / 10;
  padding: 0;
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--attr) 35%, #0d1118), #0d1118);
  border: 1px solid #2a3243;
  cursor: default;
  transition: transform 0.12s, box-shadow 0.15s, border-color 0.15s;
}
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: filter 0.25s; }
.card .name {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 12px 6px 4px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
  text-align: left; color: #fff; text-shadow: 0 1px 2px #000;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.88));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card .roles {
  position: absolute; left: 0; right: 0; top: 0;
  padding: 3px 6px 10px;
  font-size: 9.5px; color: #e9e4d8; text-align: left;
  background: linear-gradient(rgba(0, 0, 0, 0.8), transparent);
  opacity: 0; transition: opacity 0.15s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card:hover .roles { opacity: 1; }
.card.banned .roles, .card.picked .roles, .card.selected .roles { display: none; }
.card .tag {
  position: absolute; top: 4px; right: 4px;
  font-size: 8.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 1px 5px; border-radius: 2px;
}
.card .tag:empty { display: none; }
.card.clickable { cursor: pointer; }
.card.clickable:hover { transform: translateY(-2px); border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 8px 18px rgba(0, 0, 0, 0.55); }
.card.selected {
  border-color: var(--gold-2);
  box-shadow: 0 0 0 2px var(--gold-2), 0 0 24px rgba(243, 217, 149, 0.45);
  transform: translateY(-2px);
}
.card.selected .tag { background: var(--gold-2); color: #1d1406; }
.card.banned img { filter: grayscale(1) brightness(0.32); }
.card.banned .tag { background: rgba(212, 73, 58, 0.9); color: #fff; }
.card.banned .name, .card.picked .name { color: #aaa; }
.card.picked img { filter: grayscale(0.9) brightness(0.4); }
.card.picked { outline: 2px solid var(--pickside); outline-offset: -2px; }
.card.picked.radiant { --pickside: var(--radiant); }
.card.picked.dire { --pickside: var(--dire); }
.card.picked .tag { background: var(--pickside); color: #0b0f08; }
.card.focus {
  border-color: #9cc7ff;
  box-shadow: 0 0 0 2px #9cc7ff, 0 0 18px rgba(156, 199, 255, 0.4);
  transform: translateY(-2px);
}
.card.focus .tag { background: #9cc7ff; color: #0b1220; }
.card .sugg { position: absolute; top: 4px; left: 4px; display: flex; gap: 3px; }
.card .sugg:empty { display: none; }
.card .sugg span {
  font-size: 10px; font-weight: 800; line-height: 1;
  padding: 2px 4px; border-radius: 3px;
  background: rgba(8, 10, 14, 0.85); border: 1px solid;
}
.card .sugg .sp { border-color: rgba(108, 180, 63, 0.8); color: #c9f0aa; }
.card .sugg .sb { border-color: rgba(212, 73, 58, 0.8); color: #ffb3a7; }
.card.noimg .name { font-size: 12px; top: 0; display: flex; align-items: center; justify-content: center; text-align: center; white-space: normal; background: none; }
.card.noimg img, .slot.noimg img, .chip.noimg img, .preview.noimg img { visibility: hidden; }

/* action bar */
.actionbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  min-height: 78px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #131a27, #0b0f16);
  transition: box-shadow 0.3s;
}
body.my-turn .actionbar { box-shadow: inset 0 2px 0 var(--gold), 0 -10px 30px -12px rgba(214, 176, 98, 0.45); }
body.flash .actionbar { animation: flash 0.4s ease-in-out 3; }
@keyframes flash { 50% { background: #3a2f14; } }
.preview { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; }
.preview .pimg {
  position: relative; width: 104px; aspect-ratio: 16 / 9; flex: 0 0 auto;
  border-radius: 4px; overflow: hidden; border: 1px solid var(--gold-dark);
  background: linear-gradient(180deg, #161d29, #0d1219);
}
.preview .pimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview.empty .pimg { border-style: dashed; border-color: var(--line-2); }
.preview .pcap { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.preview .pname { font-size: 18px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.preview .proles { font-size: 12px; color: var(--muted); }
.preview > div:last-child { min-width: 0; }
.hint { font-size: 11px; color: var(--faint); text-align: right; max-width: 220px; }
.actionbar .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.actionbar .mid .waiting { flex: none; }
.suggs { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.slabel { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin-right: 2px; }
.schip {
  padding: 3px 8px; border-radius: 12px; cursor: pointer;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  background: #18202d; border: 1px solid var(--line-2);
}
.schip:disabled { cursor: default; }
.schip.pick { border-color: rgba(108, 180, 63, 0.55); }
.schip.ban { border-color: rgba(212, 73, 58, 0.55); }
.schip.now { box-shadow: 0 0 0 1px var(--gold-dark); }
.schip em { margin-left: 2px; color: var(--gold-2); }
.schip:hover:not(:disabled) { filter: brightness(1.25); }
.btn.suggest.pick { border-color: rgba(108, 180, 63, 0.7); }
.btn.suggest.ban { border-color: rgba(212, 73, 58, 0.7); }
.btn.suggest.on { background: linear-gradient(180deg, #2a3a22, #1a2416); color: #c9f0aa; }
.btn.suggest.ban.on { background: linear-gradient(180deg, #3a2420, #241614); color: #ffb3a7; }
.btn.suggest:disabled { opacity: 0.45; cursor: not-allowed; }
.waiting { flex: 1; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; }
.waiting b { color: var(--text); }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: dots 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dots { 0%, 80%, 100% { opacity: 0.2; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.live-msg { flex: 1; min-width: 0; color: var(--muted); }
.live-msg strong { display: block; font-size: 17px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-2); }
.lobby { display: flex; gap: 8px; flex-wrap: wrap; }
.copy {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 6px 12px; border-radius: 4px; cursor: pointer;
  border: 1px solid var(--gold-dark); background: rgba(214, 176, 98, 0.08); text-align: left;
}
.copy .k { font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.copy code { font: 700 15px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); }
.votes { font-size: 12px; color: var(--muted); text-align: right; }

/* ----- waiting / coin toss stages ------------------------------------------------------- */
.stage {
  height: 100%;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 28px 16px;
}
.stage-head { text-align: center; }
.eyebrow { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); }
.stage-head h1 { margin: 4px 0 6px; font-size: 26px; letter-spacing: 0.06em; text-transform: uppercase; }
.stage-head .sub { margin: 6px 0 0; color: var(--muted); }
.stage .hint-line { color: var(--muted); font-size: 13px; text-align: center; }
.signups { width: min(460px, 100%); }
.signups h2, .tcard h3 { margin: 0 0 8px; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tcard h3 em { white-space: nowrap; font-size: 11px; letter-spacing: 0.08em; }
.signups ol, .tcard ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.signups li, .tcard li {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 7px 11px; border-radius: 4px;
  background: var(--panel); border: 1px solid var(--line);
}
.signups li.empty { color: var(--faint); border-style: dashed; background: transparent; }
.tcard li.cap { border-color: var(--gold-dark); }
.tcard li.me, .signups li.me { box-shadow: inset 3px 0 0 var(--gold); }
.teams-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; align-items: start; width: min(860px, 100%); }
.tcard { padding: 12px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--line); border-top: 3px solid var(--side, var(--gold-dark)); }
.tcard.radiant { --side: var(--radiant); }
.tcard.dire { --side: var(--dire); }
.tcard h3 { color: var(--side, var(--text)); }
.vs { align-self: center; font-size: 22px; font-weight: 800; letter-spacing: 0.1em; color: var(--gold); }
.coinbox { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 6px 0; min-width: 260px; }
.coin {
  width: 74px; height: 74px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3c4, #e2b85b 40%, #9c7428 75%, #6d4f17);
  box-shadow: 0 0 0 3px #3b2c10, 0 0 30px rgba(214, 176, 98, 0.45), inset 0 -4px 8px rgba(0, 0, 0, 0.35);
  display: grid; place-items: center;
  font-weight: 900; font-size: 26px; color: #5b410f;
  animation: coin 2.6s ease-in-out infinite;
}
@keyframes coin { 50% { transform: rotateY(180deg); } }
.coinbox h2 { margin: 6px 0 0; font-size: 18px; letter-spacing: 0.06em; text-transform: uppercase; }
.coinbox p { margin: 0; color: var(--muted); }
.coinbox .choice { color: var(--text); }
.toss-opts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.timer-line b { color: var(--text); font-variant-numeric: tabular-nums; }

/* ----- toast ----------------------------------------------------------------------------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translate(-50%, 20px);
  padding: 9px 16px;
  border-radius: 4px;
  background: #241a12;
  border: 1px solid var(--gold-dark);
  color: var(--text);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  max-width: calc(100% - 32px);
  text-align: center;
  z-index: 10;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.error { background: #2a1210; border-color: var(--dire); }

/* ----- smaller screens (Discord Activity in a call, phones) ------------------------------- */
@media (max-height: 700px) {
  .topbar { padding-top: 4px; padding-bottom: 6px; }
  .team { padding: 7px 9px 8px; gap: 5px; }
  .roster { display: none; }
  .time { font-size: 38px; }
  .actionbar { min-height: 64px; padding: 7px 14px; }
  .preview .pimg { width: 86px; }
  .preview .pname { font-size: 15px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 5px; }
  .card .name { font-size: 10px; }
}
@media (max-width: 1050px) {
  .pool { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  body { overflow: auto; }
  .board { height: auto; min-height: 100%; }
  .topbar { grid-template-columns: 1fr; }
  .clock { order: -1; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 4px 12px; }
  .clock .bar { order: 5; }
  .time { font-size: 32px; }
  .team.dire .team-head { flex-direction: row; }
  .team.dire .bans { flex-direction: row; }
  .team.dire .roster { justify-content: flex-start; }
  .pool { overflow: visible; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
  .actionbar { position: sticky; bottom: 0; flex-wrap: wrap; gap: 10px; }
  .actionbar .preview, .actionbar .waiting, .actionbar .live-msg, .actionbar .mid { flex: 1 1 100%; }
  .actionbar .btn { flex: 1 1 0; min-width: 0; padding: 11px 10px; }
  .votes { text-align: left; }
  .hint { display: none; }
  #tb-sub { display: none; }
  .titlebar { flex-wrap: wrap; }
  .teams-row { grid-template-columns: 1fr; }
  .vs { justify-self: center; }
}
@media (max-width: 520px) {
  .pool { grid-template-columns: 1fr; }
  .btn.lock { min-width: 0; flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
