:root{color-scheme:dark;--ink:#f0f0e7;--muted:#a1ada2;--line:#354037;--paper:#171918;--surface:#1c2420;--accent:#d9ed93;--accent-dark:#d9ed93;--accent-soft:#2c3927;--sage:#adc780;--shadow:0 22px 70px #00000070;font-family:Inter,"Segoe UI",Helvetica,Arial,sans-serif;font-synthesis:none}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{background:var(--paper);color:var(--ink);display:flex;flex-direction:column;-webkit-font-smoothing:antialiased}button,input{font:inherit}button,a,input{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:default;opacity:.36}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #e7a65a;outline-offset:3px}[hidden]{display:none!important}a{color:inherit}.svg-definitions{position:absolute;width:0;height:0;overflow:hidden}svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}button{border:0}button:active:not(:disabled){transform:translateY(1px)}.site-header{height:58px;flex-shrink:0;display:flex;align-items:center;gap:20px;padding:0 28px;border-bottom:1px solid var(--line);background:var(--surface)}.brand{display:flex;align-items:center;gap:8px;text-decoration:none;font-size:25px;font-weight:800;letter-spacing:-1.4px}.brand img{width:28px;height:28px}.header-divider{height:22px;width:1px;background:var(--line)}.game-title{display:flex;align-items:baseline;gap:12px}.game-title strong{font-size:15px;letter-spacing:-.3px}.game-title span{font-size:11px;color:var(--muted)}.header-actions{display:flex;gap:9px;align-items:center;margin-left:auto}.quiet-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:7px;padding:9px 11px;color:var(--ink);background:transparent;font-size:12px;font-weight:600;white-space:nowrap}.quiet-button:hover:not(:disabled),.icon-button:hover:not(:disabled){background:#2b352e}.quiet-button svg{width:16px;height:16px}.help-mark{width:17px;height:17px;border:1.4px solid currentColor;border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:700}.icon-button{display:inline-grid;place-items:center;width:36px;height:36px;border-radius:7px;background:transparent;color:var(--ink);flex-shrink:0}.icon-button svg{width:19px;height:19px}.game-workspace{flex:1;min-height:0;padding:0 28px;display:flex;flex-direction:column;max-width:1800px;width:100%;margin:0 auto}.level-bar{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 0 17px;flex-shrink:0}.eyebrow{display:block;color:var(--muted);font-size:9px;letter-spacing:1.5px;font-weight:700;line-height:1.3}.level-heading h1{font-size:22px;letter-spacing:-.7px;font-weight:650;line-height:1.1;margin:5px 0 4px}.level-heading p{font-size:11px;margin:0;color:var(--muted);line-height:1.4}.level-details{display:flex;align-items:center;gap:38px;padding-top:5px}.stat-label{font-size:9px;letter-spacing:1.15px;font-weight:700;color:var(--muted)}.vehicle-stat{display:flex;flex-direction:column;gap:8px}.vehicle-stat strong{font-size:12px;font-weight:600}.budget-stat{width:240px}.budget-topline{display:flex;justify-content:space-between;align-items:baseline;gap:12px}.budget-topline strong{font-size:16px;font-variant-numeric:tabular-nums;font-weight:650;letter-spacing:-.4px}.budget-of{font-size:11px;color:var(--muted);white-space:nowrap}.budget-track{height:5px;overflow:hidden;border-radius:5px;background:#354037;margin-top:9px}.budget-track>div{width:0;height:100%;background:var(--sage);transition:width .2s,background .2s;border-radius:5px}.budget-track>div.over-budget,.budget-stat.over-budget .budget-track>div{background:#c95337}.budget-stat.over-budget #budget-value,#budget-value.over-budget{color:#ef967e}.canvas-shell{position:relative;flex:1;min-height:250px;border:1px solid #354037;border-radius:12px;overflow:hidden;isolation:isolate;background:#24342f;box-shadow:0 4px 18px #173b3310}.canvas-shell canvas{display:block;width:100%;height:100%;touch-action:none;outline-offset:-5px}.canvas-tip{position:absolute;bottom:18px;left:19px;font-size:11px;line-height:1.5;color:#d4ded0;background:#1c2420ed;border:1px solid #52615688;border-radius:7px;box-shadow:0 3px 10px #153d3b08;padding:9px 13px;max-width:480px;display:flex;align-items:center;gap:9px;pointer-events:none;transition:opacity .2s;backdrop-filter:blur(8px)}.tip-dot{width:6px;height:6px;border-radius:50%;background:#d8a856;flex-shrink:0}.stress-legend{position:absolute;bottom:18px;right:19px;background:#1c2420ed;border:1px solid #52615688;padding:12px 14px;border-radius:7px;min-width:145px;pointer-events:none;backdrop-filter:blur(8px)}.stress-legend>span{font-size:8px;letter-spacing:1px;font-weight:700;color:#c4d6bb}.stress-gradient{height:5px;margin:9px 0 5px;border-radius:5px;background:linear-gradient(90deg,#4c9b73,#b7c66f,#e7ac56,#db553f)}.stress-labels{display:flex;justify-content:space-between;font-size:9px;color:var(--muted)}.simulation-track{position:absolute;left:0;bottom:0;right:0;height:3px;pointer-events:none;opacity:0;transition:opacity .2s;background:#ffffff33}.simulation-track>div{height:100%;width:0;background:#df8547;transition:width .1s}.testing .simulation-track{opacity:1}.testing .canvas-tip{max-width:400px}.construction-controls{display:flex;align-items:center;gap:16px;padding:13px 0 8px;flex-shrink:0}.materials-group{display:flex;gap:5px;align-items:center;min-width:0}.material-button{display:flex;align-items:center;gap:9px;position:relative;text-align:left;padding:10px 11px;color:var(--ink);border:1px solid transparent;border-radius:8px;background:transparent;transition:border-color .15s,background .15s;min-height:51px}.material-button>svg{width:22px;height:22px;color:#a6b69e}.material-button>span{display:flex;flex-direction:column;gap:5px}.material-button strong{font-size:12px;font-weight:650;line-height:1}.material-button small{font-size:9px;color:var(--muted);white-space:nowrap;line-height:1}.material-button kbd{font-size:9px;margin-left:7px;border:0;background:transparent;color:#9ba39b}.material-button:hover:not(:disabled){background:#28332c}.material-button.active{border-color:#71864e;background:var(--accent-soft)}.material-button.active>svg{color:var(--accent-dark)}.material-button.active strong{color:#d9ed93}.material-button.active kbd{color:#a9c487}.edit-group{display:flex;align-items:center;gap:1px;border-left:1px solid var(--line);padding-left:12px}.test-group{display:flex;align-items:center;gap:6px;margin-left:auto}.primary-button,.secondary-button{display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:12px 18px;border-radius:8px;font-size:12px;font-weight:700;white-space:nowrap;min-height:43px;transition:background .15s,box-shadow .15s}.primary-button{background:var(--accent);color:#1b2619;box-shadow:0 2px 2px #a9402510}.primary-button:hover:not(:disabled){background:#c4de81;box-shadow:0 3px 8px #b44a2425}.primary-button svg{width:17px;height:17px;stroke-width:1.8}.primary-button use[href="#i-play"]{fill:currentColor;stroke:none}.secondary-button{background:#27322b;color:var(--ink);border:1px solid #435347}.secondary-button:hover{background:#334238}.speed-button{min-width:39px;height:36px;border:1px solid var(--line);border-radius:7px;background:var(--surface);font-size:11px;font-weight:700;color:var(--ink)}.workspace-status{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:30px;flex-shrink:0;padding-bottom:3px}.workspace-status>p{font-size:11px;line-height:1.4;color:var(--muted);margin:0}.workspace-status>p.error,.workspace-status>p.failure{color:#ef967e}.view-options{display:flex;align-items:center;gap:17px;white-space:nowrap}.view-options label,.progress-preference label{display:flex;align-items:center;gap:6px;font-size:10px;cursor:pointer;color:#b1bfac}.view-options input,.progress-preference input{width:12px;height:12px;margin:0;accent-color:#abc878}.workspace-footer{height:33px;display:flex;align-items:center;justify-content:space-between;gap:15px;border-top:1px solid var(--line);flex-shrink:0}.progress-preference{display:flex;align-items:center;gap:13px;min-width:0}.progress-preference label{font-size:9px}.progress-preference>span{font-size:9px;color:#96a38f}.workspace-footer>a{font-size:9px;color:var(--muted);text-decoration:none}.workspace-footer>a:hover{text-decoration:underline}dialog{padding:27px;border:1px solid #435347;background:var(--surface);color:var(--ink);border-radius:17px;box-shadow:var(--shadow);max-height:calc(100dvh - 50px);max-width:calc(100vw - 32px)}dialog::backdrop{background:#050907ad;backdrop-filter:blur(5px)}.dialog-header{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;margin-bottom:25px}.dialog-header h2{font-size:27px;line-height:1.15;letter-spacing:-.8px;font-weight:650;margin:8px 0}.dialog-header p{font-size:12px;color:var(--muted);margin:0}.close-button{border:1px solid #435347;background:#27322b}.levels-dialog{width:800px}.level-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.level-card{position:relative;display:flex;flex-direction:column;text-align:left;padding:15px 13px;min-height:98px;border:1px solid #3c483e;border-radius:9px;background:#242e27;color:var(--ink);transition:background .15s,border-color .15s}.level-card:hover{background:#303e31;border-color:#7f9a74}.level-card.current{background:var(--accent-soft);border-color:#8ca661}.level-card.complete{background:#26392c;border-color:#65895b}.level-card .level-number,.level-card>.number,.level-card>span:first-child{font-size:9px;letter-spacing:1px;color:#abbba2;font-weight:700;margin-bottom:10px}.level-card.current .level-number,.level-card.current>span:first-child{color:#d9ed93}.level-card strong{font-size:13px;font-weight:650;margin-bottom:5px;line-height:1.2}.level-card small,.level-card .level-meta{font-size:10px;color:#aebda4;line-height:1.4}.level-card .level-stars,.level-card .stars{color:#c49949;font-size:10px;letter-spacing:2px;margin-top:9px}.level-card.locked{opacity:.5}.help-dialog{width:615px}.help-steps{display:flex;flex-direction:column;gap:21px}.help-steps>div{display:flex;gap:17px}.step-number{color:#d9ed93;background:#304029;width:31px;height:31px;border-radius:50%;display:grid;place-items:center;font-size:10px;flex-shrink:0;font-weight:700}.help-steps h3{font-size:14px;margin:0 0 5px;letter-spacing:-.2px}.help-steps p{font-size:12px;line-height:1.7;margin:0;color:#afbaaa}.help-footer{margin-top:24px;padding:18px 0 0;border-top:1px solid var(--line)}.help-footer p{font-size:11px;line-height:1.6;color:#afbaaa;margin:0}.help-footer strong{color:#d0dfc2}.keyboard-reference{display:flex;flex-wrap:wrap;gap:8px 17px;margin-top:15px}.keyboard-reference>span{font-size:10px;color:var(--muted)}kbd{font:inherit;font-size:9px;padding:2px 4px;border:1px solid #45543f;border-radius:3px;background:#27322b;color:#bccdb0}.result-dialog{width:420px;text-align:center;padding:31px 28px 28px}.result-close{position:absolute;top:15px;right:15px;width:30px;height:30px;background:transparent;border:0}.result-emblem{width:64px;height:64px;background:#30422b;color:#c1dc96;border-radius:50%;display:grid;place-items:center;margin:0 auto 23px}.result-emblem svg{width:35px;height:35px;stroke-width:1.3}.result-dialog.failed .result-emblem,.result-dialog.failure .result-emblem{background:#432d27;color:#f0a982}.result-dialog h2{font-size:26px;font-weight:650;line-height:1.15;letter-spacing:-.7px;margin:10px 0}.result-dialog>p{font-size:12px;line-height:1.7;color:var(--muted);max-width:320px;margin:0 auto}.result-stars{color:#dba25a;font-size:31px;display:flex;justify-content:center;gap:9px;margin:20px 0 19px;letter-spacing:5px}.result-stars .empty,.result-stars .off{color:#45503f}.result-cost{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:14px 2px;margin:0 0 20px;font-size:11px;color:var(--muted)}.result-cost strong{color:var(--ink);font-size:17px;font-variant-numeric:tabular-nums;font-weight:650}.result-actions{display:flex;justify-content:center;gap:8px}.result-actions>button{padding:12px 13px;flex:1}.result-actions .primary-button{gap:12px}
@media(min-width:1450px){.site-header{padding:0 36px}.game-workspace{padding:0 36px}.level-bar{padding:21px 0}.construction-controls{padding:15px 0 11px}.material-button{padding:12px 15px}.materials-group{gap:8px}.material-button kbd{margin-left:12px}.level-heading h1{font-size:25px}.canvas-tip{font-size:12px;max-width:540px}}
@media(max-width:1150px){.site-header{padding:0 21px}.game-workspace{padding:0 21px}.construction-controls{gap:10px}.material-button{gap:7px;padding:10px 9px}.material-button kbd{display:none}.materials-group{gap:3px}.edit-group{padding-left:7px}.test-group{gap:3px}.primary-button{padding:12px 14px}.level-details{gap:25px}.budget-stat{width:210px}}
@media(max-width:940px){.site-header{gap:15px}.game-title span{display:none}.level-details{gap:20px}.vehicle-stat{display:none}.material-button small{display:none}.material-button{min-height:44px;padding:10px 11px}.materials-group{gap:4px}.material-button>svg{width:20px;height:20px}.edit-group{padding-left:6px;gap:0}.icon-button{width:32px;height:32px}.construction-controls{gap:8px}.test-group .quiet-button{padding:8px}.test-group .primary-button{font-size:11px;padding:10px 12px;gap:6px;min-height:40px}.workspace-footer{height:32px}.canvas-tip{font-size:10px;max-width:410px}.stress-legend{min-width:125px}.progress-preference>span{display:none}}
@media(max-width:760px){.site-header{height:52px;padding:0 15px;gap:12px}.brand{font-size:23px}.brand img{width:25px;height:25px}.header-divider{height:20px}.game-title strong{font-size:13px}.header-actions{gap:3px}.quiet-button{padding:8px;gap:5px;font-size:10px}.header-actions #help-button>span:last-child{display:none}.header-actions #levels-button svg{width:15px;height:15px}.header-actions .icon-button{width:30px}.game-workspace{padding:0 13px}.level-bar{padding:14px 0 12px;gap:10px}.level-heading h1{font-size:20px}.level-heading p{font-size:10px;max-width:300px}.eyebrow{font-size:8px;letter-spacing:1.1px}.level-details{padding-top:8px}.budget-stat{width:177px}.budget-topline{gap:7px}.stat-label{font-size:8px;letter-spacing:.7px}.budget-topline strong{font-size:14px}.budget-of{font-size:10px}.canvas-shell{min-height:230px;border-radius:9px}.canvas-tip{bottom:12px;left:12px;max-width:calc(100% - 24px);font-size:10px;padding:7px 10px}.stress-legend{right:12px;bottom:12px;padding:8px 10px;min-width:110px}.testing .canvas-tip{max-width:calc(100% - 144px)}.stress-legend>span{font-size:7px}.stress-labels{font-size:8px}.construction-controls{flex-wrap:wrap;gap:9px;padding:11px 0 7px}.materials-group{width:100%;justify-content:space-between;gap:3px;overflow-x:auto;scrollbar-width:none;padding:0 0 2px}.materials-group::-webkit-scrollbar{display:none}.material-button{flex:1;justify-content:center;gap:7px;padding:9px 8px;min-height:42px;white-space:nowrap}.material-button strong{font-size:11px}.material-button>svg{width:18px;height:18px}.edit-group{border:0;padding:0;gap:6px}.edit-group .icon-button{width:33px;height:33px;border:1px solid #3c483e;background:#242e27}.test-group{margin-left:auto;gap:7px}.test-group .primary-button{min-height:37px;padding:9px 15px;font-size:11px}.test-group .quiet-button{padding:8px 10px;font-size:11px}.speed-button{height:33px}.workspace-status{min-height:30px;align-items:center;gap:9px;padding-bottom:4px}.workspace-status>p{font-size:10px;max-width:64%}.view-options{gap:10px}.view-options label{font-size:9px;gap:4px}.view-options input{width:11px;height:11px}.workspace-footer{height:31px}.progress-preference label{font-size:8px}.progress-preference input{width:10px;height:10px}.workspace-footer>a{font-size:8px}.level-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.levels-dialog{padding:22px}.dialog-header h2{font-size:24px}.dialog-header{margin-bottom:20px}.help-dialog{padding:22px}.help-steps{gap:18px}.help-steps p{font-size:11px}}
@media(max-width:480px){.site-header{padding:0 12px;gap:10px}.game-title strong{font-size:12px}.header-actions #levels-button>span{font-size:9px}.header-actions{gap:0}.header-actions #levels-button{padding:8px 6px}.header-actions #help-button{padding:8px 6px}.header-divider{display:none}.level-bar{align-items:flex-start;padding:12px 0 11px}.level-heading h1{font-size:18px;max-width:190px}.level-heading p{max-width:180px;font-size:9px}.level-details{padding-top:12px}.budget-stat{width:137px}.budget-topline{flex-wrap:wrap;gap:4px;justify-content:flex-end}.budget-topline>.stat-label{font-size:7px;letter-spacing:.8px}.budget-topline>span:last-child{width:100%;text-align:right}.budget-topline strong{font-size:13px}.budget-of{font-size:9px}.budget-track{height:4px;margin-top:5px}.canvas-shell{min-height:215px}.material-button{gap:5px;padding:9px 7px}.material-button strong{font-size:10px}.material-button>svg{width:16px;height:16px}.construction-controls{gap:7px}.materials-group{gap:2px}.workspace-status>p{font-size:9px}.view-options{gap:7px}.view-options label{font-size:8px}.workspace-status{min-height:31px}.level-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.level-card{min-height:100px}.level-card strong{font-size:12px}.dialog-header h2{font-size:23px}.help-steps>div{gap:12px}.step-number{width:26px;height:26px;font-size:9px}.help-steps h3{font-size:13px}.help-dialog{padding:22px 19px}.result-dialog{padding:31px 22px 24px}.result-dialog h2{font-size:24px}.result-actions>button{font-size:11px;padding:11px 12px}.result-emblem{width:60px;height:60px}}
@media(max-height:690px) and (min-width:761px){.site-header{height:48px}.level-bar{padding:11px 0 12px}.level-heading h1{font-size:20px}.level-heading p{font-size:10px}.construction-controls{padding:10px 0 6px}.material-button{min-height:45px;padding-top:8px;padding-bottom:8px}.workspace-footer{height:28px}.workspace-status{min-height:25px}.canvas-shell{min-height:230px}.canvas-tip{bottom:12px;padding:7px 11px}.stress-legend{bottom:12px}}
@media(max-height:600px){html,body{overflow:auto}.game-workspace{min-height:510px}.canvas-shell{min-height:290px}.site-header{position:relative}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
