/* GIque visitor page. Navy + gold, system fonts only, no external requests. */
:root {
  --navy: #0b1220;
  --navy2: #16213e;
  --gold: #d9b65a;
  --gold2: #f1d78a;
  --ink: #eef2ff;
  --muted: rgba(238, 242, 255, .72);
  --frame: var(--gold);
  --num: var(--gold2);
  --glow: rgba(217, 182, 90, .16);
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html {
  min-height: 100%;
  background:
    radial-gradient(120% 55% at 50% -10%, var(--glow), transparent 60%),
    linear-gradient(180deg, var(--navy), var(--navy2)) var(--navy2);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  -webkit-text-size-adjust: 100%;
}
/* Called/missed gradients start at the dark end of the family so white body
   copy and the small label clear WCAG AA (4.5:1) on the upper screen. */
html.mode-called {
  --frame: #fff; --num: #fff; --muted: rgba(255, 255, 255, .85); --glow: rgba(255, 255, 255, .06);
  background:
    radial-gradient(120% 55% at 50% -10%, var(--glow), transparent 60%),
    linear-gradient(180deg, #14713c, #0f5a30) #0f5a30;
}
html.mode-missed {
  --frame: #fff; --num: #fff; --muted: rgba(255, 255, 255, .85); --glow: rgba(255, 255, 255, .06);
  background:
    radial-gradient(120% 55% at 50% -10%, var(--glow), transparent 60%),
    linear-gradient(180deg, #8a5209, #5e3806) #5e3806;
}

body { min-height: 100vh; min-height: 100svh; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--gold2); outline-offset: 3px; }
.mode-called :focus-visible, .mode-missed :focus-visible { outline-color: #fff; }

/* Layout */
.app {
  display: flex; flex-direction: column;
  max-width: 30rem; margin: 0 auto;
  min-height: 100vh; min-height: 100svh;
  padding: calc(env(safe-area-inset-top, 0px) + 4rem) 1.25rem calc(env(safe-area-inset-bottom, 0px) + 2.75rem);
}
.screen { display: flex; flex: 1; flex-direction: column; gap: 1rem; }
.center { text-align: center; }
.push { margin-top: auto; }

.brand {
  text-align: center;
  font: 600 .72rem/1 var(--sans); letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.5rem;
}
.mode-join .brand, .mode-boot .brand { display: none; }

/* Language toggle */
.lang {
  position: fixed; z-index: 5;
  top: calc(env(safe-area-inset-top, 0px) + .75rem); right: .75rem;
  display: flex; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px;
  background: rgba(0, 0, 0, .18);
  font: 600 .8rem/1 var(--sans); letter-spacing: .1em;
}
.lang button {
  min-width: 48px; min-height: 44px; padding: 0 .75rem;
  border: 0; background: none; color: var(--muted); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lang button + button { border-left: 1px solid rgba(255, 255, 255, .3); }
.lang button.on { background: var(--gold); color: var(--navy); }
.mode-called .lang button.on, .mode-missed .lang button.on { background: #fff; }

/* Join hero */
.hero { text-align: center; padding-top: .5rem; }
.logo { display: block; max-width: 60%; max-height: 96px; height: auto; margin: 0 auto .9rem; }
.eyebrow {
  font: 600 .8rem/1 var(--sans); letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold);
}
h1 { font: 400 2.5rem/1.1 var(--serif); color: var(--gold2); letter-spacing: .02em; margin-top: .55rem; }

/* Diamond rule ornament */
.rule { display: flex; align-items: center; gap: .55rem; width: min(100%, 18rem); margin: .9rem auto; }
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--frame)); }
.rule::after { background: linear-gradient(90deg, var(--frame), transparent); }
.rule span { width: 7px; height: 7px; background: var(--frame); transform: rotate(45deg); }

/* Text roles */
.live { text-align: center; font: 400 1.3rem/1.35 var(--serif); min-height: 1.8rem; margin: .25rem 0; }
.lead { font-size: 1.1rem; text-align: center; }
.hint { font-size: .9rem; color: var(--muted); text-align: center; }
.label { font: 600 .72rem/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--muted); }
.notice {
  text-align: center; font-size: .95rem; color: var(--gold2);
  border: 1px solid rgba(217, 182, 90, .45); border-radius: .5rem; padding: .6rem .8rem;
}
.note {
  text-align: center; font-weight: 600; color: var(--navy);
  background: var(--gold2); border-radius: .5rem; padding: .65rem .8rem;
}

/* Ticket frame: corner brackets + diamond finials, like an in-game menu panel */
.ticket {
  position: relative; text-align: center;
  margin: .5rem 0; padding: 1.6rem 1rem 1.4rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  background:
    linear-gradient(var(--frame), var(--frame)) 0 0 / 24px 2px,
    linear-gradient(var(--frame), var(--frame)) 0 0 / 2px 24px,
    linear-gradient(var(--frame), var(--frame)) 100% 0 / 24px 2px,
    linear-gradient(var(--frame), var(--frame)) 100% 0 / 2px 24px,
    linear-gradient(var(--frame), var(--frame)) 0 100% / 24px 2px,
    linear-gradient(var(--frame), var(--frame)) 0 100% / 2px 24px,
    linear-gradient(var(--frame), var(--frame)) 100% 100% / 24px 2px,
    linear-gradient(var(--frame), var(--frame)) 100% 100% / 2px 24px;
  background-repeat: no-repeat;
}
.ticket::before, .ticket::after {
  content: ""; position: absolute; left: 50%;
  width: 11px; height: 11px; margin-left: -5.5px;
  background: var(--frame); transform: rotate(45deg);
}
.ticket::before { top: -5.5px; }
.ticket::after { bottom: -5.5px; }
.num {
  font: 700 clamp(96px, 32vw, 150px)/1 var(--serif);
  color: var(--num); letter-spacing: .04em; margin: .35rem 0 .2rem;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 30px rgba(241, 215, 138, .35);
}
.ahead { font: 400 1.25rem/1.3 var(--serif); }

.est-label { text-align: center; color: var(--muted); margin-top: .25rem; }
.est-time { text-align: center; font: 400 2.8rem/1.1 var(--serif); color: var(--gold2); font-variant-numeric: tabular-nums; }

.huge { font: 700 clamp(2.4rem, 12vw, 3.6rem)/1.05 var(--serif); color: #fff; text-align: center; margin-top: .75rem; }
.huge:focus { outline: none; }
.mode-called .huge { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }

/* Buttons */
.btn {
  display: block; width: 100%; min-height: 64px; padding: .8rem 1rem;
  border: 0; border-radius: 999px; cursor: pointer;
  font: 700 1.3rem/1.2 var(--sans); letter-spacing: .02em;
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease, opacity .2s ease;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: default; box-shadow: none; }
.btn-primary { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: var(--navy); box-shadow: 0 10px 30px rgba(217, 182, 90, .28); }
.btn-light { background: #fff; color: #7a4606; box-shadow: 0 10px 30px rgba(0, 0, 0, .22); }

.foot { text-align: center; margin-top: auto; padding-top: .5rem; }
.foot a { display: inline-block; padding: .75rem 1rem; color: var(--muted); font-size: .95rem; text-decoration: underline; text-underline-offset: 3px; }

/* Connection line */
.reconnect {
  position: fixed; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + .5rem);
  text-align: center; font-size: .8rem; color: var(--muted); pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
