@font-face { font-family: 'Anton'; src: url('../../fonts/anton.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Barlow C'; src: url('../../fonts/barlow-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow C'; src: url('../../fonts/barlow-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }
:root { --gold: #f5c35b; --sun: #ff8a3d; --pink: #ff5a8a; --sky: #8fd0ff; --ink: #120b1c; --glass: rgba(14,10,28,.62);
  --display: 'Anton', Impact, sans-serif; --cond: 'Barlow C', 'Arial Narrow', system-ui, sans-serif; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--ink); color: #fff; font-family: var(--cond); user-select: none; -webkit-user-select: none; touch-action: none; }
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
.hidden { display: none !important; }
button, select { font: inherit; color: inherit; }

#boot { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: radial-gradient(circle at 50% 70%, #6a2a3a, #120b1c 70%); transition: opacity .6s; }
#boot.done { opacity: 0; pointer-events: none; }
.bt-logo { font-family: var(--display); font-size: clamp(36px, 7vw, 80px); letter-spacing: .04em; text-shadow: 0 4px 0 var(--sun); }
.bt-msg { font-weight: 600; letter-spacing: .25em; opacity: .75; }
.bt-bar { width: min(320px, 60vw); height: 3px; background: #3a2a40; overflow: hidden; }
.bt-bar i { display: block; height: 100%; width: 40%; background: var(--gold); animation: slide 1.1s infinite ease-in-out; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
footer { position: absolute; bottom: max(10px, env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; font-weight: 600; font-size: 13px; letter-spacing: .12em; opacity: .75; text-shadow: 0 1px 4px #000; }

/* screens */
#ui { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.screen { position: absolute; inset: 0; pointer-events: auto; display: flex; flex-direction: column; }
.screen.title { justify-content: flex-start; align-items: center; cursor: pointer; }
.title-bg { position: absolute; inset: 0; background: url(../../art/leer_title.jpg) center 70% / cover; }
.title-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,11,28,.55) 0%, rgba(18,11,28,0) 45%, rgba(18,11,28,.15) 80%, rgba(18,11,28,.6) 100%); }
.brand { position: relative; text-align: center; margin-top: 5vh; }
.brand .site { font-weight: 800; letter-spacing: .5em; font-size: 13px; color: var(--gold); text-shadow: 0 1px 6px #000; }
.logo { margin: 6px 0 0; font-family: var(--display); font-weight: 400; line-height: .9; display: flex; flex-direction: column; }
.logo .l1 { font-size: clamp(56px, 10vw, 150px); letter-spacing: .03em; text-shadow: 0 5px 0 var(--sun), 0 10px 30px rgba(0,0,0,.5); }
.logo .l2 { font-size: clamp(22px, 3.4vw, 52px); letter-spacing: .32em; color: var(--gold); text-shadow: 0 2px 10px rgba(0,0,0,.7); }
.brand .tag { margin-top: 10px; font-weight: 600; font-size: clamp(14px, 1.6vw, 20px); text-shadow: 0 1px 6px #000; }
.press { margin-top: 3vh; font-family: var(--display); letter-spacing: .3em; font-size: clamp(16px, 2vw, 24px); animation: blink 1.3s infinite; text-shadow: 0 2px 8px #000; }
@keyframes blink { 50% { opacity: .45; } }

.menuscreen, .briefscreen, .resultscreen, .pausescreen { background: radial-gradient(ellipse at 50% 120%, rgba(255,138,61,.25), rgba(18,11,28,.82) 60%); backdrop-filter: blur(2px); overflow: auto; touch-action: pan-y; }
.menu { width: min(1100px, 94vw); margin: 0 auto; padding: 3vh 0 70px; }
.mhead { display: flex; gap: 14px; align-items: center; }
.mhead img { width: 72px; height: 72px; border-radius: 50%; border: 3px solid var(--gold); object-fit: cover; }
.mhead h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(28px, 4vw, 44px); letter-spacing: .04em; }
.mhead p { margin: 2px 0 0; font-weight: 600; color: var(--gold); }
i { font-style: normal; opacity: .25; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 18px 0; }
.card { position: relative; text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 16px; min-height: 170px; border-radius: 16px; border: 1px solid rgba(255,255,255,.14); background: linear-gradient(160deg, rgba(255,138,61,.22), rgba(40,20,60,.75)); cursor: pointer; transition: transform .15s, border-color .15s; }
.card:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--gold); }
.card.locked { filter: grayscale(.8); opacity: .55; cursor: not-allowed; }
.card .num { position: absolute; right: 12px; top: 6px; font-family: var(--display); font-size: 44px; opacity: .18; }
.card b { font-family: var(--display); font-weight: 400; font-size: 26px; letter-spacing: .04em; }
.card .desc { font-weight: 600; font-size: 15px; opacity: .85; line-height: 1.25; flex: 1; }
.card .st { color: var(--gold); font-size: 20px; letter-spacing: .1em; }
.card .best { font-size: 12px; font-weight: 800; letter-spacing: .1em; opacity: .7; }
.opts { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; font-weight: 600; }
.opts label { display: flex; gap: 8px; align-items: center; }
.opts select { background: #2a1a3a; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; padding: 4px 8px; }
.opts a { color: var(--gold); font-weight: 800; letter-spacing: .04em; }
.keys { margin-top: 14px; font-weight: 600; opacity: .9; }
.keys summary { cursor: pointer; color: var(--sky); font-weight: 800; letter-spacing: .08em; }
.keys p { margin: 6px 0; line-height: 1.4; }

.brief { margin: auto; display: flex; gap: 24px; align-items: center; width: min(900px, 92vw); padding: 20px; }
.brief > img { width: min(260px, 30vw); aspect-ratio: 1; border-radius: 22px; border: 3px solid var(--gold); object-fit: cover; box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.kicker { font-weight: 800; letter-spacing: .3em; color: var(--gold); font-size: 13px; text-transform: uppercase; }
.brief h2 { margin: 2px 0 6px; font-family: var(--display); font-weight: 400; font-size: clamp(34px, 5vw, 58px); letter-spacing: .03em; }
.brief .lead { font-size: 20px; font-weight: 600; margin: 0 0 10px; }
.brief ul { margin: 0 0 16px; padding-left: 20px; font-weight: 600; font-size: 16px; line-height: 1.45; opacity: .92; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }
.btns button { border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); border-radius: 14px; padding: 12px 22px; font-weight: 800; letter-spacing: .1em; font-size: 16px; cursor: pointer; }
.btns button.go { border: 0; background: linear-gradient(135deg, var(--sun), var(--pink)); font-size: 18px; padding: 12px 30px; box-shadow: 0 8px 24px rgba(255,90,120,.35); }

.result { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.rbg { position: absolute; inset: 0; background-size: cover; background-position: center 30%; }
.result.lose .rbg { filter: grayscale(.4) brightness(.5); }
.rbg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18,11,28,.85) 0%, rgba(18,11,28,.3) 60%, rgba(18,11,28,0) 100%); }
.rbox { position: relative; margin-right: auto; margin-left: 6vw; max-width: 520px; padding: 20px; }
.rbox > img { width: 110px; height: 110px; border-radius: 50%; border: 3px solid var(--sun); object-fit: cover; }
.rbox h2 { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 6vw, 72px); margin: 6px 0; letter-spacing: .03em; text-shadow: 0 4px 0 var(--sun); }
.stars { font-size: clamp(40px, 6vw, 64px); color: var(--gold); letter-spacing: .1em; text-shadow: 0 0 20px rgba(245,195,91,.6); }
.stat { font-weight: 800; letter-spacing: .06em; font-size: 18px; }
.line { font-size: 20px; font-weight: 600; font-style: italic; }
.pausebox { margin: auto; text-align: center; }
.pausebox h2 { font-family: var(--display); font-weight: 400; font-size: 64px; margin: 0 0 16px; }

/* HUD */
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; font-weight: 800; text-shadow: 0 1px 4px rgba(0,0,0,.7); }
.tl { position: absolute; left: max(14px, env(safe-area-inset-left)); top: max(12px, env(safe-area-inset-top)); background: var(--glass); border-radius: 12px; padding: 8px 14px; backdrop-filter: blur(6px); }
#h-obj { font-size: 16px; letter-spacing: .04em; } #h-obj b { color: var(--gold); }
#h-time { font-size: 13px; opacity: .8; letter-spacing: .2em; margin-top: 2px; }
.hdg { position: absolute; left: 50%; top: max(12px, env(safe-area-inset-top)); transform: translateX(-50%); background: var(--glass); border-radius: 10px; padding: 4px 14px; font-size: 20px; letter-spacing: .1em; }
.box { position: absolute; top: 50%; transform: translateY(-50%); background: var(--glass); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 8px 12px; min-width: 96px; text-align: center; backdrop-filter: blur(6px); }
.box label { display: block; font-size: 11px; letter-spacing: .3em; color: var(--gold); }
.box b { display: block; font-family: var(--display); font-weight: 400; font-size: 34px; letter-spacing: .03em; }
.box small { display: block; font-size: 13px; opacity: .85; }
.spd { left: max(16px, env(safe-area-inset-left)); } .alt { right: max(16px, env(safe-area-inset-right)); }
.att { position: absolute; left: 50%; top: 50%; width: 180px; height: 2px; margin-left: -90px; }
#h-hor { position: absolute; left: -40px; right: -40px; top: 0; height: 2px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55) 20%, rgba(255,255,255,.55) 80%, transparent); transition: transform .05s linear; }
.wings { position: absolute; left: 50%; top: -6px; width: 70px; margin-left: -35px; height: 12px; border: 3px solid var(--gold); border-top: 0; border-radius: 0 0 12px 12px; opacity: .9; }
.thrbox { position: absolute; left: max(16px, env(safe-area-inset-left)); bottom: max(70px, calc(env(safe-area-inset-bottom) + 60px)); display: flex; align-items: flex-end; gap: 8px; }
#h-thr { width: 14px; height: 110px; background: var(--glass); border: 1px solid rgba(255,255,255,.25); border-radius: 8px; position: relative; overflow: hidden; }
#h-thr i { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(0deg, var(--gold), var(--sun)); opacity: 1; }
#h-thrn { font-size: 14px; letter-spacing: .1em; }
.status { position: absolute; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 8px; }
.pill { background: var(--glass); border-radius: 999px; padding: 6px 14px; font-size: 13px; letter-spacing: .14em; border: 1px solid rgba(255,255,255,.2); }
.pill.ok { color: #6dff9e; border-color: rgba(109,255,158,.4); } .pill.mid { color: var(--gold); } .pill.hot { color: var(--pink); border-color: var(--pink); }
.warn { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); font-family: var(--display); font-size: clamp(30px, 5vw, 56px); letter-spacing: .12em; color: #ff3a4a; opacity: 0; text-shadow: 0 0 20px rgba(255,40,60,.7), 0 2px 0 #000; }
.warn.on { animation: warnblink .5s infinite; }
@keyframes warnblink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: .15; } }
.arrow { position: absolute; left: 0; top: 0; width: 0; height: 0; transition: transform .06s linear; }
.arrow span { position: absolute; left: -16px; top: -16px; width: 32px; height: 32px; border: 3px solid var(--gold); border-radius: 50%; box-shadow: 0 0 14px rgba(245,195,91,.8); }
.arrow.edge span { border-radius: 0; border: 0; width: 0; height: 0; left: -14px; top: -16px; border-left: 16px solid transparent; border-right: 16px solid transparent; border-bottom: 30px solid var(--gold); box-shadow: none; filter: drop-shadow(0 0 6px rgba(245,195,91,.9)); }
.dist { position: absolute; right: max(16px, env(safe-area-inset-right)); top: calc(50% + 70px); font-size: 14px; letter-spacing: .12em; color: var(--gold); }
.gs { position: absolute; right: calc(max(16px, env(safe-area-inset-right)) + 120px); top: calc(50% - 70px); width: 16px; height: 140px; border: 2px solid rgba(255,255,255,.4); border-radius: 8px; background: var(--glass); }
.gs::before { content: ''; position: absolute; left: -6px; right: -6px; top: 50%; height: 2px; background: #fff; }
.gs i { position: absolute; left: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; background: #ff5aff; transform: rotate(45deg); transition: top .1s; }
.gs span { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 6px; font-size: 11px; letter-spacing: .14em; white-space: nowrap; }
.radio { position: absolute; right: max(14px, env(safe-area-inset-right)); top: max(12px, env(safe-area-inset-top)); display: flex; gap: 10px; align-items: center; max-width: min(420px, 46vw); background: var(--glass); border: 1px solid rgba(245,195,91,.4); border-radius: 16px; padding: 8px 14px 8px 8px; transform: translateY(-140%); transition: transform .35s cubic-bezier(.2,.9,.3,1.2); backdrop-filter: blur(6px); }
.radio.on { transform: none; }
.radio img { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; border: 2px solid var(--gold); flex: none; }
.radio p { margin: 0; font-weight: 600; font-size: 16px; line-height: 1.3; text-shadow: none; }

/* touch controls */
.touch { position: fixed; inset: 0; z-index: 12; pointer-events: none; display: none; }
.touch.on { display: block; }
.stick { position: absolute; left: max(24px, env(safe-area-inset-left)); bottom: max(24px, env(safe-area-inset-bottom)); width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.3); pointer-events: auto; touch-action: none; }
.stick .nub { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6, #f5c35b99); border: 2px solid var(--gold); }
.thr { position: absolute; right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); width: 56px; height: 170px; border-radius: 14px; background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.3); overflow: hidden; pointer-events: auto; touch-action: none; }
.thr .fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(0deg, #f5c35bcc, #ff8a3dcc); }
.thr span { position: absolute; left: 0; right: 0; top: 6px; text-align: center; font-size: 11px; font-weight: 800; letter-spacing: .15em; }
.tbtns { position: absolute; right: calc(max(24px, env(safe-area-inset-right)) + 70px); bottom: max(24px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; pointer-events: auto; }
.tbtns button { width: 76px; padding: 10px 0; border-radius: 12px; border: 2px solid rgba(255,255,255,.3); background: rgba(20,12,30,.55); font-weight: 800; letter-spacing: .1em; font-size: 13px; }
body:has(.touch.on) .thrbox, body:has(.touch.on) .status { display: none; }

#rotate { display: none; }
@media (orientation: portrait) and (pointer: coarse) {
  #rotate { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: var(--ink); font-weight: 800; letter-spacing: .1em; }
  #rotate .phone { width: 60px; height: 100px; border: 4px solid #fff; border-radius: 12px; animation: turn 2s infinite; }
  @keyframes turn { 50% { transform: rotate(-90deg); } }
}
@media (max-height: 500px) {
  .box b { font-size: 26px; } .box { min-width: 80px; padding: 6px 10px; }
  .brief > img { width: 150px; }
  .brief .lead { font-size: 17px; } .brief ul { font-size: 14px; }
  .radio img { width: 46px; height: 46px; } .radio p { font-size: 14px; }
}

/* HUD buttons, view toast */
.hbtns { position: absolute; left: 50%; top: calc(max(12px, env(safe-area-inset-top)) + 44px); transform: translateX(-50%); display: flex; gap: 6px; pointer-events: auto; }
.hbtns button { background: var(--glass); border: 1px solid rgba(255,255,255,.22); border-radius: 10px; padding: 6px 12px; font-weight: 800; font-size: 13px; letter-spacing: .12em; cursor: pointer; backdrop-filter: blur(6px); }
.hbtns button b { color: var(--gold); letter-spacing: .06em; }
.hbtns button:hover { border-color: var(--gold); }
.viewtoast { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); font-family: var(--display); font-size: clamp(22px, 3vw, 34px); letter-spacing: .1em; opacity: 0; transition: opacity .3s; text-shadow: 0 2px 10px rgba(0,0,0,.8); }
.viewtoast.on { opacity: 1; }
/* dialogs */
.dlg { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(10,6,18,.6); backdrop-filter: blur(3px); padding: 16px; touch-action: pan-y; }
.dbox { background: linear-gradient(160deg, #2a1830, #170e22); border: 1px solid rgba(245,195,91,.35); border-radius: 20px; padding: 18px 22px; max-width: 520px; width: 100%; max-height: 92vh; overflow: auto; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.dbox.wide { max-width: 640px; }
.dhead { display: flex; align-items: center; gap: 12px; }
.dhead img { width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; }
.dhead h2 { margin: 0; flex: 1; font-family: var(--display); font-weight: 400; font-size: 32px; letter-spacing: .04em; }
.dhead .x { background: none; border: 0; font-size: 30px; cursor: pointer; opacity: .8; }
.tabs { display: flex; gap: 6px; margin: 14px 0 8px; }
.tabs button { border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); border-radius: 10px; padding: 7px 14px; font-weight: 800; letter-spacing: .08em; cursor: pointer; }
.tabs button.on { background: var(--gold); color: #1a1022; border-color: var(--gold); }
.ctab { width: 100%; border-collapse: collapse; font-size: 16px; }
.ctab th { text-align: left; white-space: nowrap; padding: 7px 14px 7px 0; color: var(--gold); font-weight: 800; letter-spacing: .04em; vertical-align: top; }
.ctab td { padding: 7px 0; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.07); }
.ctab tr th { border-bottom: 1px solid rgba(255,255,255,.07); }
.tip { font-weight: 600; opacity: .9; line-height: 1.4; } .tip b { color: var(--gold); }
.inv { display: flex; gap: 8px; align-items: center; font-weight: 600; margin: 8px 0 14px; }
.pausebox { margin: auto; text-align: center; max-width: 440px; padding: 20px; }
.pausebox p { font-weight: 600; font-size: 17px; line-height: 1.4; }
.pausebox .pface { width: 96px; height: 96px; border-radius: 50%; border: 3px solid var(--gold); object-fit: cover; }
.pausebox .inv { justify-content: center; }
.btns.col { flex-direction: column; align-items: stretch; width: min(320px, 80vw); margin: 0 auto; }
.saved { color: #7dffad; min-height: 1.2em; }
.savedflight { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(120deg, rgba(245,195,91,.22), rgba(255,90,138,.12)); border: 1px solid rgba(245,195,91,.5); }
.savedflight img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; border: 2px solid var(--gold); }
.savedflight div { flex: 1; min-width: 180px; } .savedflight b { display: block; font-size: 18px; } .savedflight span { font-weight: 600; opacity: .85; font-size: 14px; }
.savedflight button { border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); border-radius: 12px; padding: 10px 18px; font-weight: 800; letter-spacing: .08em; cursor: pointer; }
.savedflight button.go { border: 0; background: linear-gradient(135deg, var(--sun), var(--pink)); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--sky); font-weight: 800; letter-spacing: .04em; cursor: pointer; text-decoration: underline; }
@media (max-height: 500px) { .hbtns { top: auto; bottom: max(10px, env(safe-area-inset-bottom)); left: 50%; } .ctab { font-size: 14px; } .ctab th, .ctab td { padding: 4px 10px 4px 0; } }

.sitelink { position: absolute; top: max(14px, env(safe-area-inset-top)); left: 16px; z-index: 2; color: #fff; text-decoration: none; font-weight: 800; letter-spacing: .08em; font-size: 14px; padding: 9px 16px; border-radius: 999px; background: rgba(18,11,28,.6); border: 1px solid rgba(255,255,255,.25); }
.sitelink:hover { border-color: var(--gold); color: var(--gold); }
footer a { color: var(--gold); pointer-events: auto; }

.hbtns #h-music.off { opacity: .45; text-decoration: line-through; }
