:root{
  --bg:#02080d;--panel:#06131c;--panel2:#091a24;--line:#1a4254;--cyan:#19d9f3;--cyan2:#7ff4ff;--orange:#f28a19;--orange2:#ffb13c;--muted:#78909b;--text:#e8f4f7;--danger:#ef493d;
  font-family: "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  color:var(--text);background:var(--bg)
}
*{box-sizing:border-box}html,body{margin:0;background:#000;color:var(--text);overscroll-behavior:none}body{min-height:100dvh;overflow:hidden}.app-shell{width:min(100%,500px);height:100dvh;margin:auto;background:linear-gradient(#06121a,#02080d);display:flex;flex-direction:column;gap:6px;padding:max(5px,env(safe-area-inset-top)) 7px max(6px,env(safe-area-inset-bottom));overflow:hidden;position:relative}.brand-line{height:17px;display:flex;align-items:center;gap:5px;padding:0 4px;color:#4ca0b5;font-size:9px;letter-spacing:1.3px}.brand-line b{color:#7cc6d6}.brand-line i{font-style:normal;color:#345967;margin-left:auto;font-size:7px}.brand-mark{color:var(--cyan)}
.hud{height:70px;display:grid;grid-template-columns:repeat(4,1fr);gap:5px;flex:none}.hud-card{min-width:0;position:relative;border:1px solid #315a6b;background:linear-gradient(180deg,#081d28,#041018 78%);display:flex;align-items:center;padding:7px 5px;gap:5px;clip-path:polygon(8px 0,calc(100% - 8px) 0,100% 8px,100% calc(100% - 8px),calc(100% - 8px) 100%,8px 100%,0 calc(100% - 8px),0 8px);box-shadow:inset 0 0 0 1px #0b2e3b,inset 0 -14px 22px rgba(0,0,0,.25)}.hud-card:before{content:"";position:absolute;inset:3px;border-top:1px solid #2da7c1;pointer-events:none}.hud-card>div{min-width:0;display:flex;flex-direction:column;gap:2px}.hud-card small{font-size:8px;letter-spacing:.8px;color:#b7c9cf;white-space:nowrap}.hud-card strong{font-size:14px;color:white;white-space:nowrap;line-height:1}.hud-card:nth-child(4) strong{color:var(--cyan2)}.hud-svg{width:22px;height:28px;fill:none;stroke:#9bc2cf;stroke-width:1.7;flex:none}.energy-svg{stroke:none;fill:var(--cyan)}.depth-svg{stroke:var(--cyan);stroke-width:2}.coin-icon{display:grid;place-items:center;width:24px;height:24px;border:2px solid #ffc047;border-radius:50%;font-weight:900;color:#ffc047;background:#7b4204;box-shadow:0 0 8px #ff8b1744;font-size:12px;flex:none}.hud-meter{height:4px;width:100%;border-radius:4px;background:#102b34;overflow:hidden;margin-top:2px}.hud-meter i{display:block;height:100%;background:linear-gradient(90deg,#0fbdd4,#6ff3ff);width:0;box-shadow:0 0 6px #28e8ff}.hud-card:nth-child(3) .hud-meter i{width:100%}
.world-stage{position:relative;min-height:270px;flex:1 1 auto;border:1px solid #173f4e;background:#07131a;overflow:hidden;isolation:isolate;box-shadow:inset 0 0 0 1px #0d2b36}.world-stage canvas{position:absolute;inset:0;width:100%;height:100%;z-index:1}.world-shade{position:absolute;inset:0;z-index:4;pointer-events:none;background:radial-gradient(ellipse at 50% 52%,transparent 20%,rgba(0,0,0,.06) 55%,rgba(0,0,0,.42) 100%);mix-blend-mode:multiply}.boost-card{position:absolute;z-index:9;top:10px;left:9px;width:112px;min-height:82px;background:linear-gradient(145deg,rgba(8,28,38,.94),rgba(7,18,25,.82));border:1px solid #2b5362;clip-path:polygon(0 0,calc(100% - 14px) 0,100% 14px,100% 100%,14px 100%,0 calc(100% - 14px));padding:9px}.aside-title{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #24434e;padding-bottom:6px}.aside-title span{font-size:8px;letter-spacing:.7px;color:#b8c9cd}.aside-title button{border:1px solid #5b8190;color:#9ab6c0;background:transparent;border-radius:50%;font-size:8px;width:15px;height:15px;padding:0}.boost-empty,.boost-live{padding-top:8px}.boost-empty{display:grid;grid-template-columns:22px 1fr;gap:2px 5px;align-items:center}.boost-empty i{grid-row:1/3;font-size:18px;color:#244752;font-style:normal}.boost-empty b{font-size:9px;color:#76909a}.boost-empty small{font-size:7px;color:#4d6670}.boost-live{display:none;align-items:center;gap:7px}.boost-live i{font-style:normal;color:#ffae39;font-size:18px}.boost-live b{font-size:8px;color:#d8f5fb}.boost-live small{font-size:8px;color:#62e9fa}.boost-card.active .boost-empty{display:none}.boost-card.active .boost-live{display:flex}
.depth-gauge{position:absolute;z-index:10;right:8px;top:9px;bottom:9px;width:91px;background:linear-gradient(180deg,rgba(6,22,31,.95),rgba(4,14,20,.97));border:1px solid #345f70;clip-path:polygon(13px 0,100% 0,100% calc(100% - 13px),calc(100% - 13px) 100%,0 100%,0 13px);box-shadow:inset 0 0 0 1px #0b2b38}.gauge-track{position:absolute;left:24px;top:20px;bottom:85px;width:1px;background:#53727e}.tick{position:absolute;left:18px;display:flex;align-items:center;gap:8px;color:#a7b8bd;font-size:9px}.tick i{width:9px;height:9px;border-radius:50%;background:#738a93}.t0{top:18px}.t5{top:45%}.t10{bottom:87px}.current-marker{position:absolute;left:14px;top:20px;display:flex;align-items:center;gap:4px;transition:top .12s linear}.current-marker i{width:11px;height:11px;border-radius:50%;background:#24eaff;box-shadow:0 0 12px #24eaff}.current-marker strong{font-size:11px;color:#8ff8ff;background:#07212b;border:1px solid #2d8ea5;padding:3px 5px;white-space:nowrap}.next-strata{position:absolute;bottom:8px;left:7px;right:7px;text-align:center;border-top:1px solid #284954;padding-top:7px}.next-strata small{font-size:7px;color:#76ddec;line-height:1.1}.next-strata b{display:block;color:#d35dff;font-size:14px;margin-top:2px}.next-strata span{color:#ca53ff;font-size:13px}
.drill-rig{position:absolute;z-index:6;left:50%;top:7%;width:min(47%,190px);height:78%;transform:translateX(-50%);pointer-events:none;filter:drop-shadow(0 8px 8px rgba(0,0,0,.55))}.drill-body{position:absolute;left:50%;top:0;height:73%;max-width:100%;transform:translateX(-50%);object-fit:contain;transform-origin:50% 50%}.drill-bit{position:absolute;left:50%;top:57%;height:42%;max-width:52%;transform:translateX(-50%);object-fit:contain;filter:drop-shadow(0 4px 3px #000)}.spin-blur{position:absolute;left:50%;top:70%;width:76%;transform:translateX(-50%);opacity:0;mix-blend-mode:screen}.drill-shadow{position:absolute;left:50%;top:18%;width:72%;height:70%;transform:translateX(-50%);background:radial-gradient(ellipse,rgba(0,0,0,.42),transparent 68%);filter:blur(8px);z-index:-1}.core-glow{position:absolute;left:50%;top:42%;width:12%;aspect-ratio:1/1;transform:translate(-50%,-50%);background:#34eaff;border-radius:50%;filter:blur(10px);opacity:.42;mix-blend-mode:screen;animation:corePulse 1.5s ease-in-out infinite}.drill-rig.running .drill-body{animation:bodyVibe .12s linear infinite}.drill-rig.running .spin-blur{opacity:.19;animation:blurPulse .25s linear infinite}.drill-rig.overclock .core-glow{opacity:.85;filter:blur(13px)}.drill-rig.overclock .spin-blur{opacity:.45}@keyframes bodyVibe{0%,100%{transform:translateX(-50%) translate(0)}25%{transform:translateX(-50%) translate(.6px,-.4px)}50%{transform:translateX(-50%) translate(-.5px,.5px)}75%{transform:translateX(-50%) translate(.3px,.2px)}}@keyframes corePulse{50%{opacity:.7;transform:translate(-50%,-50%) scale(1.18)}}@keyframes blurPulse{50%{transform:translateX(-50%) scaleX(1.07);opacity:.3}}
.impact-labels{position:absolute;z-index:12;left:36%;right:26%;bottom:4%;height:70px;pointer-events:none}.gain-pop{position:absolute;left:50%;bottom:10px;transform:translateX(-50%);font-weight:900;font-size:11px;color:#eafaff;text-shadow:0 0 6px #000;animation:gain 1.15s ease-out forwards}.gain-pop.copper{color:#ffae51}.gain-pop.rare{color:#da72ff}@keyframes gain{to{transform:translate(-50%,-45px);opacity:0}}.toast-stack{position:absolute;z-index:20;left:50%;top:10px;transform:translateX(-50%);display:flex;flex-direction:column;gap:5px;width:min(68%,260px);pointer-events:none}.toast{font-size:9px;font-weight:700;text-align:center;padding:8px 10px;background:#071820e9;border:1px solid #16849a;color:#caf7ff;clip-path:polygon(8px 0,100% 0,100% calc(100% - 8px),calc(100% - 8px) 100%,0 100%,0 8px);box-shadow:0 0 12px #0008}.toast.rare{border-color:#a63af0;color:#e9a8ff}.toast.warn{border-color:#e87d21;color:#ffb36b}
.start-overlay{position:absolute;z-index:30;inset:0;background:linear-gradient(rgba(1,7,10,.12),rgba(1,7,10,.58));display:flex;align-items:flex-end;justify-content:center;padding:18px 100px 18px 18px;transition:.25s}.start-overlay.hidden{opacity:0;visibility:hidden}.start-card{width:min(100%,260px);background:#071923e8;border:1px solid #2d6c7d;padding:10px;text-align:center}.start-card small{font-size:8px;color:#72dcec}.start-card strong{display:block;font-size:18px;margin:3px}.start-card p{font-size:9px;color:#92a8af;margin:5px 0 8px}.action{border:1px solid #1bb4ce;background:#06303c;color:#baf8ff;padding:8px 12px;font-weight:800;font-size:10px}.action.orange,.sell-btn{border-color:#c56e20;background:linear-gradient(#8f3f05,#5b2503);color:#ffe1bd}.action.danger{border-color:#b63d38;background:#4c1211;color:#ffc0bb}
.main-nav{height:61px;display:grid;grid-template-columns:repeat(5,1fr);gap:3px;flex:none}.nav-btn{position:relative;border:1px solid #183b49;background:linear-gradient(#071924,#041018);color:#7f98a2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:0;clip-path:polygon(7px 0,calc(100% - 7px) 0,100% 7px,100% calc(100% - 7px),calc(100% - 7px) 100%,7px 100%,0 calc(100% - 7px),0 7px);padding:2px}.nav-btn svg{width:25px;height:27px;fill:none;stroke:#8faab4;stroke-width:1.6}.nav-btn span{font-size:7px;white-space:nowrap}.nav-btn.active{border-color:#2addf6;color:#75edfb;background:linear-gradient(#0a2935,#061822);box-shadow:inset 0 0 16px #0ac9e42b}.nav-btn.active svg{stroke:#2de9ff;filter:drop-shadow(0 0 4px #10e7ff)}.nav-btn.locked{filter:saturate(.3);opacity:.52}.lock-dot{position:absolute;right:6px;top:5px;color:#d6a13b;font-size:9px;font-style:normal}
.control-panel{height:223px;flex:none;border:1px solid #173d4b;background:linear-gradient(#06141d,#030b10);position:relative;overflow:hidden}.panel-view{display:none;height:100%;padding:8px}.panel-view.active{display:block}.drill-summary{height:82px;display:grid;grid-template-columns:66px 1fr;grid-template-rows:38px 42px;gap:2px 7px;border-bottom:1px solid #173845;padding-bottom:5px}.drill-thumb{grid-row:1/3;background:#06131b;border:1px solid #244a59;display:grid;place-items:center;overflow:hidden}.drill-thumb img{height:82px;transform:translateY(9px)}.summary-title{min-width:0}.summary-title small{display:block;color:#58e6f6;font-size:10px;font-weight:800}.summary-title strong{font-size:14px}.level-track{display:block;height:5px;background:#0a2932;margin-top:4px;overflow:hidden}.level-track i{display:block;height:100%;background:linear-gradient(90deg,#12cde6,#5ef5ff);width:10%;box-shadow:0 0 7px #1de6ff}.summary-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:2px}.summary-stats div{border-left:1px solid #173845;padding-left:4px;min-width:0}.stat-icon{float:left;color:#c0d6de;font-size:11px;margin-right:3px}.summary-stats small{display:block;font-size:6.5px;color:#9cb0b7;white-space:nowrap}.summary-stats b{font-size:8px;color:#f1fbff;white-space:nowrap}.upgrade-list{display:grid;grid-template-rows:repeat(3,1fr);height:128px;gap:3px;padding-top:5px}.upgrade-row{display:grid;grid-template-columns:42px 1fr 74px 80px;align-items:center;gap:5px;border:1px solid #173845;background:#07151d;padding:3px 4px}.part-icon{width:39px;height:36px;border:1px solid #274a57;background:#050d12;display:grid;place-items:center}.part-icon img{max-width:35px;max-height:33px}.part-copy{display:flex;flex-direction:column;min-width:0}.part-copy>b{font-size:9px}.part-copy small{font-size:7px;color:#b0c1c6}.part-copy em{font-size:6.5px;color:#63808a;font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.part-next{display:flex;justify-content:center;align-items:center;gap:4px;font-size:8px;color:#9db1b8}.part-next i{font-style:normal;color:#3d6c7a;font-weight:900}.part-next b{color:#e9fbff}.upgrade-btn{height:38px;border:1px solid #c06918;background:linear-gradient(#7c3504,#4a1e02);color:#ffd9aa;font-size:7px;font-weight:800;display:flex;flex-direction:column;align-items:center;justify-content:center}.upgrade-btn strong{font-size:9px;color:#ffd075}.upgrade-btn:disabled{filter:saturate(.15);opacity:.48}.storage-head{height:48px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #183845;padding-bottom:6px}.storage-head small{display:block;color:#5ae8f7;font-size:8px}.storage-head strong{font-size:19px}.sell-btn{height:35px;padding:0 13px;font-size:9px;font-weight:900}.inventory-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;height:92px;padding:8px 0}.inventory-grid article{display:grid;grid-template-columns:42px 1fr 18px;gap:4px;align-items:center;border:1px solid #173845;background:#06131b;padding:4px}.ore-icon{width:38px;height:38px;display:grid;place-items:center;background:radial-gradient(circle,#132a33,#040a0e);border:1px solid #1d3a46;overflow:hidden}.ore-icon img{max-width:44px;max-height:42px;image-rendering:auto}.inventory-grid b{font-size:8px}.inventory-grid small{display:block;font-size:6.5px;color:#748d96}.inventory-grid strong{font-size:11px;text-align:right}.locked-resource{opacity:.38}.unknown{font-size:18px;color:#566b73}.storage-upgrade{height:55px;border-top:1px solid #183845;display:flex;align-items:center;justify-content:space-between;padding-top:7px}.storage-upgrade small{display:block;font-size:7px;color:#81959b}.storage-upgrade strong{font-size:13px}.storage-upgrade .upgrade-btn{width:94px}.locked-panel{display:none!important;align-items:center;justify-content:center;flex-direction:column;gap:8px;text-align:center;color:#728890}.locked-panel.active{display:flex!important}.locked-panel svg{width:38px;height:38px;fill:none;stroke:#738c95;stroke-width:1.5}.locked-panel b{font-size:10px}.locked-panel small{font-size:8px}.map-panel{padding:6px}.map-panel>b{font-size:10px;color:#65e9f7}.map-track{height:7px;background:#0d2a34;margin:10px 0;overflow:hidden}.map-track i{display:block;height:100%;width:0;background:#29e2f5}.map-panel>div:not(.map-track){display:flex;justify-content:space-between;border-bottom:1px solid #173642;padding:7px 2px;font-size:8px}.map-panel>small{display:block;color:#718992;font-size:7px;margin-top:8px}.locked-row{opacity:.45}
.bottom-bar{height:56px;display:grid;grid-template-columns:58px 1fr 58px;gap:6px;flex:none}.square-control,.overclock-control{border:1px solid #183b49;background:linear-gradient(#071923,#030b10);color:#718994;clip-path:polygon(9px 0,calc(100% - 9px) 0,100% 9px,100% calc(100% - 9px),calc(100% - 9px) 100%,9px 100%,0 calc(100% - 9px),0 9px)}.square-control svg{width:29px;height:29px;fill:none;stroke:#9db4bd;stroke-width:1.8}.overclock-control{display:flex;align-items:center;justify-content:center;gap:8px;border-color:#3d3325}.overclock-control svg{width:24px;height:30px;fill:#6d7374;stroke:none}.overclock-control b{display:block;font-size:12px}.overclock-control small{display:block;font-size:7px;color:#596b71}.overclock-control.available{border-color:#bd6010;background:linear-gradient(#321605,#160b04);color:#ffb344}.overclock-control.available svg{fill:#ff8a1a}.overclock-control.active{border-color:#ff8e1d;box-shadow:inset 0 0 22px #ff74192e;color:#ffd28a}.overclock-control.active svg{fill:#ffc05c}
.modal{border:0;background:transparent;padding:0;color:var(--text)}.modal::backdrop{background:#000b}.modal-card{width:min(330px,88vw);background:#06141d;border:1px solid #2a5b6b;padding:14px;display:flex;flex-direction:column;gap:11px}.modal-card header{display:flex;justify-content:space-between}.modal-card header button{background:none;border:0;color:#a5bbc2;font-size:20px}.modal-card label{font-size:10px;color:#a8bcc2}.modal-card p,.modal-card small{font-size:9px;color:#8199a1}.info-line{display:flex;justify-content:space-between;font-size:10px}.complete-card>b{color:#67ebf9}.complete-card p{font-size:10px}
@media(max-width:370px){.hud{height:65px}.hud-card{padding:5px 3px}.hud-card small{font-size:7px}.hud-card strong{font-size:12px}.hud-svg{width:18px}.coin-icon{width:20px;height:20px}.world-stage{min-height:245px}.boost-card{width:98px}.depth-gauge{width:82px}.drill-rig{width:44%}.control-panel{height:215px}.upgrade-row{grid-template-columns:38px 1fr 60px 72px}.part-next{font-size:7px}.main-nav{height:56px}.bottom-bar{height:52px}}
@media(min-height:880px){.control-panel{height:238px}.world-stage{min-height:315px}.upgrade-list{height:142px}.upgrade-row{padding:5px}.drill-summary{height:87px}}

/* =============================
   DEEP CORE V0.3 — WORLD REBUILD
   ============================= */
.app-shell{gap:5px;padding:max(4px,env(safe-area-inset-top)) 7px max(4px,env(safe-area-inset-bottom));min-height:0}
.brand-line{height:15px;font-size:8px}.brand-line i{font-size:6px}
.hud{height:66px;gap:4px}.hud-card{padding:6px 4px;gap:4px}.hud-card small{font-size:7.4px;letter-spacing:.62px}.hud-card strong{font-size:13px}.hud-svg{width:20px;height:25px}.coin-icon{width:22px;height:22px;font-size:11px}.hud-card.low-energy{border-color:#8e4c2b}.hud-card.low-energy .hud-meter i{background:linear-gradient(90deg,#e95c2d,#ffad43)}
.world-stage{min-height:218px;flex:1 1 235px;border-color:#235668;box-shadow:inset 0 0 0 1px #0a2632,0 0 0 1px #051016;min-width:0}
.world-shade{background:radial-gradient(ellipse at 50% 54%,transparent 25%,rgba(0,0,0,.05) 58%,rgba(0,0,0,.34) 100%)}
.boost-card{top:9px;left:9px;width:101px;min-height:63px;padding:7px 8px}.aside-title{padding-bottom:4px}.aside-title span{font-size:7px}.boost-empty{padding-top:5px;grid-template-columns:18px 1fr}.boost-empty i{font-size:14px}.boost-empty b{font-size:7.5px}.boost-empty small{font-size:6px}.boost-card.active{width:112px;min-height:72px}
.depth-gauge{right:8px;top:8px;bottom:8px;width:86px}.gauge-track{left:22px;top:18px;bottom:94px}.tick{left:16px;gap:7px;font-size:8px}.tick i{width:8px;height:8px}.t0{top:17px}.t5{top:43%}.t10{bottom:94px}.current-marker{left:12px}.current-marker i{width:10px;height:10px}.current-marker strong{font-size:10px;padding:3px 4px}.next-strata{bottom:6px;left:8px;right:8px;padding-top:6px;background:#06151dcc}.next-strata small{font-size:6.5px}.next-strata b{font-size:13px}

/* Rig: body remains the silhouette while additional mechanical pieces move independently. */
.drill-rig{top:7.5%;width:min(50%,195px);height:79%;filter:drop-shadow(0 8px 8px rgba(0,0,0,.68))}
.drill-body{z-index:4;height:72%}.drill-bit{z-index:8;top:57%;height:42%;max-width:50%}.drill-shadow{top:18%;width:78%;height:72%;filter:blur(10px)}.core-glow{z-index:6;top:42%;width:10%;opacity:.36}
.rig-layer{position:absolute;pointer-events:none;object-fit:contain;filter:drop-shadow(0 2px 2px #0008)}
.piston-layer{z-index:5;height:26%;top:31%;transform-origin:50% 12%}.piston-left{left:10%}.piston-right{right:10%}.cable-layer{z-index:3;height:34%;top:22%;opacity:.72;transform-origin:50% 8%}.cable-left{left:6%}.cable-right{right:5%;transform:scaleX(-1)}.status-indicator{z-index:7;height:12%;left:50%;top:34%;transform:translateX(-50%);opacity:.32;mix-blend-mode:screen}
.drill-rig.running .piston-left{animation:pistonLeft .62s ease-in-out infinite}.drill-rig.running .piston-right{animation:pistonRight .62s .09s ease-in-out infinite}.drill-rig.running .cable-left{animation:cableLeft 1.05s ease-in-out infinite}.drill-rig.running .cable-right{animation:cableRight 1.18s ease-in-out infinite}.drill-rig.running .status-indicator{animation:statusPulse 1.4s ease-in-out infinite}.drill-rig.running .drill-body{animation:bodyVibe .11s linear infinite}.drill-rig.running .spin-blur{opacity:.13}.drill-rig.overclock .spin-blur{opacity:.34}
@keyframes pistonLeft{0%,100%{transform:translateY(0)}50%{transform:translateY(5px)}}
@keyframes pistonRight{0%,100%{transform:translateY(0)}50%{transform:translateY(5px)}}
@keyframes cableLeft{0%,100%{transform:rotate(-.45deg)}50%{transform:rotate(.55deg)}}
@keyframes cableRight{0%,100%{transform:scaleX(-1) rotate(-.4deg)}50%{transform:scaleX(-1) rotate(.5deg)}}
@keyframes statusPulse{0%,100%{opacity:.23;filter:drop-shadow(0 0 2px #26f495)}50%{opacity:.42;filter:drop-shadow(0 0 7px #26f495)}}

.main-nav{height:57px;gap:3px}.nav-btn svg{width:23px;height:25px}.nav-btn span{font-size:6.7px}.nav-btn.active{box-shadow:inset 0 0 18px #0ac9e43b,0 0 8px #0ac9e425}.nav-btn.locked{opacity:.42}.lock-dot{right:7px;top:6px;width:9px;height:8px;color:transparent}.lock-dot:before{content:"";position:absolute;left:2px;top:0;width:5px;height:5px;border:1px solid #b88b40;border-bottom:0;border-radius:5px 5px 0 0}.lock-dot span{position:absolute;left:1px;bottom:0;width:7px;height:5px;background:#8d6b33;border:1px solid #c19a53;border-radius:1px}

.control-panel{height:210px;flex:none}.panel-view{padding:7px}.drill-summary{height:76px;grid-template-columns:62px 1fr;grid-template-rows:34px 38px}.drill-thumb img{height:75px}.summary-title small{font-size:9.4px}.summary-title strong{font-size:13px}.level-track{height:7px;position:relative;background:repeating-linear-gradient(90deg,#0a2b34 0 8.7%,#06151b 8.7% 10%);border:1px solid #153945}.level-track i{position:absolute;inset:0 auto 0 0;background:repeating-linear-gradient(90deg,#1bd8ed 0 8.7%,#0d91a5 8.7% 10%)}.level-track b{position:absolute;right:3px;top:-13px;font-size:6px;color:#6d8c96;font-weight:700}.summary-stats small{font-size:6px}.summary-stats b{font-size:7.6px}.stat-icon{font-size:10px}
.upgrade-list{height:119px;gap:2px;padding-top:4px}.upgrade-row{grid-template-columns:38px 1fr 68px 76px;gap:4px;padding:2px 3px}.part-icon{width:35px;height:32px}.part-icon img{max-width:32px;max-height:29px}.part-copy>b{font-size:8.5px}.part-copy small{font-size:6.5px}.part-copy em{font-size:6px}.part-next{font-size:7.4px}.upgrade-btn{height:34px;font-size:6.5px}.upgrade-btn strong{font-size:8.4px}
.storage-head{height:43px}.storage-head strong{font-size:17px}.sell-btn{height:31px;padding:0 10px;font-size:8px}.inventory-grid{height:84px;padding:6px 0;gap:4px}.inventory-grid article{grid-template-columns:38px 1fr 16px;padding:3px}.ore-icon{width:34px;height:34px;background:radial-gradient(circle,#10252d,#04090d)}.ore-icon img{max-width:31px;max-height:31px;filter:drop-shadow(0 2px 2px #000)}.inventory-grid b{font-size:7.5px}.inventory-grid small{font-size:6px}.storage-upgrade{height:48px;padding-top:5px}.storage-upgrade strong{font-size:12px}.storage-upgrade .upgrade-btn{width:88px}.mini-lock{position:relative;width:12px;height:13px;display:block}.mini-lock:before{content:"";position:absolute;left:3px;top:0;width:6px;height:6px;border:1px solid #8ca0a7;border-bottom:0;border-radius:6px 6px 0 0}.mini-lock span{position:absolute;left:1px;bottom:0;width:10px;height:7px;background:#53646a;border-radius:2px}
.bottom-bar{height:51px;grid-template-columns:55px 1fr 55px}.square-control svg{width:27px;height:27px}.overclock-control b{font-size:11px}.overclock-control small{font-size:6.5px}

/* Short browser viewport: keep the complete bottom controls visible instead of clipping them. */
@media(max-height:760px){
  .app-shell{gap:4px;padding-top:3px;padding-bottom:3px}.brand-line{height:13px}.hud{height:60px}.hud-card{padding:4px 3px}.hud-card small{font-size:6.7px}.hud-card strong{font-size:11.5px}.hud-svg{width:18px}.coin-icon{width:19px;height:19px;font-size:9px}
  .world-stage{min-height:192px;flex-basis:205px}.main-nav{height:51px}.nav-btn svg{width:21px;height:22px}.control-panel{height:190px}.drill-summary{height:68px;grid-template-columns:56px 1fr;grid-template-rows:31px 33px}.drill-thumb img{height:68px}.upgrade-list{height:108px}.upgrade-row{grid-template-columns:34px 1fr 61px 69px}.part-icon{width:31px;height:29px}.upgrade-btn{height:31px}.bottom-bar{height:46px}.boost-card{transform:scale(.92);transform-origin:top left}.depth-gauge{width:80px}.drill-rig{width:min(47%,178px)}
}
@media(max-height:680px){.brand-line{display:none}.hud{height:56px}.world-stage{min-height:175px}.control-panel{height:176px}.drill-summary{height:62px}.upgrade-list{height:101px}.main-nav{height:48px}.bottom-bar{height:43px}}
@media(max-width:370px){.hud{gap:3px}.hud-card small{font-size:6.5px}.hud-card strong{font-size:11px}.world-stage{min-height:190px}.drill-rig{width:48%}.control-panel{height:187px}.upgrade-row{grid-template-columns:32px 1fr 55px 64px}.part-next{font-size:6.5px}.main-nav{height:49px}.bottom-bar{height:44px}}

/* =============================
   DEEP CORE V0.4 — MECHANICAL / TERRAIN REBUILD
   ============================= */
.world-stage{border-color:#2b5d6f;background:#071219;box-shadow:inset 0 0 0 1px #0b2732,0 0 12px #0008}
.world-shade{background:radial-gradient(ellipse at 50% 55%,transparent 30%,rgba(0,0,0,.04) 62%,rgba(0,0,0,.30) 100%)}

/* Smaller depth gauge: it no longer consumes a large part of the playfield. */
.depth-gauge{right:7px;top:10px;bottom:10px;width:57px;border-color:#315a68;background:linear-gradient(180deg,rgba(4,19,27,.91),rgba(3,13,19,.95));box-shadow:inset 0 0 0 1px #0b2935,0 5px 14px #0007;clip-path:polygon(9px 0,100% 0,100% calc(100% - 9px),calc(100% - 9px) 100%,0 100%,0 9px)}
.gauge-track{left:19px;top:18px;bottom:61px;background:linear-gradient(#2b6777,#55d7e8 45%,#466772)}
.tick{left:14px;gap:5px;font-size:7px}.tick i{width:7px;height:7px}.t0{top:16px}.t5{top:46%}.t10{bottom:59px}
.current-marker{left:12px;gap:0;z-index:2}.current-marker i{width:10px;height:10px}.current-marker strong{position:absolute;right:31px;font-size:9px;padding:3px 5px;min-width:45px;text-align:center;box-shadow:0 0 9px #14dff744;background:#061c26dd}
.next-strata{bottom:5px;left:5px;right:5px;padding-top:4px}.next-strata small{font-size:0;line-height:1}.next-strata small:after{content:"STRATE";font-size:5.8px;color:#68dbe9;letter-spacing:.6px}.next-strata b{font-size:11px;margin-top:1px}.next-strata span{font-size:9px}

/* Compact empty boost panel, with more playfield visible. */
.boost-card{width:92px;min-height:55px;padding:6px 7px;top:8px;left:8px;background:linear-gradient(145deg,rgba(6,26,35,.89),rgba(5,16,23,.77))}.aside-title span{font-size:6.4px}.aside-title button{width:14px;height:14px;font-size:7px}.boost-empty{padding-top:4px;grid-template-columns:14px 1fr;gap:1px 4px}.boost-empty i{font-size:12px}.boost-empty b{font-size:6.8px}.boost-empty small{font-size:5.3px}

/* Clean V0.4 drill: no atlas fragments floating around the machine. */
.drill-rig{top:6.5%;width:min(52%,205px);height:84%;filter:drop-shadow(0 9px 8px rgba(0,0,0,.7));transform:translateX(-50%);overflow:visible}
.drill-base{position:absolute;z-index:4;left:0;top:0;width:100%;height:auto;object-fit:contain;transform-origin:50% 48%;filter:drop-shadow(0 3px 3px #0008)}
.mech-piston{position:absolute;z-index:6;height:auto;object-fit:contain;transform-origin:50% 16%;filter:drop-shadow(0 2px 2px #000a)}
.mech-piston-left{left:26.1%;top:13.3%;width:11.9%}.mech-piston-right{left:65.4%;top:13.3%;width:12.8%}
.lower-collar{position:absolute;z-index:7;left:32.1%;top:69%;width:40.1%;height:auto;object-fit:contain;transform-origin:50% 22%;filter:drop-shadow(0 2px 3px #000a)}
.drill-bit{z-index:8;left:50%;top:86%;width:43%;height:auto;max-width:none;transform:translate(-50%,-4%);object-fit:contain;filter:drop-shadow(0 4px 4px #000)}
.drill-shadow{top:18%;width:76%;height:75%;filter:blur(11px);opacity:.82}.core-glow{z-index:9;top:49.5%;width:12%;opacity:.34;filter:blur(9px)}
.cable-arc{position:absolute;z-index:3;top:45%;width:13%;height:29%;border:3px solid #15191b;border-top-color:transparent;border-radius:50%;filter:drop-shadow(0 1px 1px #000);opacity:.9;transform-origin:50% 8%}.cable-arc-left{left:23%;border-right-color:#1d2427}.cable-arc-right{right:22%;border-left-color:#1d2427}
.bit-motion-ring{position:absolute;z-index:10;left:50%;top:92%;width:54%;height:13%;transform:translateX(-50%);border-radius:50%;background:radial-gradient(ellipse,rgba(77,235,255,.13),rgba(31,133,160,.04) 43%,transparent 70%);opacity:0;mix-blend-mode:screen;pointer-events:none}

.drill-rig.running .drill-base{animation:v04BodyVibe .13s linear infinite}.drill-rig.running .mech-piston-left{animation:v04PistonL .54s cubic-bezier(.45,.05,.55,.95) infinite}.drill-rig.running .mech-piston-right{animation:v04PistonR .54s .075s cubic-bezier(.45,.05,.55,.95) infinite}.drill-rig.running .lower-collar{animation:v04Collar .27s ease-in-out infinite}.drill-rig.running .cable-arc-left{animation:v04CableL .82s ease-in-out infinite}.drill-rig.running .cable-arc-right{animation:v04CableR .94s ease-in-out infinite}.drill-rig.running .bit-motion-ring{opacity:.34;animation:v04Ring .20s linear infinite}.drill-rig.running .core-glow{animation:v04Core 1.05s ease-in-out infinite}.drill-rig.overclock .bit-motion-ring{opacity:.68}.drill-rig.overclock .core-glow{opacity:.82;filter:blur(13px)}
@keyframes v04BodyVibe{0%,100%{transform:translate(0,0)}25%{transform:translate(.45px,-.7px)}50%{transform:translate(-.5px,.25px)}75%{transform:translate(.3px,.65px)}}
@keyframes v04PistonL{0%,100%{transform:translateY(0) rotate(-.08deg)}50%{transform:translateY(3.5px) rotate(.16deg)}}
@keyframes v04PistonR{0%,100%{transform:translateY(0) rotate(.08deg)}50%{transform:translateY(3.5px) rotate(-.16deg)}}
@keyframes v04Collar{0%,100%{transform:translateY(0) scaleY(1)}50%{transform:translateY(1.8px) scaleY(.994)}}
@keyframes v04CableL{0%,100%{transform:rotate(-.8deg) scaleX(1)}50%{transform:rotate(.65deg) scaleX(.97)}}
@keyframes v04CableR{0%,100%{transform:rotate(.7deg) scaleX(1)}50%{transform:rotate(-.6deg) scaleX(.97)}}
@keyframes v04Ring{0%{transform:translateX(-50%) scaleX(.92);opacity:.18}50%{transform:translateX(-50%) scaleX(1.07);opacity:.42}100%{transform:translateX(-50%) scaleX(.92);opacity:.18}}
@keyframes v04Core{0%,100%{opacity:.3;transform:translate(-50%,-50%) scale(.93)}50%{opacity:.62;transform:translate(-50%,-50%) scale(1.13)}}

/* Resource cards use purpose-built transparent ore SVGs. */
.ore-icon img{max-width:35px;max-height:35px;width:35px;height:35px;object-fit:contain}.stone-ore img,.copper-ore img{filter:drop-shadow(0 2px 3px #000a)}

@media(max-height:760px){.depth-gauge{width:53px}.current-marker strong{right:28px}.drill-rig{width:min(49%,190px);top:6%}.boost-card{transform:scale(.88);transform-origin:top left}}
@media(max-width:370px){.depth-gauge{width:50px}.drill-rig{width:50%}.current-marker strong{right:26px;font-size:8px}}

/* V0.4 rig coordinate fix: all body pieces share the same mechanical coordinate space. */
.drill-rig{height:auto;aspect-ratio:998/1515;overflow:visible}
.drill-machine{position:absolute;z-index:4;left:0;top:0;width:100%;height:70.3%;overflow:visible;transform-origin:50% 48%}
.drill-base{left:0;top:0;width:100%;height:100%;object-fit:fill}
.mech-piston-left{left:26.15%;top:13.33%;width:11.72%}.mech-piston-right{left:65.43%;top:13.33%;width:12.22%}
.lower-collar{left:32.06%;top:69.01%;width:40.08%}
.core-glow{top:51%;left:50%}.cable-arc{top:48%;height:30%}
.drill-bit{left:50%;top:66.3%;width:43%;height:auto;max-width:none;transform:translateX(-50%)}
.bit-motion-ring{top:87%;width:49%;height:9%}
.drill-rig.running .drill-machine{animation:v04BodyVibe .13s linear infinite}
.drill-rig.running .drill-base{animation:none}
