@font-face { font-family: 'VT323'; src: url('./vt323.woff2') format('woff2'); font-display: swap; }

:root { --phosphor: #6cffb2; --term-bg: rgba(3, 9, 6, 0.88); --term-line: rgba(108, 255, 178, 0.42); --tilt-x: 0deg; --tilt-y: 0deg; --glare-x: 50%; --glare-y: 30%; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { min-height: 100svh; overflow-x: hidden; font-family: 'Trebuchet MS', Verdana, sans-serif; color: #fff; display: flex; flex-direction: column; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--phosphor); outline-offset: 4px; }

.fx, .ambient { position: fixed; inset: 0; pointer-events: none; }
.fx { width: 100%; height: 100%; z-index: 0; }
.ambient { z-index: 1; overflow: hidden; }

/* ---------- layout ---------- */
.top { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(14px, env(safe-area-inset-top)) clamp(14px, 3vw, 32px) 0; }
.brand img { height: clamp(40px, 6vw, 58px); width: auto; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.35)); transition: transform 0.2s; }
.brand:hover img { transform: rotate(-3deg) scale(1.04); }
.stage { position: relative; z-index: 4; flex: 1; display: grid; place-items: center; align-content: center; gap: clamp(18px, 3vh, 34px); padding: clamp(14px, 3vh, 34px) clamp(12px, 4vw, 48px); perspective: 1400px; }
.card { margin: 0; width: min(1120px, 92vw, calc((100svh - 230px) * 1.777)); min-width: min(92vw, 340px); outline: none; animation: toss 1.1s cubic-bezier(0.18, 1.25, 0.4, 1) both; }
.card-tilt { position: relative; transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y)); transform-style: preserve-3d; transition: transform 0.25s ease-out; animation: float 6s ease-in-out 1.2s infinite alternate; }
.card-art { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 2px 0 rgba(255, 255, 255, 0.25) inset, 0 30px 60px rgba(0, 0, 0, 0.5), 0 10px 18px rgba(0, 0, 0, 0.35); }
.card-glare { position: absolute; inset: 0; border-radius: 10px; background: radial-gradient(circle at var(--glare-x) var(--glare-y), rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 45%); mix-blend-mode: soft-light; pointer-events: none; }
@keyframes toss { from { opacity: 0; transform: translateY(60px) rotate(-6deg) scale(0.9); } }
@keyframes float { from { translate: 0 0; } to { translate: 0 -8px; } }

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; animation: rise 0.6s 0.8s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.chip, .btn, .status { display: inline-flex; align-items: center; gap: 10px; font: 400 22px/1 'VT323', ui-monospace, monospace; letter-spacing: 0.08em; color: var(--phosphor); text-decoration: none; background: var(--term-bg); border: 2px solid #0f2a1c; box-shadow: inset 0 0 0 1px var(--term-line), 0 6px 18px rgba(0, 0, 0, 0.45); border-radius: 8px; padding: 9px 16px; }
.chip { font-size: 19px; padding: 7px 12px; }
.chip:hover, .btn:hover { box-shadow: inset 0 0 0 2px var(--phosphor), 0 0 18px rgba(108, 255, 178, 0.35); }
.btn--go { font-size: clamp(26px, 3.4vw, 36px); padding: 12px 26px; letter-spacing: 0.16em; box-shadow: inset 0 0 0 2px var(--phosphor), 0 0 26px rgba(108, 255, 178, 0.3); text-shadow: 0 0 10px rgba(108, 255, 178, 0.7); }
.btn--go:hover { background: var(--phosphor); color: #031008; text-shadow: none; }
.btn--go::before { content: '\25B6'; font-size: 0.7em; animation: blink 1s steps(2) infinite; }
.status .cursor { display: inline-block; width: 0.55em; height: 1em; background: var(--phosphor); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.foot { position: relative; z-index: 5; text-align: center; padding: 0 16px max(16px, env(safe-area-inset-bottom)); }
.foot span { font: 400 16px/1 'VT323', monospace; letter-spacing: 0.14em; text-transform: uppercase; color: var(--phosphor); background: var(--term-bg); padding: 4px 10px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--term-line); }

/* ---------- Bear Island: golden San Oso afternoon, bunting and sun rays ---------- */
.theme-bear { background: linear-gradient(180deg, #5DB7EC 0%, #9AD6F2 45%, #FFE2A6 100%); }
.theme-bear .ambient::before { content: ''; position: absolute; left: 50%; top: -60vmax; width: 140vmax; height: 140vmax; margin-left: -70vmax; background: repeating-conic-gradient(from 0deg, rgba(255, 244, 196, 0.28) 0 8deg, rgba(255, 244, 196, 0) 8deg 20deg); animation: spin 120s linear infinite; }
.bunting { position: absolute; left: -5%; right: -5%; height: 70px; display: flex; justify-content: space-around; transform-origin: center top; animation: sway 5s ease-in-out infinite alternate; }
.bunting::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 40px; border-top: 2px solid rgba(60, 40, 30, 0.6); border-radius: 50% 50% 0 0 / 100% 100% 0 0; transform: scaleY(-1); }
.bunting i { width: 26px; height: 32px; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.bunting i:nth-child(5n + 1) { background: #E8456B; }
.bunting i:nth-child(5n + 2) { background: #FFC93C; }
.bunting i:nth-child(5n + 3) { background: #2A9D8F; }
.bunting i:nth-child(5n + 4) { background: #7E5BD8; }
.bunting i:nth-child(5n + 5) { background: #F26B21; }
.bunting--1 { top: 9vh; }
.bunting--2 { top: 23vh; opacity: 0.7; animation-duration: 6.5s; transform: scale(0.8); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sway { from { rotate: -1deg; } to { rotate: 1deg; } }

/* ---------- Night Watch: rain, sodium light, the odd flash ---------- */
.theme-night { background: radial-gradient(ellipse at 70% 10%, #1B2550 0%, #0A0F22 55%, #04060F 100%); }
.theme-night .ambient::before { content: ''; position: absolute; left: 6%; top: 30%; width: 40vmax; height: 40vmax; background: radial-gradient(circle, rgba(255, 176, 64, 0.22), rgba(255, 176, 64, 0) 60%); animation: buzz 4s steps(1) infinite; }
.theme-night .ambient::after { content: ''; position: absolute; inset: 0; background: #CFE0FF; opacity: 0; animation: flash 11s infinite; }
@keyframes buzz { 0%, 100% { opacity: 1; } 47% { opacity: 0.55; } 48% { opacity: 1; } 49% { opacity: 0.6; } }
@keyframes flash { 0%, 88%, 92%, 100% { opacity: 0; } 89% { opacity: 0.22; } 90% { opacity: 0.04; } 91% { opacity: 0.16; } }

/* ---------- Camp Kit: crayon paper, doodles drawing themselves ---------- */
.theme-camp { background-color: #F4E8CC; background-image: radial-gradient(rgba(120, 90, 50, 0.08) 1px, transparent 1.4px), radial-gradient(ellipse at 50% 40%, #FBF3DF, #EBDAB4 100%); background-size: 6px 6px, 100% 100%; color: #1E1A18; }
.doodles { position: absolute; inset: 0; width: 100%; height: 100%; }
.doodles path, .doodles circle { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 7; stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 3.5s ease-out forwards, wiggle 0.6s steps(2) 3.5s infinite; }
.doodles :nth-child(2) { animation-delay: 0.5s, 4s; }
.doodles :nth-child(3) { animation-delay: 1s, 4.5s; }
.doodles :nth-child(4) { animation-delay: 1.5s, 5s; }
.doodles :nth-child(5) { animation-delay: 2s, 5.5s; }
.doodles :nth-child(6) { animation-delay: 2.5s, 6s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes wiggle { 50% { transform: translate(0.6px, -0.6px); } }

@media (max-width: 640px) {
  .chip { font-size: 16px; }
  .card { width: 94vw; }
  .bunting i { width: 18px; height: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .doodles path, .doodles circle { stroke-dashoffset: 0; }
}
