/* Game page: canvas, HUD, overlays */
html, body.game-body { height: 100%; overflow: hidden; background: #0a140e; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; touch-action: none; }

#hud { position: fixed; inset: 0; pointer-events: none; font-family: var(--font-body); color: #fff; z-index: 10; }
#hud[hidden] { display: none; }
#hud button, #hud a { pointer-events: auto; }

.hud__top-left { position: absolute; top: 18px; left: 18px; max-width: 360px; }
.hud__objective {
  background: rgba(6, 14, 9, 0.55); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid var(--accent); border-radius: 10px; padding: 10px 14px; font-size: 0.92rem; line-height: 1.35;
}
.hud__label { font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 3px; }

.hud__clock {
  margin-top: 6px; display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 0.78rem; font-variant-numeric: tabular-nums;
  background: rgba(6, 14, 9, 0.5); border: 1px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(6px); color: #e8ddc4; letter-spacing: 0.02em;
}
.hud__clock b { color: #fff; font-weight: 600; }
/* the frame rate sits out of the way, bottom right, and is off unless asked for (Settings → Game) */
.hud__fps {
  position: absolute; right: 12px; bottom: 10px; padding: 3px 8px; border-radius: 6px; font: 600 0.72rem/1.2 var(--font-body, sans-serif);
  font-variant-numeric: tabular-nums; background: rgba(6, 14, 9, 0.5); border: 1px solid rgba(255, 255, 255, 0.1); color: #bfe0c8; pointer-events: none;
}
.hud__fps--low { color: #ffd08a; }
.hud__fps--bad { color: #ff9a8a; }

.hud__top-center { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); }
.compass { position: relative; width: 260px; height: 30px; overflow: hidden; border-radius: 999px; background: rgba(6, 14, 9, 0.5); border: 1px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(6px); }
.compass__strip { position: absolute; inset: 0; }
.compass__mark { position: absolute; left: 50%; top: 50%; translate: -50% -50%; font-size: 0.72rem; font-weight: 600; color: #cfe0d3; }
.compass__mark--major { font-size: 0.85rem; color: #fff; }
.compass__needle { position: absolute; left: 50%; top: 0; width: 2px; height: 8px; background: var(--accent); transform: translateX(-50%); }

.hud__top-right { position: absolute; top: 18px; right: 18px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.hud__stones { display: flex; gap: 8px; background: rgba(6, 14, 9, 0.55); padding: 8px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.1); }
.stone { width: 18px; height: 18px; border-radius: 4px; transform: rotate(45deg); background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.25); transition: all 0.3s; }
.stone--carried { background: #ffb340; border-color: #ffe0a0; box-shadow: 0 0 12px rgba(255, 179, 64, 0.8); animation: stone-pulse 1.6s ease-in-out infinite; }
.stone--placed { background: #ffd27a; border-color: #fff; box-shadow: 0 0 6px rgba(255, 210, 122, 0.6); animation: none; }
@keyframes stone-pulse { 0%, 100% { box-shadow: 0 0 8px rgba(255, 179, 64, 0.5); } 50% { box-shadow: 0 0 16px rgba(255, 179, 64, 1); } }
.hud__relics { font-size: 0.8rem; color: #8ff0b5; background: rgba(6, 14, 9, 0.55); padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.1); }
.hud__finds { font-size: 0.8rem; color: #ffe6a0; background: rgba(6, 14, 9, 0.55); padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255, 230, 160, 0.18); }
.hud__finds.is-bump { animation: finds-bump 0.9s ease-out; }
@keyframes finds-bump { 0% { transform: scale(1); box-shadow: 0 0 0 rgba(255, 220, 140, 0); } 30% { transform: scale(1.18); box-shadow: 0 0 14px rgba(255, 220, 140, 0.8); } 100% { transform: scale(1); box-shadow: 0 0 0 rgba(255, 220, 140, 0); } }
.hud__buttons { display: flex; gap: 6px; }
.hud__btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(6, 14, 9, 0.6);
  color: #fff; font-size: 1.1rem; cursor: pointer; backdrop-filter: blur(6px);
}
.hud__btn:hover { background: rgba(255, 138, 61, 0.35); }


.callpill {
  position: absolute; left: 18px; bottom: 36px; font-size: 0.78rem; padding: 6px 12px; border-radius: 999px;
  background: rgba(6, 14, 9, 0.6); border: 1px solid rgba(255, 255, 255, 0.12); color: #cfe0d3;
}
.callpill--active { border-color: rgba(61, 220, 132, 0.6); color: #b9ffd6; }
.callpill[hidden] { display: none; }
.callpill--wary { border-color: rgba(255, 178, 92, 0.75); color: #ffd9a0; }
.callpill--trust { border-color: rgba(120, 200, 255, 0.7); }

/* ---- her watch (bottom-left), with the call pill under it: pulse, how she is, condition and energy, weather ---- */
.hud__dock { position: absolute; left: 18px; bottom: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.hud__dock .callpill { position: static; }
.watch { width: 196px; box-sizing: border-box; padding: 10px 14px; border-radius: 26px; background: rgba(6, 14, 9, 0.66); border: 1px solid rgba(255, 255, 255, 0.14); color: #fff; transition: border-color 0.4s, background 0.4s; }
.watch[hidden] { display: none; }
.watch--warn { border-color: rgba(255, 178, 92, 0.75); }
.watch--bad { border-color: rgba(255, 107, 95, 0.85); background: rgba(40, 12, 8, 0.72); }
.watch__row { display: flex; align-items: baseline; gap: 6px; }
.watch__heart { display: inline-block; color: #7fd39a; font-size: 1rem; }
.watch--warn .watch__heart { color: #ffb15c; }
.watch--bad .watch__heart { color: #ff6b5f; }
.watch__heart.is-beat { animation: watch-beat 0.22s ease-out; }
@keyframes watch-beat { 40% { transform: scale(1.35); } }
.watch__bpm { font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.watch__unit { font-size: 0.72rem; color: #b9c9bd; }
.watch__unit[hidden] { display: none; }
.watch__drone { margin-left: auto; font-size: 0.72rem; color: #cfe0d3; white-space: nowrap; }
.watch__drone:empty { display: none; }
.watch__trace { display: block; width: 100%; height: 26px; margin: 2px 0 4px; }
.watch__alert { font-size: 0.74rem; color: #ffb4a8; margin-bottom: 3px; }
.watch__alert[hidden] { display: none; }
.watch__word { display: flex; flex-direction: column; line-height: 1.25; margin-bottom: 6px; }
.watch__word b { font-size: 0.86rem; color: #bff0cf; }
.watch--warn .watch__word b { color: #ffd9a0; }
.watch--bad .watch__word b { color: #ffc0b6; }
.watch__word span { font-size: 0.72rem; color: #cfe0d3; }
.watch__word span:empty { display: none; }
.watch__bars { display: flex; gap: 8px; margin-bottom: 14px; }
.watch__bar { position: relative; flex: 1; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); }
.watch__bar[hidden] { display: none; }
.watch__bar i { display: block; height: 100%; border-radius: 999px; background: #8fd36e; transition: width 0.5s; }
.watch__bar i.is-low { background: #ff6b5f; }
.watch__bar[data-k="energy"] i { background: #ffd27a; }
.watch__bar small { position: absolute; left: 0; top: 7px; font-size: 0.58rem; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); white-space: nowrap; }
.watch__meta { font-size: 0.7rem; color: #b9c9bd; font-variant-numeric: tabular-nums; }
.watch__meta:empty { display: none; }
.watch__buffs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.watch__buffs:empty { display: none; }
.watch__buffs span { font-size: 0.64rem; padding: 2px 7px; border-radius: 999px; background: rgba(143, 240, 181, 0.14); color: #bff0cf; }
body.is-touch .hud__dock { left: max(12px, env(safe-area-inset-left)); bottom: max(76px, calc(env(safe-area-inset-bottom) + 58px)); pointer-events: none; }
body.is-touch .watch { width: 172px; padding: 8px 12px; }

/* ---- free flight for the camera drone: a feed frame, a badge, the controls, markers for her and the objective ---- */
.dronecam { position: absolute; inset: 0; pointer-events: none; }
.dronecam[hidden] { display: none; }
.dronecam__frame { position: absolute; inset: 15vh 13vw; }
.dronecam__frame i { position: absolute; width: 34px; height: 34px; border: 2px solid rgba(255, 255, 255, 0.5); }
.dronecam__frame i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.dronecam__frame i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.dronecam__frame i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.dronecam__frame i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.dronecam__bar { position: absolute; left: 50%; bottom: 20%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 92vw; }   /* bottom centre: clear of every top panel */
.dronecam__badge { display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(6, 14, 9, 0.66); border: 1px solid rgba(255, 255, 255, 0.16); color: #fff; font-size: 0.78rem; white-space: nowrap; }
.dronecam__help { padding: 6px 14px; border-radius: 999px; background: rgba(6, 14, 9, 0.55); color: #e4efe7; font-size: 0.76rem; white-space: nowrap; }
body.is-touch .dronecam__bar { bottom: 30%; }
body.is-touch .dronecam__help { white-space: normal; max-width: 70vw; text-align: center; }
.dronecam__badge b { font-weight: 700; letter-spacing: 0.04em; }
.dronecam__badge span:last-child { color: #cfe0d3; }
.dronecam__rec { width: 8px; height: 8px; border-radius: 50%; background: #ff4d4d; animation: dronecam-rec 1.2s steps(1) infinite; }
@keyframes dronecam-rec { 50% { opacity: 0.25; } }
.dronecam__mark { position: absolute; left: 0; top: 0; }
.dronecam__mark[hidden] { display: none; }
.dronecam__mark span { display: block; padding: 3px 9px; border-radius: 999px; background: rgba(255, 138, 61, 0.9); color: #1a0c04; font-size: 0.74rem; font-weight: 700; white-space: nowrap; }
.dronecam__mark span::after { content: ''; position: absolute; left: 50%; bottom: -6px; margin-left: -5px; border: 5px solid transparent; border-top-color: rgba(255, 138, 61, 0.9); border-bottom: 0; }
.dronecam__mark--goal span { background: rgba(143, 240, 181, 0.92); color: #06240f; }
.dronecam__mark--goal span::after { border-top-color: rgba(143, 240, 181, 0.92); }
.dronecam__mark.is-off span { opacity: 0.75; outline: 1px dashed rgba(255, 255, 255, 0.7); }
.dronecam__mark.is-off span::after { display: none; }
.dronecam__reticle { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 2px solid rgba(255, 255, 255, 0.8); border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); }
.dronecam__reticle::after { content: ''; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: #fff; }
.dronecam__reticle[hidden] { display: none; }
.dronecam__reticle--walk { border-color: rgba(87, 225, 255, 0.9); }
.dronecam__reticle--climb { border-color: rgba(255, 224, 102, 0.95); }
.dronecam__reticle--use { border-color: rgba(255, 162, 74, 0.95); }
.dronecam__reticle--swim { border-color: rgba(127, 184, 255, 0.95); }
.dronecam__reticle--high { border-color: rgba(255, 138, 60, 0.95); }
.dronecam__reticle--none { border-color: rgba(255, 90, 90, 0.9); }
.dronecam__aim { position: absolute; left: 50%; top: calc(50% + 22px); transform: translateX(-50%); padding: 3px 10px; border-radius: 999px; background: rgba(6, 14, 9, 0.72); color: #bff4ff; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.dronecam__aim[hidden] { display: none; }
.dronecam__aim--climb { color: #ffe98a; }
.dronecam__aim--use { color: #ffc38a; }
.dronecam__aim--swim { color: #bcd8ff; }
.dronecam__aim--high { color: #ffb27a; }
.dronecam__aim--none, .dronecam__aim--self { color: #ffb4a8; }

.prompt {
  position: absolute; left: 50%; bottom: 20%; transform: translateX(-50%); padding: 10px 18px; border-radius: 999px;
  background: rgba(6, 14, 9, 0.7); border: 1px solid rgba(255, 210, 122, 0.5); color: #ffe6b8; font-weight: 600; font-size: 0.95rem; white-space: nowrap;
}
.prompt[hidden] { display: none; }

.subtitle {
  position: absolute; left: 50%; bottom: 60px; transform: translateX(-50%); max-width: min(760px, 86vw);
  padding: 10px 18px; border-radius: 12px; background: rgba(0, 0, 0, 0.6); font-size: 1.02rem; line-height: 1.4; text-align: center;
  text-shadow: 0 1px 2px #000;
}
.subtitle[hidden] { display: none; }
.subtitle__who { color: var(--accent-2); font-weight: 700; }

.toasts { position: absolute; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; max-width: 360px; }
.toast {
  padding: 9px 14px; border-radius: 10px; background: rgba(6, 14, 9, 0.75); border: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.88rem; line-height: 1.35;
  opacity: 0; transform: translateY(8px); transition: all 0.3s ease;
}
.toast.is-in { opacity: 1; transform: none; }
.toast--good { border-color: rgba(122, 211, 122, 0.6); }
.toast--warn { border-color: rgba(255, 95, 95, 0.6); }
.toast--voice { border-color: rgba(255, 138, 61, 0.6); color: #ffe0c2; }

.vignette { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.35); }
.vignette.is-hit { animation: hit 0.6s ease-out; }
@keyframes hit { 0% { box-shadow: inset 0 0 160px rgba(255, 40, 20, 0.7); } 100% { box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.35); } }

/* Overlays: the screens around play, in the look of the main menu (css/menu.css has the game buttons, the icons and
   the chapter tiles; game/play-screens.js dresses them). Loading: the chapter's picture or colours. Start: the briefing
   and the buttons on the left with the world and her on the right, or below the world on a phone held upright; on a
   direct video call (?video=1) just the call. Pause: a menu down the left over the dimmed world. Complete: a card. */
.overlay {
  position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center;
  padding: calc(16px + var(--sat, 0px)) calc(16px + var(--sar, 0px)) calc(16px + var(--sab, 0px)) calc(16px + var(--sal, 0px));
  background: radial-gradient(120% 120% at 50% 100%, rgba(6, 18, 10, 0.75), rgba(3, 8, 5, 0.9));
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); font-family: var(--font-body); color: var(--text);
}
.overlay[hidden] { display: none; }
.overlay__card {
  width: min(680px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: rgba(12, 22, 16, 0.92); border: 1px solid var(--line);
  border-radius: 22px; padding: 30px 34px; box-shadow: var(--shadow);
}
.overlay__card--narrow { width: min(460px, 100%); }
.overlay__card--center { text-align: center; }
.overlay__eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.25em; text-transform: uppercase; color: var(--accent); }
.overlay__title { font-family: var(--font-display); font-size: clamp(1.9rem, 5vw, 2.8rem); line-height: 1.1; margin: 6px 0 12px; letter-spacing: 0.04em; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6); }
.overlay__title--small { font-size: clamp(1.5rem, 4vw, 1.9rem); }
.overlay__text { color: #cbd8cd; line-height: 1.55; margin: 0 0 12px; }
.overlay__note { color: var(--accent-2); font-size: 0.88rem; line-height: 1.45; margin: 0 0 10px; }
.overlay__note:empty { display: none; }
.overlay__note a { color: #ffd48f; }
.overlay__actions { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 10px; }
.overlay__check { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; font-size: 0.88rem; color: var(--muted); cursor: pointer; }
.overlay__check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.overlay__menu { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.overlay__links { margin: 16px 0 0; color: var(--muted); font-size: 0.88rem; }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; font-size: 0.88rem; color: #cbd8cd; }
.controls div { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mouse { font-size: 1rem; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0; }
.stat { background: rgba(255, 255, 255, 0.06); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.stat span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.stat b { font-size: 1.05rem; }
.loader { width: 220px; height: 4px; margin: 14px auto 0; background: rgba(255, 255, 255, 0.1); border-radius: 2px; overflow: hidden; }
.loader span { display: block; width: 40%; height: 100%; background: var(--accent); animation: load 1.2s ease-in-out infinite; }
@keyframes load { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--edge);
  background: var(--glass); color: #dfe8e1; font: 600 0.84rem var(--font-body); text-decoration: none; cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); -webkit-tap-highlight-color: transparent;
}
.chip .ico { width: 1.15em; height: 1.15em; color: #ffd48f; }
.chip:hover, .chip:focus-visible { border-color: var(--sel); box-shadow: var(--sel-glow); outline: none; }

/* loading: the chapter's picture (softened) or its colours, its name and line, the bar, a tip */
#loading {
  --c1: #c9d98a; --c2: #4a7a3e; --c3: #12261a;
  align-items: stretch; justify-content: stretch; padding: 0; overflow: hidden; -webkit-backdrop-filter: none; backdrop-filter: none;
  background: linear-gradient(160deg, var(--c1), var(--c2) 55%, var(--c3));
}
#loading::before { content: ''; position: absolute; inset: -30px; background: var(--art, none) center / cover no-repeat; filter: blur(4px) saturate(1.05); opacity: 0; }
#loading.has-art::before { opacity: 1; }
.loadscreen {
  position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px;
  padding: calc(20px + var(--sat, 0px)) calc(24px + var(--sar, 0px)) calc(20px + var(--sab, 0px)) calc(24px + var(--sal, 0px));
  background: linear-gradient(180deg, rgba(4, 9, 6, 0.35) 0%, rgba(4, 9, 6, 0.25) 35%, rgba(4, 9, 6, 0.9) 100%), linear-gradient(90deg, rgba(4, 9, 6, 0.5), transparent 70%);
}
.loadscreen__logo { margin-bottom: auto; font: 900 1.5rem/1 var(--font-display); letter-spacing: 0.3em; color: #fff7ea; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); }
.loadscreen__call { display: none; }
.loadscreen__info { display: flex; flex-direction: column; gap: 4px; max-width: 720px; }
.loadscreen__label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: #ffd48f; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); }
.loadscreen__label:empty { display: none; }
#loading .overlay__eyebrow { font: 700 clamp(2rem, 6.4vw, 3.8rem)/1.05 var(--font-display); letter-spacing: 0.04em; text-transform: none; color: #fff7ea; text-shadow: 0 3px 18px rgba(0, 0, 0, 0.65); }
.loadscreen__blurb { margin: 2px 0 12px; max-width: 54ch; font-size: 1rem; line-height: 1.45; color: #e3ebe4; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8); }
.loadscreen__blurb:empty { display: none; }
.loadscreen__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.loadscreen__bar .loader { flex: none; width: min(280px, 60vw); margin: 0; }
.loadscreen__bar .overlay__text { margin: 0; font-size: 0.88rem; color: #cfdcd1; }
.loadscreen__tip { margin: 0; max-width: 62ch; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.82rem; line-height: 1.45; color: #b9c8bd; }
.loadscreen__tip:empty { display: none; }
/* straight onto a video call: who is being rung, in the middle, while the world loads */
#loading.is-video .loadscreen__call { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: auto; color: #e6efe8; font-weight: 600; }
#loading.is-video .loadscreen__logo { margin-bottom: 0; }
#loading.is-video .loadscreen__call img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: #1d2a22; animation: ca-pulse 1.6s ease-out infinite; }

/* start */
#start {
  align-items: stretch; justify-content: flex-start; padding: 0; -webkit-backdrop-filter: none; backdrop-filter: none;
  background: linear-gradient(180deg, rgba(4, 9, 6, 0.45) 0%, rgba(4, 9, 6, 0.84) 22%, rgba(4, 9, 6, 0.95) 50%);
}
.startscreen {
  position: relative; display: flex; flex-direction: column; width: 100%; max-height: 100%; margin-top: auto; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  padding: calc(18px + var(--sat, 0px)) calc(18px + var(--sar, 0px)) calc(18px + var(--sab, 0px)) calc(18px + var(--sal, 0px)); scrollbar-width: thin;
}
.startscreen > * { flex: none; }
.startscreen__brief .overlay__title { margin-bottom: 8px; }
.startscreen__brief .overlay__text { font-size: 0.95rem; }
.startscreen__save { color: #8ff0b5; }
.startscreen .overlay__actions { max-width: 460px; }
.overlay__actions #btn-continue:not([hidden]) ~ #btn-new { min-height: 54px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015)), var(--glass); border-color: var(--edge); color: var(--text); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28); }
.overlay__actions #btn-continue:not([hidden]) ~ #btn-new .gbtn__label { font-size: 1.05rem; }
.overlay__actions #btn-continue:not([hidden]) ~ #btn-new::before { background: var(--sel); }
.overlay__actions #btn-continue:not([hidden]) ~ #btn-new:hover, .overlay__actions #btn-continue:not([hidden]) ~ #btn-new:focus-visible { border-color: rgba(255, 190, 110, 0.85); box-shadow: var(--sel-glow), 0 8px 22px rgba(0, 0, 0, 0.35); }
/* who takes the field leg: a face each; the chosen one's line underneath (or the one under the pointer) */
#character-picker { position: relative; display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 0; padding-bottom: 3.2em; }
#character-picker .picker__label { flex-basis: 100%; margin-bottom: 2px; }
#character-picker .picker__btn { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 62px; padding: 6px 2px 5px; border-radius: 14px; border: 1px solid transparent; background: none; color: #dfe8e1; font: 600 0.74rem var(--font-body); text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#character-picker .picker__btn img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #1d2a22; border: 2px solid rgba(255, 255, 255, 0.22); }
#character-picker .picker__btn b { font-weight: 600; }
#character-picker .picker__btn span { position: absolute; left: 0; right: 0; bottom: 0; display: none; font-size: 0.78rem; font-weight: 500; line-height: 1.35; color: #b7c2b9; text-align: left; }
#character-picker .picker__btn.is-active { border-color: #ff8a3d; background: rgba(255, 138, 61, 0.14); }
#character-picker .picker__btn.is-active img { border-color: #ff8a3d; }
#character-picker .picker__btn.is-active span { display: block; }
#character-picker:has(.picker__btn:not(.is-active):is(:hover, :focus-visible)) .picker__btn.is-active span { display: none; }
#character-picker .picker__btn:is(:hover, :focus-visible) span { display: block; }
#character-picker .picker__btn:hover, #character-picker .picker__btn:focus-visible { border-color: var(--sel); background: rgba(255, 177, 92, 0.1); outline: none; }
@media (max-width: 420px) {
  #character-picker { gap: 3px; padding-bottom: 4.2em; }
  #character-picker .picker__btn { width: calc((100% - 15px) / 6); min-width: 0; font-size: 0.68rem; }
  #character-picker .picker__btn img { width: 40px; height: 40px; }
}
.startscreen__more, .startscreen__callmore { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.startscreen__callmore { display: none; }
@media (pointer: fine) { .startscreen__more .chip { min-height: 38px; padding: 5px 12px; font-size: 0.8rem; } }
.startscreen, .pausemenu, .completecard { scrollbar-color: rgba(255, 255, 255, 0.22) transparent; }
/* the Chapters and Controls panels cover the start screen */
.startpanel {
  position: fixed; inset: 0; z-index: 3; display: flex; flex-direction: column; gap: 12px;
  padding: calc(16px + var(--sat, 0px)) calc(16px + var(--sar, 0px)) calc(16px + var(--sab, 0px)) calc(16px + var(--sal, 0px));
  background: rgba(4, 9, 6, 0.9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.startpanel[hidden] { display: none; }
.startpanel > * { width: 100%; max-width: 1180px; margin-inline: auto; }
.startpanel__body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; overflow: auto; }
#chapter-picker { overflow: hidden; }
#start-controls .controls { padding: 14px 16px; border-radius: 16px; border: 1px solid var(--edge); background: rgba(255, 255, 255, 0.04); }
/* the trophies (game/trophies-ui.js) cover the start, pause or completion screen they were opened from */
#trophies-panel { z-index: 25; background: rgba(4, 9, 6, 0.93); }
#trophies-panel .startpanel__body { overflow-x: hidden; padding: 4px; margin: -4px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.22) transparent; }
/* a screen on its side: the briefing down the left, the world on the right */
@media (orientation: landscape) {
  #start { background: linear-gradient(90deg, rgba(4, 9, 6, 0.95) 0%, rgba(4, 9, 6, 0.86) 36%, rgba(4, 9, 6, 0.25) 64%, rgba(4, 9, 6, 0) 100%); }
  .startscreen { width: min(600px, 56vw); height: 100%; max-height: none; margin-top: 0; justify-content: safe center; padding-left: calc(max(3.5vw, 18px) + var(--sal, 0px)); }
}
.startscreen__readmore { display: none; }
/* a phone on its side: three lines of the briefing (Read more opens the rest), so the buttons are on the first screen */
@media (orientation: landscape) and (max-height: 540px) {
  .startscreen { width: min(560px, 60vw); justify-content: flex-start; padding-top: calc(10px + var(--sat, 0px)); padding-bottom: calc(10px + var(--sab, 0px)); }
  .startscreen__brief .overlay__title { font-size: 1.6rem; margin: 2px 0 6px; }
  .startscreen__brief .overlay__text { margin-bottom: 2px; font-size: 0.84rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .startscreen__brief.is-open .overlay__text { display: block; }
  .startscreen__readmore { display: inline-flex; align-items: center; min-height: 32px; margin: 0 0 6px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--edge); background: none; color: #ffd48f; font: 600 0.76rem var(--font-body); cursor: pointer; }
  .startscreen__readmore:hover, .startscreen__readmore:focus-visible { border-color: var(--sel); outline: none; }
  .startscreen .gbtn--tall { min-height: 52px; }
  .startscreen .gbtn { min-height: 46px; }
}
/* straight onto a video call (the main menu's Video call): their face over their picture, where they are, one button;
   on the full start screen after that, the call button stays the call's green */
#start #btn-video-start.cbtn--primary { background: linear-gradient(135deg, #52e896, #22b565); border-color: rgba(200, 255, 220, 0.55); color: #062112; box-shadow: 0 10px 28px rgba(61, 220, 132, 0.3); }
#start #btn-video-start.cbtn--primary::before { background: #eafff2; }
.callcard { display: none; }
#start.is-video { align-items: center; justify-content: center; background: #0b100d; }
#start.is-video .startscreen { width: min(440px, 100%); height: auto; max-height: 100%; margin: auto; align-items: center; justify-content: flex-start; text-align: center; }
#start.is-video .callcard { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.callcard__bg { position: fixed; inset: -40px; z-index: -1; background-size: cover; background-position: center 20%; filter: blur(28px) brightness(0.45) saturate(1.1); }
.callcard__face { width: 132px; height: 132px; margin-bottom: 8px; border-radius: 50%; object-fit: cover; background: #1d2a22; animation: ca-pulse 1.6s ease-out infinite; }
.callcard__eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: #8ff0b5; }
.callcard__name { font-size: 1.6rem; font-weight: 700; }
.callcard__place { color: #dfe8e1; font-size: 0.95rem; }
.callcard__note { color: #a9bcae; font-size: 0.82rem; }
#start.is-video .startscreen__brief, #start.is-video #character-picker, #start.is-video .startscreen__more, #start.is-video #btn-continue, #start.is-video #btn-new, #start.is-video .overlay__check { display: none; }
#start.is-video .overlay__actions { width: 100%; max-width: 360px; margin: 22px 0 4px; }
#start.is-video #btn-video-start { justify-content: center; min-height: 60px; border-radius: 999px; border-color: transparent; background: #3ddc84; color: #062112; font-size: 1.1rem; font-weight: 700; box-shadow: 0 10px 30px rgba(61, 220, 132, 0.3); }
#start.is-video #btn-video-start::before { display: none; }
#start.is-video #btn-video-start:hover, #start.is-video #btn-video-start:focus-visible { transform: none; background: #52e896; box-shadow: 0 0 0 3px rgba(234, 255, 242, 0.85), 0 10px 30px rgba(61, 220, 132, 0.45); }
#start.is-video .startscreen__callmore { display: flex; justify-content: center; }

/* pause: a menu down the left over the dimmed world, where she is and what she is doing at the top */
#pause { justify-content: flex-start; background: linear-gradient(90deg, rgba(4, 9, 6, 0.95) 0%, rgba(4, 9, 6, 0.84) 34%, rgba(4, 9, 6, 0.4) 68%, rgba(4, 9, 6, 0.25) 100%); -webkit-backdrop-filter: blur(2px) saturate(0.8); backdrop-filter: blur(2px) saturate(0.8); }
.pausemenu { display: flex; flex-direction: column; gap: 4px; width: min(420px, 100%); max-height: 100%; overflow-x: hidden; overflow-y: auto; padding: 4px 8px 4px max(2.5vw, 4px); scrollbar-width: thin; }
.pausemenu__where { margin: 0; font-size: 0.82rem; letter-spacing: 0.04em; color: #cfe0d4; }
.pausemenu__goal { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: rgba(255, 255, 255, 0.06); font-size: 0.88rem; line-height: 1.4; color: #e6eee7; }
.pausemenu__list { margin-top: 12px; gap: 7px; }
.pausemenu__list .gbtn { min-height: 48px; font-size: 0.98rem; }
@media (orientation: portrait) and (max-width: 600px) {
  #pause { justify-content: center; background: rgba(4, 9, 6, 0.9); }
  .pausemenu { padding-left: 4px; }
}
@media (orientation: landscape) and (max-height: 540px) {
  #pause { padding-top: calc(10px + var(--sat, 0px)); padding-bottom: calc(10px + var(--sab, 0px)); }
  .pausemenu { width: min(660px, 100%); }
  .pausemenu .overlay__title { font-size: 1.3rem; margin: 2px 0 4px; }
  .pausemenu__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
  .pausemenu__list .gbtn { min-height: 44px; font-size: 0.88rem; padding: 4px 12px; }
}

/* complete: the chapter's picture with a stamp, what happened, the numbers, where next */
#complete { background: radial-gradient(120% 120% at 50% 100%, rgba(6, 18, 10, 0.72), rgba(3, 8, 5, 0.9)); }
.completecard { width: min(540px, 100%); max-height: 100%; overflow-x: hidden; overflow-y: auto; border-radius: 22px; border: 1px solid rgba(255, 214, 160, 0.3); background: rgba(12, 22, 16, 0.95); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(255, 150, 60, 0.12); scrollbar-width: thin; }
.completecard__art { position: relative; }
.completecard__art .overlay__art { margin: 0; border-radius: 0; aspect-ratio: 16 / 8; }
.completecard__stamp { position: absolute; left: 50%; bottom: -15px; transform: translateX(-50%); padding: 7px 18px; border-radius: 999px; background: linear-gradient(135deg, #ffd27a, #ff9a4a); color: #2a1404; font: 700 0.76rem var(--font-body); letter-spacing: 0.22em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45); }
.completecard__body { padding: 28px 26px 22px; text-align: center; }
.completecard .stats { text-align: left; }
.completecard .overlay__menu .gbtn { justify-content: center; text-align: center; }
.completecard #btn-complete-next[hidden] + #btn-complete-continue { background: linear-gradient(135deg, #ffa458, #f06a1e 70%, #d9571a); border-color: rgba(255, 214, 160, 0.55); color: #1f0d03; }
@media (orientation: landscape) and (max-height: 540px) {
  .completecard { display: grid; grid-template-columns: 36% 1fr; width: min(860px, 100%); }
  .completecard__art .overlay__art { height: 100%; aspect-ratio: auto; }
  .completecard__stamp { bottom: 12px; }
  .completecard__body { padding: 16px 20px; text-align: left; }
  .completecard .overlay__menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .hud__top-center { display: none; }
  .hud__top-left { max-width: 55vw; }
  .controls { grid-template-columns: 1fr; }
}

/* poses and emotes popup */
.emotes { position: absolute; left: 50%; bottom: 86px; transform: translateX(-50%); width: min(680px, 94vw); background: rgba(8, 14, 11, 0.92); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 16px; padding: 12px 14px 10px; z-index: 30; pointer-events: auto; backdrop-filter: blur(6px); }
.emotes__head { display: flex; justify-content: space-between; align-items: center; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: #9db2a2; margin-bottom: 8px; }
.emotes__close { background: none; border: 0; color: inherit; cursor: pointer; font-size: 1rem; }
.emotes__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.emote { font: inherit; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.05); color: inherit; cursor: pointer; font-size: 0.76rem; }
.emote:hover { background: rgba(255, 138, 61, 0.22); border-color: rgba(255, 138, 61, 0.6); }
.emote__icon { font-size: 1.5rem; line-height: 1; }
.emotes__hint { margin-top: 8px; font-size: 0.74rem; color: #9db2a2; }
.emotes__tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 6px; -webkit-overflow-scrolling: touch; }
.emotes__tab { flex: 0 0 auto; font: inherit; font-size: 0.8rem; padding: 6px 11px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.05); color: #cfd9d0; cursor: pointer; white-space: nowrap; }
.emotes__tab:hover { border-color: rgba(255, 138, 61, 0.6); }
.emotes__tab.is-active { background: rgba(255, 138, 61, 0.25); border-color: rgba(255, 138, 61, 0.75); color: #fff; }
.emotes__tab:focus-visible, .emote:focus-visible { outline: 2px solid #ffc46e; outline-offset: 2px; }
/* a fixed height, so the popup is the same size whichever tab is on */
.emotes__grid { height: min(46vh, 330px); align-content: start; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.emote { position: relative; }
.emote__del { position: absolute; top: 2px; right: 6px; font-size: 0.75rem; opacity: 0.6; }
.emote__del:hover { opacity: 1; color: #ff8a3d; }
.emote__note { position: absolute; top: 3px; left: 6px; font-size: 0.6rem; letter-spacing: 0.06em; text-transform: uppercase; color: #8fa596; }
/* the popup's scrollbars (the tab row across, the moves down) in the game's orange on a faint track: Firefox takes the
   standard properties; Chrome, Edge and Safari the -webkit- ones, which draw a rounded thumb with no arrow buttons */
.emotes__tabs, .emotes__grid { scrollbar-width: thin; scrollbar-color: rgba(255, 138, 61, 0.75) rgba(255, 255, 255, 0.06); }
@supports selector(::-webkit-scrollbar) {
  .emotes__tabs, .emotes__grid { scrollbar-width: auto; scrollbar-color: auto; }
  .emotes__grid::-webkit-scrollbar { width: 8px; }
  .emotes__tabs::-webkit-scrollbar { height: 6px; }
  .emotes__tabs::-webkit-scrollbar-track, .emotes__grid::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.06); border-radius: 999px; }
  .emotes__grid::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--accent-2), var(--accent)); border-radius: 999px; border: 1px solid rgba(8, 14, 11, 0.55); }
  .emotes__tabs::-webkit-scrollbar-thumb { background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 999px; border: 1px solid rgba(8, 14, 11, 0.55); }
  .emotes__tabs::-webkit-scrollbar-thumb:hover, .emotes__grid::-webkit-scrollbar-thumb:hover { background: #ffc46e; }
  .emotes__tabs::-webkit-scrollbar-button, .emotes__grid::-webkit-scrollbar-button { display: none; }
  .emotes__tabs::-webkit-scrollbar-corner, .emotes__grid::-webkit-scrollbar-corner { background: transparent; }
}
.emotes__empty { grid-column: 1 / -1; margin: 6px 2px; font-size: 0.85rem; color: #9db2a2; }

/* ---- Touch controls (phones and tablets) ---- */
.touch { position: fixed; inset: 0; z-index: 12; touch-action: none; -webkit-user-select: none; user-select: none; pointer-events: none; -webkit-tap-highlight-color: transparent; }
.touch[hidden] { display: none; }
body:not(.is-playing) .touch, body.cdlg-open .touch { display: none; }
.touch__zone { position: absolute; top: 28%; bottom: 0; pointer-events: auto; }
.touch__zone--move { left: 0; width: 46%; }
.touch__zone--look { right: 0; width: 54%; }
.touch__stick { position: absolute; width: 124px; height: 124px; margin: -62px 0 0 -62px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); border: 2px solid rgba(255, 255, 255, 0.28); pointer-events: none; }
.touch__stick[hidden] { display: none; }
.touch__knob { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: rgba(255, 255, 255, 0.5); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45); }
.touch__buttons { position: absolute; right: max(18px, env(safe-area-inset-right)); bottom: max(22px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: flex-end; gap: 12px; pointer-events: auto; }
.touch__btn { width: 64px; height: 64px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); background: rgba(10, 20, 14, 0.55); color: #fff; font-size: 1.35rem; line-height: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; touch-action: none; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.touch__btn span { font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; font-family: var(--font-body); }
.touch__btn--jump { width: 80px; height: 80px; font-size: 1.7rem; }
.touch__btn.is-down { transform: scale(0.94); background: rgba(255, 255, 255, 0.25); }
.touch__btn.is-on { background: rgba(255, 138, 61, 0.55); border-color: rgba(255, 178, 92, 0.9); }
.touch__btn.is-active { border-color: rgba(61, 220, 132, 0.9); background: rgba(61, 220, 132, 0.35); }
/* the talk button, at the top of the column above run while a call is on: hold to talk from the main view (the first hold switches a hands-free call to hold to talk) */
.touch__btn--talk { border-color: rgba(255, 255, 255, 0.55); }
.touch__btn--talk[hidden] { display: none; }
.touch__btn--talk.is-hold { border-color: rgba(61, 220, 132, 0.9); }
.touch__btn--talk.is-talking, .touch__btn--talk.is-talking.is-down { background: #3ddc84; border-color: #3ddc84; color: #062112; }
.touch__btn--talk.is-talking span { opacity: 1; }
/* free flight on a touch screen (engine/client/core/touch.js setDrone): the height slider by the buttons. A little
   push climbs slowly, all the way climbs quickly, and letting go holds the height. ▲ and ▼ hold for the same. */
.touch__lift {
  position: absolute; right: max(94px, calc(env(safe-area-inset-right) + 94px)); bottom: max(22px, env(safe-area-inset-bottom));
  width: 66px; height: min(46vh, 260px); border-radius: 999px; pointer-events: auto; touch-action: none;
  background: linear-gradient(180deg, rgba(61, 220, 132, 0.12), rgba(10, 20, 14, 0.5) 45%, rgba(255, 138, 61, 0.12));
  border: 2px solid rgba(255, 255, 255, 0.3); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.touch__lift[hidden] { display: none; }
.touch__lift::before, .touch__lift::after { position: absolute; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, 0.6); font-size: 0.9rem; line-height: 1; }
.touch__lift::before { content: '▲'; top: 8px; }
.touch__lift::after { content: '▼'; bottom: 8px; }
.touch__lift.is-on { border-color: rgba(255, 178, 92, 0.9); }
.touch__liftknob {
  position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; transform: translate(-50%, -50%); border-radius: 50%;
  background: rgba(255, 255, 255, 0.55); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}
.touch__liftlabel {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none;
  font: 700 0.56rem var(--font-body); letter-spacing: 0.1em; text-transform: uppercase; color: rgba(10, 20, 14, 0.75);
}
.touch__btn--back { border-color: rgba(120, 200, 255, 0.8); }
.touch__btn--back[hidden] { display: none; }
body.is-drone .touch__zone--move { top: 18%; }
.touch__rotate { display: none; position: absolute; top: max(64px, calc(env(safe-area-inset-top) + 52px)); left: 50%; transform: translateX(-50%); padding: 6px 12px; border-radius: 999px; background: rgba(10, 20, 14, 0.6); color: #dfe8e0; font-size: 0.78rem; font-family: var(--font-body); white-space: nowrap; }
@media (orientation: portrait) { .touch__rotate { display: block; } }
body.is-touch .hud__btn { width: 44px; height: 44px; font-size: 1.15rem; }
body.is-touch .hud__top-right { top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); }
body.is-touch .hud__top-left { top: max(12px, env(safe-area-inset-top)); left: max(12px, env(safe-area-inset-left)); max-width: 46vw; }
body.is-touch .prompt { pointer-events: auto; cursor: pointer; bottom: 27%; max-width: calc(100vw - 250px); white-space: normal; text-align: center; }
body.is-touch .subtitle { left: max(12px, env(safe-area-inset-left)); right: max(116px, calc(env(safe-area-inset-right) + 116px)); bottom: max(14px, env(safe-area-inset-bottom)); transform: none; max-width: none; font-size: 0.92rem; }
body.is-touch .toasts { right: max(116px, calc(env(safe-area-inset-right) + 116px)); bottom: max(18px, env(safe-area-inset-bottom)); max-width: min(340px, 58vw); }
body.is-touch .hud__top-left { max-width: 40vw; }
body.is-touch .touch__rotate { top: auto; bottom: 42%; }
body.is-touch #controls-keys { display: none; }
body:not(.is-touch) #controls-touch { display: none; }

.hud__btn.is-on { background: rgba(255, 178, 92, 0.45); border-color: rgba(255, 210, 122, 0.8); }
/* the supply drone: a shade sweeps away as it reloads; a green pulse while it is on its way */
.hud__btn--supply { position: relative; overflow: hidden; }
.hud__btn--supply::before { content: ''; position: absolute; inset: 0; background: conic-gradient(rgba(0, 0, 0, 0.62) calc(var(--left, 0) * 1turn), transparent 0); pointer-events: none; }
.hud__btn--supply.is-ready { border-color: rgba(255, 210, 122, 0.75); }
.hud__btn--supply.is-flying { border-color: rgba(143, 240, 181, 0.9); animation: supply-pulse 1.2s ease-in-out infinite; }
.hud__btn--supply.is-flying::before { background: none; }
.hud__btn--supply.is-off { opacity: 0.4; }
@keyframes supply-pulse { 50% { box-shadow: 0 0 12px rgba(143, 240, 181, 0.75); } }
/* the mouse is free while playing (the browser refused the lock): say how to take it back */
.lockhint { position: absolute; left: 50%; top: 60%; transform: translateX(-50%); padding: 7px 14px; border-radius: 999px; background: rgba(6, 14, 9, 0.66); border: 1px solid rgba(255, 255, 255, 0.16); color: #fff; font-size: 0.82rem; pointer-events: none; }
.lockhint[hidden] { display: none; }
/* a phone in landscape (last, so it beats the touch rule above): four buttons stacked reach the top-right HUD, so on touch the HUD's corner group moves left of the column */
@media (max-height: 480px) {
  body.is-touch .hud__top-right { right: calc(max(18px, env(safe-area-inset-right)) + 84px); }
  body.is-touch .hud__top-left { max-width: min(40vw, max(220px, calc(100vw - 540px))); }   /* the objective stops short of the shifted group */
}
/* the narrowest phones in landscape (iPhone SE class): smaller HUD buttons and a shorter objective so the shifted group still fits */
@media (max-height: 480px) and (max-width: 700px) {
  body.is-touch .hud__btn { width: 40px; height: 40px; font-size: 1.05rem; }
  body.is-touch .hud__buttons { gap: 4px; }
  body.is-touch .hud__top-left { max-width: 200px; }
}
/* the call button: the main control, so it is bigger and green; red while a call is on */
.hud__btn--call { width: 52px; height: 40px; background: rgba(61, 220, 132, 0.55); border-color: rgba(143, 240, 181, 0.9); font-size: 1.25rem; }
.hud__btn--call:hover { background: rgba(61, 220, 132, 0.75); }
.hud__btn--call.is-on-call, .hud__btn--call.is-on-call:hover { background: rgba(229, 72, 77, 0.7); border-color: rgba(255, 150, 150, 0.9); }
body.is-touch .hud__btn--call { width: 60px; height: 44px; font-size: 1.35rem; }

/* ---- bonus scenes (game/bonus/): the panel of a chapter's scenes, and the cards some scenes put up ---- */
#bonus { z-index: 25; background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--c3, #0a140e) 55%, transparent), transparent 70%), rgba(4, 9, 6, 0.92); }
.bonus-count { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: #ff8a3d; color: #1a0c04; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.02em; vertical-align: 1px; }
.bonus-count[hidden] { display: none; }
.gbtn .bonus-count { margin-left: auto; }
.bonus-grid {
  display: grid; gap: 14px; align-content: start; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  padding: 5px 5px 14px;
}
#bonus .startpanel__body { overflow-x: hidden; }
.bonus-tile {
  position: relative; display: flex; flex-direction: column; min-width: 0; padding: 0; border-radius: 16px; overflow: hidden; text-align: left; cursor: pointer;
  color: var(--text, #fff); font: inherit; background: linear-gradient(160deg, var(--c1, #f6cf8e), var(--c2, #a0703c) 55%, var(--c3, #2e2317));
  border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; -webkit-tap-highlight-color: transparent;
}
/* a strip of film across the top and bottom of the picture */
.bonus-tile__art { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 7; overflow: hidden; background: radial-gradient(90% 120% at 50% 110%, color-mix(in srgb, var(--c1, #f6cf8e) 45%, transparent), transparent 70%), linear-gradient(160deg, var(--c2, #a0703c), var(--c3, #2e2317)); }
.bonus-tile__art::before, .bonus-tile__art::after { content: ''; position: absolute; left: 0; right: 0; height: 13px; background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0 9px, transparent 9px 14px, rgba(0, 0, 0, 0.55) 14px 22px); opacity: 0.55; }
.bonus-tile__art::before { top: 0; }
.bonus-tile__art::after { bottom: 0; }
.bonus-tile__icon { font-size: clamp(2.2rem, 5vw, 2.8rem); line-height: 1; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.4)); transition: transform 0.25s ease; }
.bonus-tile__go { position: absolute; z-index: 1; right: 12px; bottom: 18px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #ff8a3d; color: #1a0c04; font-size: 0.8rem; opacity: 0; transform: scale(0.7); transition: opacity 0.15s ease, transform 0.15s ease; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4); }
.bonus-tile__body { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; background: rgba(8, 14, 11, 0.84); }
.bonus-tile__kind { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-2, #ffd48f); }
.bonus-tile__name { font: 700 1.06rem/1.2 var(--font-display); letter-spacing: 0.02em; }
.bonus-tile__blurb { font-size: 0.8rem; line-height: 1.38; color: #c3cfc5; }
.bonus-tile__state { align-self: flex-start; margin-top: 7px; padding: 3px 9px; border-radius: 999px; background: #ff8a3d; color: #1a0c04; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.03em; }
.bonus-tile__state.is-seen { background: rgba(61, 220, 132, 0.16); color: #8ff0b5; }
.bonus-tile:hover, .bonus-tile:focus-visible { transform: translateY(-3px); border-color: rgba(255, 190, 110, 0.9); box-shadow: 0 0 0 2px rgba(255, 177, 92, 0.45), 0 16px 34px rgba(0, 0, 0, 0.5); outline: none; }
.bonus-tile:hover .bonus-tile__go, .bonus-tile:focus-visible .bonus-tile__go { opacity: 1; transform: none; }
.bonus-tile:hover .bonus-tile__icon, .bonus-tile:focus-visible .bonus-tile__icon { transform: scale(1.12); }
@media (orientation: landscape) and (max-height: 540px) {
  .bonus-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 10px; }
  .bonus-tile__art { aspect-ratio: 16 / 5; }
  .bonus-tile__blurb { display: none; }
}

/* the postcard: the selfie she just took, with a stamp, a postmark and a line to Base */
.bonus-post { position: absolute; inset: 12vh 0; display: grid; place-items: center; pointer-events: none; padding: 12px; }
.bonus-post__card {
  width: min(84vw, 760px, calc((76vh - 24px) * 1.62)); aspect-ratio: 1.62; display: grid; grid-template-columns: 60% 1fr; gap: 14px; padding: clamp(8px, 1.4vw, 14px);
  border-radius: 6px; background: #fbf5e8; color: #2b2118; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 2px 0 rgba(255, 255, 255, 0.4) inset;
  transform: translateY(46px) rotate(-7deg) scale(0.86); opacity: 0; transition: transform 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.12), opacity 0.45s;
}
.bonus-post.is-on .bonus-post__card { transform: rotate(-2.5deg); opacity: 1; }
.bonus-post.is-gone .bonus-post__card { transform: translateY(-40px) rotate(4deg) scale(0.94); opacity: 0; transition-duration: 0.6s, 0.5s; }
.bonus-post__photo { min-height: 0; overflow: hidden; border-radius: 2px; background: #1a1a1a; }
.bonus-post__photo img { display: block; width: 100%; height: 100%; object-fit: cover; filter: saturate(1.08) contrast(1.04) sepia(0.1); }
.bonus-post__back { --stamp: clamp(44px, 7vw, 66px); position: relative; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: clamp(4px, 1vh, 10px); padding: 4px 2px 4px 12px; border-left: 1px dashed rgba(90, 70, 50, 0.35); }
.bonus-post__stamp { position: absolute; right: 0; top: 0; width: var(--stamp); aspect-ratio: 0.84; display: grid; place-items: end center; padding: 4px; background: linear-gradient(160deg, var(--c2, #a0703c), var(--c3, #3a2418)); outline: 3px dotted #fbf5e8; outline-offset: -2px; box-shadow: 0 0 0 1px rgba(90, 70, 50, 0.25); }
.bonus-post__stamp span { font: 700 clamp(0.4rem, 0.8vw, 0.52rem)/1.1 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; text-align: center; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.bonus-post__mark { position: absolute; right: calc(var(--stamp) + 7px); top: clamp(6px, 1.6vw, 16px); width: clamp(62px, 9vw, 88px); aspect-ratio: 1; display: grid; place-items: center; border: 2px solid rgba(40, 40, 70, 0.55); border-radius: 50%; text-align: center; font: 700 clamp(0.42rem, 0.8vw, 0.56rem)/1.3 var(--font-body); letter-spacing: 0.1em; text-transform: uppercase; color: rgba(40, 40, 70, 0.72); transform: rotate(-14deg); padding: 6px; }
.bonus-post__text { margin: 0; font: 600 clamp(1rem, 2.5vw, 1.7rem)/1.12 'Caveat', 'Segoe Print', 'Bradley Hand', cursive; color: #1f2a5a; }
.bonus-post__to { margin: 0; padding-top: 6px; border-top: 1px solid rgba(90, 70, 50, 0.3); font: 600 clamp(0.8rem, 1.7vw, 1.15rem)/1.25 'Caveat', 'Segoe Print', 'Bradley Hand', cursive; color: #4a3a2a; }
@media (orientation: portrait) {
  .bonus-post__card { width: min(88vw, calc((76vh - 24px) * 0.72)); aspect-ratio: 0.72; grid-template-columns: none; grid-template-rows: 58% 1fr; }
  .bonus-post__back { border-left: 0; border-top: 1px dashed rgba(90, 70, 50, 0.35); padding: 10px 2px 2px; }
}

/* the clapperboard before each outtake */
.bonus-slate { position: absolute; left: 50%; top: 50%; width: min(420px, 78vw); transform: translate(-50%, -38%) scale(0.9); opacity: 0; transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2), opacity 0.25s; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.6)); pointer-events: none; }
.bonus-slate.is-on { transform: translate(-50%, -50%); opacity: 1; }
.bonus-slate.is-gone { transform: translate(-50%, -66%); opacity: 0; }
.bonus-slate__clap { position: relative; height: 34px; }
.bonus-slate__clap i { position: absolute; inset: 0; border-radius: 6px 6px 0 0; background: repeating-linear-gradient(-45deg, #141414 0 20px, #f2f2f2 20px 40px); transform-origin: 3% 100%; transform: rotate(-20deg); transition: transform 0.1s ease-in; }
.bonus-slate.is-clapped .bonus-slate__clap i { transform: none; }
.bonus-slate__board { display: grid; gap: 8px; padding: 0 16px 14px; border-radius: 0 0 8px 8px; background: #1b1b1b; color: #f2f2f2; font: 600 0.85rem var(--font-body); }
.bonus-slate__board::before { content: ''; height: 16px; margin: 0 -16px 4px; background: repeating-linear-gradient(45deg, #141414 0 20px, #f2f2f2 20px 40px); }
.bonus-slate__row { display: flex; gap: 10px; align-items: baseline; padding-bottom: 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.22); }
.bonus-slate__row span { font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: #a8a8a8; }
.bonus-slate__row b { flex: 1; min-width: 0; font: 600 clamp(1.1rem, 3vw, 1.45rem)/1.1 'Caveat', 'Segoe Print', 'Bradley Hand', cursive; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-reduced-motion: reduce) { .bonus-post__card, .bonus-slate { transition-duration: 0.01s; } }
