:root {
  --bg: #f2f3ef; --surface: #ffffff; --surface-2: #f7f8f4; --ink: #1d211b; --muted: #5d6558; --line: #d9ddd2;
  --accent: #4e6b2f; --accent-soft: #e5ebd8; --on-accent: #ffffff;
  --ok: #2e7d4f; --ok-soft: #dff0e5; --bad: #b3372b; --bad-soft: #f7e0dc; --warn: #9a6a00; --warn-soft: #f6ebcf;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131611; --surface: #1b1f18; --surface-2: #20251c; --ink: #e6e9e0; --muted: #9aa292; --line: #2f3529;
    --accent: #a3c46f; --accent-soft: #2a3320; --on-accent: #131611;
    --ok: #62c48f; --ok-soft: #1d3326; --bad: #f0806f; --bad-soft: #3a1f1b; --warn: #e2b54a; --warn-soft: #352c15;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--body); }
a { color: var(--accent); }
h1 { font-size: 1.5rem; margin: 0 0 4px; line-height: 1.2; }
h2 { font-size: 1.1rem; margin: 0 0 10px; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 16px 16px 64px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .9em; }
.small { font-size: .85rem; }
[hidden] { display: none !important; }

/* top bar */
.top { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--line); }
.bar { max-width: 1100px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav a { padding: 6px 10px; border-radius: 6px; text-decoration: none; color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.who { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
.role { background: var(--accent-soft); color: var(--accent); padding: 1px 8px; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.menu-btn { display: none; }
@media (max-width: 760px) {
  .menu-btn { display: inline-block; margin-left: auto; }
  .nav { display: none; flex-basis: 100%; flex-direction: column; }
  .nav.open { display: flex; }
  .who { flex-basis: 100%; justify-content: space-between; }
}

/* controls */
button, .btn { font: inherit; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 6px; padding: 7px 14px; cursor: pointer; text-decoration: none; display: inline-block; min-height: 36px; }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
button.danger { border-color: var(--bad); color: var(--bad); }
button.link { border: 0; background: none; color: var(--accent); padding: 0; min-height: 0; font-weight: 600; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { max-width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; min-height: 36px; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row > input[type="search"], .row > input.grow { flex: 1; min-width: 180px; }
label.field { display: grid; gap: 4px; font-size: .85rem; color: var(--muted); }

/* cards + tables */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-top: 14px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.stat b { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .85rem; }
.table-wrap { overflow-x: auto; margin-top: 8px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: .85rem; }
.chip.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.chip.bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.chip.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-top: 16px; }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--muted); padding: 8px 12px; }
.tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.two { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: 14px; }
.two > .card { margin-top: 0; }
pre.json { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin: 0; font: .82rem/1.45 var(--mono); white-space: pre-wrap; word-break: break-word; max-height: 360px; overflow: auto; }
.error { background: var(--bad-soft); color: var(--bad); border-radius: 8px; padding: 10px 14px; margin-top: 14px; }
.notice { background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 10px 14px; margin-top: 14px; }
.empty { color: var(--muted); padding: 16px 0; }
.perm-list { display: grid; gap: 6px; margin: 10px 0; }
.perm-list label { display: flex; gap: 8px; align-items: flex-start; }
.perm-list input { min-height: 0; margin-top: 4px; }

/* login */
.login { max-width: 420px; margin: 12vh auto 0; text-align: center; }
.login .card { padding: 28px 24px; }
.login p { color: var(--muted); }

/* stage 2: editing */
.okbar { background: var(--ok-soft); color: var(--ok); border-radius: 8px; padding: 10px 14px; margin-top: 14px; }
.reason { margin-top: 12px; }
.reason label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.small-btn { padding: 4px 10px; min-height: 30px; font-size: .85rem; }
.formgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-bottom: 12px; }
.form .row { margin-top: 4px; }
label.check { display: flex; gap: 8px; align-items: center; font-size: .9rem; grid-column: 1 / -1; }
label.check input { min-height: 0; }
.chip-x { border: 0; background: none; color: var(--bad); padding: 0 0 0 6px; min-height: 0; font-weight: 700; cursor: pointer; }
.add-row { margin-top: 10px; }
.chip.inline { margin-left: 8px; font-size: .75rem; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; max-width: min(560px, calc(100vw - 32px)); background: var(--ok); color: var(--on-accent); padding: 10px 16px; border-radius: 8px; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); font-weight: 600; }
.toast.bad { background: var(--bad); color: #fff; }

/* gear */
.gear-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: .92rem; }
.gear-list li.sub { padding-left: 16px; color: var(--muted); font-size: .85rem; }
h3 { font-size: .95rem; margin: 14px 0 6px; }
.edit-title { margin-top: 16px; }
.gear-row { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); padding: 10px 0; border-bottom: 1px solid var(--line); }
.gear-row:last-child { border-bottom: 0; }
.gear-row select, .item-row select, .formgrid select { width: 100%; }
.items { display: grid; gap: 8px; margin-top: 12px; }
/* item line: name/select | count | rounds per magazine | remove */
.item-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 96px 32px; gap: 8px; align-items: end; padding: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.item-row select { width: 100%; min-width: 0; }
.item-row .item-fixed { align-self: center; overflow-wrap: anywhere; }
.item-row .chip-x { align-self: center; justify-self: center; font-size: 1.2rem; padding: 0; width: 32px; height: 32px; }
label.mini { display: grid; gap: 2px; font-size: .75rem; color: var(--muted); }
label.mini input { width: 100%; }
.add-row select { flex: 1; min-width: 0; }
input.ammo { width: 90px; }
@media (max-width: 560px) {
  .item-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; }
  .item-row > :first-child { grid-column: 1 / -1; }
  .item-row .mini-spacer { display: none; }
  .item-row .chip-x { grid-column: 3; grid-row: 2; }
}
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; margin-top: 8px; border-top: 1px solid var(--line); }

/* shop editor */
.publish-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.shop-table td { vertical-align: middle; }
.shop-table input.price { width: 130px; }
.price-pair { display: flex; gap: 6px; }
.price-pair input.price { width: 110px; }
.row-hidden td { opacity: .55; }
.row-added td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.cond-cell { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; max-width: 360px; }
.cond-editor { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; width: 100%; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 12px; }
.check-grid label.check { grid-column: auto; font-size: .85rem; }
.cond-rank { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; gap: 6px; align-items: center; }
td.actions { white-space: nowrap; }
td.actions button + button { margin-left: 6px; }
button.small { font-size: .8rem; }

/* colour variants */
.variant-tr td { background: var(--surface-2); }
.variant-editor { display: grid; gap: 8px; }
.variant-row { display: grid; grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 1fr) minmax(150px, 1fr); gap: 8px 12px; align-items: end; padding: 8px 0; border-top: 1px solid var(--line); }
.variant-row select { width: 100%; }
.variant-cond { grid-column: 1 / -1; }
.variant-cond:empty { display: none; }
.small-btn.has-rules { border-color: var(--warn); color: var(--warn); }
@media (max-width: 700px) { .variant-row { grid-template-columns: 1fr; } }

/* shop inventory (public/inventory.js) */
.wrap.wide { max-width: 1680px; }
.inv-top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.inv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.inv-panel { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; height: calc(100vh - 200px); min-height: 520px; }
.inv-panel, .inv-panel > * { min-width: 0; } /* long chip row / grids must not widen the page */
.inv-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.inv-head h2 { margin: 0; }
.inv-panel .row > select.store-sel { flex: 1; min-width: 0; }
.inv-panel .tabs { margin-top: 0; }
.shop-info { margin: 0; }
.filters select { flex: 1; min-width: 140px; }
.inline-check { grid-column: auto; white-space: nowrap; }
.chip-row { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.chip-row .fchip { flex: none; }
.fchip { min-height: 30px; padding: 3px 10px; border-radius: 999px; font-size: .82rem; font-weight: 600; background: var(--surface-2); }
.fchip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.inv-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); grid-auto-rows: min-content; gap: 8px; padding: 2px 2px 8px; align-content: start; }
.tile { position: relative; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); transition: border-color .12s, box-shadow .12s; }
.tile:hover { border-color: var(--accent); }
.tile[draggable="true"] { cursor: grab; }
.tile-main { display: grid; grid-template-rows: 76px auto auto; gap: 4px; width: 100%; height: 100%; padding: 6px 6px 7px; border: 0; background: none; text-align: left; font-weight: 400; min-height: 0; border-radius: 8px; cursor: pointer; }
.tile-pic { display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, .07), transparent 70%), #2a2f26; border-radius: 6px; overflow: hidden; }
.tile-pic img { max-width: 100%; max-height: 72px; object-fit: contain; }
.tile-pic img.pic-wide { max-height: 76px; width: 100%; object-fit: cover; }
.pic-none { color: #9aa292; font-weight: 700; font-size: 1.4rem; }
.pic-none.big { font-size: 2.6rem; }
.tile-name { font-size: .8rem; line-height: 1.25; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; min-height: 2.5em; }
.tile-foot { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; font-size: .72rem; }
.tile-price { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: auto; }
.tile-price.warn { color: var(--warn); font-weight: 600; }
.tile-act { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; min-height: 0; padding: 0; border-radius: 999px; font-size: 1.1rem; line-height: 1; background: var(--accent); border-color: var(--accent); color: var(--on-accent); opacity: 0; transition: opacity .12s; }
.tile-act.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.tile:hover .tile-act, .tile:focus-within .tile-act { opacity: 1; }
@media (hover: none) { .tile-act { opacity: .9; } }
.tile.in-shop { border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.tile.no-fit { opacity: .45; }
.tile.is-hidden { opacity: .5; border-style: dashed; }
.tile.is-added { box-shadow: inset 0 3px 0 var(--ok); }
.badge { display: inline-block; border-radius: 4px; padding: 0 5px; font-size: .7rem; font-weight: 700; background: var(--line); color: var(--ink); line-height: 1.5; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.dlc { background: #2d3a55; color: #cfdcff; }
.badge.arma { background: var(--warn-soft); color: var(--warn); }
.badge.muted { background: none; color: var(--muted); }
.more-btn { grid-column: 1 / -1; }
.drop-hint { display: none; position: absolute; inset: 0; border: 3px dashed var(--accent); border-radius: 10px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-weight: 700; align-items: center; justify-content: center; text-align: center; pointer-events: none; font-size: 1.05rem; padding: 16px; }
.drop-hint.remove { border-color: var(--bad); color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }
body.dragging-catalog .inv-panel.shop .drop-hint.add, body.dragging-shop .inv-panel.catalog .drop-hint.remove { display: flex; opacity: .55; }
.inv-panel.drop-on .drop-hint { opacity: 1 !important; }
.tabs button.drop-on { background: var(--accent-soft); }

/* detail sheet */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .25); z-index: 30; }
.sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); z-index: 31; background: var(--surface); border-left: 1px solid var(--line); box-shadow: -8px 0 32px rgba(0, 0, 0, .25); overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.sheet-head { display: grid; grid-template-columns: 120px minmax(0, 1fr) 36px; gap: 12px; align-items: start; }
.sheet-pic { width: 120px; height: 120px; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, .08), transparent 70%), #2a2f26; border-radius: 8px; overflow: hidden; }
.sheet-pic img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sheet-pic.wide img { object-fit: cover; height: 100%; }
.sheet-title h2 { margin: 0 0 2px; font-size: 1.15rem; overflow-wrap: anywhere; }
.sheet-title .chips { margin-top: 6px; gap: 4px; }
.sheet-close { width: 36px; height: 36px; padding: 0; font-size: 1.4rem; line-height: 1; }
.sheet-sec { border-top: 1px solid var(--line); padding-top: 10px; }
.sheet-sec h3 { margin: 0 0 8px; }
.sheet-sec.highlight { background: var(--accent-soft); border: 0; border-radius: 8px; padding: 10px 12px; }
.sheet-sec .row { align-items: end; }
.sheet .price { width: 140px; }
.shop-sec { display: grid; gap: 8px; padding: 8px 0; }
.shop-sec + .shop-sec { border-top: 1px dashed var(--line); }
.shop-sec.is-hidden { opacity: .7; }
.row.between { justify-content: space-between; }
.mini-label { font-size: .75rem; color: var(--muted); }
.shop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 320px; overflow-y: auto; }
.shop-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 6px; font-size: .88rem; }
.shop-list li.current { background: var(--accent-soft); }
.shop-list li .link { text-align: left; font-weight: 500; overflow-wrap: anywhere; }
.sheet .variant-row { grid-template-columns: 1fr 1fr; }
.sheet .variant-name { grid-column: 1 / -1; }

@media (max-width: 900px) {
  .inv { grid-template-columns: 1fr; }
  .inv-panel { height: auto; min-height: 0; }
  .inv-grid { max-height: 60vh; }
  .sheet-head { grid-template-columns: 88px minmax(0, 1fr) 36px; }
  .sheet-pic { width: 88px; height: 88px; }
}

/* settings page (public/settings.js) */
.set-group h2 { display: flex; align-items: center; gap: 8px; }
.set-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 110px; gap: 8px 16px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.set-row:first-of-type { border-top: 0; }
.set-row.changed { box-shadow: inset 3px 0 0 var(--warn); padding-left: 10px; }
.set-label .badge { margin-left: 8px; }
.set-input { display: flex; gap: 8px; align-items: center; }
.set-num { width: 150px; }
.set-pair { display: flex; gap: 8px; flex-wrap: wrap; }
.set-pair .set-num { width: 130px; }
.set-reset { text-align: right; }
.set-jump { margin-top: 10px; }
.set-jump .fchip { text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; }
@media (max-width: 700px) {
  .set-row { grid-template-columns: 1fr; }
  .set-reset { text-align: left; }
}

/* blueprints page (public/blueprints.js) */
.bp-grid { max-height: none; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.bp-grid .tile-main { grid-template-rows: 92px auto auto; padding: 8px; }
.bp-grid .tile-pic img { max-height: 86px; }
.picker { position: relative; }
.picker input { width: 100%; }
.picker-list { display: grid; gap: 4px; max-height: 300px; overflow-y: auto; margin-top: 6px; }
.picker-list:empty { display: none; }
.picker-item { display: flex; gap: 10px; align-items: center; text-align: left; font-weight: 500; padding: 6px 10px; min-height: 44px; }
.picker-item img { width: 56px; height: 36px; object-fit: contain; background: #2a2f26; border-radius: 4px; flex: none; }
.pic-none.small { font-size: .9rem; width: 56px; text-align: center; flex: none; }
.sheet { width: min(620px, 100vw); padding: 20px; gap: 16px; }
.sheet-sec { padding-top: 14px; display: grid; gap: 8px; }
.sheet .field input { width: 100%; }
.unlock-list { display: grid; gap: 6px; }
.unlock-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 32px; gap: 10px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.unlock-row.broken { border-color: var(--bad); }
.unlock-pic { width: 64px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: #2a2f26; border-radius: 4px; overflow: hidden; }
.unlock-pic img { max-width: 100%; max-height: 100%; object-fit: contain; }
.unlock-name { overflow-wrap: anywhere; font-size: .92rem; line-height: 1.35; }
.unlock-edit:empty { display: none; }
.recipe-editor { display: grid; gap: 10px; padding: 12px; border: 1px dashed var(--accent); border-radius: 8px; margin: 4px 0 10px; }
.mat-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px 32px; gap: 8px; align-items: center; }
.mat-row select { width: 100%; }
.small-num { width: 100px !important; }
.drop-rows { display: grid; gap: 6px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.drop-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px minmax(0, 1fr); gap: 10px; align-items: center; font-size: .92rem; min-height: 40px; }
.items .drop-row { grid-template-columns: 64px minmax(0, 1fr) 100px 120px 32px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.zone-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.zone-layout > .card { margin-top: 0; }
/* flex column + flex: none: the buttons must never shrink in the scrolling list (text ran over the edge) */
.zone-list { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 200px); overflow-y: auto; padding-right: 4px; }
.zone-btn { flex: none; display: grid; gap: 4px; text-align: left; font-weight: 400; padding: 10px 12px; line-height: 1.35; }
.zone-btn b { font-size: 1rem; }
.zone-btn.active { border-color: var(--accent); background: var(--accent-soft); }
.zone-edit { display: grid; gap: 12px; }
.zone-edit h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.copy-card { background: var(--surface-2); margin-top: 4px; }
.copy-card .check-grid { gap: 6px 16px; }
@media (max-width: 900px) { .zone-layout { grid-template-columns: 1fr; } .zone-list { max-height: 45vh; } }
