/* NIGHTFALL / midnight blue, warm signal amber, readable field instruments. */
:root{--bg:#0c1724;--bg2:#172b38;--panel:#1b303d;--panel2:#243c48;--line:#526b75;--text:#edf1ed;--muted:#b5c5cb;--amber:#edc585;--amber-dark:#b78c56;--danger:#ffac9c;--ok:#a9dbc6;--band:rgba(12,25,37,.94);--nw-paper:#edf1ed;--nw-gold:#edc585;--nw-muted:#b5c5cb}
body{background:#070f18;color-scheme:dark;scrollbar-color:#71838d #142735}
body #screen-select,body #screen-brief,body #screen-training,body #screen-result{background:linear-gradient(90deg,rgba(8,18,30,.94),rgba(8,18,30,.56)),#0c1724 center 28%/cover}
body .logo{font-size:20px;letter-spacing:.2em}body .logo-sub{font-size:10px;letter-spacing:.2em}
body .version-label{top:auto;bottom:0;font:7px var(--mono);background:transparent;color:#8da7b7;pointer-events:none}
body .btn{border-radius:6px;border:1px solid #57717d;background:#203644;box-shadow:0 2px 4px #0003;color:#e4edee}
body .btn-primary{background:linear-gradient(135deg,#f4d39b,#dfae6d);border-color:#ffdc9f;color:#1b2a34;box-shadow:0 3px 12px #d9a75920}
body .btn-primary:hover:not(:disabled){background:#ffe0ac;color:#14232c;box-shadow:0 3px 16px #d9a75945}
body .btn-small{min-height:30px;font-size:10px}
body .btn-sound[aria-pressed=true],body .js-music[aria-pressed=true],body .js-motion[aria-pressed=true]{background:#29483f;border-color:#719887;color:#d4eade}
body .ui-language{background:#203644;border:1px solid #57717d;color:#e4edee;border-radius:6px}
body .btn:focus-visible,body button:focus-visible,body summary:focus-visible,body input:focus-visible,body select:focus-visible{outline:2px solid #ffe3a9;outline-offset:3px}
body .select-intro{padding:10px 4px 0}body .select-intro .eyebrow{font-size:8px;letter-spacing:.3em;color:#9bc7c4}
body #select-title{font-size:31px;letter-spacing:.07em;margin-bottom:5px}body #select-title::before{content:none}
body .select-intro .lead{color:#c2d0d6}
body .first-night-entry{margin:10px 4px 12px;gap:14px}body .first-night-entry span{color:#a9c0cc;font-size:9px}
body:not(.mobile-ui) #screen-select .card-list{margin-top:8px;gap:12px}
body:not(.mobile-ui) #screen-select .card{height:auto;min-height:288px}
body #screen-select .card{border-color:#60758180;background:linear-gradient(155deg,#29414fe8,#132534f5);border-radius:8px;box-shadow:0 8px 20px #0004}
body:not(.mobile-ui) #screen-select .card canvas{height:134px;object-fit:contain;background:radial-gradient(ellipse at 50% 110%,#7b9aa2,#2b4356 75%);border-bottom:1px solid #72889455}
body #screen-select .card-text{padding:9px 10px 6px;background:transparent;flex:1 1 auto}
body #screen-select .card-name{font-size:14px;letter-spacing:.05em;color:#f1e5cc}
body #screen-select .card-desc{font-size:9px;line-height:1.6;color:#bfd0d7}
body #screen-select .card-uniq{font-size:8px;line-height:1.3;margin-top:4px;padding-top:4px;border-color:#8093a044}
body #screen-select .mastery-badge{font-size:8px;color:#a8d1c5;margin-top:4px}
body #screen-select .card::after{font-size:9px;padding:7px 10px;background:#b8d0c710;color:#edc585;border-top:1px solid #89a0ad33;text-align:left}
body #screen-select .card:hover,body #screen-select .card:focus-visible{border-color:#ecc98d;box-shadow:0 9px 24px #0006;transform:translateY(-3px)}
body:not(.mobile-ui) #screen-select #btn-coop{top:auto;bottom:11px;right:143px;min-height:25px;font-size:9px;padding:4px 10px}
body .select-footer{bottom:8px;font-size:9px;color:#b0c5cf;align-items:center}
/* Previews share the actual battlefield artwork so the destination is recognizable. */
body .option-card[data-map-type]{padding:43px 8px 7px;min-height:81px;overflow:hidden;background:#182f3d}
body .option-card[data-map-type]::before{content:'';position:absolute;inset:0 0 auto;height:37px;background-position:50% 22%;background-size:cover;border-bottom:1px solid #8195a055;opacity:.85}
body .option-card.selected,body .loadout-card.selected{border-color:#ecc98d;background-color:#334a4b;box-shadow:0 0 0 1px #ecc98d55 inset}
body .option-card.selected::after,body .loadout-card.selected::after{background:#f0ce92;color:#1a3038;border-radius:50%;width:17px;height:17px;text-align:center;z-index:1}
body .brief-who{background:linear-gradient(155deg,#304856c9,#132536ed);border-color:#637f8c80}
body:not(.mobile-ui) .brief-grid{position:relative}
body:not(.mobile-ui) #brief-mastery{position:absolute;left:12px;top:310px;bottom:12px;width:181px;overflow-y:auto;scrollbar-width:thin}
body:not(.mobile-ui) #brief-mastery .mastery-panel{margin-top:0}
body:not(.mobile-ui) .choice-heading{margin:4px 0 5px}
body:not(.mobile-ui) .option-card[data-map-type]{padding-top:37px;min-height:72px}
body:not(.mobile-ui) .option-card[data-map-type]::before{height:31px}
body:not(.mobile-ui) .deployment-help{margin-top:5px}
body:not(.mobile-ui) .brief-main .loadout-card{height:108px}
body .loadout-card{height:133px;background:linear-gradient(150deg,#2a424e,#142a38);border-color:#56717d}
body .loadout-card canvas{height:51px}body .deployment-lower{margin-top:6px;gap:2px}
body .brief-main .deployment-actions{z-index:2;background:#132635ef;border-top:1px solid #61778566;padding:7px 0}
body .perk-card{background:linear-gradient(155deg,#2a414fe8,#132737f5);border-color:#607c89;border-radius:8px}
body .perk-card h3{color:#f4e4c5}body .perk-details{background:#142938;border-color:#526b79}
body .training-head h2{letter-spacing:.06em}body .perk-pick{color:#f1ce92}
body:not(.mobile-ui) #screen-training{display:flex;flex-direction:column;padding-bottom:18px}
body:not(.mobile-ui) #screen-training .training-head{flex:none}
body:not(.mobile-ui) #screen-training .perk-cards{flex:1;min-height:0;overflow-y:auto;align-items:start;margin-top:18px;padding:4px;scrollbar-width:thin}
body:not(.mobile-ui) #screen-training .perk-card{min-height:265px}
body:not(.mobile-ui) #screen-training .perk-card canvas{height:106px}
body:not(.mobile-ui) #screen-training .training-footer{flex:none;margin-top:10px}
/* Night HUD stays in the existing 34px safe band. */
body #hud-top{background:linear-gradient(90deg,#102434f5,#142635ed);border-bottom:1px solid #71899880;color:#edf1ed;gap:10px}
body #hud-top .hud-wave{color:#f3d39b;font-size:14px}
body #hud-top .hud-label{color:#bad0d9;font-size:10px}
body #hud-top .hud-num{color:#edf1ed;font-size:12px}
body #hud-top .bar{background:#06131e;border-color:#5f7985;height:8px;border-radius:2px}
body #hud-top .bar-fill{background:linear-gradient(90deg,#7bb6ae,#d8dfb0)}
body #hud-top .bar-fill.low{background:#ed8c78}
body #hud-top .hud-buttons{gap:4px}body #hud-top .btn{min-height:30px;padding:3px 7px;font-size:9px}
body #hud-top .ui-language{height:25px;min-height:25px;font-size:9px;padding:2px}
body #hud-bottom{background:linear-gradient(0deg,#0b1b2af5,#122c3bd9);border-top:1px solid #667f8e66}
body #hud-bottom .slot{background:#132d3eeb;border:1px solid #647d8c;color:#dce9ed;box-shadow:none;border-radius:4px}
body #hud-bottom .slot.equipped{border-color:#e8c68d;background:#3c443ddd;box-shadow:inset 3px 0 #e8c68d}
body #hud-bottom .slot-stats,body #hud-bottom .slot-empty{color:#bdcfd9;font-size:9px}
body #hud-bottom .slot-name{color:#edf0e8}body #hud-bottom .hud-grenade{color:#f0d7a8}
/* Keep the weapon name readable after the inventory illustration was added. */
body #hud-inv .slot-top{gap:4px}
body #hud-inv .slot{max-width:none}
body #hud-inv .slot-top .slot-name{font-size:10.5px}
body #hud-inv .slot-top .nw-weapon-icon{width:22px;height:15px;margin-right:3px}
body #hud-inv .slot-top .tag{position:absolute;right:4px;bottom:3px;font-size:7px;padding:1px 3px}
body #hud-inv .slot-stats{font-size:8px;padding-right:39px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-mode=night] .version-label{display:none}
body #hud-bottom kbd{background:#456a70;color:#e6efed}
body #hud-bottom .tag-unique{background:#284b4a;border-color:#669b94;color:#d1ede2}
body #hud-bottom .slot.is-unique{outline:2px dashed #7fd3c8;outline-offset:-4px}
body #hud-bottom .tag-disposable{background:#604738;border-color:#b29071;color:#f3dcc0}
html[lang=en] body #screen-select .card::after{content:'Select & prepare  ›'}
.field-intel{position:absolute;top:44px;left:14px;display:grid;grid-template-columns:auto auto;gap:3px 12px;padding:8px 11px;background:linear-gradient(100deg,#102435e8,#102435b0);border-left:2px solid #c4aa79;color:#e8e5d6;border-radius:0 5px 5px 0;pointer-events:none!important}
.field-intel>strong{font-size:11px;letter-spacing:.12em}.field-intel>span{font-size:9px;color:#bdcdd4;grid-column:1/3}.field-intel[data-danger=true]{border-color:#ff9c83}.field-intel[data-danger=true]>span{color:#ffb29c}
.night-track{display:flex;gap:4px;grid-column:2;grid-row:1}.night-track i{font:8px var(--mono);color:#8194a4;border-bottom:2px solid #4d6574;padding:0 3px 3px;font-style:normal}.night-track i[data-state=current]{color:#f3d39b;border-color:#f3d39b}.night-track i[data-state=clear]{color:#a5d6c6;border-color:#a5d6c6}
/* Fixed HP occupies the skyline above the co-op ammo row at y62. */
.survivor-vitals{position:absolute;left:340px;right:244px;top:36px;display:flex;gap:6px;font-size:11px;line-height:1;pointer-events:none!important}
.survivor-vital{position:relative;display:flex;align-items:center;justify-content:space-between;gap:4px;flex:1;min-width:0;padding:2px 6px 4px;background:#102435f2;border:1px solid #698b86;border-radius:4px;color:#e5eee8;overflow:hidden;white-space:nowrap}
.survivor-vital strong{font-weight:600;font-size:inherit}.survivor-vital>span{font-variant-numeric:tabular-nums}.survivor-vital[data-local=true]{border-color:#b6d3b8}.survivor-vital[data-state=critical]{border-color:#ffac9c;color:#ffbdab}.survivor-vital[data-state=dead]{border-color:#aa94a5;color:#dfb8c9}
.survivor-health-fill{position:absolute;bottom:0;left:0;height:2px;background:#a9dbc6}.survivor-vital[data-state=critical] .survivor-health-fill{background:#ffac9c}
/* Keep the whole row within y36..61 even on a 400x220 field; co-op ammo begins at y62. */
body.mobile-ui .survivor-vitals{font-size:min(20px,calc(10px * var(--inv-scale,1)))}
body.mobile-ui .survivor-vital{padding:1px 6px 2px}
body.is-paused .survivor-vitals,body.wave-open .survivor-vitals,body:not([data-mode=night]) .survivor-vitals{display:none}
.field-arrival{position:absolute;left:350px;top:87px;width:290px;text-align:center;pointer-events:none!important;text-shadow:0 2px 14px #020a13;background:linear-gradient(90deg,transparent,#102435aa,transparent);padding:12px}
.field-arrival>span{display:block;font:9px var(--mono);letter-spacing:.3em;color:#f3d39b}.field-arrival>strong{display:block;font-size:25px;font-weight:700;letter-spacing:.15em;margin:4px 0}.field-arrival>small{font-size:10px;letter-spacing:.13em;color:#d2e1e2}
body.wh-open .field-intel,body.wh-open .field-arrival,body.wh-open .first-night-hint{display:none}
/* Desktop: the open warehouse spans the top of the field, and the top-right weapon/ammo card was drawn over its header and the right end of
   the storage rows (NEW / 手持ちへ). The rows show the same weapon and ammo, so the card steps aside (phones keep it: the panel sits left of it). */
body.wh-open:not(.mobile-ui) #hud-ammo{visibility:hidden}
/* Keep the short horde announcement below the relocated ammo readout. */
body .nw-cutin-horde .nw-cutin-band{top:22%}
/* Pausing freezes cut-ins; keep the pause controls readable while frozen. */
body.is-paused .nw-cutin-layer{visibility:hidden}
body .wave-report,body .pause-overlay{background:#071421bb;backdrop-filter:blur(3px)}
body .wave-card,body .pause-box{background:linear-gradient(145deg,#2a414e,#122635);border:1px solid #8ba0a6;border-radius:10px;box-shadow:0 16px 60px #0007}
body .wave-title,body .pause-title{color:#f2dbb3}body .wave-stat{background:#152e3b;border-color:#617b88}
body .wave-stat dt{color:#b9cdd3}body .wave-stat dd{color:#f3d39b}
body #day-panel{background:#122736;color:#e5edeb}
body .toast{background:#f1d8a9;color:#162c37;border-color:#f7e4c5;box-shadow:0 6px 20px #0005}
body.mobile-ui .field-intel{top:40px;padding:5px 8px;gap:2px 8px}body.mobile-ui .field-intel>strong{font-size:10px}body.mobile-ui .field-intel>span{font-size:8px}
body.mobile-ui .field-arrival{top:91px}
body.mobile-ui #screen-select .card canvas{object-fit:contain}
body.mobile-ui .option-card[data-map-type]{min-height:92px;padding-top:46px}
body.mobile-ui .option-card[data-map-type]::before{height:40px}
body.mobile-ui .select-footer{font-size:10px}
body.reduced-motion .field-arrival{opacity:1!important}
body .first-night-hint{top:120px;left:12px;transform:none;width:max-content;max-width:min(300px,calc(100vw - 24px));padding:5px 9px;font-size:12px;text-align:left;background:#142b39e0;color:#f2e6c9;border-color:#b9aa85}
/* Hide immediately on a pause/transition, including when animation frames slow. */
body.is-paused .first-night-hint,body.wave-open .first-night-hint,body:not([data-mode=night]) .first-night-hint{display:none}
.nightfall-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
body .pause-box{width:560px;max-width:calc(100% - 24px);max-height:calc(100% - 24px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
body:not(.mobile-ui) .pause-box{padding:16px 24px}
body .pause-settings{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:5px}
body .pause-sub{font-size:12px;margin:4px 0 10px}
.pause-controls{margin:14px 0;text-align:left;padding:12px;background:#10263599;border:1px solid #637d8666;border-radius:6px}
.pause-controls h3{font-size:12px;color:#efd4a5;margin:0 0 9px;letter-spacing:.08em}
.pause-controls dl{display:grid;grid-template-columns:1fr 1fr;gap:9px 18px;margin:0}
.pause-controls dl>div{min-width:0}.pause-controls dt{font-size:10px;color:#ecdfc4;line-height:1.4}.pause-controls dd{font-size:10px;color:#b8cdd5;margin:2px 0 0;line-height:1.4}
.pause-controls .pause-controls-touch{display:none}
.pause-advanced{text-align:left;margin:12px 0;border-top:1px solid #637d8666}
.pause-advanced>summary{cursor:pointer;padding:10px 0;min-height:36px;color:#b8cdd5;font-size:11px;touch-action:manipulation}
body .pause-advanced .enemy-rig-help{margin:7px 0;line-height:1.6}
body.mobile-ui .pause-box{max-height:100%;padding:16px;touch-action:pan-y}
body.mobile-ui .pause-controls h3{font-size:14px}body.mobile-ui .pause-controls dt,body.mobile-ui .pause-controls dd{font-size:12px}
body.mobile-ui .pause-advanced>summary{font-size:13px;min-height:44px}
body.mobile-ui #screen-select .card-text{padding:12px}
body.mobile-ui #screen-select .card-name{font-size:18px}
body.mobile-ui #screen-select .card-desc{font-size:13px;line-height:1.6}
body.mobile-ui #screen-select .card-uniq{font-size:11px;line-height:1.5;padding-top:8px;margin-top:8px}
body.mobile-ui #screen-select .mastery-badge,body.mobile-ui #screen-select .card::after{font-size:11px}
body.mobile-ui #screen-select .card-text{flex:1 0 auto}
body.mobile-ui .first-night-entry span{font-size:11px;line-height:1.6}
body.mobile-ui:not([data-mode=night]) .version-label{display:none}
body.reduced-motion #screen-select .card:hover,body.reduced-motion #screen-select .card:focus-visible{transform:none}
/* 11-04: a tap leaves :hover on touch screens; the lifted card was cut by the card list. */
@media(hover:none){body #screen-select .card:hover:not(:focus-visible){transform:none}}
@media(pointer:coarse){.pause-controls .pause-controls-desktop{display:none}.pause-controls .pause-controls-touch{display:grid}}
@media(prefers-reduced-motion:reduce){body:not([data-motion=standard]) #screen-select .card:hover,body:not([data-motion=standard]) #screen-select .card:focus-visible{transform:none}}
@media(prefers-reduced-motion:reduce){body:not([data-motion=standard]) .field-arrival{opacity:1!important}}
