:root { color-scheme: light; --ink:#111827; --muted:#5f6878; --line:#d8dee9; --soft:#f4f6fa; --paper:#fff; --dark:#111827; --accent:#2563eb; }
*{box-sizing:border-box} html,body{margin:0;min-height:100%} body{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:#f7f8fb} button,input,select{font:inherit} a{color:inherit}
.topbar{min-height:64px;padding:12px 20px;display:flex;align-items:center;justify-content:space-between;gap:16px;background:rgba(255,255,255,.95);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20;backdrop-filter:blur(10px)}
.brand-wrap{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}.brand{text-decoration:none;color:var(--ink);font-weight:850;letter-spacing:-.04em;font-size:24px}.brand span{color:var(--accent)}.tagline{color:var(--muted);font-size:14px}.top-actions{display:flex;gap:10px;flex-wrap:wrap}
.button,.toolbar button{border:1px solid var(--line);background:#fff;color:var(--ink);border-radius:12px;padding:10px 13px;font-weight:700;cursor:pointer}.button.primary{background:var(--dark);border-color:var(--dark);color:#fff}.button:hover,.toolbar button:hover{border-color:#aeb8c9}.button.primary:hover{background:#000}
.app-shell{width:min(1480px,calc(100% - 24px));margin:0 auto;padding:24px 0 32px}.intro{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:22px;align-items:end;margin-bottom:18px}h1{margin:0;font-size:clamp(34px,5vw,64px);line-height:1;letter-spacing:-.055em}.intro p{max-width:780px;color:var(--muted);font-size:18px;line-height:1.55;margin:14px 0 0}.hint-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px;color:var(--muted);line-height:1.45}.hint-card strong{color:var(--ink)}
.tool-frame{display:grid;grid-template-columns:260px minmax(0,1fr);gap:16px;align-items:stretch}.toolbar{background:#fff;border:1px solid var(--line);border-radius:22px;padding:16px;display:flex;flex-direction:column;gap:16px;height:fit-content;position:sticky;top:84px}.tool-group{display:grid;gap:8px}.tool-group label{font-weight:800;font-size:14px}.segmented{display:grid;grid-template-columns:repeat(2,1fr);border:1px solid var(--line);border-radius:13px;overflow:hidden}#panTool{display:none}.segmented .seg{border:0;border-radius:0}.segmented .seg.active{background:var(--dark);color:#fff}input[type="color"]{width:100%;height:44px;border:1px solid var(--line);border-radius:12px;padding:4px;background:#fff}input[type="range"]{width:100%}input[type="text"],input[type="search"]{width:100%;border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:#fff;color:var(--ink)}select{width:100%;border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:#fff}.tool-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}.compact-note{color:var(--muted);font-size:13px;line-height:1.45;border-top:1px solid var(--line);padding-top:12px}.compact-note p{margin:0}.compact-note strong{color:var(--ink)}
.map-key-list{display:grid;gap:6px}.map-key-row{display:grid;grid-template-columns:16px 1fr 26px;align-items:center;gap:7px;font-size:12px;color:var(--ink)}.map-key-swatch{width:16px;height:16px;border-radius:4px;border:1px solid #111827}.map-key-row button{padding:2px 6px;border-radius:8px;font-weight:900;line-height:1}
.canvas-wrap{position:relative;background:#fff;border:1px solid var(--line);border-radius:22px;overflow:hidden;min-height:520px;box-shadow:0 20px 70px rgba(17,24,39,.08);touch-action:none}#mapSvg{display:block;width:100%;height:min(72vh,760px);min-height:520px;cursor:crosshair}#countries path{fill:#fff;stroke:#111827;stroke-width:.7;vector-effect:non-scaling-stroke}#adminBorders{pointer-events:none}#adminBorders path{fill:none;stroke:#6b7280;stroke-width:.45;vector-effect:non-scaling-stroke}#lakes{pointer-events:none}#lakes path{fill:#fff;stroke:#fff;stroke-width:1px;pointer-events:none}#drawing path{fill:none;stroke-linecap:round;stroke-linejoin:round}
#cities{pointer-events:none}#cities circle{fill:#111827;stroke:#fff;stroke-width:1.2;vector-effect:non-scaling-stroke}#cities text{font:700 10.5px Inter,ui-sans-serif,system-ui,sans-serif;fill:#111827;stroke:#fff;stroke-width:2.4px;paint-order:stroke fill;stroke-linejoin:round}.loading{position:absolute;inset:0;display:grid;place-items:center;background:rgba(255,255,255,.88);z-index:4;font-weight:800;color:var(--muted)}.loading.hidden{display:none}
.country-selector-panel{margin:18px 0 6px;background:#fff;border:1px solid var(--line);border-radius:22px;padding:18px;display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,620px);gap:16px;align-items:end;box-shadow:0 12px 42px rgba(17,24,39,.05)}.country-selector-copy h2{margin:0 0 6px;font-size:26px;letter-spacing:-.04em}.country-selector-copy p{margin:0;color:var(--muted);line-height:1.45}.country-selector-controls{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:center}.country-selector-controls .button{white-space:nowrap}
.country-list,.notes{padding:28px 0 10px}.country-list h2,.notes h2{margin:0 0 10px;font-size:28px;letter-spacing:-.04em}.country-list p{color:var(--muted);margin:0 0 14px;max-width:780px;line-height:1.5}.country-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.country-grid a{background:#fff;border:1px solid var(--line);border-radius:14px;padding:13px 14px;text-decoration:none;font-weight:800}.country-grid a:hover{border-color:#aeb8c9;background:var(--soft)}.note-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.note-grid div{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;display:grid;gap:6px}.note-grid strong{font-size:16px}.note-grid span{color:var(--muted);line-height:1.45}.footer{border-top:1px solid var(--line);padding:18px 20px;display:flex;justify-content:space-between;color:var(--muted);font-size:14px;flex-wrap:wrap;gap:8px}
@media(max-width:920px){.intro,.tool-frame,.country-selector-panel{grid-template-columns:1fr}.toolbar{position:static}.note-grid,.country-grid{grid-template-columns:1fr}.topbar{align-items:flex-start}#mapSvg,.canvas-wrap{min-height:430px}.country-selector-controls{grid-template-columns:1fr}}@media(max-width:560px){.app-shell{width:min(100% - 16px,1480px);padding-top:16px}.topbar{padding:10px 12px}.top-actions{width:100%}.top-actions .button{flex:1}.tool-row{grid-template-columns:1fr}#mapSvg,.canvas-wrap{min-height:360px}}
