:root{--paper:#f4f1ea;--paper-2:#fbf8f1;--card:#fff;--ink:#1d2320;--ink-2:#4a4f48;--muted:#5a5f58;--line:#e2ddd1;--line-2:#ede8dd;--line-strong:#d3cdbf;--signal:#c8412b;--signal-hover:#a93521;--ok-bg:#e3efe7;--ok-ink:#1f5a3e;--near-bg:#f6ead3;--near-ink:#7a4e0c;--near-line:#c9a56a;--dark:#1d2320;--dark-2:#262d29;--dark-line:#3a413c;--on-dark:#f4f1ea;--on-dark-muted:#c9ccc4;--sleeper:#cdbfa3;--rail:#2a2e2b;--piece-straight:#1d2320;--piece-curve:#c8412b;--piece-switch:#9a6412;--piece-crossing:#2f5f8a;--piece-crossover:#5b4a8a;--piece-flex:#2f7a5a;--piece-support:#3a3f3c;--display:"Bricolage Grotesque", Georgia, serif;--body:"Instrument Sans", system-ui, sans-serif;--mono:"JetBrains Mono", ui-monospace, monospace;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}*{box-sizing:border-box}body{background:var(--paper);color:var(--ink);font-family:var(--body);-webkit-font-smoothing:antialiased;margin:0}button,input{font:inherit;color:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed}:focus-visible{outline:3px solid var(--signal);outline-offset:2px}.mono{font-family:var(--mono)}h1{font-family:var(--display);letter-spacing:-.03em;margin:0;font-size:clamp(30px,4vw,44px);font-weight:800;line-height:1.05}h2{font-family:var(--display);margin:0;font-size:20px;font-weight:700}.eyebrow{letter-spacing:.08em;text-transform:uppercase;font-size:13px}.hint{color:var(--muted);margin:0;font-size:13px}.topbar{border-bottom:1px solid var(--line);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;min-height:72px;padding:12px clamp(16px,4vw,48px);display:flex}.language-select select{border:1px solid var(--line-strong);background:var(--card);min-height:36px;color:var(--ink);font:inherit;border-radius:9px;padding:0 8px;font-size:13px;font-weight:700}.sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.seo-content{border:1px solid var(--line);background:var(--card);max-width:980px;color:var(--ink-2);border-radius:18px;margin:12px auto 48px;padding:32px;line-height:1.6}.seo-content h2,.seo-content h3{color:var(--ink)}.seo-content h2{font-family:var(--display);font-size:clamp(1.45rem,3vw,2rem);line-height:1.15}.seo-content h3{font-size:1rem}.seo-columns{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin:24px 0;display:grid}.seo-columns p,.seo-faq p{margin:0}.seo-faq{border-top:1px solid var(--line);padding-top:20px}@media (width<=700px){.seo-content{margin:12px 16px 36px;padding:24px}.seo-columns{grid-template-columns:1fr}}.brand{font-family:var(--display);letter-spacing:-.02em;align-items:center;gap:12px;font-size:22px;font-weight:800;display:flex}.steps-nav{align-items:center;font-size:14px;font-weight:500;display:flex}.steps-nav-item{align-items:center;display:flex}.steps-nav-sep{background:#c9c3b5;width:20px;height:1px;margin:0 6px}.step-pill{min-height:40px;color:var(--muted);background:0 0;border:0;border-radius:999px;align-items:center;gap:8px;padding:8px 14px;display:flex}.step-pill:hover:not(:disabled){color:var(--ink);background:#ebe6db}.step-pill[aria-current=step]{background:var(--ink);color:var(--paper)}.step-pill:disabled{opacity:.55}.screen{max-width:1440px;margin:0 auto;padding:40px clamp(16px,4vw,48px) 56px}.intro{flex-direction:column;gap:8px;display:flex}.intro p{color:var(--ink-2);max-width:640px;margin:0;font-size:17px}.inventory{align-items:stretch;gap:32px;display:flex}.inventory-main{flex-direction:column;flex:1;gap:24px;min-width:0;display:flex}.inventory-head{flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:16px;display:flex}.reset{flex-shrink:0}.reset-notice{background:var(--card);border:1px solid var(--line);color:var(--ink-2);border-radius:12px;flex-wrap:wrap;align-items:center;gap:8px 14px;margin:0;padding:12px 16px;font-size:15px;display:flex}.piece-grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px;display:grid}.piece-card{background:var(--card);border:1px solid var(--line);border-radius:14px;flex-direction:column;gap:14px;padding:18px;display:flex}.piece-visual{background:radial-gradient(circle at 50% 28%, #fffdf9, var(--paper-2) 78%);border-radius:10px;justify-content:center;align-items:center;height:96px;display:flex}.piece-icon{width:min(100%,160px);height:96px;display:block}.piece-track-shadow{stroke:#d9d7ce}.piece-sleepers{stroke:#717a73}.piece-track-edge{stroke:#343b37}.piece-track-bed{stroke:#aeb7ad}.piece-metal{stroke:#282f2c}.piece-track-center{stroke:#e2e7dd}.piece-connector{fill:#38403b}.piece-connector-pin{fill:#b5beb3}.piece-switch-pin{fill:#c58a39;stroke:#704b1e;stroke-width:1px}.piece-crossing-plate{stroke:#d7b46a;stroke-width:2px;stroke-linecap:round}.piece-flex-joints{fill:none;stroke:#e7e7dd;stroke-width:2.5px}.piece-bumper{fill:#c94b35;stroke:#71372f;stroke-width:2px}.piece-bumper-stripe{fill:none;stroke:#f2c581;stroke-width:1.4px}.piece-bumper-light{fill:#f4ca77;stroke:#a75934;stroke-width:1px}.piece-pillar-body{fill:#8d9690}.piece-pillar-outline{fill:none;stroke:#37413b;stroke-width:3px}.piece-pillar-detail{fill:none;stroke:#5d6860;stroke-width:2px}.piece-pillar-cap{fill:#505b53;stroke:#323b35;stroke-width:1px}.piece-pillar-stud{fill:#68766a}.piece-pillar-foot{fill:#3f4942}.piece-tower-leg{fill:none;stroke:#4b554e;stroke-width:5px;stroke-linecap:round}.piece-tower-bar{fill:none;stroke:#5d6860;stroke-width:2.5px}.piece-tower-lattice{fill:none;stroke:#7d8780;stroke-width:1.8px}.piece-brick-top{fill:#b9c0ba;stroke:#4b554e;stroke-width:1.5px}.piece-brick-side{fill:#7f8983;stroke:#4b554e;stroke-width:1.5px}.piece-brick-front{fill:#9ba49d;stroke:#4b554e;stroke-width:1.5px}.piece-brick-stud{fill:#d3d8d3;stroke:#4b554e;stroke-width:1px}.piece-plate{fill:#b9c0ba;stroke:#4b554e;stroke-width:1.5px}.piece-plate-edge{fill:#7f8983}.piece-truss-top{stroke:#e9ece8;stroke-width:6px;stroke-linecap:round}.piece-truss-deck{stroke:#5d6860;stroke-width:8px;stroke-linecap:round}.piece-truss-lattice{stroke:#8d9690;stroke-width:2.4px}.piece-side-bed{fill:none;stroke:#aeb7ad;stroke-width:8px;stroke-linejoin:round}.piece-side-rail{fill:none;stroke:#282f2c;stroke-width:3px;stroke-linejoin:round}.piece-side-sleeper{fill:#717a73}.piece-hinge{fill:#c58a39;stroke:#704b1e;stroke-width:1.5px}.piece-ground{fill:none;stroke:#d9d7ce;stroke-width:2px}.piece-row{flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:10px 8px;display:flex}.piece-text{flex-direction:column;flex:110px;gap:2px;min-width:0;display:flex}.piece-name{font-size:17px;font-weight:600}.piece-spec{color:var(--muted);font-size:13px}.stepper{border:1px solid var(--line);border-radius:999px;flex-shrink:0;align-items:center;gap:2px;padding:3px;display:flex}.stepper button{background:var(--paper);border:0;border-radius:999px;justify-content:center;align-items:center;width:38px;height:38px;display:flex}.stepper button.plus{background:var(--ink);color:var(--paper)}.stepper input{text-align:center;width:38px;font-family:var(--mono);appearance:textfield;background:0 0;border:0;font-size:17px;font-weight:600}.stepper input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.stepper input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.stock-panel{background:var(--dark);width:340px;color:var(--on-dark);border-radius:18px;flex-direction:column;flex-shrink:0;gap:24px;padding:28px;display:flex}.stock-panel .eyebrow{color:var(--on-dark-muted)}.stock-total{flex-direction:column;gap:6px;display:flex}.big-number{font-family:var(--display);align-items:baseline;gap:10px;font-size:64px;font-weight:800;line-height:1;display:flex}.big-number .unit{font-family:var(--body);color:var(--on-dark-muted);font-size:16px;font-weight:400}.muted-on-dark{color:var(--on-dark-muted);font-size:15px}.muted-on-dark.small{margin:0;font-size:13px}.rule{background:var(--dark-line);height:1px}.space-fields{flex-direction:column;gap:14px;display:flex}.two-cols{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;display:grid}.two-cols label{color:var(--on-dark-muted);flex-direction:column;gap:6px;font-size:13px;display:flex}.two-cols input{background:var(--dark-2);height:44px;color:var(--on-dark);font-family:var(--mono);border:1px solid #4a524c;border-radius:10px;width:100%;padding:0 12px;font-size:16px}.stock-panel .hint{color:var(--on-dark-muted)}.segmented{background:var(--dark-2);border:1px solid #4a524c;border-radius:12px;grid-template-columns:repeat(2,minmax(0,1fr));padding:3px;display:grid}.segmented button{min-height:40px;color:var(--on-dark-muted);background:0 0;border:0;border-radius:9px;font-size:14px;font-weight:500}.segmented button[aria-checked=true]{background:var(--on-dark);color:var(--ink)}.two-cols .equiv{align-self:end;padding-bottom:12px}.brick-scale{background:var(--dark-2);border:1px solid #4a524c;border-radius:12px;flex-direction:column;gap:8px;margin:0;padding:12px;display:flex}.brick-scale svg{width:100%;height:auto}.brick-scale .dim line,.brick-scale .dim path{stroke:var(--on-dark);stroke-width:1px}.brick-scale .dim text,.brick-scale .dim-caption{font-family:var(--mono);fill:var(--on-dark);font-size:10px}.brick-scale .dim-caption{fill:var(--on-dark-muted);font-family:var(--body);font-size:11px}.brick-scale .dim-caption.strong{fill:var(--on-dark);font-family:var(--mono);font-size:13px;font-weight:600}.brick-scale .deck{fill:var(--on-dark-muted)}.brick-scale .ground{stroke:#6a726c;stroke-width:1px}.brick-scale figcaption{color:var(--on-dark-muted);font-size:12px;line-height:1.4}.range{flex-direction:column;gap:8px;font-size:14px;display:flex}.range span{justify-content:space-between;display:flex}.range input{accent-color:var(--signal);width:100%;min-height:24px}.check{align-items:flex-start;gap:10px;font-size:14px;line-height:1.4;display:flex}.check input{width:18px;height:18px;accent-color:var(--signal);margin:1px 0 0}.spacer{flex:1}.cta{background:var(--signal);color:#fff;border:0;border-radius:12px;justify-content:center;align-items:center;gap:10px;min-height:56px;font-size:17px;font-weight:600;display:flex}.cta:hover:not(:disabled){background:var(--signal-hover)}.cta:disabled{color:var(--on-dark-muted);background:#4a524c}.networks{flex-direction:column;gap:20px;display:flex}.networks-head{flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:20px;display:flex}.link{color:var(--signal);text-underline-offset:3px;background:0 0;border:0;padding:0;font-weight:600;text-decoration:underline}.chips{flex-wrap:wrap;gap:8px;display:flex}.chip{border:1px solid var(--line-strong);background:var(--card);border-radius:999px;min-height:44px;padding:0 18px;font-size:15px;font-weight:500}.chip:hover{border-color:var(--ink)}.chip[aria-pressed=true]{background:var(--ink);border-color:var(--ink);color:var(--paper)}.chips-small .chip{min-height:38px;padding:0 14px;font-size:14px}.network-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,380px),1fr));gap:20px;margin-top:8px;display:grid}.network-card{text-align:left;background:var(--card);border:1px solid var(--line);border-radius:18px;flex-direction:column;gap:16px;padding:18px;transition:border-color .15s,transform .15s;display:flex}.network-card:hover{border-color:var(--ink);transform:translateY(-2px)}.network-card.near{border-style:dashed;border-color:var(--near-line)}.network-visual{background:var(--paper-2);border-radius:12px;justify-content:center;align-items:center;height:210px;padding:12px;display:flex}.network-svg{max-width:100%;max-height:100%}.track-sleepers{stroke:var(--sleeper);stroke-width:8px;stroke-dasharray:1.3 2.7}.track-rail{stroke:var(--rail);stroke-width:5px}.track-gap{stroke:var(--paper-2);stroke-width:2.6px}.track-flex{stroke:#9fd0b8;stroke-width:11px}.track-shadow{stroke:#1d232029;stroke-width:7px}.support{fill:var(--piece-support);stroke:var(--paper-2);stroke-width:.6px}.track-bumper{stroke:var(--signal);stroke-width:2.4px;stroke-linecap:round}.network-title{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.network-title>div{flex-direction:column;gap:4px;display:flex}.network-name{font-family:var(--display);letter-spacing:-.02em;font-size:22px;font-weight:700}.network-tagline{color:var(--muted);font-size:14px}.network-level{color:var(--piece-crossing);align-items:center;gap:6px;margin-top:2px;font-size:13px;font-weight:600;display:inline-flex}.badge{white-space:nowrap;border-radius:999px;flex-shrink:0;padding:6px 12px;font-size:13px;font-weight:600}.badge-ok{background:var(--ok-bg);color:var(--ok-ink)}.badge-near{background:var(--near-bg);color:var(--near-ink)}.network-stats{border-top:1px solid var(--line-2);grid-template-columns:auto auto minmax(0,1fr);gap:16px;margin:0;padding-top:14px;display:grid}.network-stats div{flex-direction:column;gap:2px;display:flex}.network-stats dt{color:var(--muted);font-size:13px}.network-stats dd{margin:0;font-size:15px;font-weight:600}.network-stats dd.to-buy{color:var(--near-ink)}.empty{color:var(--ink-2);flex-direction:column;align-items:flex-start;gap:12px;padding:48px 0;display:flex}.secondary,.primary{border-radius:12px;justify-content:center;align-items:center;gap:8px;min-height:48px;padding:0 20px;font-size:15px;font-weight:500;display:inline-flex}.secondary{border:1px solid var(--line-strong);background:var(--card)}.secondary:hover:not(:disabled){border-color:var(--ink)}.secondary:disabled{opacity:.5}.primary{background:var(--signal);color:#fff;border:0;font-weight:600}.primary:hover{background:var(--signal-hover)}.more{align-self:center}.build{flex-direction:column;gap:24px;padding-top:28px;display:flex}.build-head{flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:20px;display:flex}.back{color:var(--muted);background:0 0;border:0;align-self:flex-start;align-items:center;gap:6px;padding:4px 0;font-size:14px;display:flex}.back:hover{color:var(--ink)}.facts{color:var(--ink-2);flex-wrap:wrap;gap:8px 20px;font-size:15px;display:flex}.actions{flex-wrap:wrap;gap:10px;display:flex}.notice{background:var(--near-bg);color:var(--near-ink);border-radius:12px;margin:0;padding:14px 18px;font-size:15px}.build-body{align-items:flex-start;gap:24px;display:flex}.plan-card{background:var(--paper-2);border:1px solid var(--line);border-radius:18px;flex-direction:column;flex:1;gap:20px;min-width:0;padding:24px;display:flex;position:sticky;top:16px}.plan-wrap{justify-content:center;align-items:center;min-height:320px;display:flex}.plan-svg{width:100%;max-height:62vh}.badge-text{font-family:var(--mono);fill:#fff;text-anchor:middle;font-size:4.4px;font-weight:600}.badge-ring{fill:none;stroke:var(--signal);stroke-width:1.2px}.start-marker circle{fill:var(--signal)}.start-marker line,.start-marker path{stroke:var(--ink);stroke-width:.9px;stroke-linecap:round;stroke-linejoin:round}.start-marker text{font-family:var(--body);fill:var(--ink);font-size:4px;font-weight:600}.stepper-bar{background:var(--card);border:1px solid var(--line);border-radius:14px;align-items:center;gap:16px;padding:14px;display:flex}.stepper-text{color:var(--muted);flex-direction:column;flex:1;gap:2px;font-size:14px;display:flex}.stepper-text strong{color:var(--ink);font-size:16px}.stepper-text .eyebrow{font-size:12px}.legend{color:var(--ink-2);flex-wrap:wrap;gap:10px 24px;font-size:14px;display:flex}.legend span,.bom-row span:first-child{align-items:center;gap:8px;display:flex}.legend i,.bom-row i{border-radius:999px;width:12px;height:12px;display:inline-block}.legend-scale{margin-left:auto}.build-side{flex-direction:column;flex-shrink:0;gap:16px;width:360px;display:flex}.side-card{background:var(--card);border:1px solid var(--line);border-radius:18px;flex-direction:column;gap:14px;padding:22px;display:flex}.bom-row{justify-content:space-between;align-items:center;gap:12px;font-size:16px;display:flex}.bom-row .mono{font-weight:600}.bom-row.small{color:var(--muted);font-size:14px}h3{font-family:var(--display);margin:0;font-size:17px;font-weight:700}.level-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0;display:grid}.level-stats div{flex-direction:column;gap:2px;display:flex}.level-stats dt{color:var(--muted);font-size:12px}.level-stats dd{margin:0;font-size:15px;font-weight:600}.level-stats .unit{color:var(--muted);font-size:12px;font-weight:500}.profile{width:100%;height:auto}.profile-ground{stroke:var(--line-strong);stroke-width:1px}.profile-fill{fill:#2f5f8a1f}.profile-line{fill:none;stroke:var(--piece-crossing);stroke-width:2px;stroke-linejoin:round}.profile-label{font-family:var(--mono);fill:var(--muted);font-size:10px}.small-text{color:var(--ink-2);margin:0;font-size:14px;line-height:1.45}.train-fields{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;display:grid}.train-fields label{color:var(--muted);flex-direction:column;justify-content:space-between;gap:6px;font-size:12px;display:flex}.train-fields input{border:1px solid var(--line-strong);background:var(--card);width:100%;height:40px;font-family:var(--mono);border-radius:10px;padding:0 10px;font-size:15px}.verdict{align-items:flex-start;gap:10px;margin:0;font-size:14px;line-height:1.4;display:flex}.badge-bad{color:#8f2a18;background:#f7dcd6}.legend-square{background:var(--piece-support);border-radius:2px!important}.rule-light{background:var(--line-2);height:1px}.step-list{flex-direction:column;gap:4px;margin:0;padding:0;list-style:none;display:flex}.step-list button{text-align:left;background:0 0;border:0;border-radius:10px;gap:12px;width:100%;margin:0 -8px;padding:8px;display:flex}.step-list button:hover{background:var(--paper)}.step-list li[aria-current=step] button{background:var(--paper);box-shadow:inset 0 0 0 1.5px var(--signal)}.step-num{background:var(--ink);width:28px;height:28px;color:var(--paper);border-radius:8px;flex-shrink:0;justify-content:center;align-items:center;font-size:14px;font-weight:600;display:flex}.step-text{color:var(--muted);flex-direction:column;gap:2px;font-size:14px;line-height:1.4;display:flex}.step-text strong{color:var(--ink);font-size:15px;font-weight:600}.support-footer{border-top:1px solid var(--line);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px 24px;max-width:1440px;margin:0 auto;padding:24px clamp(16px,4vw,48px) 40px;display:flex}.support-footer p{max-width:560px;color:var(--muted);margin:0;font-size:14px}.feedback-link{color:var(--signal);text-underline-offset:3px;margin-top:9px;font-size:14px;font-weight:600;text-decoration:underline;display:inline-block}.kofi-button{border-radius:10px;align-self:flex-start;align-items:center;min-height:44px;transition:transform .15s;display:inline-flex}.kofi-button:hover{transform:translateY(-1px)}.kofi-button img{border:0;width:auto;height:36px;display:block}.mode-switch{flex-wrap:wrap;align-items:center;gap:8px 16px;max-width:1440px;margin:0 auto;padding:20px clamp(16px,4vw,48px) 0;display:flex}.mode-toggle{border:1px solid var(--line-strong);background:var(--card);border-radius:999px;align-items:center;gap:10px;min-height:44px;padding:6px 16px;font-size:14px;font-weight:600;display:inline-flex}.mode-toggle:hover{border-color:var(--ink)}.mode-toggle-side{color:var(--muted);font-weight:500}.mode-toggle-side.on{color:var(--ink);font-weight:700}.mode-toggle-track{background:var(--line-strong);border-radius:999px;width:40px;height:22px;transition:background .15s;position:relative}.mode-toggle[aria-checked=true] .mode-toggle-track{background:var(--signal)}.mode-toggle-thumb{background:#fff;border-radius:50%;width:16px;height:16px;transition:transform .15s;position:absolute;top:3px;left:3px;box-shadow:0 1px 2px #00000040}.mode-toggle[aria-checked=true] .mode-toggle-thumb{transform:translate(18px)}.mode-switch-hint{color:var(--muted);margin:0;font-size:14px}.mode-switch+.screen{padding-top:24px}.manual{flex-direction:column;gap:24px;display:flex}.manual-head{flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:16px;display:flex}.manual-body{grid-template-columns:220px minmax(0,1fr) 300px;align-items:start;gap:20px;display:grid}.manual-palette{flex-direction:column;gap:10px;display:flex;position:sticky;top:16px}.manual-palette-list{flex-direction:column;gap:8px;display:flex}.manual-tile{border:1px solid var(--line);background:var(--card);text-align:left;cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none;border-radius:12px;align-items:center;gap:10px;padding:6px 10px 6px 6px;display:flex}.manual-tile:hover{border-color:var(--ink)}.manual-tile:active{cursor:grabbing}.manual-tile-icon{background:var(--paper-2);border-radius:8px;flex-shrink:0;justify-content:center;align-items:center;width:64px;height:40px;display:flex}.manual-tile-icon .piece-icon{width:60px;height:36px}.manual-tile-icon.mirror .piece-icon{transform:scaleY(-1)}.manual-tile-text{flex-direction:column;gap:2px;min-width:0;display:flex}.manual-tile-name{font-size:14px;font-weight:600}.manual-tile-count{color:var(--muted);font-size:12px}.manual-tile.sold-out .manual-tile-count{color:var(--near-ink)}.manual-canvas-card{flex-direction:column;gap:10px;min-width:0;display:flex}.manual-toolbar{flex-wrap:wrap;justify-content:space-between;gap:8px;display:flex}.manual-tools{flex-wrap:wrap;gap:6px;display:flex}.tool{border:1px solid var(--line-strong);background:var(--card);border-radius:10px;justify-content:center;align-items:center;gap:6px;min-width:38px;min-height:38px;padding:0 10px;font-size:13px;font-weight:500;display:inline-flex}.tool svg{fill:none;stroke:currentColor;stroke-width:1.7px;stroke-linecap:round;stroke-linejoin:round;width:18px;height:18px}.tool:hover:not(:disabled){border-color:var(--ink)}.tool:disabled{opacity:.45}.tool.danger:hover:not(:disabled){border-color:var(--signal);color:var(--signal)}.manual-canvas{border:1px solid var(--line);background:var(--paper-2);touch-action:none;-webkit-user-select:none;user-select:none;cursor:grab;border-radius:16px;width:100%;height:min(68vh,680px);min-height:380px;display:block}.manual-canvas:active{cursor:grabbing}.manual-grid-line{fill:none;stroke:var(--line);stroke-width:.35px}.manual-empty{fill:var(--muted);text-anchor:middle;dominant-baseline:middle;pointer-events:none;font-size:7px}.manual-piece{cursor:move}.manual-piece.over .track-sleepers{stroke:var(--near-line)}.manual-hit{fill:none;stroke:#0000;stroke-width:12px;pointer-events:stroke}.manual-halo path,.manual-halo line{stroke:var(--signal);stroke-width:13px;stroke-opacity:.22;stroke-dasharray:none;stroke-linecap:round}.manual-ghost{opacity:.55;pointer-events:none}.manual-ghost.snapped{opacity:.85}.manual-ghost.snapped .track-sleepers{stroke:var(--ok-ink)}.manual-port{cursor:pointer}.manual-port circle{fill:var(--paper-2);stroke:var(--ink-2);stroke-width:2px;vector-effect:non-scaling-stroke}.manual-port path{stroke:var(--ink-2);stroke-width:2px;stroke-linecap:round;stroke-dasharray:2 3;vector-effect:non-scaling-stroke}.manual-port .manual-port-hit{fill:#0000;stroke:none}.manual-port.target circle{fill:var(--signal);stroke:#fff}.manual-port.target path{stroke:var(--signal);stroke-dasharray:none}.manual-legend{color:var(--muted);align-items:center;gap:8px;margin:0;font-size:13px;display:flex}.manual-legend-grid{border:1px solid var(--line-strong);background:var(--paper-2);flex-shrink:0;width:14px;height:14px}.manual-panel{gap:18px;width:auto;padding:24px;position:sticky;top:16px}.manual-panel .big-number{font-size:52px}.manual-status{background:var(--dark-2);color:var(--on-dark-muted);border-radius:10px;padding:10px 14px;font-size:14px}.manual-status.ok{background:var(--ok-bg);color:var(--ok-ink);font-weight:600}.manual-status.near{background:var(--near-bg);color:var(--near-ink)}.manual-usage ul{flex-direction:column;gap:6px;margin:10px 0 0;padding:0;font-size:14px;list-style:none;display:flex}.manual-usage li{justify-content:space-between;gap:12px;display:flex}.manual-usage li.over{color:#f2c581}.manual-buy p{color:#f2c581;margin:8px 0 0;font-size:14px}.manual-help .muted-on-dark.small{margin-top:6px;line-height:1.5}@media (width<=1100px){.manual-body{grid-template-columns:200px minmax(0,1fr)}.manual-panel{grid-column:1/-1;position:static}}@media (width<=720px){.manual-body{grid-template-columns:minmax(0,1fr)}.manual-palette{position:static}.manual-palette-list{flex-direction:row;padding-bottom:4px;overflow-x:auto}.manual-tile{flex-direction:column;flex-shrink:0;align-items:flex-start;width:112px;padding:6px}.manual-tile-name{font-size:13px}.manual-canvas{height:60vh;min-height:320px}.tool-label{display:none}}@media (width<=900px){.inventory,.build-body{flex-direction:column}.stock-panel,.build-side{width:100%}.plan-card{width:100%;padding:12px;position:static}.plan-wrap{min-height:0}.step-pill-label{display:none}.step-pill[aria-current=step] .step-pill-label{display:inline}.stepper-bar{flex-wrap:wrap}.stepper-text{flex-basis:100%;order:-1}}@media (width<=480px){.network-stats{grid-template-columns:1fr 1fr}.network-stats div:last-child{grid-column:1/-1}}@media print{body{background:#fff}.topbar,.no-print,.back{display:none!important}.screen{padding:0}.build-body{flex-direction:column}.plan-card{break-inside:avoid;width:100%;position:static}.build-side{width:100%}.side-card{break-inside:avoid}}.level-block{background:var(--card);border:1px solid var(--line);border-radius:14px;flex-direction:column;gap:16px;margin-top:28px;padding:18px;display:flex}.level-block.on{border-color:var(--ink-2)}.level-toggle{cursor:pointer;align-items:center;gap:16px;display:flex}.level-icon{fill:none;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.level-icon-low{stroke:var(--line-strong);stroke-width:4px}.level-icon-high{stroke:var(--ink);stroke-width:4px}.level-icon-wing{stroke:var(--ink-2);stroke-width:1.6px}.level-block:not(.on) .level-icon-high,.level-block:not(.on) .level-icon-wing{stroke:var(--line-strong)}.level-toggle-text{color:var(--ink-2);flex-direction:column;flex:1;gap:4px;font-size:14px;line-height:1.4;display:flex}.level-toggle-text strong{color:var(--ink);font-size:16px}.switch{appearance:none;background:var(--line-strong);cursor:pointer;border-radius:999px;flex-shrink:0;width:46px;height:26px;margin:0;transition:background .15s;position:relative}.switch:after{content:"";background:#fff;border-radius:999px;width:20px;height:20px;transition:transform .15s;position:absolute;top:3px;left:3px;box-shadow:0 1px 2px #0003}.switch:checked{background:var(--signal)}.switch:checked:after{transform:translate(20px)}.switch:focus-visible{outline:2px solid var(--signal);outline-offset:2px}.level-help{color:var(--ink-2);margin:0;font-size:14px;line-height:1.5}.level-status{border-radius:10px;margin:0;padding:10px 12px;font-size:14px;line-height:1.4}.level-status-ok{background:var(--ok-bg);color:var(--ok-ink)}.level-status-near{background:var(--near-bg);color:var(--near-ink)}.level-status-bad{color:#8f2a18;background:#f7dcd6}.level-edge{stroke:var(--rail)}.level-deck{stroke:var(--paper-2)}.level-wing{fill:none;stroke:var(--rail);stroke-width:1px;stroke-linecap:round}.ramp-arrow{fill:var(--signal);stroke:var(--paper-2);stroke-width:.5px}.ramp-text,.level-mark text{font-family:var(--mono);font-size:4.2px;font-weight:600}.ramp-text{fill:var(--signal)}.level-mark path,.level-mark-symbol,.level-mark text{fill:var(--ink)}.level-mark.low path{fill:none;stroke:var(--ink);stroke-width:.5px}.legend-svg{fill:none;width:24px;height:12px}.level-edge.ramp{stroke-dasharray:3 2}.support-tower rect{fill:var(--paper-2);stroke:var(--piece-support);stroke-width:.7px}.support-tower path{stroke:var(--piece-support);stroke-width:.6px}.support-bricks{fill:var(--paper-2);stroke:var(--piece-support);stroke-width:.8px}.legend-bricks{border:2px solid var(--piece-support);background:var(--paper-2)!important}.truss{fill:none;stroke:var(--ink-2);stroke-width:.6px}.transition-mark path,path.transition-mark{fill:var(--piece-switch);stroke:var(--paper-2);stroke-width:.6px}.build-main{flex-direction:column;flex:1;gap:24px;min-width:0;display:flex}.build-main .plan-card{position:static}.train-card{background:var(--card);border:1px solid var(--line);border-radius:18px;flex-direction:column;gap:16px;padding:22px;display:flex}.train-card h2{margin:0 0 4px}.train-head{flex-wrap:wrap;justify-content:space-between;gap:16px;display:flex}.train-head>div:first-child{flex:260px}.train-counts{flex-wrap:wrap;gap:16px;display:flex}.train-counter{color:var(--muted);flex-direction:column;gap:6px;font-size:13px;display:flex}.counter-value{text-align:center;min-width:32px;color:var(--ink);font-weight:600}.train-side{background:var(--paper-2);border-radius:12px;width:100%;height:auto;max-height:120px;padding:8px}.train-side-vehicle{cursor:pointer}.train-side-vehicle.selected .train-loco,.train-side-vehicle.selected .train-wagon{stroke:var(--ink);stroke-width:.6px}.train-side-rail{stroke:var(--rail);stroke-width:.8px}.train-side-bogie{fill:var(--rail)}.train-side-wheel{fill:#58605b;stroke:var(--paper-2);stroke-width:.3px}.train-side-window{fill:#dfe8ee}.train-side-num{font-family:var(--mono);fill:#fff;text-anchor:middle;font-size:3px;font-weight:700}.train-loco{fill:var(--signal);stroke:#7d2718;stroke-width:.3px}.train-wagon{fill:#5d7f99;stroke:#33485a;stroke-width:.3px}.train-alert-1{stroke:#d88a12;stroke-width:1px}.train-alert-2{stroke:#c8412b;stroke-width:1.2px;stroke-dasharray:1.2 .8}.train-cab{fill:#7d2718}.train-windscreen{stroke:#dfe8ee;stroke-width:.8px}.train-roof{stroke:#ffffff59;stroke-width:1.4px}.train-bogie{fill:#1d2320}.train-coupler{stroke:var(--ink);stroke-width:.8px}.train-stats{grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px;margin:0;display:grid}.train-stats div,.ramp-table div{flex-direction:column;gap:2px;display:flex}.train-stats dt,.ramp-table dt{color:var(--muted);font-size:12px}.train-stats dd,.ramp-table dd{margin:0;font-weight:600}.train-stats .unit{color:var(--muted);font-size:12px;font-weight:500}.vehicle-list{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}.vehicle-list li{border:1px solid var(--line);border-radius:12px;align-items:center;gap:8px;padding:4px 6px 4px 4px;display:flex}.vehicle-list li.selected{border-color:var(--ink-2)}.vehicle-pick{text-align:left;background:0 0;border:0;flex-wrap:wrap;flex:1;align-items:center;gap:4px 10px;min-width:0;padding:8px;font-size:14px;display:flex}.vehicle-name{font-weight:600}.vehicle-meta{color:var(--muted);font-size:13px}.vehicle-dot{background:#5d7f99;border-radius:3px;width:12px;height:12px}.vehicle-dot.loco{background:var(--signal)}.vehicle-actions{gap:4px;display:flex}.vehicle-actions button{border:1px solid var(--line);background:var(--paper-2);border-radius:10px;width:34px;height:34px;font-size:15px}.vehicle-actions button[aria-pressed=true]{background:var(--ink);color:var(--paper)}.vehicle-actions button:disabled{opacity:.35}.vehicle-form,.train-add{grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;display:grid}.vehicle-form{background:var(--paper-2);border-radius:12px;padding:14px}.vehicle-form .wide{grid-column:1/-1}.vehicle-form label,.train-add label{color:var(--ink-2);flex-direction:column;gap:6px;font-size:13px;display:flex}.vehicle-form input,.train-add input,.train-add select,.train-toolbar select{border:1px solid var(--line-strong);background:var(--card);border-radius:10px;min-height:40px;padding:0 10px;font-size:15px}.train-toolbar{background:var(--card);border:1px solid var(--line);border-radius:14px;flex-wrap:wrap;align-items:center;gap:10px 18px;padding:12px 14px;display:flex}.train-toolbar .check{align-items:center}.secondary.small,.primary.small{min-height:38px;padding:0 14px;font-size:14px}.train-position{accent-color:var(--signal);flex:180px}.train-live{color:var(--ink-2);flex-basis:100%;font-size:13px}.train-live.stuck{color:#8f2a18;font-weight:600}.risk-count{background:var(--near-bg);min-width:22px;height:22px;color:var(--near-ink);border-radius:999px;justify-content:center;align-items:center;padding:0 6px;font-size:12px;font-weight:700;display:inline-flex}.risk{stroke-width:22px;stroke-linecap:round;opacity:.45}.risk-1{stroke:#e7a537}.risk-2{stroke:#d8432c}.legend-risk{opacity:.6;border-radius:3px!important}.legend-risk.risk-1{background:#e7a537}.legend-risk.risk-2{background:#d8432c}.report-row{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.report-row>div{flex-direction:column;gap:2px;display:flex}.issue-list{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}.issue{border-radius:10px;justify-content:space-between;align-items:flex-start;gap:10px;padding:8px 10px;font-size:13px;line-height:1.45;display:flex}.issue-1{background:var(--near-bg);color:var(--near-ink)}.issue-2{color:#8f2a18;background:#f7dcd6}.ramp-table{flex-direction:column;gap:8px;margin:0;display:flex}.ramp-table div{flex-direction:row;justify-content:space-between;gap:10px}.kits{flex-direction:column;gap:12px;display:flex}.level-block h3{margin:4px 0 0;font-size:16px}.kit-card{gap:10px}.kit-use,.kit-contents{color:var(--ink-2);margin:0;font-size:13px;line-height:1.45}.kit-contents span{font-weight:600}.kit-track{fill:none;stroke:#282f2c;stroke-width:4px;stroke-linejoin:round}.kit-track-top{fill:none;stroke:#4b554e;stroke-width:9px;stroke-dasharray:2 2.5}.kit-tower{fill:none;stroke:#5d6860;stroke-width:2px;stroke-linecap:round}.kit-post{fill:none;stroke:#9ba49d;stroke-width:4px}.kit-portal{fill:#fbf8f1;stroke:#37413b;stroke-width:1.6px}.kit-column{fill:#9ba49d;stroke:#4b554e;stroke-width:1px}
