:root{color-scheme:light;--ink:#182d61;--muted:#4b5979;--paper:#f8f6ed;--map:#172d62;--line:#c6cddd;--orange:#ff9c72;--mint:#bdf4cc;--white:#fffdf2;--mono:ui-monospace,Consolas,monospace}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.55 'Microsoft YaHei UI','PingFang SC',system-ui,sans-serif}button,input{font:inherit}button{cursor:pointer;color:inherit}button:disabled{cursor:default}button:focus-visible,input:focus-visible,a:focus-visible,#workbench:focus-visible{outline:3px solid #8b3c1d;outline-offset:3px}p,h1,h2,dl,dd{margin:0}.shell{width:min(1184px,calc(100% - 64px));margin-inline:auto}.skip{position:absolute;top:8px;left:8px;z-index:4;padding:10px 14px;background:white;color:var(--ink);transform:translateY(-150%)}.skip:focus{transform:none}
.mast{height:68px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #aab4ce}.brand{display:flex;gap:9px;align-items:center;font-weight:750}.brand small,.issue b{font:700 11px var(--mono);letter-spacing:.06em}.brand small{margin-left:8px;color:var(--muted)}.issue{font-size:13px;color:var(--muted);white-space:nowrap}.issue b{margin-left:4px;color:var(--ink)}
.hero{display:flex;gap:24px;justify-content:space-between;align-items:flex-end;padding:34px 0 30px}.eyebrow{font:700 12px/1.4 var(--mono);letter-spacing:.075em}.eyebrow span{margin-left:6px;color:#4b5979}.hero .eyebrow{display:flex;align-items:center;gap:8px}.hero .eyebrow i{width:11px;height:11px;border:2px solid var(--ink);background:var(--orange);border-radius:3px}.hero h1{font-size:clamp(49px,8vw,96px);letter-spacing:-.015em;line-height:1.14;font-weight:900;margin-left:-.015em}.hero h1 span{color:#a14424}.intro{font-size:16px;line-height:1.75;max-width:345px;border-left:3px solid #a14424;padding-left:15px;margin:0 25px 5px 0}.intro::first-line{font-weight:800}
.scenes{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:18px}.scenes button{min-height:52px;padding:8px 11px;background:transparent;border:1px solid #aab4ce;border-radius:8px;text-align:left;display:flex;gap:8px;align-items:center;font-size:14px;font-weight:750;line-height:1.3}.scenes button:hover{background:#e7ebf5}.scenes button[aria-pressed=true]{background:var(--ink);color:var(--white);border-color:var(--ink)}.scenes small{font:700 11px var(--mono);background:#e6eaf4;color:var(--ink);padding:4px;border-radius:4px}.scenes button[aria-pressed=true] small{background:var(--orange)}
.work{display:grid;grid-template-columns:minmax(0,1.88fr) minmax(285px,1fr);gap:14px}.map{min-width:0;color:var(--white);background:var(--map);border:1px solid #243e76;border-radius:18px;overflow:hidden}.map-head,.legend{display:flex;justify-content:space-between;align-items:center;padding:15px 21px}.map-head .eyebrow{color:#c9d5ec}.map-head h2{font-size:25px;line-height:1.3;margin-top:5px;letter-spacing:.035em}.meter{display:flex;align-items:baseline;gap:5px;font:700 15px var(--mono);color:#d4dff4}.meter strong{font-size:31px;color:var(--mint)}.meter small{font-size:12px;margin-left:3px}.drawing{display:block;width:100%;height:auto;background:radial-gradient(circle,#577095 1px,transparent 1.1px) center/19px 19px;border-block:1px solid #526895}.drawing .edge{stroke:#9aaaca;stroke-width:4;stroke-dasharray:8 7;stroke-linecap:round}.drawing .edge.next{stroke:var(--orange);stroke-dasharray:2 8;stroke-width:6}.drawing .edge.done{stroke:var(--mint);stroke-dasharray:none;stroke-width:7}.drawing circle.node{fill:#213969;stroke:#e1e7f6;stroke-width:2}.drawing circle.current{fill:var(--orange);stroke:var(--white);stroke-width:3}.drawing circle.odd-ring{fill:none;stroke:#f5c78f;stroke-width:2;stroke-dasharray:3 4}.drawing text{fill:var(--white);font:750 20px var(--mono);text-anchor:middle;dominant-baseline:central}.drawing text.current{fill:#1c2852}.legend{justify-content:flex-start;flex-wrap:wrap;gap:8px 19px;font-size:12px;color:#e1e7f6}.legend span{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.key{width:18px;border-top:3px solid var(--mint)}.key.choice{border-top:3px dotted var(--orange)}.key.unused{border-top:3px dashed #a9b9d5}.key.position{width:10px;height:10px;border:1px solid var(--white);background:var(--orange);border-radius:50%}.key.odd{width:12px;height:12px;border:2px dashed #f5c78f;border-radius:50%}
.controls,.diagnosis,.exports{min-width:0;border:1px solid #aab4ce;border-radius:15px;padding:18px 20px;background:#fffdf5}.controls h2,.notes h2{font-size:23px;line-height:1.25;margin:5px 0 8px}.turn{font-size:14px;font-weight:700;min-height:43px;color:var(--ink)}.turn[data-state=stuck]{color:#8b3c1d}.actions{display:flex;flex-wrap:wrap;gap:7px;min-height:42px}.actions button{min-width:44px;min-height:40px;border:1px solid var(--ink);border-radius:6px;background:#e6ebf7;font-weight:750;padding:4px 10px}.actions button:hover{background:#ccd9ef}.command{display:flex;gap:8px;margin:12px 0}.command button{border:1px solid #aab4ce;background:transparent;border-radius:5px;min-height:38px;padding:4px 10px;font-size:13px;font-weight:750}.command button:disabled{color:#59647a;background:#efeee7}.command button:enabled:hover{background:#e7ebf5}.log{border-top:1px solid var(--line);font-size:13px}.log div{padding:6px 0;border-bottom:1px dotted #c6cddd}.log dt{font-weight:750;color:var(--muted)}.log dd{margin-top:1px;overflow-wrap:anywhere}.notes{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:17px 0}.notes p:not(.eyebrow){font-size:14px}.verdict{display:inline-block;background:#dceee1;color:#173c32;border-radius:5px;padding:3px 8px;font-weight:800;margin:1px 0 8px}.verdict[data-state=impossible]{background:#f8e3d8;color:#743218}.facts{display:flex;gap:12px 28px;flex-wrap:wrap;margin:11px 0 4px;font-size:13px}.facts div{display:flex;gap:7px}.facts dt{color:var(--muted)}.facts dd{font-weight:800}.rule,.degrees{color:var(--muted);margin-top:4px}.rule{border-top:1px solid var(--line);padding-top:8px}.confirm{display:flex;align-items:center;gap:7px;font-size:14px;margin:11px 0;min-height:27px}.confirm input{width:18px;height:18px;margin:0;accent-color:var(--ink);flex:none}.products{display:grid;grid-template-columns:1fr 1fr;gap:7px}.products button{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;min-height:58px;background:#e8edf8;border:1px solid #95a5ca;border-radius:7px;text-align:left;padding:7px 9px;font-size:14px;font-weight:800;overflow-wrap:anywhere}.products small{font-weight:600;color:var(--muted)}.products button:hover{background:#dce5f5}.products button:disabled{opacity:.7}.export-status{min-height:23px;margin-top:6px;color:#803a20}.footer{display:flex;justify-content:space-between;gap:8px;border-top:1px solid #aab4ce;padding:12px 0 19px;font-size:12px;color:var(--muted)}
@media(max-width:850px){.shell{width:calc(100% - 36px)}.work{grid-template-columns:minmax(0,1.35fr) minmax(255px,1fr)}.map-head,.legend,.controls,.diagnosis,.exports{padding-left:14px;padding-right:14px}.intro{margin-right:0}}
@media(max-width:690px){.shell{width:calc(100% - 26px)}.mast{height:52px}.brand small{display:none}.hero{display:block;padding:22px 0 18px}.intro{margin:7px 0 0;font-size:14px;max-width:none}.work,.notes{grid-template-columns:minmax(0,1fr);gap:11px}.scenes{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:11px;gap:6px}.scenes button{min-height:42px}.map-head,.legend{padding-top:9px;padding-bottom:9px}.map-head h2{font-size:21px}.meter strong{font-size:24px}.legend{gap:6px 10px}.controls,.notes section{padding-top:13px;padding-bottom:13px}.notes{margin:11px 0}.footer{font-size:11px}}
@media(max-width:360px){.legend{font-size:11px;gap:6px 8px}.actions button{padding-inline:8px}.hero h1{font-size:46px}}
