@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=Inter:wght@400;600;700&display=swap');
.difficulty-modal{position:fixed;inset:0;z-index:360;display:grid;place-items:center;padding:20px;background:#02090deb;backdrop-filter:blur(7px)}.difficulty-window{width:min(820px,96vw);max-height:92vh;overflow:auto;padding:26px;border:1px solid #6bd4dc;background:linear-gradient(145deg,#142a31,#071216);box-shadow:0 28px 80px #000}.difficulty-window h2{margin:5px 0 8px;font:800 32px Barlow Condensed;letter-spacing:2px;color:#dffcff}.difficulty-window>p{color:#9db5ba;font-size:12px}.difficulty-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:20px}.difficulty-choices button{min-height:150px;padding:15px;border:1px solid #3e6871;background:#102128;color:#e8f8fa;text-align:left;cursor:pointer}.difficulty-choices button:hover,.difficulty-choices button:focus{border-color:#7df4ff;background:#16343d;outline:none}.difficulty-choices b,.difficulty-choices span{display:block}.difficulty-choices b{font:800 25px Barlow Condensed;letter-spacing:1.5px}.difficulty-choices span{margin-top:8px;color:#a9c2c6;font:11px/1.5 Inter}.difficulty-choices button[data-difficulty=easy]{border-color:#62c79a}.difficulty-choices button[data-difficulty=hard]{border-color:#e17972}@media(max-width:620px){.difficulty-window{padding:18px}.difficulty-window h2{font-size:26px}.difficulty-choices{grid-template-columns:1fr}.difficulty-choices button{min-height:86px}}
/* Touch-first responsive controls. */
.mobile-map-controls,.touch-map-help{display:none}button,input,select{touch-action:manipulation}
@media(max-width:900px){body{padding:0}.game-shell{border:0}.pause-button,.game-speed,.encyclopedia-button,.achievements-button,.help-button{min-height:40px;margin:0;padding:9px 11px}.tower-card{min-height:96px;margin-top:10px}.side-tabs button,.start-wave,.upgrade-block button,.sell-tower{min-height:44px}.floor-manage{min-height:46px;max-width:175px;font-size:10px}.camera-help{display:none}.touch-map-help{display:block;position:absolute;z-index:11;left:12px;right:12px;bottom:68px;margin:0;padding:6px 9px;border:1px solid #4d6b70;background:#071419d9;color:#b9d3d6;font:700 9px Inter;text-align:center;pointer-events:none}}
@media(max-width:760px){html,body{height:100%;overscroll-behavior:none}.game-shell:before{flex-basis:3px;height:3px}header{height:auto!important;max-height:none!important;flex:0 0 auto!important;align-items:flex-start;padding:8px 10px}.eyebrow{display:none}h1{font-size:19px;letter-spacing:1.1px}.stats{flex:1;justify-content:flex-end;align-items:center;gap:4px}.stats .stat{display:none}.pause-button{font-size:10px}.encyclopedia-button,.achievements-button,.help-button{font-size:8px;letter-spacing:.6px}.achievements-button span{display:none}.play-area{display:block!important;position:relative;min-height:0;overflow:hidden}.canvas-wrap{height:100%;min-height:0}.canvas-wrap canvas{touch-action:none;cursor:default}aside{position:absolute!important;z-index:45;left:0;right:0;bottom:0;height:min(72vh,570px)!important;padding:0 14px 18px!important;border:1px solid #40555b!important;border-bottom:0!important;border-radius:18px 18px 0 0;box-shadow:0 -18px 40px #000a;transform:translateY(calc(100% - 1px));transition:transform .2s ease;will-change:transform}.mobile-open{transform:translateY(0)!important}.side-tabs{margin:0 -14px 12px}.tower-card{grid-template-columns:86px minmax(0,1fr);min-height:92px}.tower-copy{padding:12px 11px}.tower-copy strong{font-size:17px}.tower-copy small{font-size:9px;line-height:1.3}.price{margin-top:8px}.unit-limits,.legend,.tip{display:none}.mobile-map-controls{position:absolute;z-index:14;left:10px;right:10px;bottom:10px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.mobile-map-controls button{min-height:46px;padding:7px 3px;border:1px solid #5b777d;background:#0c1b20ed;color:#e5f6f7;font:800 10px Inter;box-shadow:0 4px 12px #0008}.mobile-map-controls button:first-child{border-color:#ffb13c;color:#ffd17b}.mobile-map-controls button:last-child{border-color:#d97168;color:#ffc4bd}.touch-map-help{bottom:63px;font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.floor-manage{left:auto;right:10px;bottom:119px;min-height:42px;padding:7px 9px;font-size:9px}.floor-manage small{display:none}.wave-center{top:56px;min-width:0;width:min(260px,calc(100vw - 24px));padding:5px 10px}.wave-center strong{font-size:15px}.wave-reward-notice{top:94px;width:calc(100vw - 24px)}.boss-health-hud{top:92px}.encyclopedia-badge{top:8px;right:8px}.achievement-popup{top:120px}.paused-label{font-size:24px;white-space:nowrap}.owner-modal,.achievements-modal,.encyclopedia-modal,.splash-specialization-modal,.robot-specialization-modal,.finale-cutscene{padding:10px}.owner-window,.achievements-window,.encyclopedia-window,.splash-specialization-window,.robot-specialization-window{max-height:calc(100vh - 20px);overflow:auto}.owner-window h2,.splash-specialization-window h2,.robot-specialization-window h2{font-size:23px}.achievements-header,.encyclopedia-header{padding:12px}.achievements-grid{padding:10px}.achievement-card{min-height:112px}.debug-history{height:32vh}.tutorial-panel{bottom:10px;width:calc(100vw - 20px);max-height:calc(100vh - 20px);overflow:auto}.tutorial-panel h2{font-size:20px}}
@media(max-width:430px){header{padding:7px 8px}h1{font-size:17px}.stats{gap:3px}.pause-button,.encyclopedia-button,.achievements-button,.help-button{min-height:35px;padding:7px 6px;font-size:7px}.pause-button{font-size:9px}.mobile-map-controls{gap:5px;left:7px;right:7px}.mobile-map-controls button{font-size:8px;min-height:42px}.floor-manage{right:7px;bottom:110px}.touch-map-help{display:none}.tower-card{grid-template-columns:80px minmax(0,1fr)}.tower-copy strong{font-size:16px}.finale-scene{width:100%;height:calc(100vh - 20px)}}
:root{--bg:#071014;--panel:#101b20;--line:#26383e;--orange:#ff9f1c;--cyan:#53d8df;--text:#e9f1f2;--muted:#82969c}.heater-preview{background:radial-gradient(circle,#5c3c20,#1b2428)}.heater-mini-body{z-index:2;width:42px;height:48px;display:grid;place-items:center;border:3px solid #ffd184;border-radius:8px;background:#63321e;color:#fff1c8;font:900 28px Inter;box-shadow:inset 0 0 10px #ff7b30,0 4px 8px #0008}.heater-mini-glow{position:absolute;width:68px;height:68px;border-radius:50%;background:#ff7a2926;box-shadow:0 0 25px #ff7a29;animation:heaterGlow 1.8s ease-in-out infinite}.heater-card{min-height:105px;overflow:hidden}@keyframes heaterGlow{50%{transform:scale(1.14);opacity:.72}}
@media(prefers-reduced-motion:reduce){.scroll-discovery-hint i{animation:none!important}}
*{box-sizing:border-box}html,body{width:100%;height:100%;overflow:hidden}body{margin:0;min-height:0;background:radial-gradient(circle at 40% 0,#182b31 0,#081115 45%,#04090b 100%);color:var(--text);font-family:Inter,system-ui,sans-serif;display:grid;place-items:center;padding:clamp(0px,1.25vw,20px)}
.game-shell{width:min(1500px,100%);height:100%;min-height:0;border:1px solid #31454b;background:#0a1317;box-shadow:0 28px 80px #000b,0 0 0 1px #000 inset;display:flex;flex-direction:column;overflow:hidden}.game-shell:before{content:"";display:block;flex:0 0 4px;height:4px;background:linear-gradient(90deg,var(--orange),#ffc15a 36%,transparent 36%)}
header{height:88px;flex:0 0 88px;display:flex;align-items:center;justify-content:space-between;padding:0 26px;border-bottom:1px solid var(--line);background:linear-gradient(180deg,#142329,#0d181c);position:sticky;top:0;z-index:20}h1,h2,p{margin:0}h1{font:800 28px Barlow Condensed,sans-serif;letter-spacing:2px}h1 span{color:var(--orange)}.eyebrow,small{font-size:10px;letter-spacing:2px;color:var(--muted);font-weight:700}.stats{display:flex;height:100%}.stat{min-width:120px;padding:0 20px;border-left:1px solid var(--line);display:flex;align-items:center;gap:11px}.stat>span{font-size:25px;color:#a9bac0;text-shadow:0 2px 0 #000}.stat .health-icon{color:#ff655c}.stat .wave-icon{color:var(--orange)}.stat strong{display:block;font:700 22px Barlow Condensed,sans-serif;letter-spacing:1px;margin-top:2px}.health-stat{min-width:210px;position:relative}.health-track{width:130px;height:5px;margin-top:5px;background:#301619;border:1px solid #50282b;overflow:hidden}.health-track i{display:block;width:100%;height:100%;background:linear-gradient(90deg,#ff4e4e,#ff8174);transition:width .38s ease-out,background .25s}.health-damage{position:absolute;right:13px;top:18px;color:#ff6b60;font:800 18px Barlow Condensed;opacity:0;pointer-events:none}.health-stat.hit{animation:healthShake .3s}.health-stat.hit .health-damage{animation:damageFloat .7s}.health-stat.heavy{filter:drop-shadow(0 0 7px #ff382f)}
.play-area{display:grid;grid-template-columns:minmax(0,1fr) 310px;flex:1 1 auto;min-height:0;overflow:hidden}.canvas-wrap{position:relative;min-width:0;min-height:0;height:100%;overflow:hidden;background:#13231f}canvas{position:absolute;inset:0;display:block;width:100%;height:100%;cursor:crosshair;touch-action:none}.hidden{display:none!important}
aside{min-height:0;height:100%;overflow-y:auto;overscroll-behavior:contain;border-left:1px solid var(--line);background:linear-gradient(145deg,#142126,#0c1519);padding:0 20px 24px;position:relative;scrollbar-color:#486068 #0a1418;scrollbar-width:thin}.side-tabs{display:grid;grid-template-columns:1fr 1fr;margin:0 -20px 22px;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:4;background:#0b1519}.side-tabs button{height:48px;border:0;border-right:1px solid var(--line);border-bottom:3px solid transparent;background:#0b1519;color:#677a80;font:800 13px Barlow Condensed;letter-spacing:1.8px;cursor:pointer}.side-tabs button.active{color:#f2f6f7;border-bottom-color:var(--orange);background:#152329}.side-tabs button:disabled{color:#35464b;cursor:not-allowed;background:#091216}.side-tabs button:not(:disabled):hover{color:#fff}.shop-heading{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding-bottom:15px}.shop-heading h2{font:800 22px Barlow Condensed,sans-serif;letter-spacing:1.5px}.shop-heading span{font:700 13px Barlow Condensed;background:#233238;color:#9db1b7;padding:6px 9px;clip-path:polygon(10% 0,100% 0,90% 100%,0 100%)}
.tower-card{width:100%;margin-top:20px;padding:0;text-align:left;color:inherit;border:1px solid #43575d;background:#17272d;cursor:pointer;transition:.18s;display:grid;grid-template-columns:92px 1fr;min-height:105px}.tower-card:hover:not(:disabled){border-color:var(--orange);transform:translateY(-2px);box-shadow:0 8px 24px #0005}.tower-card.selected{border-color:var(--orange);box-shadow:0 0 0 1px var(--orange) inset}.tower-card:disabled{opacity:.45;cursor:not-allowed}.tower-preview{background:radial-gradient(circle,#34505a,#142329);display:grid;place-items:center;position:relative;overflow:hidden}.tower-preview .tower-art{position:absolute;inset:0;z-index:2;display:block;width:100%;height:100%;pointer-events:none;background:transparent}.mini-elephant{font-size:48px;filter:grayscale(.5) drop-shadow(0 5px 2px #0008);z-index:1}.tower-preview i{position:absolute;width:72px;height:22px;border-radius:50%;background:#081013;bottom:9px}.tower-copy{padding:18px 12px}.tower-copy strong{display:block;font:700 18px Barlow Condensed;letter-spacing:1px}.tower-copy small{letter-spacing:0;font-size:9px}.price{color:var(--orange);font:700 17px Barlow Condensed;margin-top:12px}.placement-hint{display:flex;gap:12px;margin-top:20px;padding:14px;background:#0b1519;border-left:3px solid var(--cyan)}.placement-hint>span{color:var(--cyan);font-size:24px}.placement-hint p{font-size:11px;line-height:1.55;color:#8fa1a6}.placement-hint strong{color:#dbe5e7;letter-spacing:1px}.placement-hint.active{border-color:var(--orange);animation:pulse 1s infinite}.legend{margin:20px 2px;font-size:10px;color:#82969c;display:flex;gap:20px}.legend i{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:4px}.valid-dot{background:#48ddd0;box-shadow:0 0 6px #48ddd0}.invalid-dot{background:#ff5b51}.restart{width:100%;background:transparent;border:1px solid #3c5057;color:#b8c6ca;padding:12px;font:700 12px Inter;letter-spacing:1px;cursor:pointer}.restart:hover{border-color:#81979d;color:#fff}.tip{text-align:center;color:#60747a;font-size:9px;line-height:1.5;margin-top:18px}
.papaya-card{margin-top:10px;min-height:86px}.papaya-preview{background:radial-gradient(circle,#315f3a,#11281a)}.mini-papaya{z-index:1;color:#55bf57;font-size:50px;line-height:1;text-shadow:8px 8px 0 #287c35,-7px 7px 0 #3d9b45}.papaya-economy{display:flex;justify-content:space-between;gap:6px;padding:9px 10px;background:#122219;border:1px solid #294b32;color:#88a990;font-size:9px}.papaya-economy strong{color:#ffc34d}.papaya-card.maximum .tower-copy small{color:#ff9f1c}.papaya-card.maximum{border-color:#825d28}
.eyewear-card{margin-top:10px}.eyewear-preview{background:radial-gradient(circle,#334263,#101524)}.mini-glasses{position:absolute;z-index:2;left:48px;top:51px;width:31px;height:15px;filter:drop-shadow(0 0 5px #48dfff)}.mini-glasses:before{content:"";position:absolute;left:-10px;top:5px;width:11px;height:3px;border-radius:3px;background:#294d59;transform:rotate(-8deg)}.mini-glasses:after{content:"";position:absolute;left:13px;top:6px;width:5px;height:3px;background:#71efff}.mini-glasses b{position:absolute;top:1px;width:14px;height:13px;border:3px solid #71efff;border-radius:50%;background:#9df7ff55;box-shadow:inset 0 0 5px #dfffff}.mini-glasses b:first-child{left:0}.mini-glasses b:last-child{right:0}.camera-help{position:absolute;right:12px;bottom:10px;z-index:4;padding:5px 8px;background:#071014bb;border:1px solid #3c535a;color:#83a0a7;font:700 8px Inter;letter-spacing:1px;pointer-events:none}.scroll-discovery-hint{position:absolute;z-index:5;left:50%;bottom:14px;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:1px;padding:6px 14px;border:1px solid #73919899;border-radius:18px;background:#071014d9;color:#c6d6d9;font:800 9px Inter;letter-spacing:1px;pointer-events:none;box-shadow:0 4px 18px #0008}.scroll-discovery-hint i{color:#79e8e1;font:900 18px/12px Inter;font-style:normal;animation:lowerMapNudge 1.2s ease-in-out infinite}@keyframes lowerMapNudge{50%{transform:translateY(4px)}}
.foodie-card{margin-top:10px}.foodie-preview{background:radial-gradient(circle,#5b3f25,#1e130d)}.mini-food{position:absolute;z-index:2;right:7px;top:64px;width:25px;height:16px;border:3px solid #3f8b42;border-radius:52% 48% 55% 45%;background:#62ad50;transform:rotate(-18deg);box-shadow:0 2px 4px #0008}.mini-food b{position:absolute;inset:2px 3px;border-radius:50%;background:radial-gradient(circle at 40% 45%,#35241b 0 1px,transparent 1.5px),radial-gradient(circle at 62% 55%,#35241b 0 1px,transparent 1.5px),#f59b36}.unit-limits{display:grid;grid-template-columns:1fr 1fr;gap:3px;margin-top:8px}.unit-limits span{padding:5px;background:#0b171b;color:#83989e;font-size:7px}.help-button{align-self:center;margin-right:8px;padding:9px;border:1px solid #485f67;background:#101e23;color:#8ba0a6;font:800 9px Inter;cursor:pointer}.wave-center{position:fixed;z-index:70;top:9px;left:50%;transform:translateX(-50%);min-width:230px;text-align:center;padding:7px 18px;background:#081216b3;border:1px solid #4a6870;box-shadow:0 5px 16px #0008,0 0 10px #07121666;pointer-events:none}.wave-center strong{display:block;color:#f4fbfc;font:800 17px Barlow Condensed;letter-spacing:1.2px;text-shadow:0 1px 2px #000}.wave-center small{display:block;min-height:12px;color:#ffad32;letter-spacing:.7px}.encyclopedia-badge{position:fixed;z-index:115;top:12px;right:350px;min-width:20px;height:20px;border-radius:50%;background:#8c5cff;color:white;text-align:center;font:800 11px/20px Inter;box-shadow:0 0 12px #9d72ff}.encyclopedia-button.unlocked{animation:encyclopediaPulse .7s 2}@keyframes encyclopediaPulse{50%{box-shadow:0 0 22px #9a72ff;border-color:#cbb7ff}}
.watermelon-farm-card{margin-top:10px;border-color:#477a3c}.watermelon-farm-preview{background:radial-gradient(circle,#386d37,#132b18);box-shadow:inset 0 0 22px #78dc5933}.watermelon-farm-preview .mini-watermelon{z-index:1;font-size:42px;line-height:1;filter:drop-shadow(0 0 9px #83e76188)}.watermelon-farm-card.maximum .tower-copy small{color:#89df68}.selection-note{margin:-7px 0 14px;padding:9px;background:#16250f;border-left:2px solid #70c957;color:#a9dd94;font-size:9px;line-height:1.5}.wave-reward-notice{position:fixed;z-index:72;top:72px;left:50%;transform:translateX(-50%);min-width:220px;text-align:center;padding:10px 18px;border:1px solid #d99c24;background:#211908ed;box-shadow:0 8px 28px #000a,0 0 20px #ffbd3344;pointer-events:none}.wave-reward-notice strong,.wave-reward-notice span{display:block}.wave-reward-notice strong{font:800 18px Barlow Condensed;letter-spacing:1.5px;color:#fff2bd}.wave-reward-notice span{margin-top:2px;color:#ffc94c;font-size:10px;font-weight:800}.currency-pulse{animation:currencyRewardPulse .55s}.watermelon-farm-pulse{animation:watermelonFarmPulse .7s}@keyframes currencyRewardPulse{50%{background:#50360e;box-shadow:inset 0 0 20px #ffd34d88,0 0 18px #ffc53d}}@keyframes watermelonFarmPulse{50%{filter:drop-shadow(0 0 14px #7ee45d)}}

.tutorial-overlay{position:fixed;inset:0;z-index:200;background:#020609b8;pointer-events:none}.tutorial-spotlight{position:fixed;border:3px solid #ffe16d;border-radius:12px;box-shadow:0 0 0 9999px #020609b8,0 0 28px #ffe16d;animation:tutorialPulse 1.2s infinite;transition:.25s}.tutorial-spotlight.placement-range{border-radius:50%;background:#ffe16d0b}.tutorial-placement-marker{display:none;position:fixed;border:3px solid #fff08a;border-radius:50%;background:#ffe16d20;box-shadow:0 0 22px #ffe16d;animation:tutorialMarkerPulse .85s infinite alternate}.tutorial-pointer{position:fixed;color:#ffe16d;font-size:30px;filter:drop-shadow(0 0 7px #ffc928);animation:tutorialPoint .8s infinite alternate}.tutorial-panel{pointer-events:auto;position:fixed;left:50%;bottom:24px;transform:translateX(-50%);width:min(540px,calc(100vw - 28px));padding:18px;background:#13242a;border:1px solid #6e858d;box-shadow:0 18px 60px #000}.tutorial-panel h2{font:800 22px Barlow Condensed;letter-spacing:1px;margin:3px 0 7px}.tutorial-panel p{color:#afc0c4;font-size:12px;line-height:1.5}.tutorial-panel label{display:block;margin:12px 0;color:#82979d;font-size:10px}.tutorial-panel>div{display:flex;justify-content:flex-end;gap:8px}.tutorial-panel button{padding:9px 13px;border:1px solid #526970;background:#1b3037;color:#dce8ea;font-weight:800;cursor:pointer}.tutorial-panel button:last-child{background:#ff9f1c;border-color:#ffb23c;color:#161006}.tutorial-panel button:disabled{opacity:.45;cursor:not-allowed}@keyframes tutorialPulse{50%{border-color:#fff;box-shadow:0 0 0 9999px #020609b8,0 0 38px #fff28b}}@keyframes tutorialMarkerPulse{to{transform:scale(1.16);background:#ffe16d38;box-shadow:0 0 32px #fff39a}}@keyframes tutorialPoint{to{transform:translateX(9px)}}@media(prefers-reduced-motion:reduce){.tutorial-spotlight,.tutorial-placement-marker,.tutorial-pointer,.encyclopedia-button.unlocked{animation:none!important;transition:none!important}}
.wave-controls{margin:0 0 10px;padding:12px;background:#0a1418;border:1px solid #33484f}.auto-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.auto-row strong{display:block;font:800 15px Barlow Condensed;letter-spacing:1.5px}.auto-toggle{position:relative;width:38px;height:21px}.auto-toggle input{opacity:0;width:0;height:0}.auto-toggle span{position:absolute;inset:0;border-radius:20px;background:#27383e;cursor:pointer;transition:.2s}.auto-toggle span:before{content:"";position:absolute;width:15px;height:15px;left:3px;top:3px;border-radius:50%;background:#788c92;transition:.2s}.auto-toggle input:checked+span{background:#2b6868;box-shadow:0 0 10px #53d8df55}.auto-toggle input:checked+span:before{transform:translateX(17px);background:#65f0e7}.start-level-label{display:block;color:#71858b;font-size:8px;font-weight:700;letter-spacing:1.2px;margin-bottom:4px}.start-level-select{width:100%;margin-bottom:7px;padding:6px 8px;background:#15252a;border:1px solid #3b5158;color:#dbe6e8;font:700 11px Inter}.start-level-select:disabled{opacity:.45}.start-wave{width:100%;display:flex;align-items:center;gap:10px;text-align:left;border:1px solid #d98617;background:linear-gradient(135deg,#ffad32,#ef8b0c);color:#160f07;padding:10px 12px;cursor:pointer}.start-wave>span{font-size:18px}.start-wave strong,.start-wave small{display:block;color:inherit;letter-spacing:1px}.start-wave strong{font:800 13px Barlow Condensed}.start-wave small{font-size:8px;margin-top:2px}.start-wave:disabled{border-color:#394a4f;background:#1c2a2f;color:#65787e;cursor:not-allowed}.wave-controls>p{font-size:9px;color:#71858b;line-height:1.4;margin-top:8px}.restart{margin-top:0}
.tower-stats{padding:16px;background:#0a1418;border:1px solid #3d555c;border-top:3px solid var(--orange)}.stats-title{display:flex;align-items:flex-start;justify-content:space-between}.stats-title h3{margin:2px 0 0;font:800 23px Barlow Condensed;letter-spacing:1.5px}.level-badge{font:800 13px Barlow Condensed;color:#16100a;background:var(--orange);padding:6px 9px;clip-path:polygon(9% 0,100% 0,91% 100%,0 100%)}.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:15px 0}.stat-grid p{padding:9px 7px;background:#142329;border-bottom:2px solid #2c4249}.stat-grid small{display:block;font-size:7px;letter-spacing:.7px;min-height:18px}.stat-grid strong{font:700 16px Barlow Condensed;color:#e7f0f2}.upgrade-block{margin:5px 0 17px;padding:12px;background:#111f24;border-left:2px solid var(--cyan)}.upgrade-block>div p{font-size:9px;color:#83969c;line-height:1.5;margin:3px 0 10px}.upgrade-block button{width:100%;display:flex;justify-content:space-between;border:1px solid #e18815;background:#ff9f1c;color:#15100a;padding:10px 12px;font:800 11px Inter;cursor:pointer}.upgrade-block button:disabled{border-color:#3b4b50;background:#202e33;color:#64777c;cursor:not-allowed}.upgrade-block button b{font:800 12px Barlow Condensed}.tower-stats>label{display:block;color:#8ca0a6;font-size:9px;font-weight:700;letter-spacing:1.5px;margin-bottom:6px}.tower-stats select{width:100%;color:#e9f1f2;background:#1b2d33;border:1px solid #496068;padding:9px;font:700 12px Inter;cursor:pointer}.target-help{font-size:9px;color:#70858b;line-height:1.4;margin-top:7px}
.freeze-resistance{margin:-5px 0 14px;padding:10px;border:1px solid #73cfe4;background:#10242c;color:#dffaff}.freeze-resistance>div:first-child{display:flex;justify-content:space-between;gap:8px;align-items:center}.freeze-resistance strong{font:800 10px Inter;letter-spacing:.4px}.freeze-resistance span{font:700 9px Inter;color:#9feaff}.freeze-resistance-bar{height:10px;margin-top:8px;overflow:hidden;border:1px solid #426572;border-radius:999px;background:#0b1b22;box-shadow:inset 0 1px 3px #0009}.freeze-resistance-bar i{display:block;width:100%;height:100%;border-radius:inherit;background:linear-gradient(90deg,#50cce9,#bdf6ff);box-shadow:0 0 9px #71e7ff88;transition:width .42s cubic-bezier(.2,.8,.25,1),background .2s ease,box-shadow .2s ease}.freeze-resistance.heated .freeze-resistance-bar{border-color:#bf6c27;box-shadow:inset 0 1px 3px #0009,0 0 8px #f27f3429}.freeze-resistance.heated .freeze-resistance-bar i{background:linear-gradient(90deg,#ffe75d 0%,#ffb12e 42%,#f36d2e 76%,#e64a26 100%);box-shadow:0 0 10px #ff8b3b99}.freeze-resistance-status{margin:8px 0 0;color:#ffd28a;font:800 9px/1.35 Inter;letter-spacing:.2px}.freeze-resistance.frozen{border-color:#d9f8ff;background:#173847;box-shadow:inset 0 0 16px #79e9ff33}.freeze-resistance.frozen span{color:#fff;font-weight:900}@media (max-width:640px){.freeze-resistance{margin-bottom:10px;padding:8px}.freeze-resistance-bar{height:9px}.freeze-resistance>div:first-child{align-items:flex-start}.freeze-resistance span{text-align:right}}
.tower-stats{padding:16px;background:#0a1418;border:1px solid #3d555c;border-top:3px solid var(--orange)}.stats-title{display:flex;align-items:flex-start;justify-content:space-between}.stats-title h3{margin:2px 0 0;font:800 23px Barlow Condensed;letter-spacing:1.5px}.level-badge{font:800 13px Barlow Condensed;color:#16100a;background:var(--orange);padding:6px 9px;clip-path:polygon(9% 0,100% 0,91% 100%,0 100%)}.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:15px 0}.stat-grid p{padding:9px 7px;background:#142329;border-bottom:2px solid #2c4249}.stat-grid small{display:block;font-size:7px;letter-spacing:.7px;min-height:18px}.stat-grid strong{font:700 16px Barlow Condensed;color:#e7f0f2}.upgrade-block{margin:5px 0 17px;padding:12px;background:#111f24;border-left:2px solid var(--cyan)}.upgrade-block>div p{font-size:9px;color:#83969c;line-height:1.5;margin:3px 0 10px}.upgrade-block button{width:100%;display:flex;justify-content:space-between;border:1px solid #e18815;background:#ff9f1c;color:#15100a;padding:10px 12px;font:800 11px Inter;cursor:pointer}.upgrade-block button:disabled{border-color:#3b4b50;background:#202e33;color:#64777c;cursor:not-allowed}.upgrade-block button b{font:800 12px Barlow Condensed}#targetingControls>label{display:block;color:#8ca0a6;font-size:9px;font-weight:700;letter-spacing:1.5px;margin-bottom:6px}.tower-stats select{width:100%;color:#e9f1f2;background:#1b2d33;border:1px solid #496068;padding:9px;font:700 12px Inter;cursor:pointer}.target-help{font-size:9px;color:#70858b;line-height:1.4;margin-top:7px}.sell-tower{width:100%;margin-top:14px;border:1px solid #a7473f;background:#291617;color:#ff8c83;padding:10px;font:800 11px Inter;letter-spacing:1px;cursor:pointer}.sell-tower:hover{background:#3b1b1c;border-color:#e15c51}.sell-tower:disabled{opacity:.4;cursor:not-allowed}
.banner{position:absolute;inset:0;background:#031014d9;display:grid;place-content:center;text-align:center;backdrop-filter:blur(4px)}.banner h2{font:800 58px Barlow Condensed;color:var(--orange);letter-spacing:5px}.banner p{color:#9cb0b5;margin:6px 0 25px}.banner button{justify-self:center;border:0;background:var(--orange);color:#111;padding:13px 25px;font-weight:800;cursor:pointer;clip-path:polygon(7% 0,100% 0,93% 100%,0 100%)}
@keyframes pulse{50%{box-shadow:0 0 14px #ff9f1c44}}@media(max-width:900px){.play-area{grid-template-columns:1fr;grid-template-rows:minmax(220px,56%) minmax(0,44%)}aside{border-left:0;border-top:1px solid var(--line)}header{height:auto;max-height:40%;overflow:auto;gap:15px;padding:15px;align-items:flex-start;flex:0 0 auto}.stats{flex-wrap:wrap}.stat{min-width:90px;padding:4px 10px}h1{font-size:22px}}@media(max-height:620px) and (min-width:901px){header{height:72px;flex-basis:72px}.stat{padding:0 12px}.stat strong{font-size:18px}.health-stat{min-width:185px}}
.speed-and-auto{display:flex;align-items:center;gap:9px}.game-speed-options{display:flex;align-items:center;gap:3px}.game-speed{min-width:36px;height:25px;border:1px solid #557079;background:#182a30;color:#75ece6;font:800 11px Inter;cursor:pointer}.game-speed:hover,.game-speed:focus-visible{border-color:#75ece6;color:#fff;outline:none}.game-speed.active{border-color:#75ece6;background:#1e5960;color:#fff;box-shadow:0 0 10px #53d8df55}
@keyframes healthShake{20%{transform:translateX(-5px)}40%{transform:translateX(5px)}60%{transform:translateX(-3px)}80%{transform:translateX(2px)}}@keyframes damageFloat{0%{opacity:1;transform:translateY(10px) scale(.8)}60%{opacity:1;transform:translateY(-5px) scale(1.15)}100%{opacity:0;transform:translateY(-17px)}}
.encyclopedia-section-title{grid-column:1/-1;margin:5px 0 0;padding:6px 2px;border-bottom:1px solid #314850;color:#8fa7ad;font:800 12px Barlow Condensed;letter-spacing:1.8px}
.ghost-entry{margin-top:20px;padding-top:15px;border-top:1px solid #49636b}.ghost-preview{opacity:.58;filter:saturate(.55) brightness(1.5);box-shadow:0 0 20px #c9f9ff}
.tutorial-overlay{background:transparent}
@media(max-width:760px){.encyclopedia-content{display:flex;flex-direction:column;overflow:auto}.encyclopedia-grid{overflow:visible;flex:0 0 auto}.encyclopedia-detail{display:block!important;overflow:visible;border-left:0;border-top:1px solid #2b4047;min-height:280px}}
.encyclopedia-button{align-self:center;margin-right:12px;padding:9px 11px;border:1px solid #567078;background:#13242a;color:#9edbe0;font:800 10px Barlow Condensed;letter-spacing:1.3px;cursor:pointer}.encyclopedia-button:hover{border-color:#70e4e8;color:#fff}.encyclopedia-modal{position:fixed;inset:0;z-index:100;background:#02090de8;display:grid;place-items:center;padding:24px;backdrop-filter:blur(7px)}.encyclopedia-window{width:min(1120px,96vw);height:min(760px,92vh);display:flex;flex-direction:column;background:linear-gradient(145deg,#15252b,#091216);border:1px solid #486068;box-shadow:0 30px 90px #000}.encyclopedia-header{position:static;height:auto;min-height:88px;padding:15px 20px;flex:0 0 auto}.encyclopedia-header h2{font:800 25px Barlow Condensed;letter-spacing:2px}.encyclopedia-header p{font-size:11px;color:#ffae35;margin-top:4px}.encyclopedia-header>button{border:0;background:transparent;color:#9fb0b5;font-size:30px;cursor:pointer}.encyclopedia-filters{display:flex;align-items:center;gap:10px;padding:12px 18px;border-bottom:1px solid #2d4148}.encyclopedia-filters select{background:#13252b;border:1px solid #3f5961;color:#dbe8ea;padding:8px}.encyclopedia-filters label{font-size:10px;color:#95a8ad}.encyclopedia-summary{padding:8px 18px;color:#84999f;font-size:10px;border-bottom:1px solid #23363c}.encyclopedia-content{display:grid;grid-template-columns:minmax(0,1fr) 320px;min-height:0;flex:1}.encyclopedia-grid{overflow:auto;padding:15px;display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:10px;align-content:start}.orb-card{min-height:172px;padding:11px;border:1px solid #354c53;background:#101e23;color:#dce7e9;text-align:left;cursor:pointer;position:relative}.orb-card:hover,.orb-card:focus{border-color:#ffac32;outline:none}.orb-card.locked{filter:grayscale(1);color:#63767c}.orb-card h3{font:800 15px Barlow Condensed;letter-spacing:1px;margin:8px 0 3px}.orb-card p{font-size:9px;color:#74888e}.orb-card .entry-state{position:absolute;right:7px;top:7px;font-size:7px;letter-spacing:1px;color:#ffb03a}.orb-preview{width:72px;height:72px;margin:6px auto;border-radius:50%;background:radial-gradient(circle at 32% 28%,var(--orb-hi),var(--orb-mid) 35%,var(--orb-low) 72%,var(--orb-shadow));border:3px solid var(--orb-rim);box-shadow:0 0 14px var(--orb-glow,transparent)}.orb-card.locked .orb-preview{background:#071014;border-color:#27383d;box-shadow:none}.orb-preview.food{border-radius:42% 58% 52% 48%;background:radial-gradient(circle at 30% 25%,#fff,#4de0f2 28%,#146f9c 70%,#071d35);position:relative}.orb-preview.food:after{content:'🍈';position:absolute;font-size:28px;left:20px;top:22px}.encyclopedia-detail{overflow:auto;border-left:1px solid #2b4047;padding:20px;background:#0a1519}.encyclopedia-detail h3{font:800 24px Barlow Condensed;letter-spacing:1px}.encyclopedia-detail .large-preview{width:115px;height:115px}.detail-stats{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:14px}.detail-stats div{padding:8px;background:#132329}.detail-stats small{display:block;font-size:7px}.detail-stats strong{font:700 12px Barlow Condensed}.hidden-stat{color:#53666b!important}.encyclopedia-notification{position:fixed;left:50%;top:106px;z-index:110;transform:translateX(-50%);padding:10px 18px;background:#14262c;border:1px solid #f5aa35;color:#fff;font:800 13px Barlow Condensed;letter-spacing:1px;opacity:0;pointer-events:none}.encyclopedia-notification.show{animation:encyclopediaNotice 2.2s}.empty-category{grid-column:1/-1;color:#71868c;text-align:center;padding:40px}@keyframes encyclopediaNotice{0%{opacity:0;transform:translate(-50%,-10px)}12%,75%{opacity:1;transform:translate(-50%,0)}100%{opacity:0;transform:translate(-50%,-12px)}}@media(max-width:760px){.encyclopedia-content{grid-template-columns:1fr}.encyclopedia-detail{display:none}.encyclopedia-filters{flex-wrap:wrap}.encyclopedia-button{font-size:8px;padding:7px}.encyclopedia-window{height:95vh}}
.pause-button{align-self:center;margin-right:8px;padding:9px 13px;border:1px solid #f2ae38;background:#251b0b;color:#ffd072;font:800 11px Barlow Condensed;letter-spacing:1.2px;cursor:pointer}.pause-button:hover{background:#3a280e;color:#fff}.paused-label{position:fixed;z-index:80;left:50%;top:55%;transform:translate(-50%,-50%);padding:13px 28px;border:1px solid #ffc54e;background:#171006e8;color:#ffe9aa;font:800 32px Barlow Condensed;letter-spacing:3px;pointer-events:none}.gas-mask-card,.frost-card,.splash-card{margin-top:10px}.gas-mask-preview{background:radial-gradient(circle,#31534d,#112322)}.mini-mask{position:absolute;z-index:2;left:48px;top:47px;padding:2px 5px;border:2px solid #9cefc3;border-radius:6px;background:#22383a;color:#b9ffe2;font-size:12px}.frost-card{height:105px;overflow:hidden}.frost-card .tower-copy{min-width:0;overflow:hidden}.frost-card .tower-copy strong,.frost-card .tower-copy small{white-space:normal;overflow-wrap:normal;word-break:normal}.frost-preview{background:radial-gradient(circle at 50% 42%,#557b8b,#152832 72%,#0c171e);box-shadow:inset 0 0 24px #a9efff22}.frost-elephant{filter:grayscale(.65) brightness(1.15) drop-shadow(0 5px 2px #0008) drop-shadow(0 0 5px #b9f5ff99)}.frost-elephant:after{content:"";position:absolute;left:41px;top:38px;width:30px;height:24px;border-top:3px solid #d9fbff;border-right:2px solid #9fefff;border-radius:50%;transform:rotate(14deg);filter:drop-shadow(0 0 4px #8eefff)}.mini-frost-spray{position:absolute;z-index:3;right:5px;top:28px;color:#e3fcff;font-size:27px;text-shadow:0 0 5px #fff,0 0 12px #77dfff;transform:rotate(12deg)}.mini-frost-spray:after{content:"· ·";position:absolute;left:-13px;top:24px;color:#9deeff;font:900 16px Inter;letter-spacing:4px;transform:rotate(-20deg)}.mini-snow{position:absolute;z-index:2;left:12px;right:8px;bottom:13px;height:18px}.mini-snow:before,.mini-snow:after,.mini-snow b{content:"";position:absolute;bottom:0;border-radius:50% 50% 38% 42%;background:linear-gradient(#f3feff,#a9e5ee);box-shadow:0 0 7px #b9f5ff88}.mini-snow:before{left:4px;width:30px;height:12px}.mini-snow:after{right:2px;width:35px;height:10px}.mini-snow b:nth-child(1){left:27px;width:28px;height:15px}.mini-snow b:nth-child(2){left:48px;width:20px;height:9px}.mini-snow b:nth-child(3){left:15px;width:17px;height:8px}.splash-preview{background:radial-gradient(circle,#285b75,#11212b)}.mini-splash{position:absolute;z-index:2;right:6px;top:38px;color:#b9f8ff;font-size:25px;text-shadow:0 0 8px #52deff}@media(max-width:900px){.frost-card{height:105px;grid-template-columns:92px minmax(0,1fr)}}@media(max-width:420px){.frost-card .tower-copy{padding:15px 10px}.frost-card .tower-copy strong{font-size:17px;letter-spacing:.7px}.frost-card .tower-copy small{font-size:8px;line-height:1.3}.frost-card .price{margin-top:9px}}
.owner-modal{position:fixed;z-index:300;inset:0;display:grid;place-items:center;padding:20px;background:#02080ad9;backdrop-filter:blur(5px)}.owner-window{position:relative;width:min(590px,96vw);margin:0;padding:24px;border:1px solid #6ea99f;background:linear-gradient(145deg,#122c2c,#071315);box-shadow:0 25px 70px #000;color:#dff9f4}.owner-window h2{margin:4px 0 16px;color:#8bffe5;font:800 30px Barlow Condensed;letter-spacing:2px}.owner-window label,.owner-window p{display:block;margin:8px 0;color:#9cbab6;font-size:11px}.owner-window input{width:100%;padding:11px;border:1px solid #46736c;background:#061113;color:#e9fffb;font:600 13px Inter}.owner-window form,.owner-window>form{display:flex;gap:8px}.owner-window button[type=submit],.debug-window form button{border:1px solid #65d5be;background:#42bca5;color:#03100d;padding:10px 16px;font-weight:800;cursor:pointer}.owner-close{position:absolute;right:10px;top:8px;border:0;background:transparent;color:#a8cbc6;font-size:28px;cursor:pointer}.debug-window{width:min(780px,96vw)}.debug-history{height:min(45vh,360px);overflow:auto;margin:0 0 12px;padding:12px;border:1px solid #284e4a;background:#030b0c;color:#c5e7e0;font:12px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre-wrap}.debug-history .command{color:#8bffe5}.debug-history .error{color:#ff9b8d}.debug-history .success{color:#a8f5a1}@media(max-width:600px){.owner-window{padding:18px}.owner-window h2{font-size:24px}.debug-history{height:42vh}.debug-window form{flex-direction:column}}
.password-entry{display:flex;align-items:stretch;gap:7px}.password-entry input{min-width:0}.password-visibility{flex:0 0 46px;min-height:42px;border:1px solid #5d9790;background:#10282a;color:#d9fffa;font-size:20px;line-height:1;cursor:pointer}.password-visibility:hover,.password-visibility:focus{border-color:#9bfff0;background:#174147;outline:none}.password-visibility:focus-visible{outline:2px solid #d8fffa;outline-offset:2px}@media(max-width:600px){.password-visibility{flex-basis:52px;min-height:46px}}
.password-visibility-icon{position:relative;display:block;width:28px;height:23px;margin:auto;color:#d9fffa}.password-visibility-icon:before{content:"";position:absolute;left:8px;bottom:0;width:11px;height:11px;border:2px solid currentColor;border-radius:50%}.password-visibility-icon:after{content:"";position:absolute;left:1px;top:0;width:24px;height:15px;border:3px solid currentColor;border-bottom:0;border-radius:18px 18px 0 0}
.owner-code-window{width:min(430px,94vw);padding:20px}.owner-code-window h2{font-size:24px}.owner-code-window p{min-height:16px;color:#ffb09d}
.floor-manage{position:absolute;z-index:12;left:12px;bottom:12px;padding:9px 11px;border:1px solid #76b6c2;background:#071419e8;color:#d8f5f8;font:800 10px Inter;letter-spacing:.7px;cursor:pointer}.floor-manage b{display:inline-grid;place-items:center;width:17px;height:17px;margin-right:5px;border:1px solid #9be9ef;background:#24424a;color:#fff}.floor-manage small{display:block;margin-top:3px;color:#8eb1b7;font-size:8px}.floor-manage.active{border-color:#ffbd3f;box-shadow:0 0 16px #ffbd3f77}
.achievements-button{align-self:center;margin-right:8px;padding:9px 11px;border:1px solid #c38e35;background:#241b0d;color:#ffd77b;font:800 10px Barlow Condensed;letter-spacing:1.1px;cursor:pointer}.achievements-button span{margin-left:5px;color:#fff1c4}.achievements-modal{position:fixed;inset:0;z-index:160;display:grid;place-items:center;padding:24px;background:#02090deb;backdrop-filter:blur(7px)}.achievements-window{width:min(980px,96vw);max-height:92vh;display:flex;flex-direction:column;background:linear-gradient(145deg,#1c282b,#091216);border:1px solid #8b6b35;box-shadow:0 30px 90px #000}.achievements-header{position:static;height:auto;min-height:88px;flex:0 0 auto}.achievements-header h2{font:800 27px Barlow Condensed;letter-spacing:2px}.achievements-header p{color:#ffc862;font-size:11px}.achievements-header>button{border:0;background:transparent;color:#d9c49d;font-size:30px;cursor:pointer}.achievements-grid{overflow:auto;padding:18px;display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:11px}.achievement-card{position:relative;min-height:128px;padding:14px 14px 12px 54px;border:1px solid #385057;background:#101e23}.achievement-card:before{content:'★';position:absolute;left:15px;top:16px;color:#ffc54e;font-size:25px;text-shadow:0 0 12px #ffbd3f}.achievement-card.locked{filter:grayscale(.7);opacity:.68}.achievement-card.locked:before{content:'◆';color:#62767c;text-shadow:none}.achievement-card h3{margin:0 0 5px;font:800 18px Barlow Condensed;letter-spacing:.8px}.achievement-card p{color:#94a8ad;font-size:10px;line-height:1.45}.achievement-meta{display:flex;justify-content:space-between;margin-top:10px;color:#ffd071;font:800 9px Inter;letter-spacing:.7px}.achievement-state{position:absolute;right:10px;top:9px;color:#75e2b9;font:800 8px Inter}.achievement-popup{position:fixed;z-index:190;left:50%;top:95px;transform:translateX(-50%);min-width:330px;display:flex;align-items:center;gap:13px;padding:13px 18px;border:1px solid #ffc04b;background:#21190def;box-shadow:0 12px 35px #000b,0 0 25px #ffbd3f55;animation:achievementArrival 3.4s both}.achievement-popup-icon{color:#ffe083;font-size:30px;animation:achievementStar .75s ease-out}.achievement-popup small,.achievement-popup strong,.achievement-popup em{display:block}.achievement-popup small{color:#d69e38;font:800 8px Inter;letter-spacing:1.5px}.achievement-popup strong{margin:2px 0;color:#fff4ce;font:800 19px Barlow Condensed}.achievement-popup em{color:#9ef2cc;font:700 10px Inter;font-style:normal}@keyframes achievementArrival{0%{opacity:0;transform:translate(-50%,-25px) scale(.9)}10%,82%{opacity:1;transform:translate(-50%,0) scale(1)}100%{opacity:0;transform:translate(-50%,-14px)}}@keyframes achievementStar{0%{transform:scale(.2) rotate(-180deg)}70%{transform:scale(1.3) rotate(15deg)}100%{transform:scale(1)}}@media(prefers-reduced-motion:reduce){.achievement-popup,.achievement-popup-icon{animation:none!important}}@media(max-width:760px){.achievements-button{font-size:8px;padding:7px}.achievements-grid{grid-template-columns:1fr}.achievement-popup{min-width:0;width:calc(100vw - 24px)}}
.splash-specialization-modal{position:fixed;z-index:250;inset:0;display:grid;place-items:center;padding:22px;background:#02090de8;backdrop-filter:blur(7px)}.splash-specialization-window{width:min(780px,96vw);padding:24px;border:1px solid #65dff0;background:linear-gradient(145deg,#102b34,#071216);box-shadow:0 28px 80px #000}.splash-specialization-window header{display:flex;justify-content:space-between;gap:14px}.splash-specialization-window h2{margin:4px 0 7px;font:800 30px Barlow Condensed;letter-spacing:1.5px;color:#d8fbff}.splash-specialization-window p{color:#90b4ba;font-size:11px}.close-splash-specialization{align-self:flex-start;border:0;background:transparent;color:#a8c9cf;font:400 28px/1 Inter;cursor:pointer}.close-splash-specialization:hover{color:#fff}.splash-specialization-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:18px}.splash-specialization-grid button{min-height:104px;padding:14px;border:1px solid #426b74;background:#102127;color:#d8f8fb;text-align:left;cursor:pointer}.splash-specialization-grid button:hover{border-color:#8cf5ff;background:#15343c;box-shadow:0 0 18px #6eeaff33}.splash-specialization-grid b,.splash-specialization-grid span{display:block}.splash-specialization-grid b{font:800 18px Barlow Condensed;letter-spacing:1px}.splash-specialization-grid span{margin-top:6px;color:#9cbec3;font:10px/1.4 Inter}@media(max-width:520px){.splash-specialization-window{padding:18px}.splash-specialization-grid{grid-template-columns:1fr}.splash-specialization-grid button{min-height:78px}.splash-specialization-window h2{font-size:24px}}
.robot-card{margin-top:10px}.robot-shop-elephant{position:relative;color:#94a8ad;filter:grayscale(1) contrast(1.08) drop-shadow(0 5px 2px #0008)}.robot-shop-seam{position:absolute;z-index:2;top:43px;width:10px;height:25px;border-left:1px solid #354950;border-radius:50%;pointer-events:none}.robot-shop-seam:after{content:"•\A\A•";white-space:pre;position:absolute;top:0;left:-3px;color:#d9e7e9;font:8px/8px Inter}.robot-shop-seam.seam-one{left:38px}.robot-shop-seam.seam-two{left:55px}.robot-preview .robot-shop-eye{position:absolute;z-index:3;left:58px;top:43px;width:7px;height:7px;border-radius:50%;background:#ff574d;box-shadow:0 0 8px #ff3028}
.robot-factory-preview{background:radial-gradient(circle at 52% 40%,#31434a,#132129 70%,#091216);overflow:hidden}.robot-factory-preview:after{content:"";position:absolute;z-index:0;left:14px;right:13px;bottom:16px;height:13px;border-radius:50%;background:#03090b;opacity:.85}.factory-building{position:absolute;z-index:2;left:25px;top:36px;width:54px;height:43px;border:2px solid #c0d0d2;border-radius:5px 7px 3px 3px;background:linear-gradient(90deg,#52666c 0 32%,#73868b 32% 66%,#40545a 66%);box-shadow:inset 0 0 0 2px #283940,0 4px 5px #0008}.factory-building:before{content:"";position:absolute;left:5px;right:5px;top:7px;border-top:2px solid #a5b8ba;box-shadow:0 10px 0 #34474d}.factory-stack{position:absolute;z-index:1;left:61px;top:20px;width:12px;height:31px;border:2px solid #c2d2d4;border-bottom:0;border-radius:4px 4px 0 0;background:#42565c;box-shadow:inset 3px 0 #2a3940}.factory-stack:after{content:"";position:absolute;left:-9px;top:-13px;width:25px;height:16px;border-radius:50%;background:#a8c5c855;filter:blur(3px)}.factory-bolt{position:absolute;z-index:3;width:4px;height:4px;border-radius:50%;background:#e5eff0;box-shadow:0 0 0 1px #34484e}.bolt-a{left:5px;top:5px}.bolt-b{right:5px;top:5px}.bolt-c{left:5px;bottom:5px}.factory-led{right:8px;top:16px;width:7px;height:7px;border-radius:50%;background:#ff554c;box-shadow:0 0 8px #ff3028}.factory-door{left:20px;bottom:0;width:16px;height:21px;border:2px solid #25363b;border-bottom:0;background:#101d21}.factory-door:after{content:"";position:absolute;right:2px;top:9px;width:3px;height:3px;border-radius:50%;background:#8cfdde}

/* Tablet and phone layout: the map owns the viewport and the tower menu is a
   real bottom sheet. The 1180px breakpoint includes every current iPad width
   in both orientations without relying on browser-specific user-agent rules. */
.mobile-drawer-close{display:none}
@supports(height:100dvh){
  html,body{min-height:100dvh}
  .game-shell{height:var(--app-height,100dvh)}
}
@media(max-width:1180px){
  html,body{height:100%;min-height:100dvh;overscroll-behavior:none}
  body{display:block;padding:0;overflow:hidden}
  .game-shell{
    width:100%;height:var(--app-height,100dvh);max-height:100dvh;
    padding-top:env(safe-area-inset-top);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);
    border:0;box-shadow:none
  }
  .game-shell:before{display:none}
  header{
    position:relative;top:auto;z-index:30;flex:0 0 72px;height:72px;max-height:none;overflow:hidden;
    gap:10px;padding:7px 10px;border-bottom:1px solid #31464d
  }
  header>div:first-child{flex:0 0 180px}
  header .eyebrow{display:none}
  header h1{font-size:21px;line-height:.95;letter-spacing:1.2px}
  .stats{
    display:grid;grid-template-columns:repeat(4,minmax(72px,auto)) repeat(3,minmax(82px,1fr));
    align-items:stretch;gap:5px;width:100%;height:auto;min-width:0
  }
  .pause-button,.encyclopedia-button,.achievements-button,.help-button,.stats .stat{
    min-width:0;min-height:44px;height:auto;margin:0;padding:5px 7px
  }
  .pause-button,.encyclopedia-button,.achievements-button,.help-button{
    display:grid;place-items:center;font-size:9px;line-height:1.15;letter-spacing:.65px;text-align:center
  }
  .achievements-button span{display:block;margin:1px 0 0;font-size:8px}
  .stats .stat{display:flex;justify-content:center;gap:5px;border:1px solid #293e45;background:#0b171b}
  .stats .stat>span{display:none}
  .stats .stat small{font-size:7px;letter-spacing:.8px}
  .stats .stat strong{font-size:15px;line-height:1.05;white-space:nowrap}
  .stats .health-stat{min-width:0}
  .health-track{width:100%;min-width:58px}
  .health-damage{right:4px;top:0}
  .play-area{position:relative;display:block;flex:1 1 auto;min-height:0;overflow:hidden}
  .canvas-wrap{width:100%;height:100%;min-height:0}
  .canvas-wrap canvas{cursor:default;touch-action:none}
  .camera-help{display:none}
  .mobile-map-controls{
    position:absolute;z-index:44;left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));
    bottom:max(10px,env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px
  }
  .mobile-map-controls button{
    min-height:48px;padding:8px 5px;border:1px solid #6c8990;border-radius:5px;
    background:#09171ced;color:#e7f7f8;font:800 11px Inter;letter-spacing:.45px;box-shadow:0 6px 18px #0009
  }
  .mobile-map-controls button:first-child{border-color:#ffb13c;background:#30200dee;color:#ffe0a4}
  .mobile-map-controls button:last-child{border-color:#d97168;color:#ffc4bd}
  .touch-map-help{
    display:block;position:absolute;z-index:11;left:50%;bottom:calc(max(10px,env(safe-area-inset-bottom)) + 58px);
    width:max-content;max-width:calc(100% - 24px);transform:translateX(-50%);padding:6px 10px;
    border:1px solid #4d6b70;background:#071419d9;color:#c2dcdf;font:700 10px Inter;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none
  }
  .floor-manage{
    left:auto;right:max(10px,env(safe-area-inset-right));bottom:calc(max(10px,env(safe-area-inset-bottom)) + 112px);
    min-width:44px;min-height:44px
  }
  aside{
    position:absolute!important;z-index:60;left:50%!important;right:auto!important;bottom:0;
    width:min(860px,100%);height:min(76dvh,720px)!important;max-height:calc(var(--app-height,100dvh) - 20px);
    padding:0 16px max(18px,env(safe-area-inset-bottom))!important;overflow-x:hidden;overflow-y:auto;
    border:1px solid #526970!important;border-bottom:0!important;border-radius:20px 20px 0 0;
    background:linear-gradient(155deg,#18282e,#091317 78%);box-shadow:0 -20px 55px #000c;
    transform:translate(-50%,calc(100% + 24px));transition:transform .22s ease-out;will-change:transform;
    overscroll-behavior:contain;-webkit-overflow-scrolling:touch
  }
  aside.mobile-open{transform:translate(-50%,0)!important}
  .side-tabs{
    grid-template-columns:1fr 1fr auto;margin:0 -16px 14px;padding-top:5px;
    border-radius:20px 20px 0 0;background:#0b171b
  }
  .side-tabs button{min-height:50px;height:50px;font-size:14px}
  .side-tabs .mobile-drawer-close{
    display:block;min-width:78px;padding:0 12px;border-left:1px solid #354b52;color:#ffc1b9;font-size:11px
  }
  #shopPanel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:stretch}
  #shopPanel>.shop-heading,#shopPanel>.unit-limits,#shopPanel>.papaya-economy,#shopPanel>.placement-hint{grid-column:1/-1}
  .shop-heading{padding:2px 2px 12px}
  .shop-heading h2{font-size:27px}
  .tower-card,.papaya-card,.frost-card{
    grid-template-columns:118px minmax(0,1fr);min-height:126px;height:auto;margin:0;overflow:hidden;
    border-color:#50666d;background:#16272d
  }
  .tower-card:disabled{opacity:1}
  .tower-card:disabled .tower-copy{opacity:.52}
  .tower-preview{
    min-width:118px;isolation:isolate;overflow:hidden;
    background-size:100% 100%;image-rendering:auto;-webkit-font-smoothing:antialiased
  }
  .tower-preview i{z-index:0;width:88px;height:24px;bottom:12px}
  .mini-elephant{z-index:1;font-size:62px;line-height:1;filter:grayscale(.42) drop-shadow(0 6px 2px #0009)}
  .mini-papaya{font-size:64px}.watermelon-farm-preview .mini-watermelon{font-size:56px}
  .tower-copy{min-width:0;padding:15px 13px}
  .tower-copy strong{font-size:21px;line-height:1.03;letter-spacing:1px}
  .tower-copy small{display:block;margin-top:5px;font-size:11px;line-height:1.35}
  .price{margin-top:10px;font-size:20px}
  .mini-glasses{left:62px;top:58px;scale:1.18}
  .mini-food{right:10px;top:73px;scale:1.15}
  .mini-mask{left:62px;top:54px;scale:1.18}
  .mini-frost-spray{right:9px;top:32px;font-size:32px}
  .mini-snow{left:17px;right:12px;bottom:15px;scale:1.08}
  .mini-splash{right:11px;top:43px;font-size:32px}
  .robot-factory-preview:after{left:16px;right:15px;bottom:15px;height:16px}
  .robot-factory-preview .factory-building{left:34px;top:45px;scale:1.22}
  .robot-factory-preview .factory-stack{left:77px;top:27px;scale:1.22}
  .unit-limits{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}
  .unit-limits span{min-height:32px;padding:7px;font-size:9px}
  .legend,.tip{display:none}
  .wave-controls,.tower-stats{font-size:12px}
  .side-tabs button,.start-wave,.upgrade-block button,.sell-tower,.restart,.game-speed,.start-level-select,
  .owner-window button,.splash-specialization-grid button,.robot-specialization-grid button{
    min-height:44px
  }
  .wave-center{
    top:calc(env(safe-area-inset-top) + 78px);width:min(330px,calc(100vw - 24px));min-width:0;padding:6px 11px
  }
  .wave-center strong{font-size:16px}.wave-reward-notice{top:calc(env(safe-area-inset-top) + 116px)}
  .boss-health-hud{top:calc(env(safe-area-inset-top) + 120px)}
  .encyclopedia-badge{top:calc(env(safe-area-inset-top) + 7px);right:max(7px,env(safe-area-inset-right))}
  .achievement-popup{top:calc(env(safe-area-inset-top) + 84px)}
  .owner-modal,.achievements-modal,.encyclopedia-modal,.splash-specialization-modal,.robot-specialization-modal,.finale-cutscene{
    padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right))
      max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))
  }
  .owner-window,.achievements-window,.encyclopedia-window,.splash-specialization-window,.robot-specialization-window,.finale-scene{
    max-height:calc(var(--app-height,100dvh) - max(20px,env(safe-area-inset-top)) - max(20px,env(safe-area-inset-bottom)));
    overflow:auto;-webkit-overflow-scrolling:touch
  }
  .achievements-window,.encyclopedia-window{height:min(760px,calc(var(--app-height,100dvh) - 20px))}
  .debug-history{height:min(42dvh,360px)}
  .owner-window input,.owner-window button[type=submit],.debug-window form button{min-height:44px;font-size:16px}
  .splash-specialization-grid button,.robot-specialization-grid button{font-size:13px}
  .finale-scene{width:min(1100px,100%);height:min(720px,calc(var(--app-height,100dvh) - 20px))}
  .tutorial-panel{bottom:max(10px,env(safe-area-inset-bottom));max-height:calc(var(--app-height,100dvh) - 20px);overflow:auto}
}
@media(max-width:900px){
  header>div:first-child{display:none}
  .stats{grid-template-columns:repeat(4,minmax(70px,1fr)) repeat(3,minmax(78px,1fr))}
}
@media(max-width:620px){
  header{flex:0 0 98px;height:98px;padding:5px 7px}
  .stats{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:44px 42px;gap:4px}
  .pause-button,.encyclopedia-button,.achievements-button,.help-button{font-size:8px;padding:4px 3px}
  .stats .stat{padding:3px 4px}
  .stats .stat strong{font-size:14px}.stats .stat small{font-size:6px}
  .health-track{margin-top:3px}
  .wave-center{top:calc(env(safe-area-inset-top) + 102px)}
  .wave-reward-notice{top:calc(env(safe-area-inset-top) + 140px)}
  .boss-health-hud{top:calc(env(safe-area-inset-top) + 143px)}
  aside{width:100%;height:min(80dvh,680px)!important;padding-inline:12px!important}
  .side-tabs{margin-inline:-12px}
  #shopPanel{grid-template-columns:1fr;gap:10px}
  #shopPanel>.shop-heading,#shopPanel>.unit-limits,#shopPanel>.papaya-economy,#shopPanel>.placement-hint{grid-column:1}
  .tower-card,.papaya-card,.frost-card{grid-template-columns:108px minmax(0,1fr);min-height:118px}
  .tower-preview{min-width:108px}
  .tower-copy{padding:13px 12px}.tower-copy strong{font-size:20px}.tower-copy small{font-size:10.5px}
  .robot-factory-preview .factory-building{left:29px}.robot-factory-preview .factory-stack{left:72px}
  .mobile-map-controls{gap:5px}
  .mobile-map-controls button{min-height:46px;padding:6px 2px;font-size:9px}
  .touch-map-help{display:none}
  .floor-manage{bottom:calc(max(10px,env(safe-area-inset-bottom)) + 105px)}
  .unit-limits{grid-template-columns:1fr 1fr}
  .owner-window form,.owner-window>form,.debug-window form{flex-direction:column}
  .splash-specialization-grid,.robot-specialization-grid{grid-template-columns:1fr}
  .splash-specialization-grid button,.robot-specialization-grid button{min-height:76px}
  .encyclopedia-content{display:flex;flex-direction:column;overflow:auto}
  .encyclopedia-grid{overflow:visible;flex:0 0 auto}
  .encyclopedia-detail{display:block!important;overflow:visible;border-left:0;border-top:1px solid #2b4047;min-height:260px}
}
/* Keep the card art and copy self-contained when the shop becomes the mobile drawer. */
@media(max-width:1180px){
  #shopPanel{min-width:0}
  .tower-card,.papaya-card,.frost-card{min-width:0;max-width:100%}
  .tower-preview{min-width:0}
  .tower-preview .tower-art{width:100%!important;height:100%!important;max-width:100%;max-height:100%;object-fit:contain}
  .tower-copy{min-width:0;max-width:100%;overflow:hidden}
  .tower-copy strong,.tower-copy small,.tower-copy .price{min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:normal}
}
@media(max-width:620px){
  .tower-card,.papaya-card,.frost-card{grid-template-columns:clamp(92px,29vw,118px) minmax(0,1fr);min-height:118px}
  .tower-preview{width:100%;height:100%;min-height:118px}
  .tower-copy{padding:12px clamp(10px,3.5vw,14px)}
  .tower-copy strong{font-size:clamp(17px,5.25vw,20px);line-height:1.04;letter-spacing:.8px}
  .tower-copy small{font-size:clamp(9px,2.7vw,10.5px);line-height:1.35}
  .tower-copy .price{margin-top:7px;font-size:clamp(17px,5vw,20px)}
}
@media(max-width:360px){
  aside{padding-inline:9px!important}
  .side-tabs{margin-inline:-9px}
  .tower-card,.papaya-card,.frost-card{grid-template-columns:92px minmax(0,1fr)}
  .tower-copy{padding:11px 9px}
  .tower-copy strong{font-size:17px;letter-spacing:.55px}
}
@media(max-height:540px) and (max-width:1180px){
  header{flex:0 0 58px;height:58px;padding-block:4px}
  header>div:first-child{display:none}
  .stats{grid-template-columns:repeat(7,minmax(0,1fr));grid-template-rows:48px}
  .wave-center{top:calc(env(safe-area-inset-top) + 62px)}
  .wave-reward-notice{top:calc(env(safe-area-inset-top) + 99px)}
  .boss-health-hud{top:calc(env(safe-area-inset-top) + 101px)}
  aside{height:min(88dvh,460px)!important}
  .mobile-map-controls button{min-height:44px}
}

/* Difficulty is a required new-run decision, so it must sit above every game layer. */
.difficulty-modal{z-index:1000;pointer-events:auto}
.difficulty-modal.hidden{pointer-events:none}
.difficulty-hud{align-self:center;flex:0 0 auto;position:relative;display:flex;align-items:center;gap:7px;min-height:38px;margin:0 12px 0 auto;padding:0 11px;border:1px solid #58707a;background:#102128;color:#d4e5e9;font:800 10px Barlow Condensed,sans-serif;letter-spacing:1.2px;white-space:nowrap;cursor:help}.difficulty-hud b{font-size:14px;letter-spacing:1.4px}.difficulty-hud-icon{font-size:12px;color:#7faeb8}.difficulty-hud[data-difficulty="easy"]{border-color:#4ca875;background:#10291d;color:#bdf4ce}.difficulty-hud[data-difficulty="easy"] .difficulty-hud-icon{color:#6ee79a}.difficulty-hud[data-difficulty="normal"]{border-color:#4f8da2;background:#10232b;color:#c9edf6}.difficulty-hud[data-difficulty="normal"] .difficulty-hud-icon{color:#65cae8}.difficulty-hud[data-difficulty="hard"]{border-color:#d16b4f;background:#321812;color:#ffd1c3}.difficulty-hud[data-difficulty="hard"] .difficulty-hud-icon{color:#ff8c69}.difficulty-hud:focus{outline:2px solid #d8faff;outline-offset:2px}.difficulty-hud:after{content:'Difficulty is locked for this run.';position:absolute;z-index:80;top:calc(100% + 7px);left:50%;transform:translateX(-50%);width:max-content;max-width:200px;padding:6px 8px;border:1px solid #49636a;background:#071216;color:#d8f1f5;font:700 9px Inter,sans-serif;letter-spacing:0;white-space:normal;opacity:0;pointer-events:none;transition:opacity .15s}.difficulty-hud:hover:after,.difficulty-hud:focus:after{opacity:1}@media(max-width:900px){.difficulty-hud{order:2;margin:0;justify-self:start}.stats{order:3}}@media(max-width:620px){.difficulty-hud{position:absolute;left:7px;bottom:5px;min-height:24px;padding:0 7px;margin:0;font-size:8px;letter-spacing:.8px}.difficulty-hud b{font-size:10px}.difficulty-hud-icon{font-size:9px}.difficulty-hud:after{left:0;transform:none;top:auto;bottom:calc(100% + 5px)}}
@media(max-width:620px){header{flex-basis:130px;height:130px}.stats{height:72px;align-self:flex-start;grid-template-rows:34px 34px}.wave-center{top:134px}.wave-reward-notice{top:172px}.boss-health-hud{top:175px}}
/* Multi-map selection */
.map-selection-button{min-height:48px;padding:0 14px;border:1px solid #69dcea;background:#102d35;color:#bff9ff;font:800 11px Inter;letter-spacing:1px}
.map-selection-modal{position:fixed;inset:0;z-index:9400;display:grid;place-items:center;padding:18px;background:#030a0de8;backdrop-filter:blur(8px)}
.map-selection-modal.hidden{display:none}
.map-selection-window{width:min(980px,100%);max-height:calc(100dvh - 36px);overflow:auto;border:1px solid #55727b;background:#102025;color:#eaffff;box-shadow:0 24px 80px #000c}
.map-selection-window>header{display:flex;justify-content:space-between;gap:20px;padding:22px;border-bottom:1px solid #405a62}.map-selection-window h2{margin:4px 0;font:900 clamp(24px,4vw,42px) Oswald,Inter}.map-selection-window header p{margin:0;color:#9ab2b9}.map-selection-window header button{width:44px;height:44px;border:1px solid #607a82;background:#172c32;color:white;font-size:24px}
.map-selection-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;padding:22px}.map-card{min-width:0;border:1px solid #496169;background:#14262c;overflow:hidden}.map-card.locked{filter:saturate(.35)}.map-preview{position:relative;height:170px;overflow:hidden;background:linear-gradient(145deg,#192d29,#283c36)}.map-card.frozen .map-preview{background:linear-gradient(145deg,#d7edf2,#679bad)}.map-preview:before{content:"";position:absolute;inset:48% -10% auto;height:54px;border:18px solid #36484d;border-radius:50%;transform:rotate(-8deg)}.map-card.frozen .map-preview:before{border-color:#395f73;transform:rotate(12deg)}.map-card.frozen .map-preview i,.map-card.frozen .map-preview b,.map-card.frozen .map-preview span{position:absolute;display:block;background:#9cecff;clip-path:polygon(50% 0,100% 100%,0 100%);filter:drop-shadow(0 0 9px #6ceaff)}.map-card.frozen .map-preview i{width:35px;height:70px;left:16%;bottom:8px}.map-card.frozen .map-preview b{width:52px;height:100px;right:18%;bottom:0}.map-card.frozen .map-preview span{width:25px;height:48px;right:42%;top:18px}.map-card-copy{padding:18px}.map-card-copy h3{margin:4px 0 8px;font:900 27px Oswald,Inter}.map-card-copy p{min-height:45px;color:#a9bec4}.map-card-copy dl{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.map-card-copy dl div{padding:8px;background:#0c181c}.map-card-copy dt{font-size:8px;color:#7f9da6}.map-card-copy dd{margin:3px 0 0;font:800 11px Inter}.map-card-copy em{display:block;min-height:36px;margin:10px 0;color:#ffd37a;font-style:normal;font-size:11px}.map-card-copy>button{width:100%;min-height:48px;border:1px solid #59dbe8;background:#123c45;color:#d9fdff;font:900 13px Inter;letter-spacing:1px}.map-card-copy>button:disabled{border-color:#58646a;background:#252e32;color:#849095}.difficulty-meter{display:grid;grid-template-columns:repeat(3,1fr);margin:10px 0;border:1px solid #52666d}.difficulty-meter span{padding:6px;text-align:center;font:800 8px Inter;color:#61767e}.difficulty-meter[data-difficulty=easy] span:first-child{background:#276a49;color:#caffdf}.difficulty-meter[data-difficulty=normal] span:nth-child(2){background:#315c75;color:#d8f2ff}.difficulty-meter[data-difficulty=hard] span:last-child{background:#813c2d;color:#ffe1d4}
body[data-map-theme=frozen] header{background:linear-gradient(90deg,#142a34,#294d5d)}body[data-map-theme=frozen] .canvas-wrap{background:#6f91a3}body[data-map-theme=frozen] .eyebrow{color:#a8efff}
@media(max-width:720px){.map-selection-grid{grid-template-columns:1fr;padding:12px}.map-selection-window>header{padding:15px}.map-preview{height:130px}.map-card-copy dl{grid-template-columns:1fr}.map-card-copy p{min-height:0}.map-selection-button{min-height:44px}}
.map-card-copy .map-puddle-info{min-height:0;margin:8px 0 12px;padding:8px 9px;border-left:3px solid #8cecff;background:#0d2b35;color:#d7faff;font-size:11px;line-height:1.35}

/* Frozen Expanse opening cinematic — visual storytelling only, with no captions. */
.ice-opening-cutscene{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));overflow:hidden;background:#01070cf5}.ice-opening-cutscene.hidden{display:none}.ice-opening-scene{position:relative;width:min(1100px,100%);height:min(680px,calc(100dvh - 16px));overflow:hidden;border:1px solid #80dff3;background:linear-gradient(#173544,#07141d 68%,#091117 68%);box-shadow:0 0 70px #3ccdf055,inset 0 0 80px #000;isolation:isolate}.ice-opening-scene:after{content:"";position:absolute;z-index:90;inset:0;background:#000;opacity:0;pointer-events:none;transition:opacity 1.35s}.ice-opening-scene[data-phase=fade]:after{opacity:1}.ice-cutscene-controls{position:absolute;z-index:100;right:clamp(10px,2vw,24px);top:clamp(10px,2vw,22px);display:flex;align-items:center;gap:5px}.ice-cutscene-speed,.skip-ice-opening{min-height:42px;border:1px solid #b8f5ff;background:#061921dc;color:#eaffff;font:900 11px Inter;letter-spacing:1.1px;cursor:pointer}.ice-cutscene-speed{min-width:42px;padding:0 8px}.ice-cutscene-speed.active{border-color:#fff;background:#176071;color:#fff;box-shadow:0 0 12px #76efff99}.skip-ice-opening{min-width:92px;padding:0 13px;letter-spacing:1.4px}.ice-cutscene-speed:focus-visible,.skip-ice-opening:focus-visible{outline:2px solid white;outline-offset:3px}
.ice-base-exterior{position:absolute;z-index:30;inset:0;background:radial-gradient(circle at 51% 45%,#5489a1 0 8%,transparent 9%),linear-gradient(155deg,transparent 0 24%,#dceff2 25% 42%,#527386 43% 45%,#e6f6f7 46% 58%,#5b7b8b 59% 61%,#d8edf1 62%);opacity:0;transform:scale(1.4);transition:opacity .8s,transform 4.2s ease-in}.ice-opening-scene[data-phase=arrival] .ice-base-exterior{opacity:1;transform:scale(1)}.ice-base-exterior:before{content:"";position:absolute;left:38%;top:27%;width:24%;height:47%;border:9px solid #253e4a;border-bottom:0;border-radius:48% 48% 0 0;background:linear-gradient(90deg,#1d3440,#477181 48%,#1a323d 52%);box-shadow:0 0 24px #8ceeff88}.ice-base-exterior i,.ice-base-exterior b,.ice-base-exterior em{position:absolute;display:block;background:#b7f3ff;clip-path:polygon(50% 0,100% 100%,0 100%);filter:drop-shadow(0 0 12px #64dfff)}.ice-base-exterior i{left:12%;bottom:8%;width:13%;height:48%}.ice-base-exterior b{right:11%;bottom:3%;width:18%;height:63%}.ice-base-exterior em{right:28%;top:8%;width:8%;height:31%}
.ice-lab-wall{position:absolute;inset:0;background:repeating-linear-gradient(90deg,transparent 0 15%,#9deaff12 15.2% 15.5%),repeating-linear-gradient(0deg,transparent 0 26%,#b8f7ff12 26.2% 26.6%)}.ice-lab-wall:before{content:"";position:absolute;inset:7% 4% 29%;border:4px solid #294b59;border-radius:20px;background:linear-gradient(100deg,#17303b,#274b59 48%,#122832);box-shadow:inset 0 0 50px #75ddff22}.ice-lab-light{position:absolute;z-index:2;top:4%;width:31%;height:2.2%;background:#d8ffff;box-shadow:0 0 22px 9px #61dfff88}.ice-lab-light-a{left:10%}.ice-lab-light-b{right:10%}.ice-lab-frost{position:absolute;z-index:4;left:0;right:0;bottom:0;height:19%;background:radial-gradient(ellipse at 10% 100%,#eefeff 0 18%,transparent 19%),radial-gradient(ellipse at 42% 110%,#c9f4fa 0 24%,transparent 25%),radial-gradient(ellipse at 85% 105%,#e8fdff 0 23%,transparent 24%);opacity:.8}
.ice-monitor{position:absolute;z-index:7;left:7%;top:19%;width:17%;height:25%;border:6px solid #203640;background:#07141b;box-shadow:0 8px 0 #132831,0 0 20px #50d9ff44}.ice-monitor:after{content:"";position:absolute;left:36%;top:100%;width:28%;height:34%;background:#233b45}.ice-monitor i,.ice-monitor b,.ice-monitor em{position:absolute;left:10%;right:10%;height:3px;background:#5cf2ff;box-shadow:0 0 7px #5cf2ff}.ice-monitor i{top:25%;transform:rotate(-8deg)}.ice-monitor b{top:48%;width:60%;transform:rotate(12deg)}.ice-monitor em{top:70%;width:42%}
.ice-injection-table{position:absolute;z-index:10;left:31%;top:48%;width:29%;height:13%;border:5px solid #42606a;background:linear-gradient(#8db1ba,#3d5962);box-shadow:0 15px 0 #243943}.ice-injection-table i{position:relative;display:inline-block;width:5%;height:58%;margin:-11% 5% 0 11%;border:2px solid #bff8ff;border-radius:8px 8px 3px 3px;background:linear-gradient(transparent 35%,#47dfff 36%);box-shadow:0 0 8px #50ddff}.ice-injection-table b{position:absolute;right:7%;top:-45%;width:28%;height:20%;border:3px solid #9cbdc5;background:#263d46;transform:rotate(-18deg)}
.ice-scientist{position:absolute;z-index:15;left:59%;top:31%;width:10.5%;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 35% 28%,#fff,#dde5e9 20%,#81919b 65%,#26323b);box-shadow:0 0 18px #dbfbff;transition:transform .6s}.ice-scientist:before,.ice-scientist:after{content:"";position:absolute;left:-30%;top:40%;width:160%;height:20%;border:7px solid #eefcff;border-radius:50%;transform:rotate(-18deg)}.ice-scientist:after{transform:rotate(37deg)}.ice-scientist i,.ice-scientist b{position:absolute;z-index:3;top:35%;width:9%;height:9%;border-radius:50%;background:#79edff;box-shadow:0 0 8px #54eaff}.ice-scientist i{left:29%}.ice-scientist b{right:29%}.ice-scientist em{position:absolute;z-index:5;right:91%;top:72%;width:48%;height:9%;border-radius:8px;background:#d5f8ff;transform-origin:right center;transform:rotate(-24deg)}
.ice-chambers{position:absolute;z-index:8;right:4%;top:15%;display:flex;gap:1.3vw;width:26%;height:36%}.ice-chamber{position:relative;flex:1;border:4px solid #527887;border-radius:44px 44px 10px 10px;background:linear-gradient(90deg,#a5f4ff14,#cfffff35,#86d7e711);box-shadow:inset 0 0 18px #9ff5ff44}.ice-chamber:after{content:"";position:absolute;left:18%;right:18%;bottom:10%;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 35% 28%,#fff,var(--subject,#aa7250) 25%,#2c3d46 80%);box-shadow:0 0 10px var(--subject,#8ecfff)}.ice-chamber:nth-child(1){--subject:#a66b45}.ice-chamber:nth-child(2){--subject:#b9c8ce}.ice-chamber:nth-child(3){--subject:#8f62c9}.ice-chamber i{position:absolute;left:20%;right:20%;bottom:2%;height:8%;background:#4f6c77}
.ice-subject{position:absolute;z-index:19;left:49%;top:37%;width:7.5%;aspect-ratio:1;border-radius:50%;opacity:0;background:radial-gradient(circle at 33% 27%,#fff,#a8754d 27%,#452a20 75%);box-shadow:0 0 16px #8eeaff;transform-origin:50% 100%}.ice-opening-scene[data-phase^=failed] .failed-subject{opacity:1;animation:iceFailedSubject 2.1s ease both}.ice-opening-scene[data-phase=failed-two] .failed-subject{filter:hue-rotate(85deg)}.ice-opening-scene[data-phase=failed-three] .failed-subject{filter:hue-rotate(190deg)}@keyframes iceFailedSubject{0%,12%{transform:translateY(0) scale(1)}20%,42%{transform:translate(-5px,0) rotate(-8deg) scale(1.05)}28%,50%{transform:translate(6px,1px) rotate(8deg)}75%,100%{transform:translateY(24px) scaleY(.35);opacity:.15}}
.shield-subject,.snow-subject{left:48%;top:34%;background:radial-gradient(circle at 35% 28%,#fff,#bf2f43 25%,#4f0d19 75%)}.shield-subject:before,.test-shield-orb:before{content:"";position:absolute;inset:-8%;border:3px solid #e7ffff;border-radius:50%;background:radial-gradient(circle at 32% 22%,#ffffffaa,#91e8f344 38%,#55b9ca33 75%);box-shadow:inset 0 0 14px #dcffff,0 0 15px #7beeff}.snow-subject{left:52%;background:radial-gradient(circle at 35% 28%,#fff,#ba3044 25%,#590d1b 75%)}.snow-subject:before,.test-snow-orb:before{content:"";position:absolute;left:-8%;right:-8%;top:-16%;height:42%;border-radius:60% 50% 35% 35%;background:#f4ffff;box-shadow:0 3px 0 #b8dbe3,0 0 8px #fff}.ice-opening-scene[data-phase=shield-create] .shield-subject,.ice-opening-scene[data-phase=success] .shield-subject{opacity:1;animation:iceSurvive 1.4s ease}.ice-opening-scene[data-phase=snow-create] .snow-subject,.ice-opening-scene[data-phase=success] .snow-subject{opacity:1;animation:iceSurvive 1.4s ease}.ice-opening-scene[data-phase=shield-create] .ice-scientist,.ice-opening-scene[data-phase=snow-create] .ice-scientist{transform:translateX(-6%) rotate(-4deg)}@keyframes iceSurvive{0%,55%{transform:translateX(-4px) rotate(-8deg)}15%,70%{transform:translateX(5px) rotate(8deg)}100%{transform:none}}
.ice-recording{position:absolute;z-index:20;left:66%;top:54%;width:8%;height:11%;border:3px solid #b9e8ee;background:#203941;opacity:0;transform:rotate(9deg)}.ice-recording i,.ice-recording b{position:absolute;left:15%;right:15%;height:3px;background:#6ff3ff}.ice-recording i{top:32%}.ice-recording b{top:61%;right:35%}.ice-opening-scene:is([data-phase=shield-create],[data-phase=snow-create],[data-phase=success]) .ice-recording{opacity:1}
.ice-test-area{position:absolute;z-index:25;left:10%;right:10%;bottom:8%;height:40%;border:5px solid #5b8999;border-radius:14px;background:linear-gradient(#0c2733cc,#07171ecc);box-shadow:inset 0 0 30px #68e8ff22;opacity:0;pointer-events:none}.ice-opening-scene:is([data-phase=freeze-test],[data-phase=shield-hit-one],[data-phase=shield-hit-two]) .ice-test-area{opacity:1}.captive-elephant{position:absolute;left:17%;bottom:17%;width:16%;height:43%;border-radius:48% 52% 42% 45%;background:#75b9ce;box-shadow:inset -12px -8px #346d83}.captive-elephant:before{content:"";position:absolute;right:-38%;top:30%;width:52%;height:20%;border:10px solid #75b9ce;border-left:0;border-radius:0 20px 35px 0;transform:rotate(15deg)}.captive-elephant i{position:absolute;right:16%;top:24%;width:7%;aspect-ratio:1;border-radius:50%;background:#07151c}.captive-elephant b,.captive-elephant em{position:absolute;bottom:-18%;width:22%;height:34%;border-radius:0 0 12px 12px;background:#5c9db3}.captive-elephant b{left:14%}.captive-elephant em{right:17%}.test-snow-orb,.test-shield-orb{position:absolute;right:20%;bottom:30%;width:12%;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 32% 25%,#fff,#b92d42 25%,#4b0b17 78%);opacity:0}.ice-opening-scene[data-phase=freeze-test] .test-snow-orb{opacity:1}.ice-opening-scene:is([data-phase=shield-hit-one],[data-phase=shield-hit-two]) .test-shield-orb{opacity:1}.freeze-sheet{position:absolute;left:13%;bottom:9%;width:24%;height:60%;border-radius:45%;background:linear-gradient(135deg,#e8ffff99,#72d7ed99);border:3px solid #d8ffff;box-shadow:0 0 25px #88eeff;opacity:0;transform:scale(.2);transform-origin:65% 50%}.ice-opening-scene[data-phase=freeze-test] .freeze-sheet{animation:freezeCaptive 3.3s ease forwards}@keyframes freezeCaptive{0%,25%{opacity:0;transform:scale(.2)}60%,100%{opacity:.9;transform:scale(1)}}.ice-opening-scene[data-phase=freeze-test] .captive-elephant{animation:elephantAlarm 1.2s ease 2}@keyframes elephantAlarm{50%{transform:translateX(-7px) rotate(-3deg)}}
.ice-opening-scene[data-phase=shield-hit-one] .test-shield-orb:after,.ice-opening-scene[data-phase=shield-hit-two] .test-shield-orb:after{content:"";position:absolute;left:52%;top:2%;width:2px;height:90%;background:#285f71;box-shadow:7px 18px #285f71,-8px 34px #285f71;transform:rotate(23deg)}.ice-opening-scene[data-phase=shield-hit-one] .captive-elephant:before,.ice-opening-scene[data-phase=shield-hit-two] .captive-elephant:before{animation:elephantStrike 1s ease}@keyframes elephantStrike{50%{transform:translate(22px,-3px) rotate(-10deg)}}.shield-fragments{position:absolute;right:15%;bottom:22%;width:22%;height:42%;opacity:0}.shield-fragments i{position:absolute;left:50%;top:50%;width:13px;height:8px;background:#c9faff;clip-path:polygon(0 0,100% 20%,55% 100%);animation:iceFragmentFall 2s ease forwards}.shield-fragments i:nth-child(2){--x:45px;--r:80deg}.shield-fragments i:nth-child(3){--x:-48px;--r:-100deg}.shield-fragments i:nth-child(4){--x:24px;--r:150deg}.shield-fragments i:nth-child(5){--x:-25px;--r:-140deg}.shield-fragments i:nth-child(6){--x:68px;--r:220deg}.ice-opening-scene[data-phase=shield-hit-two] .test-shield-orb:before{opacity:0}.ice-opening-scene[data-phase=shield-hit-two] .shield-fragments{opacity:1}@keyframes iceFragmentFall{to{transform:translate(var(--x,-60px),100px) rotate(var(--r,55deg));opacity:0}}
.ice-opening-scene[data-phase=arrival] .ice-lab-wall,.ice-opening-scene[data-phase=arrival] .ice-lab-light,.ice-opening-scene[data-phase=arrival] .ice-lab-frost,.ice-opening-scene[data-phase=arrival] .ice-monitor,.ice-opening-scene[data-phase=arrival] .ice-injection-table,.ice-opening-scene[data-phase=arrival] .ice-scientist,.ice-opening-scene[data-phase=arrival] .ice-chambers{opacity:0}.ice-opening-scene[data-phase=success] .shield-subject{left:43%;top:38%}.ice-opening-scene[data-phase=success] .snow-subject{left:55%;top:38%}.ice-opening-scene[data-phase=success] .ice-scientist{transform:translate(-8%,4%) scale(1.05)}
.replay-ice-opening{margin-top:8px;border-color:#8cecff!important;background:#0d303b!important;color:#dcfbff!important;pointer-events:auto;position:relative;z-index:2}.map-card-copy>.replay-ice-opening{min-height:40px}.ice-opening-replay-notice{margin:10px 0 0;padding:9px 12px;border:1px solid #ffb875;background:#351b13;color:#ffe3bf;font:800 11px Inter;letter-spacing:.8px;text-align:center}
@media(max-width:700px){.ice-opening-scene{height:min(620px,calc(100dvh - 16px))}.ice-chambers{right:2%;width:30%}.ice-monitor{left:3%;width:20%}.ice-scientist{width:14%;left:57%}.ice-injection-table{left:27%;width:34%}.ice-test-area{left:3%;right:3%;height:42%}.captive-elephant{left:11%;width:22%}.test-snow-orb,.test-shield-orb{right:14%;width:17%}.ice-subject{width:11%}.skip-ice-opening{min-width:74px;min-height:38px;font-size:9px}}
@media(prefers-reduced-motion:reduce){.ice-opening-scene *{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
.ice-scientist em:after{content:"";position:absolute;right:88%;top:-45%;width:80%;height:180%;border:2px solid #d8fbff;border-radius:4px;background:linear-gradient(90deg,#42dff0 0 55%,#eaffff 56% 78%,transparent 79%);box-shadow:0 0 7px #59e9ff}.ice-opening-scene:is([data-phase^=failed],[data-phase=shield-create],[data-phase=snow-create]) .ice-scientist em{animation:iceInjection .9s ease-in-out 2}@keyframes iceInjection{50%{transform:translate(-20px,11px) rotate(-9deg)}}
.shield-subject{background:radial-gradient(circle at 35% 28%,#d9c9ff,#41355f 28%,#130d29 76%)}.test-shield-orb{background:radial-gradient(circle at 32% 25%,#d9c9ff,#41355f 28%,#130d29 78%)}
/* Ice opening revision: the scientist is a close-banded Platinum Ring Orb,
   while each trial is staged inside its own readable chamber. */
.ice-scientist.platinum{background:radial-gradient(circle at 31% 23%,#fff 0 7%,#dbe4eb 19%,#7d8c98 51%,#182027 88%);box-shadow:inset -9px -10px 14px #0a141b88,0 0 13px #bceeff66}.ice-scientist.platinum:before,.ice-scientist.platinum:after{left:5%;top:34%;width:90%;height:29%;border:3px solid #f4fafb;border-left-color:#8799a1;border-right-color:#fff;border-radius:50%;box-shadow:0 2px 3px #101a20;transform:rotate(-18deg)}.ice-scientist.platinum:after{top:48%;transform:rotate(24deg)}.ice-scientist.platinum i,.ice-scientist.platinum b{display:block;z-index:3;left:9%;right:auto;top:43%;width:82%;height:18%;border:3px solid #cbd7dc;border-top-color:#fff;border-bottom-color:#60727b;border-radius:50%;background:transparent;box-shadow:none;transform:rotate(66deg)}.ice-scientist.platinum b{top:38%;transform:rotate(-61deg)}.ice-scientist.platinum em{right:91%;top:72%;width:48%;height:9%;background:#d5f8ff;box-shadow:none}.ice-scientist-speech{position:absolute;z-index:35;left:51%;top:13%;max-width:min(36%,360px);padding:12px 15px;border:2px solid #d9f6fb;border-radius:15px 15px 15px 3px;background:#0b2029ed;color:#effdff;font:800 clamp(11px,1.5vw,16px)/1.35 Inter;opacity:0;transform:translateY(8px);transition:opacity .35s ease,transform .35s ease;pointer-events:none}.ice-scientist-speech:before{content:"";position:absolute;right:20%;bottom:-11px;border:10px solid transparent;border-top-color:#d9f6fb}.ice-scientist-speech:after{content:attr(data-text);position:absolute}.ice-opening-scene[data-dialogue]:not([data-dialogue=""]) .ice-scientist-speech{opacity:1;transform:none}.ice-scientist-speech{font-size:0}.ice-scientist-speech:after{position:static;content:attr(data-dialogue);font:inherit}.ice-chamber:after{display:none}.ice-chamber{overflow:visible;transition:transform .5s ease,filter .25s}.chamber-orb{position:absolute;z-index:2;left:22%;right:22%;bottom:13%;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 32% 25%,#fff 0 8%,var(--subject) 28%,#20313b 82%);box-shadow:0 0 10px var(--subject)}.chamber-remains{position:absolute;z-index:3;left:23%;right:18%;bottom:10%;height:13%;opacity:0;background:radial-gradient(ellipse,#b9e6f4 0 18%,transparent 20%),radial-gradient(ellipse at 35% 70%,#708c9a 0 17%,transparent 19%),radial-gradient(ellipse at 78% 80%,#ccecf4 0 13%,transparent 15%)}.ice-chamber strong{position:absolute;z-index:5;left:50%;bottom:-21%;width:150%;transform:translateX(-50%);color:#ff6969;font:900 clamp(7px,.8vw,10px) Inter;letter-spacing:.7px;text-align:center;opacity:0;text-shadow:0 0 8px #ff2a2a}.ice-opening-scene[data-phase=failed-one] .failed-one,.ice-opening-scene[data-phase=failed-two] .failed-two,.ice-opening-scene[data-phase=failed-three] .failed-three{transform:scale(1.16);filter:drop-shadow(0 0 14px #ff3b3b)}.ice-opening-scene[data-phase=failed-one] .failed-one .chamber-orb,.ice-opening-scene[data-phase=failed-two] .failed-two .chamber-orb,.ice-opening-scene[data-phase=failed-three] .failed-three .chamber-orb{animation:trialFailure 4s ease both}.ice-opening-scene[data-phase=failed-one] .failed-one strong,.ice-opening-scene[data-phase=failed-two] .failed-two strong,.ice-opening-scene[data-phase=failed-three] .failed-three strong{animation:trialFailureLabel 4s ease both}.ice-opening-scene[data-phase=failed-one] .failed-one .chamber-remains,.ice-opening-scene[data-phase=failed-two] .failed-two .chamber-remains,.ice-opening-scene[data-phase=failed-three] .failed-three .chamber-remains{animation:trialRemains 4s ease both}.ice-opening-scene[data-phase=failed-two] .failed-one .chamber-orb,.ice-opening-scene[data-phase=failed-three] .failed-one .chamber-orb,.ice-opening-scene[data-phase=failed-three] .failed-two .chamber-orb{opacity:0}.ice-opening-scene[data-phase=failed-two] .failed-one .chamber-remains,.ice-opening-scene[data-phase=failed-three] .failed-one .chamber-remains,.ice-opening-scene[data-phase=failed-three] .failed-two .chamber-remains{opacity:1}.ice-opening-scene[data-phase^=failed] .ice-chamber{border-color:#d95c62;background:linear-gradient(90deg,#6d1119aa,#26141bdd,#74161c99);box-shadow:inset 0 0 18px #ff434477,0 0 8px #ff3e3e66}.ice-opening-scene[data-phase^=failed] .ice-chamber:not(.failed-one):not(.failed-two):not(.failed-three){border-color:#527887}@keyframes trialFailure{0%,15%{opacity:1;transform:none;box-shadow:0 0 10px var(--subject)}22%,47%{opacity:1;transform:translateX(-8px) rotate(-10deg) scale(1.07);box-shadow:inset 0 0 0 2px #d7ffff,0 0 18px #7cf5ff}32%,58%{transform:translateX(8px) rotate(10deg);background:radial-gradient(circle at 30% 25%,#efffff 0 4%,#82dff0 6%,#23313d 50%,#081117 85%);box-shadow:inset 0 0 0 2px #d7ffff,0 0 20px #73edff}72%,100%{opacity:0;transform:scale(.32);box-shadow:none}}@keyframes trialRemains{0%,66%{opacity:0}76%,100%{opacity:1}}@keyframes trialFailureLabel{0%,18%{opacity:0}26%,72%{opacity:1}100%{opacity:0}}
.failed-subject{display:none!important}.shield-subject:before,.test-shield-orb:before{inset:0;border:2px solid #dffcff;background:radial-gradient(circle at 32% 22%,#ffffff99,#91e8f333 45%,#55b9ca20 82%);box-shadow:inset 0 0 9px #dcffff}.test-shield-orb:before{content:""}.ice-opening-scene[data-phase=freeze-result] .ice-test-area{opacity:1}.ice-opening-scene[data-phase=freeze-result] .test-snow-orb{opacity:1}.ice-opening-scene[data-phase=freeze-result] .freeze-sheet{opacity:.9;transform:scale(1)}
.ice-scientist-speech:after{font:800 clamp(11px,1.5vw,16px)/1.35 Inter}.ice-scientist.platinum em{left:87%;right:auto;top:67%;width:76%;transform-origin:left center;transform:rotate(-18deg)}.ice-scientist.platinum em:after{left:88%;right:auto;top:-45%}.ice-opening-scene:is([data-phase^=failed],[data-phase=shield-create],[data-phase=snow-create]) .ice-scientist.platinum em{animation:iceInjectionRight .9s ease-in-out 2}@keyframes iceInjectionRight{50%{transform:translate(18px,9px) rotate(-9deg)}}
.ice-opening-characters{position:absolute;z-index:18;inset:0;width:100%;height:100%;pointer-events:none}.ice-opening-scene .ice-scientist.platinum,.ice-opening-scene .captive-elephant{visibility:hidden}.ice-opening-scene .shield-subject,.ice-opening-scene .snow-subject,.ice-opening-scene .test-snow-orb,.ice-opening-scene .test-shield-orb{visibility:hidden}.ice-opening-scene .ice-scientist-speech{z-index:36;left:57%;top:8%;max-width:min(31%,320px)}.ice-opening-scene .ice-test-area{z-index:17}.ice-opening-scene .ice-chambers{z-index:20}.ice-opening-scene .ice-injection-table{top:65%}
.ice-opening-injection{position:absolute;z-index:21;inset:0;width:100%;height:100%;pointer-events:none}.ice-opening-scene[data-phase=failed-one]:not([data-injection-complete=true]) .failed-one,.ice-opening-scene[data-phase=failed-two]:not([data-injection-complete=true]) .failed-two,.ice-opening-scene[data-phase=failed-three]:not([data-injection-complete=true]) .failed-three{transform:none;filter:none}.ice-opening-scene[data-phase=failed-one]:not([data-injection-complete=true]) .failed-one .chamber-orb,.ice-opening-scene[data-phase=failed-two]:not([data-injection-complete=true]) .failed-two .chamber-orb,.ice-opening-scene[data-phase=failed-three]:not([data-injection-complete=true]) .failed-three .chamber-orb,.ice-opening-scene[data-phase=failed-one]:not([data-injection-complete=true]) .failed-one strong,.ice-opening-scene[data-phase=failed-two]:not([data-injection-complete=true]) .failed-two strong,.ice-opening-scene[data-phase=failed-three]:not([data-injection-complete=true]) .failed-three strong,.ice-opening-scene[data-phase=failed-one]:not([data-injection-complete=true]) .failed-one .chamber-remains,.ice-opening-scene[data-phase=failed-two]:not([data-injection-complete=true]) .failed-two .chamber-remains,.ice-opening-scene[data-phase=failed-three]:not([data-injection-complete=true]) .failed-three .chamber-remains{animation:none}.ice-opening-scene[data-phase^=failed]:not([data-injection-complete=true]) .ice-chamber{border-color:#527887;background:linear-gradient(90deg,#a5f4ff14,#cfffff35,#86d7e711);box-shadow:inset 0 0 18px #9ff5ff44}
.ice-injection-table{display:flex;align-items:center;justify-content:space-around;padding:0 7%;overflow:visible}.ice-injection-table i{position:relative;display:block;flex:0 0 11%;width:11%;height:56%;margin:0;border:2px solid #bff8ff;border-radius:8px 8px 3px 3px;background:linear-gradient(transparent 35%,#47dfff 36%);box-shadow:0 0 8px #50ddff;transform:rotate(-15deg);transition:opacity .25s ease,filter .25s ease}.ice-injection-table b{display:none}.ice-used-syringes{position:absolute;z-index:11;left:32%;top:80%;display:flex;gap:4px;width:18%;height:5%;padding:4px 7px;border:1px dashed #55727b;background:#081318aa}.ice-used-syringes i{display:block;flex:1;border:1px solid #78949c;border-radius:4px;background:#1c2f34;opacity:0;transform:rotate(12deg)}.ice-opening-scene[data-syringes-used="1"] .ice-injection-table i:nth-of-type(1),.ice-opening-scene[data-syringes-used="2"] .ice-injection-table i:nth-of-type(-n+2),.ice-opening-scene[data-syringes-used="3"] .ice-injection-table i:nth-of-type(-n+3),.ice-opening-scene[data-syringes-used="4"] .ice-injection-table i:nth-of-type(-n+4),.ice-opening-scene[data-syringes-used="5"] .ice-injection-table i:nth-of-type(-n+5){opacity:.08;filter:grayscale(1)}.ice-opening-scene[data-syringes-used="1"] .ice-used-syringes i:nth-of-type(1),.ice-opening-scene[data-syringes-used="2"] .ice-used-syringes i:nth-of-type(-n+2),.ice-opening-scene[data-syringes-used="3"] .ice-used-syringes i:nth-of-type(-n+3),.ice-opening-scene[data-syringes-used="4"] .ice-used-syringes i:nth-of-type(-n+4),.ice-opening-scene[data-syringes-used="5"] .ice-used-syringes i:nth-of-type(-n+5){opacity:1}

/* Formula refinement reuses the original three pods in their established
   positions. Each batch fades into those same stands; no extra pod row exists. */
.ice-refinement-table{position:absolute;z-index:16;left:7%;top:54%;width:25%;height:13%;display:flex;align-items:center;justify-content:space-around;padding:0 5%;border:5px solid #42606a;background:linear-gradient(#8db1ba,#3d5962);box-shadow:0 15px 0 #243943;opacity:0;visibility:hidden;pointer-events:none}.ice-refinement-table b{position:absolute;left:8%;top:-60%;width:24%;height:55%;border:3px solid #c5f7ff;border-radius:45% 45% 30% 30%;background:radial-gradient(circle at 50% 58%,#65e9ff 0 18%,#143541 20% 50%,transparent 52%);box-shadow:0 0 13px #63eaff}.ice-refinement-table em{position:absolute;left:18%;top:-82%;width:5%;height:24%;border-radius:50%;background:#d9feff;box-shadow:0 0 12px 6px #64eaff;opacity:0}.ice-refinement-table i{position:relative;display:block;flex:0 0 9%;width:9%;height:56%;margin:0;border:2px solid #bff8ff;border-radius:8px 8px 3px 3px;background:linear-gradient(transparent 35%,#47dfff 36%);box-shadow:0 0 8px #50ddff;transform:rotate(-15deg);transition:opacity .25s ease,filter .25s ease}.ice-opening-scene:is([data-phase=formula-refinement],[data-phase=refinement-batch-one-prep],[data-phase=refinement-one-a],[data-phase=refinement-one-b],[data-phase=refinement-one-c],[data-phase=refinement-transition],[data-phase=refinement-batch-two-prep],[data-phase=refinement-two-a],[data-phase=refinement-two-b],[data-phase=refinement-two-c],[data-phase=final-refinement],[data-phase=refinement-final-prep],[data-phase=refinement-final-a],[data-phase=refinement-final-b],[data-phase=refinement-final-c]) .ice-refinement-table{opacity:1;visibility:visible}.ice-opening-scene:is([data-phase=formula-refinement],[data-phase=final-refinement]) .ice-refinement-table em{animation:refinementMix 1.3s ease-in-out infinite}.ice-opening-scene[data-refinement-syringes-used="1"] .ice-refinement-table i:nth-of-type(1),.ice-opening-scene[data-refinement-syringes-used="2"] .ice-refinement-table i:nth-of-type(-n+2),.ice-opening-scene[data-refinement-syringes-used="3"] .ice-refinement-table i:nth-of-type(-n+3),.ice-opening-scene[data-refinement-syringes-used="4"] .ice-refinement-table i:nth-of-type(-n+4),.ice-opening-scene[data-refinement-syringes-used="5"] .ice-refinement-table i:nth-of-type(-n+5),.ice-opening-scene[data-refinement-syringes-used="6"] .ice-refinement-table i:nth-of-type(-n+6),.ice-opening-scene[data-refinement-syringes-used="7"] .ice-refinement-table i:nth-of-type(-n+7),.ice-opening-scene[data-refinement-syringes-used="8"] .ice-refinement-table i:nth-of-type(-n+8),.ice-opening-scene[data-refinement-syringes-used="9"] .ice-refinement-table i:nth-of-type(-n+9){opacity:.08;filter:grayscale(1)}@keyframes refinementMix{50%{transform:translateY(-8px) scale(1.35);opacity:1}}.ice-opening-scene:is([data-phase=formula-refinement],[data-phase=refinement-batch-one-prep],[data-phase=refinement-one-a],[data-phase=refinement-one-b],[data-phase=refinement-one-c],[data-phase=refinement-transition],[data-phase=refinement-batch-two-prep],[data-phase=refinement-two-a],[data-phase=refinement-two-b],[data-phase=refinement-two-c],[data-phase=final-refinement],[data-phase=refinement-final-prep],[data-phase=refinement-final-a],[data-phase=refinement-final-b],[data-phase=refinement-final-c]) .ice-chambers .ice-chamber{border-color:#527887;background:linear-gradient(90deg,#a5f4ff14,#cfffff35,#86d7e711);box-shadow:inset 0 0 18px #9ff5ff44;filter:none}.ice-opening-scene:is([data-phase=formula-refinement],[data-phase=refinement-batch-one-prep],[data-phase=refinement-one-a],[data-phase=refinement-one-b],[data-phase=refinement-one-c],[data-phase=refinement-transition],[data-phase=refinement-batch-two-prep],[data-phase=refinement-two-a],[data-phase=refinement-two-b],[data-phase=refinement-two-c],[data-phase=final-refinement],[data-phase=refinement-final-prep],[data-phase=refinement-final-a],[data-phase=refinement-final-b],[data-phase=refinement-final-c]) .ice-chambers .chamber-orb,.ice-opening-scene:is([data-phase=formula-refinement],[data-phase=refinement-batch-one-prep],[data-phase=refinement-one-a],[data-phase=refinement-one-b],[data-phase=refinement-one-c],[data-phase=refinement-transition],[data-phase=refinement-batch-two-prep],[data-phase=refinement-two-a],[data-phase=refinement-two-b],[data-phase=refinement-two-c],[data-phase=final-refinement],[data-phase=refinement-final-prep],[data-phase=refinement-final-a],[data-phase=refinement-final-b],[data-phase=refinement-final-c]) .ice-chambers .chamber-remains,.ice-opening-scene:is([data-phase=formula-refinement],[data-phase=refinement-batch-one-prep],[data-phase=refinement-one-a],[data-phase=refinement-one-b],[data-phase=refinement-one-c],[data-phase=refinement-transition],[data-phase=refinement-batch-two-prep],[data-phase=refinement-two-a],[data-phase=refinement-two-b],[data-phase=refinement-two-c],[data-phase=final-refinement],[data-phase=refinement-final-prep],[data-phase=refinement-final-a],[data-phase=refinement-final-b],[data-phase=refinement-final-c]) .ice-chambers .ice-chamber:after,.ice-opening-scene:is([data-phase=formula-refinement],[data-phase=refinement-batch-one-prep],[data-phase=refinement-one-a],[data-phase=refinement-one-b],[data-phase=refinement-one-c],[data-phase=refinement-transition],[data-phase=refinement-batch-two-prep],[data-phase=refinement-two-a],[data-phase=refinement-two-b],[data-phase=refinement-two-c],[data-phase=final-refinement],[data-phase=refinement-final-prep],[data-phase=refinement-final-a],[data-phase=refinement-final-b],[data-phase=refinement-final-c]) .ice-chambers strong{opacity:0!important;visibility:hidden!important}

/* A refinement failure is scoped to the occupied original pod only. */
.ice-opening-scene[data-refinement-batch="1"][data-subject-refinement-one-a="failed"] .ice-chambers .ice-chamber:nth-child(1),.ice-opening-scene[data-refinement-batch="1"][data-subject-refinement-one-b="failed"] .ice-chambers .ice-chamber:nth-child(2),.ice-opening-scene[data-refinement-batch="1"][data-subject-refinement-one-c="failed"] .ice-chambers .ice-chamber:nth-child(3),.ice-opening-scene[data-refinement-batch="2"][data-subject-refinement-two-a="failed"] .ice-chambers .ice-chamber:nth-child(1){border-color:#d95c62!important;background:linear-gradient(90deg,#6d1119aa,#26141bdd,#74161c99)!important;box-shadow:inset 0 0 18px #ff434477,0 0 8px #ff3e3e66!important}.ice-opening-scene[data-refinement-batch="1"][data-subject-refinement-one-a="failed"] .ice-chambers .ice-chamber:nth-child(1) .chamber-remains,.ice-opening-scene[data-refinement-batch="1"][data-subject-refinement-one-b="failed"] .ice-chambers .ice-chamber:nth-child(2) .chamber-remains,.ice-opening-scene[data-refinement-batch="1"][data-subject-refinement-one-c="failed"] .ice-chambers .ice-chamber:nth-child(3) .chamber-remains,.ice-opening-scene[data-refinement-batch="2"][data-subject-refinement-two-a="failed"] .ice-chambers .ice-chamber:nth-child(1) .chamber-remains{opacity:1!important;visibility:visible!important}.ice-opening-scene[data-refinement-batch="1"][data-subject-refinement-one-a="failed"] .ice-chambers .ice-chamber:nth-child(1) strong,.ice-opening-scene[data-refinement-batch="1"][data-subject-refinement-one-b="failed"] .ice-chambers .ice-chamber:nth-child(2) strong,.ice-opening-scene[data-refinement-batch="1"][data-subject-refinement-one-c="failed"] .ice-chambers .ice-chamber:nth-child(3) strong,.ice-opening-scene[data-refinement-batch="2"][data-subject-refinement-two-a="failed"] .ice-chambers .ice-chamber:nth-child(1) strong{opacity:1!important;visibility:visible!important}

/* A trial failure belongs to one pod.  This comes after the original trial rules
   so a broad phase tint can never bleed onto the sibling chambers. */
.ice-opening-scene[data-phase=failed-one] .ice-chamber:not(.failed-one),.ice-opening-scene[data-phase=failed-two] .ice-chamber:not(.failed-two),.ice-opening-scene[data-phase=failed-three] .ice-chamber:not(.failed-three){border-color:#527887;background:linear-gradient(90deg,#a5f4ff14,#cfffff35,#86d7e711);box-shadow:inset 0 0 18px #9ff5ff44;filter:none}
.ice-opening-scene[data-phase=failed-one][data-injection-complete=true] .failed-one,.ice-opening-scene[data-phase=failed-two][data-injection-complete=true] .failed-two,.ice-opening-scene[data-phase=failed-three][data-injection-complete=true] .failed-three{border-color:#d95c62;background:linear-gradient(90deg,#6d1119aa,#26141bdd,#74161c99);box-shadow:inset 0 0 18px #ff434477,0 0 8px #ff3e3e66}

/* The original three retain their prior flex sizing. Survivor pods copy their
   measured rendered dimensions exactly, rather than resizing the originals. */
.ice-opening-scene{--survivor-chamber-width:7.8vw;--survivor-chamber-height:36%;--original-chamber-center-gap:9vw}
.ice-chambers .ice-chamber{width:auto;height:auto;flex:1 1 0}
.ice-survivor-chambers{display:contents;pointer-events:none}
.ice-survivor-chambers .survivor-ten,.ice-survivor-chambers .survivor-nine{position:absolute;z-index:17;top:15%;box-sizing:border-box;width:var(--survivor-chamber-width);height:var(--survivor-chamber-height)}
.ice-survivor-chambers .survivor-ten{left:calc(30% - var(--survivor-chamber-width)/2)}
.ice-survivor-chambers .survivor-nine{left:calc(30% + var(--original-chamber-center-gap) - var(--survivor-chamber-width)/2)}
.ice-chambers .chamber-orb{bottom:10%}
/* Survivor chambers never inherit failed-subject transform/transition state. */
.ice-survivor-chambers .survivor-ten,.ice-survivor-chambers .survivor-nine{transform:none!important;transition:none!important;animation:none!important;filter:none!important}
.ice-survivor-chambers .cutscene-survivor-orb{position:absolute;left:22%;right:22%;bottom:10%;aspect-ratio:1;transform:translate(0,0) scale(1) rotate(0deg)!important;transition:none!important;animation:none!important;filter:none!important;pointer-events:none}

/* Failure motion belongs only to the active subject, never to its chamber. */
.ice-opening-scene[data-phase=failed-one] .failed-one,.ice-opening-scene[data-phase=failed-two] .failed-two,.ice-opening-scene[data-phase=failed-three] .failed-three{transform:none;filter:none}
.ice-opening-scene[data-phase=failed-one] .failed-one .chamber-orb,.ice-opening-scene[data-phase=failed-two] .failed-two .chamber-orb,.ice-opening-scene[data-phase=failed-three] .failed-three .chamber-orb{filter:drop-shadow(0 0 14px #ff3b3b)}
/* The large captive-elephant pen is a later scene only; it must never leak
   into a chamber failure or make that experiment look globally enlarged. */
.ice-opening-scene:not([data-phase=freeze-test]):not([data-phase=freeze-result]):not([data-phase=shield-hit-one]):not([data-phase=shield-hit-two]) .ice-test-area{opacity:0!important;visibility:hidden!important}
/* The captive test area is structural only: no cage/range ellipse is rendered. */
.ice-opening-scene .ice-test-area{display:none!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;pointer-events:none!important}
/* Untested subjects are independently visible; one chamber cannot hide siblings. */
.ice-opening-scene[data-subject-failed-one=untested] .failed-one .chamber-orb,.ice-opening-scene[data-subject-failed-two=untested] .failed-two .chamber-orb,.ice-opening-scene[data-subject-failed-three=untested] .failed-three .chamber-orb,.ice-opening-scene[data-subject-failed-one=testing]:not([data-injection-complete=true]) .failed-one .chamber-orb,.ice-opening-scene[data-subject-failed-two=testing]:not([data-injection-complete=true]) .failed-two .chamber-orb,.ice-opening-scene[data-subject-failed-three=testing]:not([data-injection-complete=true]) .failed-three .chamber-orb{display:block!important;visibility:visible!important;opacity:1!important}
/* Later mutation tests take place outside on the Ice Map, never in the lab. */
.ice-outdoor-test{position:absolute;z-index:12;inset:0;overflow:hidden;opacity:0;visibility:hidden;pointer-events:none;background:linear-gradient(#8fb9ca 0 42%,#c9e5ea 43% 100%);transition:opacity .35s ease}
.ice-outdoor-test:before{content:"";position:absolute;inset:40% 0 0;background:radial-gradient(ellipse at 18% 18%,#effcff 0 9%,transparent 10%),radial-gradient(ellipse at 54% 57%,#d6f3f7 0 14%,transparent 15%),linear-gradient(160deg,#dff4f6,#b4d3dd 54%,#98bdca)}
.ice-outdoor-test:after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 23% 28%,#fff8 0 1px,transparent 2px),radial-gradient(circle at 72% 16%,#fff9 0 1px,transparent 2px),radial-gradient(circle at 84% 48%,#fff8 0 1px,transparent 2px);background-size:62px 72px,91px 83px,77px 69px;animation:outdoorSnowfall 4s linear infinite}
.outdoor-cliff,.outdoor-rock,.outdoor-snow{position:absolute;display:block;z-index:1}.outdoor-cliff{bottom:17%;width:18%;height:39%;background:linear-gradient(135deg,#5c8fa5,#2d5c73 62%,#1c465e);clip-path:polygon(16% 100%,0 41%,31% 0,100% 22%,85% 100%);filter:drop-shadow(0 7px 0 #396d82)}.cliff-left{left:-3%}.cliff-right{right:-4%;transform:scaleX(-1)}.outdoor-rock{bottom:16%;width:8%;height:9%;border-radius:48% 55% 36% 45%;background:linear-gradient(145deg,#d9f1f5,#769aaa 58%,#416d82);box-shadow:0 4px 0 #7195a3}.rock-a{left:10%}.rock-b{right:13%;transform:scale(.72)}.outdoor-snow{bottom:15%;width:27%;height:10%;border-radius:50%;background:#effcffb8;filter:drop-shadow(0 4px 0 #91b8c7)}.snow-a{left:60%;bottom:8%}.snow-b{right:3%;transform:scale(.7)}.ice-outdoor-test b{position:absolute;z-index:2;left:0;right:0;bottom:14%;height:3px;background:#eefeffaa;box-shadow:0 5px 10px #6ca5bb}@keyframes outdoorSnowfall{to{background-position:0 70px,0 83px,0 69px}}
.ice-opening-scene:is([data-phase=freeze-test],[data-phase=freeze-result],[data-phase=shield-hit-one],[data-phase=shield-hit-two]) .ice-outdoor-test{opacity:1;visibility:visible}
.ice-opening-scene[data-outdoor-test="true"] .ice-outdoor-test{opacity:1!important;visibility:visible!important}
.ice-opening-scene[data-outdoor-test="true"] .ice-lab-wall,.ice-opening-scene[data-outdoor-test="true"] .ice-lab-light,.ice-opening-scene[data-outdoor-test="true"] .ice-lab-frost,.ice-opening-scene[data-outdoor-test="true"] .ice-monitor,.ice-opening-scene[data-outdoor-test="true"] .ice-injection-table,.ice-opening-scene[data-outdoor-test="true"] .ice-used-syringes,.ice-opening-scene[data-outdoor-test="true"] .ice-refinement-table,.ice-opening-scene[data-outdoor-test="true"] .ice-chambers,.ice-opening-scene[data-outdoor-test="true"] .ice-survivor-chambers{opacity:0!important;visibility:hidden!important}
.ice-opening-scene[data-outdoor-test="true"] .ice-lab-wall,.ice-opening-scene[data-outdoor-test="true"] .ice-lab-light,.ice-opening-scene[data-outdoor-test="true"] .ice-lab-frost,.ice-opening-scene[data-outdoor-test="true"] .ice-monitor,.ice-opening-scene[data-outdoor-test="true"] .ice-injection-table,.ice-opening-scene[data-outdoor-test="true"] .ice-used-syringes,.ice-opening-scene[data-outdoor-test="true"] .ice-refinement-table,.ice-opening-scene[data-outdoor-test="true"] .ice-chambers,.ice-opening-scene[data-outdoor-test="true"] .ice-survivor-chambers{display:none!important;opacity:0!important;visibility:hidden!important}
.ice-opening-scene .freeze-sheet{display:none!important}

/* Hard-disable legacy DOM stand-ins if an old document is restored from cache.
   The real scientist, survivors, and captive elephant are canvas-rendered. */
.ice-opening-scene .ice-subject,.ice-opening-scene .ice-recording,.ice-opening-scene .captive-elephant,.ice-opening-scene .test-snow-orb,.ice-opening-scene .test-shield-orb{display:none!important;pointer-events:none!important}

/* Compact controls shared by every cutscene.  The tab stays at the viewport edge
   until the player deliberately opens this narrow vertical menu. */
.cutscene-menu{position:absolute;z-index:100;top:clamp(10px,2vw,22px);right:0;display:flex;flex-direction:row-reverse;align-items:flex-start;max-width:calc(100% - 4px);pointer-events:auto}.cutscene-menu-tab,.cutscene-menu-panel button{border:1px solid #b8f5ff;background:#061921dc;color:#eaffff;font:900 11px Inter;letter-spacing:1.1px;cursor:pointer}.cutscene-menu-tab{width:29px;min-width:29px;height:46px;padding:0;border-right:0;border-radius:8px 0 0 8px;font-size:24px;line-height:1}.cutscene-menu-panel{display:flex;flex-direction:column;gap:4px;width:0;max-width:0;max-height:0;padding:0;overflow:hidden;opacity:0;pointer-events:none;transform:translateX(8px);transition:max-width .16s ease,max-height .16s ease,padding .16s ease,opacity .14s ease,transform .16s ease}.cutscene-menu.open .cutscene-menu-panel{width:96px;max-width:96px;max-height:190px;padding:0 5px 0 0;opacity:1;pointer-events:auto;transform:translateX(0)}.cutscene-menu-panel button{width:91px;min-height:37px;padding:0 8px}.cutscene-menu-speed.active{border-color:#fff;background:#176071;color:#fff;box-shadow:0 0 12px #76efff99}.cutscene-menu-skip{letter-spacing:1.35px}.cutscene-menu-tab:focus-visible,.cutscene-menu-panel button:focus-visible{outline:2px solid #fff;outline-offset:-3px}.finale-scene .cutscene-menu{top:clamp(10px,2vw,22px);right:0}.finale-scene .cutscene-menu .skip-finale{position:static;right:auto;bottom:auto;min-width:0;font-size:11px}.cutscene-menu-panel[aria-hidden=true]{visibility:hidden}.cutscene-menu.open .cutscene-menu-panel[aria-hidden=false]{visibility:visible}@media(prefers-reduced-motion:reduce){.cutscene-menu-panel{transition:none}}
.cutscene-menu-panel[aria-hidden=true]{visibility:visible}
.cutscene-pause-button{position:absolute;z-index:100;top:clamp(10px,2vw,22px);left:clamp(10px,2vw,22px);min-width:72px;min-height:38px;padding:0 12px;border:1px solid #b8f5ff;border-radius:4px;background:#061921dc;color:#eaffff;font:900 11px Inter;letter-spacing:1.1px;cursor:pointer}.cutscene-pause-button[aria-pressed=true]{border-color:#fff;background:#176071;color:#fff;box-shadow:0 0 12px #76efff99}.cutscene-pause-button:focus-visible{outline:2px solid #fff;outline-offset:3px}

/* Keep physical used syringes, but remove the accidental card/debug frame. */
.ice-used-syringes{border:0;background:transparent;padding:0;pointer-events:none}
.ice-used-syringes i{height:3px;border:0;border-radius:3px;background:#78949c;box-shadow:0 1px 0 #d9f7ff}
/* A used syringe is an actor, not a faded table decoration.  Its uniquely
   addressed source slot is removed immediately and the disposal tray is kept
   out of the rendered scene after the withdrawal animation completes. */
.ice-used-syringes,.ice-used-syringes i{display:none!important;visibility:hidden!important;opacity:0!important;box-shadow:none!important;filter:none!important}
.ice-injection-table [data-syringe-id]::before,.ice-injection-table [data-syringe-id]::after,.ice-refinement-table [data-syringe-id]::before,.ice-refinement-table [data-syringe-id]::after{content:none!important;display:none!important}
.ice-opening-scene[data-active-syringe-id="lab-syringe-1"] [data-syringe-id="lab-syringe-1"],.ice-opening-scene[data-active-syringe-id="lab-syringe-2"] [data-syringe-id="lab-syringe-2"],.ice-opening-scene[data-active-syringe-id="lab-syringe-3"] [data-syringe-id="lab-syringe-3"],.ice-opening-scene[data-active-syringe-id="lab-syringe-4"] [data-syringe-id="lab-syringe-4"],.ice-opening-scene[data-active-syringe-id="lab-syringe-5"] [data-syringe-id="lab-syringe-5"],.ice-opening-scene[data-active-syringe-id="refinement-syringe-1"] [data-syringe-id="refinement-syringe-1"],.ice-opening-scene[data-active-syringe-id="refinement-syringe-2"] [data-syringe-id="refinement-syringe-2"],.ice-opening-scene[data-active-syringe-id="refinement-syringe-3"] [data-syringe-id="refinement-syringe-3"],.ice-opening-scene[data-active-syringe-id="refinement-syringe-4"] [data-syringe-id="refinement-syringe-4"],.ice-opening-scene[data-active-syringe-id="refinement-syringe-5"] [data-syringe-id="refinement-syringe-5"],.ice-opening-scene[data-active-syringe-id="refinement-syringe-6"] [data-syringe-id="refinement-syringe-6"],.ice-opening-scene[data-active-syringe-id="refinement-syringe-7"] [data-syringe-id="refinement-syringe-7"],.ice-opening-scene[data-active-syringe-id="refinement-syringe-8"] [data-syringe-id="refinement-syringe-8"],.ice-opening-scene[data-active-syringe-id="refinement-syringe-9"] [data-syringe-id="refinement-syringe-9"]{display:none!important;visibility:hidden!important;opacity:0!important;filter:none!important;box-shadow:none!important}
.ice-opening-scene[data-syringes-used="1"] .ice-injection-table i:nth-of-type(1),.ice-opening-scene[data-syringes-used="2"] .ice-injection-table i:nth-of-type(-n+2),.ice-opening-scene[data-syringes-used="3"] .ice-injection-table i:nth-of-type(-n+3),.ice-opening-scene[data-syringes-used="4"] .ice-injection-table i:nth-of-type(-n+4),.ice-opening-scene[data-syringes-used="5"] .ice-injection-table i:nth-of-type(-n+5),.ice-opening-scene[data-refinement-syringes-used="1"] .ice-refinement-table i:nth-of-type(1),.ice-opening-scene[data-refinement-syringes-used="2"] .ice-refinement-table i:nth-of-type(-n+2),.ice-opening-scene[data-refinement-syringes-used="3"] .ice-refinement-table i:nth-of-type(-n+3),.ice-opening-scene[data-refinement-syringes-used="4"] .ice-refinement-table i:nth-of-type(-n+4),.ice-opening-scene[data-refinement-syringes-used="5"] .ice-refinement-table i:nth-of-type(-n+5),.ice-opening-scene[data-refinement-syringes-used="6"] .ice-refinement-table i:nth-of-type(-n+6),.ice-opening-scene[data-refinement-syringes-used="7"] .ice-refinement-table i:nth-of-type(-n+7),.ice-opening-scene[data-refinement-syringes-used="8"] .ice-refinement-table i:nth-of-type(-n+8),.ice-opening-scene[data-refinement-syringes-used="9"] .ice-refinement-table i:nth-of-type(-n+9){display:none!important;visibility:hidden!important;opacity:0!important;filter:none!important;box-shadow:none!important}
/* Failed subjects retain their own terminal state after their phase ends. */
.ice-opening-scene[data-subject-failed-one=failed] .failed-one .chamber-orb,.ice-opening-scene[data-subject-failed-two=failed] .failed-two .chamber-orb,.ice-opening-scene[data-subject-failed-three=failed] .failed-three .chamber-orb{opacity:0!important;animation:none!important}
.ice-opening-scene[data-subject-failed-one=failed] .failed-one .chamber-remains,.ice-opening-scene[data-subject-failed-two=failed] .failed-two .chamber-remains,.ice-opening-scene[data-subject-failed-three=failed] .failed-three .chamber-remains{opacity:1!important;animation:none!important}

/* The last frame is the stable third refinement batch.  During its fade, keep
   only the canvas-rendered final samples: never reveal the legacy failed-orb
   remnants or survivor tableau underneath the black overlay. */
.ice-opening-scene[data-phase=fade] .ice-chambers .chamber-orb,.ice-opening-scene[data-phase=fade] .ice-chambers .chamber-remains,.ice-opening-scene[data-phase=fade] .ice-chambers strong,.ice-opening-scene[data-phase=fade] .ice-survivor-chambers{opacity:0!important;visibility:hidden!important;animation:none!important}

/* The dictionary unread count belongs to its control, never to the global HUD. */
.encyclopedia-button{position:relative}
.encyclopedia-button .encyclopedia-badge{position:absolute;z-index:2;top:-9px;right:-9px;min-width:20px;height:20px;border-radius:50%;background:#8c5cff;color:#fff;text-align:center;font:800 11px/20px Inter;box-shadow:0 0 12px #9d72ff;pointer-events:none}
@media(max-width:760px){.encyclopedia-button .encyclopedia-badge{top:-7px;right:-7px}}

/* Flame Elephant retains the Water Elephant silhouette; only the trunk tip burns. */
.flame-preview{background:inherit;box-shadow:none}.flame-elephant{filter:drop-shadow(0 5px 2px #0009)}
.mini-flame{position:absolute;z-index:3;right:12px;top:38px;width:12px;height:16px;transform:rotate(10deg);border-radius:55% 45% 58% 42%/65% 56% 44% 35%;background:linear-gradient(145deg,#fff3a4 8%,#ffb52e 42%,#f05224 78%);box-shadow:0 0 5px #ff9b3177;transform-origin:bottom center}
.mini-flame b{position:absolute;left:4px;top:6px;width:5px;height:8px;border-radius:55% 45% 60% 40%;background:#fff8c9}
.flame-card:hover:not(:disabled){border-color:#ff7a2d;box-shadow:0 8px 24px #0005,0 0 16px #ff5c2233}
.ice-opening-scene[data-phase=fade-to-elephant-base]:after{opacity:1}
.ice-opening-scene[data-elephant-base=true] .ice-lab-wall,.ice-opening-scene[data-elephant-base=true] .ice-lab-light,.ice-opening-scene[data-elephant-base=true] .ice-lab-frost,.ice-opening-scene[data-elephant-base=true] .ice-monitor,.ice-opening-scene[data-elephant-base=true] .ice-injection-table,.ice-opening-scene[data-elephant-base=true] .ice-used-syringes,.ice-opening-scene[data-elephant-base=true] .ice-refinement-table,.ice-opening-scene[data-elephant-base=true] .ice-chambers,.ice-opening-scene[data-elephant-base=true] .ice-survivor-chambers{display:none!important;visibility:hidden!important}
/* Speaker-anchored speech is positioned by the cutscene's actor coordinates.
   These rules deliberately override every former phase-specific fixed offset. */
.ice-opening-scene .ice-scientist-speech{z-index:95;left:auto;top:auto;min-width:170px;max-width:min(320px,calc(100% - 24px));padding:10px 14px 11px;font:800 clamp(11px,1.5vw,16px)/1.35 Inter;transition:opacity .2s ease;transform:none}.ice-opening-scene .ice-scientist-speech:after{display:none!important;content:none!important}.ice-speech-speaker{display:block;margin:0 0 3px;color:#8feafb;font:900 clamp(8px,1.05vw,11px)/1 Inter;letter-spacing:.9px}.ice-speech-text{display:block;color:#effdff}.ice-opening-scene .ice-scientist-speech:before{right:auto;bottom:-14px;left:var(--ice-speech-tail-x,50%);top:auto;transform:translateX(-50%);border:12px solid transparent;border-top-color:#d9f6fb}.ice-opening-scene .ice-scientist-speech[data-speech-placement=right]:before{left:-14px;top:var(--ice-speech-tail-y,50%);bottom:auto;transform:translateY(-50%);border:12px solid transparent;border-right-color:#d9f6fb}.ice-opening-scene .ice-scientist-speech[data-speech-placement=left]:before{left:auto;right:-14px;top:var(--ice-speech-tail-y,50%);bottom:auto;transform:translateY(-50%);border:12px solid transparent;border-left-color:#d9f6fb}.ice-opening-scene .ice-scientist-speech[data-speech-placement=below]:before{left:var(--ice-speech-tail-x,50%);top:-14px;right:auto;bottom:auto;transform:translateX(-50%);border:12px solid transparent;border-bottom-color:#d9f6fb}
.tower-card.selected,.tower-card[data-placement-selected="true"]{position:relative;border-color:#ffb13c;box-shadow:0 0 0 1px #ffb13c inset,0 0 18px #ffb13c55}.tower-card.selected::after,.tower-card[data-placement-selected="true"]::after{content:'Click again to cancel';position:absolute;z-index:5;right:8px;bottom:7px;padding:3px 5px;border:1px solid #ffd27b;background:#392416e8;color:#fff0c2;font:800 8px Inter;letter-spacing:.35px;pointer-events:none}
