:root{--ink:#17324d;--muted:#5d7891;--cyan:#4fc5d2;--orange:#ff9f43;--violet:#7b8ff5;--line:#b8d2d8;--shadow:0 14px 34px #135d6a24}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink)}body{background:linear-gradient(145deg,#56ddd3,#83ebe3 48%,#aaf2ec)}.app{max-width:1320px;margin:auto;padding:12px 14px 28px}.top{display:flex;align-items:center;gap:10px;background:#fffffff5;border-radius:20px;padding:9px 12px;box-shadow:0 8px 22px #175d681f;position:sticky;top:8px;z-index:20}.logo{display:flex;align-items:center;gap:9px;text-decoration:none;color:var(--ink);font-weight:950}.logo small{display:block;color:#168d88;font-size:10px}.hplus{width:40px;height:40px;border-radius:13px;display:grid;place-items:center;background:#173c59;color:#fff}.spacer{flex:1}.pill{background:#e4f9f6;border-radius:999px;padding:7px 10px;font-size:11px;font-weight:900;color:#22746f}.back{background:#173c59;color:#fff;text-decoration:none;padding:10px 12px;border-radius:12px;font-size:11px;font-weight:900}.titlebar{display:flex;align-items:center;justify-content:space-between;background:#fffffff5;border-radius:20px;padding:16px 18px;margin:14px 0 10px;box-shadow:0 8px 22px #1668701f}.titlebar h1{margin:0;font-size:clamp(27px,3vw,40px)}.titlebar p{margin:4px 0 0;color:var(--muted);font-size:12px;font-weight:700}.titlebar select{border:2px solid #c9e4e8;border-radius:12px;padding:9px;background:#fff;font-weight:850}.stage{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(270px,.85fr);gap:12px}.game,.side{background:#fffffff5;border-radius:24px;box-shadow:var(--shadow)}.game{padding:14px}.side{padding:14px;display:flex;flex-direction:column;gap:11px}.hud{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:10px}.metric{background:#eefbfa;border:1px solid #d5eeee;border-radius:13px;padding:9px}.metric span{font-size:9px;color:var(--muted);font-weight:900}.metric b{display:block;font-size:15px}.feedback{min-height:42px;background:#173c59;color:#fff;border-radius:13px;display:flex;align-items:center;justify-content:center;text-align:center;padding:8px;font-size:11px;font-weight:900;margin-bottom:10px}.mapwrap{background:#dff7f6;border:1px solid #8ccbd2;border-radius:20px;padding:6px}.mapwrap svg{width:100%;height:auto;display:block}.edge-hit{cursor:pointer}.edge-base,.edge-line{pointer-events:none}.capbg{pointer-events:all;cursor:pointer}.cap{pointer-events:none}.edge-base{stroke:#fff;stroke-width:12}.edge-line.off{stroke:#b8d2d8;stroke-width:4;stroke-dasharray:8 7}.edge-line.on{stroke:#4fc5d2;stroke-width:8}.edge-line.busy{stroke:#ff9f43}.cap{font-family:Arial,sans-serif;font-size:11px;font-weight:700;fill:#17324d}.capbg{fill:#fff;stroke:#b8d2d8}.node{fill:#fff;stroke:#31566f;stroke-width:2}.node.hub{fill:#7b8ff5}.node-label{font-family:Arial,sans-serif;font-weight:800;font-size:12px;fill:#17324d}.node-label.hub{fill:#fff}.demand{font-family:Arial,sans-serif;font-size:10px;font-weight:700;fill:#d65c92}.controls{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:7px;margin-top:10px}.controls button{min-height:44px;border:0;border-radius:12px;font-size:11px;font-weight:950;cursor:pointer}.controls .primary{background:#173c59;color:#fff}.controls button:not(.primary){background:#fff0a6;color:#705800}.controls button:last-child{background:#fff;border:1px solid #d4e5e8;color:var(--ink)}.guide{background:linear-gradient(145deg,#eefcff,#fff8d6);border:1px solid #d5ebed;border-radius:18px;padding:12px;display:flex;align-items:center;gap:10px}.guide img{width:88px;height:105px;object-fit:contain}.guide b{color:#5773de}.guide p,.rulebox p{font-size:12px;font-weight:800;line-height:1.35;margin:4px 0 0}.rulebox{background:#f7fbfc;border-radius:14px;padding:12px}.rulebox p{color:var(--muted);font-size:11px}.level-list{display:grid;grid-template-columns:1fr 1fr;gap:6px}.level-btn{border:1px solid #d0e4e7;background:#fff;border-radius:10px;padding:8px;font-size:10px;font-weight:850;color:var(--ink);cursor:pointer}.level-btn.active{background:#173c59;color:#fff}.level-btn.done{background:#e6fbf3;border-color:#92dec5}footer{text-align:center;padding:18px 0 0;font-size:10px;font-weight:850;color:#266a70}footer span{display:block}.celebrate{position:fixed;inset:0;background:#0b2e4088;display:none;place-items:center;z-index:60}.celebrate.show{display:grid}.result{width:min(440px,94vw);background:#fff;border-radius:24px;padding:22px;text-align:center}.stars{font-size:34px;color:#f0b400}.result button{border:0;border-radius:13px;padding:12px 16px;font-weight:950;background:#173c59;color:#fff}.edge-button{cursor:pointer;pointer-events:all}@media(max-width:900px){.stage{grid-template-columns:1fr}.side{display:grid;grid-template-columns:1fr 1fr}.level-list{grid-column:1/-1}}@media(max-width:620px){.app{padding:8px}.logo span:last-child,.pill,.titlebar p{display:none}.titlebar h1{font-size:27px}.hud{grid-template-columns:repeat(2,1fr)}.controls{grid-template-columns:1fr}.side{display:block}.guide,.rulebox{margin-bottom:8px}}