/* Solaris Reels: deep midnight blue with sunset amber and copper */
:root {
  --night-0: #04061a;
  --night-1: #070b24;
  --night-2: #0e1440;
  --night-3: #1a2260;
  --night-4: #2c3688;
  --amber: #ffb347;
  --amber-soft: #ffcf7a;
  --sunset: #ff7a3d;
  --copper: #c8703a;
  --copper-dark: #7a3b14;
  --star: #f4f1ff;
  --haze: #a9b0d9;
  --alert: #ff6b6b;
  --round: 18px;
  --display: "Century Gothic", "Futura", "Trebuchet MS", "Segoe UI", sans-serif;
  --text: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  font: 16px/1.5 var(--text);
  color: var(--star);
  background-color: var(--night-1);
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 62%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 44% 9%, #ffe3b0 50%, transparent 51%),
    radial-gradient(1px 1px at 61% 41%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 77% 76%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 89% 23%, #ffe3b0 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 88%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 52% 93%, #fff 50%, transparent 51%),
    radial-gradient(900px 500px at 85% -5%, rgba(255, 122, 61, .28), transparent 70%),
    radial-gradient(800px 600px at 0% 100%, rgba(44, 54, 136, .55), transparent 70%),
    linear-gradient(180deg, var(--night-2), var(--night-0));
  background-attachment: fixed;
}
body:has(dialog[open]) { overflow: hidden; }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 3px solid var(--star); outline-offset: 3px; }
h1, h2, h3, legend { font-family: var(--display); letter-spacing: .06em; }
ul { list-style: none; padding: 0; }
.artboard { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nojs { padding: 16px; text-align: center; background: var(--amber); color: var(--night-1); }

.shell { width: min(1160px, 100%); margin: 0 auto; padding: 0 16px 28px; }
.is-gated .shell { filter: blur(16px) saturate(.6); pointer-events: none; }

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 10px; }
.wordmark { display: flex; align-items: center; gap: 10px; }
.wordmark-icon { width: 42px; height: 42px; }
.wordmark-text { font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: .3em; white-space: nowrap; }
.wordmark-text span { color: var(--amber); }
.topbar-chips { display: flex; align-items: center; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 12px;
  background: rgba(26, 34, 96, .75); border: 1px solid var(--night-4); font-size: .85rem; font-weight: 700; white-space: nowrap;
}
.chip svg { width: 16px; height: 16px; color: var(--amber); }
.chip-clock span { font-variant-numeric: tabular-nums; font-size: 1rem; }
.chip-btn:hover { border-color: var(--amber); }
.chip-safe { background: linear-gradient(135deg, var(--amber), var(--sunset)); color: var(--night-1); border-color: var(--amber-soft); }
.chip-age { border-color: var(--alert); color: #fff; background: rgba(255, 107, 107, .16); padding: 0 10px; }

/* Disclaimer */
.notice {
  border-radius: 12px; padding: 10px 18px; background: var(--amber); color: #170b00;
  border: 2px solid #fff3d6; box-shadow: 0 0 0 3px rgba(255, 179, 71, .25);
}
.notice p { font-size: .82rem; line-height: 1.4; }
.notice b { font-weight: 800; }

/* Main layout */
.orbit { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; margin-top: 16px; justify-content: center; }
.viewport { justify-self: end; width: min(100%, max(300px, calc((100vh - 265px) * 1.6))); }
.bay-frame {
  position: relative; padding: 12px; border-radius: 26px;
  background: linear-gradient(160deg, var(--night-3), var(--night-1));
  border: 2px solid var(--copper);
  box-shadow: 0 0 0 5px rgba(200, 112, 58, .18), 0 0 60px rgba(255, 122, 61, .22), inset 0 0 30px rgba(0, 0, 0, .6);
}
.bay { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.column {
  position: relative; aspect-ratio: 5 / 14; overflow: hidden; border-radius: 999px;
  background: radial-gradient(ellipse at 50% 50%, #1d2a78, #060920 85%);
  box-shadow: inset 0 0 0 1px rgba(169, 176, 217, .25), inset 0 12px 18px rgba(0, 0, 0, .55), inset 0 -12px 18px rgba(0, 0, 0, .55);
}
.tape { position: absolute; inset: 0 auto auto 0; width: 100%; height: 100%; display: flex; flex-direction: column; }
.slot { flex: 1 1 0; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 7% 12%; border-radius: 50%; transition: opacity .25s, transform .25s; }
.slot svg { width: 100%; height: 100%; }
.column.is-moving .tape { filter: blur(1.5px) brightness(1.15); }
.bay.is-lit .slot { opacity: .3; }
.bay.is-lit .slot.is-hit { opacity: 1; transform: scale(1.08); animation: sol-glow 1.1s ease-in-out infinite alternate; }
@keyframes sol-glow { from { filter: drop-shadow(0 0 2px var(--amber)); } to { filter: drop-shadow(0 0 12px var(--sunset)); } }
.rays { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); pointer-events: none; }
.rays polyline { fill: none; stroke-width: 3; stroke-dasharray: 10 6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; animation: sol-dash 1s linear infinite; }
@keyframes sol-dash { to { stroke-dashoffset: -16; } }

.ticker { margin-top: 12px; padding: 10px 16px; border-radius: 12px; text-align: center; background: rgba(4, 6, 26, .7); border: 1px solid var(--night-4); min-height: 46px; }
.ticker[data-tone="win"] { border-color: var(--amber); color: var(--amber-soft); font-weight: 700; }
.ticker[data-tone="alert"] { border-color: var(--alert); color: #ffd0d0; }
.ledger { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; justify-content: center; }
.ledger button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .8rem; background: rgba(26, 34, 96, .8); border: 1px solid var(--night-4); }
.ledger button[aria-pressed="true"] { border-color: var(--amber); background: var(--night-3); }
.ledger i { width: 10px; height: 10px; border-radius: 50%; background: var(--dot, var(--amber)); }

/* Console */
.console {
  justify-self: start; width: 100%; display: grid; gap: 12px; padding: 16px; border-radius: var(--round);
  background: linear-gradient(180deg, rgba(26, 34, 96, .85), rgba(7, 11, 36, .9)); border: 1px solid var(--night-4);
}
.readout { display: grid; justify-items: center; gap: 2px; padding: 10px; border-radius: 14px; background: var(--night-0); border: 1px solid var(--night-3); }
.readout-label { font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--haze); }
.readout-value { font-family: var(--display); font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--amber-soft); line-height: 1.15; }
.readout-win .readout-value { color: var(--star); }
.stake { border: 1px solid var(--night-3); border-radius: 14px; padding: 8px 12px 12px; min-width: 0; }
.stake legend { font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--haze); padding: 0 6px; }
.stake-chips { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.stake-chips label { position: relative; }
.stake-chips input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.stake-chips span { display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; font-weight: 700; font-size: .9rem; background: var(--night-2); border: 2px dashed var(--night-4); }
.stake-chips input:checked + span { background: radial-gradient(circle at 35% 30%, #fff1c9, var(--amber) 55%, var(--sunset)); color: var(--night-1); border: 2px solid #fff; }
.stake-chips input:focus-visible + span { outline: 3px solid var(--star); outline-offset: 2px; }
.stake-chips input:disabled + span { opacity: .45; }
.stake-total { margin-top: 8px; font-size: .82rem; color: var(--haze); text-align: center; }
.stake-total output { color: var(--star); font-weight: 700; font-size: 1rem; }

.launch {
  display: grid; justify-items: center; padding: 14px; border: 0; border-radius: 999px; color: #1b0c00;
  background: linear-gradient(180deg, #ffe0a0, var(--amber) 40%, var(--sunset));
  box-shadow: 0 6px 0 var(--copper-dark), 0 12px 26px rgba(255, 122, 61, .4); transition: transform .1s, box-shadow .1s;
}
.launch:hover:not(:disabled) { filter: brightness(1.07); }
.launch:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 var(--copper-dark); }
.launch-main { font-family: var(--display); font-size: 1.6rem; font-weight: 700; letter-spacing: .3em; margin-right: -.3em; }
.launch-sub { font-size: .68rem; letter-spacing: .08em; opacity: .75; }
.pill { padding: 9px 16px; border-radius: 999px; background: rgba(26, 34, 96, .8); border: 1px solid var(--night-4); font-weight: 700; font-size: .88rem; }
.pill:hover:not(:disabled) { border-color: var(--amber); }
.pill-go { background: linear-gradient(135deg, var(--amber), var(--sunset)); color: #1b0c00; border-color: var(--amber-soft); }
.pill-warn { background: #8c1f2b; border-color: var(--alert); }
.pill-refill { margin-top: 6px; background: var(--star); color: var(--night-1); border-color: #fff; animation: sol-beat 1.2s ease-in-out infinite; }
@keyframes sol-beat { 50% { transform: scale(1.05); } }
.console-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.console-links .pill { padding: 9px 6px; font-size: .8rem; }

.pause-screen { grid-column: 1 / -1; justify-self: center; width: min(560px, 100%); text-align: center; padding: 36px 22px; border-radius: 26px; background: rgba(7, 11, 36, .9); border: 2px solid var(--copper); }
.pause-screen svg { width: 64px; height: 64px; margin-bottom: 10px; }
.pause-screen h2 { margin-bottom: 10px; }
.pause-left { font-family: var(--display); font-size: 2rem; color: var(--amber); font-variant-numeric: tabular-nums; margin: 10px 0; }
.pause-fine { font-size: .85rem; color: var(--haze); }
.orbit.is-paused .viewport, .orbit.is-paused .console { display: none; }

/* Footer */
.base { margin-top: 34px; padding: 22px; border-radius: var(--round); background: rgba(4, 6, 26, .65); border: 1px solid var(--night-3); font-size: .86rem; color: #d5d9f2; }
.base-cols { display: grid; grid-template-columns: 1.2fr 1.3fr .8fr; gap: 26px; }
.base h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .2em; color: var(--amber); margin-bottom: 10px; }
.base p { margin-bottom: 8px; }
.base address { font-style: normal; }
.lbl { color: var(--haze); }
.base-age { display: flex; align-items: center; gap: 10px; }
.base nav ul { display: grid; gap: 5px; }
.base nav button { background: none; border: 0; padding: 2px 0; text-align: left; color: var(--star); border-bottom: 1px dotted var(--haze); }
.base nav button:hover { color: var(--amber); border-color: var(--amber); }
.base-fine { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--night-3); font-size: .78rem; color: var(--haze); }

/* Modals */
.modal { border: 0; padding: 0; margin: auto; background: none; color: var(--star); width: min(780px, calc(100vw - 24px)); max-width: none; max-height: none; overflow: visible; }
.modal::backdrop { background: rgba(4, 6, 26, .86); }
.modal-gate::backdrop { background: radial-gradient(circle at 70% 10%, rgba(255, 122, 61, .35), transparent 55%), rgba(4, 6, 26, .98); }
.sheet { display: flex; flex-direction: column; max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px); border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, var(--night-3), var(--night-1) 240px); border: 1px solid var(--copper); box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }
.sheet-small, .sheet-gate { max-width: 500px; margin: 0 auto; }
.sheet-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--night-4); }
.sheet-bar h2 { font-size: 1.05rem; text-transform: uppercase; color: var(--amber-soft); }
.sheet-close { padding: 6px 14px; border-radius: 999px; background: transparent; border: 1px solid var(--haze); font-size: .8rem; font-weight: 700; }
.sheet-close:hover { border-color: var(--amber); color: var(--amber); }
.sheet-body { padding: 18px 20px 22px; overflow-y: auto; overscroll-behavior: contain; }
.sheet-body h3 { font-size: .9rem; text-transform: uppercase; color: var(--amber); margin: 20px 0 8px; }
.sheet-body p { margin-bottom: 10px; }
.sheet-body ul { list-style: disc; padding-left: 20px; margin-bottom: 10px; }
.sheet-body li { margin-bottom: 5px; }
.intro { color: #d5d9f2; }
.prose { font-size: .93rem; }
code { font-family: Consolas, Menlo, monospace; font-size: .86em; color: var(--amber-soft); overflow-wrap: anywhere; }

.sheet-gate { padding: 30px 24px 22px; align-items: center; text-align: center; gap: 12px; overflow-y: auto; }
.gate-icon { width: 78px; height: 78px; flex: none; }
.sheet-gate h2 { font-size: 1.4rem; text-transform: uppercase; }
.sheet-gate .pill { width: 100%; padding: 13px 16px; font-size: 1rem; }
.gate-note { font-size: .78rem; color: var(--haze); }

.pay-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.pay-card { display: grid; grid-template-columns: 62px 1fr; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 16px; background: rgba(4, 6, 26, .6); border: 1px solid var(--night-4); }
.pay-card svg { width: 62px; height: 62px; }
.pay-card h4 { font-size: .85rem; margin-bottom: 4px; }
.pay-card dl { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; font-size: .88rem; }
.pay-card dt { color: var(--haze); }
.pay-card dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--amber-soft); }
.wild-box { display: grid; grid-template-columns: 70px 1fr; gap: 14px; align-items: center; padding: 12px; border-radius: 16px; border: 1px dashed var(--amber); }
.wild-box svg { width: 70px; height: 70px; }
.wild-box p { margin: 0; }
.line-maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.line-map { text-align: center; font-size: .72rem; color: var(--haze); }
.line-map svg { display: block; width: 100%; height: auto; margin-bottom: 2px; background: var(--night-0); border-radius: 6px; border: 1px solid var(--night-4); }

.visit { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.visit div { display: grid; gap: 2px; padding: 10px 6px; text-align: center; border-radius: 12px; background: var(--night-0); border: 1px solid var(--night-3); }
.visit span { font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; color: var(--haze); }
.visit b { font-family: var(--display); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.card { padding: 4px 16px 14px; margin-bottom: 12px; border-radius: 16px; background: rgba(4, 6, 26, .5); border: 1px solid var(--night-4); }
.card h3 { margin-top: 14px; }
.card p { font-size: .9rem; }
.field { display: inline-flex; flex-direction: column; gap: 4px; font-size: .8rem; color: var(--haze); }
.field input, .field select { padding: 9px 12px; border-radius: 10px; background: var(--night-0); border: 1px solid var(--night-4); color: var(--star); min-width: 11em; }
.field-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.note { min-height: 1.3em; margin: 10px 0 0 !important; font-size: .86rem !important; color: var(--amber-soft); }
.note[data-bad="true"] { color: #ffb3b3; }
.confirm { margin-top: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--alert); background: rgba(140, 31, 43, .25); }
.lines { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .9rem; }
.lines dt { color: var(--amber-soft); font-weight: 700; }
.lines dd { margin: 0; }
.lines b { white-space: nowrap; }
.keys { display: grid; grid-template-columns: minmax(0, auto) 1fr; gap: 6px 14px; margin-bottom: 12px; }
.keys dd { margin: 0; }

.farewell { min-height: 100vh; display: grid; place-content: center; text-align: center; gap: 10px; padding: 24px; }

/* Responsive */
@media (max-width: 920px) {
  .orbit { grid-template-columns: minmax(0, 1fr); }
  .viewport, .console { justify-self: center; }
  .console { max-width: 560px; grid-template-columns: 1fr 1fr; }
  .launch { grid-column: 1 / -1; grid-row: 1; }
  .stake { grid-column: 1 / -1; grid-row: 2; }
  .console-links { grid-column: 1 / -1; }
  .stake-chips span { aspect-ratio: auto; height: 40px; border-radius: 12px; }
  .base-cols { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 600px) {
  .shell { padding: 0 10px 22px; }
  .topbar { padding: 8px 0; gap: 6px; }
  .wordmark-icon { width: 30px; height: 30px; }
  .wordmark-text { font-size: .82rem; letter-spacing: .14em; }
  .topbar-chips { gap: 5px; }
  .chip { height: 32px; padding: 0 9px; font-size: .74rem; border-radius: 10px; }
  .topbar .chip-age { display: none; }
  .chip-clock svg { display: none; }
  .notice { padding: 7px 10px; }
  .notice p { font-size: .68rem; line-height: 1.32; }
  .orbit { margin-top: 10px; gap: 10px; }
  .bay-frame { padding: 7px; border-radius: 18px; }
  .bay { gap: 4px; }
  .rays { inset: 7px; width: calc(100% - 14px); height: calc(100% - 14px); }
  .ticker { margin-top: 8px; padding: 8px 10px; font-size: .88rem; }
  .console { padding: 10px; gap: 8px; }
  .launch { padding: 10px; }
  .launch-sub { display: none; }
  .readout-value { font-size: 1.4rem; }
  .visit { grid-template-columns: repeat(2, 1fr); }
  .sheet-body { padding: 14px; }
  .sheet-bar { padding: 12px 14px; }
  .lines, .keys { grid-template-columns: 1fr; gap: 2px; }
  .lines dd, .keys dd { margin-bottom: 8px; }
  .base { padding: 16px; }
}
@media (max-width: 400px) {
  .topbar { flex-wrap: wrap; justify-content: center; }
  .wordmark-text { font-size: .74rem; letter-spacing: .08em; }
  .chip { padding: 0 7px; font-size: .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
