:root{--bg:#020605;--panel:#07110d;--panel2:#0a1711;--line:rgba(139,255,192,.11);--line2:rgba(255,255,255,.07);--text:#edfff5;--muted:#719080;--green:#51ffa2;--green2:#20c976;--danger:#ff6878;--amber:#ffbd59;--safe-bottom:env(safe-area-inset-bottom,0px);--tg-top-offset:0px;--header-gap:58px}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}body{overflow-x:hidden}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed}.ambient{position:fixed;inset:0;overflow:hidden;pointer-events:none;background:radial-gradient(circle at 50% -10%,rgba(46,255,143,.09),transparent 38%),radial-gradient(circle at 92% 88%,rgba(110,54,255,.08),transparent 36%),#020605}.ambient:after{content:"";position:absolute;inset:0;opacity:.14;background-image:linear-gradient(rgba(80,255,163,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(80,255,163,.08) 1px,transparent 1px);background-size:42px 42px;mask-image:linear-gradient(to bottom,#000,transparent 82%)}.ambient i{position:absolute;width:260px;height:260px;border-radius:50%;filter:blur(80px);opacity:.08;background:var(--green);animation:ambient 14s ease-in-out infinite}.ambient i:nth-child(1){left:-160px;top:15%}.ambient i:nth-child(2){right:-180px;top:45%;animation-delay:-5s}.ambient i:nth-child(3){left:25%;bottom:-220px;background:#7d57ff;animation-delay:-9s}
#app{position:relative;z-index:1;min-height:100dvh}.screen{display:none;min-height:100dvh;padding:calc(18px + env(safe-area-inset-top,0px)) 14px calc(92px + var(--safe-bottom));animation:screenIn .35s ease}.onboarding-screen,.game-screen{padding-top:calc(18px + env(safe-area-inset-top,0px) + var(--header-gap) + var(--tg-top-offset))}.boot-screen,.center-screen{padding-top:calc(18px + env(safe-area-inset-top,0px) + 16px)}.screen.active{display:block}.center-screen,.boot-screen{place-items:center;text-align:center}.center-screen.active,.boot-screen.active{display:grid}.boot-screen{align-content:center}.boot-mark{position:relative;width:118px;height:118px;display:grid;place-items:center;margin-bottom:28px}.boot-mark span{position:relative;z-index:2;width:68px;height:68px;border:1px solid rgba(93,255,170,.35);border-radius:26px;display:grid;place-items:center;color:var(--green);font-size:34px;background:rgba(19,77,48,.22);box-shadow:inset 0 0 30px rgba(68,255,156,.08),0 0 50px rgba(54,255,149,.08)}.boot-mark i{position:absolute;inset:4px;border:1px dashed rgba(84,255,165,.18);border-radius:50%;animation:spin 8s linear infinite}.boot-mark i:last-child{inset:-12px;animation-direction:reverse;animation-duration:13s}.eyebrow{display:flex;align-items:center;gap:8px;color:#77a48c;font:800 9px ui-monospace,SFMono-Regular,monospace;letter-spacing:.16em}.eyebrow b,.live-dot{width:7px;height:7px;border-radius:50%;background:var(--green);box-shadow:0 0 14px rgba(74,255,159,.85);animation:blink 1.8s infinite}.boot-screen h1{margin:10px 0 6px;font-size:36px;letter-spacing:-.06em}.boot-screen h1 em{font-style:normal;color:var(--green)}.boot-screen p,.center-screen p{max-width:330px;color:var(--muted);font-size:13px;line-height:1.6}.boot-screen>small{margin-top:13px;color:#416151;font:700 8px ui-monospace,monospace;letter-spacing:.18em}.loader{width:min(290px,75vw);height:4px;margin-top:22px;border-radius:99px;background:rgba(255,255,255,.06);overflow:hidden}.loader span{display:block;width:34%;height:100%;background:linear-gradient(90deg,transparent,var(--green),transparent);animation:loading 1.8s infinite}.status-orb{width:76px;height:76px;border-radius:28px;display:grid;place-items:center;margin:auto;color:var(--green);font-size:30px;border:1px solid rgba(80,255,162,.22);background:rgba(37,255,137,.07)}.status-orb.danger{color:var(--danger);border-color:rgba(255,93,113,.24);background:rgba(255,72,94,.06)}.center-screen h2{margin:22px 0 0;font-size:24px}.primary,.secondary{border-radius:15px;padding:13px 16px;font-weight:850;border:1px solid transparent}.primary{color:#032414;background:linear-gradient(135deg,#24d77c,#69ffb0);box-shadow:0 12px 32px rgba(38,255,145,.13)}.secondary{color:#8ca99a;background:rgba(255,255,255,.035);border-color:var(--line2)}.wide{width:100%;margin-top:18px}.simple-header,.game-header{max-width:940px;margin:0 auto 16px;display:flex;align-items:center;justify-content:space-between;gap:15px}.simple-header h2,.game-header h2{margin:6px 0 0;font-size:25px;letter-spacing:-.04em}.simple-header>span{font:800 10px ui-monospace,monospace;color:#527261}.creator-layout{max-width:940px;margin:auto;display:grid;grid-template-columns:minmax(280px,.9fr) minmax(300px,1.1fr);gap:14px}.specimen-stage,.glass-panel{border:1px solid var(--line);border-radius:28px;background:linear-gradient(180deg,rgba(9,25,18,.88),rgba(4,12,8,.88));box-shadow:inset 0 1px rgba(255,255,255,.025)}.specimen-stage{min-height:570px;display:grid;place-items:center;align-content:center;overflow:hidden;position:relative}.specimen-stage:before{content:"";position:absolute;inset:0;opacity:.16;background-image:linear-gradient(rgba(70,255,160,.09) 1px,transparent 1px),linear-gradient(90deg,rgba(70,255,160,.09) 1px,transparent 1px);background-size:34px 34px;mask-image:radial-gradient(circle,#000,transparent 70%)}.chamber-shell{position:relative;width:238px;z-index:2}.chamber-cap{height:34px;margin:auto;width:150px;border:1px solid rgba(150,255,203,.14);background:linear-gradient(180deg,#13271e,#07120d)}.chamber-cap.top{border-radius:18px 18px 5px 5px}.chamber-cap.bottom{border-radius:5px 5px 18px 18px}.chamber-glass{position:relative;height:350px;border:1px solid rgba(151,255,205,.25);border-radius:106px 106px 45px 45px;overflow:hidden;background:linear-gradient(120deg,rgba(255,255,255,.08),transparent 24%,rgba(49,255,151,.04) 55%,rgba(255,255,255,.03));box-shadow:inset 0 0 55px rgba(52,255,149,.06),0 0 55px rgba(26,255,128,.05)}.fluid{position:absolute;left:0;right:0;bottom:-4px;height:72%;background:linear-gradient(180deg,rgba(47,255,148,.025),rgba(28,177,97,.14));animation:fluid 5s ease-in-out infinite}.scan-line{position:absolute;z-index:6;left:9%;right:9%;height:1px;top:16%;background:linear-gradient(90deg,transparent,var(--green),transparent);box-shadow:0 0 12px var(--green);animation:scan 4s ease-in-out infinite}.bubbles:before,.bubbles:after{content:"";position:absolute;bottom:10%;width:6px;height:6px;border:1px solid rgba(137,255,192,.45);border-radius:50%;animation:bubble 5s infinite}.bubbles:before{left:26%}.bubbles:after{right:29%;animation-delay:-2.4s}.specimen-readout{position:relative;z-index:2;width:238px;margin-top:18px;padding:11px 13px;border:1px solid var(--line2);border-radius:13px;background:rgba(4,13,9,.72);display:grid;grid-template-columns:1fr auto;align-items:center}.specimen-readout span{font:750 8px ui-monospace,monospace;color:#577665}.specimen-readout b{font:800 11px ui-monospace,monospace;color:#a9ffd0}.specimen-readout i{grid-column:1/3;height:3px;margin-top:9px;border-radius:9px;background:rgba(255,255,255,.06);overflow:hidden}.specimen-readout u{display:block;width:86%;height:100%;background:var(--green);text-decoration:none}.wizard-panel{padding:20px;min-height:570px;display:flex;flex-direction:column}.wizard-progress{display:flex;gap:8px;margin-bottom:24px}.step-dot{height:3px;flex:1;border-radius:99px;background:rgba(255,255,255,.07)}.step-dot.active,.step-dot.done{background:var(--green);box-shadow:0 0 10px rgba(66,255,157,.28)}.wizard-step{display:none;animation:stepIn .25s ease}.wizard-step.active{display:block}.wizard-step>small,.view-hero small,.section-title small,.profile-card h4,.sheet header small{font:800 8px ui-monospace,monospace;letter-spacing:.15em;color:#4fe397}.wizard-step h3{font-size:24px;margin:8px 0 5px}.wizard-step>p{margin:0 0 19px;color:var(--muted);font-size:12px;line-height:1.55}.wizard-step label{display:block;color:#85a596;font-size:10px;font-weight:750;margin-bottom:13px}.wizard-step input{display:block;width:100%;margin-top:7px;padding:13px 14px;border:1px solid var(--line2);border-radius:13px;background:rgba(0,0,0,.22);color:var(--text);font-size:14px;outline:none}.wizard-step input:focus{border-color:rgba(77,255,164,.42);box-shadow:0 0 0 3px rgba(49,255,145,.05)}.info-line,.detail-callout{border-left:2px solid var(--green);padding:10px 12px;background:rgba(72,255,160,.035);color:#6f8d7e;font-size:10px;line-height:1.5}.class-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.class-card{border:1px solid var(--line2);border-radius:15px;text-align:left;padding:13px;background:rgba(255,255,255,.02);color:var(--text)}.class-card i{display:block;color:var(--green);font-style:normal;font-size:22px}.class-card b,.class-card span{display:block}.class-card b{font-size:12px;margin-top:9px}.class-card span{font-size:8px;color:#607d6e;margin-top:4px}.class-card.active{border-color:rgba(75,255,161,.38);background:rgba(60,255,154,.07)}.detail-callout{margin-top:12px}.detail-callout b,.detail-callout span{display:block}.detail-callout b{color:#caffdf}.detail-callout span{margin-top:4px}.selector{margin-bottom:15px}.selector>b{display:block;font-size:9px;color:#84a494;margin-bottom:7px}.selector>div{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.option{border:1px solid var(--line2);border-radius:10px;padding:9px 4px;background:rgba(255,255,255,.02);color:#6a8879;font-size:8px;font-weight:800}.option.active{color:#baffd7;border-color:rgba(74,255,161,.4);background:rgba(59,255,151,.08)}.selector .color-row{display:flex}.color{width:31px;height:31px;border:3px solid #07120d;border-radius:50%;outline:1px solid var(--line2)}.color.active{outline:2px solid #d9ffea;transform:scale(1.06)}.color.emerald{background:#51ffa2}.color.cyan{background:#45eaff}.color.violet{background:#9a77ff}.color.amber{background:#ffbd59}.review-list{border:1px solid var(--line2);border-radius:16px;overflow:hidden}.review-list div{display:flex;justify-content:space-between;padding:12px;border-bottom:1px solid rgba(255,255,255,.045);font-size:10px}.review-list div:last-child{border:0}.review-list span{color:#648172}.review-list b{color:#c9ffe1;text-align:right}.activate-button{width:100%;margin-top:14px;padding:13px;border:1px solid rgba(74,255,162,.36);border-radius:16px;display:flex;align-items:center;gap:11px;text-align:left;color:#e9fff3;background:linear-gradient(135deg,rgba(39,255,143,.17),rgba(21,118,68,.13))}.activate-button>i{font-style:normal;width:40px;height:40px;border-radius:13px;display:grid;place-items:center;background:rgba(63,255,156,.11);color:var(--green);font-size:19px}.activate-button b,.activate-button small{display:block}.activate-button b{font-size:11px}.activate-button small{margin-top:4px;font-size:8px;color:#709181}.wizard-actions{margin-top:auto;padding-top:17px;display:grid;grid-template-columns:1fr 1.5fr;gap:8px}.form-error{min-height:18px;padding-top:8px;color:var(--danger);font-size:9px}
.game-screen{max-width:960px;margin:auto}.game-header p{margin:3px 0 0;color:#638171;font-size:10px}.round-button{width:42px;height:42px;border-radius:15px;border:1px solid var(--line2);background:rgba(255,255,255,.03);color:#92b7a5}.resource-rack{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:10px}.resource-rack>div{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px;border:1px solid var(--line2);border-radius:16px;padding:10px;background:rgba(6,17,12,.8)}.resource-rack i{font-style:normal;font-size:17px}.resource-rack span{font-size:8px;color:#809d8e;font-weight:800}.resource-rack small{display:block;margin-top:3px;font-size:6px;color:#465f53;font-weight:600}.resource-rack b{font:800 12px ui-monospace,monospace;color:#d6ffe7}.view{display:none;animation:screenIn .25s ease}.view.active{display:block}.living-scene{position:relative;height:520px;border:1px solid var(--line);border-radius:29px;overflow:hidden;background:radial-gradient(circle at 50% 47%,rgba(44,255,144,.16),transparent 27%),linear-gradient(180deg,#07130e,#020605 87%);box-shadow:inset 0 0 70px rgba(48,255,148,.025)}.scene-grid{position:absolute;inset:0;opacity:.18;background-image:linear-gradient(rgba(73,255,160,.1) 1px,transparent 1px),linear-gradient(90deg,rgba(73,255,160,.1) 1px,transparent 1px);background-size:36px 36px;mask-image:linear-gradient(#000,transparent)}.scene-fog{position:absolute;left:10%;right:10%;bottom:-30px;height:130px;background:rgba(45,255,145,.08);filter:blur(40px);border-radius:50%}.lab-sign{position:absolute;z-index:5;left:17px;top:16px;display:grid;grid-template-columns:auto auto;align-items:center;gap:0 7px}.lab-sign b{font:800 10px ui-monospace,monospace}.lab-sign small{grid-column:2;color:#527262;font:700 7px ui-monospace,monospace}.central-chamber{position:absolute;left:50%;top:48%;transform:translate(-50%,-50%);width:250px}.tube{position:relative;height:330px;border:1px solid rgba(145,255,198,.22);border-radius:110px 110px 48px 48px;overflow:hidden;background:linear-gradient(120deg,rgba(255,255,255,.08),transparent 21%,rgba(56,255,156,.03),rgba(255,255,255,.025));box-shadow:inset 0 0 55px rgba(42,255,145,.06),0 0 65px rgba(32,255,133,.05)}.virus-button{position:absolute;inset:0;border:0;background:transparent}.virus-button.reacted .virus-visual{animation:reaction .55s ease!important}.hotspot{position:absolute;z-index:7;width:108px;padding:8px 9px;border:1px solid var(--line2);border-radius:14px;display:grid;grid-template-columns:auto 1fr;gap:0 7px;text-align:left;color:var(--text);background:rgba(5,18,12,.86);backdrop-filter:blur(10px)}.hotspot i{grid-row:1/3;font-style:normal;color:var(--green);font-size:17px}.hotspot span{font-size:8px;color:#648474}.hotspot b{font:800 8px ui-monospace,monospace;color:#b7ffd5}.h-growth{left:16px;top:116px}.h-analyzer{right:16px;top:116px}.h-reactor{left:16px;top:300px}.h-storage{right:16px;top:300px}.hotspot.upgrading{border-color:rgba(255,189,89,.35)}.hotspot.upgrading i,.hotspot.upgrading b{color:var(--amber)}.reactor-console{position:absolute;z-index:8;left:16px;right:16px;bottom:83px;border:1px solid var(--line2);border-radius:14px;padding:10px 12px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;background:rgba(3,13,8,.85);backdrop-filter:blur(10px)}.reactor-console>div:first-child small,.reactor-console>div:first-child b{display:block}.reactor-console small{font:700 6px ui-monospace,monospace;color:#527261}.reactor-console b{font:800 10px ui-monospace,monospace;margin-top:2px}.reactor-console>span{font:800 8px ui-monospace,monospace;color:var(--green)}.meter{height:5px;border-radius:99px;background:rgba(255,255,255,.06);overflow:hidden}.meter i{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--green2),#8dffc5);box-shadow:0 0 12px rgba(75,255,161,.4);transition:width .4s}.collect-button{position:relative;width:100%;z-index:1;border:1px solid rgba(72,255,159,.27);border-radius:17px;padding:12px;display:flex;align-items:center;gap:10px;text-align:left;color:var(--text);background:linear-gradient(135deg,rgba(38,255,143,.16),rgba(13,78,44,.2));backdrop-filter:blur(12px)}.living-scene>.collect-button{position:absolute;z-index:8;left:16px;right:16px;bottom:16px;width:auto}.attack-button,.operation-launch{margin-top:12px}.collect-button>i{flex:0 0 38px;font-style:normal;width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:rgba(50,255,150,.1);color:var(--green);font-size:20px}.collect-button>span{display:block;flex:1;min-width:0}.collect-button b,.collect-button small{display:block}.collect-button b{font-size:10px;line-height:1.15}.collect-button small{font-size:7px;line-height:1.3;color:#688777;margin-top:4px}.operations-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:9px}.operation-card{border:1px solid var(--line2);border-radius:17px;padding:12px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:9px;text-align:left;color:var(--text);background:rgba(7,19,13,.78)}.operation-card>i{font-style:normal;width:36px;height:36px;border-radius:12px;display:grid;place-items:center;background:rgba(68,255,157,.06)}.operation-card small,.operation-card b,.operation-card em{display:block}.operation-card small{font:750 6px ui-monospace,monospace;color:#4d6d5c}.operation-card b{font-size:9px;margin-top:3px}.operation-card em{font-style:normal;font-size:7px;color:#688676;margin-top:3px}.operation-card strong{color:#4e6d5d}.module-summary{margin-top:18px}.section-title{display:flex;justify-content:space-between;align-items:end;margin-bottom:9px}.section-title h3{margin:4px 0 0;font-size:17px}.section-title button{border:0;background:transparent;color:#6bc292;font-size:9px}.module-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.module-card{position:relative;min-height:112px;border:1px solid var(--line2);border-radius:16px;padding:11px;text-align:left;color:var(--text);background:rgba(7,19,13,.75)}.module-card>i{font-style:normal;font-size:21px;color:var(--green)}.module-card b,.module-card small,.module-card em{display:block}.module-card b{font-size:9px;margin-top:8px}.module-card small{font-size:7px;color:#5d7c6c;margin-top:4px}.module-card em{font-style:normal;font:750 7px ui-monospace,monospace;color:#9effc7;margin-top:9px}.module-card.locked{opacity:.45}.module-card.upgrading{border-color:rgba(255,189,89,.28)}.module-card.upgrading>i,.module-card.upgrading em{color:var(--amber)}.view-hero{border:1px solid var(--line);border-radius:23px;padding:18px;display:flex;justify-content:space-between;align-items:center;background:linear-gradient(135deg,rgba(39,255,142,.07),rgba(8,18,13,.82))}.view-hero h3{font-size:24px;margin:6px 0}.view-hero p{margin:0;color:var(--muted);font-size:10px}.evo-points{width:83px;height:83px;border:1px solid rgba(76,255,164,.22);border-radius:27px;display:grid;place-items:center;align-content:center;background:rgba(54,255,152,.055)}.evo-points span{color:var(--green)}.evo-points b{font:850 22px ui-monospace,monospace}.evo-points small{font-size:7px;color:#607f6f}.evolution-tree{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:10px}.branch{border:1px solid var(--line2);border-radius:20px;padding:13px;background:rgba(7,18,13,.78)}.branch-header{display:flex;align-items:center;gap:9px;margin-bottom:12px}.branch-header i{font-style:normal;width:34px;height:34px;border-radius:11px;display:grid;place-items:center;background:rgba(74,255,160,.06);color:var(--green)}.branch-header b,.branch-header small{display:block}.branch-header b{font-size:11px}.branch-header small{font-size:7px;color:#5d7b6c;margin-top:3px}.evo-node{position:relative;width:100%;margin-top:8px;padding:12px;border:1px solid var(--line2);border-radius:14px;text-align:left;color:var(--text);background:rgba(255,255,255,.018)}.evo-node:before{content:"";position:absolute;left:19px;top:-9px;width:1px;height:8px;background:rgba(85,255,166,.16)}.evo-node:first-of-type:before{display:none}.evo-node span{display:flex;justify-content:space-between;gap:8px}.evo-node b{font-size:9px}.evo-node strong{font:800 7px ui-monospace,monospace;color:#8affbe}.evo-node small{display:block;margin-top:5px;color:#5e7c6d;font-size:7px;line-height:1.4}.evo-node em{display:block;margin-top:8px;font:800 7px ui-monospace,monospace;color:var(--green);font-style:normal}.evo-node.locked{opacity:.43}.evo-node.maxed{border-color:rgba(78,255,164,.22);background:rgba(55,255,151,.045)}.placeholder-view{text-align:center;padding:60px 20px}.radar{position:relative;width:150px;height:150px;margin:auto;border:1px solid rgba(73,255,161,.18);border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle,rgba(52,255,151,.1),transparent 65%)}.radar:before,.radar:after,.radar i{content:"";position:absolute;border:1px solid rgba(73,255,161,.12);border-radius:50%}.radar:before{inset:26px}.radar:after{inset:52px}.radar i:first-child{left:50%;top:0;bottom:0;border-radius:0;border-width:0 0 0 1px}.radar i:nth-child(2){top:50%;left:0;right:0;border-radius:0;border-width:1px 0 0}.radar i:nth-child(3){inset:0;border:0;background:conic-gradient(from 0deg,rgba(65,255,158,.18),transparent 20%);animation:spin 4s linear infinite}.radar b{font-size:30px;color:var(--green)}.placeholder-view h3{font-size:23px;margin:23px 0 7px}.placeholder-view p{max-width:360px;margin:auto;color:var(--muted);font-size:11px;line-height:1.6}.placeholder-view>span{display:inline-block;margin-top:16px;padding:7px 10px;border:1px solid var(--line2);border-radius:99px;color:#587666;font:700 7px ui-monospace,monospace;letter-spacing:.12em}.profile-hero{border:1px solid var(--line);border-radius:23px;padding:17px;display:flex;align-items:center;gap:13px;background:linear-gradient(135deg,rgba(42,255,145,.07),rgba(7,18,13,.8))}.profile-hero>div:first-child{width:68px;height:68px;border-radius:23px;display:grid;place-items:center;border:1px solid rgba(77,255,165,.2);background:rgba(58,255,153,.07);color:var(--green);font-weight:900}.profile-hero small{font:750 7px ui-monospace,monospace;color:#4fe397}.profile-hero h3{margin:5px 0 3px;font-size:20px}.profile-hero p{margin:0;color:#668575;font-size:9px}.profile-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:9px}.profile-stats>div{border:1px solid var(--line2);border-radius:15px;padding:11px;background:rgba(7,18,13,.76)}.profile-stats small,.profile-stats b{display:block}.profile-stats small{font:700 6px ui-monospace,monospace;color:#557465}.profile-stats b{font:850 17px ui-monospace,monospace;margin-top:5px}.profile-card{margin-top:9px;border:1px solid var(--line2);border-radius:18px;padding:14px;background:rgba(7,18,13,.76)}.profile-card h4{margin:0 0 11px}.profile-card p{margin:0;color:#759283;font-size:10px}.skill-row{display:grid;grid-template-columns:1fr auto;gap:8px;padding:8px 0;border-bottom:1px solid rgba(255,255,255,.04)}.skill-row:last-child{border:0}.skill-row span{font-size:9px;color:#749182}.skill-row b{font:800 10px ui-monospace,monospace}.bottom-nav{position:fixed;z-index:30;left:50%;bottom:calc(8px + var(--safe-bottom));transform:translateX(-50%);width:min(730px,calc(100% - 20px));display:grid;grid-template-columns:repeat(6,1fr);padding:7px;border:1px solid rgba(255,255,255,.075);border-radius:22px;background:rgba(3,12,8,.94);backdrop-filter:blur(22px);box-shadow:0 16px 45px rgba(0,0,0,.43)}.bottom-nav button{border:0;border-radius:15px;padding:6px 3px;color:#506e5e;background:transparent}.bottom-nav i,.bottom-nav span{display:block}.bottom-nav i{font-style:normal;font-size:17px}.bottom-nav span{font-size:6.5px;margin-top:3px;white-space:nowrap}.bottom-nav button.active{color:#b2ffd2;background:rgba(63,255,156,.07)}
.sheet{position:fixed;z-index:60;inset:0;display:none;align-items:flex-end}.sheet.open{display:flex}.sheet-backdrop{position:absolute;inset:0;border:0;background:rgba(0,4,2,.72);backdrop-filter:blur(5px)}.sheet>section{position:relative;z-index:2;width:min(600px,100%);margin:auto;padding:18px 16px calc(20px + var(--safe-bottom));border:1px solid var(--line);border-bottom:0;border-radius:27px 27px 0 0;background:linear-gradient(180deg,#0a1811,#030805);animation:sheetUp .28s ease}.sheet header{display:flex;justify-content:space-between;align-items:center}.sheet header h3{margin:5px 0 0;font-size:20px}.sheet header button{width:36px;height:36px;border:1px solid var(--line2);border-radius:12px;background:rgba(255,255,255,.03);color:#87a595;font-size:20px}.module-emblem{width:74px;height:74px;margin:19px auto 13px;border:1px solid rgba(79,255,165,.22);border-radius:25px;display:grid;place-items:center;color:var(--green);font-size:31px;background:rgba(54,255,151,.055)}.sheet>section>p{text-align:center;color:#6f8e7e;font-size:10px;line-height:1.55}.sheet-level{margin-top:15px;padding:12px;border:1px solid var(--line2);border-radius:14px;display:flex;justify-content:space-between;background:rgba(255,255,255,.018)}.sheet-level span{color:#6c8a7a;font-size:9px}.sheet-level b{font:800 10px ui-monospace,monospace}.upgrade-benefit{margin-top:9px;padding:12px;border-left:2px solid var(--green);background:rgba(58,255,154,.035)}.upgrade-benefit small{font:750 7px ui-monospace,monospace;color:#4fe397}.upgrade-benefit p{margin:5px 0 0;color:#789586;font-size:9px}.upgrade-progress{margin-top:10px}.upgrade-progress.hidden{display:none}.upgrade-progress>span{display:block;height:5px;border-radius:99px;background:rgba(255,255,255,.06);overflow:hidden}.upgrade-progress i{display:block;width:0;height:100%;background:var(--amber);transition:width .6s}.upgrade-progress b,.upgrade-progress small{display:inline-block;margin-top:7px;font-size:8px}.upgrade-progress small{float:right;color:var(--amber)}.settings-panel{padding-bottom:calc(24px + var(--safe-bottom))!important}.toggle-row{margin-top:12px;padding:13px;border:1px solid var(--line2);border-radius:15px;display:flex;align-items:center;justify-content:space-between;gap:15px;background:rgba(255,255,255,.018)}.toggle-row b,.toggle-row small{display:block}.toggle-row b{font-size:10px}.toggle-row small{margin-top:4px;color:#607e6e;font-size:7px}.toggle-row input{display:none}.toggle-row>i{position:relative;width:43px;height:25px;border-radius:99px;background:#1b2b23;transition:.2s}.toggle-row>i:after{content:"";position:absolute;left:3px;top:3px;width:19px;height:19px;border-radius:50%;background:#739082;transition:.2s}.toggle-row input:checked+i{background:rgba(47,255,146,.2)}.toggle-row input:checked+i:after{transform:translateX(18px);background:var(--green)}.version-line{display:flex;justify-content:space-between;margin-top:17px;color:#526f60;font:700 8px ui-monospace,monospace}
.combat-view{max-width:940px;margin:0 auto}.combat-hero{margin-bottom:14px}.combat-power{min-width:96px}.evo-points.slim{min-width:92px;padding:10px 12px}.combat-console,.attack-panel,.infection-section{border:1px solid var(--line);border-radius:24px;background:linear-gradient(180deg,rgba(9,25,18,.9),rgba(4,12,8,.92));box-shadow:inset 0 1px rgba(255,255,255,.025)}.combat-console,.attack-panel{padding:16px}.infection-section{padding:15px;margin-top:14px}.combat-target-head,.attack-panel-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.combat-target-head h4,.attack-panel-top h4{margin:5px 0 4px;font-size:20px}.combat-target-head small,.attack-panel-top small{font:800 8px ui-monospace,monospace;letter-spacing:.15em;color:#4fe397}.combat-target-head p,.attack-panel-top p{margin:0;color:var(--muted);font-size:11px;line-height:1.45}.mini-ghost{border:1px solid var(--line2);border-radius:12px;padding:10px 12px;background:rgba(255,255,255,.02);color:#b7ffd8;font-size:11px}.target-list{display:grid;gap:10px;margin-top:14px}.target-card{border:1px solid var(--line2);border-radius:18px;padding:14px;background:rgba(255,255,255,.02);color:var(--text);text-align:left}.target-card.active{border-color:rgba(74,255,161,.45);background:rgba(57,255,150,.08);box-shadow:0 0 0 1px rgba(74,255,161,.15) inset}.target-card.locked{opacity:.78}.target-card-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.target-card-top b{font-size:15px}.target-card-top span{padding:5px 8px;border-radius:999px;background:rgba(77,255,164,.1);color:#adffd0;font-size:9px;font-weight:800}.target-card small{display:block;margin-top:4px;color:#7e9b8d;font-size:10px}.target-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:12px}.target-stats span{padding:8px 9px;border-radius:12px;background:rgba(255,255,255,.03);font-size:9px;color:#729182}.target-stats b{display:block;margin-top:5px;color:#d6ffe8;font-size:12px}.target-card em{display:block;margin-top:10px;color:#9ecab5;font-size:10px;font-style:normal}.attack-panel{margin-top:14px}.attack-chance{min-width:94px;padding:10px 12px;border-radius:18px;border:1px solid rgba(78,255,164,.2);background:rgba(77,255,164,.06);text-align:center}.attack-chance b{display:block;font-size:24px}.attack-chance span{display:block;margin-top:4px;color:#8ab39f;font-size:9px}.attempt-switcher{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:15px}.attempt-chip{border:1px solid var(--line2);border-radius:13px;padding:12px 10px;background:rgba(255,255,255,.02);color:#8dab9b;font-size:11px;font-weight:800}.attempt-chip.active{color:#d1ffe6;border-color:rgba(78,255,164,.42);background:rgba(72,255,160,.08)}.attack-button{margin-top:12px}.combat-result{margin-top:12px;padding:13px 14px;border-radius:16px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.02);display:grid;gap:4px}.combat-result.hidden{display:none}.combat-result.success{border-color:rgba(78,255,164,.24);background:rgba(72,255,160,.06)}.combat-result.fail{border-color:rgba(255,104,120,.24);background:rgba(255,104,120,.05)}.combat-result b{font-size:13px}.combat-result span,.combat-result small{color:#9fc0b0;font-size:10px}.infection-list,.history-list{display:grid;gap:9px;margin-top:14px}.status-card,.history-card{padding:13px 14px;border-radius:16px;border:1px solid var(--line2);background:rgba(255,255,255,.02);display:flex;justify-content:space-between;align-items:center;gap:10px}.status-card h4,.history-card b{margin:4px 0 0;font-size:15px}.status-card p,.history-card span{margin:4px 0 0;color:#7d9e8c;font-size:10px}.status-card small,.history-card small{font:800 8px ui-monospace,monospace;color:#4fe397;letter-spacing:.12em}.status-card b,.history-card strong{font:800 11px ui-monospace,monospace}.history-card.success strong{color:#adffd0}.history-card.fail strong{color:#ffadb8}.empty-state{padding:16px;border:1px dashed var(--line2);border-radius:16px;color:#779687;font-size:11px;text-align:center;background:rgba(255,255,255,.02)}
.toast{position:fixed;z-index:90;left:50%;bottom:calc(92px + var(--safe-bottom));transform:translate(-50%,18px);width:min(390px,calc(100% - 28px));padding:12px 14px;border:1px solid rgba(82,255,167,.2);border-radius:15px;background:rgba(4,18,11,.96);color:#caffdf;font-size:10px;opacity:0;pointer-events:none;transition:.25s;box-shadow:0 16px 45px rgba(0,0,0,.45)}.toast.show{opacity:1;transform:translate(-50%,0)}

.operations-view{max-width:940px;margin:0 auto}.operations-hero{align-items:stretch}.operations-wallet{display:grid;grid-template-columns:1fr 1fr;gap:8px;min-width:190px}.operations-wallet>span{padding:10px 12px;border:1px solid var(--line2);border-radius:15px;background:rgba(255,255,255,.025)}.operations-wallet small,.operations-wallet b{display:block}.operations-wallet small{font:800 7px ui-monospace,monospace;letter-spacing:.12em;color:#6c8b7b}.operations-wallet b{margin-top:5px;font-size:18px;color:#c9ffe0}.map-console,.sector-console,.operations-section{border:1px solid var(--line);border-radius:24px;background:linear-gradient(180deg,rgba(9,25,18,.91),rgba(4,12,8,.93));box-shadow:inset 0 1px rgba(255,255,255,.025)}.map-console,.sector-console{padding:15px}.sector-console,.operations-section{margin-top:14px}.operations-section{padding:15px}.map-toolbar{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:center}.map-toolbar>span{padding:9px 10px;border:1px solid var(--line2);border-radius:13px;background:rgba(255,255,255,.02)}.map-toolbar small,.map-toolbar b{display:block}.map-toolbar small{font:800 7px ui-monospace,monospace;letter-spacing:.11em;color:#5f8170}.map-toolbar b{margin-top:4px;font-size:12px}.operations-map{position:relative;height:410px;margin-top:13px;border:1px solid rgba(102,255,177,.13);border-radius:21px;overflow:hidden;background:radial-gradient(circle at 50% 50%,rgba(62,255,157,.1),transparent 24%),linear-gradient(180deg,rgba(6,20,14,.9),rgba(2,8,5,.98))}.map-grid{position:absolute;inset:0;opacity:.18;background-image:linear-gradient(rgba(76,255,166,.13) 1px,transparent 1px),linear-gradient(90deg,rgba(76,255,166,.13) 1px,transparent 1px);background-size:32px 32px;mask-image:radial-gradient(circle,#000,transparent 80%)}.map-sweep{position:absolute;left:50%;top:50%;width:68%;aspect-ratio:1;border-radius:50%;transform:translate(-50%,-50%);overflow:hidden;border:1px solid rgba(81,255,164,.09)}.map-sweep:before{content:"";position:absolute;inset:-50%;background:conic-gradient(from 0deg,transparent 0 83%,rgba(80,255,164,.12) 90%,rgba(80,255,164,.5) 99%,transparent 100%);animation:mapSweep 7s linear infinite}.map-links{position:absolute;inset:0;width:100%;height:100%;overflow:visible}.map-links path,.map-links circle{fill:none;stroke:rgba(99,255,180,.16);stroke-width:.45;stroke-dasharray:2 2;vector-effect:non-scaling-stroke}.map-links circle{stroke-dasharray:1.2 3}.map-core{position:absolute;z-index:4;left:50%;top:50%;width:66px;height:66px;transform:translate(-50%,-50%);display:grid;place-items:center;border-radius:24px;border:1px solid rgba(99,255,180,.28);background:rgba(30,112,70,.28);box-shadow:0 0 45px rgba(52,255,152,.12),inset 0 0 22px rgba(61,255,156,.08)}.map-core i{position:absolute;inset:-11px;border:1px dashed rgba(91,255,173,.22);border-radius:30px;animation:spin 13s linear infinite}.map-core b{font:900 11px ui-monospace,monospace;letter-spacing:.15em;color:#aaffcf}.sector-nodes{position:absolute;inset:0}.sector-node{position:absolute;z-index:5;width:66px;min-height:66px;transform:translate(-50%,-50%);padding:6px;border:1px solid rgba(98,255,179,.23);border-radius:20px;background:rgba(5,20,13,.92);color:#caffdf;text-align:center;box-shadow:0 8px 24px rgba(0,0,0,.35);transition:.2s}.sector-node i,.sector-node span,.sector-node small{display:block}.sector-node i{font-style:normal;font-size:19px;color:var(--green)}.sector-node span{margin-top:4px;font-size:7px;line-height:1.15;font-weight:800}.sector-node small{margin-top:4px;font:800 6px ui-monospace,monospace;color:#638270;letter-spacing:.08em}.sector-node.selected{border-color:rgba(104,255,184,.72);background:rgba(48,255,151,.12);box-shadow:0 0 0 3px rgba(60,255,157,.05),0 0 28px rgba(58,255,155,.16)}.sector-node.locked{filter:grayscale(.45);opacity:.48}.sector-node.locked i{color:#6f8178}.sector-node.active-operation:after{content:"";position:absolute;inset:-5px;border:1px solid var(--amber);border-radius:24px;animation:operationPulse 1.7s ease-in-out infinite}.sector-head{display:flex;justify-content:space-between;align-items:flex-start;gap:13px}.sector-head small{font:800 8px ui-monospace,monospace;letter-spacing:.13em;color:#4fe397}.sector-head h4{margin:6px 0 5px;font-size:21px}.sector-head p{margin:0;max-width:590px;color:#769484;font-size:10px;line-height:1.55}.sector-risk{min-width:76px;padding:10px;border:1px solid rgba(255,189,89,.2);border-radius:17px;background:rgba(255,189,89,.05);text-align:center}.sector-risk b,.sector-risk span{display:block}.sector-risk b{font-size:20px;color:var(--amber)}.sector-risk span{margin-top:3px;font-size:8px;color:#937d57}.sector-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:14px}.sector-metrics>div{padding:11px;border:1px solid var(--line2);border-radius:14px;background:rgba(255,255,255,.02)}.sector-metrics small,.sector-metrics b{display:block}.sector-metrics small{font:800 7px ui-monospace,monospace;color:#5f7f6e;letter-spacing:.1em}.sector-metrics b{margin-top:5px;font-size:13px}.sector-rewards{margin-top:10px;padding:12px;border-left:2px solid var(--green);background:rgba(54,255,151,.035)}.sector-rewards>small{font:800 7px ui-monospace,monospace;letter-spacing:.12em;color:#4fe397}.sector-rewards>div{display:flex;gap:14px;flex-wrap:wrap;margin-top:7px}.sector-rewards span{color:#86a796;font-size:10px}.sector-rewards b{color:#d4ffe7}.sector-requirement{margin-top:10px;padding:10px 12px;border:1px dashed var(--line2);border-radius:13px;color:#789989;font-size:9px;line-height:1.45}.operation-launch{margin-top:10px}.archive-counter{color:#789888;font-size:9px}.active-operations-list,.operations-history-list{display:grid;gap:9px;margin-top:13px}.expedition-card{display:grid;grid-template-columns:auto 1fr auto;gap:11px;align-items:center;padding:12px;border:1px solid var(--line2);border-radius:17px;background:rgba(255,255,255,.02)}.expedition-card.ready{border-color:rgba(83,255,169,.3);background:rgba(57,255,154,.055)}.expedition-icon,.operation-history-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:14px;border:1px solid rgba(82,255,169,.18);background:rgba(54,255,151,.055);color:var(--green);font-size:18px}.expedition-main small{font:800 7px ui-monospace,monospace;letter-spacing:.1em;color:#5d806d}.expedition-main h4{margin:4px 0 7px;font-size:13px}.expedition-main>span{display:block;margin-top:5px;color:#8aa997;font-size:8px}.expedition-progress{height:5px;border-radius:99px;background:rgba(255,255,255,.06);overflow:hidden}.expedition-progress i{display:block;height:100%;background:linear-gradient(90deg,#20c976,#72ffb7);box-shadow:0 0 12px rgba(66,255,159,.35)}.claim-expedition{border:1px solid rgba(73,255,162,.28);border-radius:12px;padding:9px 10px;background:rgba(59,255,152,.09);color:#c6ffdc;font-size:9px;font-weight:850}.claim-expedition.waiting{color:#607e6e;border-color:var(--line2);background:rgba(255,255,255,.02)}.operation-history-card{display:grid;grid-template-columns:auto 1fr auto;gap:11px;align-items:center;padding:12px;border:1px solid var(--line2);border-radius:17px;background:rgba(255,255,255,.02)}.operation-history-card small{font:800 7px ui-monospace,monospace;color:#5f816e}.operation-history-card h4{margin:4px 0;font-size:13px}.operation-history-card p{margin:0;color:#809f8f;font-size:9px}.operation-history-card span{display:block;margin-top:5px;color:#b4d8c5;font-size:8px;line-height:1.4}.operation-history-card>b{font:850 8px ui-monospace,monospace}.operation-history-card.success>b{color:#aaffce}.operation-history-card.fail>b{color:#ff9cab}
@keyframes mapSweep{to{transform:rotate(360deg)}}@keyframes operationPulse{0%,100%{opacity:.35;transform:scale(.97)}50%{opacity:1;transform:scale(1.04)}}
.virus-visual{--glow:#51ffa2;position:absolute;z-index:4;left:50%;top:50%;width:105px;height:105px;transform:translate(-50%,-50%);filter:drop-shadow(0 0 20px color-mix(in srgb,var(--glow) 45%,transparent));animation:virusFloat 4s ease-in-out infinite}.virus-body{position:absolute;inset:13px;border:1px solid color-mix(in srgb,var(--glow) 55%,white 8%);border-radius:46% 54% 48% 52%;background:radial-gradient(circle at 35% 28%,rgba(255,255,255,.7) 0 3%,transparent 4%),radial-gradient(circle at 45% 45%,color-mix(in srgb,var(--glow) 82%,white 10%) 0 6%,transparent 7%),radial-gradient(circle at 64% 58%,var(--glow) 0 7%,transparent 8%),radial-gradient(circle at 50% 50%,color-mix(in srgb,var(--glow) 75%,#174c33) 0,color-mix(in srgb,var(--glow) 35%,#082519) 58%,#03120b 100%);box-shadow:inset 0 0 22px rgba(255,255,255,.13),0 0 25px color-mix(in srgb,var(--glow) 45%,transparent);animation:morph 6s ease-in-out infinite}.nucleus{position:absolute;width:7px;height:7px;border-radius:50%;background:#eafff1;box-shadow:0 0 8px var(--glow)}.n1{left:28%;top:29%}.n2{right:26%;top:51%;width:11px;height:11px;background:var(--glow)}.n3{left:46%;bottom:22%;width:5px;height:5px}.appendage{position:absolute;left:50%;top:50%;width:4px;height:26px;margin-left:-2px;margin-top:-56px;transform-origin:2px 56px;background:linear-gradient(var(--glow),transparent);border-radius:99px;opacity:.75}.a2{transform:rotate(45deg)}.a3{transform:rotate(90deg)}.a4{transform:rotate(135deg)}.a5{transform:rotate(180deg)}.a6{transform:rotate(225deg)}.a7{transform:rotate(270deg)}.a8{transform:rotate(315deg)}.orbit{position:absolute;inset:-4px;border:1px dashed color-mix(in srgb,var(--glow) 30%,transparent);border-radius:50%;animation:spin 12s linear infinite}.orbit-2{inset:-16px;opacity:.38;animation-direction:reverse;animation-duration:18s}.glow-cyan{--glow:#45eaff}.glow-violet{--glow:#9a77ff}.glow-amber{--glow:#ffbd59}.shape-cell .virus-body{border-radius:56% 44% 64% 36%}.shape-crystal .virus-body{border-radius:22%;transform:rotate(12deg)}.shape-phantom .virus-body{border-radius:68% 32% 64% 36%;opacity:.78;filter:blur(.4px)}.shell-armored .virus-body{border-width:3px}.shell-segmented .virus-body{background-image:repeating-radial-gradient(circle at 50%,transparent 0 10px,rgba(255,255,255,.08) 11px 12px),radial-gradient(circle,var(--glow),#082519)}.shell-energy .virus-body{animation:morph 6s ease-in-out infinite,energy 2.5s linear infinite}.appendages-tendrils .appendage{height:35px;width:2px;border-radius:50%;filter:blur(.2px)}.appendages-rings .appendage{display:none}.appendages-rings .orbit{border-style:solid;opacity:.65}.appendages-none .appendage,.appendages-none .orbit{display:none}.motion-pulse{animation:virusPulse 2.3s ease-in-out infinite}.motion-orbit{animation:virusOrbit 4.8s ease-in-out infinite}.motion-drift{animation:virusDrift 5s ease-in-out infinite}.dashboard-virus{width:150px;height:150px}.dashboard-virus .virus-body{inset:18px}.dashboard-virus .appendage{height:35px;margin-top:-76px;transform-origin:2px 76px}
body.effects-off .ambient i,body.effects-off .scene-fog,body.effects-off .bubbles,body.effects-off .scan-line{display:none}body.effects-off *{animation-duration:.001ms!important;animation-iteration-count:1!important}
@media(max-width:760px){.creator-layout{grid-template-columns:1fr}.specimen-stage{min-height:420px}.chamber-glass{height:285px}.wizard-panel{min-height:510px}.module-grid{grid-template-columns:repeat(2,1fr)}.evolution-tree{grid-template-columns:1fr}.living-scene{height:510px}.central-chamber{width:215px}.tube{height:305px}.hotspot{width:95px}.h-growth,.h-reactor{left:9px}.h-analyzer,.h-storage{right:9px}.combat-target-head,.attack-panel-top{flex-direction:column}.target-stats,.attempt-switcher{grid-template-columns:1fr}.status-card,.history-card{align-items:flex-start;flex-direction:column}.operations-hero{flex-direction:column}.operations-wallet{width:100%}.operations-map{height:360px}.sector-head{flex-direction:column}.map-toolbar{grid-template-columns:1fr 1fr}.map-toolbar .mini-ghost{grid-column:1/3}.expedition-card,.operation-history-card{grid-template-columns:auto 1fr}.claim-expedition,.operation-history-card>b{grid-column:1/3;width:100%}}@media(max-width:410px){.resource-rack{grid-template-columns:1fr 1fr}.resource-rack>div:last-child{grid-column:1/3}.living-scene{height:500px}.hotspot{width:86px;padding:7px}.hotspot span{display:none}.operations-row{grid-template-columns:1fr}.central-chamber{width:190px}.tube{height:290px}.dashboard-virus{width:128px;height:128px}.h-growth,.h-analyzer{top:105px}.h-reactor,.h-storage{top:285px}.bottom-nav{padding:5px}.bottom-nav button{padding:6px 1px}.bottom-nav span{font-size:5.5px}.bottom-nav i{font-size:15px}.operations-map{height:330px}.sector-node{width:56px;min-height:56px;border-radius:17px}.sector-node span{font-size:6px}.sector-metrics{grid-template-columns:1fr}.sector-rewards>div{display:grid;grid-template-columns:1fr 1fr}.map-core{width:54px;height:54px}.map-toolbar{grid-template-columns:1fr}.map-toolbar .mini-ghost{grid-column:auto}.operations-wallet{grid-template-columns:1fr 1fr}}
@keyframes screenIn{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}@keyframes stepIn{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:none}}@keyframes sheetUp{from{transform:translateY(25px);opacity:.4}to{transform:none;opacity:1}}@keyframes ambient{50%{transform:translate(45px,-35px) scale(1.2)}}@keyframes loading{from{transform:translateX(-110%)}to{transform:translateX(310%)}}@keyframes spin{to{transform:rotate(360deg)}}@keyframes blink{50%{opacity:.35}}@keyframes scan{0%,100%{top:17%;opacity:.3}50%{top:82%;opacity:1}}@keyframes fluid{50%{transform:translateY(-7px) scaleY(1.03)}}@keyframes bubble{0%{transform:translateY(0);opacity:0}15%{opacity:.65}100%{transform:translateY(-245px);opacity:0}}@keyframes morph{0%,100%{border-radius:46% 54% 48% 52%}50%{border-radius:58% 42% 62% 38%}}@keyframes virusFloat{0%,100%{transform:translate(-50%,-50%) translateY(-7px) rotate(-2deg)}50%{transform:translate(-50%,-50%) translateY(9px) rotate(3deg)}}@keyframes virusPulse{0%,100%{transform:translate(-50%,-50%) scale(.94)}50%{transform:translate(-50%,-50%) scale(1.07)}}@keyframes virusOrbit{0%,100%{transform:translate(-50%,-50%) rotate(-5deg) translateX(-8px)}50%{transform:translate(-50%,-50%) rotate(8deg) translateX(8px)}}@keyframes virusDrift{0%,100%{transform:translate(-50%,-50%) translate(-9px,-3px)}50%{transform:translate(-50%,-50%) translate(10px,6px)}}@keyframes energy{to{filter:hue-rotate(40deg)}}@keyframes reaction{0%{transform:translate(-50%,-50%) scale(1)}35%{transform:translate(-50%,-50%) scale(1.18) rotate(8deg)}100%{transform:translate(-50%,-50%) scale(1)}}
button:focus-visible,input:focus-visible{outline:2px solid var(--green);outline-offset:3px}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}

/* v3.4 Corporations */
.corporation-view{max-width:960px;margin:0 auto}.corporation-hero{margin-bottom:12px}.corp-level-badge{width:96px;height:96px;border:1px solid rgba(77,255,165,.22);border-radius:29px;display:grid;place-items:center;align-content:center;background:rgba(57,255,153,.055)}.corp-level-badge span,.corp-level-badge small{font:800 7px ui-monospace,monospace;color:#618371}.corp-level-badge b{font:900 26px ui-monospace,monospace;color:#d9ffe9;margin:3px 0}.corp-entry-grid,.corp-command-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.corp-entry-card,.corp-command-card,.corp-contribution-panel,.corp-bonuses-panel,.corp-tech-section,.corp-members-section,.corp-activity-section,.corp-directory-section{border:1px solid var(--line);border-radius:22px;padding:16px;background:linear-gradient(180deg,rgba(9,25,18,.88),rgba(4,12,8,.9));box-shadow:inset 0 1px rgba(255,255,255,.025)}.corp-entry-icon{width:48px;height:48px;border:1px solid rgba(78,255,164,.22);border-radius:16px;display:grid;place-items:center;color:var(--green);font-size:22px;background:rgba(61,255,155,.06)}.corp-entry-card>small,.corp-command-card>small{display:block;margin-top:13px;font:800 7px ui-monospace,monospace;letter-spacing:.15em;color:#4fe397}.corp-entry-card h4,.corp-command-card h4{margin:6px 0 5px;font-size:20px}.corp-entry-card p,.corp-command-card p{margin:0;color:#719080;font-size:10px;line-height:1.55}.corp-entry-card label,.corp-contribution-inputs label{display:block;margin-top:14px;color:#84a494;font-size:9px;font-weight:800}.corp-entry-card input,.corp-contribution-inputs input{display:block;width:100%;margin-top:7px;padding:12px 13px;border:1px solid var(--line2);border-radius:13px;background:rgba(0,0,0,.22);color:var(--text);outline:none}.corp-directory-section,.corp-contribution-panel,.corp-bonuses-panel,.corp-tech-section,.corp-members-section,.corp-activity-section{margin-top:10px}.corp-directory{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.corp-directory-card{border:1px solid var(--line2);border-radius:16px;padding:12px;background:rgba(255,255,255,.018);text-align:left;color:var(--text)}.corp-directory-card b,.corp-directory-card small,.corp-directory-card span{display:block}.corp-directory-card b{font-size:12px}.corp-directory-card small{margin-top:4px;color:#688878;font-size:8px}.corp-directory-card span{margin-top:9px;color:#a8ffd0;font:800 8px ui-monospace,monospace}.corp-member-state.hidden,.corp-guest-state.hidden{display:none}.corp-identity{position:relative;overflow:hidden}.corp-identity:after{content:"⬡";position:absolute;right:13px;bottom:-18px;color:rgba(73,255,160,.06);font-size:110px}.corp-xp-line{position:relative;z-index:1;margin-top:13px}.corp-xp-line>span{display:block;height:7px;border-radius:99px;background:rgba(255,255,255,.06);overflow:hidden}.corp-xp-line i{display:block;width:0;height:100%;background:linear-gradient(90deg,var(--green2),#8dffc5);transition:width .35s}.corp-xp-line b{display:block;margin-top:7px;color:#86a696;font:800 8px ui-monospace,monospace}.treasury-values{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:12px 0}.treasury-values span{padding:10px 8px;border:1px solid var(--line2);border-radius:13px;background:rgba(255,255,255,.02);text-align:center;font-size:10px}.treasury-values b{display:block;margin-top:4px;font:850 13px ui-monospace,monospace}.corp-contribution-inputs{display:grid;grid-template-columns:1fr 1fr auto;gap:9px;align-items:end}.corp-contribution-inputs label{margin-top:0}.corp-contribution-inputs button{height:43px;padding:0 18px}.corp-bonus-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.corp-bonus-grid>div{border:1px solid var(--line2);border-radius:15px;padding:12px;background:rgba(255,255,255,.018)}.corp-bonus-grid small,.corp-bonus-grid b{display:block}.corp-bonus-grid small{font:750 6px ui-monospace,monospace;color:#557465}.corp-bonus-grid b{margin-top:6px;font:900 16px ui-monospace,monospace;color:#d4ffe6}.corp-tech-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.corp-tech-card{border:1px solid var(--line2);border-radius:18px;padding:13px;background:rgba(255,255,255,.018)}.corp-tech-card.locked{opacity:.48}.corp-tech-head{display:flex;gap:10px;align-items:center}.corp-tech-head>i{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:rgba(65,255,158,.06);font-style:normal;font-size:21px}.corp-tech-head b,.corp-tech-head small{display:block}.corp-tech-head b{font-size:11px}.corp-tech-head small{margin-top:4px;color:#6c8c7c;font:800 7px ui-monospace,monospace}.corp-tech-card p{margin:11px 0;color:#729182;font-size:9px;line-height:1.45}.corp-tech-card button{width:100%;border:1px solid rgba(75,255,161,.23);border-radius:12px;padding:10px;background:rgba(58,255,153,.06);color:#beffda;font-size:9px;font-weight:850}.corp-tech-card button:disabled{opacity:.45}.corp-members-list,.corp-activity-list{display:grid;gap:8px}.corp-member-card,.corp-activity-card{border:1px solid var(--line2);border-radius:15px;padding:12px;background:rgba(255,255,255,.018);display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center}.corp-member-card b,.corp-member-card small,.corp-member-card span{display:block}.corp-member-card b{font-size:11px}.corp-member-card small{margin-top:4px;color:#658575;font-size:8px}.corp-member-card span{margin-top:6px;color:#93c5ab;font:750 7px ui-monospace,monospace}.corp-role-control{display:flex;gap:5px}.corp-role-control button{border:1px solid var(--line2);border-radius:9px;padding:7px 8px;background:rgba(255,255,255,.025);color:#8aa999;font-size:7px}.corp-role-control button.active{border-color:rgba(77,255,164,.35);color:#c3ffdd;background:rgba(59,255,153,.07)}.corp-activity-card{grid-template-columns:1fr auto}.corp-activity-card b,.corp-activity-card small,.corp-activity-card span{display:block}.corp-activity-card b{font-size:10px}.corp-activity-card span{margin-top:4px;color:#789687;font-size:8px}.corp-activity-card small{font:750 7px ui-monospace,monospace;color:#527262}.danger-action{width:100%;margin-top:10px;border:1px solid rgba(255,104,120,.25);border-radius:15px;padding:12px;background:rgba(255,78,100,.05);color:#ffadb8;font-weight:800}.bottom-nav.six-items{grid-template-columns:repeat(6,1fr)}
@media(max-width:760px){.corp-entry-grid,.corp-command-grid,.corp-tech-grid{grid-template-columns:1fr}.corp-directory{grid-template-columns:1fr}.corp-contribution-inputs{grid-template-columns:1fr 1fr}.corp-contribution-inputs button{grid-column:1/3}.corp-bonus-grid{grid-template-columns:1fr 1fr}.corporation-hero{flex-direction:column;align-items:flex-start}.corp-level-badge{width:100%;height:auto;padding:12px;display:flex;justify-content:space-between;align-items:center}.corp-level-badge b{font-size:20px}.corp-member-card{grid-template-columns:1fr}.corp-role-control{justify-content:flex-start}}
@media(max-width:410px){.bottom-nav.six-items span{font-size:5px}.bottom-nav.six-items i{font-size:14px}.corp-contribution-inputs{grid-template-columns:1fr}.corp-contribution-inputs button{grid-column:auto}.corp-bonus-grid{grid-template-columns:1fr 1fr}.treasury-values{grid-template-columns:1fr}.corp-directory-section,.corp-entry-card,.corp-command-card,.corp-contribution-panel,.corp-bonuses-panel,.corp-tech-section,.corp-members-section,.corp-activity-section{padding:13px}}

/* v3.5 Full Game Polish */
.header-actions{display:flex;align-items:center;gap:8px}.connection-badge{height:34px;padding:0 10px;border:1px solid rgba(81,255,162,.18);border-radius:12px;display:flex;align-items:center;gap:7px;background:rgba(44,255,145,.045);color:#9fffc8;font:800 7px ui-monospace,monospace;letter-spacing:.12em}.connection-badge i{width:6px;height:6px;border-radius:50%;background:var(--green);box-shadow:0 0 12px rgba(81,255,162,.8)}.connection-badge.offline{border-color:rgba(255,104,120,.25);color:#ffadb8;background:rgba(255,104,120,.05)}.connection-badge.offline i{background:var(--danger);box-shadow:0 0 12px rgba(255,104,120,.7)}
.command-center{max-width:940px;margin:0 auto 14px;border:1px solid var(--line);border-radius:22px;padding:13px;background:linear-gradient(180deg,rgba(9,25,18,.82),rgba(4,12,8,.88))}.command-center-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.command-center-head small{display:block;font:800 7px ui-monospace,monospace;letter-spacing:.15em;color:#4fe397}.command-center-head h3{margin:5px 0 0;font-size:15px}.command-center-head>b{min-width:30px;height:30px;border-radius:10px;display:grid;place-items:center;border:1px solid rgba(78,255,164,.18);color:#b9ffd6;background:rgba(59,255,153,.05);font:850 10px ui-monospace,monospace}.action-center-list{display:flex;gap:8px;margin-top:11px;overflow-x:auto;scrollbar-width:none;padding-bottom:1px}.action-center-list::-webkit-scrollbar{display:none}.action-card{min-width:205px;flex:1;border:1px solid var(--line2);border-radius:16px;padding:11px;background:rgba(255,255,255,.018);color:var(--text);text-align:left;display:grid;grid-template-columns:34px 1fr auto;gap:9px;align-items:center}.action-card>i{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;background:rgba(64,255,157,.06);font-style:normal}.action-card b,.action-card small{display:block}.action-card b{font-size:10px}.action-card small{margin-top:4px;color:#6f8e7e;font-size:8px;line-height:1.35}.action-card>strong{color:#6e9a82;font-size:16px}.action-center-empty{width:100%;padding:11px;border:1px dashed var(--line2);border-radius:14px;color:#718e7f;text-align:center;font-size:9px}
.profile-title{display:inline-flex!important;width:max-content;margin:5px 0!important;padding:5px 8px;border:1px solid rgba(78,255,164,.19);border-radius:999px;background:rgba(59,255,153,.05);color:#baffd7!important;font:800 7px ui-monospace,monospace;letter-spacing:.08em}.achievement-section,.collection-section{margin-top:12px;border:1px solid var(--line);border-radius:22px;padding:15px;background:linear-gradient(180deg,rgba(9,25,18,.86),rgba(4,12,8,.9))}.achievement-list,.title-collection{display:grid;grid-template-columns:repeat(2,1fr);gap:9px;margin-top:13px}.achievement-card,.title-card{border:1px solid var(--line2);border-radius:17px;padding:12px;background:rgba(255,255,255,.018)}.achievement-card.completed{border-color:rgba(78,255,164,.24);background:rgba(59,255,153,.04)}.achievement-card.claimed{opacity:.72}.achievement-head{display:flex;align-items:center;gap:9px}.achievement-head>i{width:36px;height:36px;border-radius:12px;display:grid;place-items:center;background:rgba(65,255,158,.06);font-style:normal;font-size:18px}.achievement-head b,.achievement-head small{display:block}.achievement-head b{font-size:10px}.achievement-head small{margin-top:3px;color:#628172;font-size:7px}.achievement-card>p{min-height:28px;margin:10px 0;color:#739182;font-size:8px;line-height:1.45}.achievement-progress{height:6px;border-radius:99px;background:rgba(255,255,255,.06);overflow:hidden}.achievement-progress i{display:block;height:100%;background:linear-gradient(90deg,var(--green2),#8dffc5);transition:width .35s}.achievement-foot{display:flex;justify-content:space-between;align-items:center;gap:7px;margin-top:9px}.achievement-foot span{color:#86aa98;font:800 7px ui-monospace,monospace}.achievement-foot button{border:1px solid rgba(78,255,164,.25);border-radius:9px;padding:7px 8px;background:rgba(59,255,153,.06);color:#c5ffdd;font-size:7px;font-weight:850}.achievement-foot button:disabled{opacity:.45}.title-card{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center}.title-card.locked{opacity:.45}.title-card.selected{border-color:rgba(78,255,164,.38);background:rgba(59,255,153,.06)}.title-card b,.title-card small{display:block}.title-card b{font-size:10px}.title-card small{margin-top:4px;color:#668575;font-size:7px}.title-card button{border:1px solid var(--line2);border-radius:9px;padding:7px 8px;background:rgba(255,255,255,.025);color:#9dbbaa;font-size:7px}.title-card.selected button{color:#c8ffe0;border-color:rgba(78,255,164,.25)}
.quality-row{margin-top:12px;padding:13px;border:1px solid var(--line2);border-radius:15px;display:flex;align-items:center;justify-content:space-between;gap:14px;background:rgba(255,255,255,.018)}.quality-row b,.quality-row small{display:block}.quality-row b{font-size:10px}.quality-row small{margin-top:4px;color:#607e6e;font-size:7px}.quality-row select{min-width:132px;border:1px solid var(--line2);border-radius:11px;padding:9px 10px;background:#08130e;color:var(--text);font-size:9px}.diagnostic-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.diagnostic-grid>div{border:1px solid var(--line2);border-radius:13px;padding:10px;background:rgba(255,255,255,.018)}.diagnostic-grid small,.diagnostic-grid b{display:block}.diagnostic-grid small{font:800 6px ui-monospace,monospace;color:#587666}.diagnostic-grid b{margin-top:5px;font:850 9px ui-monospace,monospace;color:#c2ffda}
.offline-banner{position:fixed;z-index:95;top:calc(env(safe-area-inset-top,0px) + var(--tg-top-offset) + 8px);left:50%;transform:translate(-50%,-130%);width:min(520px,calc(100% - 28px));padding:10px 13px;border:1px solid rgba(255,104,120,.3);border-radius:14px;background:rgba(36,7,12,.96);color:#ffd2d8;font-size:9px;text-align:center;transition:.25s}.offline-banner.show{transform:translate(-50%,0)}
.tutorial-overlay{position:fixed;z-index:110;inset:0;display:none;align-items:flex-end}.tutorial-overlay.open{display:flex}.tutorial-backdrop{position:absolute;inset:0;border:0;background:rgba(0,4,2,.78);backdrop-filter:blur(4px)}.tutorial-card{position:relative;z-index:2;width:min(560px,calc(100% - 20px));margin:0 auto calc(12px + var(--safe-bottom));padding:17px;border:1px solid rgba(78,255,164,.22);border-radius:24px;background:linear-gradient(180deg,#0b1d14,#040a07);box-shadow:0 25px 80px rgba(0,0,0,.55);animation:sheetUp .28s ease}.tutorial-progress{height:4px;border-radius:99px;background:rgba(255,255,255,.06);overflow:hidden;margin-bottom:14px}.tutorial-progress i{display:block;width:20%;height:100%;background:linear-gradient(90deg,var(--green2),#8dffc5);transition:width .25s}.tutorial-card>small{font:800 7px ui-monospace,monospace;letter-spacing:.15em;color:#4fe397}.tutorial-card h3{margin:7px 0 5px;font-size:21px}.tutorial-card p{margin:0;color:#789687;font-size:10px;line-height:1.55}.tutorial-actions{display:grid;grid-template-columns:1fr 1.4fr;gap:8px;margin-top:15px}.tutorial-focus{position:relative;z-index:111!important;outline:2px solid rgba(81,255,162,.72)!important;outline-offset:5px;box-shadow:0 0 0 9999px rgba(0,4,2,.45),0 0 35px rgba(81,255,162,.22)!important}.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
button.busy{position:relative;color:transparent!important;pointer-events:none}button.busy:after{content:"";position:absolute;left:50%;top:50%;width:17px;height:17px;margin:-9px;border:2px solid rgba(255,255,255,.25);border-top-color:var(--green);border-radius:50%;animation:spin .7s linear infinite}.view{contain:layout style}.quality-economy .ambient i,.quality-economy .scene-fog,.quality-economy .bubbles,.quality-economy .scan-line,.quality-economy .map-pulse{display:none!important}.quality-economy .sheet-backdrop,.quality-economy .bottom-nav{backdrop-filter:none}.quality-balanced .ambient i{filter:blur(100px);opacity:.04}.quality-high .ambient i{opacity:.1}.motion-reduced *,.motion-reduced *:before,.motion-reduced *:after{animation-duration:.001ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.001ms!important}
@media(max-width:760px){.achievement-list,.title-collection{grid-template-columns:1fr}.command-center{padding:11px}.action-card{min-width:190px}.quality-row{align-items:flex-start;flex-direction:column}.quality-row select{width:100%}}
@media(max-width:410px){.connection-badge b{display:none}.connection-badge{width:34px;padding:0;justify-content:center}.achievement-section,.collection-section{padding:12px}.tutorial-card{padding:14px}.action-card{min-width:176px}}

/* v3.5.4 — layout hotfix and interaction polish */
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{overscroll-behavior-y:none;-webkit-tap-highlight-color:transparent}
body.sheet-open{overflow:hidden;touch-action:none}
button,input,select{min-width:0}
button{touch-action:manipulation;user-select:none;-webkit-user-select:none;transition:transform .16s ease,border-color .2s ease,background-color .2s ease,box-shadow .2s ease,opacity .2s ease,filter .2s ease}
button:not(:disabled):active{transform:scale(.975)}
button:disabled{opacity:.48;filter:saturate(.7);box-shadow:none!important}
.primary,.secondary,.activate-button,.collect-button,.operation-card,.danger-action,.mini-ghost,.claim-expedition,.corp-tech-card button,.corp-contribution-inputs button{min-height:48px;display:flex;align-items:center;justify-content:center}
.primary,.secondary{line-height:1.2;text-align:center}
.round-button{min-width:44px;min-height:44px}
.screen{padding-bottom:calc(112px + var(--safe-bottom))}
.game-header,.simple-header,.resource-rack,.command-center,.view{width:100%;min-width:0}
.view{opacity:0;transform:translate3d(0,8px,0);pointer-events:none;visibility:hidden;transition:opacity .24s ease,transform .28s cubic-bezier(.2,.8,.2,1)}
.view.active{opacity:1;transform:translate3d(0,0,0);pointer-events:auto;visibility:visible}
.resource-rack>div,.module-card,.operation-card,.action-card,.target-card,.sector-detail,.profile-card,.corp-tech-card,.achievement-card,.title-card{min-width:0}
.operations-row,.module-grid,.corp-tech-grid,.achievement-list,.title-collection{grid-auto-rows:1fr;align-items:stretch}
.operation-card,.module-card,.corp-tech-card,.achievement-card,.title-card{height:100%}
.operation-card{align-items:center;justify-content:flex-start;text-align:left}
.module-card{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start}
.module-card em{margin-top:auto}
.action-center-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(205px,1fr));overflow:visible;align-items:stretch}
.action-card{min-width:0;width:100%;height:100%}
.bottom-nav{bottom:calc(8px + var(--safe-bottom));grid-auto-rows:1fr;padding:7px;gap:3px;transform:translate3d(-50%,0,0);will-change:transform}
.bottom-nav button{min-width:0;min-height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:6px 2px;text-align:center}
.bottom-nav button.active{box-shadow:inset 0 0 0 1px rgba(80,255,164,.11)}
.bottom-nav i{line-height:1;font-size:16px}.bottom-nav span{display:block;line-height:1.2;font-size:8px;font-weight:700;letter-spacing:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;text-align:center}
.sheet{transition:visibility .25s ease}.sheet>section{max-height:min(88dvh,760px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.sheet-backdrop{transition:opacity .22s ease}
.sheet:not(.open){visibility:hidden}.sheet.open{visibility:visible}
.sheet.open .sheet-backdrop{animation:fadeIn .2s ease}
.toast{max-width:min(390px,calc(100% - 24px));line-height:1.45}
.expedition-progress i,.achievement-progress i,.corp-xp-line i,.meter i{will-change:width}
.target-card,.sector-node,.corp-directory-card,.module-card,.operation-card,.action-card,.achievement-card,.title-card{will-change:transform}
@media(hover:hover) and (pointer:fine){button:not(:disabled):hover{filter:brightness(1.08)}.target-card:not(:disabled):hover,.module-card:not(:disabled):hover,.operation-card:not(:disabled):hover,.action-card:not(:disabled):hover,.achievement-card:hover,.title-card:hover{transform:translateY(-2px);border-color:rgba(88,255,172,.24)}}
@media(max-width:560px){
  .action-center-list{grid-template-columns:1fr}
  .action-card{min-height:62px}
  .operations-row{grid-template-columns:1fr}
  .corp-tech-grid{grid-template-columns:1fr}
  .view-hero{align-items:flex-start}
}
@media(max-width:410px){
  :root{--header-gap:50px}
  .screen{padding-left:10px;padding-right:10px;padding-bottom:calc(106px + var(--safe-bottom))}
  .bottom-nav{width:calc(100% - 12px);padding:5px;border-radius:19px}
  .bottom-nav.six-items{gap:1px}
  .bottom-nav button{min-height:48px;padding:5px 2px;border-radius:12px}
  .bottom-nav.six-items span{font-size:6.5px;letter-spacing:0}
  .bottom-nav.six-items i{font-size:14px}
  .resource-rack>div{padding:10px 8px}
  .command-center,.achievement-section,.collection-section,.combat-console,.attack-panel,.infection-section{border-radius:19px}
  .target-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:340px){
  .bottom-nav.six-items span{display:none}
  .bottom-nav.six-items i{font-size:17px}
  .bottom-nav button{min-height:42px;padding:4px 0}
  .resource-rack{gap:6px}
  .resource-rack>div{padding:9px 6px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.view{transition:none}.sheet.open .sheet-backdrop{animation:none}}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}


/* v3.5.4 final anti-overlap and cache refresh safeguards */
[hidden]{display:none!important}
#launchAttackButton,#startExpeditionButton{position:relative!important;inset:auto!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;width:100%!important;margin:12px 0 0!important;transform:none!important;float:none!important;z-index:1!important}
.attack-panel,.sector-console,.operations-section,.infection-section{position:relative;isolation:isolate;overflow:hidden}
.operations-history-list,.history-list{position:relative;z-index:2}
.operation-history-card,.history-card{position:relative;min-width:0}
.operation-history-card>div:nth-child(2),.history-card>div{min-width:0}
.operation-history-card h4,.operation-history-card p,.operation-history-card span,.history-card b,.history-card span{overflow-wrap:anywhere}
@media(max-width:410px){.operation-history-card,.expedition-card{grid-template-columns:42px minmax(0,1fr)!important}.operation-history-card>b,.claim-expedition{grid-column:1/-1!important}}

/* v3.5.4 — Main Mini App fullscreen chrome */
body.telegram-fullscreen .onboarding-screen,body.telegram-fullscreen .game-screen{padding-top:calc(12px + var(--tg-top-offset) + env(safe-area-inset-top,0px))}
body.telegram-fullscreen .offline-banner{top:calc(var(--tg-top-offset) + env(safe-area-inset-top,0px) + 8px)}

/*
 * Bio-War v4.0 — Design System Core
 * Stage 1: visual language, tokens, components, motion and responsive rules.
 */

:root {
  /* Brand */
  --ds-accent: #55f6a5;
  --ds-accent-rgb: 85, 246, 165;
  --ds-accent-2: #44d8ff;
  --ds-accent-3: #9d75ff;
  --ds-accent-strong: #a4ffd0;
  --ds-accent-ink: #031c12;

  /* Semantic */
  --ds-positive: #5ff0a6;
  --ds-warning: #ffc36b;
  --ds-negative: #ff7183;
  --ds-info: #62d8ff;

  /* Neutral surfaces */
  --ds-bg-0: #020504;
  --ds-bg-1: #040a07;
  --ds-bg-2: #07100c;
  --ds-bg-3: #0a1711;
  --ds-surface-1: rgba(8, 22, 15, .84);
  --ds-surface-2: rgba(11, 29, 20, .88);
  --ds-surface-3: rgba(17, 39, 28, .82);
  --ds-surface-soft: rgba(255, 255, 255, .035);
  --ds-surface-hover: rgba(var(--ds-accent-rgb), .085);
  --ds-surface-active: rgba(var(--ds-accent-rgb), .13);

  /* Content */
  --ds-text-1: #f3fff8;
  --ds-text-2: #b9d5c6;
  --ds-text-3: #789989;
  --ds-text-4: #4e6c5d;
  --ds-border-1: rgba(196, 255, 224, .075);
  --ds-border-2: rgba(var(--ds-accent-rgb), .15);
  --ds-border-3: rgba(var(--ds-accent-rgb), .30);

  /* Typography */
  --ds-font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ds-font-display: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ds-font-mono: "SFMono-Regular", "Roboto Mono", ui-monospace, Consolas, monospace;
  --ds-weight-regular: 500;
  --ds-weight-medium: 650;
  --ds-weight-bold: 790;
  --ds-weight-black: 900;
  --ds-tracking-tight: -.035em;
  --ds-tracking-label: .13em;

  /* Spacing */
  --ds-space-1: 4px;
  --ds-space-2: 8px;
  --ds-space-3: 12px;
  --ds-space-4: 16px;
  --ds-space-5: 20px;
  --ds-space-6: 24px;
  --ds-space-7: 32px;
  --ds-space-8: 40px;

  /* Geometry */
  --ds-radius-xs: 9px;
  --ds-radius-sm: 13px;
  --ds-radius-md: 17px;
  --ds-radius-lg: 22px;
  --ds-radius-xl: 28px;
  --ds-radius-round: 999px;
  --ds-control-height: 50px;
  --ds-control-height-sm: 42px;
  --ds-nav-height: 68px;

  /* Depth */
  --ds-shadow-1: 0 10px 24px rgba(0, 0, 0, .25);
  --ds-shadow-2: 0 18px 46px rgba(0, 0, 0, .38);
  --ds-shadow-3: 0 28px 80px rgba(0, 0, 0, .58);
  --ds-glow: 0 0 28px rgba(var(--ds-accent-rgb), .12);
  --ds-inner-highlight: inset 0 1px 0 rgba(255, 255, 255, .035);
  --ds-blur: 18px;

  /* Motion */
  --ds-ease-standard: cubic-bezier(.2, .8, .2, 1);
  --ds-ease-emphasis: cubic-bezier(.16, 1, .3, 1);
  --ds-duration-fast: 140ms;
  --ds-duration: 240ms;
  --ds-duration-slow: 420ms;
}

body.ds-v4[data-accent="cyan"] {
  --ds-accent: #4ce3ff;
  --ds-accent-rgb: 76, 227, 255;
  --ds-accent-strong: #b9f6ff;
  --ds-accent-ink: #02191e;
}
body.ds-v4[data-accent="violet"] {
  --ds-accent: #a684ff;
  --ds-accent-rgb: 166, 132, 255;
  --ds-accent-strong: #ded1ff;
  --ds-accent-ink: #12092a;
}
body.ds-v4[data-accent="amber"] {
  --ds-accent: #ffc66c;
  --ds-accent-rgb: 255, 198, 108;
  --ds-accent-strong: #ffe4b6;
  --ds-accent-ink: #241301;
}

/* Foundation */
html {
  background: var(--ds-bg-0);
  color-scheme: dark;
}
body.ds-v4 {
  background:
    radial-gradient(circle at 50% -22%, rgba(var(--ds-accent-rgb), .12), transparent 38%),
    radial-gradient(circle at 105% 72%, rgba(108, 76, 255, .09), transparent 34%),
    linear-gradient(180deg, var(--ds-bg-1), var(--ds-bg-0) 44%);
  color: var(--ds-text-1);
  font-family: var(--ds-font-ui);
  font-weight: var(--ds-weight-regular);
  letter-spacing: -.008em;
}
body.ds-v4::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .035;
  background-image:
    linear-gradient(rgba(255,255,255,.8) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.8) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
}
body.ds-v4 .ambient {
  background:
    radial-gradient(circle at 52% -12%, rgba(var(--ds-accent-rgb), .10), transparent 40%),
    radial-gradient(circle at 88% 76%, rgba(123, 85, 255, .075), transparent 38%),
    transparent;
}
body.ds-v4 .ambient::after { opacity: .06; }
body.ds-v4 .ambient i { opacity: .055; filter: blur(110px); }
body.ds-v4 #app { isolation: isolate; }
body.ds-v4 ::selection { color: var(--ds-accent-ink); background: var(--ds-accent); }

/* Type hierarchy */
body.ds-v4 h1,
body.ds-v4 h2,
body.ds-v4 h3,
body.ds-v4 h4 {
  font-family: var(--ds-font-display);
  color: var(--ds-text-1);
  font-weight: var(--ds-weight-black);
  letter-spacing: var(--ds-tracking-tight);
  text-wrap: balance;
}
body.ds-v4 p { color: var(--ds-text-3); }
body.ds-v4 .eyebrow,
body.ds-v4 .wizard-step > small,
body.ds-v4 .view-hero small,
body.ds-v4 .section-title small,
body.ds-v4 .sheet header small,
body.ds-v4 .command-center-head small,
body.ds-v4 .corp-entry-card > small {
  color: color-mix(in srgb, var(--ds-accent) 84%, white 10%);
  font-family: var(--ds-font-mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: var(--ds-tracking-label);
  text-transform: uppercase;
}
body.ds-v4 .eyebrow b,
body.ds-v4 .live-dot {
  background: var(--ds-accent);
  box-shadow: 0 0 14px rgba(var(--ds-accent-rgb), .72);
}

/* Shared game surface */
body.ds-v4 :is(
  .glass-panel,.specimen-stage,.living-scene,.view-hero,.command-center,
  .combat-console,.attack-panel,.infection-section,.map-console,.sector-console,
  .operations-section,.corp-entry-card,.corp-directory-section,.corp-command-card,
  .corp-contribution-panel,.corp-bonuses-panel,.corp-tech-section,.corp-members-section,
  .corp-activity-section,.achievement-section,.collection-section,.profile-card,
  .profile-hero,.branch,.sheet > section
) {
  border-color: var(--ds-border-2);
  background:
    linear-gradient(180deg, rgba(255,255,255,.022), transparent 28%),
    linear-gradient(145deg, var(--ds-surface-2), var(--ds-surface-1));
  box-shadow: var(--ds-inner-highlight), var(--ds-shadow-1);
}
body.ds-v4 :is(
  .glass-panel,.specimen-stage,.living-scene,.view-hero,.command-center,
  .combat-console,.attack-panel,.infection-section,.map-console,.sector-console,
  .operations-section,.corp-directory-section,.corp-command-card,.corp-contribution-panel,
  .corp-bonuses-panel,.corp-tech-section,.corp-members-section,.corp-activity-section,
  .achievement-section,.collection-section,.profile-card,.profile-hero
) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
body.ds-v4 :is(
  .glass-panel,.specimen-stage,.living-scene,.view-hero,.command-center,
  .combat-console,.attack-panel,.infection-section,.map-console,.sector-console,
  .operations-section,.corp-directory-section,.corp-command-card,.corp-contribution-panel,
  .corp-bonuses-panel,.corp-tech-section,.corp-members-section,.corp-activity-section,
  .achievement-section,.collection-section,.profile-card,.profile-hero
)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(circle at 8% 0%, rgba(var(--ds-accent-rgb), .055), transparent 30%);
}

/* App chrome */
body.ds-v4 .game-header,
body.ds-v4 .simple-header {
  padding: 12px 14px;
  border: 1px solid var(--ds-border-1);
  border-radius: var(--ds-radius-lg);
  background: rgba(4, 13, 9, .74);
  backdrop-filter: blur(var(--ds-blur));
  box-shadow: var(--ds-inner-highlight), 0 14px 36px rgba(0,0,0,.22);
}
body.ds-v4 .game-header h2,
body.ds-v4 .simple-header h2 {
  font-size: clamp(22px, 6vw, 29px);
  line-height: 1;
}
body.ds-v4 .game-header p { color: var(--ds-text-3); }
body.ds-v4 .header-actions { gap: 8px; }
body.ds-v4 .round-button,
body.ds-v4 .connection-badge {
  border-color: var(--ds-border-2);
  background: rgba(255,255,255,.035);
  box-shadow: var(--ds-inner-highlight);
}
body.ds-v4 .round-button {
  color: var(--ds-text-2);
  border-radius: var(--ds-radius-sm);
}
body.ds-v4 .connection-badge.online {
  color: var(--ds-positive);
  background: rgba(95,240,166,.065);
}

/* HUD resources */
body.ds-v4 .resource-rack { gap: 9px; }
body.ds-v4 .resource-rack > div {
  min-height: 67px;
  padding: 11px 12px;
  border-color: var(--ds-border-1);
  border-radius: var(--ds-radius-md);
  background:
    linear-gradient(145deg, rgba(var(--ds-accent-rgb), .038), transparent 58%),
    rgba(5,16,11,.82);
  box-shadow: var(--ds-inner-highlight);
  transition: border-color var(--ds-duration), transform var(--ds-duration) var(--ds-ease-standard), background var(--ds-duration);
}
body.ds-v4 .resource-rack > div:hover { border-color: var(--ds-border-2); }
body.ds-v4 .resource-rack i {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(var(--ds-accent-rgb), .07);
  font-size: 17px;
}
body.ds-v4 .resource-rack span { color: var(--ds-text-2); font-size: 9px; }
body.ds-v4 .resource-rack small { color: var(--ds-text-4); font-size: 7px; }
body.ds-v4 .resource-rack b {
  color: var(--ds-text-1);
  font-family: var(--ds-font-mono);
  font-size: 13px;
  font-weight: 850;
}

/* Buttons */
body.ds-v4 button {
  border-radius: var(--ds-radius-sm);
  font-weight: var(--ds-weight-bold);
  transition:
    transform var(--ds-duration-fast) var(--ds-ease-standard),
    border-color var(--ds-duration),
    background var(--ds-duration),
    color var(--ds-duration),
    box-shadow var(--ds-duration),
    opacity var(--ds-duration);
}
body.ds-v4 button:not(:disabled):active { transform: translateY(1px) scale(.985); }
body.ds-v4 button:focus-visible {
  outline: 2px solid var(--ds-accent);
  outline-offset: 3px;
}
body.ds-v4 .primary,
body.ds-v4 .activate-button,
body.ds-v4 .collect-button {
  color: var(--ds-accent-ink);
  border: 1px solid color-mix(in srgb, var(--ds-accent) 60%, white 12%);
  background:
    linear-gradient(180deg, rgba(255,255,255,.28), transparent 46%),
    linear-gradient(135deg, var(--ds-accent), color-mix(in srgb, var(--ds-accent) 70%, #18b36a));
  box-shadow: 0 10px 28px rgba(var(--ds-accent-rgb), .14), inset 0 1px 0 rgba(255,255,255,.42);
}
body.ds-v4 .primary:not(:disabled):hover,
body.ds-v4 .activate-button:not(:disabled):hover,
body.ds-v4 .collect-button:not(:disabled):hover {
  box-shadow: 0 14px 34px rgba(var(--ds-accent-rgb), .20), inset 0 1px 0 rgba(255,255,255,.48);
}
body.ds-v4 .secondary,
body.ds-v4 .mini-ghost,
body.ds-v4 .section-title button,
body.ds-v4 .corp-role-control button {
  color: var(--ds-text-2);
  border: 1px solid var(--ds-border-1);
  background: rgba(255,255,255,.035);
  box-shadow: var(--ds-inner-highlight);
}
body.ds-v4 .secondary:not(:disabled):hover,
body.ds-v4 .mini-ghost:not(:disabled):hover,
body.ds-v4 .section-title button:not(:disabled):hover {
  color: var(--ds-text-1);
  border-color: var(--ds-border-3);
  background: var(--ds-surface-hover);
}
body.ds-v4 .danger-action {
  color: #ffc2ca;
  border-color: rgba(255,113,131,.25);
  background: rgba(255,113,131,.055);
}
body.ds-v4 .activate-button,
body.ds-v4 .collect-button {
  min-height: 58px;
  padding: 10px 12px;
  border-radius: var(--ds-radius-md);
}
body.ds-v4 .activate-button > i,
body.ds-v4 .collect-button > i {
  color: currentColor;
  background: rgba(0,0,0,.10);
  border: 1px solid rgba(0,0,0,.08);
}
body.ds-v4 .activate-button small,
body.ds-v4 .collect-button small { color: color-mix(in srgb, var(--ds-accent-ink) 72%, transparent); }
body.ds-v4 button.busy::after { border-top-color: var(--ds-accent); }

/* Form controls */
body.ds-v4 input,
body.ds-v4 select {
  min-height: var(--ds-control-height);
  border: 1px solid var(--ds-border-1);
  border-radius: var(--ds-radius-sm);
  background: rgba(1,7,4,.58);
  color: var(--ds-text-1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.018);
  transition: border-color var(--ds-duration), box-shadow var(--ds-duration), background var(--ds-duration);
}
body.ds-v4 input::placeholder { color: var(--ds-text-4); }
body.ds-v4 input:focus,
body.ds-v4 select:focus {
  outline: none;
  border-color: var(--ds-border-3);
  background: rgba(4,15,10,.78);
  box-shadow: 0 0 0 3px rgba(var(--ds-accent-rgb), .065);
}
body.ds-v4 label { color: var(--ds-text-2); }
body.ds-v4 .toggle-row,
body.ds-v4 .quality-row {
  border-color: var(--ds-border-1);
  background: rgba(255,255,255,.025);
}
body.ds-v4 .toggle-row input:checked + i { background: rgba(var(--ds-accent-rgb), .21); }
body.ds-v4 .toggle-row input:checked + i::after { background: var(--ds-accent); box-shadow: 0 0 12px rgba(var(--ds-accent-rgb), .34); }

/* Selection controls */
body.ds-v4 .class-card,
body.ds-v4 .option,
body.ds-v4 .attempt-chip {
  border-color: var(--ds-border-1);
  background: rgba(255,255,255,.025);
  color: var(--ds-text-3);
  box-shadow: var(--ds-inner-highlight);
}
body.ds-v4 .class-card.active,
body.ds-v4 .option.active,
body.ds-v4 .attempt-chip.active {
  color: var(--ds-accent-strong);
  border-color: var(--ds-border-3);
  background: var(--ds-surface-active);
  box-shadow: inset 0 0 0 1px rgba(var(--ds-accent-rgb), .055), var(--ds-glow);
}
body.ds-v4 .class-card i { color: var(--ds-accent); }
body.ds-v4 .color.active { outline-color: var(--ds-accent-strong); }

/* Cards and list items */
body.ds-v4 :is(
  .operation-card,.module-card,.action-card,.target-card,.status-card,.history-card,
  .expedition-card,.operation-history-card,.corp-directory-card,.corp-tech-card,
  .corp-member-card,.corp-activity-card,.achievement-card,.title-card,.skill-row
) {
  border-color: var(--ds-border-1);
  border-radius: var(--ds-radius-md);
  background:
    linear-gradient(135deg, rgba(var(--ds-accent-rgb), .028), transparent 56%),
    rgba(255,255,255,.024);
  box-shadow: var(--ds-inner-highlight);
}
body.ds-v4 :is(
  .operation-card,.module-card,.action-card,.target-card,.expedition-card,
  .operation-history-card,.corp-directory-card,.corp-tech-card,.achievement-card,.title-card
):not(:disabled):hover {
  border-color: var(--ds-border-2);
  background:
    linear-gradient(135deg, rgba(var(--ds-accent-rgb), .065), transparent 58%),
    rgba(255,255,255,.035);
}
body.ds-v4 .operation-card > i,
body.ds-v4 .module-card > i,
body.ds-v4 .action-card > i,
body.ds-v4 .expedition-icon,
body.ds-v4 .operation-history-icon,
body.ds-v4 .corp-entry-icon,
body.ds-v4 .achievement-head > i {
  color: var(--ds-accent);
  border-color: var(--ds-border-2);
  background: rgba(var(--ds-accent-rgb), .065);
}
body.ds-v4 .module-card em,
body.ds-v4 .evo-node em { color: var(--ds-accent-strong); }
body.ds-v4 .target-card.active,
body.ds-v4 .title-card.selected {
  border-color: var(--ds-border-3);
  background: var(--ds-surface-active);
  box-shadow: var(--ds-glow), var(--ds-inner-highlight);
}
body.ds-v4 .empty-state,
body.ds-v4 .action-center-empty,
body.ds-v4 .sector-requirement {
  border-color: var(--ds-border-1);
  background: rgba(255,255,255,.018);
  color: var(--ds-text-3);
  border-radius: var(--ds-radius-md);
}

/* Section headers */
body.ds-v4 .section-title { align-items: center; gap: 12px; }
body.ds-v4 .section-title h3 { font-size: 19px; line-height: 1.05; }
body.ds-v4 .section-title button { min-height: 38px; padding: 0 12px; border-radius: 11px; }
body.ds-v4 .view-hero { padding: 20px; border-radius: var(--ds-radius-xl); }
body.ds-v4 .view-hero h3 { font-size: clamp(24px, 7vw, 32px); }
body.ds-v4 .view-hero p { color: var(--ds-text-3); line-height: 1.5; }
body.ds-v4 .evo-points,
body.ds-v4 .corp-level-badge,
body.ds-v4 .sector-risk,
body.ds-v4 .attack-chance {
  border-color: var(--ds-border-2);
  background: rgba(var(--ds-accent-rgb), .06);
  box-shadow: var(--ds-inner-highlight);
}
body.ds-v4 .evo-points span,
body.ds-v4 .sector-risk b { color: var(--ds-accent); }

/* Progress and meters */
body.ds-v4 :is(.meter,.expedition-progress,.achievement-progress,.corp-xp-line > span,.upgrade-progress > span,.loader) {
  height: 7px;
  border-radius: var(--ds-radius-round);
  background: rgba(255,255,255,.06);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.28);
}
body.ds-v4 :is(.meter i,.expedition-progress i,.achievement-progress i,.corp-xp-line i,.upgrade-progress i) {
  background: linear-gradient(90deg, color-mix(in srgb, var(--ds-accent) 72%, #1cbf70), var(--ds-accent-strong));
  box-shadow: 0 0 14px rgba(var(--ds-accent-rgb), .28);
}

/* Laboratory */
body.ds-v4 .living-scene {
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 43%, rgba(var(--ds-accent-rgb), .17), transparent 27%),
    radial-gradient(circle at 50% 100%, rgba(95,75,255,.06), transparent 38%),
    linear-gradient(180deg, #07150e, #020504 88%);
}
body.ds-v4 .scene-grid { opacity: .13; }
body.ds-v4 .hotspot,
body.ds-v4 .reactor-console {
  border-color: var(--ds-border-1);
  background: rgba(4, 15, 10, .79);
  box-shadow: var(--ds-inner-highlight), 0 10px 24px rgba(0,0,0,.26);
}
body.ds-v4 .hotspot i { color: var(--ds-accent); }
body.ds-v4 .tube {
  border-color: var(--ds-border-2);
  box-shadow: inset 0 0 64px rgba(var(--ds-accent-rgb), .07), 0 0 58px rgba(var(--ds-accent-rgb), .075);
}
body.ds-v4 .scan-line { background: linear-gradient(90deg, transparent, var(--ds-accent), transparent); box-shadow: 0 0 14px var(--ds-accent); }

/* Map */
body.ds-v4 .operations-map {
  border-color: var(--ds-border-2);
  background:
    radial-gradient(circle at 50% 50%, rgba(var(--ds-accent-rgb), .095), transparent 25%),
    linear-gradient(180deg, rgba(5,18,12,.96), rgba(1,6,4,.99));
  box-shadow: inset 0 0 80px rgba(var(--ds-accent-rgb), .025);
}
body.ds-v4 .sector-node {
  border-color: var(--ds-border-2);
  background: rgba(4, 17, 11, .91);
  box-shadow: var(--ds-shadow-1), var(--ds-inner-highlight);
}
body.ds-v4 .sector-node i { color: var(--ds-accent); }
body.ds-v4 .sector-node.selected {
  border-color: var(--ds-border-3);
  background: rgba(var(--ds-accent-rgb), .13);
  box-shadow: var(--ds-glow), var(--ds-inner-highlight);
}
body.ds-v4 .map-core {
  border-color: var(--ds-border-3);
  background: rgba(var(--ds-accent-rgb), .13);
  box-shadow: 0 0 48px rgba(var(--ds-accent-rgb), .14), inset 0 0 24px rgba(var(--ds-accent-rgb), .09);
}
body.ds-v4 .map-core b { color: var(--ds-accent-strong); }
body.ds-v4 .map-links path,
body.ds-v4 .map-links circle { stroke: rgba(var(--ds-accent-rgb), .18); }

/* Corporation */
body.ds-v4 .corp-xp-line i { background: linear-gradient(90deg, var(--ds-accent), var(--ds-accent-strong)); }
body.ds-v4 .corp-tech-card button,
body.ds-v4 .claim-expedition {
  min-height: var(--ds-control-height-sm);
  color: var(--ds-accent-strong);
  border-color: var(--ds-border-2);
  background: rgba(var(--ds-accent-rgb), .065);
}
body.ds-v4 .corp-role-control button.active { color: var(--ds-accent-strong); border-color: var(--ds-border-3); background: var(--ds-surface-active); }

/* Bottom navigation */
body.ds-v4 .bottom-nav {
  min-height: var(--ds-nav-height);
  padding: 7px;
  gap: 3px;
  border-color: var(--ds-border-2);
  border-radius: 24px;
  background: rgba(3, 11, 7, .86);
  backdrop-filter: blur(24px) saturate(1.2);
  box-shadow: var(--ds-shadow-2), var(--ds-inner-highlight), 0 0 0 1px rgba(0,0,0,.18);
}
body.ds-v4 .bottom-nav button {
  position: relative;
  min-height: 54px;
  border: 1px solid transparent;
  border-radius: 17px;
  color: var(--ds-text-4);
  background: transparent;
}
body.ds-v4 .bottom-nav button::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: var(--ds-accent);
  opacity: 0;
  transform: translateX(-50%) scaleX(.3);
  transition: opacity var(--ds-duration), transform var(--ds-duration) var(--ds-ease-emphasis);
}
body.ds-v4 .bottom-nav button.active {
  color: var(--ds-accent-strong);
  border-color: var(--ds-border-2);
  background:
    linear-gradient(180deg, rgba(var(--ds-accent-rgb), .105), rgba(var(--ds-accent-rgb), .045));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 0 20px rgba(var(--ds-accent-rgb), .055);
}
body.ds-v4 .bottom-nav button.active::before { opacity: 1; transform: translateX(-50%) scaleX(1); }
body.ds-v4 .bottom-nav i { font-size: 17px; }
body.ds-v4 .bottom-nav span { color: currentColor; font-size: 7px; font-weight: 750; }

/* Sheets, tutorial and toast */
body.ds-v4 .sheet-backdrop,
body.ds-v4 .tutorial-backdrop { background: rgba(0, 4, 2, .76); backdrop-filter: blur(7px); }
body.ds-v4 .sheet > section,
body.ds-v4 .tutorial-card {
  border-color: var(--ds-border-2);
  background:
    linear-gradient(180deg, rgba(var(--ds-accent-rgb), .045), transparent 20%),
    linear-gradient(180deg, #0a1811, #030805);
  box-shadow: var(--ds-shadow-3), var(--ds-inner-highlight);
}
body.ds-v4 .sheet > section { border-radius: 30px 30px 0 0; }
body.ds-v4 .sheet header button {
  border-color: var(--ds-border-1);
  background: rgba(255,255,255,.035);
  color: var(--ds-text-2);
}
body.ds-v4 .module-emblem {
  color: var(--ds-accent);
  border-color: var(--ds-border-2);
  background: rgba(var(--ds-accent-rgb), .055);
}
body.ds-v4 .toast {
  border-color: var(--ds-border-3);
  background: rgba(5, 18, 12, .95);
  color: var(--ds-accent-strong);
  box-shadow: var(--ds-shadow-2), var(--ds-inner-highlight);
  backdrop-filter: blur(18px);
}
body.ds-v4 .offline-banner { border-color: rgba(255,113,131,.3); background: rgba(34,6,11,.96); }

/* Loading */
body.ds-v4 .boot-mark span,
body.ds-v4 .status-orb {
  color: var(--ds-accent);
  border-color: var(--ds-border-3);
  background: rgba(var(--ds-accent-rgb), .07);
  box-shadow: inset 0 0 34px rgba(var(--ds-accent-rgb), .08), 0 0 50px rgba(var(--ds-accent-rgb), .075);
}
body.ds-v4 .boot-screen h1 em { color: var(--ds-accent); }
body.ds-v4 .loader span { background: linear-gradient(90deg, transparent, var(--ds-accent), transparent); }

/* Motion */
body.ds-v4 .view.active { animation: dsViewEnter var(--ds-duration-slow) var(--ds-ease-emphasis) both; }
body.ds-v4 :is(.resource-rack > div,.module-card,.operation-card,.action-card,.target-card,.achievement-card,.title-card,.sector-node) {
  transition:
    transform var(--ds-duration) var(--ds-ease-standard),
    border-color var(--ds-duration),
    background var(--ds-duration),
    box-shadow var(--ds-duration),
    opacity var(--ds-duration);
}
body.ds-v4 .sheet.open > section { animation: dsSheetEnter var(--ds-duration-slow) var(--ds-ease-emphasis) both; }
@keyframes dsViewEnter { from { opacity: 0; transform: translate3d(0, 9px, 0) scale(.995); } to { opacity: 1; transform: none; } }
@keyframes dsSheetEnter { from { opacity: .65; transform: translate3d(0, 28px, 0); } to { opacity: 1; transform: none; } }

/* Responsive */
@media (max-width: 760px) {
  body.ds-v4 .game-header,
  body.ds-v4 .simple-header { padding: 11px 12px; border-radius: 19px; }
  body.ds-v4 .view-hero { padding: 17px; border-radius: 23px; }
  body.ds-v4 .resource-rack > div { min-height: 64px; padding: 10px; }
  body.ds-v4 .bottom-nav { width: calc(100% - 14px); }
}
@media (max-width: 430px) {
  body.ds-v4 .screen { padding-left: 10px; padding-right: 10px; }
  body.ds-v4 .resource-rack { gap: 6px; }
  body.ds-v4 .resource-rack > div { grid-template-columns: auto 1fr; align-content: center; }
  body.ds-v4 .resource-rack > div > b { grid-column: 2; margin-top: -2px; }
  body.ds-v4 .resource-rack i { grid-row: 1 / 3; }
  body.ds-v4 .resource-rack small { display: none; }
  body.ds-v4 .resource-rack span { font-size: 8px; }
  body.ds-v4 .resource-rack b { font-size: 11px; }
  body.ds-v4 .view-hero h3 { font-size: 25px; }
  body.ds-v4 .section-title h3 { font-size: 18px; }
  body.ds-v4 .bottom-nav { border-radius: 21px; }
  body.ds-v4 .bottom-nav button { min-height: 50px; padding: 5px 1px; border-radius: 14px; }
  body.ds-v4 .bottom-nav span { font-size: 6.2px; }
}
@media (max-width: 350px) {
  body.ds-v4 .bottom-nav span { display: none; }
  body.ds-v4 .bottom-nav i { font-size: 18px; }
  body.ds-v4 .bottom-nav button { min-height: 45px; }
}
@media (hover: hover) and (pointer: fine) {
  body.ds-v4 button:not(:disabled):hover { filter: none; }
  body.ds-v4 :is(.module-card,.operation-card,.action-card,.target-card,.achievement-card,.title-card,.sector-node):not(:disabled):hover {
    transform: translateY(-2px);
  }
}
@media (prefers-reduced-motion: reduce) {
  body.ds-v4 .view.active,
  body.ds-v4 .sheet.open > section { animation: none; }
}

/*
 * Bio-War v4.1 — Main Screens
 * Stage 2: immersive laboratory, combat, operations, corporation, evolution and profile screens.
 */

:root {
  --ms-max: 1040px;
  --ms-panel: rgba(5, 16, 11, .88);
  --ms-panel-strong: rgba(7, 22, 15, .96);
  --ms-hairline: rgba(var(--ds-accent-rgb), .13);
  --ms-corner: 26px;
  --ms-grid-size: 30px;
  --ms-header-offset: calc(env(safe-area-inset-top, 0px) + var(--tg-top-offset, 0px) + 8px);
}

/* ----- Global game stage ----- */
body.ds-v4.stage-main-screens {
  min-height: 100dvh;
  background:
    radial-gradient(ellipse at 50% -18%, rgba(var(--ds-accent-rgb), .14), transparent 42%),
    radial-gradient(ellipse at 110% 50%, rgba(107, 67, 255, .09), transparent 35%),
    linear-gradient(180deg, #030806 0%, #010302 66%, #020504 100%);
}
body.ds-v4.stage-main-screens::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .16;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.014) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 50% 32%, transparent 0 36%, rgba(0,0,0,.24) 76%, rgba(0,0,0,.52) 100%);
  mix-blend-mode: screen;
}
body.ds-v4.stage-main-screens[data-active-view="combatView"] {
  --ds-accent: #5bf0b0;
  --ds-accent-rgb: 91, 240, 176;
}
body.ds-v4.stage-main-screens[data-active-view="operationsView"] {
  --ds-accent: #54dcff;
  --ds-accent-rgb: 84, 220, 255;
}
body.ds-v4.stage-main-screens[data-active-view="corporationView"] {
  --ds-accent: #a987ff;
  --ds-accent-rgb: 169, 135, 255;
}
body.ds-v4.stage-main-screens[data-active-view="evolutionView"] {
  --ds-accent: #ffca72;
  --ds-accent-rgb: 255, 202, 114;
}
body.ds-v4.stage-main-screens[data-active-view="profileView"] {
  --ds-accent: #7beebc;
  --ds-accent-rgb: 123, 238, 188;
}
body.stage-main-screens .game-screen {
  max-width: var(--ms-max);
  padding-bottom: calc(108px + var(--safe-bottom));
}
body.stage-main-screens .game-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(var(--ds-accent-rgb), .025) 50%, transparent 50.2%),
    radial-gradient(circle at 50% 38%, rgba(var(--ds-accent-rgb), .045), transparent 36%);
}

/* ----- Persistent HUD ----- */
body.stage-main-screens .game-hud-stack {
  position: relative;
  z-index: 38;
  max-width: var(--ms-max);
  margin: 0 auto 14px;
}
body.stage-main-screens .game-header {
  position: relative;
  margin-bottom: 8px;
  min-height: 78px;
  padding: 14px 15px 13px 17px;
  border-radius: 23px;
  border-color: rgba(var(--ds-accent-rgb), .19);
  background:
    linear-gradient(90deg, rgba(var(--ds-accent-rgb), .075), transparent 35%),
    linear-gradient(180deg, rgba(11, 28, 20, .96), rgba(4, 13, 9, .94));
  box-shadow: inset 0 1px rgba(255,255,255,.04), 0 16px 44px rgba(0,0,0,.28);
  overflow: hidden;
}
body.stage-main-screens .game-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 17px;
  width: 92px;
  height: 2px;
  background: linear-gradient(90deg, var(--ds-accent), transparent);
  box-shadow: 0 0 16px rgba(var(--ds-accent-rgb), .55);
}
body.stage-main-screens .game-header::after {
  content: "BW // COMMAND LINK";
  position: absolute;
  right: 72px;
  bottom: 8px;
  color: rgba(var(--ds-accent-rgb), .28);
  font: 800 6px var(--ds-font-mono);
  letter-spacing: .14em;
}
body.stage-main-screens .game-header h2 {
  margin: 5px 0 0;
  font-size: clamp(24px, 6vw, 32px);
  text-shadow: 0 0 24px rgba(var(--ds-accent-rgb), .12);
}
body.stage-main-screens .game-header p {
  margin-top: 5px;
  font-size: 9px;
  letter-spacing: .02em;
}
body.stage-main-screens .connection-badge {
  min-width: 74px;
  min-height: 35px;
  justify-content: center;
  border-radius: 12px;
}
body.stage-main-screens .round-button {
  width: 43px;
  height: 43px;
  border-radius: 14px;
  font-size: 16px;
}
body.stage-main-screens .resource-rack {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}
body.stage-main-screens .resource-rack > div {
  position: relative;
  min-height: 66px;
  overflow: hidden;
  border-color: rgba(var(--ds-accent-rgb), .13);
  background:
    linear-gradient(135deg, rgba(var(--ds-accent-rgb), .055), transparent 52%),
    rgba(4, 14, 9, .9);
}
body.stage-main-screens .resource-rack > div::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -24px;
  width: 62px;
  height: 62px;
  border: 1px solid rgba(var(--ds-accent-rgb), .08);
  border-radius: 50%;
}
body.stage-main-screens .resource-rack i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--ds-accent-strong);
  background: rgba(var(--ds-accent-rgb), .075);
  box-shadow: inset 0 1px rgba(255,255,255,.035);
}
body.stage-main-screens .resource-rack b {
  position: relative;
  z-index: 2;
  font-size: 13px;
}

/* ----- Screen introduction component ----- */
body.stage-main-screens .main-screen {
  max-width: var(--ms-max);
  margin: 0 auto;
}
body.stage-main-screens .screen-atmosphere {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  border-radius: 30px;
}
body.stage-main-screens .screen-atmosphere::before,
body.stage-main-screens .screen-atmosphere::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}
body.stage-main-screens .screen-atmosphere::before {
  width: 260px;
  height: 260px;
  right: -120px;
  top: -150px;
  border: 1px solid rgba(var(--ds-accent-rgb), .08);
  box-shadow: 0 0 0 38px rgba(var(--ds-accent-rgb), .018), 0 0 0 76px rgba(var(--ds-accent-rgb), .012);
}
body.stage-main-screens .screen-atmosphere::after {
  left: -120px;
  bottom: -150px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(var(--ds-accent-rgb), .06), transparent 68%);
  filter: blur(18px);
}
body.stage-main-screens .main-screen-hero,
body.stage-main-screens .view-hero {
  position: relative;
  min-height: 128px;
  margin-bottom: 12px;
  padding: 20px;
  border: 1px solid rgba(var(--ds-accent-rgb), .18);
  border-radius: 27px;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(100deg, rgba(var(--ds-accent-rgb), .10), transparent 54%),
    linear-gradient(180deg, rgba(13, 32, 23, .96), rgba(4, 13, 9, .94));
  box-shadow: inset 0 1px rgba(255,255,255,.04), 0 18px 48px rgba(0,0,0,.27);
}
body.stage-main-screens .main-screen-hero::before,
body.stage-main-screens .view-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .18;
  background-image:
    linear-gradient(rgba(var(--ds-accent-rgb), .11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--ds-accent-rgb), .11) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(90deg, #000, transparent 74%);
}
body.stage-main-screens .main-screen-hero::after,
body.stage-main-screens .view-hero::after {
  content: attr(data-screen-code);
  position: absolute;
  z-index: -1;
  right: 15px;
  bottom: -14px;
  color: rgba(var(--ds-accent-rgb), .055);
  font: 900 70px/1 var(--ds-font-mono);
  letter-spacing: -.1em;
}
body.stage-main-screens .main-screen-hero h3,
body.stage-main-screens .view-hero h3 {
  margin: 7px 0 7px;
  font-size: clamp(27px, 7vw, 38px);
  line-height: .98;
}
body.stage-main-screens .main-screen-hero p,
body.stage-main-screens .view-hero p {
  max-width: 610px;
  font-size: 10px;
  line-height: 1.55;
}
body.stage-main-screens .hero-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ds-accent-strong);
  font: 800 8px var(--ds-font-mono);
  letter-spacing: .16em;
}
body.stage-main-screens .hero-kicker::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--ds-accent);
  box-shadow: 0 0 12px rgba(var(--ds-accent-rgb), .7);
}
body.stage-main-screens .hero-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 15px;
}
body.stage-main-screens .hero-status-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 27px;
  padding: 0 10px;
  border: 1px solid rgba(var(--ds-accent-rgb), .16);
  border-radius: 999px;
  color: var(--ds-text-2);
  background: rgba(var(--ds-accent-rgb), .045);
  font: 750 7px var(--ds-font-mono);
  letter-spacing: .08em;
}
body.stage-main-screens .hero-status-row i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ds-accent);
  box-shadow: 0 0 8px var(--ds-accent);
}

/* ----- Laboratory ----- */
body.stage-main-screens #labView {
  position: relative;
}
body.stage-main-screens .lab-screen-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}
body.stage-main-screens .lab-core-mark {
  position: relative;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--ds-accent-rgb), .25);
  border-radius: 28px;
  color: var(--ds-accent);
  background: rgba(var(--ds-accent-rgb), .065);
  font-size: 32px;
  box-shadow: inset 0 0 28px rgba(var(--ds-accent-rgb), .06), 0 0 35px rgba(var(--ds-accent-rgb), .07);
}
body.stage-main-screens .lab-core-mark::before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px dashed rgba(var(--ds-accent-rgb), .14);
  border-radius: 34px;
  animation: msRotate 18s linear infinite;
}
body.stage-main-screens .command-center {
  margin: 0 0 12px;
  border-radius: 23px;
  background:
    linear-gradient(90deg, rgba(var(--ds-accent-rgb), .065), transparent 42%),
    rgba(5, 16, 11, .92);
}
body.stage-main-screens .command-center-head {
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(var(--ds-accent-rgb), .08);
}
body.stage-main-screens .action-center-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.stage-main-screens .action-card {
  min-height: 67px;
  border-radius: 16px;
}
body.stage-main-screens .living-scene {
  height: 600px;
  border-radius: 31px;
  border-color: rgba(var(--ds-accent-rgb), .22);
  background:
    radial-gradient(circle at 50% 46%, rgba(var(--ds-accent-rgb), .22), transparent 22%),
    radial-gradient(ellipse at 50% 86%, rgba(var(--ds-accent-rgb), .08), transparent 42%),
    linear-gradient(180deg, #081912, #020705 84%);
  box-shadow: inset 0 0 100px rgba(var(--ds-accent-rgb), .025), 0 26px 70px rgba(0,0,0,.32);
}
body.stage-main-screens .living-scene::before {
  content: "";
  position: absolute;
  inset: 12px;
  pointer-events: none;
  border: 1px solid rgba(var(--ds-accent-rgb), .055);
  border-radius: 23px;
  clip-path: polygon(0 0, 64px 0, 64px 1px, calc(100% - 64px) 1px, calc(100% - 64px) 0, 100% 0, 100% 64px, calc(100% - 1px) 64px, calc(100% - 1px) calc(100% - 64px), 100% calc(100% - 64px), 100% 100%, calc(100% - 64px) 100%, calc(100% - 64px) calc(100% - 1px), 64px calc(100% - 1px), 64px 100%, 0 100%, 0 calc(100% - 64px), 1px calc(100% - 64px), 1px 64px, 0 64px);
}
body.stage-main-screens .scene-grid {
  opacity: .22;
  background-size: var(--ms-grid-size) var(--ms-grid-size);
  mask-image: radial-gradient(circle at 50% 48%, #000, transparent 86%);
}
body.stage-main-screens .lab-sign {
  top: 21px;
  left: 22px;
  padding: 9px 12px;
  border: 1px solid rgba(var(--ds-accent-rgb), .13);
  border-radius: 13px;
  background: rgba(3, 12, 8, .76);
  backdrop-filter: blur(10px);
}
body.stage-main-screens .central-chamber {
  top: 46%;
  width: 290px;
}
body.stage-main-screens .tube {
  height: 380px;
  border-radius: 128px 128px 50px 50px;
  border-color: rgba(var(--ds-accent-rgb), .32);
  background:
    linear-gradient(110deg, rgba(255,255,255,.10), transparent 18%, rgba(var(--ds-accent-rgb), .05) 55%, rgba(255,255,255,.035)),
    rgba(3, 17, 10, .18);
  box-shadow: inset 0 0 75px rgba(var(--ds-accent-rgb), .08), 0 0 90px rgba(var(--ds-accent-rgb), .075);
}
body.stage-main-screens .tube::before,
body.stage-main-screens .tube::after {
  content: "";
  position: absolute;
  z-index: 5;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--ds-accent-rgb), .48), transparent);
  box-shadow: 0 0 9px rgba(var(--ds-accent-rgb), .45);
}
body.stage-main-screens .tube::before { top: 18%; animation: msScan 5s ease-in-out infinite; }
body.stage-main-screens .tube::after { bottom: 13%; opacity: .3; }
body.stage-main-screens .dashboard-virus { width: 172px; height: 172px; }
body.stage-main-screens .hotspot {
  width: 128px;
  min-height: 62px;
  padding: 10px 11px;
  border-radius: 17px;
  border-color: rgba(var(--ds-accent-rgb), .17);
  background:
    linear-gradient(135deg, rgba(var(--ds-accent-rgb), .065), transparent),
    rgba(4, 17, 11, .87);
  box-shadow: inset 0 1px rgba(255,255,255,.025), 0 10px 30px rgba(0,0,0,.22);
}
body.stage-main-screens .hotspot::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, rgba(var(--ds-accent-rgb), .28), transparent);
}
body.stage-main-screens .h-growth::after,
body.stage-main-screens .h-reactor::after { left: 100%; }
body.stage-main-screens .h-analyzer::after,
body.stage-main-screens .h-storage::after { right: 100%; transform: rotate(180deg); }
body.stage-main-screens .h-growth { left: 24px; top: 126px; }
body.stage-main-screens .h-analyzer { right: 24px; top: 126px; }
body.stage-main-screens .h-reactor { left: 24px; top: 327px; }
body.stage-main-screens .h-storage { right: 24px; top: 327px; }
body.stage-main-screens .reactor-console {
  left: 22px;
  right: 22px;
  bottom: 92px;
  min-height: 58px;
  border-radius: 17px;
  border-color: rgba(var(--ds-accent-rgb), .14);
  background: rgba(3, 14, 9, .9);
}
body.stage-main-screens .living-scene > .collect-button {
  left: 22px;
  right: 22px;
  min-height: 58px;
  border-radius: 18px;
}
body.stage-main-screens .operations-row {
  gap: 10px;
  margin-top: 10px;
}
body.stage-main-screens .operation-card {
  min-height: 82px;
  border-radius: 20px;
  border-color: rgba(var(--ds-accent-rgb), .13);
  background:
    linear-gradient(135deg, rgba(var(--ds-accent-rgb), .055), transparent 60%),
    rgba(5, 17, 11, .9);
}
body.stage-main-screens .module-summary {
  margin-top: 18px;
  padding: 17px;
  border: 1px solid rgba(var(--ds-accent-rgb), .13);
  border-radius: 25px;
  background: rgba(5, 16, 11, .86);
}
body.stage-main-screens .module-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
body.stage-main-screens .module-card {
  min-height: 146px;
  padding: 14px;
  border-radius: 20px;
  overflow: hidden;
}
body.stage-main-screens .module-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: calc(100% - var(--module-progress, 10%));
  bottom: 0;
  height: 2px;
  background: var(--ds-accent);
  box-shadow: 0 0 12px rgba(var(--ds-accent-rgb), .5);
  transition: right .4s var(--ds-ease-emphasis);
}
body.stage-main-screens .module-card > i {
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(var(--ds-accent-rgb), .075);
}
body.stage-main-screens .module-card b { font-size: 11px; }
body.stage-main-screens .module-card small { min-height: 28px; line-height: 1.45; }

/* ----- Combat ----- */
body.stage-main-screens .combat-grid,
body.stage-main-screens .operations-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(300px, .84fr);
  gap: 12px;
  align-items: start;
}
body.stage-main-screens .combat-grid > section,
body.stage-main-screens .operations-grid > section { margin-top: 0; }
body.stage-main-screens .combat-hero {
  background:
    radial-gradient(circle at 82% 50%, rgba(74, 255, 174, .10), transparent 22%),
    linear-gradient(105deg, rgba(var(--ds-accent-rgb), .11), transparent 57%),
    linear-gradient(180deg, rgba(10, 30, 20, .97), rgba(3, 12, 8, .96));
}
body.stage-main-screens .combat-console,
body.stage-main-screens .attack-panel {
  min-height: 100%;
  border-radius: 25px;
}
body.stage-main-screens .combat-console {
  padding: 17px;
}
body.stage-main-screens .target-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
body.stage-main-screens .target-card {
  position: relative;
  min-height: 178px;
  padding: 14px;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--ds-accent-rgb), .08), transparent 38%),
    rgba(5, 18, 12, .9);
}
body.stage-main-screens .target-card::before {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -35px;
  width: 105px;
  height: 105px;
  border: 1px solid rgba(var(--ds-accent-rgb), .08);
  border-radius: 50%;
  box-shadow: 0 0 0 17px rgba(var(--ds-accent-rgb), .018);
}
body.stage-main-screens .target-card.active {
  border-color: rgba(var(--ds-accent-rgb), .48);
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--ds-accent-rgb), .14), transparent 40%),
    rgba(var(--ds-accent-rgb), .075);
  box-shadow: inset 0 0 0 1px rgba(var(--ds-accent-rgb), .10), 0 0 26px rgba(var(--ds-accent-rgb), .07);
}
body.stage-main-screens .target-identity {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 10px;
}
body.stage-main-screens .target-sigil {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--ds-accent-rgb), .19);
  border-radius: 14px;
  color: var(--ds-accent-strong);
  background: rgba(var(--ds-accent-rgb), .065);
  font: 850 11px var(--ds-font-mono);
}
body.stage-main-screens .target-card-top { align-items: flex-start; }
body.stage-main-screens .target-card-top b { font-size: 12px; }
body.stage-main-screens .target-card > small { margin-left: 52px; }
body.stage-main-screens .target-stats {
  position: relative;
  z-index: 1;
  margin-top: 13px;
  gap: 6px;
}
body.stage-main-screens .target-stats span {
  min-height: 48px;
  padding: 8px;
  border: 1px solid rgba(var(--ds-accent-rgb), .075);
}
body.stage-main-screens .attack-panel {
  position: sticky;
  top: var(--ms-header-offset);
  padding: 18px;
  background:
    linear-gradient(150deg, rgba(var(--ds-accent-rgb), .075), transparent 55%),
    rgba(5, 17, 11, .95);
}
body.stage-main-screens .attack-panel::before {
  content: "TARGET ACQUISITION";
  position: absolute;
  right: 17px;
  top: 9px;
  color: rgba(var(--ds-accent-rgb), .20);
  font: 800 6px var(--ds-font-mono);
  letter-spacing: .14em;
}
body.stage-main-screens .attack-chance {
  width: 96px;
  min-width: 96px;
  height: 96px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  border: 1px solid rgba(var(--ds-accent-rgb), .32);
  background:
    radial-gradient(circle, rgba(var(--ds-accent-rgb), .10), transparent 64%),
    rgba(2, 12, 7, .8);
  box-shadow: inset 0 0 28px rgba(var(--ds-accent-rgb), .045), 0 0 28px rgba(var(--ds-accent-rgb), .06);
}
body.stage-main-screens .attack-chance b { font-size: 25px; }
body.stage-main-screens .attempt-switcher { gap: 7px; }
body.stage-main-screens .attempt-chip {
  min-height: 49px;
  border-radius: 15px;
}
body.stage-main-screens .attack-button {
  min-height: 63px;
  border-radius: 18px;
}
body.stage-main-screens .infection-section {
  margin-top: 12px;
  padding: 17px;
  border-radius: 25px;
}
body.stage-main-screens .infection-list,
body.stage-main-screens .history-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.stage-main-screens .status-card,
body.stage-main-screens .history-card {
  position: relative;
  min-height: 82px;
  border-radius: 18px;
  overflow: hidden;
}
body.stage-main-screens .status-card::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--ds-accent);
  box-shadow: 0 0 11px rgba(var(--ds-accent-rgb), .75);
  animation: msPulse 1.7s ease-in-out infinite;
}

/* ----- Operations map ----- */
body.stage-main-screens .operations-hero {
  background:
    radial-gradient(circle at 78% 50%, rgba(84,220,255,.12), transparent 25%),
    linear-gradient(105deg, rgba(var(--ds-accent-rgb), .10), transparent 60%),
    linear-gradient(180deg, rgba(7, 24, 27, .96), rgba(3, 12, 12, .96));
}
body.stage-main-screens .operations-wallet {
  min-width: 215px;
}
body.stage-main-screens .operations-wallet > span {
  min-height: 66px;
  border-color: rgba(var(--ds-accent-rgb), .16);
  background: rgba(var(--ds-accent-rgb), .045);
}
body.stage-main-screens .map-console,
body.stage-main-screens .sector-console {
  border-radius: 25px;
}
body.stage-main-screens .operations-map {
  height: 510px;
  border-radius: 23px;
  border-color: rgba(var(--ds-accent-rgb), .19);
  background:
    radial-gradient(circle at 50% 50%, rgba(var(--ds-accent-rgb), .13), transparent 22%),
    linear-gradient(180deg, rgba(4, 18, 18, .96), rgba(1, 7, 7, .99));
}
body.stage-main-screens .map-grid {
  opacity: .27;
  background-size: 28px 28px;
}
body.stage-main-screens .map-sweep { width: 78%; }
body.stage-main-screens .map-core {
  width: 78px;
  height: 78px;
  border-radius: 29px;
}
body.stage-main-screens .sector-node {
  width: 76px;
  min-height: 76px;
  border-radius: 23px;
  background: rgba(3, 17, 17, .94);
  backdrop-filter: blur(10px);
}
body.stage-main-screens .sector-node.selected {
  transform: translate(-50%, -50%) scale(1.08);
}
body.stage-main-screens .sector-console {
  position: sticky;
  top: var(--ms-header-offset);
  padding: 18px;
  background:
    linear-gradient(150deg, rgba(var(--ds-accent-rgb), .075), transparent 58%),
    rgba(4, 17, 17, .96);
}
body.stage-main-screens .sector-metrics { gap: 7px; }
body.stage-main-screens .sector-metrics > div {
  min-height: 67px;
  border-color: rgba(var(--ds-accent-rgb), .10);
}
body.stage-main-screens .sector-rewards {
  border-radius: 0 16px 16px 0;
}
body.stage-main-screens .operation-launch { min-height: 63px; }
body.stage-main-screens .operations-section {
  padding: 17px;
  border-radius: 25px;
}
body.stage-main-screens .active-operations-list,
body.stage-main-screens .operations-history-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.stage-main-screens .expedition-card,
body.stage-main-screens .operation-history-card {
  min-height: 94px;
  border-radius: 19px;
  overflow: hidden;
}
body.stage-main-screens .expedition-card.ready {
  box-shadow: inset 0 0 0 1px rgba(var(--ds-accent-rgb), .08), 0 0 25px rgba(var(--ds-accent-rgb), .055);
}

/* ----- Corporation ----- */
body.stage-main-screens .corporation-hero {
  background:
    radial-gradient(circle at 80% 50%, rgba(169,135,255,.14), transparent 26%),
    linear-gradient(105deg, rgba(var(--ds-accent-rgb), .10), transparent 58%),
    linear-gradient(180deg, rgba(19, 14, 34, .97), rgba(7, 7, 14, .96));
}
body.stage-main-screens .corp-level-badge {
  width: 96px;
  height: 96px;
  border-radius: 31px;
  border-color: rgba(var(--ds-accent-rgb), .24);
  background: rgba(var(--ds-accent-rgb), .065);
}
body.stage-main-screens .corp-entry-grid,
body.stage-main-screens .corp-command-grid {
  gap: 11px;
}
body.stage-main-screens .corp-entry-card,
body.stage-main-screens .corp-command-card,
body.stage-main-screens :is(.corp-directory-section,.corp-contribution-panel,.corp-bonuses-panel,.corp-tech-section,.corp-members-section,.corp-activity-section) {
  border-radius: 25px;
}
body.stage-main-screens .corp-entry-card {
  min-height: 330px;
  padding: 19px;
}
body.stage-main-screens .corp-entry-icon {
  width: 55px;
  height: 55px;
  border-radius: 18px;
  font-size: 26px;
}
body.stage-main-screens .corp-directory {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.stage-main-screens .corp-directory-card {
  min-height: 90px;
  border-radius: 17px;
}
body.stage-main-screens .corp-command-card { min-height: 180px; }
body.stage-main-screens .corp-identity::after {
  content: "CORP";
  position: absolute;
  right: 16px;
  bottom: -15px;
  color: rgba(var(--ds-accent-rgb), .055);
  font: 900 75px var(--ds-font-mono);
}
body.stage-main-screens .treasury-values span {
  border-color: rgba(var(--ds-accent-rgb), .10);
  background: rgba(var(--ds-accent-rgb), .035);
}
body.stage-main-screens .corp-bonus-grid > div {
  min-height: 82px;
  display: grid;
  place-content: center;
  border-radius: 17px;
  border-color: rgba(var(--ds-accent-rgb), .11);
  text-align: center;
}
body.stage-main-screens .corp-tech-grid { gap: 10px; }
body.stage-main-screens .corp-tech-card {
  position: relative;
  min-height: 180px;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--ds-accent-rgb), .08), transparent 38%),
    rgba(10, 10, 20, .82);
}
body.stage-main-screens .corp-tech-card::before {
  content: "";
  position: absolute;
  right: -28px;
  top: -28px;
  width: 92px;
  height: 92px;
  border: 1px solid rgba(var(--ds-accent-rgb), .08);
  border-radius: 50%;
}
body.stage-main-screens .tech-level-pips {
  display: flex;
  gap: 4px;
  margin: 11px 0 0;
}
body.stage-main-screens .tech-level-pips i {
  width: 18px;
  height: 3px;
  border-radius: 99px;
  background: rgba(255,255,255,.07);
}
body.stage-main-screens .tech-level-pips i.on {
  background: var(--ds-accent);
  box-shadow: 0 0 7px rgba(var(--ds-accent-rgb), .5);
}
body.stage-main-screens .corp-member-card,
body.stage-main-screens .corp-activity-card { border-radius: 17px; }

/* ----- Evolution ----- */
body.stage-main-screens .evolution-view .view-hero {
  background:
    radial-gradient(circle at 82% 50%, rgba(255,202,114,.12), transparent 26%),
    linear-gradient(105deg, rgba(var(--ds-accent-rgb), .10), transparent 58%),
    linear-gradient(180deg, rgba(29, 23, 11, .96), rgba(12, 9, 4, .96));
}
body.stage-main-screens .evolution-tree { gap: 11px; }
body.stage-main-screens .branch {
  min-height: 480px;
  border-radius: 25px;
  background:
    linear-gradient(180deg, rgba(var(--ds-accent-rgb), .045), transparent 30%),
    rgba(15, 12, 7, .88);
}
body.stage-main-screens .branch-header {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(var(--ds-accent-rgb), .10);
}
body.stage-main-screens .branch-header i {
  width: 43px;
  height: 43px;
  border-radius: 15px;
}
body.stage-main-screens .evo-node {
  min-height: 116px;
  padding: 14px;
  border-radius: 17px;
}
body.stage-main-screens .evo-node:not(.locked)::after {
  content: "";
  position: absolute;
  left: -1px;
  top: 15px;
  bottom: 15px;
  width: 2px;
  border-radius: 99px;
  background: var(--ds-accent);
  opacity: .35;
}
body.stage-main-screens .evo-node.maxed::after { opacity: 1; box-shadow: 0 0 9px var(--ds-accent); }

/* ----- Profile / player dossier ----- */
body.stage-main-screens .profile-hero {
  min-height: 158px;
  padding: 20px;
  border-radius: 27px;
  background:
    radial-gradient(circle at 88% 30%, rgba(var(--ds-accent-rgb), .11), transparent 26%),
    linear-gradient(110deg, rgba(var(--ds-accent-rgb), .08), transparent 58%),
    rgba(5, 18, 12, .94);
}
body.stage-main-screens .profile-hero::before {
  content: "OPERATOR DOSSIER";
  position: absolute;
  top: 14px;
  right: 17px;
  color: rgba(var(--ds-accent-rgb), .25);
  font: 800 7px var(--ds-font-mono);
  letter-spacing: .16em;
}
body.stage-main-screens .profile-hero > div:first-child {
  width: 92px;
  height: 92px;
  border-radius: 31px;
  font-size: 24px;
  box-shadow: inset 0 0 30px rgba(var(--ds-accent-rgb), .07), 0 0 34px rgba(var(--ds-accent-rgb), .07);
}
body.stage-main-screens .profile-hero h3 { font-size: 28px; }
body.stage-main-screens .profile-title {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(var(--ds-accent-rgb), .17);
  border-radius: 99px;
  color: var(--ds-accent-strong)!important;
  background: rgba(var(--ds-accent-rgb), .055);
}
body.stage-main-screens .profile-dashboard-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 11px;
  margin-top: 11px;
}
body.stage-main-screens .profile-dashboard-main {
  display: grid;
  gap: 10px;
}
body.stage-main-screens .profile-stats {
  grid-template-columns: 1fr;
  margin-top: 0;
  gap: 8px;
}
body.stage-main-screens .profile-stats > div {
  min-height: 77px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border-radius: 18px;
  text-align: left;
}
body.stage-main-screens .profile-stats b { font-size: 21px; }
body.stage-main-screens .profile-dashboard-cards {
  display: grid;
  gap: 10px;
}
body.stage-main-screens .profile-card {
  margin-top: 0;
  min-height: 155px;
  border-radius: 22px;
}
body.stage-main-screens .skill-row {
  position: relative;
  min-height: 35px;
  padding-bottom: 7px;
  overflow: hidden;
}
body.stage-main-screens .skill-row::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 99px;
  background: rgba(255,255,255,.055);
}
body.stage-main-screens .skill-row i {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 0;
  width: var(--skill-progress, 10%);
  height: 3px;
  border-radius: 99px;
  background: var(--ds-accent);
  box-shadow: 0 0 8px rgba(var(--ds-accent-rgb), .45);
}
body.stage-main-screens .achievement-section,
body.stage-main-screens .collection-section {
  padding: 18px;
  border-radius: 25px;
}
body.stage-main-screens .achievement-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.stage-main-screens .achievement-card {
  min-height: 205px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--ds-accent-rgb), .07), transparent 35%),
    rgba(5, 18, 12, .88);
}
body.stage-main-screens .title-collection { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.stage-main-screens .title-card {
  min-height: 105px;
  border-radius: 18px;
}

/* ----- Bottom navigation ----- */
body.stage-main-screens .bottom-nav {
  width: min(800px, calc(100% - 18px));
  min-height: 75px;
  bottom: calc(7px + var(--safe-bottom));
  padding: 8px;
  border-radius: 26px;
  background: rgba(2, 10, 6, .91);
  box-shadow: 0 20px 54px rgba(0,0,0,.55), inset 0 1px rgba(255,255,255,.035), 0 0 0 1px rgba(var(--ds-accent-rgb), .025);
}
body.stage-main-screens .bottom-nav button {
  min-height: 58px;
  border-radius: 18px;
}
body.stage-main-screens .bottom-nav button i {
  width: 29px;
  height: 24px;
  display: grid;
  place-items: center;
}
body.stage-main-screens .bottom-nav button.active i {
  color: var(--ds-accent);
  text-shadow: 0 0 14px rgba(var(--ds-accent-rgb), .65);
}
body.stage-main-screens .bottom-nav button.active::after {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: -1;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 20%, rgba(var(--ds-accent-rgb), .10), transparent 65%);
}

/* ----- Motion ----- */
body.stage-main-screens .view.active > * {
  animation: msCascade .45s var(--ds-ease-emphasis) both;
}
body.stage-main-screens .view.active > *:nth-child(2) { animation-delay: 35ms; }
body.stage-main-screens .view.active > *:nth-child(3) { animation-delay: 70ms; }
body.stage-main-screens .view.active > *:nth-child(4) { animation-delay: 105ms; }
body.stage-main-screens .view.active > *:nth-child(5) { animation-delay: 140ms; }
body.stage-main-screens .view.active > *:nth-child(n+6) { animation-delay: 175ms; }
@keyframes msCascade { from { opacity: 0; transform: translate3d(0, 13px, 0); } to { opacity: 1; transform: none; } }
@keyframes msRotate { to { transform: rotate(360deg); } }
@keyframes msScan { 0%,100% { transform: translateY(0); opacity: .3; } 50% { transform: translateY(245px); opacity: 1; } }
@keyframes msPulse { 50% { opacity: .35; transform: scale(.78); } }

/* ----- Tablet and phone ----- */
@media (max-width: 820px) {
  body.stage-main-screens .combat-grid,
  body.stage-main-screens .operations-grid { grid-template-columns: 1fr; }
  body.stage-main-screens .attack-panel,
  body.stage-main-screens .sector-console { position: relative; top: auto; }
  body.stage-main-screens .target-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.stage-main-screens .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.stage-main-screens .profile-dashboard-grid { grid-template-columns: 1fr; }
  body.stage-main-screens .profile-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.stage-main-screens .profile-stats > div { display: block; text-align: center; }
}
@media (max-width: 620px) {
  body.stage-main-screens .main-screen-hero,
  body.stage-main-screens .view-hero { min-height: 118px; padding: 17px; border-radius: 23px; }
  body.stage-main-screens .main-screen-hero::after,
  body.stage-main-screens .view-hero::after { font-size: 53px; }
  body.stage-main-screens .lab-core-mark { width: 65px; height: 65px; border-radius: 22px; font-size: 26px; }
  body.stage-main-screens .living-scene { height: 550px; }
  body.stage-main-screens .central-chamber { width: 232px; }
  body.stage-main-screens .tube { height: 338px; }
  body.stage-main-screens .dashboard-virus { width: 145px; height: 145px; }
  body.stage-main-screens .hotspot { width: 104px; min-height: 55px; padding: 8px; }
  body.stage-main-screens .h-growth,.h-analyzer { top: 118px; }
  body.stage-main-screens .h-reactor,.h-storage { top: 304px; }
  body.stage-main-screens .h-growth,.h-reactor { left: 14px; }
  body.stage-main-screens .h-analyzer,.h-storage { right: 14px; }
  body.stage-main-screens .hotspot::after { display: none; }
  body.stage-main-screens .target-list,
  body.stage-main-screens .infection-list,
  body.stage-main-screens .history-list,
  body.stage-main-screens .active-operations-list,
  body.stage-main-screens .operations-history-list,
  body.stage-main-screens .corp-directory,
  body.stage-main-screens .achievement-list { grid-template-columns: 1fr; }
  body.stage-main-screens .operations-map { height: 440px; }
  body.stage-main-screens .corp-entry-grid,
  body.stage-main-screens .corp-command-grid { grid-template-columns: 1fr; }
  body.stage-main-screens .title-collection { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 430px) {
  body.stage-main-screens .game-screen { padding-left: 9px; padding-right: 9px; }
  body.stage-main-screens .game-header { min-height: 71px; padding: 12px; border-radius: 20px; }
  body.stage-main-screens .game-header::after { display: none; }
  body.stage-main-screens .game-header h2 { font-size: 24px; }
  body.stage-main-screens .connection-badge { display: none; }
  body.stage-main-screens .resource-rack > div { min-height: 62px; padding: 9px; }
  body.stage-main-screens .resource-rack i { width: 30px; height: 30px; font-size: 15px; }
  body.stage-main-screens .main-screen-hero,
  body.stage-main-screens .view-hero { min-height: 110px; padding: 15px; }
  body.stage-main-screens .main-screen-hero h3,
  body.stage-main-screens .view-hero h3 { font-size: 27px; }
  body.stage-main-screens .main-screen-hero p,
  body.stage-main-screens .view-hero p { max-width: 82%; font-size: 9px; }
  body.stage-main-screens .hero-status-row { gap: 5px; margin-top: 11px; }
  body.stage-main-screens .hero-status-row span { min-height: 24px; padding: 0 8px; font-size: 6px; }
  body.stage-main-screens .lab-core-mark { width: 56px; height: 56px; border-radius: 19px; }
  body.stage-main-screens .command-center { padding: 14px; }
  body.stage-main-screens .action-center-list { grid-template-columns: 1fr; }
  body.stage-main-screens .living-scene { height: 530px; border-radius: 25px; }
  body.stage-main-screens .central-chamber { width: 205px; top: 45%; }
  body.stage-main-screens .tube { height: 310px; }
  body.stage-main-screens .dashboard-virus { width: 130px; height: 130px; }
  body.stage-main-screens .hotspot { width: 92px; min-height: 50px; border-radius: 14px; }
  body.stage-main-screens .hotspot span { display: block; font-size: 6px; }
  body.stage-main-screens .hotspot b { font-size: 7px; }
  body.stage-main-screens .hotspot i { font-size: 14px; }
  body.stage-main-screens .h-growth,.h-analyzer { top: 109px; }
  body.stage-main-screens .h-reactor,.h-storage { top: 278px; }
  body.stage-main-screens .reactor-console { left: 13px; right: 13px; bottom: 83px; }
  body.stage-main-screens .living-scene > .collect-button { left: 13px; right: 13px; bottom: 13px; }
  body.stage-main-screens .operations-row { grid-template-columns: 1fr; }
  body.stage-main-screens .module-summary { padding: 14px; }
  body.stage-main-screens .module-card { min-height: 133px; padding: 12px; }
  body.stage-main-screens .combat-power,
  body.stage-main-screens .corp-level-badge,
  body.stage-main-screens .evo-points:not(.slim) { width: 72px; height: 72px; min-width: 72px; border-radius: 24px; }
  body.stage-main-screens .attack-panel-top { display: grid; grid-template-columns: 1fr auto; }
  body.stage-main-screens .attack-chance { width: 78px; min-width: 78px; height: 78px; }
  body.stage-main-screens .attempt-switcher { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.stage-main-screens .attempt-chip { padding: 8px 3px; font-size: 8px; }
  body.stage-main-screens .operations-wallet { min-width: 0; grid-template-columns: 1fr; }
  body.stage-main-screens .operations-wallet > span { min-height: 51px; }
  body.stage-main-screens .operations-map { height: 405px; }
  body.stage-main-screens .sector-node { width: 62px; min-height: 62px; border-radius: 19px; }
  body.stage-main-screens .sector-node i { font-size: 16px; }
  body.stage-main-screens .sector-node span { font-size: 6px; }
  body.stage-main-screens .sector-head { display: grid; grid-template-columns: 1fr auto; }
  body.stage-main-screens .profile-hero { min-height: 140px; padding: 16px; }
  body.stage-main-screens .profile-hero > div:first-child { width: 73px; height: 73px; border-radius: 25px; }
  body.stage-main-screens .profile-stats { gap: 5px; }
  body.stage-main-screens .profile-stats > div { min-height: 67px; padding: 9px 5px; }
  body.stage-main-screens .profile-stats b { font-size: 17px; }
  body.stage-main-screens .title-collection { grid-template-columns: 1fr; }
  body.stage-main-screens .bottom-nav { width: calc(100% - 10px); min-height: 70px; padding: 6px; border-radius: 22px; }
  body.stage-main-screens .bottom-nav button { min-height: 54px; border-radius: 15px; }
  body.stage-main-screens .bottom-nav span { font-size: 5.8px; }
}
@media (max-width: 350px) {
  body.stage-main-screens .bottom-nav span { display: none; }
  body.stage-main-screens .bottom-nav button { min-height: 48px; }
  body.stage-main-screens .resource-rack span { font-size: 6.5px; }
  body.stage-main-screens .resource-rack b { font-size: 9px; }
  body.stage-main-screens .lab-core-mark { display: none; }
  body.stage-main-screens .lab-screen-hero { grid-template-columns: 1fr; }
}
@media (hover:hover) and (pointer:fine) {
  body.stage-main-screens :is(.target-card,.module-card,.operation-card,.sector-node,.corp-tech-card,.achievement-card):hover {
    border-color: rgba(var(--ds-accent-rgb), .30);
    box-shadow: 0 14px 35px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.03);
  }
}
@media (prefers-reduced-motion: reduce) {
  body.stage-main-screens .view.active > *,
  body.stage-main-screens .lab-core-mark::before,
  body.stage-main-screens .tube::before,
  body.stage-main-screens .status-card::before { animation: none !important; }
}

/* Final mobile balance pass */
@media (max-width: 430px) {
  body.stage-main-screens .resource-rack {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body.stage-main-screens .resource-rack > div:last-child {
    grid-column: 1 / -1 !important;
  }
  body.stage-main-screens .corporation-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px;
    align-items: center;
    gap: 9px;
  }
  body.stage-main-screens .corporation-hero > div:first-child {
    min-width: 0;
  }
  body.stage-main-screens .corporation-hero h3 {
    font-size: 24px;
    overflow-wrap: anywhere;
  }
  body.stage-main-screens .corporation-hero p {
    max-width: 100%;
  }
  body.stage-main-screens .corp-level-badge {
    width: 68px;
    min-width: 68px;
    height: 68px;
    border-radius: 22px;
  }
  body.stage-main-screens .corp-level-badge b { font-size: 20px; }
  body.stage-main-screens .corp-level-badge span,
  body.stage-main-screens .corp-level-badge small { font-size: 6px; }
  body.stage-main-screens .profile-dashboard-cards .profile-card:last-child {
    min-height: 96px;
  }
}
@media (max-width: 430px) {
  body.stage-main-screens .corp-level-badge small { display: none; }
}

/* Bio-War v4.2 — Animations & Polish layer */
:root {
  --polish-fast: 130ms;
  --polish-medium: 280ms;
  --polish-slow: 520ms;
  --polish-cinematic: 760ms;
  --polish-spring: cubic-bezier(.2,.9,.2,1.18);
  --polish-smooth: cubic-bezier(.22,.8,.28,1);
  --polish-exit: cubic-bezier(.4,0,1,1);
}

body.stage-animations-polish {
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

body.stage-animations-polish #app {
  isolation: isolate;
}

/* Global FX layer */
.polish-fx-layer {
  position: fixed;
  z-index: 140;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
}
.polish-screen-flash {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(circle at var(--fx-x,50%) var(--fx-y,50%), var(--fx-color,rgba(75,255,161,.24)), transparent 54%);
  animation: polishScreenFlash var(--polish-slow) var(--polish-smooth) both;
  mix-blend-mode: screen;
}
.polish-particle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size,6px);
  height: var(--size,6px);
  border-radius: 50%;
  background: var(--particle-color,var(--ds-accent,#51ffa2));
  box-shadow: 0 0 12px var(--particle-color,var(--ds-accent,#51ffa2));
  opacity: 0;
  transform: translate(-50%,-50%);
  animation: polishParticle var(--life,720ms) var(--polish-smooth) forwards;
}
.polish-particle.glyph {
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--particle-color,var(--ds-accent,#51ffa2));
  font-size: var(--size,13px);
  font-weight: 900;
  text-shadow: 0 0 12px currentColor;
}
.polish-floating-text {
  position: absolute;
  left: var(--x);
  top: var(--y);
  min-width: max-content;
  color: var(--float-color,#caffdf);
  font: 900 13px/1 ui-monospace,SFMono-Regular,monospace;
  letter-spacing: .02em;
  text-shadow: 0 2px 10px #000,0 0 16px color-mix(in srgb,var(--float-color) 55%,transparent);
  transform: translate(-50%,0);
  animation: polishFloatText 1050ms var(--polish-smooth) forwards;
}
.polish-confetti {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 5px;
  height: 11px;
  border-radius: 3px;
  background: var(--confetti-color,var(--ds-accent));
  animation: polishConfetti var(--life,1100ms) var(--polish-smooth) forwards;
  transform: translate(-50%,-50%) rotate(var(--rotate));
}
.polish-route-dot {
  position: absolute;
  z-index: 12;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d8ffeb;
  box-shadow: 0 0 8px #fff,0 0 22px var(--ds-accent);
  offset-path: path("M 50 50 C 62 45, 70 58, 82 64");
  offset-distance: 0%;
  animation: polishRoute 1100ms var(--polish-smooth) forwards;
}

/* Press and ripple feedback */
body.stage-animations-polish button,
body.stage-animations-polish [role="button"] {
  transform: translateZ(0);
  backface-visibility: hidden;
}
body.stage-animations-polish button:not(:disabled) {
  transition: transform var(--polish-fast) var(--polish-spring), filter var(--polish-fast), border-color var(--polish-medium), background var(--polish-medium), box-shadow var(--polish-medium);
}
body.stage-animations-polish button:not(:disabled).polish-pressed {
  transform: scale(.972) translateZ(0);
  filter: brightness(1.09);
}
.polish-ripple-host { position: relative !important; overflow: hidden !important; }
.polish-ripple {
  position: absolute;
  z-index: 30;
  width: 12px;
  height: 12px;
  margin: -6px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle,rgba(235,255,244,.35),rgba(92,255,169,.14) 45%,transparent 72%);
  transform: scale(0);
  animation: polishRipple 600ms var(--polish-smooth) forwards;
}

/* View transitions and stagger */
body.stage-animations-polish .view.polish-view-enter {
  animation: polishViewEnter var(--polish-cinematic) var(--polish-smooth) both !important;
}
body.stage-animations-polish .view.polish-view-enter .main-screen-hero,
body.stage-animations-polish .view.polish-view-enter .view-hero {
  animation: polishHeroEnter 680ms var(--polish-smooth) 60ms both;
}
body.stage-animations-polish .view.polish-view-enter .polish-stagger-item {
  opacity: 0;
  animation: polishStaggerIn 520ms var(--polish-smooth) var(--polish-delay,0ms) both;
}
body.stage-animations-polish .view.polish-view-exit {
  display: block !important;
  position: absolute;
  inset-inline: 0;
  pointer-events: none;
  animation: polishViewExit 210ms var(--polish-exit) both !important;
}
.polish-transition-wipe {
  position: fixed;
  z-index: 130;
  left: -35%;
  top: -25%;
  width: 55%;
  height: 150%;
  pointer-events: none;
  opacity: .48;
  background: linear-gradient(90deg,transparent,rgba(var(--ds-accent-rgb,81,255,162),.22),rgba(255,255,255,.1),transparent);
  filter: blur(10px);
  transform: skewX(-12deg) translateX(-100%);
  animation: polishWipe 620ms var(--polish-smooth) forwards;
}

/* Living interfaces */
body.stage-animations-polish .game-hud-stack {
  transition: transform var(--polish-medium) var(--polish-smooth), background var(--polish-medium);
}
body.stage-animations-polish .resource-rack > div {
  overflow: hidden;
}
body.stage-animations-polish .resource-rack > div::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(105deg,transparent 20%,rgba(255,255,255,.08) 42%,transparent 64%);
  transform: translateX(-110%);
}
body.stage-animations-polish .resource-rack > div.polish-value-up::after {
  animation: polishResourceSweep 650ms var(--polish-smooth);
}
body.stage-animations-polish .polish-number-pulse {
  animation: polishNumberPulse 430ms var(--polish-spring);
}
body.stage-animations-polish .central-chamber::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 14% 3%;
  border-radius: 48%;
  opacity: .18;
  background: radial-gradient(circle,rgba(var(--ds-accent-rgb),.22),transparent 68%);
  animation: polishChamberBreath 5.5s ease-in-out infinite;
  pointer-events: none;
}
body.stage-animations-polish .virus-button.reacted .virus-visual {
  animation: polishVirusReaction 620ms var(--polish-spring) !important;
}
body.stage-animations-polish .hotspot:not(.locked):active,
body.stage-animations-polish .module-card:not(.locked):active { filter: brightness(1.16); }
body.stage-animations-polish .module-card.polish-upgrade-start,
body.stage-animations-polish .evo-node.polish-upgrade-start,
body.stage-animations-polish .corp-tech-card.polish-upgrade-start {
  animation: polishUpgradeStart 900ms var(--polish-smooth);
}

/* Combat cinematic polish */
body.stage-animations-polish .combat-view.polish-combat-charge .combat-console,
body.stage-animations-polish .combat-view.polish-combat-charge .attack-panel {
  animation: polishCombatCharge 900ms ease-in-out;
}
body.stage-animations-polish .combat-view.polish-combat-charge::after {
  content: "";
  position: fixed;
  z-index: 125;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg,transparent 0 3px,rgba(89,255,166,.045) 4px 5px);
  animation: polishScanNoise 900ms linear both;
}
body.stage-animations-polish .combat-result.polish-result-in {
  animation: polishResultIn 640ms var(--polish-spring) both;
}
body.stage-animations-polish .combat-result.success.polish-result-in { box-shadow: 0 0 0 1px rgba(77,255,164,.14),0 0 34px rgba(77,255,164,.10); }
body.stage-animations-polish .combat-result.fail.polish-result-in { animation-name: polishResultFail; }
body.stage-animations-polish .target-card.selected {
  animation: polishTargetLock 520ms var(--polish-smooth);
}

/* Operations and map */
body.stage-animations-polish .operations-map.polish-expedition-launch {
  animation: polishMapLaunch 1150ms var(--polish-smooth);
}
body.stage-animations-polish .sector-node.selected::before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(var(--ds-accent-rgb),.42);
  border-radius: inherit;
  animation: polishTargetRing 2.2s ease-out infinite;
  pointer-events: none;
}
body.stage-animations-polish .expedition-card.ready {
  animation: polishReadyGlow 2.1s ease-in-out infinite;
}

/* Corporate / profile polish */
body.stage-animations-polish .corp-xp-line i,
body.stage-animations-polish .achievement-progress i,
body.stage-animations-polish .meter i,
body.stage-animations-polish .skill-row i::after,
body.stage-animations-polish .expedition-progress i {
  transition: width 720ms var(--polish-smooth) !important;
}
body.stage-animations-polish .achievement-card.completed:not(.claimed)::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg,transparent 30%,rgba(255,255,255,.07),transparent 70%);
  transform: translateX(-110%);
  animation: polishRewardShine 3.2s ease-in-out infinite;
}
body.stage-animations-polish .profile-hero.polish-profile-arrive > div:first-child {
  animation: polishAvatarArrive 720ms var(--polish-spring);
}

/* Sheets, toast, loading */
body.stage-animations-polish .sheet.open > section {
  transform-origin: 50% 100%;
  animation: polishSheetSpring 520ms var(--polish-spring) both !important;
}
body.stage-animations-polish .sheet.open .sheet-backdrop { animation: polishBackdrop 280ms ease both; }
body.stage-animations-polish .toast.show {
  animation: polishToastIn 440ms var(--polish-spring) both;
}
body.stage-animations-polish button.busy::after {
  box-shadow: 0 0 12px rgba(var(--ds-accent-rgb),.35);
}
body.stage-animations-polish button.busy {
  background-size: 220% 100%;
  animation: polishBusySurface 1.3s linear infinite;
}
body.stage-animations-polish .boot-mark span { animation: polishBootCore 2.4s ease-in-out infinite; }
body.stage-animations-polish .loader span { animation-duration: 1.1s; }

/* Adaptive performance */
body.polish-paused *,
body.polish-paused *::before,
body.polish-paused *::after { animation-play-state: paused !important; }
body.polish-low-fps .screen-atmosphere,
body.polish-low-fps .polish-transition-wipe,
body.polish-low-fps .central-chamber::after { display: none !important; }
body.polish-low-fps .ambient i { filter: blur(80px) !important; opacity: .035 !important; }
body.polish-low-fps .sheet-backdrop,
body.polish-low-fps .bottom-nav { backdrop-filter: none !important; }

@keyframes polishRipple { to { transform: scale(18); opacity: 0; } }
@keyframes polishParticle { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.35); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) scale(.1) rotate(var(--spin,0deg)); } }
@keyframes polishFloatText { 0% { opacity: 0; transform: translate(-50%,8px) scale(.9); } 18% { opacity: 1; transform: translate(-50%,-4px) scale(1.04); } 100% { opacity: 0; transform: translate(-50%,-54px) scale(.96); } }
@keyframes polishConfetti { 0% { opacity: 0; transform: translate(-50%,-50%) rotate(var(--rotate)) scale(.2); } 12% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) rotate(calc(var(--rotate) + 260deg)) scale(.6); } }
@keyframes polishScreenFlash { 0% { opacity: 0; } 18% { opacity: 1; } 100% { opacity: 0; } }
@keyframes polishViewEnter { from { opacity: 0; transform: translate3d(18px,6px,0) scale(.992); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes polishViewExit { to { opacity: 0; transform: translate3d(-11px,0,0) scale(.995); filter: blur(3px); } }
@keyframes polishHeroEnter { from { opacity: 0; transform: translate3d(0,-12px,0) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes polishStaggerIn { from { opacity: 0; transform: translate3d(0,16px,0) scale(.988); } to { opacity: 1; transform: none; } }
@keyframes polishWipe { 0% { transform: skewX(-12deg) translateX(-110%); } 100% { transform: skewX(-12deg) translateX(330%); } }
@keyframes polishResourceSweep { to { transform: translateX(115%); opacity: 1; } }
@keyframes polishNumberPulse { 0%,100% { transform: none; } 45% { transform: scale(1.12); color: #e5fff0; text-shadow: 0 0 16px var(--ds-accent); } }
@keyframes polishChamberBreath { 0%,100% { transform: scale(.95); opacity: .10; } 50% { transform: scale(1.07); opacity: .27; } }
@keyframes polishVirusReaction { 0% { transform: translate(-50%,-50%) scale(1); } 26% { transform: translate(-50%,-50%) scale(.87) rotate(-4deg); filter: brightness(1.7); } 52% { transform: translate(-50%,-50%) scale(1.13) rotate(3deg); } 100% { transform: translate(-50%,-50%) scale(1); } }
@keyframes polishUpgradeStart { 0%,100% { transform: none; } 35% { transform: translateY(-4px) scale(1.015); box-shadow: 0 0 0 1px rgba(var(--ds-accent-rgb),.28),0 0 42px rgba(var(--ds-accent-rgb),.18); } }
@keyframes polishCombatCharge { 0%,100% { filter: none; } 32% { filter: brightness(.72) saturate(1.5); transform: scale(.996); } 55% { filter: brightness(1.22) saturate(1.35); } }
@keyframes polishScanNoise { 0% { opacity: 0; transform: translateY(-8px); } 25% { opacity: .9; } 100% { opacity: 0; transform: translateY(12px); } }
@keyframes polishResultIn { 0% { opacity: 0; transform: translateY(9px) scale(.95); } 58% { opacity: 1; transform: translateY(-2px) scale(1.015); } 100% { transform: none; } }
@keyframes polishResultFail { 0% { opacity: 0; transform: translateX(0); } 30% { opacity: 1; transform: translateX(-5px); } 48% { transform: translateX(4px); } 66% { transform: translateX(-2px); } 100% { transform: none; } }
@keyframes polishTargetLock { 0% { box-shadow: 0 0 0 0 rgba(var(--ds-accent-rgb),.6); } 100% { box-shadow: 0 0 0 12px transparent; } }
@keyframes polishMapLaunch { 0%,100% { filter: none; } 20% { filter: brightness(.7); } 48% { filter: brightness(1.45) saturate(1.4); box-shadow: inset 0 0 70px rgba(var(--ds-accent-rgb),.18),0 0 36px rgba(var(--ds-accent-rgb),.12); } }
@keyframes polishRoute { 0% { opacity: 0; offset-distance: 0%; } 12% { opacity: 1; } 86% { opacity: 1; } 100% { opacity: 0; offset-distance: 100%; } }
@keyframes polishTargetRing { 0% { transform: scale(.7); opacity: .8; } 70%,100% { transform: scale(1.3); opacity: 0; } }
@keyframes polishReadyGlow { 0%,100% { box-shadow: 0 0 0 rgba(var(--ds-accent-rgb),0); } 50% { box-shadow: 0 0 30px rgba(var(--ds-accent-rgb),.09); } }
@keyframes polishRewardShine { 0%,62% { transform: translateX(-110%); } 100% { transform: translateX(110%); } }
@keyframes polishAvatarArrive { 0% { opacity: 0; transform: rotate(-12deg) scale(.65); } 65% { opacity: 1; transform: rotate(3deg) scale(1.08); } 100% { transform: none; } }
@keyframes polishSheetSpring { from { opacity: 0; transform: translate3d(0,36px,0) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes polishBackdrop { from { opacity: 0; } to { opacity: 1; } }
@keyframes polishToastIn { 0% { opacity: 0; transform: translate(-50%,18px) scale(.93); } 65% { opacity: 1; transform: translate(-50%,-3px) scale(1.015); } 100% { transform: translate(-50%,0); } }
@keyframes polishBusySurface { 0% { background-position: 140% 0; } 100% { background-position: -80% 0; } }
@keyframes polishBootCore { 0%,100% { transform: scale(.96); box-shadow: inset 0 0 30px rgba(68,255,156,.08),0 0 36px rgba(54,255,149,.06); } 50% { transform: scale(1.04); box-shadow: inset 0 0 35px rgba(68,255,156,.16),0 0 62px rgba(54,255,149,.15); } }

@media (max-width: 430px) {
  :root { --polish-cinematic: 570ms; }
  body.stage-animations-polish .view.polish-view-enter { animation-name: polishViewEnterMobile !important; }
  .polish-transition-wipe { width: 70%; }
}
@keyframes polishViewEnterMobile { from { opacity: 0; transform: translate3d(0,10px,0) scale(.994); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .polish-fx-layer,.polish-transition-wipe { display: none !important; }
}
body.motion-reduced .polish-fx-layer,
body.motion-reduced .polish-transition-wipe,
body.quality-economy .polish-fx-layer { display: none !important; }
body.motion-reduced .view.polish-view-enter,
body.motion-reduced .polish-stagger-item,
body.quality-economy .polish-stagger-item { animation: none !important; opacity: 1 !important; }
body.quality-economy .central-chamber::after,
body.quality-economy .achievement-card.completed:not(.claimed)::before { display: none !important; }
body.stage-animations-polish .resource-rack > div,
body.stage-animations-polish .achievement-card { position: relative; }
body.stage-animations-polish .achievement-card { overflow: hidden; }

/* Bio-War v4.3 — rendering and low-power optimization layer */
:root{--opt-intrinsic-panel:360px;--opt-intrinsic-list:520px}
.view.active .module-summary,
.view.active .infection-section,
.view.active .operations-section,
.view.active .corp-tech-section,
.view.active .corp-members-section,
.view.active .corp-activity-section,
.view.active .achievement-section,
.view.active .collection-section{
  content-visibility:auto;
  contain-intrinsic-size:auto var(--opt-intrinsic-panel);
}
.target-list,.infection-list,.history-list,.active-operations-list,.operations-history-list,
.corp-members-list,.corp-activity-list,.achievement-list,.title-collection{
  content-visibility:auto;
  contain-intrinsic-size:auto var(--opt-intrinsic-list);
}
.module-card,.target-card,.expedition-card,.operation-history-card,.corp-tech-card,
.corp-member-card,.achievement-card,.title-card,.action-card{
  contain:layout style;
}
body.polish-paused *,body.polish-paused *::before,body.polish-paused *::after{
  animation-play-state:paused!important;
}
.quality-economy .glass-panel,.quality-economy .bottom-nav,.quality-economy .sheet>section,
.quality-economy .hotspot,.quality-economy .reactor-console{
  backdrop-filter:none!important;
}
@media(max-width:420px){
  :root{--opt-intrinsic-panel:300px;--opt-intrinsic-list:440px}
}
