/* 城市建设 · 交互原型样式（自 index.html 拆出，2026-10-16） */

*{box-sizing:border-box}body{margin:0;background:#10191f;color:#e4edef;font:14px system-ui,-apple-system,"PingFang SC",sans-serif}button{font:inherit;color:inherit;background:#2d414b;border:1px solid #49616a;border-radius:5px;cursor:pointer;padding:7px 11px}button:hover{background:#405d65}button:focus-visible{outline:2px solid #ffe5a1}button.on{background:#3b776a;border-color:#8ce7c8}button:disabled{opacity:.4;cursor:default}h1{font-size:19px;font-weight:600;margin:0}h2{font-size:13px;color:#b9dacd;margin:0 0 10px}.heading{padding:22px 25px 18px;display:flex;align-items:baseline;gap:16px}.heading span{font-size:12px;color:#93abb5}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 255px;gap:22px;padding:0 25px 25px;max-width:1700px;margin:auto}.left{min-width:0}.frame-caption{display:flex;justify-content:space-between;color:#849da8;font-size:11px;margin:0 0 8px}#screen-fit{position:relative;width:100%;aspect-ratio:16/9;overflow:hidden;border-radius:12px;outline:3px solid #425461;box-shadow:0 20px 50px #0006;background:#192a31}#screen{position:absolute;left:0;top:0;width:960px;height:540px;transform-origin:0 0;overflow:hidden;display:grid;grid-template-rows:42px 404px 94px;background:#192a31;user-select:none}.screen-header{background:#1b3038;display:flex;align-items:center;justify-content:space-between;padding:5px 13px;border-bottom:1px solid #46575c;font-size:12px;gap:9px}.screen-header .stats{display:flex;gap:17px}.screen-header b{color:#9ee4c5;margin-left:4px}.screen-header .controls{display:flex;gap:5px}.screen-header button{padding:4px 8px;font-size:12px}#map{position:relative;overflow:hidden;touch-action:none;width:960px;height:404px}canvas{display:block;touch-action:none}#bubble{position:absolute;display:none;transform:translate(-50%,-100%);padding:6px;background:#11252bf2;border:1px solid #b9d9c3;border-radius:7px;white-space:nowrap;z-index:3;box-shadow:0 5px 15px #0006}#bubble:after{content:"";position:absolute;left:calc(50% - 5px);top:100%;border:5px solid transparent;border-top-color:#b9d9c3}#bubble-label{font-size:11px;text-align:center;margin-bottom:5px;color:#cfdfdc}#bubble button{font-size:12px;padding:5px 10px;margin:0 2px}#bubble .remove{background:#77483e;border-color:#b68478}#toast{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);max-width:90%;background:#11242be6;padding:7px 14px;border-radius:5px;color:#ffe1a6;font-size:12px;pointer-events:none;text-align:center}.warehouse{background:#1b3038;border-top:1px solid #50635d;padding:7px 12px}.category-tabs{display:flex;gap:6px;margin-bottom:6px}.category-tabs button{padding:4px 12px;color:#afc3c6;background:#263a42}.category-tabs button.on{color:#fff;background:#3b776a;border-color:#8ce7c8}.stock{display:flex;gap:8px}.stock button{flex:1;height:62px;display:flex;align-items:center;justify-content:center;gap:9px;background:#2b3e45;padding:5px}.stock button[hidden]{display:none}.stock button.chosen{border-color:#ffe09c;background:#425649}.stock .shape{display:grid;gap:2px;flex-shrink:0;transform:skewY(-12deg)}.shape i{display:block;width:8px;height:8px;background:#d19b7a}.stock strong{display:block;font-size:13px}.stock small{display:block;font-size:10px;color:#b5cacb;margin-top:2px}.under-note{font-size:12px;line-height:1.8;color:#95acb5;padding-top:18px}.under-note b{color:#cddedc}aside{background:#19282f;border:1px solid #344750;border-radius:8px;padding:17px;align-self:start;max-height:calc(100dvh - 86px);overflow:auto;font-size:12px;line-height:1.8}aside p{margin:8px 0;color:#b1c5cb}.divider{border-top:1px solid #344b54;margin:16px 0}#interaction{color:#e6d2a5}#selection{color:#a8dec8}#status{color:#d4e0e1}.legend{display:grid;grid-template-columns:1fr 1fr;gap:6px;font-size:11px}.legend i{display:inline-block;width:9px;height:9px;margin-right:5px}#loading{position:absolute;left:0;right:0;top:40%;text-align:center}#screen button{touch-action:manipulation}@media(max-width:950px){.workspace{grid-template-columns:minmax(0,1fr) 200px;gap:14px;padding:0 14px 20px}.heading{padding:16px 14px}.heading span{display:none}aside{padding:12px;font-size:11px}.under-note{font-size:11px}}@media(max-width:580px){.workspace{grid-template-columns:1fr}aside{max-height:none}.heading h1{font-size:16px}}

/* 1080p logical screen; fit available space, with an optional full-screen preview. */
.workspace{max-width:none;grid-template-columns:minmax(0,1fr) 230px;padding:0 16px 20px;gap:16px}
#screen{width:1920px;height:1080px;grid-template-rows:84px 996px}
#map{width:1920px;height:996px}
.screen-header{padding:10px 26px;font-size:24px;gap:18px}
.screen-header .stats,.screen-header .resources{display:flex;gap:34px}.screen-header .stats[hidden]{display:none}.screen-header .resources{margin-left:auto}
.screen-header button{padding:8px 16px;font-size:24px}
.home-nav{display:flex;align-items:center;gap:14px}.home-nav strong{font-size:26px}.home-nav #back{width:48px;height:48px;padding:0;border-radius:24px;background:#315563;border-color:#77a7b8}.device-status{display:flex;align-items:center;gap:14px;color:#dbe7e8}.battery{display:flex;align-items:center;gap:6px}.battery-icon{position:relative;display:inline-block;width:34px;height:18px;border:2px solid #dbe7e8;border-radius:3px;padding:2px}.battery-icon:after{content:"";position:absolute;left:100%;top:4px;width:4px;height:7px;background:#dbe7e8;border-radius:0 2px 2px 0}.battery-level{display:block;height:100%;width:86%;background:#8be0b4}.production-hud{position:absolute;left:24px;top:20px;z-index:20;display:flex;align-items:center;padding:9px 12px;background:#183039dd;border:1px solid #526b70;border-radius:8px;font-size:24px;box-shadow:0 5px 14px #0005}.production-hud b{color:#9ee4c5}.production-hud .claim-row{display:flex;align-items:center;gap:8px;white-space:nowrap}.production-hud #collect{position:absolute;left:calc(100% + 10px);top:50%;transform:translateY(-50%);font-size:22px;padding:6px 14px;background:#8a6d2fd9;border-color:#e3c56f;white-space:nowrap}.rate-help-wrap{position:relative;display:inline-flex;align-items:center}.production-hud #rate-help{position:static;width:25px;height:25px;padding:0;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#315c68;border:1px solid #8ab7bd;color:#eaf6f3;font-size:17px;font-weight:700;line-height:1;box-shadow:inset 0 1px 0 #ffffff2b}.production-hud #rate-help:hover,.production-hud #rate-help[aria-expanded="true"]{background:#467988;border-color:#bce5e3}.rate-detail{position:absolute;left:50%;top:calc(100% + 11px);transform:translateX(-50%);padding:8px 11px;border-radius:7px;background:#11252bf2;border:1px solid #88aaa7;color:#d7e7e3;font-size:18px;white-space:nowrap;box-shadow:0 5px 14px #0006}.rate-detail:before{content:"";position:absolute;left:calc(50% - 5px);bottom:100%;border:5px solid transparent;border-bottom-color:#88aaa7}.rate-detail[hidden]{display:none}.coin-actions{position:absolute;inset:0;z-index:18;pointer-events:none}.coin-claim{position:absolute;transform:translate(-50%,-100%);pointer-events:auto;padding:6px 10px!important;border-radius:18px!important;background:#8a6d2fe8!important;border-color:#f1d37a!important;color:#fff4c7!important;font-size:18px!important;white-space:nowrap;box-shadow:0 4px 10px #0006}
.map-controls{position:absolute;right:24px;top:104px;z-index:20;display:flex;flex-direction:column;align-items:stretch;gap:10px}.map-controls button{min-width:96px;padding:10px 16px;font-size:24px;color:#fff;text-shadow:0 2px 4px #000;box-shadow:0 5px 14px #0005}.map-controls #plus,.map-controls #minus{background:#326985d9;border-color:#79bee1}.map-controls #home{background:#39745fd9;border-color:#83d2b3}.map-controls #collect{background:#8a6d2fd9;border-color:#e3c56f}.map-controls #plus:hover,.map-controls #minus:hover{background:#4387a8}.map-controls #home:hover{background:#4b9077}.map-controls #collect:hover{background:#aa873d}
.warehouse{position:absolute;right:164px;bottom:22px;z-index:5;width:calc(100% - 188px);height:286px;padding:10px 24px;border:1px solid #50635d;border-radius:12px;background:#1b3038f2;box-shadow:0 12px 32px #0008;visibility:hidden;opacity:0;pointer-events:none;transform:translateX(70px);transition:opacity .16s ease,transform .16s ease,visibility .16s}.warehouse.open{visibility:visible;opacity:1;pointer-events:auto;transform:translateX(0)}.category-tabs{gap:12px;margin-bottom:8px}.category-tabs button{font-size:19px;padding:5px 18px}
.stock{display:flex;justify-content:flex-start;gap:16px;overflow-x:auto;overflow-y:hidden;padding-bottom:8px;scrollbar-color:#58757a #1b3038;scrollbar-width:thin}.stock button{position:relative;height:226px;gap:8px;padding:39px 12px 11px;flex:0 0 180px;min-width:180px;flex-direction:column;align-items:center;justify-content:center;text-align:center}.stock-card-model{position:relative;width:92px;height:72px;flex:none;background:#c98d6f;border:1px solid #f0c2a8;box-shadow:11px 11px 0 #875b50;transform:skewY(-10deg);border-radius:2px}.stock-card-model:after{content:"";position:absolute;inset:11px;background:#e5aa88;border:1px solid #ffe0c9}.stock-card-info{min-width:0}.stock .limit{position:absolute;left:9px;top:8px;padding:3px 7px;border-radius:4px;background:#173039e8;border:1px solid #668b88;color:#d7ede3;font-size:15px;line-height:1;z-index:1}.stock .limit[hidden]{display:none}
.mode-toggle{position:absolute;right:24px;z-index:6;width:116px;height:116px;border-radius:58px;font-size:25px;font-weight:700;background:#3b776a;border:3px solid #8ce7c8;box-shadow:0 10px 28px #0008}.mode-toggle.cancel{background:#775044;border-color:#e1a48e}.build-toggle{bottom:24px}.expand-toggle{bottom:156px;background:#655f3d;border-color:#dfce82}
.stock .meta{display:block;margin-top:7px;color:#e5ce9d;font-size:16px;font-style:normal;white-space:nowrap}.stock button.locked .meta{color:#e0ba86}.stock .output{display:block;margin-top:5px;color:#9ee4c5;font-size:15px;font-style:normal;white-space:nowrap}.stock-card-info{margin-top:14px}
.stock button.locked{filter:grayscale(.75);opacity:.48;border-style:dashed}.stock button.locked .meta{color:#e0ba86}
.stock strong{font-size:21px;white-space:nowrap}.stock small{display:none}
#bubble{padding:12px;border-radius:12px}#bubble-label{font-size:24px;margin-bottom:8px}#bubble-cost{min-height:20px;color:#e5ce9d;font-size:16px;margin-bottom:8px}.building-current,.building-upgrade{padding:10px 12px;border-radius:8px;text-align:left}.building-current{background:#20383fe8;border:1px solid #4b676c}.building-current .connection{display:inline-block;margin-bottom:7px;padding:2px 7px;border-radius:10px;background:#356f5e;color:#bff1d9;font-size:14px}.building-current .connection.disconnected{background:#6a552f;color:#ffe0a1}.building-current .current-rate strong,.building-upgrade strong{color:#9ee4c5}.building-upgrade{margin-top:9px;background:#27363be8;border:1px solid #6a6550;color:#e5ce9d}.building-upgrade .upgrade-title{margin-bottom:6px;color:#f2e6c1;font-size:18px;font-weight:700}.building-upgrade .upgrade-cost,.building-upgrade .upgrade-rate{margin-top:4px}.building-upgrade .upgrade-action{display:block;margin:10px 0 0!important;background:#3b665c;border-color:#82c7af}.building-full{margin-top:8px;text-align:center;color:#b8cbca}
.home-output-head{margin-bottom:7px}.home-output-head strong{color:#9ee4c5}.home-output-bar{position:relative;height:26px;margin:2px 0 9px;border-radius:13px;background:#12262cd9;border:1px solid #4b676c;overflow:hidden}.home-output-bar i{position:absolute;left:0;top:0;bottom:0;width:0;border-radius:13px;background:linear-gradient(90deg,#3f8f74,#8fe0c0);transition:width .18s ease}.home-output-bar span{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:15px;color:#eaf6f2;text-shadow:0 1px 3px #000a}
#bubble button{font-size:24px;padding:10px 20px;margin:0 4px}
body.preview-full #screen-fit{position:fixed;inset:0;z-index:100;width:100vw;height:100dvh;aspect-ratio:auto;border-radius:0;outline:none;background:#10191f}
@media(max-width:950px){.workspace{grid-template-columns:minmax(0,1fr) 190px;gap:12px;padding:0 12px 20px}}
@media(max-width:580px){.workspace{grid-template-columns:1fr}}
/* Fit both viewport axes; keep explanatory text outside the simulated screen. */
body{height:100dvh;display:flex;flex-direction:column;overflow:hidden}
.heading{flex:none}
.workspace{flex:1;min-height:0;width:100%;margin:0;align-items:start}
.left{height:100%;min-height:0;display:flex;flex-direction:column;align-items:flex-start}
.frame-caption{flex:none;width:100%;max-width:1920px}
#screen-fit{flex:none;max-width:1920px;max-height:1080px}
.under-note{flex:none;width:100%;max-width:1920px}
aside{height:100%;max-height:100%;min-height:0;overflow-y:auto;overscroll-behavior:contain}
body.preview-full #screen-fit{max-width:none;max-height:none}
@media(max-width:580px){.workspace{grid-template-columns:minmax(0,1fr) 150px;gap:10px}aside{padding:8px}.under-note{font-size:10px}.frame-caption{font-size:9px}}
#stock-tabs{display:flex;overflow-x:auto;flex-wrap:nowrap}#stock-tabs button{flex:0 0 auto}#bubble{max-width:600px}#bubble-label{white-space:normal}
.road-build-hint{position:absolute;left:50%;bottom:28px;transform:translateX(-50%);z-index:20;padding:12px 24px;border:1px solid #88aaa7;border-radius:10px;background:#11252be6;color:#ffe1a6;font-size:24px;white-space:nowrap;pointer-events:none;box-shadow:0 5px 14px #0005}.road-build-hint[hidden]{display:none}
.hold-wrap{position:absolute;z-index:19;transform:translate(calc(-100% - 16px),-50%);display:flex;flex-direction:row;align-items:center;gap:9px;pointer-events:none}
.hold-wrap[hidden]{display:none}
.hold-label{writing-mode:vertical-rl;text-orientation:upright;font-size:15px;line-height:1;letter-spacing:3px;color:#d3ece7;text-shadow:0 1px 3px #0009;white-space:nowrap;user-select:none}
.hold-progress{width:14px;height:88px;padding:3px;border:2px solid #88aaa7;border-radius:8px;background:#11252be6;box-shadow:0 4px 12px #0006;display:flex;flex-direction:column;justify-content:flex-end}
.hold-progress i{display:block;width:100%;height:0;border-radius:5px;background:#9ee4c5}
.toast{position:absolute;left:50%;bottom:56px;z-index:17;transform:translateX(-50%);padding:14px 30px;border-radius:32px;background:#0f2129e6;border:1px solid #7fb6a9;color:#eaf6f2;font-size:26px;line-height:1.2;white-space:nowrap;box-shadow:0 10px 26px #0007;pointer-events:none;opacity:0;transition:opacity .3s ease}
.toast.show{opacity:1}
.toast[hidden]{display:none}
