:root {
  --bg: #f4f7f1;
  --panel: #ffffff;
  --ink: #18201c;
  --muted: #667065;
  --accent: #0d7d25;
  --accent-dark: #075d1a;
  --accent-soft: #e7f8e9;
  --line: #dfe7dc;
  --shadow: 0 18px 45px rgba(21, 44, 26, 0.11);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #dcefe0 0, transparent 32rem), var(--bg);
}
.site-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}
.brand-mark { position: relative; width: 72px; height: 48px; flex: 0 0 auto; }
.brand-mark span { position: absolute; bottom: 0; width: 0; height: 0; border-left: 22px solid transparent; border-right: 22px solid transparent; border-bottom: 44px solid var(--accent); }
.brand-mark span:nth-child(1) { left: 0; transform: scale(.8); transform-origin: bottom; }
.brand-mark span:nth-child(2) { left: 20px; border-bottom-color: #13992f; }
.brand-mark span:nth-child(3) { left: 42px; transform: scale(.65); transform-origin: bottom; border-bottom-color: #0b691f; }
.site-header h1 { margin: 0 0 4px; font-size: clamp(2rem, 4vw, 3.3rem); letter-spacing: -0.055em; line-height: .95; }
.site-header p { margin: 0; color: var(--muted); max-width: 800px; }
.app-layout { display: grid; grid-template-columns: minmax(380px, 1.25fr) minmax(280px, .56fr) minmax(420px, 1fr); gap: 18px; padding: 18px; min-height: calc(100vh - 106px); }
.panel { background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 18px; overflow: hidden; }
.panel h2 { margin: 0 0 14px; font-size: 1.1rem; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#map, #preview { width: 100%; height: 70vh; min-height: 500px; border-radius: 16px; overflow: hidden; background: #eef3ec; }
#preview { background: linear-gradient(145deg, #ffffff, #edf4ec); }
.preview-help { margin-bottom: 10px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); color: #075d1a; border: 1px solid #bce5c4; font-size: .92rem; }
.controls-panel label { display: grid; gap: 8px; margin-bottom: 18px; font-weight: 750; }
.controls-panel small { font-weight: 500; color: var(--muted); }
input, select, button { font: inherit; }
input[type="number"], select { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: #fff; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.primary-btn, .secondary-btn, .ghost-btn { width: 100%; border: 0; border-radius: 999px; padding: 13px 16px; cursor: pointer; font-weight: 850; }
.primary-btn { background: var(--accent); color: #fff; box-shadow: 0 10px 24px rgba(13,125,37,.22); }
.primary-btn:hover { background: var(--accent-dark); }
.primary-btn:disabled { opacity: .6; cursor: wait; }
.secondary-btn { margin-top: 10px; background: #17241b; color: #fff; }
.secondary-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ghost-btn { width: auto; background: #f3f7f2; color: var(--ink); padding: 9px 13px; border: 1px solid var(--line); }
.hint { color: var(--muted); font-size: 0.9rem; }
.notice, .model-card { margin-top: 18px; padding: 14px; border-radius: 16px; background: var(--accent-soft); color: #0b5519; border: 1px solid #c7eccc; font-size: 0.92rem; line-height: 1.45; }
.model-card { background: #fff; color: var(--ink); border-color: var(--line); }
.inline-check { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--muted); }
.hint.error { color: #9f3a2f; font-weight: 700; }
.leaflet-control-layers-expanded { border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 8px 22px rgba(34, 28, 18, 0.12); }
@media (max-width: 1220px) { .app-layout { grid-template-columns: 1fr; } #map, #preview { height: 540px; min-height: 420px; } }
@media (max-width: 620px) { .site-header { align-items: flex-start; } .brand-mark { display:none; } .app-layout { padding: 10px; } }
