.slick { max-width: 72rem; }
#app.slick .bar h1 { font-size: var(--step-2); }

.bar { display: flex; align-items: baseline; gap: 0.25rem 1rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.bar h1 { margin: 0; font-size: 1.6rem; letter-spacing: -0.02em; flex: 1; }
.bar .crumb { font: 0.8rem var(--font-mono); color: var(--ink-soft); width: 100%; }
.room { font-family: var(--font-mono); font-size: 0.85rem; display: flex; align-items: center; gap: 0.5rem; }
.room .label { color: var(--ink-soft); }
.room .code { font-size: 1.15rem; letter-spacing: 0.12em; }

.hud { margin-bottom: 0.5rem; }
.share { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--rule); }
.share .ours { background: #e4572e; transition: width 0.3s; }
.share .theirs { background: #2e86ab; transition: width 0.3s; margin-left: auto; }
.hud-text { margin: 0.35rem 0 0; font: 0.8rem var(--font-mono); color: var(--ink-soft); min-height: 1.3em; }

.layout { display: grid; gap: 1.25rem; }
@media (min-width: 60rem) { .layout { grid-template-columns: 1fr 15rem; } }

.stage { position: relative; height: max(20rem, calc(100dvh - 12rem)); border-radius: 8px; overflow: hidden; border: 1px solid var(--rule); }
.world { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }

.count {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  font-size: 4rem; font-weight: 700; color: var(--ink); text-shadow: 0 0 16px var(--ground);
}
.count[hidden], .toast[hidden], .panel[hidden], .finale[hidden] { display: none; }

/* End of game: the final board stays visible, a banner settles in over it,
   then the results panel fades up (REVEAL_MS in slick.js). */
.finale {
  position: absolute; inset: 0 0 auto; display: grid; justify-items: center; gap: 0.25rem;
  pointer-events: none; text-align: center; padding: 12% 1rem 2rem;
  background: radial-gradient(farthest-side at 50% 30%, color-mix(in srgb, var(--ground) 65%, transparent), transparent);
  animation: finale-in 900ms 500ms ease-out both;
}
.finale strong { font-family: var(--font-display); font-size: clamp(2.5rem, 9vw, 4.5rem); line-height: 1; text-shadow: 0 0 18px var(--ground), 0 0 4px var(--ground); }
.finale.won strong { color: var(--good); }
.finale.lost strong { color: var(--bad); }
.finale span { font-size: 0.95rem; color: var(--ink); text-shadow: 0 0 8px var(--ground); max-width: 22rem; }
@keyframes finale-in { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }
.results-panel:not([hidden]) { animation: results-in 600ms ease-out both; }
@keyframes results-in { from { opacity: 0; transform: translate(-50%, calc(-50% + 1rem)); } to { opacity: 1; transform: translate(-50%, -50%); } }
@media (prefers-reduced-motion: reduce) {
  .finale, .results-panel:not([hidden]) { animation: none; }
}
.toast {
  position: absolute; left: 50%; bottom: 0.75rem; transform: translateX(-50%); margin: 0;
  padding: 0.4rem 0.8rem; border-radius: 6px; background: var(--card); border: 1px solid var(--rule);
  font-size: 0.85rem; white-space: nowrap; max-width: calc(100% - 2rem); overflow: hidden; text-overflow: ellipsis;
}

.panel {
  position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
  width: min(30rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); overflow: auto;
  background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 1.25rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}
.panel h2 { margin: 0 0 0.5rem; }
.rules { padding-left: 1.2rem; margin: 0 0 1rem; font-size: 0.92rem; }
.rules li { margin-bottom: 0.25rem; }
.who { color: var(--ink-soft); font-size: 0.9rem; }
.panel .primary { width: 100%; margin-top: 0.5rem; }
.verdict { font-size: 2rem; }
.verdict.won { color: var(--good); }
.verdict.lost { color: var(--bad); }
.reason { color: var(--ink-soft); margin-top: 0; }
.scores { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.scores td, .scores th { padding: 0.3rem 0.25rem; vertical-align: middle; }
.scores .team-row th { text-align: left; font: 600 0.75rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); padding-top: 0.8rem; border-bottom: 1px solid var(--rule); }
.scores .num { text-align: right; font-family: var(--font-mono); white-space: nowrap; }
.scores .nm small { display: block; color: var(--ink-soft); font-size: 0.75rem; }
.scores .barcell { width: 35%; }
.scores .bar { display: block; height: 8px; border-radius: 4px; min-width: 2px; }
.scores tr.out .nm { opacity: 0.7; }
.swatch { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 50%; vertical-align: middle; }

aside h2 { font: 600 0.75rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; margin: 1rem 0 0.4rem; color: var(--ink-soft); }
.record { margin: 0; font: 0.8rem var(--font-mono); color: var(--ink-soft); }
.roster { list-style: none; margin: 0; padding: 0; }
.roster li { display: flex; gap: 0.5rem; align-items: center; padding: 0.15rem 0; }
.roster li.out { opacity: 0.45; text-decoration: line-through; }
.watchers { font-size: 0.85rem; color: var(--ink-soft); }
.log { list-style: none; margin: 0; padding: 0; font-size: 0.85rem; }
.log li { padding: 0.2rem 0; border-bottom: 1px solid var(--rule); color: var(--ink-soft); }
.hint { font-size: 0.85rem; color: var(--ink-soft); }
