/* Friendly Fire v1.21.3 styles the game, menus, and responsive HUD. The map shows only the zone at upper left and combat status at upper right. */
/* Friendly Fire v1.15.4: compact personality fields, reset controls, and mobile keyboard dismissal. */
.ruby-personality textarea{display:block;width:100%;resize:vertical;min-height:100px;padding:10px;border:1px solid #52615d;border-radius:8px;background:#10191c;color:#ece7d9;font:16px/1.45 Arial,sans-serif}.ruby-field{display:flex;align-items:center;gap:8px;margin:14px 0 6px}.ruby-field label{flex:1}.ruby-field button{padding:5px 9px;font-size:12px}.ruby-personality #rubyApply{margin-top:12px}.ruby-personality #rubyKeyboardDismiss{position:fixed;right:16px;bottom:16px;z-index:100;background:#233a37;padding:12px;border-radius:50%}.ruby-personality svg{width:22px;height:22px;stroke:currentColor;stroke-width:2;fill:none}.ruby-personality [hidden]{display:none!important}
:root{color-scheme:dark;--paper:#ece7d9;--muted:#9daaa6;--orange:#ff7849;--mint:#8ee1c1}*{box-sizing:border-box}body{margin:0;background:#0e171a;color:var(--paper);font:14px Arial,Helvetica,sans-serif;overflow:hidden}canvas{position:fixed;inset:0;width:100%;height:100%;cursor:crosshair}button,a,input{touch-action:manipulation}button{font:inherit;color:inherit;cursor:pointer}button:focus-visible,a:focus-visible{outline:2px solid var(--mint);outline-offset:5px}button{background:transparent;border:1px solid #6c7a7566;padding:12px 18px}button:hover{background:#d6e8db14;border-color:var(--mint)}[hidden]{display:none!important}#vignette{position:fixed;inset:0;pointer-events:none;box-shadow:inset 0 0 180px 50px #031013aa;background:linear-gradient(0deg,#071113aa,transparent 24%,transparent 78%,#07111399)}header{position:fixed;top:30px;left:36px;right:36px;display:flex;justify-content:space-between;pointer-events:none;z-index:3}.brand h1{font-size:25px;letter-spacing:3px;margin:8px 0 7px;font-weight:900}.brand a{color:#a0aaa4;text-decoration:none;pointer-events:auto}em{color:var(--orange);font-style:normal}.eyebrow{font-size:10px;letter-spacing:3px;color:var(--mint);font-weight:bold}.header-right{display:flex;gap:20px;align-items:flex-start;font-size:10px;letter-spacing:2px;color:var(--muted)}.header-right>span{padding-top:16px}header button{pointer-events:auto;padding:10px}svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.5}#hud{position:fixed;inset:0;pointer-events:none}.round{position:absolute;top:155px;left:36px}.score{position:absolute;top:100px;right:36px;text-align:right}#hud span,.results span{display:block;color:var(--muted);font-size:10px;letter-spacing:2px}#hud strong{font-size:38px;font-weight:800;font-variant-numeric:tabular-nums;display:block;letter-spacing:2px}#hud small{color:var(--muted);font-size:10px;letter-spacing:1px}.round strong{color:var(--mint)}.bottom{position:absolute;bottom:30px;left:36px;right:36px;display:flex;align-items:end;gap:55px}.health{width:230px}.health span{display:flex!important;justify-content:space-between}.health b{color:var(--paper)}.bar{height:5px;background:#ffffff20;margin:12px 0}.bar i{display:block;height:100%;width:100%;background:var(--mint);transition:width .15s}.ammo{margin-left:auto}.ammo>div{display:flex;align-items:baseline;gap:12px}.ammo strong{font-size:52px!important}.ammo b{color:var(--muted);font-weight:normal;font-size:20px}.grenades strong{font-size:22px!important;color:var(--orange);margin:15px 0}.overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:2;background:#03101399;backdrop-filter:blur(5px)}#start{justify-content:space-between;padding:150px 8vw 50px;background:linear-gradient(90deg,#071114ef,#07111488 52%,transparent);backdrop-filter:none}.intro h2,.panel h2{font-size:clamp(34px,4.4vw,70px);line-height:1.08;letter-spacing:-2px;margin:25px 0;font-weight:900}.intro p{color:#b1bdb6;line-height:1.8;font-size:16px;margin-bottom:32px}.primary{background:var(--orange);color:#151c1b;border:0;min-width:270px;padding:19px 24px;font-size:12px;letter-spacing:2px;font-weight:bold;display:flex;justify-content:space-between;gap:28px}.primary:hover{background:#ffa16e;color:#101719}.intro-footer{display:flex;gap:22px;align-items:center;margin-top:22px;color:#a1aaa3;font-size:9px;letter-spacing:1px}.intro-footer button{padding:8px;font-size:9px}.sector{align-self:end;border-top:1px solid #9cbaa766;padding-top:16px;text-align:right}.sector>span{font-size:100px;color:#a5c4b066;font-weight:900}.sector p{line-height:1.8;letter-spacing:3px;font-size:10px;color:#aec1b4}.panel{width:min(740px,90vw);padding:36px;background:#121f22f5;border:1px solid #76988d44;box-shadow:0 30px 100px #0007}.panel h2{font-size:44px;margin:14px 0 24px}.controls{display:grid;grid-template-columns:1fr 1fr;gap:35px}.controls h3{font-size:10px;letter-spacing:2px;color:var(--mint)}.controls p{font-size:12px;color:#a4b3ad;display:flex;justify-content:space-between;gap:10px}.controls b{color:var(--paper);font-weight:normal}.help{font-size:12px;color:#91a29c;line-height:1.7;border-top:1px solid #ffffff15;padding-top:15px}.options{display:flex;align-items:center;gap:20px;font-size:11px;margin:20px 0}.options label{display:flex;align-items:center;gap:8px}.options input[type=range]{width:90px;accent-color:var(--mint)}.options button{font-size:11px}.results{display:flex;gap:40px;margin:30px 0}.results strong{display:block;font-size:36px;margin-top:12px}.death{max-width:650px}#announcement{position:fixed;left:50%;top:20%;transform:translateX(-50%);text-align:center;pointer-events:none;font-size:26px;font-weight:bold;letter-spacing:4px;color:#eae6d9;text-shadow:0 2px 15px #000}#announcement small{display:block;font-size:11px;color:var(--mint);letter-spacing:2px;margin-top:12px}#toast{position:fixed;left:50%;bottom:155px;transform:translateX(-50%);font-size:11px;letter-spacing:2px;color:var(--mint);pointer-events:none}#loading{position:fixed;inset:0;background:#10191c;display:flex;align-items:center;justify-content:center;gap:15px;z-index:10;font-size:11px;letter-spacing:2px}.spinner{width:20px;height:20px;border:2px solid #ffffff25;border-top-color:var(--orange);border-radius:50%;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(max-height:700px){.panel{padding:22px}.panel h2{font-size:30px}.intro h2{font-size:42px}.brand h1{font-size:20px}header{top:18px}.bottom{bottom:20px}}

/* v1.1.0 adds Ruby's status, helper activity and expanded field manual. */
.companion-card{position:absolute;top:260px;left:36px;width:235px;border-left:2px solid #dc5367;padding:4px 0 4px 13px;background:linear-gradient(90deg,#112023bb,transparent)}#hud .ruby-name{color:#ff929b;display:flex;justify-content:space-between;letter-spacing:2px}.ruby-name b{font-weight:normal;letter-spacing:1px}.companion-card>div:not(.brain-state){font-size:12px;margin:9px 0}.companion-card>small{display:block;margin:7px 0}.brain-state{display:flex;align-items:center;gap:7px;margin-top:10px;line-height:1.5}.brain-state .spinner{width:10px;height:10px;min-width:10px;border-top-color:#ff929b}.ai-details{font-size:11px;color:#a3b4ab;line-height:1.65;border-top:1px solid #fff2;padding-top:10px}.ai-details summary{cursor:pointer;color:#ff929b}.ai-details button{font-size:11px}.panel{max-height:88vh;overflow:auto}.results strong{font-size:28px}#hud .companion-card small{font-size:9px;letter-spacing:.8px}@media(max-height:700px){.companion-card{top:220px}}

/* v1.2.0: readable five-bar health for both survivors. */
.life-bars{display:flex;gap:5px;margin:12px 0!important}.life-bars i{height:10px;flex:1;border:1px solid #aec4b34a;background:#0e1d1d}.life-bars .filled{background:#8ee1c1;box-shadow:0 0 7px #8ee1c122}#rubyLifeBars .filled{background:#f2697c;box-shadow:0 0 7px #e65e7333}

/* v1.3.0: voiced round recap, subtitles and recoverable service errors. */
.quip-card{position:fixed;z-index:2;left:50%;top:50%;transform:translate(-50%,-50%);width:min(580px,85vw);background:#122023f5;border:1px solid #c6667980;box-shadow:0 25px 90px #0009;padding:28px}.quip-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.quip-heading .eyebrow{color:#ff929b}.quip-card p{font-size:23px;line-height:1.45;margin:22px 0;color:#f0e6da}.quip-card p:empty{display:none}.quip-card small{color:#a9bbb3;font-size:12px;display:block;margin:14px 0}.quip-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.quip-actions button{font-size:11px;padding:10px 14px}#skipQuip{color:#9eb0a7}#settings{z-index:4}

/* v1.3.2: compact, wrapping enemy-speed setting and scrollable settings on phones. */
.options{flex-wrap:wrap;gap:14px}.options output{min-width:30px;font-variant-numeric:tabular-nums;color:var(--mint)}#settings .panel{max-height:92dvh;overflow-y:auto}

/* v1.4.0: shared wallet and responsive round-end shop with owned/locked states. */
.gold-counter{margin-top:12px;color:#ffdc69;font-size:11px;letter-spacing:1px}.gold-counter b{font-size:22px;margin-left:10px;font-variant-numeric:tabular-nums}#shop{z-index:3}.shop-panel{width:min(820px,94vw);padding:26px}.shop-panel h2{font-size:clamp(25px,4vw,40px);margin:15px 0}.shop-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.shop-wallet{color:#ffdc69;font-size:11px}.shop-wallet b{font-size:24px;margin-right:6px}#shopItems{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0}.shop-item{display:grid;grid-template-columns:1fr auto;gap:10px;text-align:left;background:#1b3031;border-radius:9px;padding:15px}.shop-item b{font-size:14px}.shop-item small{display:block;font-size:11px;line-height:1.5;color:#b2c1b8;margin-top:7px}.shop-item strong{color:#ffdc69;font-size:14px;white-space:nowrap}.shop-item em{grid-column:1/-1;font-size:10px;color:var(--mint)}.shop-item:disabled{cursor:default;opacity:.6}.shop-item:disabled:hover{border-color:#6c7a7566;background:#1b3031}.shop-item.selected,#shopContinue.selected{outline:2px solid #ffdc69;outline-offset:2px}#shopContinue{width:100%;margin-top:18px}.life-bars{gap:3px}@media(max-width:600px){#shopItems{grid-template-columns:1fr;gap:7px}.shop-panel{padding:16px;max-height:94dvh}.shop-item{padding:10px}.shop-item small{margin-top:4px}.shop-item em{font-size:10px}.shop-heading .eyebrow{letter-spacing:1px}.shop-wallet{font-size:9px}.shop-wallet b{font-size:20px}.gold-counter b{font-size:19px}.score{right:15px}.bottom{left:15px;right:15px;gap:12px}.health{width:150px}.ammo strong{font-size:32px!important}.grenades{display:none}.companion-card{left:15px;width:170px}.round{left:15px}header{left:15px;right:15px}.header-right>span{display:none}}

/* v1.6.2: detailed pixel-art key art for the safe-zone closing screen. */
.victory{width:min(980px,94vw);max-height:94vh;overflow:auto;padding:22px 26px}.victory-art{display:block;width:100%;max-height:min(43vh,420px);object-fit:cover;object-position:center 48%;margin:0 0 22px;border:1px solid #d48a5d66;box-shadow:0 12px 35px #0008;image-rendering:auto}.victory h2{font-size:clamp(32px,4vw,52px);margin:12px 0 14px}.victory-copy{color:#b8c5bb;line-height:1.6;margin:0 0 18px}.victory .results{margin:20px 0}.victory .primary{margin-top:16px}@media(max-width:600px){.victory{padding:14px 16px}.victory-art{max-height:32vh;margin-bottom:15px}.victory h2{font-size:32px}.victory .results{gap:18px;margin:16px 0}.victory .results strong{font-size:24px}}

/* v1.7.0: the victory celebration stays visual-only and never intercepts controls. */
.restore-health{flex-basis:100%;color:var(--paper)}#victory{overflow:hidden}#victory .panel{position:relative;z-index:2}#victoryConfetti{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:1}.confetti-piece{position:absolute;top:-12vh;width:9px;height:18px;border-radius:2px;opacity:.95;animation:confetti-fall var(--fall) linear var(--delay) infinite,confetti-sway 1.8s ease-in-out var(--delay) infinite;transform:rotate(var(--tilt))}@keyframes confetti-fall{to{top:112vh;transform:rotate(calc(var(--tilt) + 720deg))}}@keyframes confetti-sway{0%,100%{margin-left:-18px}50%{margin-left:18px}}@media(prefers-reduced-motion:reduce){.confetti-piece{animation:none;top:var(--rest);opacity:.65}}

/* v1.7.2: keep the remaining-hostile total unmistakable and closing actions side by side. */
#hud .combat-status #enemies{display:block;margin-top:10px;padding:9px 12px;min-width:185px;width:max-content;color:#f6fff9;font-size:12px;font-weight:900;letter-spacing:1.25px;background:#102523e8;border:1px solid #8ee1c166;border-left:4px solid var(--mint);border-radius:3px;box-shadow:0 5px 20px #0008,0 0 14px #8ee1c11f;text-shadow:0 1px 5px #000}.closing-actions{display:flex;align-items:stretch;gap:12px;margin-top:16px}.closing-actions .primary{margin-top:0;flex:1}.closing-actions .secondary{flex:0 0 160px;font-size:11px;font-weight:bold;letter-spacing:1.6px;background:#0b1719cc;border-color:#8ee1c155;color:var(--mint)}.closing-actions .secondary:hover{background:#18302e;border-color:var(--mint)}@media(max-width:600px){#hud .combat-status #enemies{min-width:0;font-size:10px;padding:7px 9px}.closing-actions{flex-direction:column}.closing-actions .secondary{flex-basis:auto;width:100%;padding:15px}.closing-actions .primary{width:100%;min-width:0}}
@media(max-height:700px){.companion-card{top:270px}}

/* v1.7.3: controller focus is persistent even when the browser focus ring is not. */
.closing-actions button.selected{outline:3px solid #ffdc69;outline-offset:3px;box-shadow:0 0 22px #ffdc6944}.closing-actions button.selected::after{content:'  ◀';font-size:10px}

/* v1.9.1: unified widescreen composition for every game state, including one-row desktop settings. */
@media (min-aspect-ratio:4/3) and (min-width:760px){
  :root{--safe-x:clamp(26px,3.75vw,72px);--safe-y:clamp(18px,3.35vh,36px);--panel-line:#88aa9e38}
  header{top:var(--safe-y);left:var(--safe-x);right:var(--safe-x);align-items:flex-start}
  .brand h1{font-size:clamp(20px,2vw,30px);margin:7px 0 4px}.brand a{margin-bottom:0!important;font-size:.78rem!important}
  .header-right{align-items:center}.header-right>span{padding-top:0}.header-right button{padding:9px}

  #start{padding:clamp(106px,15vh,150px) var(--safe-x) clamp(28px,5vh,54px);display:grid;grid-template-columns:minmax(530px,1.15fr) minmax(210px,.85fr);align-items:center;gap:7vw;background:linear-gradient(90deg,#071114f7 0%,#071114d8 40%,#07111472 68%,#07111410 100%)}
  #start .intro{width:min(590px,100%);margin-left:clamp(18px,5vw,86px)}
  .intro h2{font-size:clamp(42px,4.55vw,76px);line-height:.98;letter-spacing:-2.5px;margin:18px 0 20px}.intro p{font-size:clamp(14px,1.15vw,18px);line-height:1.6;margin:0 0 24px}.intro .primary{width:min(365px,100%)}
  .intro-footer{margin-top:16px}.sector{justify-self:end;align-self:end;min-width:220px}.sector>span{font-size:clamp(76px,8.5vw,132px);line-height:.86}.sector p{margin-bottom:0}

  #settings{padding:var(--safe-y) var(--safe-x)}
  #settings .panel{width:min(1100px,92vw);max-height:calc(100vh - var(--safe-y)*2);padding:clamp(20px,2.5vw,34px);display:grid;grid-template-columns:minmax(430px,1.1fr) minmax(330px,.9fr);grid-template-areas:'tag tag' 'title title' 'controls manual' 'details credits' 'personality personality' 'options options' 'actions actions';column-gap:clamp(26px,4vw,56px);row-gap:10px;overflow-y:auto}
  #settings .panel>.ruby-personality{grid-area:personality}
  #settings .panel>.eyebrow{grid-area:tag}#settings .panel>h2{grid-area:title;margin:0 0 4px;font-size:clamp(30px,3vw,44px)}#settings .controls{grid-area:controls;gap:28px}#settings .panel>.help:first-of-type{grid-area:manual;margin:0;padding:12px 0 0;border-top:1px solid var(--panel-line);font-size:11px;line-height:1.55;column-count:2;column-gap:22px;text-align:left}#settings .ai-details{grid-area:details;margin:0;align-self:start}#settings .panel>.help:last-of-type{grid-area:credits;margin:0;align-self:start;font-size:10px;line-height:1.55}#settings .options{grid-area:options;margin:4px 0 0;padding-top:12px;border-top:1px solid var(--panel-line);display:grid;grid-template-columns:auto auto auto auto auto;align-items:center;justify-content:space-between;gap:12px 18px}#settings .restore-health{flex-basis:auto}#settings .manual-actions{grid-area:actions}
  #settings .controls h3{margin:8px 0 10px}#settings .controls p{margin:8px 0;font-size:11px}

  #shop{padding:var(--safe-y) var(--safe-x)}.shop-panel{width:min(1040px,92vw);max-height:calc(100vh - var(--safe-y)*2);padding:clamp(20px,2.35vw,32px)}.shop-panel h2{font-size:clamp(28px,3.25vw,48px);margin:9px 0 12px}#shopItems{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:11px 0}.shop-item{padding:12px}.shop-item small{font-size:10px}.shop-item em{font-size:9px}#shop .ai-details{margin-top:9px}#shopContinue{margin-top:11px;padding:15px 22px}

  #death,#victory{padding:var(--safe-y) var(--safe-x)}#death .death{width:min(880px,88vw);padding:clamp(28px,4vw,52px)}#death .death h2{font-size:clamp(42px,5vw,68px);line-height:.95;margin:18px 0 22px}#death .results{justify-content:space-between;border-block:1px solid var(--panel-line);padding:20px 0;margin:20px 0}#death .results>div{flex:1}#death .results strong{font-size:clamp(26px,3vw,40px)}
  #victory .victory{width:min(1120px,92vw);height:min(650px,calc(100vh - var(--safe-y)*2));max-height:none;padding:clamp(20px,2.2vw,30px);display:grid;grid-template-columns:minmax(360px,1.08fr) minmax(390px,.92fr);grid-template-rows:auto auto auto 1fr auto auto auto;column-gap:clamp(28px,4vw,55px);align-content:center;overflow:hidden}
  .victory-art{grid-column:1;grid-row:1/-1;width:100%;height:100%;max-height:none;margin:0;object-fit:cover;object-position:center 48%;border-radius:2px}.victory>.eyebrow,.victory>h2,.victory>.victory-copy,.victory>.results,.victory>#victoryRecord,.victory>.closing-actions{grid-column:2}.victory>.eyebrow{align-self:end}.victory h2{font-size:clamp(35px,3.8vw,54px);line-height:.98;margin:12px 0}.victory-copy{font-size:13px;margin:0 0 8px}.victory .results{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:12px 0;padding-block:14px;border-block:1px solid var(--panel-line)}.victory .results strong{font-size:clamp(21px,2vw,30px);margin-top:8px}.victory .closing-actions{margin-top:12px}.victory .primary{margin-top:0;min-width:0}.victory .closing-actions .secondary{flex-basis:138px}

  #hud .round{top:clamp(125px,18vh,170px);left:var(--safe-x)}#hud .score{top:clamp(90px,12.5vh,120px);right:var(--safe-x)}.companion-card{top:clamp(245px,36vh,330px);left:var(--safe-x)}.bottom{bottom:var(--safe-y);left:var(--safe-x);right:var(--safe-x);gap:clamp(28px,4vw,64px)}#toast{bottom:clamp(118px,18vh,170px)}#announcement{top:17%}
}

@media (min-aspect-ratio:4/3) and (max-height:700px) and (min-width:760px){
  :root{--safe-y:16px}.brand h1{font-size:19px}.brand .eyebrow{font-size:8px}.brand a{font-size:.7rem!important}.intro h2{font-size:clamp(38px,5vw,58px)}#start{padding-top:88px}.panel{max-height:calc(100vh - 32px)}
  #settings .panel{padding:17px 22px;row-gap:6px}#settings .panel>h2{font-size:28px}#settings .controls p{margin:5px 0}#settings .panel>.help:first-of-type{font-size:9.5px;line-height:1.45}#settings .options{padding-top:8px;margin-top:0}#settings #resume{padding:12px 18px}
  .shop-panel{padding:17px 22px}.shop-panel h2{font-size:29px}#shopItems{margin:8px 0}.shop-item{padding:9px}.shop-item small{line-height:1.35}#shopContinue{padding:12px 18px}
  #victory .victory{height:calc(100vh - 32px);padding:17px}.victory h2{font-size:34px}.victory .results{margin:7px 0;padding-block:9px}.victory .closing-actions{margin-top:7px}.victory .closing-actions button{padding:13px 15px}
  #hud .round{top:112px}.companion-card{top:238px}.bottom{bottom:16px}.ammo strong{font-size:42px!important}
}

/* v1.9.18: every non-gameplay control exposes an unmistakable controller selection state. */
.manual-actions{display:flex;align-items:stretch;gap:12px;margin-top:4px}.manual-actions .primary{flex:1;min-width:0}.manual-actions .secondary{flex:0 0 170px;font-size:11px;font-weight:bold;letter-spacing:1.6px;background:#0b1719cc;border-color:#8ee1c155;color:var(--mint)}.manual-actions .secondary:hover{background:#18302e;border-color:var(--mint)}
.gamepad-selected{outline:3px solid #ffdc69!important;outline-offset:4px!important;box-shadow:0 0 24px #ffdc6944!important}.gamepad-selected[type=checkbox]{box-shadow:0 0 0 4px #ffdc6944!important}.ai-details summary.gamepad-selected,.help a.gamepad-selected{border-radius:3px;color:#ffdc69}.options input.gamepad-selected{accent-color:#ffdc69}
@media(max-width:600px){.manual-actions{flex-direction:column}.manual-actions .secondary{flex-basis:auto;width:100%;padding:15px}.manual-actions .primary{width:100%}}

/* v1.12.1: warm the entire battlefield; comic panels each occupy roughly a quarter screen. */
body.sunset #game{filter:sepia(.65) saturate(1.6) hue-rotate(338deg)}
body.sunset #vignette{background:linear-gradient(165deg,#ff9d362e,#db4a171c 55%,#37101d44);box-shadow:inset 0 0 150px 35px #3c160d66}
#bossIntro{position:fixed;inset:0;z-index:12;pointer-events:none}
.boss-panel{position:absolute;margin:0;width:49vw;height:48vh;border:5px solid #f9e7c8;outline:2px solid #211711;background:#211711;box-shadow:10px 13px 0 #160f19a6;overflow:hidden;animation:comic-arrive .22s ease-out both}
.boss-panel img{width:100%;height:100%;object-fit:cover}
.boss-panel-one{left:3vw;top:5vh;transform:rotate(-3deg)}
.boss-panel-two{left:26vw;top:23vh;transform:rotate(3deg)}
.boss-panel-three{left:48vw;top:43vh;transform:rotate(-2deg)}
.boss-panel figcaption{position:absolute;top:8px;left:10px;padding:6px 12px;background:#ffe098;color:#321b17;font:bold italic clamp(12px,2vw,27px) Arial;transform:rotate(-4deg);border:2px solid #321b17}
.boss-panel-three figcaption{left:auto;right:12px;font-size:clamp(22px,4vw,52px);background:#ffbb66}
.boss-dialogue{position:absolute;bottom:3vh;left:50%;transform:translateX(-50%);width:max-content;max-width:90vw;display:flex;align-items:center;gap:10px;background:#1c171aef;border:2px solid #ffe4b7;border-radius:4px;padding:12px 18px;box-shadow:5px 5px 0 #100b11a6;font-size:clamp(14px,1.5vw,20px)}
.boss-dialogue:has(#bossCaption:empty){display:none}.boss-dialogue strong{color:#ff929b;font-size:12px;letter-spacing:1px}
@keyframes comic-arrive{from{opacity:0;scale:.85}to{opacity:1;scale:1}}
@media(max-width:600px) and (orientation:portrait){.boss-panel{width:64vw;height:36vh;border-width:3px}.boss-panel-one{left:3vw;top:6vh}.boss-panel-two{left:18vw;top:28vh}.boss-panel-three{left:33vw;top:50vh}.boss-dialogue{bottom:4vh;padding:10px;flex-wrap:wrap;gap:6px}}
@media(prefers-reduced-motion:reduce){.boss-panel{animation:none}}

/* v1.12.1: twenty-hit boss meter, kept clear of the settings control on phones. */
#bossHealth{position:fixed;z-index:8;top:18px;left:50%;transform:translateX(-50%);width:min(700px,calc(100vw - 180px));padding:12px 16px;background:#211515ee;border:1px solid #e8a563;box-shadow:0 6px 24px #0008;border-radius:5px;pointer-events:none}
.boss-health-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:7px;font:700 12px monospace;letter-spacing:2px;color:#ffdfac}
#bossSegments{display:grid;grid-template-columns:repeat(20,minmax(0,1fr));gap:4px}
#bossSegments i{height:16px;background:#ff9f51;box-shadow:inset 0 2px #ffdeb2;transition:background .1s}
#bossSegments i.empty{background:#513632;box-shadow:inset 0 1px #6b4540}
.boss-combat header .brand{visibility:hidden}
@media(max-width:600px){#bossHealth{left:12px;right:76px;transform:none;width:auto;top:16px;padding:9px 10px}.boss-health-title{font-size:10px;letter-spacing:1px}#bossSegments{gap:2px}#bossSegments i{height:13px}}

/* v1.14.0: keep the independent No music control on the widescreen settings row. */
@media (min-aspect-ratio:4/3) and (min-width:760px){#settings .options{grid-template-columns:repeat(6,auto)}}

/* v1.20.14: prominent Zone 6 timer above the battlefield, with a final-ten warning. */
#hordeTimer{position:fixed;top:max(8px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:5;width:max-content;max-width:94vw;padding:10px 18px;border:1px solid #e4b36a;border-radius:10px;background:#102124f2;box-shadow:0 5px 22px #0008;color:#ffe2ac;font-size:clamp(17px,2.4vw,26px);font-weight:800;font-variant-numeric:tabular-nums;text-align:center;pointer-events:none}
#hordeTimer.urgent{color:#ffb9ab;border-color:#ff7849;background:#361b19f2}

#roundTimer{display:block;margin-top:5px;color:var(--mint)!important;font-variant-numeric:tabular-nums}#roundTimer.urgent{color:#ff9d82!important}

/* v1.21.2: compact map HUD; menu branding and controls remain available before a run. */
body:has(#hud:not([hidden])) > header{display:none}
#hud{--hud-x:var(--safe-x,36px);--hud-y:max(var(--safe-y,24px),env(safe-area-inset-top));--status-width:235px}
#hud .round{top:var(--hud-y);left:max(var(--hud-x),env(safe-area-inset-left))}
#hud .combat-status{position:absolute;top:var(--hud-y);right:max(var(--hud-x),env(safe-area-inset-right));width:var(--status-width);display:flex;flex-direction:column;gap:10px}
#hud .combat-status #enemies{width:100%;min-width:0;margin:0;line-height:1.4;overflow-wrap:anywhere}
#hud .combat-status .companion-card{position:static;width:100%;padding:4px 12px 4px 0;border-left:0;border-right:2px solid #dc5367;background:linear-gradient(270deg,#112023bb,transparent);text-align:right;overflow-wrap:anywhere}
#hud .combat-status .brain-state{justify-content:flex-end}
/* Keep the boss meter between the two corners, with a separate row on narrow screens. */
#bossHealth{top:var(--safe-y,24px);left:calc(var(--safe-x,36px) + 85px);right:calc(var(--safe-x,36px) + 255px);transform:none;width:auto}
@media(max-width:600px){#hud{--hud-x:15px;--hud-y:max(16px,env(safe-area-inset-top));--status-width:min(195px,calc(100vw - 105px))}#hud .combat-status{gap:7px}#hud .combat-status .companion-card{padding-right:9px}#hud .companion-card>div:not(.brain-state){margin:6px 0}#hud .companion-card .life-bars{margin:8px 0!important}}
@media(max-width:900px){#bossHealth{top:auto;bottom:120px;left:15px;right:15px;width:auto;transform:none}}

/* v1.21.2: Minimal HUD is opt-in; only health, ammo, and grenades survive the HUD whitelist. */
body.minimal-hud #hud > :not(.bottom):not(#hordeTimer),
body.minimal-hud #hud .bottom > :not(.health):not(.ammo):not(.grenades),
body.minimal-hud #hud .health > :not(#playerLifeBars),
body.minimal-hud #hud .health .player-label,
body.minimal-hud #hud .ammo > :not(div),
body.minimal-hud #hud .grenades > :not(#grenades),
body.minimal-hud #toast,
body.minimal-hud:not(.special-hud) #announcement{display:none!important}
body.minimal-hud #hud .bottom{gap:clamp(16px,4vw,48px);align-items:center}
body.minimal-hud #hud .health{width:clamp(90px,20vw,180px)}
body.minimal-hud #hud .ammo > div{gap:0;white-space:nowrap}
body.minimal-hud #hud .ammo #ammo,body.minimal-hud #hud .ammo #reserve{font-size:clamp(24px,4vw,38px)!important;font-weight:800;letter-spacing:0;color:var(--paper);font-variant-numeric:tabular-nums}
body.minimal-hud #hud .grenades{display:block}
body.minimal-hud #hud #grenades{margin:0;font-size:clamp(24px,4vw,38px)!important}
@media(max-width:900px){body.minimal-hud #bossHealth{top:max(16px,env(safe-area-inset-top));bottom:auto}}

/* v1.21.3: Minimal HUD health uses only the life bar. The numeric health readout remains available in the regular HUD. */
