:root { color-scheme: dark; font-family: "Helvetica Neue", Arial, sans-serif; color: #f8f4e3; --line: #eee8c438; --ink: #172922; --panel: #20231fdc; --accent: #d5b882; }
* { box-sizing: border-box; }
body { margin: 0; overflow: hidden; background: #a7b7ac; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; outline: none; touch-action: none; }
.mast, .hud, footer { position: fixed; inset-inline: 0; pointer-events: none; }
.mast { top: 0; padding: 24px 30px 44px; display: flex; align-items: flex-start; justify-content: space-between; background: linear-gradient(#17291f85,transparent); }
.world-name, .presence, #compass, .map-title, footer, .shortcuts, .guide-heading { display: flex; align-items: center; }
.world-name h1 { text-transform:none; white-space:nowrap; }
.world-name { gap: 12px; text-shadow: 0 1px 6px #17291f70; }
.subhead, .map-title, #compass { text-transform: uppercase; letter-spacing: .16em; font-size: 10px; font-weight: 700; }
h1,h2 { margin: 0; font-family: "Arial Narrow", "Helvetica Neue", sans-serif; font-weight: 750; text-transform: uppercase; }
h1 { font-size: 22px; letter-spacing: .045em; line-height: 1.07; }
#compass { position: absolute; left: 50%; transform: translateX(-50%); width: 166px; justify-content: space-around; padding: 5px 0 10px; color: #fffbee; text-shadow: 0 1px 4px #112018; background: linear-gradient(90deg,transparent,#18261d55,transparent); border-bottom: 1px solid #f6f5db82; }
#compass b { color: #ffdda0; }
#compass:after { content: ''; position: absolute; left: calc(50% - 3px); bottom: -6px; border: 3px solid transparent; border-top-color: var(--accent); }
.presence { gap: 8px; padding: 8px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 2px; font-weight: 600; font-size: 12px; }
.presence i { width: 7px; height: 7px; border-radius: 50%; background: #e8c478; }
.presence.online i { background: #a8d693; }
#holster-control { pointer-events:auto; padding:4px 8px; background:var(--panel); border:1px solid var(--line); border-radius:3px; font-size:12px; }
#holster-control:hover,#holster-control:focus-visible { border-color:var(--accent); }
.hud { bottom: 74px; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 30px; }
.location { text-shadow: 0 1px 9px #132419, 0 2px 3px #182820; }
.location h2 { font-size: clamp(21px,2.5vw,35px); letter-spacing: .025em; line-height: 1.1; }
.map-panel { width: 146px; border: 1px solid #c5ceaa70; border-radius: 1px; overflow: hidden; background: var(--panel); box-shadow: 0 3px 14px #1e251b44; }
.map-title { justify-content: space-between; padding: 7px 9px; letter-spacing: .12em; font-size: 9px; }
.map-title b { color: var(--accent); }
#map { display: block; width: 100%; height: auto; }
footer { bottom: 0; justify-content: space-between; padding: 12px 30px; background: #171b19db; border-top: 1px solid var(--line); font-size: 12px; }
.shortcuts { gap: 18px; }
.volume-control { display:flex; align-items:center; gap:12px; }
.volume-control { margin:10px 0; font-size:13px; }
.volume-control input { flex:1; min-width:0; accent-color:var(--accent); }
.volume-control output { min-width:3em; text-align:right; }
.session-controls { display:grid; justify-items:end; gap:6px; }
#sound-mute { display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:88px; min-height:32px; padding:5px 9px; pointer-events:auto; color:#f8f4e3; background:var(--panel); border:1px solid var(--line); border-radius:2px; font-size:12px; font-weight:600; }
#sound-mute kbd { margin:0; }
#sound-mute:hover, #sound-mute:focus-visible { border-color:var(--accent); }
#sound-mute[aria-pressed="true"] { color:var(--accent); }
kbd { font-family: inherit; font-size: 10px; font-weight: 600; letter-spacing: .04em; background: #ffffff0d; border: 1px solid #c9d0bd63; border-radius: 3px; padding: 2px 5px; margin-right: 3px; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: transparent; }
#map-choice, footer button, #guide { pointer-events: auto; }
footer button { padding: 4px; }
footer button kbd { margin: 0 0 0 4px; }
#guide, #notice { position: fixed; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 8px 32px #13201955; border-radius: 6px; }
#guide { right: 30px; bottom: 60px; padding: 18px 20px; width: min(330px,94vw); }
.guide-heading { justify-content: space-between; }
.guide-heading button { font-size: 24px; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 8px; font-size: 13px; margin-bottom: 0; }
dd { text-align: right; color: var(--accent); margin: 0; }
#notice { left: 50%; top: 32%; transform: translateX(-50%); padding: 12px 18px; font-size: 14px; text-align: center; }
@media(max-width:700px) { .mast { padding: 14px; } .hud { padding: 0 14px; bottom: 60px; } footer { padding: 10px 14px; } .shortcuts { gap: 8px; } #compass { width: 96px; } .map-panel { width: 105px; } }
@media(max-width:520px) { #compass, .shortcuts span:nth-child(n+3) { display: none; } }

.kit-row { display: flex; align-items: center; gap: 10px; font-size: 12px; margin-top: 7px; }
.kit-row strong { color: var(--accent); }
#field-prompt { display: inline-block; margin-top: 6px; padding: 4px 8px; border-radius: 3px; background: var(--panel); color: #f0efda; font-size: 12px; }
#field-prompt:empty { display: none; }

#guide { max-height: calc(100% - 75px); overflow-y: auto; }

.health-readout { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 11px; font-weight: 600; }
#hp-meter { width: 72px; height: 11px; accent-color: #c3bea8; }
#vehicle-fuel { white-space: nowrap; font-variant-numeric: tabular-nums; }
#vehicle-fuel.low-fuel { color: #ffd082; }
#fuel-meter { width: 42px; height: 11px; vertical-align: middle; }
#touch-actions:has([data-action=KeyU]:not([hidden])) [data-action=KeyE] { grid-area: 1/1; }
#touch-actions [data-action=KeyU] { grid-area: 1/2; }
#life-status { color: #baf1f4; }

#supply-card { position: fixed; left: 30px; top: 90px; width: 232px; max-width: 45vw; padding: 10px 12px; background: var(--panel); border-left: 3px solid #e2b15f; border-radius: 0 4px 4px 0; pointer-events: none; }
.match-score { display:flex;gap:14px;border-top:1px solid var(--line);margin-top:7px;padding-top:5px;font-size:11px;font-variant-numeric:tabular-nums; }
.match-score b {margin-left:3px;}
#supply-step { color: #ebcb8c; font-size: 9px; }
.supply-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin: 3px 0; }
#supply-name { font-size: 15px; }
#supply-bearing { white-space: nowrap; color: #ebcb8c; font-size: 10px; }
#supply-action { display: block; font-size: 12px; line-height: 1.35; }
#supply-hold { width: 100%; height: 5px; accent-color: #e2b15f; }
@media(max-width:700px) { #supply-card { left: 14px; top: 65px; } }
@media(min-width:800px) and (max-height:450px) { #supply-card { left:auto; right:188px; } }

#compass { column-gap: 7px; padding-inline: 10px; background: linear-gradient(90deg,transparent,#171a1799,transparent); }
#degrees { color: #f4f0df; font-variant-numeric: tabular-nums; letter-spacing: .05em; }

#map-choice { color: #f1eee0; background: #27332deb; border: 1px solid var(--line); padding: 5px; border-radius: 2px; cursor: pointer; }
@media(max-width:700px) { .world-name { flex-direction:column;align-items:flex-start;gap:4px } }

#game:not(.look-paused):hover,#game.captured {cursor:none}
#play-reticle {
  position:fixed; left:50%; top:50%; transform:translate(-50%,-50%);
  width:13px;height:13px;pointer-events:none;display:none;
  background:linear-gradient(#fff8e6,#fff8e6) center/1px 100% no-repeat,
    linear-gradient(#fff8e6,#fff8e6) center/100% 1px no-repeat;
  filter:drop-shadow(0 0 1px #231f18);
}
#game.armed:not(.look-paused):hover + #play-reticle,#game.armed.captured + #play-reticle {display:block}
#game.spear-sight + #play-reticle {display:block;width:13px;height:13px}
#game.sighted + #play-reticle {width:3px;height:3px;border-radius:50%;background:#fc876c}
#game.bow-sight + #play-reticle {
  display:block; width:42px; height:42px; border:2px solid #413b2e; border-radius:50%;
  box-shadow:0 0 0 1px #d9d1a376, inset 0 0 0 1px #d9d1a376;
  background:radial-gradient(circle,#ffb86e 0 1.5px,transparent 2px),
    linear-gradient(#3b3429,#3b3429) left center/10px 2px no-repeat,
    linear-gradient(#3b3429,#3b3429) right center/10px 2px no-repeat,
    linear-gradient(#3b3429,#3b3429) center bottom/2px 13px no-repeat;
}
#notice { pointer-events:none }

#damage-edges {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(128, 15, 18, .16) 68%, rgba(142, 16, 19, .55) 88%, rgba(105, 9, 15, .80) 100%);
  opacity: 0;
  transition: opacity 460ms ease-out;
}
#damage-edges.directional { mask-image:linear-gradient(var(--strike-angle),transparent 20%,rgba(0,0,0,.13) 46%,#000 86%); }
#damage-edges.struck { opacity: .85; transition-duration: 90ms; }
@media (prefers-reduced-motion: reduce) {
  #damage-edges { transition-duration: 230ms; }
  #damage-edges.struck { opacity: .44; transition-duration: 80ms; }
}

#match-card { position:fixed; top:90px; left:30px; width:258px; max-width:72vw; padding:12px 14px; background:var(--panel); border-left:3px solid var(--accent); font-size:13px; pointer-events:none; }
#match-card small {color:#d2d4c9;font-size:11px}
#mode-target,#mode-receipt {display:block;margin-top:4px}
.team-bill {display:flex;justify-content:space-between;margin-top:6px;font-variant-numeric:tabular-nums}
.team-bill:first-of-type {color:#9dddef}
.team-bill:nth-of-type(2) {color:#f6bb8a}
#mode-objective {border-top:1px solid var(--line);margin-top:8px;padding-top:8px;line-height:1.4}
@media(max-width:700px){#match-card{left:14px;top:78px}}

#launcher-status { color: #ffe6a1; font-size: 13px; margin-top: 5px; }

#flight-cursor { position:fixed; left:50%; top:50%; width:12px; height:12px; margin:-7px;
  border:1.5px solid #f5edcd; border-radius:50%; box-shadow:0 0 2px 1px #212827; pointer-events:none; }
#flight-cursor::after { content:''; position:absolute; inset:4px; background:#f5edcd; border-radius:50%; }
#play-reticle:has(+ #flight-cursor:not([hidden])) { display:block; }

#marina-card { position:fixed; top:90px; right:30px; width:205px; max-width:38vw; padding:9px 12px; background:var(--panel); border-right:3px solid #89ffe3; font-size:12px; }
#marina-card strong, #marina-card output {display:block; margin-bottom:4px;}
#marina-card summary {cursor:pointer; color:#a9f4df;}
#marina-card ol {padding-left:22px;max-height:20vh;overflow:auto;}
@media(max-width:700px){#marina-card{top:70px;right:10px;width:160px;}}

#destination {display:block;width:100%;pointer-events:auto;font:inherit;font-size:11px;padding:3px 4px;color:#e2f9f5;background:#263935;border:0;}
#nav-cue {padding:4px 6px;font:600 11px system-ui;color:#aef0fb;}
#lighting-choice{pointer-events:auto;background:var(--panel);color:#fff9e5;border:1px solid var(--line);border-radius:2px;padding:5px;font:inherit;font-size:12px;}
.session-controls {grid-template-columns:auto auto;align-items:center;}
.session-controls .presence {grid-column:1 / -1;}
@media(min-width:701px){.mast .session-controls{grid-template-columns:repeat(3,auto)}#marina-card{top:105px;}}
@media(max-width:700px){#marina-card{top:126px;}}

#wanted-toggle { pointer-events:auto; min-height:32px; padding:5px 9px; color:#f8f4e3; background:var(--panel); border:1px solid var(--line); font:inherit; font-size:12px; cursor:pointer; }
#wanted-toggle[aria-pressed="true"], #wanted-status { color:#ffd779; }
#wanted-toggle:hover, #wanted-toggle:focus-visible { border-color:var(--accent); }
#wanted-status { margin-top:5px; font-size:13px; font-weight:650; }

#conversation { position:fixed; inset:auto 16px 7vh; margin:0 auto; width:min(28rem,calc(100% - 32px)); max-height:72vh; overflow:auto; box-sizing:border-box; padding:20px 22px; background:#152120f5; color:#f3f0e4; border:1px solid #77847a; border-radius:7px; box-shadow:0 9px 35px #07120c88; }
#conversation::backdrop { background:#04110d29; }
#conversation h2 { font-size:1.15rem; margin:0; }
#conversation p { font:1rem/1.45 system-ui,sans-serif; margin:10px 0 15px; }
#conversation [data-topics] { display:grid; gap:5px; }
#conversation button { text-align:left; color:inherit; border:1px solid #6e80736b; background:#334337; padding:7px 10px; border-radius:3px; cursor:pointer; }
#conversation button:focus-visible { outline:2px solid #d6cca7; outline-offset:1px; }
#conversation [data-leave] { margin-top:12px; background:transparent; }

/* Touch controls follow the last input device on tablets with a mouse. */
.touch-play { overscroll-behavior:none; }
.touch-play body { overscroll-behavior:none; -webkit-text-size-adjust:100%; }
#touch-controls { position:fixed; inset:0; pointer-events:none; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
#touch-controls [hidden],#touch-controls[hidden] { display:none; }
.touch-play .mast,.touch-play footer,.touch-play .map-panel,.touch-play #match-card,.touch-play #supply-card,.touch-play #marina-card { display:none; }
.touch-play .hud { top:max(10px,env(safe-area-inset-top)); bottom:auto; left:max(12px,env(safe-area-inset-left)); right:86px; padding:0; }
.touch-play .location .subhead,.touch-play .kit-row #progress {display:none}
.touch-play .location h2 {font-size:14px;letter-spacing:.06em}
.touch-play .location {padding:7px 10px;max-width:min(72vw,290px);background:#19251ece;border-left:2px solid var(--accent);border-radius:3px}
.touch-play .kit-row {margin-top:3px;font-size:11px}
.touch-play #field-prompt {margin:4px 0 0;padding:0;background:transparent}
.touch-play #game.armed:not(.look-paused) + #play-reticle {display:block}
.touch-play #guide {z-index:5;right:max(10px,env(safe-area-inset-right));bottom:max(10px,env(safe-area-inset-bottom));max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain}
.touch-play #guide:not([hidden]) ~ #touch-controls,.touch-play:has(dialog[open]) #touch-controls {visibility:hidden}
.touch-button,#touch-menu [data-close] {
  color:#fffdf4;background:#182521db;border:1px solid #e4ead48a;box-shadow:0 1px 5px #0005;
  font:650 13px/1.1 system-ui,sans-serif;touch-action:none;pointer-events:auto;min-width:48px;min-height:48px;
  padding:6px 10px;border-radius:14px;text-align:center;
}
.touch-button.down,.touch-button:active {background:#675e39;border-color:#ffdc98;color:#fff8d5}
#touch-menu-open {position:absolute;top:max(10px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));min-height:44px;}
#touch-pad {
  pointer-events:auto;touch-action:none;position:absolute;left:max(17px,env(safe-area-inset-left));bottom:max(18px,env(safe-area-inset-bottom));
  width:clamp(100px,17vmin,126px);aspect-ratio:1;border:1.5px solid #e4ead4a3;border-radius:50%;
  background:radial-gradient(circle,#17241c8c 0 50%,#17241cbb 51% 55%,#202b247d 56% 100%);box-shadow:0 2px 8px #0005;
}
#touch-stick {position:absolute;left:50%;top:50%;width:42%;height:42%;margin:-21%;border-radius:50%;background:#e1e8d291;border:1px solid #eaf1d2b3}
#touch-axis-label {position:absolute;bottom:9px;left:0;right:0;text-align:center;color:#fffde9;text-shadow:0 1px 3px #000;font:600 11px system-ui}
#touch-actions,#touch-tools {display:grid;gap:6px;position:absolute;right:max(12px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));grid-template-columns:repeat(3,minmax(48px,66px));align-items:stretch;justify-content:end;pointer-events:none}
#touch-tools {bottom:calc(max(14px,env(safe-area-inset-bottom)) + 111px);background:#17241ded;border:1px solid var(--line);border-radius:12px;padding:5px;max-height:calc(100dvh - 180px);overflow-y:auto;pointer-events:auto;overscroll-behavior:contain}
#touch-actions [data-action=KeyF] {border-color:#e9c78f;background:#493c26df}
#touch-actions [data-action=KeyE] {grid-column:span 2;background:#294536e8;border-color:#a9d8b1;min-width:0}
#touch-menu {width:min(360px,calc(100vw - 26px));max-height:calc(100dvh - max(24px,env(safe-area-inset-top)) - env(safe-area-inset-bottom));overflow:auto;overscroll-behavior:contain;background:#1c2821f5;color:#fff9e8;border:1px solid var(--line);border-radius:12px;padding:14px;}
#touch-menu::backdrop {background:#091711ae}
#touch-menu h2 {font-size:18px}
#touch-menu [data-game-options] {display:grid;gap:12px;padding-top:12px;}
#touch-menu .session-controls {display:flex;gap:5px;justify-content:space-between;flex-wrap:wrap}
#touch-menu .presence {font-size:11px}
#touch-menu .map-panel,#touch-menu #match-card:not([hidden]),#touch-menu #supply-card:not([hidden]),#touch-menu #marina-card:not([hidden]) {display:block;position:static;width:100%;max-width:none}
#touch-menu #map {max-height:120px;object-fit:contain}
#touch-menu :is(select,button),.touch-play #conversation button {min-height:44px}
#touch-menu #help {justify-self:start;border:1px solid var(--line);padding-inline:12px;border-radius:7px}
.touch-play kbd {display:none}
@media(max-width:375px){#touch-actions,#touch-tools{grid-template-columns:repeat(3,49px)}.touch-button{font-size:12px;padding:5px}}
@media(max-height:360px){#touch-tools{grid-template-columns:repeat(4,58px);max-height:120px}}
.touch-play #conversation {bottom:max(8px,env(safe-area-inset-bottom));max-height:calc(100dvh - max(12px,env(safe-area-inset-top)) - max(12px,env(safe-area-inset-bottom)));padding:12px 16px;overscroll-behavior:contain}
.touch-play #conversation [data-leave] {position:sticky;bottom:0;background:#25382c}

#wallet,#market-panel button {pointer-events:auto;cursor:pointer;font:inherit;color:#f0f4e9;background:#2d4137;border:1px solid #728777;border-radius:5px;padding:5px 10px}
#wallet {margin-top:5px;font-size:12px}
#market-panel {width:min(26rem,calc(100vw - 30px));max-height:calc(100dvh - max(24px,env(safe-area-inset-top)) - env(safe-area-inset-bottom));box-sizing:border-box;padding:18px 20px;overflow:auto;overscroll-behavior:contain;background:#1b2923;color:#eef2e7;border:1px solid #829785;border-radius:9px;}
#market-panel::backdrop {background:#0a171b70}
#market-panel h2 {margin:0;font-size:1.35rem}
#market-panel h3 {margin:14px 0 5px;font-size:.95rem}
#market-panel [data-funds] {color:#c5dfa7;font-weight:650}
#market-panel [data-stock]>div,#market-panel [data-inventory]>div {display:flex;align-items:center;justify-content:space-between;gap:15px;padding:9px 0;border-top:1px solid #6a786650}
#market-panel small {display:block;font-size:.76rem;color:#c6cec3;margin-top:4px}
#market-panel button {flex-shrink:0}
#market-panel button:disabled {opacity:.56;cursor:default}
#market-panel [data-market-status] {color:#f5d898;min-height:1.15em;margin:10px 0 0}
.touch-play #market-panel button {min-height:44px}
.touch-play #wallet{min-height:32px}

#dive-meter,#dive-result {grid-column:1/-1}
#dive-meter:not([hidden]),#dive-result:not([hidden]) {display:block;color:#f5dda1;font-weight:650}
.dive-track {position:relative;margin:4px 0;height:7px;border-radius:4px;background:linear-gradient(to right,#43696c 69.5%,#edbd64 69.5% 82.5%,#43696c 82.5%)}
.dive-track i {position:absolute;left:var(--progress);height:11px;top:-2px;width:3px;border-radius:2px;background:#fff}
#owner-caption:not([hidden]) {display:block;grid-column:1/-1;margin-top:4px;color:#fff5da;font-weight:600}
#bank-receipt:not([hidden]) { display:block;margin-top:3px;color:#d2e7af;font-weight:650; }
#bank-event:not([hidden]) {display:block;max-width:28ch;border-left:3px solid #ffac65;padding:3px 7px;margin-top:4px;background:#392b29;color:#ffdfb7;font-weight:650}
#bank-dialog {width:min(24rem,calc(100vw - 30px));box-sizing:border-box;max-height:calc(100dvh - max(24px,env(safe-area-inset-top)) - env(safe-area-inset-bottom));overflow:auto;padding:20px 22px;color:#f4ecd9;background:#203832;border:1px solid #aba582;border-top:4px solid #c5a570;border-radius:7px;box-shadow:0 10px 36px #0b181980}
#bank-dialog::backdrop {background:#09181164}
#bank-dialog .bank-letterhead {margin:0 0 9px;color:#dfc69c;font:600 .8rem Georgia,serif;letter-spacing:.07em}
#bank-dialog h2 {margin:0;font:600 1.5rem Georgia,serif}
#bank-dialog small {display:block;font:500 .8rem system-ui;color:#d1dbd0;margin-top:2px}
#bank-dialog p {line-height:1.4}
#bank-dialog [data-police-info] {font-size:.88rem;border-top:1px solid #758377;padding-top:10px;margin-bottom:2px}
#bank-dialog label:not([hidden]) {display:flex;align-items:center;gap:7px;min-height:44px;cursor:pointer}
#bank-dialog input {width:18px;height:18px;accent-color:#d6b582}
.bank-choices {display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end;margin-top:12px}
.bank-choices button {font:600 .95rem system-ui;min-height:44px;padding:6px 16px;border:1px solid #a9ad98;border-radius:4px;color:#f5f1e4;background:#31483e;cursor:pointer}
.bank-choices [data-rob] {background:#eed4a3;color:#342917;border-color:#eed4a3}
#bank-dialog :focus-visible {outline:2px solid white;outline-offset:2px}

/* The look surface stays open for another thumb while the stick is held. */
#touch-look {position:absolute;right:max(20px,env(safe-area-inset-right));top:40%;display:flex;align-items:center;gap:7px;padding:5px 9px;pointer-events:none;color:#fffdf2;background:#17251eda;border:1px solid #b1bfad88;border-radius:20px;font:650 12px/1.2 system-ui}
#touch-look i {width:17px;height:7px;position:relative;border-top:2px solid #dce8d7;box-sizing:border-box;margin-top:6px;}
#touch-look i::before,#touch-look i::after {content:'';position:absolute;top:-5px;width:6px;height:6px;border:solid #dce8d7;border-width:0 0 2px 2px;transform:rotate(45deg)}
#touch-look i::before {left:0}#touch-look i::after {right:0;transform:rotate(225deg)}
#touch-tip {pointer-events:none;position:absolute;top:max(12px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:9px;max-width:min(35vw,315px);background:#14261fee;color:#f6f6e8;border:1px solid #809a88;border-radius:9px;padding:3px 4px 3px 11px;font:550 12px/1.35 system-ui;box-shadow:0 2px 9px #09120e66}
#touch-tip button,#touch-reference button {pointer-events:auto;flex-shrink:0;color:#e4f2d9;min-width:48px;min-height:44px;font:700 12px system-ui;padding:4px 8px;border-radius:6px;background:#2d4338}
#touch-reference {margin-top:10px;color:#fff8e4;background:#24382e;border:1px solid #778d78;border-radius:8px;padding:0 11px}
#touch-reference summary {display:list-item;padding:13px 0;cursor:pointer;font-weight:700;min-height:44px;box-sizing:border-box}
#touch-reference h3 {font-size:15px;margin:2px 0 4px}#touch-reference p {font-size:13px;line-height:1.4;margin:4px 0 8px}
#touch-reference button {margin-bottom:10px;border:1px solid #829f88}
#touch-pad {width:clamp(106px,26vmin,132px);left:max(15px,env(safe-area-inset-left));bottom:max(16px,env(safe-area-inset-bottom));border:2px solid #e7edd0b3;background:radial-gradient(circle,#223a2ee0 0 42%,#26362dc9 43% 64%,#18251ddb 65%);box-sizing:border-box}
#touch-stick {border-color:#d3e2c5;background:#91a78dba;box-shadow:0 1px 5px #1117}
#touch-axis-label {bottom:auto;top:50%;transform:translateY(-50%);font:700 11px/1 system-ui;text-shadow:0 1px 3px #000}
.pad-arrow {position:absolute;display:block;color:#f4f5df;font:700 10px/14px system-ui;text-shadow:0 1px 3px #000;text-align:center}
.pad-up,.pad-down {left:0;right:0}.pad-up{top:5px}.pad-down{bottom:5px}.pad-left,.pad-right {top:50%;transform:translateY(-50%);font-size:16px}.pad-left{left:6px}.pad-right{right:6px}
#touch-controls[data-role=jet] :is(.pad-left,.pad-right) {display:none}
#touch-actions,#touch-tools {right:max(13px,env(safe-area-inset-right));grid-template-columns:repeat(3,clamp(50px,15vmin,69px));gap:8px}
#touch-actions {grid-template-rows:repeat(2,minmax(50px,auto));bottom:max(15px,env(safe-area-inset-bottom))}
#touch-actions .touch-button,#touch-tools .touch-button {font:700 12px/1.13 system-ui;padding:5px 6px;border:1.3px solid #c0cfb9ce;color:#fffdf3;background:#20342be8;border-radius:12px;min-height:50px}
#touch-actions [data-action=KeyF] {grid-area:2/3;background:#634a29ee;border-color:#f5d5a4}
#touch-actions [data-action=more] {grid-area:2/1;border-color:#aab8ad;background:#27382fee}
#touch-actions [data-action=aim],#touch-controls[data-role=heli] #touch-actions [data-action=Space],#touch-actions [data-action=KeyR] {grid-area:1/3}
#touch-actions [data-action=Space],#touch-actions [data-action=ShiftLeft],#touch-actions [data-action=KeyB] {grid-area:2/2}
#touch-actions [data-action=KeyE] {grid-area:1/1/2/3;background:#315841f5;border-color:#d6efce}
#touch-actions [data-action=KeyE]:only-child {grid-area:2/2/3/4}
#touch-tools {bottom:calc(max(15px,env(safe-area-inset-bottom)) + 116px);grid-template-columns:repeat(3,clamp(52px,16vmin,70px));padding:5px;gap:6px;max-height:calc(100dvh - 182px)}
#touch-tools .touch-button {font-size:11px;min-height:45px}
#touch-actions .touch-button.down,#touch-tools .touch-button.down {background:#826d40;border-color:#ffe6a9}
.touch-play .location {display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:8px;row-gap:0;align-items:center;max-width:min(63vw,260px);padding:5px 8px}
.touch-play .location h2,.touch-play .kit-row {grid-column:1;margin:0}.touch-play .kit-row {font-size:10px}
.touch-play .health-readout {grid-column:1/-1;margin:1px 0 0;font-size:10px;gap:5px;flex-wrap:wrap}
.touch-play #wallet {grid-column:2;grid-row:1/3;margin:0;min-height:44px;min-width:48px;font-size:11px;padding:4px}
.touch-play #field-prompt,.touch-play #launcher-status,.touch-play #wanted-status,.touch-play #bank-receipt,.touch-play #bank-event {grid-column:1/-1}
.touch-play #field-prompt:empty {display:none}
@media(orientation:portrait){#touch-tip {left:max(13px,env(safe-area-inset-left));right:max(13px,env(safe-area-inset-right));top:24%;transform:none;margin:auto;max-width:285px}#touch-look {top:48%}}
@media(max-height:450px){#touch-look {top:32%}#touch-controls:has(#touch-tools:not([hidden])) #touch-look {opacity:0}}

#touch-menu .touch-section {margin-top:8px;border-top:1px solid #74827571}
#touch-menu .touch-section summary {cursor:pointer;padding:12px 0;min-height:44px;box-sizing:border-box;font:650 14px/20px system-ui}
#touch-menu [data-world-guide] {margin-top:7px;border:1px solid #788d78;border-radius:6px;padding:5px 12px}
#touch-controls[data-role=seat] #touch-actions [data-action=KeyE] {grid-area:2/2/3/4}

#touch-tools .touch-button:disabled {background:#27352f;border-color:#637266;color:#b7c4b9;}

#elevator-dialog{color:#ece8db;background:#25322f;border:1px solid #a99774;border-radius:.5rem;padding:1rem;max-width:min(21rem,85vw);max-height:75dvh;overflow:auto}
#elevator-dialog::backdrop{background:#131b1caa}
#elevator-dialog h2{font-size:1.13rem;margin:0 0 .7rem}
#elevator-dialog [data-floors]{display:grid;grid-template-columns:repeat(3,1fr);gap:.35rem;margin-bottom:.6rem}
#elevator-dialog button{padding:.55rem;color:#f6f2e6;background:#435951;border:1px solid #89958c;border-radius:.22rem;cursor:pointer}
#elevator-dialog button:disabled{color:#343e37;background:#d6c698;cursor:default}
#elevator-status:not([hidden]){position:fixed;z-index:12;inset:0;display:grid;place-items:center;pointer-events:none;color:#efd6a7;font-weight:bold;letter-spacing:.04em;background:linear-gradient(90deg,#334342 0%,#586361 48.8%,#293632 49.9%,#596360 50.3%,#344543 100%)}
#elevator-status.hotel-ride:not([hidden]){inset:12% auto auto 50%;transform:translateX(-50%);border:1px solid #c8a66e;border-radius:.35rem;background:#272622df;padding:.55rem 1rem}
.court-score {margin-top:7px;width:min(238px,64vw);box-sizing:border-box;padding:8px 10px;border:1px solid #7d9c96a8;border-radius:6px;background:#142924f2;color:#fffaf1;text-shadow:none;}
.court-title {color:#e4ecdf;font:650 10px/1.25 system-ui;letter-spacing:.06em;text-transform:uppercase;}
.court-tally {display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:5px 0;}
.court-tally > div {display:grid;grid-template-columns:1fr auto;align-items:baseline;column-gap:5px;border-top:2px solid #79dfd6;color:#88eee3;}
.court-tally > div+div {border-color:#ffbd82;color:#ffcf9a;}
.court-tally span,.delivery-tally,.hand-record {font:600 12px/1.3 system-ui;}
.court-tally b,.sprint-clock b {font:700 23px/1.15 system-ui;font-variant-numeric:tabular-nums;color:#fffef6;}
.court-tally small {grid-column:1/-1;min-height:1.1em;color:#eef7ed;font:600 10px/1.1 system-ui;}
.court-score output {display:block;color:#fff5da;font-size:11px;}
.delivery-tally,.hand-record {display:flex;justify-content:space-between;gap:8px;border-top:1px solid #74867b88;margin-top:5px;padding-top:5px;color:#d8e5d6;}
.delivery-tally b,.hand-record b {color:#ffda96;font-variant-numeric:tabular-nums;}
#touch-race-tally:not([hidden]) {display:inline-block;margin-top:5px;padding:3px 7px;border-left:2px solid #88dfca;background:#152822e8;color:#fff2cb;font:650 14px/1.3 system-ui;font-variant-numeric:tabular-nums;}
.sprint-clock:not([hidden]) {display:flex;align-items:baseline;gap:9px;font-size:11px;color:#d8eade;}
#marina-card [data-best]:not([hidden]) {display:block;margin:5px 0;color:#ffe7aa;}
#casino-dialog h3 {display:flex;justify-content:space-between;align-items:baseline;}
#casino-dialog h3 b {font:700 1.1rem/1.1 system-ui;color:#ffe4a8;font-variant-numeric:tabular-nums;}
#basketball-score [role=meter] { position:relative; height:9px; isolation:isolate; margin-top:7px; background:#111c22; border-radius:2px; }
#basketball-score [role=meter] b, #basketball-score [role=meter] i { position:absolute; inset-block:0; border-radius:2px; }
#basketball-score [role=meter] b { z-index:1; background:#ffc97542; border-inline:1px solid #ffc975; }
#basketball-score [role=meter] i { left:0; background:#8be2d4; transition:width 50ms linear; }
#basketball-score .in-gold i { background:#ffcd78; }
.touch-play .court-score { margin-top:5px; padding:5px 7px; }

#casino-dialog {box-sizing:border-box;width:min(21rem,94vw);max-height:90dvh;overflow:auto;margin:auto 1.1rem 1.1rem auto;padding:1.1rem;color:#fff4d6;background:#14362f;border:1px solid #c39b58;border-top:3px solid #d7b976;border-radius:8px;box-shadow:0 8px 30px #07140e70}
#casino-dialog::backdrop {background:#09171424}
#casino-dialog header {display:grid;grid-template-columns:1fr auto;align-items:center;border-bottom:1px solid #637668;padding-bottom:.6rem}
#casino-dialog header p {grid-column:1/-1;margin:0;color:#e7c694;font:small-caps 1rem Georgia,serif}
#casino-dialog h2 {margin:.16rem 0 0;font:1.7rem Georgia,serif}
#casino-dialog h3 {margin:.5rem 0 .25rem;font-size:.82rem}
#casino-dialog section {display:inline-block;vertical-align:top;min-width:45%;margin-right:3%}
.casino-cards {display:flex;flex-wrap:wrap;gap:3px;min-height:1.65rem}
.casino-cards span {border-radius:3px;padding:.23rem .3rem;color:#18201c;background:#fffaea;font:bold 1rem Georgia,serif}
.casino-cards .red {color:#a42939}.casino-cards .back {background:#4c2950;color:#fff2ca;font:normal .68rem system-ui}
#casino-dialog output {display:block;margin:.65rem 0}
.casino-actions:not([hidden]) {display:flex;gap:.3rem;flex-wrap:wrap}
#casino-dialog button {min-height:40px;padding:.32rem .6rem;border:1px solid #ad935e;border-radius:4px;background:#f5e8cb;color:#18291f;font-weight:650}
#casino-dialog button:disabled {opacity:.44}
#casino-dialog details {margin:.6rem 0;font-size:.78rem}
#casino-dialog [data-action=leave] {background:transparent;color:#f3e5c8}
@media(max-width:600px){#casino-dialog{margin:auto auto .4rem;width:96vw;max-height:54dvh;padding:.65rem .85rem}}

#touch-pad.sprinting #touch-stick { box-shadow: 0 0 0 2px #c2efcf, 0 0 12px #5dd09c; }
#dive-result {white-space:pre-line;font-variant-numeric:tabular-nums}

#zombie-card {
  position:fixed; z-index:8; left:14px; top:78px; max-width:min(290px,70vw);
  padding:10px 14px; color:#fff1dc; background:rgba(33,23,24,.93);
  border-left:3px solid #e96848; border-radius:4px;
}
#zombie-card strong {color:#ffaa75; letter-spacing:.045em}
#zombie-tally {font-size:.85em; color:#e7d3c2}
#zombie-start {margin-top:5px; padding:6px 12px; cursor:pointer}

#zombie-card.run-finished {
  left:50%; top:40%; transform:translate(-50%,-50%); width:max-content;
  text-align:center; padding:20px 28px; border:1px solid #a5563c;
}
#zombie-card.run-finished #zombie-status {font-size:1.35em; font-weight:700; margin:.35em 0}

body:not(.touch-play) #zombie-start::after {content:' ↵';opacity:.7}

#player-scoreboard {position:fixed;z-index:30;left:50%;top:50%;transform:translate(-50%,-50%);width:min(720px,94vw);max-height:80dvh;overflow:auto;box-sizing:border-box;padding:20px 24px;border:1px solid #9cb4a1;border-radius:9px;background:rgba(16,28,26,.96);color:#f2f6ec;box-shadow:0 18px 60px #0009;pointer-events:none}
#player-scoreboard[hidden] {display:none}
#account-open {pointer-events:auto;min-height:32px;padding:5px 9px;color:#f8f4e3;background:var(--panel);border:1px solid var(--line);border-radius:2px;font:600 12px inherit;cursor:pointer;}
#account-dialog {width:min(390px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:20px;color:#f8f4e3;background:#20231f;border:1px solid var(--accent);border-radius:7px;box-shadow:0 15px 45px #0009;}
#account-dialog::backdrop {background:#07120dbb;}
#account-dialog [hidden] {display:none;}
.account-heading {display:flex;justify-content:space-between;align-items:center;}
.account-heading button {font-size:24px;line-height:1;background:transparent;color:inherit;border:0;cursor:pointer;}
#account-message {min-height:1.2em;font-size:13px;}
#account-form {display:grid;gap:13px;}
#account-form label {display:grid;gap:5px;font-size:13px;}
#account-form input {width:100%;padding:9px;color:#fff;background:#141c17;border:1px solid #a4af9b;border-radius:3px;font:inherit;}
#account-dialog button:not(.account-heading button) {min-height:34px;padding:7px 10px;cursor:pointer;}
#account-submit,#account-logout {background:#d5b882;color:#172922;border:0;border-radius:3px;font-weight:700;}
#account-switch {background:transparent;color:#f8f4e3;border:1px solid var(--line);border-radius:3px;}
#account-profile dl {display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:16px 0;}
#account-profile dl div {padding:10px;background:#141c17;border:1px solid var(--line);}
#account-profile dt {font-size:11px;color:#c5ceaa;}
#account-profile dd {margin:4px 0 0;font-size:19px;font-weight:700;}
#google-account {border-top:1px solid var(--line);margin-top:18px;padding-top:5px;}
#google-account p {font-size:12px;color:#c5ceaa;}
#google-username-form {display:grid;gap:10px;margin-top:12px;}
#google-username-form label {display:grid;gap:5px;font-size:13px;}
#google-username-form input {width:100%;padding:9px;color:#fff;background:#141c17;border:1px solid #a4af9b;border-radius:3px;font:inherit;}
#google-username-form button {background:#d5b882;color:#172922;border:0;border-radius:3px;font-weight:700;}
.footer-links {display:flex;align-items:center;gap:10px;}
.footer-links a {pointer-events:auto;color:#d5b882;font-size:11px;white-space:nowrap;}
@media(max-width:520px){.footer-links a {font-size:10px;}}
#player-scoreboard header {display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:14px}
#player-scoreboard strong {font-size:1.35rem;letter-spacing:.04em}
#player-scoreboard header span,#player-scoreboard small {color:#b8c9ba}
#player-scoreboard table {width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums;text-align:right}
#player-scoreboard th:first-child,#player-scoreboard td:first-child {text-align:left}
#player-scoreboard th {font-size:.75rem;text-transform:uppercase;letter-spacing:.08em;color:#b8c9ba;border-bottom:1px solid #6b8474;padding:7px 8px}
#player-scoreboard td {padding:9px 8px;border-bottom:1px solid #3a5148}
#player-scoreboard tr.self {background:#315c4a;color:#fff}
#player-scoreboard small {display:block;margin-top:12px;text-align:right}
@media(max-width:600px){#player-scoreboard{padding:12px;font-size:.82rem}#player-scoreboard th,#player-scoreboard td{padding:6px 4px}}
