:root { --ink:#1d2320; --muted:#5b655f; --line:#cfd6d1; --bg:#f4f6f3; --accent:#2f5d3a; --accent-ink:#fff; }
* { box-sizing: border-box; }
body { margin:0; font:15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color:var(--ink); background:var(--bg); }
.top { padding:.8rem 1.2rem .4rem; }
.top h1 { margin:0; font-size:1.35rem; letter-spacing:.02em; }
.top p { margin:.1rem 0 0; color:var(--muted); }
.layout { display:grid; grid-template-columns:minmax(300px,360px) 1fr; gap:1rem; padding:0 1.2rem 1.2rem; height:calc(100vh - 4.6rem); min-height:560px; }
.panel { background:#fff; border:1px solid var(--line); border-radius:8px; padding:1rem; overflow:auto; }
.panel section { margin-bottom:1.1rem; }
label, .label { display:block; font-weight:600; font-size:.85rem; margin:.5rem 0 .2rem; }
input[type=search], input[type=text], select { width:100%; padding:.45rem .55rem; border:1px solid var(--line); border-radius:6px; font:inherit; background:#fff; }
.row { display:flex; gap:.4rem; }
.row input { flex:1; }
button { font:inherit; padding:.45rem .9rem; border:1px solid var(--accent); border-radius:6px; background:#fff; color:var(--accent); cursor:pointer; }
button:hover { background:#eef5ef; }
button.primary { background:var(--accent); color:var(--accent-ink); }
button.primary:hover { background:#264c2f; }
button:disabled { opacity:.55; cursor:progress; }
button.link { border:0; background:none; padding:0; text-decoration:underline; color:var(--accent); }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:0 .6rem; }
.layers { display:grid; gap:.15rem; }
.layers label { font-weight:400; margin:0; display:flex; gap:.45rem; align-items:flex-start; font-size:.9rem; }
.legend-head { display:flex; justify-content:space-between; align-items:baseline; }
.legend-head .label { margin:.5rem 0 .2rem; }
.readout { color:var(--muted); font-size:.85rem; margin:.5rem 0 0; }
.actions { display:flex; flex-wrap:wrap; gap:.5rem; }
.status { flex-basis:100%; margin:.2rem 0 0; font-size:.88rem; min-height:1.3em; }
.status.error { color:#a21d1d; }
.status.warn { color:#8a5a00; }
.fine { color:var(--muted); font-size:.75rem; }
.results { list-style:none; margin:.4rem 0 0; padding:0; border:1px solid var(--line); border-radius:6px; max-height:11rem; overflow:auto; }
.results li button { display:block; width:100%; text-align:left; border:0; border-radius:0; border-bottom:1px solid var(--line); color:var(--ink); }
.results li:last-child button { border-bottom:0; }
.stage { display:flex; flex-direction:column; min-width:0; }
.tabs { display:flex; gap:.3rem; align-items:center; margin-bottom:.4rem; }
.tabs [role=tab] { border-color:var(--line); color:var(--ink); }
.tabs [role=tab][aria-selected=true] { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }
.zoom { margin-left:auto; display:flex; gap:.4rem; align-items:center; }
.zoom button { padding:.2rem .6rem; }
.pane { flex:1; min-height:0; border:1px solid var(--line); border-radius:8px; background:#fff; }
#map { z-index:0; }
#sheetpane { overflow:auto; background:#d9ddd9; text-align:center; padding:.8rem; }
#sheetpane img { background:#fff; box-shadow:0 2px 12px rgba(0,0,0,.25); max-width:none; }
.empty { color:var(--muted); margin-top:3rem; }
[hidden] { display:none !important; }
@media (max-width:820px) {
  .layout { grid-template-columns:1fr; height:auto; }
  .panel { overflow:visible; }
  .pane { min-height:70vh; }
}
