:root {
  --bg: #0a0d14;
  --bg-soft: #0d1119;
  --surface: #121826;
  --surface-2: #182032;
  --border: #232d44;
  --border-soft: #1b2338;
  --text: #e9edf5;
  --muted: #8b94a9;
  --accent: #6c8cff;
  --accent-2: #43d9c0;
  --pink: #ff7eb6;
  --danger: #ff6b6b;
  --win: #43d9c0;
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

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

html, body { height: 100%; }

body {
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(108, 140, 255, 0.14), transparent 60%),
    radial-gradient(700px 500px at 100% 100%, rgba(67, 217, 192, 0.07), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }

.wrap {
  width: min(1060px, 100% - 40px);
  margin-inline: auto;
}

.site-header {
  padding: 44px 0 8px;
  text-align: center;
}

.logo-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--text);
}

.logo-img {
  display: block;
  height: 116px;
  width: auto;
  max-width: min(640px, 90vw);
  object-fit: contain;
  filter: drop-shadow(0 10px 28px rgba(108, 140, 255, 0.28));
}

@media (max-width: 540px) {
  .logo-img { height: 76px; }
}

.logo-word {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tagline { color: var(--muted); margin-top: 10px; font-size: 15px; }

main { flex: 1; padding: 36px 0 64px; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 28px;
}

@media (max-width: 860px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  display: block;
  color: var(--text);
}

.card:hover, .card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(108, 140, 255, 0.55);
  box-shadow: 0 16px 40px rgba(108, 140, 255, 0.14);
  outline: none;
}

.card .thumb {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(300px 120px at 50% 0%, rgba(108, 140, 255, 0.16), transparent 70%),
    var(--bg-soft);
  border-bottom: 1px solid var(--border-soft);
}

.card .thumb svg { width: 96px; height: 96px; }

.card .body { padding: 16px 18px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.card .name { font-weight: 700; font-size: 17px; }

.card .meta { color: var(--muted); font-size: 13px; white-space: nowrap; }

.card.soon {
  cursor: default;
  border-style: dashed;
  opacity: 0.55;
  background: transparent;
}

.card.soon:hover { transform: none; border-color: var(--border); box-shadow: none; }

.card.soon .thumb { background: var(--bg-soft); }

.footer { color: var(--muted); font-size: 13px; text-align: center; padding: 26px 0 40px; border-top: 1px solid var(--border-soft); }

.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.btn:hover { border-color: rgba(108, 140, 255, 0.55); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn.primary {
  background: linear-gradient(90deg, var(--accent), #5a9df0);
  border-color: transparent;
  color: #0a0d14;
}

.btn.primary:hover { filter: brightness(1.07); }

.game-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
}

.game-top .brand { display: inline-flex; align-items: center; gap: 10px; }
.game-top .brand img { height: 34px; width: auto; display: block; opacity: 0.9; transition: opacity 0.15s ease; }
.game-top .brand:hover img { opacity: 1; }
.game-top .sid { color: var(--muted); font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.status {
  text-align: center;
  font-size: 19px;
  font-weight: 700;
  margin: 6px 0 4px;
  min-height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.status .sub { display: block; font-size: 13px; font-weight: 400; color: var(--muted); margin-top: 6px; min-height: 16px; }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}

.share-panel {
  position: relative;
  width: min(460px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
  animation: pop 0.16s ease;
}

@keyframes pop {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.share-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.share-close:hover { color: var(--text); border-color: rgba(108, 140, 255, 0.55); }

.share-panel .share-title { font-weight: 700; text-align: center; }
.share-panel .share-sub { color: var(--muted); font-size: 13px; text-align: center; }

.share-row { display: flex; gap: 10px; }

.share-row input {
  flex: 1;
  min-width: 0;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 14px;
  font: inherit;
  font-size: 14px;
  text-overflow: ellipsis;
}

.share-row input:focus { outline: none; border-color: var(--accent); }

.players {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 18px 0 22px;
}

.pchip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.pchip.active {
  color: var(--text);
  border-color: rgba(108, 140, 255, 0.6);
  box-shadow: 0 0 0 1px rgba(108, 140, 255, 0.35), 0 6px 18px rgba(108, 140, 255, 0.12);
}

.pchip .mark { font-size: 16px; font-weight: 800; }
.pchip.x .mark { color: var(--accent); }
.pchip.o .mark { color: var(--pink); }
.pchip.gone { opacity: 0.45; }

.dot { width: 8px; height: 8px; border-radius: 50%; background: #3f4a63; }
.dot.on { background: var(--accent-2); box-shadow: 0 0 8px rgba(67, 217, 192, 0.8); }

.vs { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; }

.board-wrap { display: flex; justify-content: center; padding: 8px 0 10px; }

.board {
  display: grid;
  grid-template-columns: repeat(3, 108px);
  grid-template-rows: repeat(3, 108px);
  gap: 10px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

@media (max-width: 480px) {
  .board { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, 96px); width: 100%; }
}

.cell {
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--bg-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.cell:hover:not(:disabled) { background: #141b2c; border-color: rgba(108, 140, 255, 0.4); }
.cell:active:not(:disabled) { transform: scale(0.97); }
.cell:disabled { cursor: default; }

.cell svg { width: 54%; height: 54%; }

.cell.x svg { stroke: var(--accent); filter: drop-shadow(0 0 10px rgba(108, 140, 255, 0.5)); }
.cell.o svg { stroke: var(--pink); filter: drop-shadow(0 0 10px rgba(255, 126, 182, 0.45)); }

.cell.win { background: rgba(67, 217, 192, 0.1); border-color: rgba(67, 217, 192, 0.6); }
.cell.win svg { stroke: var(--win); filter: drop-shadow(0 0 14px rgba(67, 217, 192, 0.7)); }

.actions { display: flex; justify-content: center; gap: 12px; margin: 18px 0 8px; min-height: 46px; }

.rematch-note { text-align: center; color: var(--muted); font-size: 13px; min-height: 18px; margin-bottom: 8px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px auto 12px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 126, 182, 0.4);
  color: var(--pink);
  font-size: 13px;
  font-weight: 600;
  justify-content: center;
}

.center-note { text-align: center; }

.board-slot { display: flex; justify-content: center; }

.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }

.pchip.c4a .mark { color: #ffd166; }
.pchip.c4b .mark { color: #ff6b6b; }

.c4-board {
  display: flex;
  gap: 6px;
  padding: 16px;
  background: linear-gradient(180deg, #1b2a4a, #16213c);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.c4-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
}

.c4-col:disabled { cursor: default; }
.c4-col:hover:not(:disabled) { background: rgba(255, 255, 255, 0.05); }

.c4-cell {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #0b101f;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.c4-disc { width: 34px; height: 34px; border-radius: 50%; }

.c4-disc.a { background: radial-gradient(circle at 35% 30%, #ffe08a, #f4b93f); box-shadow: 0 2px 8px rgba(255, 209, 102, 0.4); }
.c4-disc.b { background: radial-gradient(circle at 35% 30%, #ff9d9d, #e5484d); box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4); }

.c4-cell.win .c4-disc { box-shadow: 0 0 0 3px var(--win), 0 0 18px rgba(67, 217, 192, 0.8); }

.c4-disc.drop { animation: c4drop 0.28s cubic-bezier(0.35, 0.8, 0.5, 1.2); }

@keyframes c4drop {
  from { transform: translateY(-320px); opacity: 0.4; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 520px) {
  .c4-board { gap: 3px; padding: 10px; }
  .c4-col { gap: 3px; }
  .c4-cell { width: 40px; height: 40px; }
  .c4-disc { width: 30px; height: 30px; }
}

.rps-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; }

.rps-scorebar {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 22px;
}

.rps-side { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); min-width: 72px; }
.pips { display: flex; gap: 5px; }

.pip { width: 11px; height: 11px; border-radius: 50%; background: #232d44; }
.pip.on.pa { background: var(--accent); box-shadow: 0 0 8px rgba(108, 140, 255, 0.6); }
.pip.on.pb { background: var(--pink); box-shadow: 0 0 8px rgba(255, 126, 182, 0.6); }

.rps-round { font-weight: 800; font-size: 18px; min-width: 44px; text-align: center; }

.rps-choices { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

.rps-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 108px;
  padding: 18px 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.rps-btn svg { width: 52px; height: 52px; color: var(--muted); transition: color 0.15s ease; }

.rps-btn:hover:not(:disabled) { transform: translateY(-3px); border-color: rgba(108, 140, 255, 0.55); }
.rps-btn:hover:not(:disabled) svg { color: var(--accent); }
.rps-btn:disabled { cursor: default; opacity: 0.6; }

.rps-btn.picked { border-color: var(--accent-2); box-shadow: 0 0 0 1px rgba(67, 217, 192, 0.4), 0 8px 24px rgba(67, 217, 192, 0.15); }
.rps-btn.picked svg { color: var(--accent-2); }

.rps-hint { color: var(--muted); font-size: 14px; min-height: 20px; }

.rps-reveal { display: flex; align-items: center; gap: 22px; }

.rps-show { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; color: var(--muted); }
.rps-show svg { width: 56px; height: 56px; color: var(--muted); }
.rps-show.a svg { color: var(--accent); }
.rps-show.b svg { color: var(--pink); }
.rps-show.w { border-color: rgba(67, 217, 192, 0.6); box-shadow: 0 0 24px rgba(67, 217, 192, 0.18); }
.rps-show.d { border-color: var(--border); }

.rps-vs { font-weight: 800; font-size: 13px; letter-spacing: 0.1em; color: var(--muted); }

.rps-result { text-align: center; font-weight: 700; font-size: 16px; min-height: 22px; }

.rps-history { display: flex; gap: 6px; min-height: 12px; }
.rps-history .h { width: 10px; height: 10px; border-radius: 3px; background: #232d44; }
.rps-history .h.a { background: var(--accent); }
.rps-history .h.b { background: var(--pink); }
.rps-history .h.d { background: #3a4460; }

.bs-wrap { display: flex; gap: 26px; justify-content: center; align-items: flex-start; flex-wrap: wrap; width: 100%; }

.bs-side { display: flex; flex-direction: column; gap: 10px; }

.bs-title { font-size: 14px; font-weight: 700; color: var(--muted); text-align: center; }

.bs-grid {
  display: grid;
  grid-template-columns: repeat(10, 30px);
  grid-auto-rows: 30px;
  gap: 3px;
  padding: 10px;
  background: #0c1424;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.bs-grid.target { border-color: rgba(255, 107, 107, 0.35); }

.bs-cell {
  border: none;
  border-radius: 6px;
  background: #17223a;
  cursor: pointer;
  padding: 0;
  transition: background 0.12s ease;
}

.bs-cell:disabled { cursor: default; }

.bs-grid.target .bs-cell:not(:disabled):hover { background: #2a3a60; box-shadow: inset 0 0 0 2px rgba(255, 107, 107, 0.6); }

.bs-cell.ship { background: linear-gradient(135deg, #3d5a92, #2f4570); box-shadow: inset 0 0 0 1px rgba(140, 170, 255, 0.25); }

.bs-cell.reveal { background: #4a4256; opacity: 0.85; }

.bs-cell.hit { background: radial-gradient(circle, #ff6b6b 30%, #a02c2c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15); }

.bs-cell.miss { background: #17223a; }
.bs-cell.miss::after { content: ''; display: block; width: 8px; height: 8px; margin: 11px auto; border-radius: 50%; background: #46536f; }

.bs-cell.last { box-shadow: 0 0 0 2px var(--accent-2); }

.bs-cell.preview-ok { background: rgba(108, 140, 255, 0.45); }
.bs-cell.preview-bad { background: rgba(255, 107, 107, 0.4); }

.bs-controls { display: flex; flex-direction: column; gap: 10px; max-width: 340px; }

.bs-shipbtns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }

.btn.ship-pick .ship-len { color: var(--accent); letter-spacing: 1px; margin-right: 2px; }
.btn.ship-pick.used { opacity: 0.35; }
.btn.ship-pick.sel { border-color: var(--accent-2); color: var(--accent-2); }

.bs-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

.bs-note { text-align: center; color: var(--muted); font-size: 13px; min-height: 18px; }

@media (max-width: 640px) {
  .bs-grid { grid-template-columns: repeat(10, 26px); grid-auto-rows: 26px; gap: 2px; padding: 6px; }
  .bs-cell.miss::after { width: 6px; height: 6px; margin: 10px auto; }
}

.tow-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; max-width: 640px; }

.tow-timer { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tow-timer.urgent { color: var(--danger); animation: pulse 0.6s ease-in-out infinite; }

.tow-sides { display: flex; justify-content: space-between; width: 100%; padding: 0 6px; }

.tow-side .tag { font-size: 13px; font-weight: 800; letter-spacing: 0.12em; color: var(--muted); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); }
.tow-side.mine .tag { color: var(--accent-2); border-color: rgba(67, 217, 192, 0.5); }
.tow-side.lead .tag { box-shadow: 0 0 14px rgba(67, 217, 192, 0.35); }

.tow-track {
  position: relative;
  width: 100%;
  height: 46px;
  border-radius: 12px;
  background: #0c1424;
  border: 1px solid var(--border);
  overflow: hidden;
}

.tow-zone.a { position: absolute; left: 0; top: 0; bottom: 0; width: 12%; background: linear-gradient(90deg, rgba(108, 140, 255, 0.25), transparent); }
.tow-zone.b { position: absolute; right: 0; top: 0; bottom: 0; width: 12%; background: linear-gradient(270deg, rgba(255, 126, 182, 0.25), transparent); }

.tow-center { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: #2a3654; }

.tow-marker {
  position: absolute;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe08a, #d99a26);
  border: 3px solid #0c1424;
  box-shadow: 0 0 16px rgba(255, 209, 102, 0.7);
  transition: left 0.1s linear;
}

.tow-btn {
  font: inherit;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #0a0d14;
  padding: 22px 74px;
  border-radius: 22px;
  border: none;
  background: linear-gradient(180deg, #7fa0ff, var(--accent));
  box-shadow: 0 10px 34px rgba(108, 140, 255, 0.4);
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.tow-btn:hover:not(:disabled) { filter: brightness(1.06); }
.tow-btn:active:not(:disabled) { transform: scale(0.96); }
.tow-btn:disabled { filter: grayscale(0.6) brightness(0.6); cursor: not-allowed; }
.tow-btn.yank { animation: yank 0.14s ease; }

@keyframes yank {
  0% { transform: scale(0.93); }
  60% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.tow-counts { color: var(--muted); font-size: 13px; }

.hol-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; max-width: 520px; }

.hol-scorebar {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 22px;
  width: 100%;
  justify-content: space-between;
}

.hol-score { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; color: var(--muted); }
.hol-score b { font-size: 22px; color: var(--text); }
.hol-score.mine span { color: var(--accent-2); font-weight: 700; }

.hol-round { font-weight: 800; font-size: 15px; }

.hol-cards { display: flex; align-items: center; gap: 26px; }

.hol-card {
  width: 118px;
  height: 164px;
  border-radius: 14px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.hol-card.front { background: linear-gradient(160deg, #f4f6fb, #dfe4ee); color: #1a2233; }
.hol-card.front.red { color: #c9263a; }

.hol-card.back {
  background: repeating-linear-gradient(45deg, #2a3a6b, #2a3a6b 8px, #223157 8px, #223157 16px);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hol-card.back span { font-size: 40px; font-weight: 900; color: rgba(255, 255, 255, 0.25); }

.hol-card .corner { position: absolute; font-size: 15px; font-weight: 700; }
.hol-card .tl { top: 8px; left: 10px; }
.hol-card .br { bottom: 8px; right: 10px; transform: rotate(180deg); }
.hol-card .pip-big { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 52px; }

.hol-card.next.pop { animation: holpop 0.25s ease; }

@keyframes holpop {
  from { transform: scale(0.7) rotate(-6deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}

.hol-mid { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 54px; }

.hol-arrow { font-size: 30px; font-weight: 900; }
.hol-arrow.q { color: var(--muted); }
.hol-arrow.shown.up { color: var(--accent-2); }
.hol-arrow.shown.down { color: var(--pink); }

.hol-lockedtag { font-size: 11px; color: var(--muted); border: 1px solid var(--border); padding: 2px 8px; border-radius: 999px; }

.hol-mark { font-size: 22px; font-weight: 900; }
.hol-mark.ok { color: var(--accent-2); }
.hol-mark.bad { color: var(--danger); }

.hol-timerbar { width: 100%; height: 8px; border-radius: 999px; background: #17223a; overflow: hidden; }
.hol-timerbar .fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.1s linear; border-radius: 999px; }
.hol-timerbar.urgent .fill { background: var(--danger); }
.hol-timerbar.spacer { background: transparent; }

.hol-answers { display: flex; gap: 14px; }

.hol-abtn {
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 34px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.hol-abtn:hover:not(:disabled) { transform: translateY(-2px); }
.hol-abtn:disabled { opacity: 0.45; cursor: default; }

.hol-abtn.up .hol-abtn-arrow { color: var(--accent-2); }
.hol-abtn.down .hol-abtn-arrow { color: var(--pink); }
.hol-abtn.picked { border-color: var(--accent-2); box-shadow: 0 0 0 1px rgba(67, 217, 192, 0.4), 0 8px 24px rgba(67, 217, 192, 0.15); }
.st-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; }

.st-stage { position: relative; width: min(420px, 90vw); height: 230px; border-radius: 22px; overflow: hidden; }

.st-zone {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 22px;
  border: 1px solid var(--border);
  transition: background 0.1s ease;
  user-select: none;
  -webkit-user-select: none;
}

.st-zone.idle { background: var(--surface); }

.st-zone.wait { background: linear-gradient(180deg, #3a1520, #2a0f18); border-color: rgba(255, 107, 107, 0.4); }
.st-zone.wait .st-big { color: #ff8585; }

.st-zone.go { background: linear-gradient(180deg, #0f3a2c, #0b2a20); border-color: rgba(67, 217, 192, 0.7); animation: stflash 0.4s ease; }
.st-zone.go .st-big { color: #5ff0d2; }

.st-zone.result { background: var(--surface); gap: 14px; }

.st-big { font-size: 44px; font-weight: 900; letter-spacing: 0.06em; }
.st-small { font-size: 14px; color: var(--muted); }

.st-zone.wait .st-small, .st-zone.go .st-small { opacity: 0.8; }

@keyframes stflash {
  from { transform: scale(1.06); }
  to { transform: scale(1); }
}

.st-times { display: flex; align-items: center; gap: 22px; }

.st-time { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 20px; border-radius: 14px; border: 1px solid var(--border); min-width: 110px; }
.st-time span { font-size: 13px; color: var(--muted); }
.st-time b { font-size: 22px; font-variant-numeric: tabular-nums; }
.st-time.won { border-color: rgba(67, 217, 192, 0.6); box-shadow: 0 0 18px rgba(67, 217, 192, 0.15); }
.st-time.won b { color: var(--accent-2); }

.st-vs { font-weight: 800; font-size: 13px; color: var(--muted); letter-spacing: 0.1em; }

.st-flag { font-size: 14px; font-weight: 700; color: var(--muted); }
.st-flag.bad { color: var(--danger); }

.st-tapbtn {
  position: absolute;
  inset: 0;
  z-index: 5;
  border: none;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  touch-action: manipulation;
}

.hol-abtn.picked.up .hol-abtn-arrow, .hol-abtn.picked.down .hol-abtn-arrow { color: var(--text); }

.pulse { animation: pulse 1.6s ease-in-out infinite; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

.spin {
  width: 26px;
  height: 26px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 30px auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error-panel { text-align: center; padding: 60px 20px; }
.error-panel h2 { margin-bottom: 10px; }
.error-panel p { color: var(--muted); margin-bottom: 22px; }
