/* Layout: the game's own olive state map on the left, a parchment-and-wood planning ledger on the right (stacks under the map on phones). */
:root {
  --bg: #eadcc4;
  --panel: #fbf3e5;
  --raise: #ffffff;
  --ink: #3a2816;
  --muted: #8a6f52;
  --line: #e2cfb0;
  --wood: #6f4a2c;
  --wood-hi: #8a5e39;
  --wood-ink: #fff4e2;
  --accent: #e8912d;
  --accent-ink: #2a1806;
  --mine: #2f86d6;
  --enemy: #d9483b;
  --good: #3e8b3a;
  --warn: #b26a12;
  --bad: #c0392b;
  --map-out: #2c3420;
  --f-display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --f-body: "Nunito", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --r: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17110b; --panel: #221810; --raise: #2c2016; --ink: #f3e5cc; --muted: #b59b7b; --line: #463320;
    --wood: #4f331d; --wood-hi: #654226; --wood-ink: #fff0d8; --accent: #f2a345; --accent-ink: #1f1206;
    --mine: #5aa9ec; --enemy: #ef6b5c; --good: #6fc06b; --warn: #e3a24c; --bad: #ef6b5c; --map-out: #161b10;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 500 15px/1.45 var(--f-body); -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; font-weight: 400; }
.eyebrow { font: 800 11px/1.2 var(--f-body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.mono { font-family: var(--f-mono); font-size: 12.5px; }
.muted { color: var(--muted); }

/* buttons + fields */
.btn { border: 1px solid var(--line); background: var(--raise); border-radius: 10px; padding: 8px 14px; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { border-color: var(--wood-hi); }
.btn.primary { background: linear-gradient(#f6a640, #e0841f); border-color: #b9671a; color: var(--accent-ink); box-shadow: inset 0 -2px 0 rgba(0,0,0,0.15); }
.btn.blue { background: linear-gradient(#4a9de4, #2f7fca); border-color: #23649f; color: #fff; }
.btn.danger { color: var(--bad); }
.btn.danger.armed { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.small { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.big { padding: 12px 18px; font-size: 16px; width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--wood-hi); font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.field { display: grid; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field label, .field legend, .lbl { font: 800 11px/1.2 var(--f-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 0; }
input[type="text"], input[type="password"], input[type="number"], textarea, select { width: 100%; min-width: 0; border: 1px solid var(--line); background: var(--raise); border-radius: 10px; padding: 9px 11px; }
textarea { resize: vertical; min-height: 64px; }
.formerr { color: var(--bad); font-weight: 700; margin: 0; min-height: 0; }
.formerr:empty { display: none; }
.ok { color: var(--good); font-weight: 800; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 0.8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* boot + onboarding */
.boot, .onb { min-height: 100%; display: grid; place-items: center; padding-inline: 16px; padding-block: 24px; background: #3f4a26 url("assets/map/bigmapbg.jpg") center / 520px; }
.boot-card { display: flex; align-items: center; gap: 12px; background: var(--panel); padding: 14px 18px; border-radius: var(--r); font-weight: 800; }
.onb-card { width: min(560px, 100%); background: var(--panel); border-radius: 16px; border: 3px solid var(--wood); box-shadow: 0 18px 50px rgba(0,0,0,0.35); overflow: hidden; }
.onb-card > .eyebrow { display: block; background: var(--wood); color: var(--wood-ink); padding: 10px 20px 0; opacity: 0.85; }
.onb-card h1 { background: var(--wood); color: var(--wood-ink); font: 400 30px/1.1 var(--f-display); padding: 2px 20px 14px; text-wrap: balance; letter-spacing: 0.01em; }
.onb-card form { padding: 18px 20px 20px; display: grid; gap: 16px; }
.lead { margin: 0; color: var(--muted); font-weight: 600; }
.switch { margin: 0; text-align: center; color: var(--muted); font-weight: 600; }
.seg2 { display: flex; margin: 16px 20px 0; border: 2px solid var(--wood); border-radius: 12px; overflow: hidden; }
.seg2 button { flex: 1; border: 0; background: var(--raise); padding: 10px; font: 400 17px/1 var(--f-display); letter-spacing: 0.02em; color: var(--muted); cursor: pointer; }
.seg2 button[aria-selected="true"] { background: var(--wood); color: var(--wood-ink); }
.flaggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.flagopt { display: grid; justify-items: center; gap: 4px; padding: 10px 6px 8px; border: 2px solid var(--line); background: var(--raise); border-radius: 12px; cursor: pointer; text-align: center; }
.flagopt:hover { border-color: var(--wood-hi); }
.flagopt[aria-checked="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--raise)); }
.flagopt img { width: 46px; height: 55px; }
.flagopt .t { font: 700 13px var(--f-mono); }
.flagopt .n { font-size: 12px; color: var(--muted); line-height: 1.2; overflow-wrap: anywhere; }

/* app shell */
.app { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; padding-inline: 16px; padding-block: 10px 16px; }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; min-width: 0; }
.brand { flex: 1 1 260px; min-width: 0; display: grid; }
.brand h1 { font: 400 28px/1.05 var(--f-display); letter-spacing: 0.01em; text-wrap: balance; }
.who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 4px 12px 4px 6px; font-weight: 800; font-size: 14px; }
.chip img { width: 22px; height: 26px; }
.chip.leader { background: var(--wood); color: var(--wood-ink); border-color: var(--wood); padding-left: 12px; }
button.chip { cursor: pointer; }
button.chip:hover { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.subnav { margin-bottom: -4px; }
.selbar { position: absolute; left: 10px; right: 10px; bottom: 10px; display: none; align-items: center; gap: 10px; background: #fbf3e5; color: #3a2816; border: 2px solid #6f4a2c; border-radius: 12px; padding: 6px 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.35); z-index: 2; }
.selbar img { width: 36px; height: 36px; object-fit: contain; }
.selbar .sb-t { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.selbar .sb-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selbar .sb-t span { font-size: 12.5px; color: #65503a; font-weight: 700; }
.selbar .sb-x { border: 0; background: none; font: 800 22px/1 var(--f-body); color: #65503a; cursor: pointer; padding: 4px 6px; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--muted); }
.live .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); }
.live[data-s="off"] .dot { background: var(--bad); }

.main { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 10px; min-height: 0; }
.mapwrap { position: relative; min-height: 0; overflow: hidden; background: var(--map-out); border: 3px solid var(--wood); border-radius: var(--r); }
#map { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#map.dragging { cursor: grabbing; }
.mapctl { position: absolute; top: 10px; right: 10px; display: grid; gap: 6px; }
.mapctl button, .goto button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid #c9b48f; background: #fbf3e5; color: #3a2816; cursor: pointer; display: grid; place-items: center; font: 800 20px/1 var(--f-body); box-shadow: 0 2px 0 rgba(0,0,0,0.25); }
.mapctl svg, .goto svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.goto { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.goto input { width: 150px; height: 38px; border-radius: 10px; border: 1px solid #c9b48f; background: #fbf3e5; color: #3a2816; padding: 0 10px; font: 600 13px var(--f-mono); }
.layers { position: absolute; top: 10px; right: 58px; width: 250px; background: #fbf3e5; color: #3a2816; border: 1px solid #c9b48f; border-radius: 12px; padding: 12px; display: grid; gap: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); z-index: 3; }
.layers label { display: grid; gap: 4px; font: 800 11px/1.2 var(--f-body); letter-spacing: 0.1em; text-transform: uppercase; color: #65503a; }
.layers select { background: #fff; color: #3a2816; border-color: #e2cfb0; font: 600 14px var(--f-body); letter-spacing: 0; text-transform: none; }
.legend { position: absolute; left: 10px; bottom: 40px; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 20px); pointer-events: none; }
.legend span { display: inline-flex; align-items: center; gap: 6px; background: rgba(28, 22, 12, 0.78); color: #fff4e2; border-radius: 999px; padding: 3px 9px 3px 5px; font: 700 12px var(--f-body); }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend i.stripe { background: repeating-linear-gradient(135deg, #fff4e2 0 3px, transparent 3px 6px); }
.readout { position: absolute; left: 10px; bottom: 10px; font: 600 12px/1 var(--f-mono); background: rgba(28, 22, 12, 0.78); color: #fff4e2; padding: 6px 8px; border-radius: 6px; pointer-events: none; }
.tip { position: absolute; pointer-events: none; background: #fbf3e5; color: #3a2816; border: 1px solid #c9b48f; border-radius: 10px; padding: 8px 10px; font-size: 13px; line-height: 1.35; box-shadow: 0 8px 24px rgba(0,0,0,0.3); max-width: 260px; z-index: 2; }
.tip b { font-weight: 800; }

/* panel */
.panel { min-height: 0; overflow-y: auto; background: var(--panel); border: 3px solid var(--wood); border-radius: var(--r); display: flex; flex-direction: column; }
.tabs { display: flex; flex-wrap: wrap; position: sticky; top: 0; z-index: 1; background: var(--wood); }
.tabs button { flex: 1 1 auto; border: 0; background: none; color: color-mix(in srgb, var(--wood-ink) 70%, transparent); padding: 11px 8px 9px; font: 400 15.5px/1 var(--f-display); letter-spacing: 0.03em; border-bottom: 4px solid transparent; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; justify-content: center; }
.tabs button[aria-selected="true"] { color: var(--wood-ink); border-bottom-color: var(--accent); background: var(--wood-hi); }
.tabs .count { font: 800 11px/1 var(--f-body); background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 3px 6px; }
.pane { padding: 16px; display: grid; gap: 18px; align-content: start; }
.pane h2 { font: 400 22px/1.1 var(--f-display); letter-spacing: 0.01em; text-wrap: balance; }
.pane h3 { font: 800 11px/1.2 var(--f-body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.pane section { min-width: 0; }
.hint { color: var(--muted); margin: 6px 0 0; font-size: 14px; font-weight: 600; }
.banner { border-radius: 10px; padding: 10px 12px; font-weight: 700; font-size: 14px; background: color-mix(in srgb, var(--warn) 14%, var(--raise)); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
.banner.closed { background: color-mix(in srgb, var(--bad) 12%, var(--raise)); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button { border: 1px solid var(--line); background: var(--raise); border-radius: 999px; padding: 5px 12px; font-weight: 800; font-size: 13px; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--wood); color: var(--wood-ink); border-color: var(--wood); }

/* zone request cards */
.cards { display: grid; gap: 10px; }
.zcard { border: 1px solid var(--line); background: var(--raise); border-radius: 12px; overflow: hidden; }
.zcard.contested { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.zhead { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 10px 12px; cursor: pointer; }
.zhead img { width: 44px; height: 44px; object-fit: contain; grid-row: span 2; }
.zhead .nm { font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zhead .sub { font-size: 12.5px; color: var(--muted); font-weight: 600; grid-column: 2; }
.zhead .pill { grid-row: span 2; }
.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 3px 9px; font: 800 12px/1 var(--f-body); white-space: nowrap; }
.pill.lv { background: #2a1e10; color: #fff4e2; font-size: 13px; }
.pill.contest { background: var(--accent); color: var(--accent-ink); }
.pill.pending { background: color-mix(in srgb, var(--warn) 18%, var(--raise)); color: var(--warn); }
.pill.approved { background: color-mix(in srgb, var(--good) 18%, var(--raise)); color: var(--good); }
.pill.bad { background: color-mix(in srgb, var(--bad) 16%, var(--raise)); color: var(--bad); }
.pill.good { background: color-mix(in srgb, var(--good) 16%, var(--raise)); color: var(--good); }
.pill.info { background: color-mix(in srgb, var(--mine) 16%, var(--raise)); color: var(--mine); }
.banner.calm { background: color-mix(in srgb, var(--good) 12%, var(--raise)); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.seclist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; }
.seclist li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.seclist .when { color: var(--muted); font: 500 11.5px/1.35 var(--f-mono); }
.seclist .what { min-width: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.seclist .what b { overflow-wrap: anywhere; }
.seclist .src { flex-basis: 100%; color: var(--muted); font: 500 12px var(--f-mono); overflow-wrap: anywhere; }
.seclist .src i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.pill.declined, .pill.withdrawn { background: color-mix(in srgb, var(--muted) 16%, var(--raise)); color: var(--muted); }
.reqs { list-style: none; margin: 0; padding: 0 12px 10px; display: grid; gap: 8px; }
.req { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; grid-template-areas: 'f n a' 'f m m'; border-top: 1px dashed var(--line); padding-top: 8px; }
.req img, .req > span:first-child { width: 26px; height: 31px; grid-area: f; }
.req .rn { grid-area: n; }
.req .acts { grid-area: a; }
.req .rn { font-weight: 800; min-width: 0; overflow-wrap: anywhere; }
.req .rn .t { font-family: var(--f-mono); font-size: 13px; }
.req .rm { grid-area: m; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.req .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.zfoot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 60%, var(--raise)); font-size: 13px; color: var(--muted); font-weight: 600; }
.decisions { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.decisions li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: baseline; }
.decisions .when { color: var(--muted); font-size: 12px; }

/* zone detail */
.zonehead { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 4px 14px; align-items: center; }
.zonehead img { width: 76px; height: 76px; object-fit: contain; grid-row: span 3; }
.zonehead .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
dl.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: 14px; }
dl.facts dt { color: var(--muted); font-weight: 700; }
dl.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.zchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--raise); border-radius: 999px; padding: 3px 10px 3px 4px; font-size: 13px; font-weight: 700; cursor: pointer; }
.zchip:hover { border-color: var(--wood-hi); }
.zchip .sw { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--raise); box-shadow: 0 0 0 1px var(--line); }
.zchip .l { font: 700 11px var(--f-mono); color: var(--muted); }
.ask { border: 2px solid var(--accent); border-radius: 12px; padding: 12px; display: grid; gap: 10px; background: color-mix(in srgb, var(--accent) 7%, var(--raise)); }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; flex: none; }

/* alliances */
.alist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.arow { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; background: var(--raise); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.arow img { width: 38px; height: 46px; grid-row: span 2; }
.arow .nm { font-weight: 800; min-width: 0; overflow-wrap: anywhere; }
.arow .nm .t { font-family: var(--f-mono); font-size: 13.5px; }
.arow .sub { font-size: 12.5px; color: var(--muted); font-weight: 600; grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.arow .end { grid-row: span 2; display: flex; gap: 6px; align-items: center; }
.arow.mine { border-color: var(--mine); box-shadow: inset 4px 0 0 var(--mine); }
.editor { border: 2px solid var(--accent); border-radius: 12px; padding: 12px; display: grid; gap: 12px; background: var(--raise); }
.row2 { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; }
.picks { display: flex; flex-wrap: wrap; gap: 6px; }
.picks button { border: 2px solid transparent; background: var(--panel); border-radius: 8px; padding: 2px; cursor: pointer; display: grid; place-items: center; }
.picks button[aria-pressed="true"] { border-color: var(--accent); }
.picks .col { width: 28px; height: 28px; border-radius: 6px; }
.picks img { width: 34px; height: 34px; object-fit: contain; }
.picks.em img { background: #6f4a2c; border-radius: 6px; padding: 3px; }
.preview { display: flex; align-items: center; gap: 12px; }
.preview img { width: 64px; height: 77px; }

table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
table.t th { font: 800 11px/1.2 var(--f-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
table.t td { padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t td.num, table.t th.num { text-align: right; font-family: var(--f-mono); font-size: 12.5px; }
table.t td.zero { color: var(--line); }
.tablewrap { overflow-x: auto; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 700; }
.toggle input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); }
.loglist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; max-height: 420px; overflow-y: auto; }
.loglist li { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.loglist .when { color: var(--muted); font: 500 11.5px var(--f-mono); }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: grid; place-items: center; padding: 16px; z-index: 20; }
.pophead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -4px -4px 0 0; }
.pophead b { font: 400 17px/1 var(--f-display); letter-spacing: 0.02em; }
.pophint { margin: 0; font-size: 13px; color: #65503a; font-weight: 600; }
#dlPop .btn { display: grid; justify-items: start; gap: 2px; text-align: left; width: 100%; font-size: 15px; }
/* the map pop-overs always use the light game palette, whatever the site theme */
#dlPop .btn:not(.primary) { background: #ffffff; color: #3a2816; border: 1px solid #c9b48f; }
#dlPop .btn:not(.primary):hover { border-color: #6f4a2c; background: #f6ead6; }
#dlPop .btn.primary { color: #2a1806; }
#dlPop .fmtnote { font: 600 12px var(--f-body); opacity: 0.8; }
.popx { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 1px solid #c9b48f; background: #fff; color: #3a2816; display: grid; place-items: center; cursor: pointer; }
.popx:hover { border-color: #6f4a2c; background: #f6ead6; }
.popx svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.modal-card > .popx { position: absolute; top: 10px; right: 10px; }
.modal-card { position: relative; background: var(--panel); border: 3px solid var(--wood); border-radius: var(--r); padding: 16px; width: min(680px, 100%); max-height: 90vh; overflow: auto; display: grid; gap: 12px; }
.modal-card h2 { font: 400 22px/1.1 var(--f-display); padding-right: 44px; }
.modal-card img { width: 100%; border-radius: 8px; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #2a1e10; color: #fff4e2; padding: 10px 16px; border-radius: 10px; font-weight: 700; z-index: 30; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }

@media (max-width: 920px) {
  .selbar:not([hidden]) { display: flex; }
  .readout { display: none; }
  .legend { bottom: 10px; }
  html, body { height: auto; }
  .app { height: auto; }
  .main { grid-template-columns: minmax(0, 1fr); }
  .mapwrap { height: 62vh; min-height: 340px; }
  .panel { overflow: visible; }
  .tabs { position: static; }
  .brand h1 { font-size: 24px; }
}
@media (max-width: 480px) {
  .goto input { width: 112px; }
  .layers { right: 10px; top: 58px; width: calc(100% - 20px); }
  .onb-card h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
