:root { color-scheme: dark; --ink:#eaf0df; --muted:#a7b8aa; --panel:#10221f; --line:#315046; --gold:#f0cd78; --sea:#0b3343; }
* { box-sizing:border-box; }
html { background:#081411; }
body { margin:0; color:var(--ink); background:radial-gradient(circle at 12% -8%,#24463b 0,transparent 35%),linear-gradient(180deg,#0b1915,#081411 70%); font:16px/1.5 Inter,Segoe UI,sans-serif; }
button,input { font:inherit; }
button { border:1px solid #49675c; border-radius:8px; color:var(--ink); background:#19362f; padding:.55rem .8rem; cursor:pointer; }
button:hover,button:focus-visible { border-color:var(--gold); background:#21453b; outline:none; }
.hero { max-width:1540px; margin:auto; padding:40px 34px 24px; display:flex; justify-content:space-between; gap:32px; align-items:end; }
.eyebrow { margin:0 0 7px; color:var(--gold); font-size:.72rem; font-weight:800; letter-spacing:.14em; }
h1,h2 { margin:0; font-family:Georgia,serif; font-weight:500; }
h1 { max-width:820px; font-size:clamp(2.3rem,5vw,4.6rem); line-height:.98; }
h2 { font-size:1.45rem; }
.lede { max-width:820px; margin:18px 0 0; color:#c7d3c8; font-size:1.05rem; }
.hero-status { min-width:280px; display:flex; gap:12px; padding:14px 16px; border:1px solid var(--line); border-radius:12px; background:#10241fdd; }
.hero-status small { display:block; color:var(--muted); margin-top:3px; }
.status-dot { width:10px; height:10px; margin-top:6px; flex:none; border-radius:50%; background:#d7a65d; box-shadow:0 0 14px #d7a65d88; }
.hero-status[data-state="ready"] .status-dot { background:#78c991; box-shadow:0 0 14px #78c99188; }
.hero-status[data-state="error"] .status-dot { background:#e2766d; }
.layout { max-width:1540px; margin:auto; padding:0 34px 30px; display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:18px; }
.map-panel,.panel { border:1px solid var(--line); border-radius:14px; background:linear-gradient(145deg,#112720f2,#0d1d19f2); box-shadow:0 18px 50px #0004; }
.map-panel { padding:20px; min-width:0; }
.panel { padding:18px; }
.panel-heading { display:flex; justify-content:space-between; gap:18px; align-items:center; }
.map-controls { display:flex; gap:7px; flex-wrap:wrap; justify-content:end; }
.map-help { margin:9px 0 13px; color:var(--muted); }
.canvas-shell { position:relative; overflow:hidden; border:1px solid #29493f; border-radius:11px; background:var(--sea); }
#world-map { display:block; width:100%; height:auto; aspect-ratio:1280/900; touch-action:none; cursor:crosshair; image-rendering:pixelated; }
#world-map[data-dragging="true"] { cursor:grabbing; }
.coordinate { position:absolute; right:12px; bottom:10px; padding:4px 8px; border-radius:6px; background:#071310cc; color:#d9e8dd; font:12px/1.2 Consolas,monospace; pointer-events:none; }
.layer-bar,.legend { display:flex; flex-wrap:wrap; gap:10px 18px; align-items:center; margin-top:13px; color:#c5d4c8; font-size:.86rem; }
.layer-bar label { cursor:pointer; }
.layer-bar input { accent-color:var(--gold); }
.legend { padding-top:12px; border-top:1px solid #29443c; color:var(--muted); }
.legend span { display:inline-flex; gap:7px; align-items:center; }
.legend i { width:11px; height:11px; display:inline-block; border-radius:50%; background:#ddd; }
.legend .participant { background:#f4e6a8; box-shadow:0 0 0 2px #513b68; }
.legend .resource { background:#f1cf68; }.legend .depleted { background:transparent; border:2px solid #829487; }.legend .construction { border-radius:2px; background:#d3945c; }.legend .record { border-radius:2px; transform:rotate(45deg); background:#d2a9ea; }
.sidebar { display:flex; flex-direction:column; gap:18px; }
dl { display:grid; grid-template-columns:auto 1fr; gap:8px 13px; margin:14px 0 0; }
dt { color:var(--muted); } dd { margin:0; text-align:right; overflow-wrap:anywhere; }
.inspector-panel { min-height:240px; }
#tile-inspector { margin-top:13px; color:#cbd8cf; }
#tile-inspector h3 { margin:0 0 8px; color:#fff2bd; font:600 1rem/1.3 Segoe UI,sans-serif; }
#tile-inspector ul { margin:9px 0 0; padding-left:19px; }
.counts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin-top:14px; }
.counts span { padding:10px; border-radius:8px; background:#17332c; color:var(--muted); }
.counts strong { display:block; color:var(--ink); font-size:1.15rem; }
.json-panel summary { cursor:pointer; color:#d8e5dc; }
.json-panel pre { max-height:360px; overflow:auto; white-space:pre-wrap; font:11px/1.45 Consolas,monospace; color:#adc2b3; }
footer { max-width:1540px; margin:auto; padding:4px 34px 34px; color:#91a69a; font-size:.86rem; }
footer p { margin:7px 0; }
@media (max-width:1000px) { .hero { align-items:start; flex-direction:column; }.hero-status { width:100%; }.layout { grid-template-columns:1fr; }.sidebar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }.json-panel { grid-column:1/-1; } }
@media (max-width:650px) { .hero,.layout,footer { padding-left:15px; padding-right:15px; }.hero { padding-top:25px; }.panel-heading { align-items:start; flex-direction:column; }.map-controls { justify-content:start; }.sidebar { display:flex; } }
@media (prefers-reduced-motion:reduce) { * { scroll-behavior:auto!important; } }
