/* The setting stays in view while the decisions and journal scroll. */
body:has(#game:not([hidden])) {background:#091019}
#game {--light:#b5d9ef;--mist:radial-gradient(ellipse at 82% 45%,#a1d2ed38,transparent 55%);isolation:isolate}
.scene-world {position:fixed;inset:0;z-index:-1;overflow:hidden;pointer-events:none;background:#111722}
.scene-world img {width:100%;height:100%;object-fit:cover;object-position:60% center}
.scene-world::after {content:"";position:absolute;inset:0;background:linear-gradient(90deg,#060b13db,transparent 80%),linear-gradient(0deg,#060b1377,transparent 45%)}
.air {position:absolute;inset:-4%;background:var(--mist);animation:weather 12s ease-in-out infinite alternate}
@keyframes weather {to {transform:translate(2%,1%);opacity:.55}}
#game[data-world="coruscant"] {--light:#b6d5ff;--mist:linear-gradient(110deg,transparent 54%,#6cc9ff48 67%,transparent 70%,#fc70af38 82%,transparent)}
#game[data-world="tatooine"] {--light:#ffdea6;--mist:linear-gradient(5deg,#d9904f77,transparent 45%),radial-gradient(ellipse at 88% 18%,#fff2ad66,transparent 30%)}
#game[data-world="moraband"] {--light:#ffc4a4;--mist:linear-gradient(12deg,#b75b4780,transparent 44%,#bd824a25 60%,transparent 72%)}
#game[data-world="dathomir"] {--light:#baf7d2;--mist:radial-gradient(ellipse at 22% 68%,#90bba547,transparent 34%),radial-gradient(ellipse at 80% 78%,#6dd4a64d,transparent 50%)}
#game[data-world="mustafar"] {--light:#ffbc83;--mist:radial-gradient(ellipse at 76% 101%,#ff70157d,transparent 53%),linear-gradient(15deg,#ad352e40,transparent 62%)}
#game[data-world="peridea"] {--light:#c4c9ed;--mist:linear-gradient(166deg,transparent 29%,#b0b1c433 42%,transparent 53%,#94aaca36 73%,transparent)}
#game .game-top {padding:12px 16px;background:#080f19df;border-bottom:1px solid var(--light)}
#game .game-layout {grid-template-columns:minmax(0,47rem) minmax(13rem,19rem);justify-content:space-between;gap:clamp(16px,5vw,100px)}
#game .scene {background:transparent;border:0;box-shadow:none;overflow:visible}
#game .scene figure {display:flex;align-items:end;justify-content:space-between;gap:8px;min-height:clamp(6rem,21vh,15rem);aspect-ratio:auto;background:transparent;padding-bottom:10px}
#game .scene figure::after {display:none}
#game .scene figure figcaption,#game .scene-kind {position:static;background:#07101be6;color:white;text-align:left;padding:5px 9px}
#game .scene-kind {order:-1;color:var(--light)}
#game .scene-copy {background:linear-gradient(130deg,#0a101bec,#0b111dea);border-top:2px solid var(--light)}
#game .eyebrow,#game .choice-num {color:var(--light)}
#game .profile {background:#0a111ce6}
#game .choice:focus-visible,#game .choice:hover {border-color:var(--light)}
#ending {--signal:#e7c89a}
#ending .result-hero {min-height:72svh;border-bottom:3px solid var(--signal)}
#ending .result-hero-copy p {color:var(--signal)}
#ending .result-hero-copy {padding-bottom:clamp(40px,8vh,100px)}
#ending .result-hero-copy::before {content:"";display:block;width:clamp(3rem,10vw,9rem);height:3px;background:var(--signal);margin-bottom:20px}
#ending .epilogue {max-width:60ch;border-color:var(--signal);font:clamp(1.25rem,2.3vw,1.85rem)/1.55 Georgia,serif}
#ending .character-match {display:grid;grid-template-rows:auto 1fr;gap:0;padding:0;overflow:hidden;align-items:stretch;border-top:2px solid var(--signal)}
#ending .character-match img {width:100%;height:clamp(13rem,24vw,22rem);object-position:50% 28%;border:0}
#ending .character-match div {padding:1.25rem}
#ending .character-match strong {font-size:1.45rem;color:var(--signal)}
#ending .character-match p {font-size:1rem;line-height:1.6}
#ending .dossier-link {font-size:.9rem;color:var(--signal)}
@media(max-width:840px) {#game .game-layout {grid-template-columns:minmax(0,1fr)}#game .scene figure {min-height:24svh}#game .game-top {margin-bottom:0}#ending .result-hero {min-height:64svh}}
@media(max-height:500px) {#game .scene figure {min-height:4rem}#ending .result-hero {min-height:85svh}}
@media(prefers-reduced-motion:reduce) {.air {animation:none}}

/* Keep the masthead, guide and footer reachable around the fixed scene. */
body:has(#game:not([hidden])) :is(.mast,.guide,footer) {position:relative;z-index:1;background:#0b111c}
