:root{
  --bg:#06111d;--panel:#071a2acc;--panel2:#0b2235e8;--line:#2c6384;--cyan:#43c8ff;--orange:#ff8a00;--orange2:#ff5b00;--green:#79d35a;--red:#ff493d;--yellow:#ffcf45;--text:#f7fbff;--muted:#a8bbc8;--shadow:0 20px 60px #0008;
}
*{box-sizing:border-box} html,body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,Arial,Helvetica,sans-serif;min-height:100%;overflow-x:hidden}button,a{font:inherit}button{color:inherit}a{text-decoration:none;color:inherit}.glass{background:linear-gradient(145deg,#071725e8,#0b2133d8);border:1px solid #4b83a8aa;box-shadow:0 12px 40px #0008;backdrop-filter:blur(12px)}
.topbar{height:76px;position:fixed;inset:0 0 auto 0;z-index:100;background:#03101deb;border-bottom:1px solid #275271;display:flex;align-items:center;padding:0 22px;gap:24px;box-shadow:0 10px 30px #0007}.brand{border:0;background:transparent;display:grid;grid-template-columns:auto auto auto;grid-template-rows:auto auto;align-items:center;gap:0 2px;cursor:pointer;min-width:270px;text-align:left}.brand-mark{grid-row:1/3;font-size:38px;color:#65d6ff;line-height:.8;margin-right:4px}.brand-264,.brand-storm{font-weight:1000;font-style:italic;font-size:29px;letter-spacing:-1px}.brand-storm{color:var(--orange)}.brand small{grid-column:2/4;font-size:9px;letter-spacing:2.5px;color:#d3e4ee}.desktop-nav{display:flex;align-items:center;gap:6px;flex:1;justify-content:center}.desktop-nav button{border:0;background:transparent;padding:15px 12px;color:#dce7ee;font-weight:700;cursor:pointer;border-bottom:2px solid transparent}.desktop-nav button:hover{color:#fff;border-color:var(--orange)}.top-actions{display:flex;align-items:center;gap:9px}.pill,.icon-btn{border:1px solid #4c8db5;background:#071825;color:#fff;border-radius:12px;padding:10px 14px;font-weight:800;cursor:pointer}.pill{display:flex;gap:8px;align-items:center}.pill b{font-size:12px}.icon-btn{padding:10px 12px}
main{padding-top:76px}.screen{display:none;min-height:calc(100vh - 76px);position:relative}.screen.active{display:block}.eyebrow{font-weight:900;letter-spacing:1.8px;font-size:12px;color:#8fdcff}.btn{border:1px solid #7ba7c2;background:#0a1d2d;color:#fff;border-radius:12px;padding:13px 18px;font-weight:950;letter-spacing:.3px;cursor:pointer;box-shadow:0 9px 20px #0005;display:inline-flex;align-items:center;justify-content:center;gap:8px}.btn.primary{border-color:#ffb13b;background:linear-gradient(#ff9b00,#ef5e00);text-shadow:0 1px 2px #7a2400}.btn.danger{background:linear-gradient(#e43b28,#9b160f);border-color:#ff7868}.btn.ghost{background:#061827d8}.btn.xl{font-size:20px;padding:16px 25px}.btn:disabled{opacity:.45;cursor:not-allowed;filter:grayscale(.8)}
/* HERO */
#screen-title{overflow:hidden;background:#07111c}.hero-storm-bg{position:absolute;inset:0;background:linear-gradient(90deg,#06111df5 0%,#06111dc7 39%,#06111d4a 62%,#06111dc5 100%),url('assets/storm-cat3.webp') center/cover;filter:saturate(.9) brightness(.75)}.hero-grid{position:relative;z-index:2;min-height:calc(100vh - 116px);display:grid;grid-template-columns:minmax(0,1.15fr) minmax(360px,.85fr);grid-template-rows:auto auto;align-items:center;gap:16px;padding:28px 24px 20px}.hero-copy{min-width:0;z-index:3;grid-column:1;grid-row:1 / span 2;align-self:center;padding-right:6px}.hero-copy h1{font-size:clamp(54px,7vw,108px);line-height:.84;margin:9px 0 8px;letter-spacing:-4px;font-weight:1000;filter:drop-shadow(0 6px 8px #000)}.hero-copy h1 span{display:block;color:var(--orange);font-style:italic}.hero-copy h2{font-size:clamp(18px,2vw,28px);margin:0 0 18px;color:#dcebf3}.xerxus-callout{max-width:620px;padding:18px 20px;border-left:3px solid var(--orange);border-radius:15px}.xerxus-callout strong{display:block;color:#ffac2e;font-size:clamp(20px,2vw,30px);font-style:italic}.xerxus-callout p{font-size:16px;line-height:1.45;margin:9px 0}.xerxus-callout em{color:#ffd15c;font-weight:850}.hero-buttons{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}.feature-strip{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:8px;margin-top:18px}.feature-strip>div{border:1px solid #3e799f;background:#071a29d8;border-radius:13px;padding:12px;text-align:center;min-height:132px;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;overflow-wrap:anywhere}.feature-strip b{font-size:27px;margin-bottom:5px}.feature-strip strong{font-size:12px;line-height:1.15}.feature-strip small{color:#c8d6df;font-size:11px;margin-top:5px;line-height:1.3}.hero-artist-wrap{grid-column:2;grid-row:1;align-self:stretch;min-height:520px;position:relative}.hero-artist{position:absolute;inset:0;background:url('assets/xerxus-artist-photo-v33.webp') center top/cover no-repeat;border-radius:28px;mask-image:linear-gradient(to bottom,#000 0%,#000 86%,transparent 100%);filter:drop-shadow(0 15px 30px #000)}.forecast-card{grid-column:2;grid-row:2;border-radius:20px;padding:16px;align-self:start;z-index:4;max-width:360px;justify-self:end}.alert-label{margin:9px 0;background:var(--orange);color:#16100a;font-weight:1000;text-align:center;padding:7px;border-radius:8px}.forecast-card>small{font-size:19px;font-weight:900}.forecast-card>strong{display:block;font-size:45px;line-height:1;color:#fff;margin:3px 0 11px}.impact-time{display:flex;gap:10px;align-items:end;border-bottom:1px solid #35617d;padding-bottom:11px}.impact-time b{font-size:35px;color:var(--orange)}.impact-time span{font-weight:850;line-height:1.05}.forecast-card dl{margin:13px 0}.forecast-card dl div{display:flex;justify-content:space-between;padding:4px 0;gap:12px}.forecast-card dt{color:#b9cbd6;font-size:12px;font-weight:800}.forecast-card dd{margin:0;font-weight:900}.forecast-card p{font-size:14px;line-height:1.35;color:#d6e5ed}.warning-bar{border-top:1px solid #3b627b;padding-top:12px;color:#ffb236;font-weight:1000}.hero-footer{height:40px;position:relative;z-index:4;display:flex;align-items:center;justify-content:center;font-style:italic;font-weight:900;font-size:19px;background:#04111de9;border-top:1px solid #264e67}
/* INTRO */
#screen-intro{background:radial-gradient(circle at 70% 30%,#133148,#04101b 60%)}.intro-layout{min-height:calc(100vh - 76px);display:grid;grid-template-columns:minmax(320px,.9fr) minmax(400px,1.1fr);align-items:center;max-width:1200px;margin:auto;padding:30px}.intro-portrait{height:min(78vh,780px);background:url('assets/xerxus-artist-photo-v33.webp') center 24%/cover no-repeat;border-radius:30px;box-shadow:0 30px 70px #000a;mask-image:linear-gradient(#000 82%,transparent)}.intro-copy{padding:30px;border-radius:22px}.intro-copy h2{font-size:clamp(34px,5vw,62px);margin:8px 0}.intro-copy p{font-size:21px;line-height:1.55}.intro-copy blockquote{border-left:4px solid var(--orange);margin:24px 0;padding:10px 20px;color:#ffd96f;font-size:24px;font-style:italic}
/* COMMON SHELL */
.shell{max-width:1400px;margin:auto;padding:30px 24px}.section-head{display:flex;gap:20px;justify-content:space-between;align-items:end;margin-bottom:20px}.section-head h2{font-size:clamp(32px,4vw,52px);margin:5px 0}.section-head p{color:#c8d7df;max-width:760px}.storm-mini{padding:12px 16px;border-radius:13px;min-width:210px}.storm-mini span,.storm-mini small{display:block;color:#a9becb;font-size:11px}.storm-mini b{font-size:24px;color:#ffb13b;display:block;margin:3px 0}
/* HOUSES */
#screen-houses{background:linear-gradient(#04101bcf,#04101bfa),url('assets/storm-cat1.webp') center/cover fixed}.house-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.house-card{display:grid;grid-template-columns:42% 58%;min-height:310px;border:1px solid #356f95;background:#071725e8;border-radius:18px;overflow:hidden;cursor:pointer;transition:.2s;box-shadow:0 20px 40px #0006}.house-card:hover{transform:translateY(-3px);border-color:#70cbff}.house-card.selected{outline:3px solid var(--orange);border-color:#ffc45b}.house-card img{width:100%;height:100%;object-fit:cover;min-height:310px}.house-copy{padding:20px;display:flex;flex-direction:column;min-width:0}.house-copy h3{font-size:25px;margin:0 0 7px}.house-copy p{color:#c7d8e1;line-height:1.35;flex:1}.meterline{display:grid;grid-template-columns:110px 1fr 34px;align-items:center;gap:8px;margin:5px 0;font-size:11px}.meterline i{height:8px;background:#142b39;border-radius:99px;overflow:hidden}.meterline i b{display:block;height:100%;background:linear-gradient(90deg,var(--red),var(--yellow),var(--green));border-radius:99px}.meterline em{font-style:normal;color:#d8e7ee;text-align:right}.house-select-btn{margin-top:12px;width:100%}
/* PREP */
#screen-prep{background:#07131e;overflow:hidden}.prep-bg{position:absolute;inset:0;background:center/cover;filter:brightness(.48) saturate(.8);transform:scale(1.02)}.prep-shell{position:relative;z-index:2}.compact-head{background:#061623de;border:1px solid #2d5d7b;border-radius:16px;padding:14px 18px;align-items:center}.compact-head h2{font-size:34px}.choice-counter{border:2px solid #77d452;border-radius:50%;width:100px;height:100px;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#071a29}.choice-counter b{font-size:34px;color:#95e868}.choice-counter span{font-size:11px}.choice-counter i{font-style:normal}.prep-grid-wrap{display:grid;grid-template-columns:330px minmax(0,1fr);gap:16px}.house-summary,.prep-main{border-radius:18px}.house-summary{padding:14px}.house-summary img{width:100%;height:185px;object-fit:cover;border-radius:12px}.house-summary h3{font-size:23px;margin:13px 0 6px}.house-summary p{color:#c2d0d8;line-height:1.35}.meters{margin:12px 0}.budget-box{margin-top:16px;border-top:1px solid #2b5772;padding-top:13px;display:flex;justify-content:space-between;align-items:end;gap:10px;flex-wrap:wrap}.budget-box span{font-size:11px;color:#a5bfce}.budget-box b{font-size:25px;color:#80df62}.budget-box small{color:#adc0ca}.prep-main{padding:15px}.prep-toolbar{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:12px}.prep-toolbar>div{border:1px solid #2f607e;background:#081b2b;border-radius:10px;padding:9px}.prep-toolbar span{display:block;font-size:10px;color:#9fb9c8}.prep-toolbar b{font-size:17px}.action-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.action-card{border:1px solid #325f7b;background:#081b2a;border-radius:12px;padding:12px;min-height:122px;display:grid;grid-template-columns:40px 1fr;gap:9px;cursor:pointer;position:relative;transition:.17s}.action-card:hover{border-color:#69caff}.action-card.selected{border-color:#83e15e;background:#0b271b;box-shadow:inset 0 0 0 1px #83e15e}.action-card.locked{opacity:.38;cursor:not-allowed}.action-icon{font-size:27px}.action-card h4{margin:0;font-size:14px}.action-card p{font-size:11px;color:#b9cbd6;line-height:1.25;margin:5px 0}.action-cost{color:#8fe16e;font-weight:900;font-size:12px}.check-dot{position:absolute;right:8px;top:8px;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:#102a3a;border:1px solid #417a9c;font-size:12px}.action-card.selected .check-dot{background:#6bbf42;border-color:#8af467}.prep-bottom{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-top:14px;border-top:1px solid #2a536d;padding-top:13px}.plan-note{color:#f6d06d;font-size:13px}
/* FORECAST */
#screen-forecast{background:linear-gradient(#02101ab5,#02101aea),url('assets/storm-cat4.webp') center/cover}.forecast-stage{min-height:calc(100vh - 76px);display:grid;place-items:center;padding:25px}.forecast-update{width:min(760px,95vw);padding:28px;border-radius:22px}.forecast-update h2{font-size:clamp(40px,7vw,74px);margin:8px 0}.forecast-category{display:inline-block;background:#b52219;border:1px solid #ff7064;padding:9px 15px;border-radius:8px;font-size:22px;font-weight:1000}.forecast-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:18px 0}.forecast-stats>div{border:1px solid #346483;background:#071725;border-radius:12px;padding:12px}.forecast-stats span{display:block;font-size:10px;color:#9fb8c7}.forecast-stats b{font-size:18px}.forecast-update>p{font-size:19px;line-height:1.45}.radio-readout{padding:15px;background:#03101b;border:1px solid #3c7294;border-radius:12px;color:#cde8f7;margin:15px 0;min-height:68px}
/* STORM INTERIOR */
#screen-storm{background:#01060b;overflow:hidden;min-height:calc(100vh - 76px)}.interior-scene{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center center;display:block;transition:filter 1s,transform .15s}.room-darkness{position:absolute;inset:0;background:rgba(0,0,0,.05);transition:background .5s}.generator-glow{position:absolute;inset:0;background:radial-gradient(circle at 58% 50%,#ffd8782c 0 18%,transparent 50%);opacity:0;transition:.7s}.flashlight-beam{position:absolute;inset:0;background:radial-gradient(ellipse 22% 48% at 48% 60%,#fff8c653,transparent 70%);opacity:0;transition:.2s;pointer-events:none}.water-floor{position:absolute;left:0;right:0;bottom:0;height:0;background:linear-gradient(transparent,#3ba3cb56 30%,#0b547d9a);transition:height 1s}.crack-overlay{position:absolute;inset:0;opacity:0;pointer-events:none;background:linear-gradient(117deg,transparent 46%,#080808 47%,transparent 48%) 82% 15%/150px 250px no-repeat,linear-gradient(63deg,transparent 48%,#080808 49%,transparent 50%) 12% 30%/120px 190px no-repeat;transition:opacity .4s}.rain-window{position:absolute;inset:-40px;background:repeating-linear-gradient(108deg,transparent 0 14px,#c9f1ff44 15px 16px,transparent 17px 28px);background-size:220px 220px;animation:rainMove .35s linear infinite;opacity:.45;mix-blend-mode:screen;pointer-events:none}@keyframes rainMove{to{transform:translate(-80px,140px)}}#lightningCanvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.flash-overlay{position:absolute;inset:0;background:#eaf9ff;opacity:0;pointer-events:none;mix-blend-mode:screen}.storm-ui{position:relative;z-index:5;min-height:calc(100vh - 76px);padding:16px;display:grid;grid-template-columns:minmax(0,1fr) 300px;grid-template-rows:auto 1fr auto;gap:12px}.storm-topline{grid-column:1/3;display:flex;justify-content:space-between;align-items:start;gap:12px}.storm-phase,.storm-identity{padding:12px 15px;border-radius:12px;min-width:230px}.storm-phase span{display:block;font-size:10px;color:#9ebdce}.storm-phase b{display:block;font-size:20px;color:#ffbc44}.storm-phase small{color:#d7e6ee}.storm-identity{text-align:right}.storm-identity span{display:block;font-size:11px;color:#a7c4d4}.storm-identity b{display:block;font-size:31px}.storm-identity small{color:#ff7169;font-weight:900}.power-event{align-self:start;justify-self:center;min-width:min(470px,58vw);padding:14px 18px;border-radius:14px;background:#071725f0;z-index:7}.power-event strong{font-size:22px;color:#ffe15b}.power-event p{margin:5px 0 0;color:#d8e7ef}.status-panel{grid-column:2;grid-row:2;padding:14px;border-radius:14px;align-self:start}.status-panel h3{margin:0 0 11px}.status-meter{display:grid;grid-template-columns:80px 1fr 43px;gap:7px;align-items:center;margin:8px 0;font-size:10px}.status-meter i{height:8px;background:#142a39;border-radius:99px;overflow:hidden}.status-meter i b{display:block;height:100%;width:100%;background:linear-gradient(90deg,#ff453b,#ffcb43,#73d757);transition:width .7s}.status-meter em{font-style:normal;text-align:right}.event-log{grid-column:1;grid-row:2;align-self:end;justify-self:start;width:min(480px,55vw);max-height:185px;overflow:hidden;border-radius:14px;padding:10px}.event-item{border-left:3px solid var(--cyan);padding:7px 10px;margin:4px 0;background:#04121ddd;font-size:13px}.event-item.warn{border-color:#ff9e25}.event-item.danger{border-color:#ff443d}.event-item.good{border-color:#78d95b}.storm-controls{grid-column:1/3;grid-row:3;justify-self:center;display:flex;border-radius:15px;overflow:hidden}.storm-controls button{border:0;border-right:1px solid #315d78;background:#061827e8;padding:12px 17px;color:#fff;font-weight:800;cursor:pointer}.storm-controls button:last-child{border-right:0}.storm-controls button:disabled{opacity:.45}.shake{animation:shake .22s linear 2}@keyframes shake{0%,100%{transform:translate(0)}25%{transform:translate(-5px,2px)}50%{transform:translate(4px,-2px)}75%{transform:translate(-3px,-1px)}}
/* RESULTS */
#screen-results{overflow:hidden}.results-bg{position:absolute;inset:0;background:url('assets/stormpass-major-aftermath.webp') center/cover}.results-shade{position:absolute;inset:0;background:linear-gradient(90deg,#03101bed 0 55%,#03101b9e 100%)}.results-shell{position:relative;z-index:3;display:flex;align-items:center;min-height:calc(100vh - 76px)}.results-card{width:min(950px,96vw);border-radius:22px;padding:25px}.results-card h2{font-size:clamp(38px,6vw,70px);margin:7px 0}.score-row{display:flex;align-items:center;gap:20px}.score-ring{width:130px;height:130px;border:8px solid #72d34e;border-radius:50%;display:grid;place-content:center;text-align:center;background:#061420}.score-ring b{font-size:50px}.score-ring small{font-size:12px}.score-row>div:last-child strong{font-size:20px}.score-row p{font-size:18px;color:#d4e4ec}.result-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:18px 0}.result-grid>div{background:#071725;border:1px solid #2f607d;border-radius:12px;padding:12px;display:grid;grid-template-columns:35px 1fr;grid-template-rows:auto auto;column-gap:8px}.result-grid span{grid-row:1/3;font-size:25px}.result-grid b{font-size:11px}.result-grid small{color:#bcd1dc}.lesson-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.lesson-grid>div{background:#061725;border:1px solid #2e5c77;border-radius:12px;padding:14px}.lesson-grid h3{margin:0 0 7px;color:#7ce05a}.lesson-grid>div:last-child h3{color:#ff9c50}.lesson-grid p{margin:0;color:#c8d9e2;line-height:1.4}.result-actions{display:flex;gap:10px;margin-top:16px}.music-credit{text-align:right;color:#c4d4dc;font-size:12px;margin-top:8px}
/* MODALS/FOOTER */
.modal{border:1px solid #4b88aa;background:#071826;color:white;border-radius:18px;padding:24px;width:min(620px,92vw);box-shadow:var(--shadow)}.modal::backdrop{background:#01060bd9;backdrop-filter:blur(5px)}.modal .close{position:absolute;right:12px;top:8px;background:transparent;border:0;color:white;font-size:30px;cursor:pointer}.modal li{margin:10px 0;line-height:1.4}.safety-copy{border-left:3px solid #ffb32e;padding-left:12px;color:#ffe2a0}.footer{min-height:42px;background:#020b13;border-top:1px solid #214b64;display:flex;justify-content:space-between;align-items:center;padding:0 22px;color:#8fa9b9;font-size:11px}
/* RESPONSIVE */
@media(max-width:1180px){.desktop-nav{display:none}.brand{min-width:220px}.hero-grid{grid-template-columns:1fr 370px}.hero-artist-wrap{grid-column:2;grid-row:1}.forecast-card{grid-column:2;grid-row:1;align-self:end;margin:0 0 30px;max-width:350px}.hero-copy{grid-column:1;grid-row:1}.hero-artist{opacity:.75}.feature-strip{grid-template-columns:repeat(3,1fr)}.action-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:850px){.topbar{height:66px;padding:0 10px}.brand{min-width:0}.brand-mark{font-size:30px}.brand-264,.brand-storm{font-size:22px}.brand small{display:none}.top-actions .pill b{display:none}.top-actions{margin-left:auto}.pill{padding:8px 10px}.icon-btn{display:none}main{padding-top:66px}.screen{min-height:calc(100vh - 66px)}.hero-grid{display:block;padding:16px;min-height:auto}.hero-artist-wrap{height:380px;position:absolute;right:-20px;top:10px;width:62%;opacity:.7}.hero-artist{inset:0}.hero-copy{position:relative;z-index:4;max-width:78%}.hero-copy h1{font-size:clamp(44px,14vw,72px);letter-spacing:-2px}.hero-copy h2{font-size:16px}.xerxus-callout{background:#071725e8}.forecast-card{position:relative;z-index:5;margin:12px 0 0 0;max-width:none}.feature-strip{grid-template-columns:repeat(2,1fr)}.hero-footer{font-size:14px}.intro-layout{grid-template-columns:1fr;padding:18px}.intro-portrait{height:47vh;max-height:430px}.intro-copy p{font-size:17px}.house-grid{grid-template-columns:1fr}.house-card{grid-template-columns:38% 62%}.prep-grid-wrap{grid-template-columns:1fr}.house-summary{display:grid;grid-template-columns:180px 1fr;gap:10px}.house-summary img{height:145px}.house-summary .meters,.house-summary .budget-box{grid-column:1/3}.action-grid{grid-template-columns:repeat(2,1fr)}.storm-ui{grid-template-columns:1fr;padding:10px}.storm-topline{grid-column:1}.status-panel{grid-column:1;grid-row:2;justify-self:end;width:260px}.event-log{grid-column:1;grid-row:2;width:60vw}.storm-controls{grid-column:1;grid-row:3}.power-event{position:absolute;top:85px;left:50%;transform:translateX(-50%);min-width:70vw}.result-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.topbar{gap:5px}.brand-mark{display:none}.brand-264,.brand-storm{font-size:19px}.top-actions{gap:4px}.pill{border-radius:8px;padding:7px 8px;font-size:11px}.hero-copy{max-width:100%;padding-top:245px}.hero-artist-wrap{height:280px;width:100%;top:0;right:0;opacity:.8}.hero-artist{background-position:center 4%;mask-image:linear-gradient(#000 60%,transparent 100%)}.hero-copy h1{font-size:48px;line-height:.87}.hero-copy h2{font-size:13px}.xerxus-callout strong{font-size:18px}.xerxus-callout p{font-size:14px}.hero-buttons .btn{width:100%}.feature-strip{grid-template-columns:1fr 1fr}.feature-strip>div{min-height:105px}.forecast-card>strong{font-size:38px}.impact-time b{font-size:30px}.section-head{align-items:start;flex-direction:column}.storm-mini{width:100%}.shell{padding:18px 10px}.house-card{display:block}.house-card img{height:210px;min-height:0}.house-copy{padding:15px}.house-copy h3{font-size:21px}.meterline{grid-template-columns:92px 1fr 30px}.house-summary{display:block}.house-summary img{height:180px}.house-summary .meters,.house-summary .budget-box{grid-column:auto}.prep-toolbar{grid-template-columns:1fr}.action-grid{grid-template-columns:1fr}.action-card{min-height:100px}.prep-bottom{flex-direction:column;align-items:stretch}.choice-counter{width:78px;height:78px}.choice-counter b{font-size:26px}.forecast-stats{grid-template-columns:1fr}.storm-topline{display:grid;grid-template-columns:1fr 1fr}.storm-phase,.storm-identity{min-width:0;padding:8px}.storm-phase b{font-size:15px}.storm-identity b{font-size:22px}.power-event{top:92px;min-width:92vw;padding:10px}.power-event strong{font-size:17px}.status-panel{width:100%;align-self:start;margin-top:90px}.event-log{width:100%;align-self:end;max-height:140px}.storm-controls{width:100%;overflow-x:auto;justify-self:stretch}.storm-controls button{min-width:104px;padding:11px 8px;font-size:10px}.result-grid{grid-template-columns:1fr}.lesson-grid{grid-template-columns:1fr}.score-row{align-items:flex-start}.score-ring{width:108px;height:108px}.score-ring b{font-size:40px}.footer{flex-direction:column;gap:4px;padding:8px;text-align:center}}
/* v3 integration cleanup: keep all storm HUD text live, hide any residual mockup lettering in source room art */
.interior-mask-top{position:absolute;z-index:1;left:0;top:0;width:49%;height:11%;background:linear-gradient(180deg,#07111df2,#07111db8 58%,transparent);pointer-events:none}
.interior-mask-bottom{position:absolute;z-index:1;left:0;right:0;bottom:0;height:14%;background:linear-gradient(0deg,#020a12 15%,#020a12d9 48%,transparent);pointer-events:none}
@media(max-width:560px){.interior-mask-top{width:100%;height:12%}.interior-mask-bottom{height:18%}.interior-scene{background-position:center 45%}}

/* v3.2 multilingual + immersive storm QA overrides */
.language-select{appearance:none;-webkit-appearance:none;min-width:62px;text-align:center;text-align-last:center;background:#071827;color:#fff;cursor:pointer;padding-right:10px}.language-select option{background:#071827;color:#fff}
.interior-mask-top,.interior-mask-bottom{display:none!important}
.power-event{opacity:0;visibility:hidden;transition:opacity .22s ease,visibility .22s ease}.power-event.visible{opacity:1;visibility:visible}
body.storm-active .topbar,body.storm-active .footer{display:none}body.storm-active main{padding-top:0}body.storm-active #screen-storm{min-height:100vh;height:100vh}
body.storm-active .storm-ui{min-height:100vh}
.house-grid{align-items:stretch}.house-card{height:auto}.house-copy p{min-height:0}.house-copy h3{overflow-wrap:anywhere}.house-card img{object-position:center}

@media(max-width:850px){
  body.storm-active #screen-storm{height:100dvh;min-height:100dvh}
  body.storm-active .storm-ui{min-height:100dvh;height:100dvh}
  body.storm-active .interior-scene{}
}

@media(max-width:560px){
  /* Storm is an experience, not a dashboard: keep the room visible. */
  body.storm-active .storm-ui{display:block;padding:0;position:relative}
  body.storm-active .storm-topline{position:absolute;left:8px;top:max(8px,env(safe-area-inset-top));display:block;width:auto;z-index:12}
  body.storm-active .storm-phase{min-width:0;width:auto;padding:6px 9px;border-radius:9px;background:#03101bb8;backdrop-filter:blur(5px);opacity:.78}
  body.storm-active .storm-phase span{display:none}
  body.storm-active .storm-phase b{font-size:11px;letter-spacing:.03em;white-space:nowrap}
  body.storm-active .storm-phase small{font-size:9px}
  body.storm-active .storm-identity,body.storm-active .status-panel,body.storm-active .event-log{display:none!important}
  body.storm-active .power-event{position:absolute;top:15%;left:50%;transform:translateX(-50%);min-width:0;width:min(82vw,330px);padding:9px 11px;border-radius:10px;background:#03101bd9;text-align:center;z-index:14}
  body.storm-active .power-event strong{font-size:14px}body.storm-active .power-event p{font-size:11px;line-height:1.3;margin-top:3px}
  body.storm-active .storm-controls{position:absolute;left:50%;bottom:max(10px,env(safe-area-inset-bottom));transform:translateX(-50%);width:auto;display:flex;gap:8px;background:transparent;border:0;box-shadow:none;overflow:visible;z-index:15}
  body.storm-active .storm-controls button{min-width:46px;width:46px;height:46px;padding:0;border:1px solid #79b8da66!important;border-radius:50%;background:#03101bcf;font-size:20px;display:grid;place-items:center;box-shadow:0 5px 15px #0008}
  body.storm-active .storm-controls button span{display:none}
  body.storm-active #skipStormBtn{display:none}
  body.storm-active .rain-window{opacity:.34}
  body.storm-active .water-floor{max-height:18%}
  .hero-copy{padding-top:255px}.hero-artist-wrap{height:292px;opacity:.9}.hero-copy h1{font-size:46px;max-width:100%;word-break:normal}.xerxus-callout{padding:14px}.feature-strip{grid-template-columns:1fr 1fr}.forecast-card{margin-top:16px}
}

@media(max-width:390px){
  .brand-264,.brand-storm{font-size:17px}.top-actions{gap:3px}.pill{padding:6px 7px;font-size:10px}.language-select{min-width:50px}
  .hero-copy{padding-top:238px}.hero-artist-wrap{height:270px}.hero-copy h1{font-size:42px}.hero-copy h2{font-size:12px}.xerxus-callout strong{font-size:16px}.xerxus-callout p{font-size:13px}
}


/* v3.3 full-file layout audit: translated text must stay inside every tile/card */
.feature-strip>div,.house-copy,.action-card>div,.prep-toolbar>div,.forecast-card,.forecast-update,.result-grid>div,.lesson-grid>div{min-width:0;max-width:100%}
.feature-strip strong,.feature-strip small,.house-copy h3,.house-copy p,.action-card h4,.action-card p,.prep-toolbar b,.forecast-card *,.result-grid b,.result-grid small,.lesson-grid p{overflow-wrap:anywhere;word-break:normal;white-space:normal}
.feature-strip>div{height:auto;min-height:0;padding:13px 10px}
.house-card{min-width:0;height:auto;min-height:0}.house-card img{min-width:0}.house-copy{overflow:visible}.house-copy p{flex:0 0 auto;margin:0 0 10px}
.house-select-btn{white-space:normal;line-height:1.18;min-height:44px}
.action-card{grid-template-columns:38px minmax(0,1fr);height:auto;min-height:132px;padding:12px 38px 12px 12px;text-align:left;align-items:start;overflow:visible}
.action-card h4{line-height:1.22}.action-card p{line-height:1.35}.action-cost{display:block;margin-top:6px}
.prep-toolbar>div{overflow:visible}.prep-toolbar b{display:block;line-height:1.2}
.result-grid>div{overflow:visible}
.hero-copy,.hero-grid,.hero-buttons,.feature-strip{min-width:0}

/* Storm experience: room first, UI second. */
body.storm-active .interior-scene{z-index:0;background-repeat:no-repeat;background-size:cover}
body.storm-active .room-darkness,body.storm-active .generator-glow,body.storm-active .flashlight-beam,body.storm-active .water-floor,body.storm-active .crack-overlay,body.storm-active .rain-window,body.storm-active #lightningCanvas,body.storm-active .flash-overlay{z-index:2}
body.storm-active .storm-ui{z-index:5;pointer-events:none}
body.storm-active .storm-controls,body.storm-active .power-event,body.storm-active .storm-topline,body.storm-active .status-panel,body.storm-active .event-log{pointer-events:auto}
body.storm-active .power-event{max-width:min(420px,86vw)}

@media(max-width:850px){
  .house-card{grid-template-columns:minmax(210px,42%) minmax(0,58%)}
  .house-copy{padding:18px}.house-copy h3{font-size:22px;line-height:1.12}.house-copy p{font-size:14px;line-height:1.4}
  .feature-strip>div{min-height:0}
}

@media(max-width:620px){
  .house-card{display:block}.house-card img{display:block;width:100%;height:220px;min-height:0}.house-copy{padding:16px}
  .feature-strip{grid-template-columns:1fr!important;gap:8px}
  .feature-strip>div{display:grid;grid-template-columns:44px minmax(0,1fr);grid-template-rows:auto auto;text-align:left;align-items:center;justify-items:stretch;column-gap:10px;min-height:82px;padding:11px 13px}
  .feature-strip b{grid-column:1;grid-row:1/3;margin:0;text-align:center;font-size:25px}.feature-strip strong{grid-column:2;grid-row:1;font-size:12px}.feature-strip small{grid-column:2;grid-row:2;font-size:11px;margin:3px 0 0;line-height:1.3}
  .action-grid{grid-template-columns:1fr!important}.action-card{min-height:0;padding:13px 38px 13px 12px}.action-card h4{font-size:15px}.action-card p{font-size:12px}
  .result-actions{flex-direction:column}.result-actions .btn{width:100%;white-space:normal}
}

@media(max-width:560px){
  /* Full cinematic storm on phones: no forecast/status dashboard over Xerxus. */
  body.storm-active .storm-topline,body.storm-active .storm-identity,body.storm-active .status-panel,body.storm-active .event-log{display:none!important}
  body.storm-active .storm-ui{display:block!important;padding:0!important}
  body.storm-active .interior-scene{}
  body.storm-active .power-event{top:9%;width:min(78vw,300px);padding:8px 10px;background:#03101bc4;border-color:#76bce45c;backdrop-filter:blur(4px)}
  body.storm-active .power-event strong{font-size:13px}body.storm-active .power-event p{font-size:10px;margin:2px 0 0}
  body.storm-active .storm-controls{bottom:max(8px,env(safe-area-inset-bottom));gap:7px;opacity:.72;transition:opacity .2s}
  body.storm-active .storm-controls:hover,body.storm-active .storm-controls:focus-within{opacity:1}
  body.storm-active .storm-controls button{width:43px;min-width:43px;height:43px;font-size:18px;background:#03101baa}
  body.storm-active .storm-controls button:disabled{display:none}
  .hero-copy{padding-top:275px}.hero-artist-wrap{height:305px}.hero-copy h1{font-size:clamp(39px,12vw,48px);letter-spacing:-1px;line-height:.9}
  .xerxus-callout{max-width:100%;overflow:visible}.xerxus-callout strong,.xerxus-callout p,.xerxus-callout em{overflow-wrap:anywhere}
  .forecast-card dl div{align-items:flex-start}.forecast-card dd{text-align:right;max-width:54%}
  .compact-head h2{font-size:28px;line-height:1.05}.compact-head p{margin-bottom:0}
}

@media(max-width:390px){
  .hero-copy{padding-top:250px}.hero-artist-wrap{height:278px}.hero-copy h1{font-size:40px}
  .feature-strip>div{grid-template-columns:38px minmax(0,1fr);padding:10px}.feature-strip b{font-size:22px}
  .house-card img{height:195px}.house-copy h3{font-size:20px}.house-copy p{font-size:13px}
  .meterline{grid-template-columns:86px minmax(0,1fr) 28px;gap:5px}
}

@media(max-width:560px){
  .hero-grid,.hero-copy,.xerxus-callout,.hero-buttons,.feature-strip,.forecast-card{width:100%;max-width:100%;min-width:0}
  .hero-copy{padding-left:0;padding-right:0}
  .xerxus-callout{display:block}
  .hero-buttons{display:grid;grid-template-columns:1fr;gap:8px}
  .hero-buttons .btn{width:100%;white-space:normal;text-align:center}
  .forecast-card{box-sizing:border-box}
}

.house-copy,.house-copy p,.house-copy h3,.event-item,.prep-main,.prep-main *{overflow-wrap:anywhere} .house-card img{object-fit:cover} .house-card{align-items:stretch} .house-copy{display:flex;flex-direction:column;gap:8px} .house-select-btn{margin-top:auto}
/* v3.4 immersive storm */
body.storm-active .status-panel,body.storm-active .event-log{display:none !important;}
body.storm-active .storm-ui{grid-template-columns:1fr;grid-template-rows:auto 1fr auto;gap:8px;padding:12px;}
body.storm-active .storm-topline{grid-column:1;display:flex;justify-content:space-between;align-items:flex-start;gap:8px;pointer-events:none;}
body.storm-active .storm-phase,body.storm-active .storm-identity{min-width:0;padding:8px 10px;background:#04131fb8;border:1px solid #315b74;}
body.storm-active .storm-phase span,body.storm-active .storm-identity span{font-size:10px;}
body.storm-active .storm-phase b{font-size:15px;}
body.storm-active .storm-identity b{font-size:20px;}
body.storm-active .storm-identity small{font-size:10px;}
body.storm-active .power-event{position:absolute;top:14px;left:50%;transform:translateX(-50%);min-width:min(400px,85vw);padding:10px 14px;background:#081a28eb;border:1px solid #37647e;display:none;}
body.storm-active .power-event.visible{display:block;}
body.storm-active .power-event strong{font-size:18px;}
body.storm-active .power-event p{font-size:13px;}
body.storm-active .storm-controls{grid-column:1;grid-row:3;justify-self:center;background:#061827cc;border:1px solid #315d78;}
body.storm-active .storm-controls button{background:#06182700;}
@media(max-width:1180px){.hero-grid{grid-template-columns:minmax(0,1fr) 340px;grid-template-rows:auto auto}.hero-copy{grid-column:1;grid-row:1 / span 2}.hero-artist-wrap{grid-column:2;grid-row:1}.forecast-card{grid-column:2;grid-row:2;align-self:start;margin:0;max-width:340px}.feature-strip{grid-template-columns:repeat(3,1fr)}}
@media(max-width:850px){.hero-grid{display:block;padding:16px;min-height:auto}.hero-artist-wrap{height:410px;position:relative;right:auto;top:auto;width:100%;opacity:1;margin-bottom:10px}.hero-artist{inset:0;background-position:center 8%}.hero-copy{position:relative;z-index:4;max-width:100%;padding-top:0}.forecast-card{position:relative;z-index:5;margin:12px 0 0 0;max-width:none}.feature-strip{grid-template-columns:repeat(2,1fr)} body.storm-active .storm-topline{gap:6px;} body.storm-active .storm-controls{width:100%;justify-self:stretch;overflow-x:auto;} }
@media(max-width:560px){.hero-artist-wrap{height:320px}.hero-copy{padding-top:0}.feature-strip{grid-template-columns:1fr 1fr}.feature-strip>div{min-height:126px}.forecast-card{margin-top:14px}.hero-copy h1{font-size:46px;line-height:.9} body.storm-active .storm-topline{display:flex;justify-content:space-between;} body.storm-active .storm-phase b{font-size:13px} body.storm-active .storm-identity b{font-size:18px} body.storm-active .power-event{top:68px;min-width:92vw;padding:9px 10px} body.storm-active .storm-controls button{min-width:96px;padding:10px 7px;font-size:10px}}

/* v3.5 outside-weather correction */
.rain-window{display:none !important;}
#lightningCanvas{left:0;top:0;right:0;bottom:0;}
.flash-overlay{background:radial-gradient(ellipse at 78% 38%,#dff7ff 0%,#dff7ff77 20%,#c5eaff22 45%,transparent 72%);mix-blend-mode:screen;}
body.storm-active .interior-scene{}
@media(max-width:700px){body.storm-active .interior-scene{} .flash-overlay{background:radial-gradient(ellipse at 76% 36%,#e7faff 0%,#dff7ff66 24%,transparent 70%);}}

/* v3.7 family interior focus */
body.storm-active .interior-scene{}
@media(max-width:700px){body.storm-active .interior-scene{ background-size:cover;}}

/* v3.8 performance polish */
.interior-scene,.room-darkness,.flash-overlay,.generator-glow,.water-floor{will-change:opacity,filter,transform;}
@media(max-width:700px){.interior-scene{transform:translateZ(0);backface-visibility:hidden;}}

/* v3.9 runtime verification and mobile family centering */
body.storm-active .interior-scene{object-position:center center !important;}
@media(max-width:700px){body.storm-active .interior-scene{object-position:center center !important;}}
.build-marker{opacity:.42;font-size:9px;margin-left:8px;}


/* =========================================================
   v3.11 MOBILE POLISH — phone image fitting and safe layout
   ========================================================= */

/* The storm scene is a real IMG in v3.9+, so size it explicitly. */
#interiorScene{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  object-position:center center;
  max-width:none;
  max-height:none;
}

/* Exterior selection images should show the whole 16:9 structure on phones. */
.house-card img,.house-summary img{
  object-fit:cover;
  object-position:center center;
}

@media(max-width:850px){
  .topbar{height:64px;padding-left:max(9px,env(safe-area-inset-left));padding-right:max(9px,env(safe-area-inset-right));gap:7px}
  main{padding-top:64px}
  .screen{min-height:calc(100dvh - 64px)}
  .brand{min-width:0;flex:0 1 auto}
  .brand-264,.brand-storm{font-size:20px}
  .top-actions{gap:5px;min-width:0}
  .language-select{min-width:52px;max-width:58px}
  .pill{padding:8px 9px}

  /* Artist portrait: keep face visible and avoid clipping. */
  .hero-artist-wrap{width:100%;height:min(410px,52dvh);min-height:300px;overflow:hidden;border-radius:22px}
  .hero-artist{background-position:center 9%;background-size:cover;border-radius:22px}
  .intro-layout{padding:14px;gap:14px}
  .intro-portrait{width:100%;height:auto;aspect-ratio:4/5;max-height:none;background-position:center 16%;background-size:cover;border-radius:22px}
  .intro-copy{padding:20px}

  /* House cards: full exterior image, no arbitrary fixed-height crop. */
  .house-card{display:block;width:100%}
  .house-card img{width:100%;height:auto!important;min-height:0!important;aspect-ratio:16/9;display:block}
  .house-copy{padding:16px}

  /* Prep screen: selected exterior remains fully legible. */
  .house-summary{display:block}
  .house-summary img{width:100%;height:auto!important;aspect-ratio:16/9;display:block}
  .prep-bg{background-position:center center;transform:none}

  /* Forecast/results background image positioning. */
  #screen-forecast{background-position:center center;background-attachment:scroll}
  .forecast-stage{padding:14px 10px;min-height:calc(100dvh - 64px)}
  .forecast-update{width:100%;padding:20px 15px}
  .results-bg{background-position:center center}
  .results-shell{min-height:calc(100dvh - 64px);padding-top:14px;padding-bottom:14px}
}

@media(max-width:620px){
  .shell{padding:16px 10px}
  .section-head{gap:10px;margin-bottom:14px}
  .section-head h2{font-size:clamp(28px,9vw,38px);line-height:1.02}
  .storm-mini{min-width:0;width:100%}

  /* Hero image stays cleanly in frame before the copy. */
  .hero-grid{padding:10px}
  .hero-artist-wrap{height:min(340px,45dvh);min-height:270px;margin:0 0 12px}
  .hero-artist{background-position:center 7%}
  .hero-copy h1{font-size:clamp(40px,12vw,48px);letter-spacing:-1.5px}
  .hero-copy h2{line-height:1.18}
  .forecast-card{padding:14px}
  .forecast-card>strong{font-size:34px}
  .hero-footer{height:auto;min-height:38px;padding:8px 10px;text-align:center}

  /* Cards use the source photo ratio, so modern buildings are not chopped. */
  .house-card img{aspect-ratio:16/9}
  .house-copy h3{font-size:21px;line-height:1.12}
  .meterline{grid-template-columns:88px minmax(0,1fr) 28px}

  .compact-head{padding:12px;gap:10px}
  .compact-head h2{font-size:27px}
  .choice-counter{width:70px;height:70px;flex:0 0 70px}
  .choice-counter b{font-size:25px}
  .prep-main,.house-summary{padding:11px}
  .prep-toolbar{grid-template-columns:1fr;gap:6px}

  .forecast-update h2{font-size:clamp(36px,12vw,52px);line-height:.96}
  .forecast-category{font-size:16px;padding:8px 10px}
  .forecast-update>p{font-size:16px}
  .radio-readout{font-size:13px;line-height:1.4}

  .results-card{width:100%;padding:15px}
  .results-card h2{font-size:clamp(34px,11vw,48px)}
  .score-row{gap:12px}
  .score-ring{width:96px;height:96px;border-width:6px;flex:0 0 96px}
  .score-ring b{font-size:36px}
  .score-row p{font-size:15px}
}

@media(max-width:560px){
  /* Header must remain inside a narrow phone viewport. */
  .topbar{height:60px;gap:4px;padding-left:max(7px,env(safe-area-inset-left));padding-right:max(7px,env(safe-area-inset-right))}
  main{padding-top:60px}
  .brand-264,.brand-storm{font-size:17px}
  .top-actions{gap:3px}
  .pill{padding:6px 7px;border-radius:8px;font-size:10px}
  .language-select{min-width:48px;max-width:50px;padding-left:5px;padding-right:5px}

  /* Full-screen storm: no CSS-background assumptions, proper portrait crop. */
  body.storm-active #screen-storm,
  body.storm-active .storm-ui{height:100dvh;min-height:100dvh}
  body.storm-active #interiorScene{width:100vw;height:100dvh;object-fit:cover}

  /* Per-house focal points keep Xerxus/family in the portrait crop. */
  #interiorScene[data-house="modern"]{object-position:28% center!important}
  #interiorScene[data-house="modern2"]{object-position:52% center!important}
  #interiorScene[data-house="villa"]{object-position:28% center!important}
  #interiorScene[data-house="woodroof"]{object-position:51% center!important}
  #interiorScene[data-house="older"]{object-position:51% center!important}
  #interiorScene[data-house="poor"]{object-position:51% center!important}

  /* Reassert compact circular controls; older CSS had a later 96px rule. */
  body.storm-active .storm-controls{
    position:absolute;left:50%;bottom:max(10px,env(safe-area-inset-bottom));transform:translateX(-50%);
    width:auto!important;max-width:calc(100vw - 20px);display:flex;justify-content:center;gap:8px;
    background:transparent;border:0;box-shadow:none;overflow:visible!important;opacity:.78
  }
  body.storm-active .storm-controls button{
    flex:0 0 44px!important;width:44px!important;min-width:44px!important;max-width:44px!important;height:44px!important;
    padding:0!important;border-radius:50%!important;font-size:18px!important;display:grid!important;place-items:center!important
  }
  body.storm-active .storm-controls button span{display:none!important}
  body.storm-active #skipStormBtn{display:none!important}
  body.storm-active .power-event{top:max(62px,8dvh);width:min(82vw,300px);min-width:0;padding:8px 10px}

  .hero-artist-wrap{height:min(315px,42dvh);min-height:250px}
  .intro-portrait{aspect-ratio:4/5}
  .house-card img,.house-summary img{aspect-ratio:16/9}
  .results-shade{background:linear-gradient(#03101bd8,#03101bf1)}
}

@media(max-width:390px){
  .brand-264,.brand-storm{font-size:16px}
  .language-select{min-width:45px;max-width:45px}
  .pill{padding:5px 6px}
  .hero-artist-wrap{height:285px;min-height:240px}
  .hero-copy h1{font-size:39px}
  .house-copy{padding:13px}
  .house-copy h3{font-size:19px}
  .house-copy p{font-size:13px;line-height:1.35}
  .forecast-update{padding:16px 12px}
  .results-card{padding:12px}
}
