/* Rift-only atmosphere. Crimson remains the consistent collision language. */
.flight-page:not(.relay-page){--rift-primary:#00eaff;--rift-secondary:#b7ff54}
.flight-page:not(.relay-page):has(.world-backdrop[data-rift-theme="B"]){--rift-primary:#bd65ff;--rift-secondary:#4cffe1}
.flight-page:not(.relay-page):has(.world-backdrop[data-rift-theme="C"]){--rift-primary:#ffd34d;--rift-secondary:#66b7ff}
.flight-page:not(.relay-page):has(.world-backdrop[data-rift-theme="D"]){--rift-primary:#ff55ed;--rift-secondary:#65faff}
.flight-page:not(.relay-page) .world-backdrop{background-image:linear-gradient(180deg,#02112b12,#07182920),url('/assets/osp-concept/rift-panorama.png');background-position:center 58%;opacity:1}
.flight-page:not(.relay-page) .world-backdrop[data-rift-theme="B"]{background-position:28% 42%}
.flight-page:not(.relay-page) .world-backdrop[data-rift-theme="C"]{background-position:72% 64%}
.flight-page:not(.relay-page) .world-backdrop[data-rift-theme="D"]{background-position:35% 38%}
.flight-page:not(.relay-page) .cinematic-world:after{background:radial-gradient(ellipse at 47% 47%,transparent 52%,#02091c28 100%)}
.flight-page:not(.relay-page) .sector-label{border-left-color:var(--rift-primary);box-shadow:-5px 0 24px -12px var(--rift-primary)}
.flight-page:not(.relay-page) .sector-label strong{color:#f2fbff;text-shadow:0 0 15px var(--rift-primary)}
.flight-page:not(.relay-page) .progress-track i{background:linear-gradient(90deg,var(--rift-secondary),var(--rift-primary));box-shadow:0 0 12px var(--rift-primary)}
.flight-page:not(.relay-page) .lift-button{border-color:var(--rift-primary);background:linear-gradient(135deg,#203849,#0d2433);box-shadow:inset 0 0 22px #9cecff0d,0 0 18px -10px var(--rift-primary);color:#efffff}
.flight-page:not(.relay-page) .lift-button.pressed{background:var(--rift-primary);color:#071327;box-shadow:0 0 24px -5px var(--rift-primary)}
.flight-page:not(.relay-page) .sector-toast{border-color:var(--rift-primary);box-shadow:0 0 32px -14px var(--rift-primary);background:#061323ed}
.flight-page:not(.relay-page) .sector-toast strong{color:var(--rift-primary)}
@media(prefers-reduced-motion:reduce){.flight-page:not(.relay-page) .world-backdrop{will-change:auto}.flight-page:not(.relay-page) .lift-button{transition:none}}

/* A permanent spare-life readout lives in the control bar, never over the course. */
.rift-life-hud{display:flex;align-items:center;gap:8px;padding:7px 10px;border:1px solid #5affc56b;border-radius:8px;background:#12342f;flex-shrink:0;color:#c6f9e9;transition:background .2s,border-color .2s}
.rift-life-heart{color:#79ffd0;font-size:24px;line-height:1;text-shadow:0 0 13px #5affae88}
.rift-life-hud>span:last-child{font-size:7px;letter-spacing:1.3px;line-height:1.4}.rift-life-hud b{display:block;font-size:10px;letter-spacing:1px;margin-top:2px;color:#dffff5}
.rift-life-hud[data-state=empty]{border-color:#74899e5c;background:#18212d;color:#acb7c7}.rift-life-hud[data-state=empty] .rift-life-heart{color:#8794a7;text-shadow:none}.rift-life-hud[data-state=empty] b{color:#bdc8d8}
.rift-life-hud[data-state=recovering]{border-color:#a8ffff;background:#16434e;box-shadow:0 0 18px #74ffff40}.rift-life-hud[data-state=recovering] .rift-life-heart{color:#d1ffff;text-shadow:0 0 14px #b4ffff}
.rift-life-hud[hidden]{display:none}.flight-page .control-icon.life-icon{color:#8fffd4;border-color:#5caa90}
.flight-page:not(.relay-page) .flight-controls{gap:16px}.flight-page:not(.relay-page) .flight-hint{margin-right:auto}.flight-page:not(.relay-page) .retry-button{margin-left:0}
.flight-page:not(.relay-page) .sector-toast[data-rift-notice=recovery]{border-color:#9affee;box-shadow:0 0 35px -14px #80ffdb;background:#082a30eb}.flight-page:not(.relay-page) .sector-toast[data-rift-notice=recovery] strong{color:#affff0;font-size:16px}
.rift-help .relay-guide-cards{grid-template-columns:repeat(3,minmax(0,1fr))}.rift-help .relay-guide-cards small{font-size:12px}.rift-help .relay-guide-cards b{font-size:12px}
@media(max-width:900px),(pointer:coarse){
 .flight-page:not(.relay-page) .rift-statusbar{right:calc(166px + env(safe-area-inset-right))}.flight-page:not(.relay-page) .flight-controls{gap:8px}
 .flight-page:not(.relay-page) .lift-button{min-width:145px;gap:11px}.flight-page:not(.relay-page) .retry-button{padding:0 5px}.flight-page:not(.relay-page) .retry-button span{display:none}
 .rift-life-hud{padding:5px 7px;gap:6px;order:-1}.rift-life-heart{font-size:20px}.rift-life-hud>span:last-child{font-size:6px;letter-spacing:.7px}.rift-life-hud b{font-size:9px;letter-spacing:.5px}
 .flight-page:not(.relay-page) .rift-statusbar .sector-label strong{font-size:7px;letter-spacing:0}.flight-page:not(.relay-page) .rift-statusbar .progress-head b{font-size:18px}
}
@media(max-width:420px){.flight-page:not(.relay-page) .flight-title{font-size:10px;letter-spacing:.4px}.flight-page:not(.relay-page) .flight-header{gap:3px}.flight-page:not(.relay-page) .back-base{font-size:6px;gap:2px;letter-spacing:.3px}.flight-page:not(.relay-page) .rift-statusbar{left:calc(73px + env(safe-area-inset-left));right:calc(157px + env(safe-area-inset-right))}.flight-page:not(.relay-page) .flight-actions{gap:3px}.flight-page:not(.relay-page) .icon-button{width:28px}.flight-page:not(.relay-page) .board-open{width:42px}.rift-help .relay-guide-cards{grid-template-columns:1fr}.rift-help .relay-guide-cards>div{display:grid;grid-template-columns:34px 1fr;gap:0 10px}.rift-help .control-icon{grid-row:1/3;margin:2px 0}.rift-help .relay-guide-cards small{font-size:11px}}
@media(max-height:570px) and (orientation:landscape){.rift-life-hud{padding:4px 9px}.rift-life-hud b{font-size:9px}.flight-page:not(.relay-page) .sector-toast[data-rift-notice=recovery] strong{font-size:13px}.rift-help .relay-guide-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.rift-life-hud{transition:none}}

.flight-page:not(.relay-page) .sector-toast>span{white-space:pre-line;line-height:1.6}
@media(max-width:360px){.flight-page:not(.relay-page) .flight-title{display:none}.flight-page:not(.relay-page) .sector-toast{max-width:calc(100% - 24px);white-space:normal}.flight-page:not(.relay-page) .sector-toast strong{letter-spacing:1px}}
/* Keep the longer life explanation inside the scrollable briefing. */
.flight-page:not(.relay-page) .mission-dialog{scrollbar-gutter:stable;padding-right:12px;overflow-x:hidden;box-sizing:border-box}
.flight-page:not(.relay-page) .mission-dialog .tutorial-strip{grid-template-columns:repeat(3,minmax(0,1fr))}
.flight-page:not(.relay-page) .mission-dialog .tutorial-strip>div{min-width:0;overflow-wrap:break-word}
@media(max-height:570px) and (orientation:landscape){.flight-page:not(.relay-page) .mission-dialog{grid-template-columns:repeat(2,minmax(0,1fr))}.flight-page:not(.relay-page) .mission-dialog>*{min-width:0}}
