/* "Протокол" — minimal diegetic HUD. No plates: thin lines, light type and
   numerals float over the scene (Death Stranding / HL2 / FS spirit). */
#game{--ink:#f4f7fa;--dim:#9aa5b1;--ice:#7fd1ff;--warn:#ffb36b;--line:#ffffff40;--shade:0 1px 2px #000a,0 0 18px #0007;font-family:'Jost',system-ui,sans-serif;color:var(--ink)}
#game *{font-family:inherit}
#game .panel,#game .mission,#game .machine,#game .controls,#game .career-hud,#game .contract-hud,#game .mobile-hud>div,#game .icon-btn,#game .mobile-guidance,#game .touch-bucket button,#game #event-feed .event-line{background:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;border-radius:0!important}
#game .panel:before,#game .panel:after,#game .mission:before,#game .machine:before{display:none!important}
#game header,#game .mission,#game .machine,#game .controls,#game .career-hud,#game .contract-hud,#game .mobile-hud,#game .touch-caption,#game .mobile-guidance,#game #event-feed,#game .world-label{text-shadow:var(--shade)}
#game .eyebrow,#game .panel-title,#game .touch-caption,#game .career-rank,#game .career-caption{font-size:11px!important;font-weight:500;letter-spacing:.22em;text-transform:uppercase;color:var(--dim)}
#game .track{height:2px!important;background:var(--line)!important;border-radius:0!important;overflow:visible;position:relative}
#game .track>div{height:2px!important;background:var(--ink)!important;border-radius:0!important;box-shadow:0 0 8px #fff8;transition:width .5s cubic-bezier(.2,.8,.2,1);position:relative;animation:none!important;background-image:none!important}
#game .track>div:after{content:'';position:absolute;right:-1px;top:-4px;width:1px;height:10px;background:var(--ink)}
/* Header: brand reduced to a wordmark line, actions become bare glyphs. */
#game header{top:28px;left:36px;right:36px;align-items:flex-start}
#game .brand{background:none;border:0;padding:0;color:var(--ink);gap:10px;font-size:12px;letter-spacing:.24em;text-transform:uppercase;font-weight:400}
#game .brand b{font-weight:600}#game .brand-icon{width:auto!important;height:auto!important;background:none!important;border:0!important;font-size:18px!important;color:var(--ice)}
#game .location{border:0;padding-left:28px;margin-left:28px;border-left:1px solid var(--line)!important}
#game .location h1{font-size:22px!important;font-weight:300;letter-spacing:.02em;margin:2px 0}
#game .weather{color:var(--dim);font-size:12px;letter-spacing:.06em}
#game .icon-btn{width:40px!important;height:40px!important;color:var(--ink);opacity:.72;transition:opacity .2s,transform .2s;filter:drop-shadow(0 1px 3px #000c)}
#game .icon-btn:hover,#game .icon-btn:focus-visible{opacity:1;transform:translateY(-1px)}
#game .icon-btn .ui-icon{stroke-width:1.4}
/* Mission: top-left numeric readout. */
#game .mission{left:36px!important;top:112px!important;width:260px!important;padding:0!important;display:block!important}
#game .mission>.panel-title{display:flex;justify-content:space-between;margin-bottom:14px;padding-bottom:8px;border-bottom:1px solid var(--line)}
#game .mission .progress-heading{display:flex;align-items:flex-end;justify-content:space-between;margin:0 0 10px}
#game .mission .progress-heading span{font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--dim)}
#game .mission .progress-heading strong{font-size:44px!important;font-weight:200!important;line-height:.9;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
#game .mission .progress-heading small{font-size:16px!important;color:var(--dim);margin-left:2px}
#game .mission .mission-foot{display:flex;justify-content:space-between;color:var(--dim);font-size:11px!important;letter-spacing:.06em;margin-top:8px}
#game .bin-sector{border:0!important;padding:18px 0 0!important}
#game .mission .container-heading{display:flex;gap:8px;align-items:center;font-size:12px!important;letter-spacing:.14em;text-transform:uppercase;color:var(--dim)}
#game .mission .container-heading b{margin-left:auto;font-size:18px!important;font-weight:300!important;color:var(--ink)!important;letter-spacing:0}
#game .tiny-icon{color:var(--ice)}
#game .mission .bin-segments{display:grid!important;grid-template-columns:repeat(10,1fr);gap:3px!important;margin-top:8px}
#game .mission .bin-segments i{height:6px!important;background:transparent!important;border:1px solid var(--line)!important;border-radius:0!important;transition:background .3s}
#game .mission .bin-segments i.filled{background:var(--ink)!important;border-color:var(--ink)!important}
#game .container-guide{display:none}
/* Career: compact totals inside the common action row. */
#game .career-hud{padding:6px 0!important;gap:10px!important;color:var(--ink);font-size:14px;font-variant-numeric:tabular-nums}
#game .career-hud:hover{background:none!important;color:var(--ice)}
#game .career-rank{border-right:1px solid var(--line)!important;padding-right:12px}#game .career-rank b{color:var(--ink)!important;font-weight:400;font-size:14px!important;letter-spacing:0}
#game .credit-icon,#game .part-icon{color:var(--ice)!important;font-size:15px!important}#game .career-hud b{font-weight:400}
/* Contract timer: centered top, the only thing in the middle. */
#game .contract-hud{left:50%!important;right:auto!important;top:30px!important;transform:translateX(-50%);width:300px!important;padding:0!important;text-align:center}
#game .contract-hud>div:first-child{display:flex;justify-content:space-between;font-size:11px;letter-spacing:.2em;text-transform:uppercase;color:var(--dim);margin-bottom:8px}
#game .contract-hud b{font-size:15px;font-weight:400;color:var(--ink);letter-spacing:.06em;font-variant-numeric:tabular-nums}
#game .contract-hud #contract-task{display:block;margin-top:8px;font-size:12px;color:var(--ink);letter-spacing:.04em}
#game .contract-hud.overtime b,#game .contract-hud.overtime #contract-time-bar{color:var(--warn)!important;background:var(--warn)!important}
/* Machine: HL2-like bottom-left numerals. */
#game .bottom-left{left:36px!important;bottom:32px!important;width:330px!important}
#game .machine{padding:0!important}#game .machine>.panel-title{display:none}
#game .machine-main{display:flex;align-items:flex-end;gap:28px!important;margin:0 0 14px!important}
#game .speed{width:auto!important;height:auto!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:none!important;display:flex!important;flex-direction:row!important;align-items:baseline!important;gap:6px!important}
#game .speed:before,#game .speed:after{display:none!important}
#game .speed strong{font-size:64px!important;font-weight:200!important;line-height:.85;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
#game .speed>span{font-size:12px!important;color:var(--dim);letter-spacing:.14em;text-transform:uppercase}
#game .bucket-meter{flex:1}#game .bucket-meter>div:first-child{display:flex;justify-content:space-between;align-items:baseline;font-size:12px!important;letter-spacing:.14em;text-transform:uppercase;color:var(--dim);margin-bottom:8px}
#game .bucket-meter b{font-size:18px!important;font-weight:300!important;color:var(--ink);letter-spacing:0}
#game #load-state{display:block;margin-top:7px;font-size:11px!important;color:var(--dim);letter-spacing:.04em}
#game .machine-bottom{border:0!important;padding:10px 0 0!important;border-top:1px solid var(--line)!important;font-size:11px!important;letter-spacing:.12em;text-transform:uppercase;color:var(--dim);gap:24px}
#game .machine-bottom b{color:var(--ink);font-weight:400;letter-spacing:0}
#game .machine .hint{border:0!important;margin-top:16px!important;padding:0!important;font-size:13px!important;color:var(--ink)!important;display:flex;gap:10px;align-items:baseline;letter-spacing:.01em}
#game .hint-dot{width:6px;height:6px;border-radius:0;background:var(--ice)!important;transform:rotate(45deg);flex-shrink:0;animation:hint-blink 2.4s ease-in-out infinite}
@keyframes hint-blink{50%{opacity:.25}}
/* Controls: faint key legend. */
#game .controls{right:36px!important;bottom:32px!important;padding:0!important;gap:24px!important;opacity:.7}
#game .control-row{font-size:11px!important;color:var(--dim);letter-spacing:.1em;text-transform:uppercase}
#game kbd{background:none!important;border:1px solid var(--line)!important;border-radius:2px!important;box-shadow:none!important;color:var(--ink);font-size:10px!important;min-width:18px;padding:2px 4px;font-family:'Jost',sans-serif}
/* Unload: one confident line-button. */
#game #unload-panel{bottom:110px!important}
#game .unload{background:#0b0f14b8!important;border:1px solid var(--ink)!important;border-radius:0!important;color:var(--ink);font-size:13px!important;letter-spacing:.2em;text-transform:uppercase;padding:14px 26px!important;min-height:48px;box-shadow:none!important;animation:unload-breathe 1.8s ease-in-out infinite!important;display:flex;gap:14px;align-items:center}
#game .unload:hover{background:var(--ink)!important;color:#0b0f14}
@keyframes unload-breathe{50%{box-shadow:0 0 0 6px #ffffff14,0 0 24px #7fd1ff40!important}}
/* World marker: a thin caption with a tick. */
#game .world-label:not(.locked){background:none!important;border:0!important;border-bottom:1px solid var(--ink)!important;border-radius:0!important;padding:4px 2px!important;font-size:11px!important;letter-spacing:.18em;color:var(--ink);box-shadow:none!important}
#game .world-label:not(.locked):after{display:block!important;content:'';position:absolute;left:50%;bottom:-10px;width:1px;height:10px;background:var(--ink);border:0;transform:none}
#game .world-label .ui-icon{color:var(--ice)}
/* Feed & toast: typed log lines. */
#game #event-feed{left:36px!important;top:auto!important;bottom:250px}
#game .event-line{padding:3px 0 3px 12px!important;border-left:1px solid var(--ice)!important;font-size:12px!important;letter-spacing:.03em}
#game .event-line b{color:var(--ice)!important;font-weight:500}#game .event-mark{color:var(--ice)!important}
#game #reward-toast{background:none!important;border:0!important;border-top:1px solid var(--ink)!important;border-bottom:1px solid var(--ink)!important;border-radius:0!important;box-shadow:none!important;color:var(--ink)!important;font-size:13px!important;letter-spacing:.14em;text-transform:uppercase;text-shadow:var(--shade);padding:10px 22px!important;top:120px!important}
/* Entrance motion when a shift starts. */
@media(prefers-reduced-motion:no-preference){
#game:not(.menu-open) .mission,#game:not(.menu-open) .bottom-left,#game:not(.menu-open) .career-hud,#game:not(.menu-open) .controls,#game:not(.menu-open) .mobile-hud,#game:not(.menu-open) .touch-controls{animation:hud-in .9s cubic-bezier(.2,.8,.2,1) both}
#game:not(.menu-open) .bottom-left,#game:not(.menu-open) .touch-controls{animation-delay:.12s}#game:not(.menu-open) .controls{animation-delay:.24s}}
@keyframes hud-in{from{opacity:0;clip-path:inset(0 100% 0 0)}to{opacity:1;clip-path:inset(0 0 0 0)}}
/* Loading. */
#game #loading{background:#0b0f14!important;color:var(--ink)}#game #loading h2{font-weight:300;letter-spacing:.06em;font-size:20px}#game #loading p{color:var(--dim);letter-spacing:.14em;text-transform:uppercase;font-size:11px}#game #loading .brand-icon{color:var(--ice);background:none;border:0}
/* Menu: full-height left column over a darkened scene, no card. */
#game #dialog{left:0!important;top:0!important;transform:none!important;width:520px!important;max-width:100%!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;padding:56px 56px 40px!important;border:0!important;border-right:1px solid var(--line)!important;border-radius:0!important;background:linear-gradient(90deg,#0b0f14f2 70%,#0b0f14c8)!important;box-shadow:none!important;color:var(--ink);box-sizing:border-box}
#game #dialog::backdrop{background:linear-gradient(90deg,#0b0f1499,#0b0f1420)!important;backdrop-filter:none!important}
#game #dialog h2{font-size:52px!important;font-weight:200!important;letter-spacing:-.02em!important;line-height:1!important;margin:14px 0 18px!important;text-transform:none}
#game #dialog h3{font-weight:300;letter-spacing:.02em}
#game #dialog .eyebrow,#game #dialog .menu-tag,#game #dialog .fleet-step,#game #dialog .vehicle-status{font-size:11px!important;letter-spacing:.24em!important;color:var(--ice)!important;background:none!important;border:0!important;padding:0!important}
#game #menu-subtitle{color:var(--dim)!important;font-size:16px!important;font-weight:300;line-height:1.6}
#game #dialog .primary{background:var(--ink)!important;color:#0b0f14!important;border:0!important;border-radius:0!important;font-weight:500;letter-spacing:.16em;text-transform:uppercase;font-size:13px!important;min-height:52px;box-shadow:none!important;transition:letter-spacing .25s,background .25s}
#game #dialog .primary:hover{background:var(--ice)!important;letter-spacing:.22em}
#game #dialog .menu-button{background:none!important;border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0!important;color:var(--ink);padding:16px 0!important;margin:0!important;font-size:15px!important;font-weight:300;letter-spacing:.04em;transition:padding .25s,color .25s;box-shadow:none!important}
#game #dialog .menu-button:hover,#game #dialog .menu-button:focus-visible{padding-left:10px!important;color:var(--ice)}
#game #dialog .menu-button>span{color:var(--dim)}
#game #dialog .secondary{background:none!important;border:0!important;color:var(--dim);letter-spacing:.14em;text-transform:uppercase;font-size:11px!important;text-decoration:none}
#game #dialog .secondary:hover{color:var(--ink)}
#game #dialog .close,#game #menu-back{background:none!important;border:0!important;color:var(--ink);opacity:.7;border-radius:0!important;box-shadow:none!important}#game #dialog .close:hover,#game #menu-back:hover{opacity:1}
#game #dialog .contract-card,#game #dialog .vehicle-stage,#game #dialog .collection-rewards,#game #dialog .result-hero,#game #dialog .contract-rules,#game #dialog .reward-rules{background:none!important;border:0!important;border-top:1px solid var(--line)!important;border-radius:0!important;box-shadow:none!important}
#game #dialog .garage-tabs button{background:none!important;border:0!important;border-bottom:1px solid transparent!important;border-radius:0!important;color:var(--dim);letter-spacing:.12em;text-transform:uppercase;font-size:11px}
#game #dialog .garage-tabs button[aria-selected=true]{color:var(--ink);border-bottom-color:var(--ink)!important}
#game #dialog .setting-toggle input{background:transparent!important;border:1px solid var(--line)!important}#game #dialog .setting-toggle input:checked{background:var(--ice)!important}#game #dialog .volume-slider{accent-color:var(--ice)}
#game #dialog .muted,#game #dialog .section-lead{color:var(--dim)!important}
@media(prefers-reduced-motion:no-preference){#game #dialog[open] [data-menu-view]:not([hidden])>*{animation:menu-rise .5s cubic-bezier(.2,.8,.2,1) both}#game #dialog[open] [data-menu-view]:not([hidden])>*:nth-child(2){animation-delay:.06s}#game #dialog[open] [data-menu-view]:not([hidden])>*:nth-child(3){animation-delay:.12s}}
@keyframes menu-rise{from{opacity:0;transform:translateY(8px)}}
/* Short desktop windows. */
@media(min-width:761px) and (max-height:700px){#game:not(.mobile) .mission{top:96px!important}#game:not(.mobile) .speed strong{font-size:48px!important}#game:not(.mobile) .machine .hint{display:none}#game:not(.mobile) #event-feed{bottom:190px}}

/* ---------- Phone, landscape: right hand holds the bottom edge ---------- */
#game.mobile header{top:var(--safe-top)!important;right:var(--safe-right)!important;left:auto!important}
#game.mobile .icon-btn{width:44px!important;height:44px!important}
#game.mobile .career-hud{padding:0!important;font-size:12px;gap:7px!important;min-height:28px}
#game.mobile .career-rank{padding-right:7px}#game.mobile .career-rank b{font-size:12px!important}
#game.mobile .mobile-hud{left:var(--safe-left)!important;top:calc(var(--safe-top) + 4px)!important;right:auto!important;width:min(330px,52vw);max-width:none!important;gap:18px!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}
#game.mobile .mobile-hud>div{padding:0!important;display:grid;grid-template-columns:1fr auto;gap:5px 6px!important;font-size:9px!important}
#game.mobile .mobile-hud span{color:var(--dim);letter-spacing:.18em;text-transform:uppercase}
#game.mobile .mobile-hud b{font-size:18px!important;font-weight:300!important;color:var(--ink)!important;line-height:1;letter-spacing:-.01em}
#game.mobile .mobile-hud .track{grid-column:1/-1}
#game.mobile .contract-hud{top:calc(var(--safe-top) + 52px)!important;left:var(--safe-left)!important;transform:none;width:min(330px,52vw)!important;text-align:left}
#game.mobile .contract-hud #contract-task{display:none}
#game.mobile .mobile-guidance{background:none!important;font-size:11px!important;letter-spacing:.04em;color:var(--ink)}
#game.mobile .touch-caption{background:none!important;padding:0!important;font-size:9px!important}
#game.mobile .touch-caption span{color:var(--ink);letter-spacing:.04em;text-transform:none;font-size:11px}
#game.mobile .touch-bucket button{border:1px solid #ffffff70!important;border-radius:50%!important;background:#0b0f1440!important;color:var(--ink);font-size:9px!important;letter-spacing:.08em;text-transform:uppercase;transition:background .12s,transform .12s;width:56px;height:56px;min-height:56px!important;padding:0!important;justify-self:center}
#game.mobile .touch-bucket{grid-template-columns:60px 60px!important;grid-template-rows:60px 60px!important;gap:6px!important}
#game.mobile .touch-bucket button span{display:none}
#game.mobile .touch-bucket svg{width:22px;height:22px;stroke-width:1.5}
#game.mobile .touch-bucket button.pressed{background:var(--ink)!important;color:#0b0f14!important;transform:scale(.94)}
#game.mobile #joystick{background:radial-gradient(circle,transparent 0 62%,#0b0f1440 63%)!important;border:1px solid #ffffff70!important;box-shadow:none!important}
#game.mobile #joystick:before{content:'';position:absolute;inset:22%;border:1px dashed #ffffff30;border-radius:50%}
#game.mobile #joystick.active{border-color:var(--ice)!important}
#game.mobile #joystick-knob{background:#f4f7fadd!important;border:0!important;box-shadow:0 0 0 6px #ffffff18!important;width:44px!important;height:44px!important}
#game.mobile #joystick.active #joystick-knob{background:var(--ice)!important}
#game.mobile .joystick-arrows{stroke:#ffffff80;stroke-width:1.5}
#game.mobile #unload-panel{bottom:calc(var(--safe-bottom) + 44px)!important}
#game.mobile .unload{padding:12px 20px!important;font-size:12px!important;letter-spacing:.16em}
#game.mobile #event-feed{left:var(--safe-left)!important;bottom:auto!important;top:calc(var(--safe-top) + 100px)!important;max-width:45%}
#game.mobile #reward-toast{top:calc(var(--safe-top) + 56px)!important;left:50%!important;font-size:11px!important;padding:7px 14px!important}
#game.mobile #dialog{width:100%!important;max-width:100%!important;height:100dvh!important;padding:calc(var(--safe-top) + 34px) calc(var(--safe-right) + 14px) 0 calc(var(--safe-left) + 14px)!important;border-right:0!important;background:#0b0f14ee!important;border-radius:0!important}
#game.mobile #menu-scroll{max-height:calc(100dvh - var(--safe-top) - 40px)!important;padding:0 8px 16px!important}
#game.mobile #dialog h2{font-size:30px!important}#game.mobile #dialog.home-view h2{font-size:34px!important}
#game.mobile #dialog .menu-button{min-height:44px;padding:12px 0!important;font-size:14px!important}
#game.mobile #dialog .primary{min-height:46px}
/* iPhone SE 1st gen (568x320) and similar. */
@media(max-height:340px) and (orientation:landscape){
#game.mobile .touch-bucket{grid-template-columns:52px 52px!important;grid-template-rows:52px 52px!important;gap:4px!important}
#game.mobile .touch-bucket button{width:48px;height:48px;min-height:48px!important}
#game.mobile #joystick{width:112px!important;height:112px!important}#game.mobile .drive-controls{width:112px!important}
#game.mobile .mobile-hud b{font-size:15px!important}
#game.mobile #dialog.home-view h2{font-size:28px!important}}
@media(max-width:620px) and (orientation:landscape){
#game.mobile .mobile-hud{width:min(260px,48vw);gap:12px!important}
#game.mobile .icon-btn{width:40px!important;height:40px!important}
#game.mobile .career-caption{display:none}
#game.mobile .mobile-guidance{left:calc(var(--safe-left) + 116px)!important;right:calc(var(--safe-right) + 126px)!important;font-size:10px!important}}
/* Legibility over bright snow: soft corner shade instead of plates. */
#game:before{content:'';position:absolute;inset:0;z-index:2;pointer-events:none;background:radial-gradient(ellipse 520px 380px at 0 0,#0b0f14b0,transparent 70%),radial-gradient(ellipse 560px 360px at 0 100%,#0b0f14b8,transparent 70%),radial-gradient(ellipse 460px 220px at 100% 0,#0b0f1490,transparent 70%),radial-gradient(ellipse 460px 200px at 100% 100%,#0b0f1480,transparent 70%),radial-gradient(ellipse 420px 120px at 50% 0,#0b0f1478,transparent 75%);transition:opacity .6s}
#game.menu-open:before{opacity:0}
#game{--dim:#c3ccd6}
#game.mobile:before{background:radial-gradient(ellipse 360px 130px at 0 0,#0b0f14b0,transparent 72%),radial-gradient(ellipse 260px 120px at 100% 0,#0b0f1490,transparent 72%),radial-gradient(ellipse 280px 180px at 0 100%,#0b0f1490,transparent 72%),radial-gradient(ellipse 280px 200px at 100% 100%,#0b0f1490,transparent 72%)}
#game.mobile .mission,#game.mobile .bottom-left,#game.mobile .controls,#game.mobile header .brand,#game.mobile header .location{display:none!important}
/* Menu layout: a single editorial column. */
#game #dialog{width:560px!important}
#game #dialog .menu-header{background:none!important;border:0!important;padding:0!important;min-height:0!important;margin-bottom:8px}
#game #dialog .home-layout{display:flex!important;flex-direction:column;gap:28px!important}
#game #dialog .home-story .menu-level{display:none}
#game #dialog .menu-footnote{margin:12px 0 0!important;color:var(--dim)!important;font-weight:300}
#game #dialog .home-links{display:flex!important;flex-direction:column;gap:0!important;margin-top:16px}
#game #dialog .menu-button{width:100%;display:flex;justify-content:space-between}
#game #dialog .primary{width:100%;display:flex;justify-content:space-between;align-items:center;padding:0 22px!important;outline:none}
#game #dialog .primary:focus-visible,#game #dialog .menu-button:focus-visible{outline:1px solid var(--ice)!important;outline-offset:3px}
#game.mobile #dialog{width:100%!important}
#game.mobile #dialog .home-layout{display:grid!important;grid-template-columns:1fr 1.25fr;gap:24px!important}
#game.mobile #dialog .home-story{display:block!important}
#game.mobile #dialog .home-links{margin-top:6px}
#game:not(.mobile):before{background:radial-gradient(ellipse 760px 560px at 0 0,#0b0f14d8,#0b0f1460 45%,transparent 75%),radial-gradient(ellipse 760px 480px at 0 100%,#0b0f14e0,#0b0f1460 45%,transparent 75%),radial-gradient(ellipse 600px 300px at 100% 0,#0b0f14b0,transparent 75%),radial-gradient(ellipse 600px 260px at 100% 100%,#0b0f14a0,transparent 75%),radial-gradient(ellipse 560px 170px at 50% 0,#0b0f14a0,transparent 80%)}
#game.mobile:before{background:radial-gradient(ellipse 460px 170px at 0 0,#0b0f14d0,transparent 75%),radial-gradient(ellipse 320px 160px at 100% 0,#0b0f14b0,transparent 75%),radial-gradient(ellipse 320px 220px at 0 100%,#0b0f14a8,transparent 75%),radial-gradient(ellipse 320px 240px at 100% 100%,#0b0f14a8,transparent 75%)}
#game #dialog .menu-button{min-height:0!important;height:auto!important;padding:15px 0!important}
#game #dialog .home-actions,#game #dialog .home-links{width:100%!important;max-width:none!important}
#game #dialog .home-story{padding:0!important}
/* Entrance motion must never hide the HUD if the timeline stalls. */
@keyframes hud-in{from{transform:translateY(6px);filter:blur(2px)}to{transform:none;filter:none}}
#game.mobile .mobile-hud span{letter-spacing:.08em}
@media(max-width:620px) and (orientation:landscape){#game.mobile .mobile-hud{width:290px;gap:10px!important}#game.mobile .mobile-hud b{font-size:14px!important}#game.mobile .contract-hud{width:240px!important}#game.mobile .contract-hud>div:first-child{font-size:9px;letter-spacing:.12em}}
@keyframes hud-in{from{transform:translateY(8px)}to{transform:none}}
#game:before{transition:none}
#game .mission .progress-heading strong,#game .mission .progress-heading strong span{color:var(--ink)!important}
#game #dialog [data-menu-view][hidden],#game #dialog [data-garage-panel][hidden]{display:none!important}
#game:not(.mobile) #dialog.career-view{width:min(980px,100%)!important}
/* No scrolling on the home menu: compact rhythm, links in two columns. */
#game #dialog{padding:40px 48px 28px!important}
#game #dialog h2{font-size:44px!important;margin:8px 0 12px!important}
#game #dialog .home-layout{gap:16px!important}
#game #dialog #menu-subtitle{font-size:14px!important;margin:0!important}
#game #dialog .home-links{display:grid!important;grid-template-columns:1fr 1fr;column-gap:24px!important;margin-top:8px}
#game #dialog .home-links .menu-button{padding:12px 0!important;font-size:14px!important}
#game #dialog .home-actions .secondary{margin-top:6px}
@media(max-height:760px){#game:not(.mobile) #dialog #menu-subtitle br{display:none}}
#game.mobile #dialog .home-links{grid-template-columns:1fr 1fr;column-gap:14px!important}
#game.mobile #dialog .home-links .menu-button{padding:10px 0!important;font-size:12px!important;min-height:40px!important}
#game.mobile #dialog .home-links .menu-button>span{display:none}
/* Header: no wordmark; place/weather sits bottom-right like a caption. */
#game:not(.mobile) header .brand{display:none!important}
#game:not(.mobile) .location{position:fixed;right:36px;bottom:68px;margin:0!important;padding:0 0 0 0!important;border:0!important;text-align:right;z-index:5;pointer-events:none}
#game:not(.mobile) .location h1{font-size:20px!important}
#game:not(.mobile) .mission{top:32px!important}
/* VK Mini Apps iframe: 630x600 up to 1000 wide. */
@media(max-width:1000px){#game:not(.mobile) .contract-hud{left:auto!important;right:36px!important;transform:none;top:124px!important;width:260px!important;text-align:right}
#game:not(.mobile) .contract-hud>div:first-child{gap:12px}
#game:not(.mobile) .mission{width:240px!important}
#game:not(.mobile) .bottom-left{width:290px!important}
#game:not(.mobile) .speed strong{font-size:52px!important}
#game:not(.mobile) .control-row:nth-child(n+3){display:none}}
@media(max-height:660px){#game:not(.mobile) .machine .hint{display:none}#game:not(.mobile) .bin-sector{padding-top:12px!important}#game:not(.mobile) .mission .progress-heading strong{font-size:36px!important}#game:not(.mobile) #dialog{padding:28px 40px 20px!important}#game:not(.mobile) #dialog h2{font-size:38px!important}}
#game .contract-hud.overtime b{background:none!important;color:var(--warn)!important}
#game .contract-hud.overtime #contract-time-bar{background:var(--warn)!important}
#game .contract-hud b{background:none!important;padding:0!important;border:0!important;box-shadow:none!important}
#game:not(.mobile) .touch-controls,#game:not(.mobile) .mobile-hud,#game:not(.mobile) .mobile-guidance{display:none!important}
#game #location-eyebrow,#game #menu-eyebrow{display:none!important}
#game #dialog h2:focus{outline:none}
@keyframes menu-rise{from{transform:translateY(8px)}to{transform:none}}
@media(max-height:760px){#game:not(.mobile) #dialog #menu-subtitle{display:none}#game:not(.mobile) #dialog #menu-subtitle br{display:inline}}
#game #dialog .home-story{margin:0!important}
#game #dialog .setting-toggle input:focus-visible{outline:1px solid var(--ice)!important}
#game #dialog .garage-footer{background:none!important;border-top:1px solid var(--line)!important}
@media(max-height:700px){#game:not(.mobile) #dialog .garage-loader{max-height:120px}#game:not(.mobile) #dialog .vehicle-stage{padding:8px 0!important;min-height:0!important}#game:not(.mobile) #dialog .vehicle-info p{display:none}}
/* Contracts as a compact ledger: one row per shift. */
#game #dialog .section-lead,#game #dialog [data-menu-view=contracts] .muted{display:none}
#game #dialog .contract-cards{display:flex!important;flex-direction:column;gap:0!important}
#game #dialog .contract-card{display:grid!important;grid-template-columns:40px minmax(0,1fr) auto;grid-template-areas:"num title btn" "num specs btn";align-items:center;column-gap:14px;row-gap:2px;padding:12px 0!important;min-height:0!important;border-top:0!important;border-bottom:1px solid var(--line)!important}
#game #dialog .contract-card-top{grid-area:num;display:block!important}#game #dialog .contract-card-top span{font-size:24px!important;font-weight:200}#game #dialog .contract-card-top small{display:none}
#game #dialog .contract-card h3{grid-area:title;margin:0!important;font-size:15px!important;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#game #dialog .contract-card>p,#game #dialog .contract-best{display:none!important}
#game #dialog .contract-specs{grid-area:specs;display:flex!important;gap:12px;margin:0!important;font-size:11px;color:var(--dim)}#game #dialog .contract-specs b{font-size:12px!important;font-weight:500;color:var(--ink)}
#game #dialog .contract-card-score{position:absolute;opacity:0;pointer-events:none}
#game #dialog .contract-card .primary{grid-area:btn;width:auto!important;min-height:36px!important;padding:0 14px!important;font-size:10px!important;letter-spacing:.12em}
#game #dialog .contract-card{position:relative}
#game #dialog .contract-card.unavailable{opacity:.55}
#game #dialog .contract-rules{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding-top:12px!important;margin-top:8px}
#game #dialog .contract-rules p{margin:0;font-size:11px!important;line-height:1.45;color:var(--dim)}
#game #dialog .contract-rules b{color:var(--ink);font-weight:500;display:block}
/* Settings and help: tighter rhythm. */
#game #dialog [data-menu-view=settings] .setting-toggle{margin-top:12px!important}
#game #dialog .setting-range{margin:8px 0 2px!important}
#game #dialog .volume-slider{height:18px}
#game #dialog [data-menu-view=settings] .setting-toggle small{margin-top:2px!important}
#game #dialog .instructions,#game #dialog [data-menu-view=controls] li{font-size:13px!important;line-height:1.45!important;margin:0 0 4px}
#game:not(.mobile) #dialog .menu-header{margin-bottom:0!important}
#game:not(.mobile) #dialog h2{margin-bottom:8px!important}
#game #dialog [data-menu-view=settings] .snowfall-setting{padding-top:10px!important}
#game #dialog .garage-tabs button{padding:10px 0!important}
@media(max-height:700px){#game:not(.mobile) #dialog .garage-loader{max-height:100px}#game:not(.mobile) #dialog .career-summary{padding:6px 0!important}}
#game #dialog .vehicle-specs dd{white-space:nowrap;font-size:20px!important}#game #dialog .vehicle-specs dt{white-space:nowrap;font-size:10px!important}#game #dialog .contract-specs span{white-space:nowrap}
@media(max-height:700px){#game:not(.mobile) #dialog .vehicle-status{display:none}#game:not(.mobile) #dialog .garage-tabs{margin-top:0!important}}
@media(max-height:700px){#game:not(.mobile) #dialog .garage-top{padding:0!important;margin:0!important}#game:not(.mobile) #dialog .garage-footer{padding:8px 0 0!important;margin:0!important}}
#game:not(.mobile) #dialog .garage-content{padding-bottom:8px!important}
#game:not(.mobile) #dialog.career-view #menu-scroll{overflow:hidden!important}
@media(max-height:700px){#game:not(.mobile) #career-storage{display:none}}
/* Desktop: sections open as a centered window over the main menu (HL2-style) */
#game #menu-window,#game #menu-window .window-body{display:contents}
#game #menu-window .window-bar{display:none}
#game:not(.mobile) #dialog.modal-view #menu-window{display:flex;flex-direction:column;position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:min(720px,calc(100vw - 48px));max-height:min(560px,calc(100dvh - 40px));background:#0b0f14f7;border:1px solid var(--line);box-shadow:0 0 0 100vmax #0b0f1499,0 30px 80px #000a;z-index:10;animation:win-in .28s cubic-bezier(.2,.8,.2,1)}
#game:not(.mobile) #dialog.modal-view #menu-window .window-bar{display:flex;align-items:center;justify-content:space-between;height:38px;padding:0 6px 0 18px;border-bottom:1px solid var(--line);flex:none;cursor:default;user-select:none}
#game:not(.mobile) #dialog.modal-view #menu-window-title{font-size:11px;letter-spacing:.24em;text-transform:uppercase;color:var(--ink);font-weight:500}
#game:not(.mobile) #dialog.modal-view #menu-window-title:before{content:"";display:inline-block;width:6px;height:6px;background:var(--ice);margin-right:12px;vertical-align:middle;transform:rotate(45deg) translateY(-1px)}
#game #menu-window .window-close{width:32px;height:32px;display:grid;place-items:center;background:none;border:0;color:var(--dim);cursor:pointer;padding:0}
#game #menu-window .window-close:hover,#game #menu-window .window-close:focus-visible{color:var(--ink);background:#ffffff10}
#game #menu-window .window-close svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5}
#game:not(.mobile) #dialog.modal-view #menu-window .window-body{display:block;overflow:auto;padding:22px 26px 24px;flex:1;min-height:0;scrollbar-width:thin}
#game:not(.mobile) #dialog.modal-view [data-menu-view="home"]{pointer-events:none;filter:blur(1px);opacity:.55}
@keyframes win-in{from{transform:translate(-50%,-48%) scale(.98)}to{transform:translate(-50%,-50%);opacity:1}}

/* Threshold colours: white → dirty yellow → HL2 red / readable green. */
#game{--ui-warn:#c9a640;--ui-crit:#d9442e;--ui-good:#9fe08a}
#game [data-level]{transition:color .4s,background-color .4s}
#game [data-level="warn"]:not([id$="-bar"]):not(#bin-bars){color:var(--ui-warn)!important}
#game [data-level="crit"]:not([id$="-bar"]):not(#bin-bars){color:var(--ui-crit)!important}
#game [data-level="good"]:not([id$="-bar"]):not(#bin-bars){color:var(--ui-good)!important}
#game [id$="-bar"][data-level="warn"],#game #bin-bars[data-level="warn"] i.filled{background:var(--ui-warn)!important}
#game [id$="-bar"][data-level="crit"],#game #bin-bars[data-level="crit"] i.filled{background:var(--ui-crit)!important}
#game [id$="-bar"][data-level="good"]{background:var(--ui-good)!important}
#game [id$="-bar"][data-level="ok"],#game #bin-bars[data-level="ok"] i.filled{background:#fff!important}
#game .contract-hud #contract-timer[data-level="warn"]{color:var(--ui-warn)!important}
#game .contract-hud #contract-timer[data-level="crit"]{color:var(--ui-crit)!important}
/* Whole block (captions, texts, icons) follows the threshold colour. */
#game [data-block-level]{transition:color .4s}
#game [data-block-level="warn"],#game [data-block-level="warn"] *:not([id$="-bar"]):not(i){color:var(--ui-warn)!important}
#game [data-block-level="crit"],#game [data-block-level="crit"] *:not([id$="-bar"]):not(i){color:var(--ui-crit)!important}
#game [data-block-level="good"],#game [data-block-level="good"] *:not([id$="-bar"]):not(i){color:var(--ui-good)!important}
/* Bucket meter sits above the speedometer so changing digits never shift it; its width matches the mission block above. */
#game .machine-main{flex-direction:column-reverse!important;align-items:flex-start!important;gap:14px!important;margin-bottom:0!important}
#game .machine-main .bucket-meter{width:240px;flex:none}
#game .bucket-axes{display:flex;gap:18px;margin-top:8px;padding-top:8px;border-top:1px solid var(--line);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--dim)}
#game .bucket-axes b{color:var(--ink);font-weight:400;letter-spacing:0}
#game .machine-bottom{display:none!important}
