@font-face {
  font-family: Inter;
  src: url('assets/inter-latin-ext.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02FF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: Inter;
  src: url('assets/inter-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face { font-family: Barlow Display; src: url('assets/barlow-021.woff2') format('woff2'); font-weight: 800; font-display: swap }
:root {
  color-scheme: dark;
  --ground: #101417;
  --rail: #1a2025;
  --panel: #22292f;
  --stroke: #394148;
  --text: #f3f3ed;
  --muted: #b2bbbf;
  --gold: #ffd16e;
  --navy: #172128;
  --sky: #ffd16e;
}
* { box-sizing: border-box }
[hidden] { display: none !important }
body { margin: 0; color: var(--text); background: var(--ground); font: 16px/1.5 Inter, system-ui, sans-serif }
button, input { font: inherit }
button { cursor: pointer }
a { color: inherit }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px }
#lobby { min-height: 100svh; display: grid; align-content: center; justify-items: center; padding: clamp(16px,3vw,52px) clamp(16px,3.6vw,66px) }
.launcher, #lobby footer { width: min(100%, 1536px) }
.launcher { border: 1px solid var(--stroke); background: var(--rail); box-shadow: 0 16px 56px #0004; overflow: clip; border-radius: 8px }
.titlebar { height: 78px; padding: 0 clamp(18px,2.4vw,36px); background: #20272c; display: flex; align-items: center; gap: 20px; border-bottom: 1px solid #10161a }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 32px/1 Barlow Display, Impact, sans-serif; letter-spacing: .01em; text-transform: uppercase }
.brand img { object-fit: contain; flex: none }
.app-name { font-size: 14px; color: #c2c9c9; border-left: 1px solid #4b5356; padding-left: 20px }
.site { margin-left: auto; font-size: 13px; display: inline-flex; gap: 8px; align-items: center; min-height: 42px; color: #cbd1d2; text-decoration: none }
.site span { font-size: 17px; color: var(--gold) }
.site:hover, .help-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px }
.workspace { display: grid; grid-template-columns: clamp(202px,17.1vw,258px) minmax(0,1fr) }
.rail { background: var(--rail); border-right: 1px solid #10161a; padding: 26px 12px 17px; display: flex; flex-direction: column; gap: 24px }
.rail h2 { font-size: 13px; font-weight: 650; color: var(--muted); margin: 0 0 13px 14px }
.destination { color: #c5cdcf; display: flex; align-items: center; position: relative; gap: 11px; min-height: 58px; padding: 8px 12px; border-radius: 4px; text-decoration: none; font-size: 15px; font-weight: 600 }
.destination + .destination { margin-top: 4px }
.destination img { width: 32px; height: 32px; image-rendering: pixelated; object-fit: contain }
.destination:hover { background: #252d31; color: white }
.destination[aria-current] { color: #fff2ca; background: #343631 }
.destination[aria-current]::before { content: ''; width: 3px; height: 23px; background: var(--gold); position: absolute; left: 0; border-radius: 2px }
.help-link { margin-top: auto; color: #c6cecf; align-self: flex-start; min-height: 44px; padding: 8px 13px; display: flex; align-items: center; gap: 10px; background: none; border: 0; font-size: 14px }
.question-icon { display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1.5px solid currentColor; border-radius: 50%; font-weight: 700; font-size: 12px; line-height: 1 }
.game { min-width: 0 }
.art { height: clamp(365px,54svh,650px); position: relative; isolation: isolate; background: #26302e; overflow: hidden }
.art > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 48% }
.art::after { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(0deg,#101914eb 0%,#10191487 24%,transparent 65%) }
.art-copy { z-index: 1; position: absolute; bottom: clamp(25px,3vw,46px); left: clamp(22px,3vw,48px); right: 180px }
.art h1 { margin: 0; color: #fffdf2; font: 800 clamp(48px,5.9vw,96px)/.96 Barlow Display, Impact, sans-serif; text-transform: uppercase; letter-spacing: -.012em; text-shadow: 0 2px 9px #15252175 }
.art-copy p { font-size: clamp(14px,1.05vw,17px); font-weight: 500; margin: 12px 0 0; color: #f1f5ef; text-shadow: 0 1px 4px #000 }
.art-picker { position: absolute; bottom: 25px; right: 24px; z-index: 2; display: flex; gap: 7px }
.art-picker button { background: #10171c; border: 1px solid #ccd5ce99; border-radius: 3px; padding: 2px; opacity: .83; min-height: 44px; display: flex; align-items: stretch }
.art-picker button[aria-pressed=true] { border: 2px solid var(--gold); padding: 1px; opacity: 1 }
.art-picker button:hover { opacity: 1 }
.art-picker img { width: 57px; height: 36px; object-fit: cover; align-self: center }
.dock { display: flex; flex-wrap: wrap; align-items: center; gap: 20px clamp(18px,2.2vw,34px); padding: 24px clamp(22px,3vw,48px); background: var(--panel); border-top: 1px solid #43504a }
#play { min-width: clamp(144px,13vw,200px); min-height: 56px; border: 1px solid #ffde8c; border-bottom: 3px solid #ba8b39; border-radius: 4px; background: var(--gold); color: #241e13; font: 800 24px/1 Barlow Display, Impact, sans-serif; text-transform: uppercase; letter-spacing: .05em; display: inline-flex; align-items: center; justify-content: center; gap: 13px }
#play::before { content: ''; border-block: 7px solid transparent; border-left: 11px solid currentColor }
#play:hover { background: #ffdf98 }
#play:active { translate: 0 1px }
#play:disabled { opacity: .65; cursor: wait }
.version span, .sound small { font-size: 12px; color: var(--muted); display: block }
.version strong { font-size: 15px; font-weight: 650 }
.version small { color: #d2d8d7; font-weight: 450; font-size: 13px }
.sound { display: inline-flex; align-items: center; gap: 12px; margin-left: auto; position: relative; cursor: pointer; min-height: 48px; font-size: 14px; font-weight: 650 }
.sound input { position: absolute; opacity: 0; width: 36px; height: 22px; left: 0; margin: 0 }
.switch { width: 36px; height: 22px; border: 1px solid #8c979a; background: #374247; border-radius: 20px; display: flex; align-items: center; padding: 3px; pointer-events: none }
.switch::after { content: ''; width: 14px; height: 14px; border-radius: 50%; background: #ecf0ee }
.sound input:checked + .switch { background: var(--gold); border-color: var(--gold) }
.sound input:checked + .switch::after { margin-left: auto; background: #252413 }
.sound input:focus-visible + .switch { outline: 3px solid var(--gold); outline-offset: 4px }
.sound small { font-weight: 400 }
#browser-note { flex-basis: 100%; margin: 0; color: #ffe3a7; font-size: 14px }
#browser-note:empty { display: none }
#lobby footer { color: #9aa6a8; font-size: 11px; padding: 14px 2px 0; line-height: 1.6 }
#launch-guide { width: min(480px,calc(100% - 32px)); max-height: 85svh; padding: 24px; border: 1px solid #515c62; border-radius: 6px; background: var(--panel); color: var(--text) }
#launch-guide::backdrop { background: #090d10bd }
.guide-title { display: flex; justify-content: space-between; align-items: center; gap: 12px }
.guide-title h2 { font-size: 24px; margin: 0 }
.guide-title button { background: transparent; color: var(--text); border: 1px solid #6c7779; border-radius: 3px; padding: 8px 12px; font-size: 14px }
#launch-guide h3 { font-size: 16px; margin: 22px 0 5px }
#launch-guide p, #launch-guide dl { font-size: 14px; line-height: 1.65; margin: 0; color: #ccd2d2 }
#launch-guide dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 8px 0 }
#launch-guide dd { margin: 0 }
kbd { font: inherit; font-size: 12px; border: 1px solid #6b7679; border-radius: 3px; padding: 2px 6px; margin-right: 4px }
@media (max-width: 900px) {
  .workspace { grid-template-columns: 172px minmax(0,1fr) }
  .rail { padding-inline: 8px }
  .destination { font-size: 14px; gap: 8px }
  .art-copy { right: 20px; bottom: 24px }
  .art-picker { top: 16px; bottom: auto; right: 16px }
  .dock { gap: 14px; padding: 18px }
  #play { min-width: 116px }
}
@media (max-width: 720px) {
  #lobby { align-content: start; padding: 12px }
  .titlebar { height: 64px; padding-inline: 16px; gap: 12px }
  .brand { font-size: 26px; gap: 7px }
  .brand img { width: 28px; height: 34px }
  .app-name { font-size: 12px; padding-left: 12px }
  .workspace { display: flex; flex-direction: column }
  .rail { flex-direction: row; gap: 7px; padding: 8px; border: 0; align-items: center }
  .rail nav { display: flex; gap: 4px; flex: 1 }
  .rail h2 { display: none }
  .destination, .destination + .destination { min-height: 44px; padding: 5px 10px; margin: 0; gap: 7px }
  .destination img { width: 24px; height: 24px }
  .destination[aria-current]::before { width: auto; height: 2px; left: 10px; right: 10px; bottom: 0 }
  .help-link { margin: 0 0 0 auto; font-size: 0; padding: 8px; gap: 0; align-items: center; justify-content: center; width: 44px; height: 44px }
  .art { height: clamp(282px,53vw,380px) }
  .art-copy { bottom: 20px; left: 18px }
  .art h1 { font-size: clamp(44px,9vw,62px) }
  .art-copy p { margin-top: 7px }
  .dock { display: grid; grid-template-columns: auto 1fr; padding: 18px; gap: 16px; align-items: center }
  #play { grid-column: 1 / -1; width: 100%; min-height: 52px }
  .sound { margin-left: auto }
  #browser-note { grid-column: 1 / -1 }
  #lobby footer { font-size: 11px }
}
@media (max-width: 440px) {
  .app-name { display: none }
  .art { height: clamp(276px,43svh,390px) }
  .art-picker { top: 12px; right: 12px; gap: 4px }
  .art-picker img { width: 44px; height: 29px }
  .art-picker button { min-height: 35px }
}
@media (max-width: 360px) {
  .destination { padding-inline: 6px; font-size: 13px }
  .destination img { width: 18px; height: 18px }
  .sound { gap: 6px }
}

#session{position:fixed;inset:0;background:#000;display:flex;flex-direction:column;z-index:10}.session-bar{display:flex;align-items:center;justify-content:space-between;min-height:50px;padding:7px 18px;gap:12px;background:var(--navy)}.session-bar strong{font-size:15px}.session-bar small{font-size:10px;color:var(--sky);margin-left:7px}.session-bar>span{font-size:12px;color:#b9c9dd}.session-bar button,.leave-dialog button{border:1px solid #ffffff38;border-radius:5px;background:transparent;color:white;padding:8px 11px;font-size:12px}.session-bar button+button{margin-left:6px}#game-host{flex:1;min-height:0}#game-host iframe{width:100%;height:100%;border:0;display:block}.leave-dialog{position:absolute;inset:0;background:#000b;display:grid;place-items:center;padding:24px}.leave-dialog>div{max-width:470px;background:var(--navy);border:1px solid #ffffff30;padding:30px;border-radius:12px}.leave-dialog h2{font-size:21px;line-height:1.4;margin:0 0 14px}.leave-dialog p{color:#c1d0e2;font-size:14px;line-height:1.7}.leave-dialog button{font-size:14px;padding:12px 16px;margin-top:10px}.leave-dialog #stay{background:var(--sky);color:#082036;border-color:var(--sky);font-weight:600;margin-right:8px}

#session-help {padding:10px 16px; font-size:14px; line-height:1.5; background:var(--navy)}
#session-state:empty {display:none}
@media(max-width:760px) {
  .session-bar {padding:6px 8px; gap:5px; flex-wrap:wrap}
  .session-bar>span:not(:empty) {order:3; width:100%}
  .session-bar button {font-size:12px; padding:7px}
}
@media(max-height:500px) and (orientation:landscape) {
  .session-bar {min-height:38px}
  .session-bar button {padding:5px 9px}
}

#play { padding-inline: 18px; }

#version-info { flex-basis: 100%; grid-column: 1 / -1; color: var(--muted); font-size: 14px; }
#version-link { display: inline-block; margin-inline-start: .4em; color: var(--gold); text-underline-offset: 3px; }
@media (max-width: 600px) { #version-link { margin-inline-start: 0; display: block; padding-block: 6px; } }

.version-group { min-width: 0; border: 0; margin: 0; padding: 0; }
.version-group legend { padding: 0; margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.version-buttons { display: flex; gap: 6px; }
.version-buttons label { position: relative; cursor: pointer; }
.version-buttons input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.version-buttons span { display: grid; place-items: center; min-height: 38px; padding: 0 13px; border: 1px solid #68747a; border-radius: 4px; background: var(--rail); color: var(--text); font-size: 15px; font-weight: 650; }
.version-buttons label:hover span { border-color: var(--text); }
.version-buttons input:checked + span { border-color: var(--gold); background: var(--gold); color: #241e13; }
.version-buttons input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }
@media (max-width: 600px) {
  .version-group { grid-column: 1 / -1; }
  .version-buttons label { flex: 1; }
  .version-buttons span { min-height: 44px; }
  .dock .sound { grid-column: 1 / -1; margin-left: 0; justify-self: start; }
}
