.stage-briefing{position:fixed;inset:0;z-index:50;display:flex;overflow-y:auto;overscroll-behavior:contain;padding:28px 18px;isolation:isolate;background:#072346;color:#25374c}
.stage-briefing[hidden]{display:none}
.stage-briefing::before{content:'';position:fixed;inset:-12px;z-index:-1;background:linear-gradient(#032344d9,#05172af2),url('./assets/story-worlds.png') 100% 0/200% 200%;filter:blur(4px);pointer-events:none}
.parchment{position:relative;width:min(860px,100%);margin:auto;flex:none;border:48px solid transparent;border-image-source:url('./assets/quest-parchment.png');border-image-slice:13% 9% fill;border-image-width:48px 38px;filter:drop-shadow(0 16px 24px #0006);padding:8px 8px 6px;animation:unroll-quest .5s cubic-bezier(.22,.68,.25,1) both}
.parchment-heading{text-align:center;padding:0 0 19px;border-bottom:1px solid #95724566}
.briefing-kicker{font:12px/1.7 var(--pixel);letter-spacing:1px;color:#785328;margin:0 0 10px}
.parchment-heading h2{font:700 clamp(25px,3.2vw,32px)/1.2 'Space Grotesk',system-ui,sans-serif;letter-spacing:-.8px;color:#143861;margin:0;overflow-wrap:anywhere}
.parchment-heading h2:focus{outline:none}
.briefing-dedication{font:italic 17px/1.4 Georgia,serif;margin:8px 0 13px;color:#775833;overflow-wrap:anywhere}
.briefing-facts{display:flex;justify-content:center;gap:20px;flex-wrap:wrap;font-size:14px;font-weight:700;line-height:1.5;color:#274364}
.briefing-facts>span{display:flex;align-items:center;gap:7px}.briefing-facts b{color:#9b5734;font-size:18px;font-weight:400}
.briefing-goal{font-size:17px;line-height:1.5;font-weight:600;margin:18px 0 22px;text-align:center;color:#254567}
.briefing-columns{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.3fr);gap:28px}
.briefing-section-title{margin:0 0 16px;color:#775225;font-size:14px;line-height:1.5;font-weight:700;letter-spacing:1.8px;text-transform:uppercase}
.briefing-controls{display:grid;gap:15px}
.briefing-controls h3,.briefing-objective h3{font-size:17px;line-height:1.35;margin:0 0 4px;color:#193b5d;font-weight:700}
.briefing-controls p,.briefing-objective p{font-size:16px;line-height:1.5;margin:0;color:#3d4145}
.briefing-keys{display:flex;align-items:center;gap:5px;margin:0 0 15px;color:#775a31}
.briefing-keys kbd{font:700 13px/1 'Space Grotesk',system-ui,sans-serif;width:28px;height:29px;display:grid;place-items:center;border:1px solid #805c3999;background:#f9e6b877;box-shadow:0 2px #99744566;border-radius:2px;color:#24486d}.briefing-keys span{font-size:14px;margin-left:6px}
.briefing-objectives{padding:0;margin:0;list-style:none;display:grid;gap:16px}
.briefing-objective{display:grid;grid-template-columns:42px minmax(0,1fr);align-items:start;gap:10px}
.briefing-item{width:42px;height:46px;margin-top:8px}.briefing-item .sprite{width:42px;height:46px}.briefing-item .door-icon{background-position:100% 50%}
.briefing-tag{display:block;font-size:12px;line-height:1.4;letter-spacing:1px;font-weight:700;color:#886635;margin:0 0 4px}.briefing-tag.complete{color:#476d47}
.briefing-warning{margin:22px 0 0;padding:16px 0 0;border-top:1px solid #95724566}
.briefing-warning h3{font-size:14px;line-height:1.5;margin:0 0 6px;color:#775225;letter-spacing:1.8px;text-transform:uppercase}
.briefing-warning p{font-size:16px;line-height:1.5;margin:0;color:#454140}
.briefing-warning .briefing-combat{margin-top:7px;color:#264665;font-weight:500}
.briefing-retry{font-size:14px;line-height:1.5;color:#765a3f;margin:10px 0 0}
.briefing-footer{text-align:center;margin-top:21px}
.briefing-footer>p{font-size:14px;line-height:1.45;margin:0 0 13px;color:#74562e}
.begin-stage{display:inline-flex;align-items:center;justify-content:center;min-height:58px;max-width:100%;min-width:248px;border:2px solid #163957;background:linear-gradient(#255382,#163959);color:#ffe7a1;box-shadow:0 4px #0b263e,0 0 0 2px #d5a85288;padding:16px 24px;font:14px/1.6 var(--pixel);letter-spacing:.3px;transition:background .15s,transform .15s}
.begin-stage:hover{background:linear-gradient(#326796,#214b70)}.begin-stage:active{transform:translateY(2px);box-shadow:0 2px #0b263e,0 0 0 2px #d5a85288}.begin-stage:focus-visible{outline:3px solid #193f73;outline-offset:6px}
body.reading-briefing{overflow:hidden}
@keyframes unroll-quest{from{opacity:0;clip-path:inset(43% 0 43% 0);transform:translateY(8px)}to{opacity:1;clip-path:inset(0);transform:translateY(0)}}
@media(max-width:640px){.stage-briefing{padding:16px 10px}.parchment{border-width:35px 25px;border-image-width:35px 25px;padding:6px 0 8px}.parchment-heading{padding-bottom:15px}.parchment-heading h2{font-size:27px}.briefing-kicker{font-size:12px;margin-bottom:9px}.briefing-columns{grid-template-columns:minmax(0,1fr);gap:23px}.briefing-controls{gap:13px}.briefing-controls h3,.briefing-objective h3{font-size:17px}.briefing-goal{font-size:17px;margin:17px 0 22px}.briefing-section-title{margin-bottom:12px}.briefing-objectives{gap:17px}.briefing-warning{margin-top:20px}.begin-stage{width:100%;min-width:0;font-size:13px}.briefing-facts{gap:17px}.briefing-objective{grid-template-columns:35px minmax(0,1fr);gap:8px}.briefing-item,.briefing-item .sprite{width:35px;height:40px}}
@media(prefers-reduced-motion:reduce){.parchment{animation:none}.begin-stage{transition:none}}

/* One short briefing, with the same parchment and breathing room. */
.stage-briefing .parchment{width:min(800px,100%)}
.stage-briefing .parchment-heading{padding-bottom:12px}
.stage-briefing .briefing-dedication{font-size:15px;margin:6px 0 10px}
.stage-briefing .briefing-goal{font-size:17px;margin:14px 0 18px}
.stage-briefing .briefing-columns{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:24px}
.stage-briefing .briefing-section-title{font:8px/1.9 var(--pixel);letter-spacing:.5px;margin-bottom:12px}
.stage-briefing .briefing-controls,.stage-briefing .briefing-objectives{gap:14px}
.stage-briefing .briefing-controls h3,.stage-briefing .briefing-objective h3{font-size:16px}
.stage-briefing .briefing-controls p,.stage-briefing .briefing-objective p,.stage-briefing .briefing-warning p{font-size:15px;line-height:1.5}
.stage-briefing .briefing-tag{font-size:10px;letter-spacing:.6px}
.stage-briefing .briefing-keys{display:none}
.stage-briefing .briefing-enemy-section{margin-top:16px;padding-top:14px}
.stage-briefing .briefing-enemies{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.stage-briefing .briefing-enemy canvas{height:42px;width:36px}
.stage-briefing .briefing-enemy h4{font-size:13px;margin:0 0 3px}
.stage-briefing .briefing-enemy b{font-size:11px}
.stage-briefing .briefing-warning{margin-top:16px;padding-top:12px}
.stage-briefing .briefing-warning h3{font-size:11px;letter-spacing:1px}
.stage-briefing .briefing-combat[hidden]{display:none}
.stage-briefing .briefing-retry{font-size:13px;margin-top:8px}
.stage-briefing .briefing-footer{margin-top:14px}.stage-briefing .briefing-footer>p{font-size:12px;margin-bottom:10px}
.stage-briefing .begin-stage{min-height:50px;font-size:12px;padding:12px 22px}
@media(max-width:640px){
  .stage-briefing .briefing-columns{grid-template-columns:1fr;gap:17px}
  .stage-briefing .parchment-heading h2{font-size:25px}
  .stage-briefing .briefing-goal{font-size:16px;margin:12px 0 16px}
  .stage-briefing .briefing-enemies{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stage-briefing .briefing-controls{gap:10px}.stage-briefing .briefing-objectives{gap:12px}
  .stage-briefing .briefing-controls h3,.stage-briefing .briefing-objective h3{font-size:15px}
}
.briefing-sound{display:block;margin:12px auto 0;min-height:44px;padding:8px 12px;border:1px solid #977b4e;background:#f2dfa780;box-shadow:0 2px #b99b63;color:#2b4661;font:8px/1.7 var(--pixel)}.briefing-sound:active{transform:translateY(1px);box-shadow:0 1px #b99b63}.briefing-sound[aria-pressed="false"]{color:#805a42}
/* Short desktop screens (1280×800, 1366×768): a tighter parchment that fits the window, with BEGIN STAGE and the sound
   switch side by side. On the longest quest the footer stays pinned, so BEGIN STAGE is never below the fold. */
@media(min-width:641px) and (max-height:900px){
  .stage-briefing{padding:12px 18px}
  .stage-briefing .parchment-heading{padding-bottom:8px}
  .stage-briefing .briefing-kicker{margin-bottom:4px}
  .stage-briefing .briefing-dedication{margin:2px 0 6px}
  .stage-briefing .briefing-goal{margin:10px 0 12px}
  .stage-briefing .briefing-section-title{margin-bottom:8px}
  .stage-briefing .briefing-controls,.stage-briefing .briefing-objectives{gap:10px}
  .stage-briefing .briefing-controls p,.stage-briefing .briefing-objective p,.stage-briefing .briefing-warning p{line-height:1.42}
  .stage-briefing .briefing-enemy-section{margin-top:10px;padding-top:10px}
  .stage-briefing .briefing-enemies{gap:6px 10px}.stage-briefing .briefing-enemy canvas{height:34px;width:30px}
  .stage-briefing .briefing-warning{margin-top:12px;padding-top:9px}
  .stage-briefing .briefing-footer{position:sticky;bottom:-6px;z-index:1;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px 12px;margin:8px -8px -6px;padding:16px 8px 10px;background:linear-gradient(#f3e2b900,#f3e2b9ee 20px);-webkit-mask-image:linear-gradient(90deg,transparent,#000 40px,#000 calc(100% - 40px),transparent);mask-image:linear-gradient(90deg,transparent,#000 40px,#000 calc(100% - 40px),transparent)}
  .stage-briefing .briefing-footer>p{flex-basis:100%;margin:0}
  .stage-briefing .briefing-sound{margin:0}
}
/* Phones: keep the words clear of the parchment's torn edge. */
@media(max-width:640px){.stage-briefing .parchment{padding:6px 12px 8px}}
