:root{color-scheme:dark;--ink:#f4ead8;--muted:#b9cbd1;--line:#466373;--panel:#192f41;--accent:#8ecde4;--gold:#efc27a;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:16px;background:#10243a;color:var(--ink);}
*{box-sizing:border-box;}
html,body{margin:0;width:100%;height:100%;overflow:hidden;}
body{overscroll-behavior:none;}
button,input{font:inherit;}
button{color:inherit;cursor:pointer;min-width:44px;min-height:44px;border:1px solid var(--line);background:#213b4e;border-radius:12px;padding:10px 14px;touch-action:manipulation;}
button:disabled{cursor:default;color:#acbcc3;background:#203344;border-color:#3f5260;}
button:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--gold);outline-offset:3px;}
button:active:not(:disabled){filter:brightness(1.17);}
[hidden]{display:none!important;}
svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;}
.icon-library{position:absolute;width:0;height:0;overflow:hidden;}
.canvas-wrap,.world-input,.transition-origin{position:absolute;inset:0;width:100%;height:100%;}
.canvas-wrap{pointer-events:none;}
canvas{display:block;width:100%;height:100%;}
.world-input{touch-action:none;outline:none!important;}
.transition-origin{pointer-events:none;z-index:4;transform-origin:center;}
.hud button{pointer-events:auto;}
.hud-top{display:flex;align-items:center;gap:10px;}
.stage-button{display:flex;gap:10px;align-items:center;border:0;background:none;padding:0;text-align:left;}
.brand-mark img{display:block;width:36px;height:36px;}
.wordmark{font-size:16px;font-weight:800;letter-spacing:.16em;}
.wordmark>span{color:var(--accent);}
.stage-name{display:block;font-size:16px;color:var(--muted);line-height:22px;}
.icon-button{display:grid;place-items:center;padding:8px;width:44px;height:44px;font-size:30px;flex-shrink:0;}
.hud-top>.icon-button{margin-left:auto;background:#20384a;}
.eyebrow{display:block;font-size:16px;color:var(--muted);line-height:1.4;}
.resource-hud .eyebrow{font-size:16px;letter-spacing:.09em;}
.balance{display:flex;gap:8px;align-items:center;font-size:34px;font-weight:650;line-height:1.15;letter-spacing:-.03em;}
.balance svg{width:20px;height:20px;color:var(--gold);}
.balance-name,.balance-detail{font-size:16px;color:var(--muted);display:block;max-width:200px;overflow-wrap:anywhere;}
#income{font-size:20px;font-weight:600;overflow-wrap:anywhere;display:block;}
.resource-unit{font-size:16px;color:var(--muted);display:block;}
.multiplier{font-size:16px;display:flex;gap:6px;align-items:center;background:none;border:0;margin-left:auto;padding:8px 0;min-height:44px;}
.status-dot{width:6px;height:6px;border-radius:50%;display:inline-block;background:var(--accent);}
.bottom-hud{position:absolute;z-index:5;bottom:0;left:0;right:0;padding:8px 16px max(8px,env(safe-area-inset-bottom));background:linear-gradient(#10233800,#102338 14%);}
.development-summary{display:flex;align-items:center;gap:8px;justify-content:space-between;font-size:16px;min-height:44px;width:100%;background:transparent;border:0;padding:8px 4px;}
.development-summary>span:last-child{display:none;}
.nav-control strong{font-size:18px;font-weight:650;}
.nav-control>span{display:none;}
.nav-control svg{width:22px;height:22px;}
.expand-control{background:#8ecde4;color:#223a3b;border-color:#8ecde4;}
.save-row{display:flex;justify-content:flex-end;align-items:center;min-height:44px;}
.save-row>span{display:none;}
#help-button{border:0;background:none;font-size:16px;padding:5px 0 5px 12px;display:flex;align-items:center;gap:7px;}
.camera-tools button{pointer-events:auto;background:#1b3446ed;font-size:16px;padding:8px 10px;}
#reset-view{margin-left:auto;}
.text-button{border:0;background:none;color:var(--accent);padding:8px 0;text-align:left;font-size:16px;}
#graphics-status{position:absolute;inset:40% 18px auto;text-align:center;background:var(--panel);border-radius:12px;padding:20px;z-index:10;}
.purchase-feedback{position:absolute;top:45%;left:50%;transform:translateX(-50%);font-size:18px;color:var(--gold);opacity:0;pointer-events:none;z-index:7;max-width:90%;text-align:center;}
.transition-caption{position:absolute;left:20px;right:20px;top:32%;font-size:26px;text-align:center;pointer-events:none;z-index:8;opacity:0;}
.transition-caption.visible{opacity:1;}
.loading{position:absolute;inset:0;background:#10243a;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:20px;font-size:18px;z-index:20;text-align:center;padding:30px;}
.loading.done{opacity:0;pointer-events:none;transition:opacity .3s;}
.toast{position:fixed;bottom:255px;left:50%;transform:translate(-50%,12px);width:max-content;max-width:calc(100vw - 36px);z-index:30;background:#d8e9ed;color:#233e3c;box-shadow:0 8px 30px #0004;font-size:16px;line-height:24px;border-radius:12px;padding:12px 16px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;}
.toast.visible{opacity:1;transform:translate(-50%,0);}
.sheet:not([open]){display:none;}
.sheet[open]{display:flex;flex-direction:column;}
.sheet::backdrop{background:#07152280;}
.sheet h3{font-size:22px;margin:10px 0;}
.section-description,.sheet p{font-size:16px;line-height:1.5;color:var(--muted);margin:8px 0 18px;}
.sheet-balance>span{display:flex;align-items:center;gap:6px;overflow-wrap:anywhere;}
.sheet-balance svg{width:18px;height:18px;color:var(--gold);}
#sheet-income{font-size:18px;}
.build-tabs{display:flex;gap:8px;padding:12px 0;flex-shrink:0;}
.build-tabs button{flex:1;font-size:18px;background:transparent;}
.build-tabs button[aria-selected=true]{background:#8ecde4;color:#233d3d;border-color:#8ecde4;}
.build-tabs span{font-size:16px;}
.purchase-list{display:grid;gap:10px;}
.purchase{display:grid;grid-template-columns:36px minmax(0,1fr);gap:8px 12px;text-align:left;width:100%;padding:14px;border-radius:14px;align-items:start;}
.purchase-icon{width:36px;height:36px;display:grid;place-items:center;color:var(--accent);grid-column:1;grid-row:1/3;}
.purchase-icon svg{width:30px;height:30px;}
.purchase-main{grid-column:2;min-width:0;}
.purchase.owned{border-color:#6d8a72;background:#223b3e;}
.primary-button{width:100%;background:var(--accent);border-color:var(--accent);color:#213a35;font-size:18px;font-weight:650;display:flex;justify-content:center;gap:12px;align-items:center;margin:12px 0;min-height:50px;}
.secondary-button{font-size:16px;min-height:46px;}
.expansion-target{display:flex;gap:16px;align-items:center;padding:18px;background:#243e4d;border-radius:14px;}
.expansion-target>svg{width:38px;height:38px;color:var(--accent);}
.requirement{display:flex;gap:16px;justify-content:space-between;padding:12px 0;border-bottom:1px solid #39515f;font-size:16px;}
.requirement>span:last-child{white-space:nowrap;color:var(--muted);}
.requirement.complete>span:last-child{color:var(--accent);}
.expansion-price{font-size:18px;display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;margin:18px 0;}
.expansion-price strong{color:var(--gold);overflow-wrap:anywhere;}
.setting-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 0;border-bottom:1px solid #3d5562;min-height:74px;}
.setting-row strong{font-size:18px;}
.setting-row small{font-size:16px;display:block;color:var(--muted);margin-top:5px;line-height:1.5;}
.setting-row input{width:44px;height:44px;accent-color:#8ecde4;flex-shrink:0;}
.test-clock-button{width:100%;}
.test-clock-panel{border:1px solid var(--line);padding:16px;border-radius:14px;margin-top:15px;}
.test-clock-times{font-size:16px;display:grid;gap:4px;margin:12px 0;}
.test-clock-times dt{color:var(--muted);}
.test-clock-times dd{margin:0 0 12px;overflow-wrap:anywhere;}
.test-clock-jumps{display:flex;gap:6px;flex-wrap:wrap;}
.test-clock-label{display:block;line-height:1.4;margin:18px 0 10px;}
#test-clock-input{width:100%;min-height:48px;font-size:18px;background:#213c50;border:1px solid var(--line);border-radius:10px;padding:8px;color:var(--ink);}
.test-clock-indicator{font-size:16px;color:var(--gold);padding:4px 8px;}
#test-clock-return{width:100%;}
.help-steps{padding-left:25px;}
.help-steps li{padding:10px 0;}
.help-steps strong{font-size:18px;}
.history-list{display:grid;gap:10px;}
.journey-emblem{font-size:70px;color:var(--gold);text-align:center;}
.journey-stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.journey-stat-grid>div{padding:14px;background:#213b4c;border-radius:12px;}
.journey-stat-grid strong{font-size:22px;display:block;overflow-wrap:anywhere;}
.journey-stat-grid span{font-size:16px;color:var(--muted);}
.journey-timeline{margin:22px 0;}
.journey-timeline p{display:flex;justify-content:space-between;gap:15px;border-bottom:1px solid #3b5360;padding:10px 0;margin:0;font-size:16px;}
.journey-timeline p>span:last-child{white-space:nowrap;}
.puzzle-actions>*{flex:1;}
.route{stroke:#6a8797;stroke-width:1.5;stroke-dasharray:4 5;opacity:.75;}
.route.built{stroke:var(--accent);stroke-width:4;stroke-dasharray:none;opacity:1;}
.route-hit{stroke:transparent;stroke-width:54;cursor:pointer;}
.route-hit[aria-pressed=false]{pointer-events:none;}
.edge-label{fill:#e4f0ef;stroke:#182e40;stroke-width:7px;paint-order:stroke;font-size:20px;text-anchor:middle;dominant-baseline:central;pointer-events:none;}
.node{cursor:pointer;}
.node-base{fill:#24485d;stroke:#8ab5ca;stroke-width:1.6;}
.node.selected .node-base{stroke:var(--gold);stroke-width:3;fill:#3f544b;}
.node.eligible .node-base{stroke:var(--accent);}
.unit-icon{color:var(--accent);stroke:currentColor;}
.unit-label{fill:#e0e9e4;stroke:none;text-anchor:middle;font-size:20px;pointer-events:none;}
.puzzle-theme{display:none;}
.victory-check{color:var(--accent);}
.victory-check svg{width:38px;height:38px;}
.puzzle-victory h3{font-size:26px;margin:8px 0;}
.puzzle-victory p{margin:8px 0;}
.puzzle-victory strong{display:block;font-size:36px;color:var(--accent);}
.victory-reward{display:block;font-size:16px;color:var(--accent);}
.completed .node,.completed .route-hit{pointer-events:none;}
.completed .puzzle-feedback{min-height:0;}
.test-clock-active .hud{border-top:2px solid var(--gold);}
@media(min-width:760px){
.hud{padding-left:30px;padding-right:30px;}
.resource-hud{justify-content:flex-start;gap:35px;}
.production{text-align:left;max-width:260px;}
.multiplier{margin-left:0;}
.bottom-hud{max-width:620px;left:50%;transform:translateX(-50%);padding-bottom:14px;}
.camera-tools{left:30px;right:30px;bottom:235px;max-width:580px;margin:auto;}
.sheet{max-height:86dvh;}
.toast{bottom:260px;}
.game .balance-name{max-width:280px;}
}
@media(max-height:740px){
.hud{padding-top:8px;}
.resource-hud{margin-top:5px;}
.balance{font-size:30px;}
.bottom-hud{padding-top:0;}
.portfolio-summary{padding-top:0;}
.save-row{display:none;}
.nav-control{height:56px;}
.camera-tools{bottom:178px;}
.toast{bottom:220px;}
.sheet{max-height:92dvh;}
.sheet-heading{padding:12px 0;}
}
.purchase-name{display:flex;gap:8px;justify-content:space-between;align-items:start;font-size:18px;font-weight:600;flex-wrap:wrap;}
.purchase-name small{font-size:16px;font-weight:400;color:var(--muted);}
.purchase-income{display:block;font-size:16px;line-height:1.45;margin-top:5px;color:var(--muted);}
.purchase-cost{grid-column:2;display:flex;flex-wrap:wrap;gap:0 5px;font-size:18px;color:var(--gold);overflow-wrap:anywhere;}
.purchase-cost small{font-size:16px;color:var(--muted);}
.purchase.owned .purchase-cost{color:var(--accent);}
.history-item{display:flex;align-items:center;gap:14px;width:100%;text-align:left;padding:14px;}
.history-item strong{display:block;font-size:18px;}
.history-item small{display:block;font-size:16px;color:var(--muted);line-height:1.4;}
.history-item>svg{margin-left:auto;}
.history-item>span:first-child{color:var(--gold);}
@media(max-height:740px){
.camera-tools #gesture-hint{top:190px;}
}
.resource-hud{display:block;gap:12px;justify-content:space-between;align-items:center;margin-top:12px;}
.resource-hud>div:first-child{min-width:0;}
.balance-name{max-width:none;}
.production{text-align:left;max-width:none;display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:3px;}
.production #income{font-size:20px;max-width:calc(100% - 150px);}
.production .resource-unit{white-space:nowrap;}
.production .multiplier{margin-left:auto;white-space:nowrap;padding:0;}
.balance-detail{max-width:none;}
@media(min-width:760px){
.resource-hud{display:flex;gap:32px;align-items:center;}
.production{max-width:420px;min-width:260px;}
.production #income{max-width:none;}
.production .multiplier{margin-left:6px;}
.balance-name{max-width:280px;}
}
@media(max-height:500px) and (min-width:600px){
.hud{width:220px;right:auto;padding:10px 12px;}
.resource-hud .eyebrow{font-size:16px;}
.balance{font-size:30px;}
.bottom-hud{left:auto;right:0;bottom:0;top:0;width:220px;max-width:none;transform:none;display:flex;flex-direction:column;justify-content:flex-end;padding:8px 12px;}
.bottom-controls{grid-template-columns:1fr;gap:6px;}
.nav-control{height:50px;}
.portfolio-summary{font-size:16px;}
.development-summary{font-size:16px;}
.camera-tools{left:232px;right:232px;bottom:12px;justify-content:center;}
.camera-tools #gesture-hint{display:none;}
.sheet{max-height:95dvh;}
}
@media(max-height:500px) and (min-width:600px){
.resource-hud{display:block;}
.production{min-width:0;max-width:none;}
.production #income{max-width:none;}
.production .multiplier{margin-left:0;}
.balance-name{max-width:none;overflow-wrap:normal;}
}
.save-unavailable .save-row{display:flex;flex-wrap:wrap;justify-content:space-between;}
.save-unavailable .save-row>span{display:flex;align-items:center;gap:7px;font-size:16px;line-height:22px;color:var(--gold);}
.save-unavailable .save-row .status-dot{background:var(--gold);}
.motion-setting{align-items:start;flex-direction:column;}
.motion-setting select{width:100%;padding:12px;border:1px solid var(--line);border-radius:10px;background:#203d51;color:var(--ink);font:inherit;min-height:48px;}
.game{position:relative;width:100%;height:100dvh;isolation:isolate;overflow:hidden;background:radial-gradient(ellipse at 50% 44%,#29495c 0,#172f45 53%,#102438 100%);}
.hud{position:absolute;z-index:5;top:0;left:0;right:0;padding:max(10px,env(safe-area-inset-top)) 18px 12px;background:linear-gradient(#102338 75%,#10233800);pointer-events:none;padding-bottom:8px;}
.brand-mark{display:grid;place-items:center;color:var(--accent);width:36px;height:40px;}
.bottom-controls{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0;border:1px solid #577685;border-radius:18px;overflow:hidden;background:#203e52;box-shadow:0 8px 24px #081c2c44;}
.nav-control{display:flex;justify-content:center;align-items:center;gap:8px;height:64px;padding:9px 5px;border:0;border-radius:0;background:transparent;min-width:0;position:relative;}
.nav-control+ .nav-control:before{content:"";position:absolute;left:0;top:15px;bottom:15px;width:1px;background:#5a778666;}
.nav-control:focus-visible{outline-offset:-4px;z-index:1;}
.nav-control:active{background:#35586b;}
.expand-control:not(.ready){background:transparent;color:var(--muted);border-color:#60736b;}
.expand-control.ready{background:#efc27a22;color:var(--gold);box-shadow:inset 0 -3px var(--gold);}
.portfolio-summary{font-size:16px;line-height:21px;padding:4px 0;color:var(--muted);overflow-wrap:anywhere;}
.camera-tools{position:absolute;bottom:244px;left:18px;right:18px;z-index:5;display:flex;align-items:center;gap:6px;flex-wrap:wrap;pointer-events:none;}
.camera-tools #gesture-hint{font-size:16px;color:var(--muted);width:auto;text-align:center;line-height:22px;margin-bottom:8px;pointer-events:none;position:fixed;top:190px;left:18px;right:18px;margin:0;opacity:.8;}
#orientation-labels{position:absolute;inset:0;pointer-events:none;z-index:3;}
#orientation-labels span{position:absolute;transform:translate(-50%,0);color:#d2e6ec;font-size:16px;line-height:19px;max-width:120px;text-align:center;text-shadow:0 1px 5px #071d31,0 1px 2px #071d31;background:#132e4240;border-radius:5px;padding:2px 4px;}
.sheet{position:fixed;inset:auto 0 0;margin:0 auto;width:100%;max-width:680px;max-height:90dvh;border:1px solid #536c79;border-bottom:0;border-radius:24px 24px 0 0;padding:0 20px max(20px,env(safe-area-inset-bottom));background:#172f43;color:var(--ink);box-shadow:0 -16px 60px #06172d88;overflow:hidden;border-color:#57778b;padding-inline:20px;}
.sheet-heading{display:grid;grid-template-rows:auto auto;align-items:start;gap:7px 12px;padding:20px 0 16px;flex-shrink:0;grid-template-columns:minmax(0,1fr) 44px;border-bottom:1px solid #3e5a6d;margin-bottom:10px;}
.sheet-heading .icon-button{grid-column:2;grid-row:2;align-self:start;margin-top:-6px;border-color:transparent;background:#25455a;border-radius:50%;width:44px;height:44px;padding:0;}
.sheet-heading .icon-button svg{width:22px;height:22px;stroke-width:1.9;}
.sheet-heading .eyebrow{font-size:16px;line-height:20px;}
.sheet h2{font-size:26px;line-height:1.2;letter-spacing:-.02em;margin:5px 0 0;font-weight:650;margin-top:7px;}
.sheet-grip{width:38px;height:4px;min-height:4px;background:#526a77;border-radius:8px;margin:10px auto 0;display:none;}
.sheet-scroll{overflow:auto;overscroll-behavior:contain;min-height:0;padding-bottom:14px;scrollbar-width:thin;}
.sheet-balance{display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between;border-block:1px solid #3e5664;padding:12px 0;font-size:18px;flex-shrink:0;border-top:0;padding-top:4px;}
.sheet.puzzle-sheet{width:100%;max-width:680px;height:min(100dvh,calc(130vw + 340px));max-height:100dvh;padding:0 12px max(12px,env(safe-area-inset-bottom));}
.puzzle-sheet .sheet-heading{padding-block:14px 10px;margin-bottom:8px;}
.puzzle-sheet .sheet-heading .eyebrow{font-size:14px;line-height:18px;}
.puzzle-sheet>.sheet-scroll{display:flex;flex-direction:column;flex:1;padding-bottom:0;}
.puzzle-sheet .sheet-scroll>*{flex-shrink:0;}
.puzzle-sheet h2{font-size:22px;}
.puzzle-sheet .puzzle-instructions{font-size:15px;line-height:20px!important;margin:0 0 8px!important;}
.puzzle-meter{display:flex;justify-content:space-between;gap:10px;font-size:16px;border-block:1px solid #466171;padding:7px 0;}
.puzzle-sheet .network{width:100%;max-width:none;height:0;min-height:340px;max-height:min(130vw,884px);flex:1 1 0;display:block;stroke-width:1.5;overflow:visible;margin:8px 0 6px;}
.network .route{stroke:#587c95;stroke-width:1.6;stroke-dasharray:4 5;opacity:.85;}
.network .route.built{stroke:var(--accent);stroke-width:4;stroke-dasharray:none;opacity:1;}
.network .cost-badge{pointer-events:none;fill:#24465d;stroke:#55758c;stroke-width:.6;}
.network .cost-badge.built{fill:#375e71;stroke:var(--accent);}
.network .edge-label{fill:#e6f0ef;stroke:none;paint-order:normal;font-size:16px;font-weight:550;text-anchor:middle;dominant-baseline:central;}
.network .node-base{fill:#18374f;stroke:#8ec2db;stroke-width:1.6;}
.network .unit-icon{color:#b4dce9;stroke-width:1.7;}
.network .unit-label{fill:#dbe8e7;font-size:16px;stroke:none;text-anchor:middle;}
.network .selected .node-base{fill:#3a5360;stroke:var(--gold);stroke-width:2.5;}
.network .selected .unit-icon{color:var(--gold);}
.network .eligible .node-base{stroke:#c4e9f0;stroke-width:2.5;}
.puzzle-sheet .puzzle-feedback{min-height:20px;margin:0 0 8px!important;font-size:15px;line-height:20px!important;}
.puzzle-actions{display:flex;gap:10px;}
.puzzle-actions button{font-size:16px;min-height:46px;}
.daily-reward{border-top:1px solid #3d5562;padding:0;margin-top:12px;}
.daily-reward summary{display:flex;align-items:center;gap:8px;cursor:pointer;font-size:14px;min-height:44px;list-style:none;}
.daily-reward summary::-webkit-details-marker{display:none;}
.daily-reward summary::after{content:"\2304";margin-left:auto;}
.daily-reward[open] summary::after{transform:rotate(180deg);}
.daily-reward summary svg{width:18px;height:18px;color:var(--gold);}
.puzzle-sheet .daily-rules{font-size:14px;margin:0 0 12px!important;}
.daily-rules{margin-bottom:0!important;}
.puzzle-victory{text-align:center;background:#234b5c;border:1px solid #779773;border-radius:16px;padding:14px;margin:6px 0 10px;border-color:#679bab;}
.puzzle-victory strong,.victory-reward{color:var(--gold);}
.completed .puzzle-meter{display:none;}
.motion-reduced .toast{transition:none;}
.motion-reduced *, .motion-reduced *:before,.motion-reduced *:after{scroll-behavior:auto!important;}
@media(max-height:740px){
.camera-tools{bottom:189px;}
.camera-tools #gesture-hint{top:176px;}
.nav-control{height:58px;}
.sheet{max-height:94dvh;padding-inline:16px;}
.sheet-heading{padding-top:14px;}
.puzzle-sheet .sheet-heading{padding-top:12px;}
}
@media(min-width:760px){
.camera-tools{bottom:245px;}
.camera-tools #gesture-hint{top:200px;}
.sheet{max-height:90dvh;}
}
@media(max-height:500px) and (min-width:600px){
.bottom-controls{grid-template-columns:1fr;}
.nav-control+.nav-control:before{top:0;left:15px;right:15px;width:auto;height:1px;bottom:auto;}
.camera-tools{bottom:12px;}
}


.sheet-heading>div{display:contents}.sheet-heading .eyebrow{grid-column:1;grid-row:1}.sheet-heading h2{grid-column:1;grid-row:2;margin:0}.puzzle-sheet .sheet-heading .icon-button{margin-top:-8px}
.bottom-hud .camera-tools{position:static;inset:auto;margin:0 0 7px;max-width:none;padding:0;pointer-events:auto;gap:7px}.bottom-hud .camera-tools #gesture-hint{display:none}.bottom-hud .camera-tools button{background:#19364b;border-color:#3c6278;min-height:44px}
.network .route-cost{pointer-events:none}.network .node.connected .node-base{fill:#254b62;stroke:#b7dce6}

.network .unit-icon{width:30px;height:30px}

#planet-guides{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none;stroke:#98c4da;stroke-width:1;opacity:.65}

@media(max-width:600px){.sheet.puzzle-sheet{padding-inline:10px;}}

/* Catalog cards retain a comfortable reading width for variable investment lists. */
.investment{align-items:start;min-height:96px}.investment .purchase-main{min-width:0}.investment .purchase-name{line-height:1.35}.investment .benefit{font-size:12px;line-height:1.5;white-space:normal;display:block;margin-top:5px}.investment .requirement-copy{color:#e5c995;display:block;font-size:11px;line-height:1.45;margin-top:4px}.investment .purchase-cost{min-width:68px;max-width:95px;white-space:normal;font-size:13px}.investment .count{display:block;margin-top:2px}.investment:disabled{opacity:.66}.investment.owned{opacity:.76}#upgrades-section h3{margin:22px 0 10px;font-size:18px}#portfolio-summary{font-size:11px;line-height:1.5}

.investment .purchase-cost{max-width:none;min-width:0;width:100%;display:flex;gap:4px 12px;align-items:baseline;justify-content:space-between}.investment .purchase-cost small{font-size:10px;letter-spacing:.04em}.investment .purchase-name{font-size:16px}.investment .purchase-name small{font-size:12px}.investment .count{margin:0}.investment .benefit{font-size:13px;line-height:1.5}.investment:disabled{opacity:.74}#development-summary{font-size:13px}#portfolio-summary{font-size:12px}

.investment.new-choice{border-color:#d7b578;background:#243d45}.investment.new-choice .count{color:var(--gold)}

.investment .purchase-cost{font-size:16px}.investment .requirement-copy{font-size:12px}.investment .purchase-name small{font-size:13px}

.return-button{position:static;width:100%;margin:0 0 8px;z-index:auto;background:#19364b;}
.game.space{--sky-rgb:6,14,28;background:radial-gradient(ellipse at 50% 46%,#14253a 0,#080f20 58%,#040a16 100%);}
.game[data-chapter=solar]{--sky-rgb:3,7,17;background:radial-gradient(ellipse at 50% 46%,#0c1426 0,#040813 60%,#02050d 100%);}
.game.space .hud{background:linear-gradient(rgba(var(--sky-rgb),.98) 72%,rgba(var(--sky-rgb),0));}
.game.space .bottom-hud{background:linear-gradient(rgba(var(--sky-rgb),0),rgba(var(--sky-rgb),.97) 14%);}

/* Contextual guidance stays in normal flow; controls remain available. */
.tutorial-card{position:relative;flex-shrink:0;border:1px solid #d4ad68;border-radius:13px;background:#2e3437;color:#f8ecd3;padding:13px 15px;margin:4px 0 12px;display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;row-gap:5px;align-items:center;box-shadow:0 0 20px #efc27a18;text-align:left;pointer-events:auto;}
.tutorial-heading{display:contents;}
.tutorial-heading>span{grid-column:1;grid-row:1;line-height:14px;font-size:10px;letter-spacing:.1em;font-weight:700;color:var(--gold);}
.tutorial-heading button{grid-column:2;grid-row:1/3;align-self:center;font-size:12px;background:none;border:0;color:#ded0b5;padding:4px 0;min-height:44px;white-space:nowrap;}
.tutorial-card #tutorial-copy{grid-column:1;grid-row:2;font-size:15px;line-height:1.4;color:#f8ecd3;margin:0;}
.tutorial-next{display:block;color:#d9caa9;font-size:13px;margin-top:6px;}
.tutorial-card::after{content:"";position:absolute;left:var(--pointer-x,50%);width:10px;height:10px;background:#2e3437;border:solid #d4ad68;transform:translateX(-50%) rotate(45deg);}
.tutorial-card[data-direction=down]::after{bottom:-6px;border-width:0 1px 1px 0;}
.tutorial-card[data-direction=up]::after{top:-6px;border-width:1px 0 0 1px;}
.tutorial-card[data-direction=none]::after{display:none;}
.tutorial-target{outline:2px solid var(--gold)!important;outline-offset:-2px;box-shadow:inset 0 0 16px #efc27a20,0 0 14px #efc27a28;animation:tutorial-glow 2.4s ease-in-out infinite;}
@keyframes tutorial-glow{50%{box-shadow:inset 0 0 22px #efc27a35,0 0 18px #efc27a40;}}
#tutorial-building-halo{position:absolute;z-index:4;border:2px solid #efc27aca;border-radius:12px;transform:translate(-50%,-50%);box-shadow:0 0 16px #efc27a33;pointer-events:none;}
.income-rate{position:relative;display:inline-flex;align-items:baseline;gap:5px;max-width:100%;}
.production .income-rate #income{max-width:none;min-width:0;}
.tutorial-income-highlight{color:#ffe1a3;text-shadow:0 0 10px #efc27a55;}
.tutorial-income-highlight::before{content:"";position:absolute;inset:-5px -7px;border:1px solid #efc27a88;border-radius:8px;background:#efc27a0a;pointer-events:none;}
.motion-reduced .tutorial-target{animation:none;}
#tutorial-build-slot{flex-shrink:0;}

.bottom-controls .nav-control:first-child{border-radius:17px 0 0 17px;}
.bottom-controls .nav-control:last-child{border-radius:0 17px 17px 0;}
.purchase-list>.tutorial-card{margin:2px 0 3px;}
