:root {
  color-scheme: dark;
  --base: #08090b;
  --surface: #131519;
  --surface2: #191c21;
  --border: #262a31;
  --strong: #343945;
  --text: #ecedef;
  --muted: #9ca1ab;
  --dim: #686e79;
  --accent: #ff7a3d;
  --soft: #ff9663;
  --ink: #1a0e07;
  --mono: "Geist Mono", monospace;
  font-family: Geist, system-ui, sans-serif;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
::selection {
  background: var(--accent);
  color: var(--ink);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  font-weight: 550;
  letter-spacing: -0.04em;
}
h1 {
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.07;
}
h2 {
  font-size: 32px;
  line-height: 1.15;
}
h3 {
  font-size: 18px;
}
p {
  line-height: 1.65;
}
button {
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.15s;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
svg {
  display: block;
}
button svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.mono {
  font-family: var(--mono);
}
.eyebrow {
  font: 11px var(--mono);
  letter-spacing: 0.12em;
  color: var(--accent);
  display: block;
  margin-bottom: 20px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 11px var(--mono);
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 6px 10px;
  color: var(--muted);
  white-space: nowrap;
}
.pill.accent {
  color: var(--soft);
  background: #ff7a3d12;
  border-color: #ff7a3d38;
}
.status-dot {
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
  display: inline-block;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.035em;
}
.brand-mark {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}
.topbar {
  height: 88px;
  max-width: 1360px;
  margin: auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #1b1e24;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.text-button {
  background: none;
  border: none;
  color: var(--muted);
  padding: 10px 0;
  font-size: 13px;
}
.text-button:hover {
  color: var(--text);
}
.btn {
  height: 44px;
  padding: 0 20px;
  border: 1px solid var(--strong);
  border-radius: 10px;
  background: var(--surface2);
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
}
.btn:hover:not(:disabled) {
  background: #24282f;
  border-color: #4c525e;
}
.btn.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--ink);
  font-weight: 650;
}
.btn.primary:hover:not(:disabled) {
  background: #ff9564;
  border-color: #ff9564;
}
.btn.large {
  height: 50px;
  padding: 0 24px;
  font-size: 15px;
}
.btn.block {
  width: 100%;
}
.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--strong);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.icon-button:hover {
  background: #252a32;
}
input,
select {
  height: 44px;
  border: 1px solid var(--strong);
  border-radius: 8px;
  background: #0e1013;
  color: var(--text);
  padding: 0 13px;
  min-width: 0;
  width: 100%;
}
input::placeholder {
  color: var(--dim);
}
label {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}
form {
  margin: 0;
}
.field {
  margin-bottom: 16px;
}
.form-row {
  display: flex;
  gap: 10px;
}
.form-row input {
  flex: 1;
}
.error-text {
  color: #ff9b8d;
  font-size: 13px;
  margin: 12px 0 0;
}
.avatar {
  position: relative;
  overflow: hidden;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--avatar, #a197c7);
  color: #111317;
  display: grid;
  place-items: center;
  font-weight: 600;
  flex-shrink: 0;
}
.avatar-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--avatar, #a197c7);
}
.avatar.small-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 12px;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
}
.boot {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
}
.boot p {
  color: var(--muted);
}
.landing {
  max-width: 1264px;
  padding: 78px 48px 30px;
  margin: auto;
}
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 66px;
  align-items: center;
  min-height: 410px;
}
.hero h1 {
  margin-bottom: 22px;
  max-width: 570px;
}
.hero h1 span {
  color: var(--accent);
}
.hero-copy > p {
  max-width: 400px;
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 28px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.hero-caption {
  margin-top: 17px;
  color: var(--dim);
  font: 11px var(--mono);
}
.hero-art {
  height: 400px;
  border: 1px solid var(--border);
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  background: #10151b;
}
.hero-art canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.83;
}
.art-label {
  position: absolute;
  top: 20px;
  left: 20px;
  font: 11px var(--mono);
  background: #0b0c0fd9;
  border: 1px solid #ffffff18;
  padding: 9px 12px;
  border-radius: 8px;
  color: #e0dfd6;
}
.art-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, #0b0c0ff5);
  padding: 70px 24px 24px;
}
.art-bottom strong {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.035em;
}
.art-bottom p {
  font: 11px var(--mono);
  margin: 8px 0 0;
  color: #b5b8b9;
}
.map-stamp {
  position: absolute;
  right: 18px;
  bottom: 80px;
  width: 132px;
  height: 92px;
  border: 1px solid #ffffff26;
  border-radius: 8px;
  background: #10151cf0;
  overflow: hidden;
}
.map-stamp svg {
  width: 100%;
  height: 100%;
}
.how-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 68px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  gap: 36px;
}
.how-item {
  display: flex;
  gap: 16px;
}
.step-number {
  font: 12px var(--mono);
  color: var(--accent);
  width: 28px;
  flex-shrink: 0;
  padding-top: 3px;
}
.how-item strong {
  font-weight: 500;
  font-size: 14px;
}
.how-item p {
  font-size: 13px;
  color: var(--dim);
  margin: 7px 0 0;
  line-height: 1.55;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  font: 11px var(--mono);
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid #1b1e24;
  gap: 20px;
}
.auth-panel {
  margin-top: 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 20px;
  max-width: 390px;
}
.auth-panel h3 {
  margin-bottom: 6px;
}
.auth-panel p {
  font-size: 12px;
  color: var(--muted);
}
.dashboard-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
.dashboard-cards .panel {
  padding: 20px;
}
.dashboard-cards h3 {
  margin-bottom: 8px;
}
.dashboard-cards p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.room-page {
  max-width: 1120px;
  margin: auto;
  padding: 48px 48px 40px;
}
.breadcrumb {
  display: flex;
  gap: 10px;
  align-items: center;
  font: 11px var(--mono);
  color: var(--dim);
  margin-bottom: 30px;
}
.room-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 36px;
}
.room-heading h1 {
  font-size: 36px;
  margin-bottom: 10px;
}
.room-heading p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.room-code {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 12px 0 5px;
}
.room-code strong {
  font: 32px var(--mono);
  letter-spacing: 0.15em;
}
.room-invite {
  border-left: 1px solid var(--border);
  padding-left: 36px;
}
.room-invite .eyebrow {
  color: var(--dim);
  margin-bottom: 0;
}
.room-columns {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: start;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-header h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0;
}
.panel-body {
  padding: 24px;
}
.roster {
  padding: 10px 16px;
}
.player-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 8px;
  border-bottom: 1px solid #23262c;
}
.player-row:last-child {
  border-bottom: 0;
}
.player-info {
  flex: 1;
  min-width: 0;
}
.player-info strong {
  font-size: 14px;
  font-weight: 500;
}
.player-info small {
  font-size: 11px;
  color: var(--dim);
  display: block;
  margin-top: 4px;
}
.player-status {
  font: 11px var(--mono);
  color: var(--dim);
}
.player-status.ready {
  color: #b0c6ad;
}
.empty-seat {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--dim);
  font-size: 13px;
  padding: 18px 8px;
}
.empty-seat span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--strong);
  border-radius: 11px;
}
.roster-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.readiness-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.readiness-summary strong {
  font-size: 13px;
  font-weight: 500;
}
.readiness-summary .is-ready {
  color: #b0c6ad;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.setting-row:first-child {
  padding-top: 0;
}
.setting-row:last-child {
  border: 0;
  padding-bottom: 0;
}
.setting-row strong {
  font-size: 13px;
  font-weight: 500;
  display: block;
}
.setting-row small {
  font-size: 11px;
  color: var(--dim);
  display: block;
  margin-top: 5px;
}
.setting-row select {
  width: 116px;
  flex-shrink: 0;
  height: 38px;
  font: 12px var(--mono);
}
.setting-value {
  font: 12px var(--mono);
  color: var(--muted);
}
.notice {
  padding: 17px 18px;
  border: 1px solid #ff7a3d30;
  border-radius: 10px;
  background: #ff7a3d08;
  margin-top: 18px;
}
.notice strong {
  font-size: 13px;
  font-weight: 550;
  color: var(--soft);
}
.notice p {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
  line-height: 1.65;
}
.room-start {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-top: 26px;
}
.room-start p {
  font-size: 12px;
  color: var(--dim);
  margin: 0;
  max-width: 210px;
}
.score-example {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 0;
  gap: 12px;
  font-family: var(--mono);
  font-size: 17px;
}
.score-example small {
  display: block;
  font: 10px var(--mono);
  color: var(--dim);
  margin-top: 6px;
  letter-spacing: 0.03em;
}
.score-example b {
  font-weight: 500;
  color: var(--soft);
}
.game-shell {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #11161b;
}
/* A quiet edge-only warning: no tint over the centre or blocked map controls. */
.game-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  box-shadow:
    inset 0 0 40px 8px rgb(229 148 69 / 24%),
    inset 0 0 100px 20px rgb(229 148 69 / 9%);
  opacity: 0;
  transition: opacity 220ms ease;
}
.game-shell.time-running-out::after {
  opacity: 0.6;
  animation: time-warning-pulse 2.6s ease-in-out infinite;
}
@keyframes time-warning-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.85; }
}
.pano-main {
  position: absolute;
  inset: 0;
}
.demo-scene {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}
.demo-scene:active {
  cursor: grabbing;
}
.game-top-shade {
  position: absolute;
  inset: 0 0 auto;
  height: 160px;
  background: linear-gradient(#07090c99, transparent);
  pointer-events: none;
}
.game-hud {
  position: absolute;
  left: 22px;
  top: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 4;
}
.hud-box {
  background: #0b0c0feb;
  border: 1px solid #ffffff25;
  border-radius: 12px;
  padding: 0 15px;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 18px #0002;
}
.hud-box .brand-mark {
  width: 36px;
  height: 36px;
}
.hud-round {
  font-size: 13px;
}
.hud-round span {
  color: var(--dim);
}
.hud-link {
  font: 11px var(--mono);
  color: var(--muted);
}
.timer {
  font: 16px var(--mono);
  font-weight: 500;
}
.timer.urgent {
  color: #ff9b8d;
}
.hud-help {
  background: #0b0c0feb;
}
.original-panel {
  position: absolute;
  right: 22px;
  top: 22px;
  width: 280px;
  height: 190px;
  border: 1px solid #ffffff38;
  border-radius: 13px;
  background: #101319;
  overflow: hidden;
  z-index: 5;
  box-shadow: 0 8px 30px #0004;
  /* Avoid repeated Street View canvas resizes during expansion/collapse. */
  transition: none;
}
.original-panel.expanded {
  width: min(780px, calc(100vw - 44px));
  height: min(530px, calc(100dvh - 44px));
  z-index: 12;
}
.original-view {
  position: absolute;
  inset: 0;
}
.original-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(#090b0fea, #090b0f99);
  padding: 8px 8px 8px 13px;
  z-index: 1;
}
.original-bar span {
  font: 11px var(--mono);
  letter-spacing: 0.07em;
}
.original-bar button {
  width: 36px;
  height: 36px;
  border-color: #ffffff25;
  background: #11151cc9;
  border-radius: 8px;
}
.original-bar button svg {
  width: 15px;
  height: 15px;
}
.original-foot {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 9px 12px;
  background: #090b0fd9;
  font: 10px var(--mono);
  color: #c2c5c9;
  pointer-events: none;
}
.game-bottom-note {
  position: absolute;
  left: 22px;
  bottom: 23px;
  font: 10px var(--mono);
  color: #ffffffb0;
  text-shadow: 0 1px 3px #000;
  pointer-events: none;
  z-index: 3;
}
.game-shell.live .game-bottom-note {
  left: 82px;
}
.panorama-compass-clearance {
  width: 1px;
  height: 40px;
  pointer-events: none;
}
.map-panel {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: 285px;
  height: 210px;
  border: 1px solid #ffffff35;
  background: #0d1118;
  border-radius: 14px;
  z-index: 7;
  overflow: hidden;
  box-shadow: 0 12px 45px #0006;
  transition:
    width 0.22s,
    height 0.22s;
}
.map-panel.expanded {
  width: min(660px, calc(100vw - 44px));
  height: min(460px, calc(100dvh - 110px));
}
.map-size-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}
.map-size-controls .icon-button {
  font-size: 24px;
}
.map-size-controls #map-size-label {
  font: 10px var(--mono);
  white-space: nowrap;
}
.kick-button {
  color: #ffad92;
  margin-left: 8px;
}
.guess-map {
  position: absolute;
  inset: 0 0 60px;
  background: #10151c;
}
.map-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 14px;
  background: linear-gradient(#0b0e13f5, #0b0e13c9);
  z-index: 2;
  pointer-events: none;
}
.map-header > * {
  pointer-events: auto;
}
.map-header span {
  font: 11px var(--mono);
  color: var(--muted);
}
.map-header .icon-button {
  width: 36px;
  height: 36px;
  background: #10151de8;
  border-color: #ffffff22;
}
.map-header .icon-button svg {
  width: 16px;
  height: 16px;
}
.map-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #0e1117;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-top: 1px solid var(--border);
  z-index: 3;
}
.map-footer .btn {
  height: 40px;
  flex: 1;
  font-size: 12px;
  padding: 0 12px;
}
.map-footer .selection-return {
  font-size: 11px;
  padding: 0 8px;
}
.map-info {
  font: 11px var(--mono);
  color: var(--dim);
  display: none;
  flex: 1;
}
.map-panel.expanded .map-info {
  display: block;
}
.map-panel.expanded .map-footer .btn {
  flex: 0 0 auto;
  min-width: 160px;
}
.map-panel:not(.expanded) .map-collapse {
  transform: rotate(180deg);
}
.final-instruction {
  position: absolute;
  left: 22px;
  top: 84px;
  width: min(390px, calc(100vw - 44px));
  background: #111317f0;
  border: 1px solid #ff7a3d88;
  border-radius: 12px;
  padding: 18px 20px;
  z-index: 4;
  box-shadow: 0 8px 24px #0002;
}
.final-instruction .eyebrow {
  margin-bottom: 9px;
}
.final-instruction h2 {
  font-size: 23px;
  margin-bottom: 9px;
}
.final-instruction p {
  font-size: 13px;
  line-height: 1.6;
  color: #bfc1c7;
  margin-bottom: 0;
}
.final-instruction strong {
  color: var(--text);
  font-weight: 500;
}
.selection-instruction {
  position: absolute;
  top: 84px;
  left: 22px;
  font-size: 13px;
  background: #111317dc;
  border: 1px solid #ffffff21;
  padding: 13px 16px;
  border-radius: 10px;
  color: #d2d3d3;
  max-width: 360px;
  z-index: 3;
}
.scene-loading {
  z-index: 25;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #11161b;
  color: var(--muted);
  gap: 16px;
  padding: 40px;
  text-align: center;
}
.scene-loading h2 {
  color: var(--text);
}
.scene-loading[hidden] {
  display: none;
}
.demo-map {
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}
.demo-map .land {
  fill: #242c31;
  stroke: #3a464e;
  stroke-width: 0.6;
}
.demo-map .grid {
  stroke: #ffffff05;
  stroke-width: 0.4;
}
.demo-map .road {
  stroke: #5a9be7;
  stroke-width: 1.3;
  fill: none;
  pointer-events: stroke;
  cursor: crosshair;
}
.demo-map .road-hit {
  stroke: transparent;
  stroke-width: 12;
  fill: none;
  pointer-events: stroke;
  cursor: crosshair;
}
.demo-map .city-label {
  fill: #a0adb5;
  font: 7px var(--mono);
  pointer-events: none;
}
.demo-map .pin {
  fill: var(--accent);
  stroke: #10151c;
  stroke-width: 2;
  pointer-events: none;
}
.demo-map-note {
  position: absolute;
  right: 5px;
  bottom: 64px;
  font: 9px var(--mono);
  color: #a5afb7;
  background: #10151ddb;
  padding: 4px;
  pointer-events: none;
  z-index: 2;
}
.waiting-layer {
  position: absolute;
  inset: 0;
  background: #08090bc9;
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  z-index: 20;
  padding: 20px;
}
.waiting-layer[hidden] {
  display: none;
}
.waiting-card {
  width: 420px;
  max-width: 100%;
  background: #131519f5;
  border: 1px solid var(--strong);
  border-radius: 20px;
  box-shadow: 0 20px 90px #0005;
  overflow: hidden;
}
.waiting-heading {
  text-align: center;
  padding: 30px 28px 25px;
  border-bottom: 1px solid var(--border);
}
.check-icon {
  width: 48px;
  height: 48px;
  background: #ff7a3d12;
  border: 1px solid #ff7a3d55;
  color: var(--accent);
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 22px;
  margin: 0 auto 18px;
}
.waiting-heading h2 {
  font-size: 24px;
  margin-bottom: 8px;
}
.waiting-heading p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.waiting-progress {
  padding: 22px 24px;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font: 11px var(--mono);
  color: var(--muted);
}
.progress-track {
  height: 4px;
  border-radius: 9px;
  background: #2a2e36;
  margin: 15px 0;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 9px;
  transition: width 0.3s;
}
.reveal-page {
  max-width: 1280px;
  margin: auto;
  padding: 36px 48px;
}
.reveal-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 20px;
}
.reveal-heading h1 {
  font-size: 36px;
  margin-bottom: 8px;
}
.reveal-heading p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.reveal-stage {
  height: 550px;
  position: relative;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: #10151c;
}
.reveal-map {
  position: absolute;
  inset: 0;
}
.reveal-card {
  position: absolute;
  left: 18px;
  top: 18px;
  width: 300px;
  padding: 22px;
  border: 1px solid var(--strong);
  border-radius: 13px;
  background: #0c0f14f2;
  z-index: 2;
}
.reveal-card .eyebrow {
  margin-bottom: 16px;
}
.reveal-card p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 18px;
}
.reveal-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 18px 0;
}
.metric {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}
.metric small {
  display: block;
  font: 9px var(--mono);
  color: var(--dim);
  margin-bottom: 7px;
}
.metric strong {
  font: 16px var(--mono);
}
.delta-line {
  border-top: 1px solid var(--border);
  padding-top: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.delta-line span {
  font-size: 12px;
  color: var(--muted);
}
.delta-line strong {
  font: 20px var(--mono);
  color: var(--soft);
}
.playback {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  background: #0b0f14ed;
  border: 1px solid var(--strong);
  border-radius: 13px;
  z-index: 3;
  white-space: nowrap;
}
.playback .mono {
  font-size: 11px;
  color: var(--muted);
  padding: 0 8px;
}
.chain-tabs {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding-bottom: 4px;
  margin-bottom: 15px;
}
.chain-tab {
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.chain-tab.active {
  color: var(--soft);
  border-color: #ff7a3d70;
  background: #ff7a3d10;
}
.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  margin-top: 24px;
}
.leaderboard-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.leaderboard-row:last-child {
  border: 0;
}
.rank {
  width: 16px;
  color: var(--dim);
  font: 12px var(--mono);
}
.leaderboard-row .name {
  flex: 1;
  font-size: 14px;
}
.leaderboard-row strong {
  font: 14px var(--mono);
  color: var(--soft);
}
.chain-summary {
  padding: 17px 0;
  border-bottom: 1px solid var(--border);
}
.chain-summary:last-child {
  border: 0;
}
.chain-summary strong {
  font-size: 13px;
  font-weight: 500;
}
.chain-summary p {
  font: 11px var(--mono);
  color: var(--dim);
  margin: 7px 0 0;
  line-height: 1.6;
}
.final-results-note {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.help-dialog {
  width: 500px;
  max-width: calc(100vw - 32px);
  padding: 36px;
  border: 1px solid var(--strong);
  border-radius: 18px;
  background: #131519;
  color: var(--text);
  box-shadow: 0 24px 80px #0008;
}
.help-dialog::backdrop {
  background: #08090bd9;
  backdrop-filter: blur(4px);
}
.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
}
.help-dialog h2 {
  font-size: 30px;
}
.help-steps {
  padding-left: 21px;
  line-height: 1.6;
  color: var(--muted);
  font-size: 13px;
}
.help-steps li {
  margin-bottom: 14px;
  padding-left: 7px;
}
.help-steps strong {
  color: var(--text);
  font-weight: 500;
}
.help-dialog > .small {
  margin: 18px 0 0;
}
#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: #1d2129;
  border: 1px solid #454b58;
  padding: 13px 19px;
  border-radius: 11px;
  font-size: 13px;
  z-index: 100;
  box-shadow: 0 8px 30px #0006;
  max-width: calc(100vw - 32px);
  text-align: center;
}
#toast[hidden] {
  display: none;
}
.connection-pill {
  position: fixed;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  z-index: 80;
  border: 1px solid #c59c51;
  background: #30281e;
  color: #ffe0a6;
  padding: 10px 15px;
  border-radius: 10px;
  font-size: 12px;
}
.screen-enter {
  animation: enter 0.22s ease-out;
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
[hidden] {
  display: none !important;
}
.btn svg,
.hud-box > svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.check-icon svg {
  width: 24px;
  height: 24px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.reveal-map .demo-map {
  margin-left: 330px;
  width: calc(100% - 330px);
}
.game-shell.live .original-foot,
.game-shell.live .game-bottom-note {
  display: none;
}

.score-example small,
.original-foot,
.game-bottom-note,
.demo-map-note,
.metric small {
  font-size: 11px;
}
@media (min-width: 1600px) {
  .landing {
    padding-top: 100px;
  }
  .hero-art {
    height: 460px;
  }
  .hero {
    gap: 90px;
  }
  .how-row {
    margin-top: 90px;
  }
}
@media (max-width: 1000px) {
  .hero {
    gap: 35px;
  }
  .hero-art {
    height: 370px;
  }
  .landing {
    padding-top: 50px;
  }
  .game-hud {
    gap: 6px;
  }
  .hud-box {
    padding: 0 10px;
  }
  .hud-link-box {
    display: none;
  }
  .original-panel {
    width: 240px;
    height: 170px;
  }
  .room-page {
    padding: 35px 28px;
  }
  .room-columns {
    gap: 18px;
  }
  .room-invite {
    padding-left: 20px;
  }
  .reveal-page {
    padding: 30px 28px;
  }
}
@media (max-width: 740px) {
  .topbar {
    height: 70px;
    padding: 0 22px;
  }
  .top-actions {
    gap: 14px;
  }
  .top-actions > .pill {
    display: none;
  }
  .landing {
    padding: 38px 22px 24px;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .hero h1 {
    font-size: 49px;
  }
  .hero-copy > p {
    font-size: 15px;
  }
  .hero-art {
    height: 270px;
  }
  .how-row {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-top: 32px;
  }
  .page-footer {
    font-size: 10px;
    margin-top: 30px;
  }
  .hero-caption {
    font-size: 10px;
  }
  .room-page {
    padding: 28px 20px;
  }
  .room-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 24px;
  }
  .room-heading h1 {
    font-size: 32px;
  }
  .room-invite {
    border: 0;
    padding-left: 0;
  }
  .room-code {
    margin-bottom: 0;
  }
  .room-code strong {
    font-size: 28px;
  }
  .room-columns {
    grid-template-columns: 1fr;
  }
  .panel-body {
    padding: 20px;
  }
  .room-start {
    margin-top: 20px;
  }
  .dashboard-cards {
    grid-template-columns: 1fr;
  }
  .game-hud {
    top: 12px;
    left: 12px;
  }
  .hud-box {
    height: 40px;
    padding: 0 9px;
    gap: 8px;
    border-radius: 9px;
  }
  .hud-round {
    font-size: 11px;
  }
  .hud-help {
    width: 40px;
    height: 40px;
  }
  .timer {
    font-size: 14px;
  }
  .original-panel {
    top: 64px;
    right: 12px;
    width: 154px;
    height: 120px;
    border-radius: 10px;
  }
  .original-panel.expanded {
    right: 12px;
    top: 64px;
    width: calc(100vw - 24px);
    height: 55dvh;
  }
  .original-bar {
    padding: 4px 5px 4px 8px;
  }
  .original-bar span {
    font-size: 9px;
  }
  .original-foot {
    font-size: 8px;
    padding: 5px 7px;
  }
  .original-bar button {
    width: 32px;
    height: 32px;
  }
  .map-panel {
    right: 12px;
    bottom: 16px;
    width: calc(100vw - 24px);
    height: 200px;
  }
  .map-panel.expanded {
    width: calc(100vw - 24px);
    height: 48dvh;
    bottom: 16px;
  }
  .map-panel .guess-map {
    inset: 0 0 58px;
  }
  .map-footer {
    height: 58px;
  }
  .map-panel.expanded .map-info {
    font-size: 10px;
  }
  .map-panel.expanded .map-footer .btn {
    min-width: 140px;
    font-size: 12px;
  }
  .game-bottom-note {
    left: 12px;
    bottom: 4px;
    font-size: 8px;
  }
  .selection-instruction {
    top: 66px;
    left: 12px;
    width: calc(100vw - 190px);
    font-size: 11px;
    padding: 10px;
    line-height: 1.5;
  }
  .final-instruction {
    left: 12px;
    top: 64px;
    width: calc(100vw - 190px);
    padding: 12px;
    border-radius: 9px;
  }
  .final-instruction .eyebrow {
    font-size: 9px;
    margin-bottom: 7px;
  }
  .final-instruction h2 {
    font-size: 18px;
    line-height: 1.15;
    margin-bottom: 7px;
  }
  .final-instruction p {
    font-size: 11px;
    line-height: 1.5;
  }
  .waiting-card {
    width: 360px;
  }
  .waiting-heading {
    padding: 24px;
  }
  .reveal-page {
    padding: 26px 18px;
  }
  .reveal-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .reveal-heading h1 {
    font-size: 31px;
  }
  .reveal-stage {
    height: 660px;
  }
  .reveal-card {
    left: 12px;
    top: auto;
    bottom: 87px;
    width: calc(100% - 24px);
    padding: 16px;
  }
  .reveal-card .eyebrow {
    margin-bottom: 10px;
  }
  .reveal-card p {
    margin-bottom: 10px;
  }
  .reveal-metrics {
    margin: 12px 0;
  }
  .reveal-card .user-chip {
    position: absolute;
    right: 16px;
    top: 13px;
  }
  .playback {
    bottom: 14px;
  }
  .playback .btn {
    padding: 0 12px;
  }
  .playback .mono {
    padding: 0 2px;
  }
  .summary-grid {
    grid-template-columns: 1fr;
  }
  .help-dialog {
    padding: 28px;
  }
  .page-footer span:last-child {
    text-align: right;
  }
}
@media (max-width: 740px) {
  .reveal-map .demo-map {
    margin-left: 0;
    width: 100%;
    height: 45%;
  }
  .top-actions {
    gap: 12px;
  }
  .top-actions .text-button {
    white-space: nowrap;
  }
  .top-actions .user-chip > span:last-child {
    display: none;
  }
  .topbar .brand {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Four map sizes, anchored at the bottom-right. Keep space for left controls. */
.map-panel[data-map-size="0"] {
  width: min(320px, calc(100vw - 24px));
  height: 230px;
}
.map-panel[data-map-size="1"] {
  width: min(580px, calc(100vw - 100px));
  height: min(440px, 52dvh);
}
.map-panel[data-map-size="2"] {
  width: min(1000px, calc(100vw - 100px));
  height: min(700px, 72dvh);
}
.map-panel[data-map-size="3"] {
  width: calc(100vw - 110px);
  height: calc(100dvh - 110px);
}
.map-panel[data-map-size="3"] {
  z-index: 10;
}
.reveal-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(320px, 1fr);
  grid-template-rows: auto minmax(240px, 1fr) 72px;
  height: clamp(620px, 68vh, 740px);
  gap: 1px;
  background: var(--border);
}
.reveal-stage .reveal-card {
  position: relative;
  inset: auto;
  grid-column: 2;
  grid-row: 1;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 24px;
  border: 0;
  border-radius: 0;
  background: #10151c;
  overflow-wrap: anywhere;
}
.reveal-card .notice {
  margin: 16px 0 0;
  padding: 14px 0 0;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: none;
}
.reveal-card .notice p {
  margin-bottom: 0;
}
.reveal-card .metric {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}
.reveal-card .delta-line strong {
  font-size: 32px;
}
.reveal-card .user-chip {
  position: static;
  max-width: 100%;
}
.reveal-stage .reveal-map {
  position: relative;
  inset: auto;
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}
.reveal-panorama-panel {
  position: relative;
  grid-column: 1;
  grid-row: 1 / 3;
  overflow: hidden;
  min-width: 0;
  background: #10151c;
}
.reveal-panorama {
  position: absolute;
  inset: 0;
}
.reveal-panorama-panel.loading .reveal-panorama {
  opacity: 0;
  pointer-events: none;
}
.reveal-panorama-status {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}
.reveal-panorama-status[hidden] {
  display: none;
}
.reveal-stage .playback {
  position: relative;
  inset: auto;
  transform: none;
  grid-column: 1 / -1;
  grid-row: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  padding: 12px 24px;
  border: 0;
  border-radius: 0;
  background: #0c1016;
}
.playback-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  grid-column: 2;
}
.playback .mono {
  grid-column: 1;
  grid-row: 1;
  padding: 0;
}
.reveal-map .demo-map {
  margin: 0;
  width: 100%;
  height: 100%;
}
@media (max-width: 740px) {
  .map-panel[data-map-size="0"] {
    height: 200px;
    width: calc(100vw - 24px);
  }
  .panorama-compass-clearance {
    height: 220px;
  }
  .map-panel[data-map-size="1"] {
    height: 40dvh;
    width: calc(100vw - 84px);
  }
  .map-panel[data-map-size="2"] {
    height: 60dvh;
    width: calc(100vw - 84px);
  }
  .map-panel[data-map-size="3"] {
    height: calc(100dvh - 100px);
    width: calc(100vw - 84px);
  }
  .map-panel .map-header {
    padding-left: 8px;
  }
  .map-panel .map-header > span {
    font-size: 9px;
  }
  .map-panel .map-footer .btn {
    min-width: 0;
    font-size: 11px;
    padding: 0 10px;
  }
  .map-panel.expanded .map-info {
    display: none;
  }
  .kick-button {
    margin-left: 0;
    font-size: 11px;
  }
}
@media (max-width: 960px) {
  .reveal-stage {
    height: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: clamp(260px, 45vw, 420px) auto 280px auto;
  }
  .reveal-panorama-panel {
    grid-column: 1;
    grid-row: 1;
  }
  .reveal-stage .reveal-card {
    grid-column: 1;
    grid-row: 2;
    padding: 20px;
  }
  .reveal-stage .reveal-map {
    grid-column: 1;
    grid-row: 3;
  }
  .reveal-stage .playback {
    grid-row: 4;
  }
}
@media (max-width: 480px) {
  .reveal-stage .playback {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }
  .playback .mono {
    order: 2;
  }
}
