:root {
  --ink: #17201d;
  --muted: #66716d;
  --paper: #f7f4ed;
  --surface: #fffdf8;
  --line: #ded9ce;
  --brand: #8b482d;
  --brand-dark: #63311f;
  --accent: #1f6570;
  --accent-soft: #dcebed;
  --gold: #c69342;
  --danger: #a43a32;
  --success: #2b7151;
  --shadow: 0 18px 45px rgba(23, 32, 29, .12);
  --radius: 14px;
  --numeric-font: Inter, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
  font-family: Inter, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--paper); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(31, 101, 112, .28); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.mobile-only { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 5px; color: var(--brand); font-size: 10px; font-weight: 800; letter-spacing: .16em; }

.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 9px; padding: 8px 14px; text-decoration: none; font-weight: 700; cursor: pointer; }
.button-primary { background: var(--brand); color: white; }
.button-primary:hover { background: var(--brand-dark); }
.button-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.button-outline:hover { border-color: var(--brand); color: var(--brand); }
.button-quiet { min-height: 34px; background: transparent; color: var(--muted); padding: 5px 9px; }
.button-quiet:hover { background: #eee9df; color: var(--ink); }
.button-danger { background: #fff1ef; border-color: #efc0bb; color: var(--danger); }
.full-width { width: 100%; }
.text-button { border: 0; background: transparent; color: var(--accent); padding: 2px; font-size: 12px; font-weight: 700; cursor: pointer; }
.icon-button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: #eee9df; font-size: 25px; cursor: pointer; }

.brand-mark { display: grid; width: 54px; height: 54px; place-items: center; margin: 0 auto 20px; border-radius: 17px 17px 17px 4px; background: var(--brand); color: white; font-family: Georgia, serif; font-size: 27px; box-shadow: 0 10px 25px rgba(139, 72, 45, .26); }
.brand-mark-small { width: 38px; height: 38px; margin: 0; border-radius: 11px 11px 11px 3px; font-size: 19px; box-shadow: none; }

.auth-page { display: grid; min-height: 100vh; place-items: center; padding: 28px; background: radial-gradient(circle at 20% 15%, #e8d9c4 0, transparent 31%), radial-gradient(circle at 85% 80%, #dcebed 0, transparent 34%), var(--paper); }
.auth-card { width: min(100%, 430px); padding: 40px; border: 1px solid rgba(139, 72, 45, .14); border-radius: 22px; background: rgba(255, 253, 248, .96); box-shadow: var(--shadow); }
.auth-card-wide { width: min(100%, 560px); }
.auth-card h1 { margin: 0 0 8px; font-family: Georgia, "Yu Mincho", serif; font-size: 30px; }
.auth-card > .eyebrow, .auth-card > h1, .auth-card > .muted { text-align: center; }
.stack-form { display: grid; gap: 18px; margin-top: 24px; }
.stack-form label, .form-field { display: grid; gap: 7px; color: #414b47; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid #cbc6bc; border-radius: 9px; background: white; color: var(--ink); padding: 10px 11px; }
textarea { min-height: 110px; resize: vertical; }
label small { color: var(--muted); font-weight: 500; }
.alert { margin: 18px 0; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #f2eee7; font-size: 13px; line-height: 1.6; }
.alert-error { border-color: #e8b8b2; background: #fff1ef; color: #812e28; }
.alert-success { border-color: #afd4c1; background: #edf8f2; color: #245d43; }

.topbar { position: relative; z-index: 20; display: flex; height: 64px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255, 253, 248, .96); padding: 0 18px; backdrop-filter: blur(10px); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand strong { display: block; font-family: Georgia, "Yu Mincho", serif; font-size: 18px; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .15em; }
.topbar-actions { display: flex; align-items: center; gap: 5px; }
.topbar-actions form { margin: 0; }
.user-chip { margin-right: 5px; border-radius: 99px; background: #eee9df; padding: 7px 11px; font-size: 12px; font-weight: 700; }

.map-page { overflow: hidden; }
.map-shell { --filter-panel-width: 304px; --result-panel-width: 372px; display: grid; height: calc(100vh - 64px); grid-template-columns: var(--filter-panel-width) minmax(0, 1fr) var(--result-panel-width); overflow: hidden; transition: grid-template-columns .24s ease; }
.filter-panel, .result-panel { min-width: 0; overflow: hidden auto; background: var(--surface); }
.filter-panel { grid-column: 1; grid-row: 1; border-right: 1px solid var(--line); padding: 20px 18px 28px; }
.result-panel { grid-column: 3; grid-row: 1; border-left: 1px solid var(--line); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; }
.panel-heading h1 { margin: 0 0 16px; font-family: Georgia, "Yu Mincho", serif; font-size: 24px; }
.search-box { position: relative; display: flex; align-items: center; }
.search-box input { padding-right: 38px; background: #f4f1eb; }
.search-box span:not(.sr-only) { position: absolute; right: 12px; color: var(--muted); font-size: 20px; }
.filter-section { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.filter-section h2 { margin: 0 0 11px; font-size: 13px; letter-spacing: .02em; }
.filter-section h2 small { color: var(--muted); font-size: 10px; font-weight: 500; }
.filter-title { display: flex; align-items: center; justify-content: space-between; }
.area-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.area-button { min-height: 48px; border: 1px solid var(--line); border-radius: 9px; background: #f8f6f1; color: #5f4b3d; font-family: var(--numeric-font); font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .035em; line-height: 1; cursor: pointer; transition: border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease; }
@media (hover: hover) { .area-button:hover { border-color: var(--brand); background: #f2e9df; transform: translateY(-1px); } }
.area-button:focus-visible { outline: 3px solid rgba(31, 101, 112, .34); outline-offset: 2px; border-color: var(--accent); }
.area-button.active { border-color: var(--brand); background: var(--brand); color: white; box-shadow: 0 5px 12px rgba(139, 72, 45, .22); }
.area-button.active:hover { background: var(--brand-dark); }
.check-list { display: grid; gap: 7px; }
.check-list.compact { grid-template-columns: 1fr 1fr; }
.check-list label { display: flex; min-height: 34px; align-items: center; gap: 8px; color: #414b47; font-size: 12px; cursor: pointer; }
.check-list label.child { margin-left: 18px; }
.check-list input, .chip-list input { width: 16px; height: 16px; accent-color: var(--brand); }
.chip-list { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-list label { position: relative; }
.chip-list input { position: absolute; opacity: 0; }
.chip-list span { display: inline-flex; min-height: 30px; align-items: center; border: 1px solid var(--line); border-radius: 99px; background: white; padding: 5px 10px; color: #525c58; font-size: 11px; cursor: pointer; }
.chip-list input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: #154f57; font-weight: 700; }
.tag-filter-group { width: 100%; }
.tag-filter-group + .tag-filter-group { margin-top: 10px; }
.tag-filter-group h3 { margin: 0 0 6px; color: var(--muted); font-size: 10px; letter-spacing: .06em; }
.tag-filter-group > div { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-panel > .button { margin-top: 22px; }

.map-stage { position: relative; grid-column: 2; grid-row: 1; min-width: 0; background: #e9e4d9; }
.map-canvas { width: 100%; height: 100%; }
.map-canvas:empty { background: linear-gradient(135deg, rgba(31, 101, 112, .08), rgba(139, 72, 45, .07)), repeating-linear-gradient(45deg, transparent, transparent 22px, rgba(23, 32, 29, .035) 23px, rgba(23, 32, 29, .035) 24px); }
.map-message { position: absolute; top: 18px; left: 50%; z-index: 5; width: min(90%, 520px); transform: translateX(-50%); border: 1px solid #d5b887; border-radius: 10px; background: #fff8e9; padding: 11px 14px; color: #6b4a1e; box-shadow: var(--shadow); font-size: 12px; line-height: 1.5; }
.panel-controls { position: absolute; top: 18px; right: 70px; left: 16px; z-index: 6; display: grid; grid-template-columns: auto 1fr auto; align-items: start; pointer-events: none; }
.panel-toggle { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 7px; border: 1px solid rgba(23,32,29,.14); border-radius: 10px; background: rgba(255,255,255,.95); padding: 7px 11px; box-shadow: 0 3px 12px rgba(0,0,0,.14); color: var(--ink); font-size: 11px; font-weight: 800; cursor: pointer; pointer-events: auto; backdrop-filter: blur(8px); transition: border-color .16s ease, background-color .16s ease, color .16s ease, transform .16s ease; }
.panel-toggle-map-only { justify-self: center; }
.panel-toggle-right { justify-self: end; }
.panel-toggle-icon { font-family: var(--numeric-font); font-size: 20px; font-weight: 700; line-height: .8; }
.panel-toggle:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.panel-toggle:focus-visible { outline: 3px solid rgba(31,101,112,.34); outline-offset: 2px; }
.panel-toggle[aria-pressed="true"] { border-color: #173f43; background: #173f43; color: white; }
.panel-scrim { display: none; }
.map-tools { position: absolute; top: 18px; right: 16px; z-index: 6; display: grid; gap: 8px; }
.map-tool { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(0,0,0,.12); border-radius: 10px; background: white; box-shadow: 0 3px 12px rgba(0,0,0,.15); color: var(--ink); font-size: 19px; cursor: pointer; }
.map-count { position: absolute; left: 17px; bottom: 18px; display: flex; align-items: baseline; gap: 7px; border-radius: 10px; background: rgba(23, 32, 29, .86); padding: 8px 12px; color: white; backdrop-filter: blur(8px); }
.map-count strong { font-family: var(--numeric-font); font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; line-height: 1; }
.map-count span { font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.marker-pin { display: grid; width: 44px; height: 44px; place-items: center; border: 0; border-radius: 0; background: transparent; padding: 5px; box-shadow: none; color: var(--brand); cursor: pointer; rotate: 0deg; transform: none; }
.marker-pin img { display: block; width: 34px; height: 34px; max-width: 100%; max-height: 100%; object-fit: contain; rotate: 0deg; pointer-events: none; }
.marker-pin > span { display: grid; width: 34px; height: 34px; place-items: center; color: var(--brand); font-family: var(--numeric-font); font-size: 15px; font-weight: 900; line-height: 1; rotate: 0deg; pointer-events: none; }
.marker-pin:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.result-header { position: sticky; top: 0; z-index: 3; display: flex; align-items: flex-end; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255, 253, 248, .96); padding: 18px 18px 14px; backdrop-filter: blur(8px); }
.result-header h2 { margin: 0; font-family: Georgia, "Yu Mincho", serif; font-size: 19px; }
.result-header h2 span { font-family: var(--numeric-font); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.result-header-actions { display: flex; align-items: center; gap: 7px; }
.sort-control select { width: auto; min-width: 96px; padding: 7px 27px 7px 8px; font-size: 11px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 15px; }
.active-filters:not(:empty) { padding-top: 12px; }
.active-filter { border: 0; border-radius: 99px; background: #eee9df; padding: 5px 8px; color: #535d59; font-size: 10px; cursor: pointer; }
.spot-list { padding: 8px 10px 24px; }
.spot-card { display: grid; grid-template-columns: 54px 1fr auto; gap: 11px; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 14px 8px; text-align: left; cursor: pointer; }
.spot-card:hover, .spot-card.active { border-radius: 10px; background: #f3eee5; }
.spot-card.active { box-shadow: inset 3px 0 var(--brand); }
.spot-number { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; background: var(--category-color, #d9e8e8); color: #173f43; font-family: var(--numeric-font); font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .035em; line-height: 1; }
.spot-card h3 { margin: 1px 0 5px; font-size: 14px; line-height: 1.45; }
.spot-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.spot-card .distance { align-self: center; color: var(--brand); font-family: var(--numeric-font); font-size: 10px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.empty-state { padding: 60px 24px; color: var(--muted); text-align: center; }

.spot-dialog { width: min(92vw, 520px); max-height: 84vh; border: 0; border-radius: 20px; padding: 0; background: var(--surface); box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.spot-dialog::backdrop { background: rgba(20, 25, 23, .45); backdrop-filter: blur(2px); }
.dialog-close { position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; width: 38px; height: 38px; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); font-size: 22px; cursor: pointer; }
.detail-hero { min-height: 110px; background: linear-gradient(135deg, #d9e9e7, #ead7c6); padding: 26px 58px 22px 24px; }
.detail-hero .eyebrow { color: var(--accent); }
.detail-hero h2 { margin: 5px 0 0; font-family: Georgia, "Yu Mincho", serif; font-size: 25px; line-height: 1.35; }
.detail-body { padding: 22px 24px 26px; }
.detail-body p { line-height: 1.75; }
.detail-meta { display: grid; gap: 12px; margin: 18px 0; }
.detail-row { display: grid; grid-template-columns: 76px 1fr; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; font-size: 12px; line-height: 1.6; }
.detail-row strong { color: var(--muted); font-size: 11px; }
.detail-actions { display: flex; gap: 9px; }

/* Admin */
.admin-page { min-height: 100vh; }
.admin-shell { display: grid; min-height: calc(100vh - 64px); grid-template-columns: 220px minmax(0, 1fr); }
.admin-nav { border-right: 1px solid var(--line); background: #242d2a; padding: 20px 12px; color: white; }
.admin-nav h2 { margin: 4px 10px 18px; font-size: 12px; letter-spacing: .08em; opacity: .65; }
.admin-nav button, .admin-nav a { display: flex; width: 100%; align-items: center; border: 0; border-radius: 8px; background: transparent; padding: 10px 11px; color: #dfe6e3; text-align: left; text-decoration: none; font-size: 13px; cursor: pointer; }
.admin-nav button:hover, .admin-nav button.active, .admin-nav a:hover { background: rgba(255,255,255,.1); color: white; }
.admin-main { min-width: 0; padding: 26px; overflow: auto; }
.admin-view { display: none; }
.admin-view.active { display: block; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-heading h1 { margin: 0; font-family: Georgia, "Yu Mincho", serif; font-size: 28px; }
.section-heading p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.bulk-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); padding: 10px 11px; background: #fffdf9; font-size: 11px; }
.bulk-toolbar label { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; }
.bulk-toolbar input, .check-column input { width: auto; }
.bulk-toolbar .button { padding: 6px 9px; font-size: 11px; }
.check-column { width: 36px; }
.data-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 6px 22px rgba(23,32,29,.05); }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { background: #f0ece4; color: #535d59; padding: 10px 11px; text-align: left; white-space: nowrap; }
.data-table td { border-top: 1px solid var(--line); padding: 10px 11px; vertical-align: top; }
.data-table tr:hover td { background: #fbf8f2; }
.table-actions { display: flex; gap: 4px; }
.table-actions button { border: 0; background: transparent; color: var(--accent); padding: 3px; font-size: 11px; cursor: pointer; }
.status { display: inline-flex; border-radius: 99px; padding: 3px 8px; font-size: 10px; font-weight: 700; }
.status-published { background: #e2f2e8; color: #276448; }
.status-draft { background: #fff1d9; color: #805c1f; }
.status-hidden { background: #ecebea; color: #5c6260; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, .75fr); gap: 18px; }
.form-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 20px; }
.form-card h2 { margin: 0 0 16px; font-size: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.choice-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.choice-grid label { display: flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; font-size: 11px; }
.choice-grid input { width: 15px; height: 15px; }
.taxonomy-groups { display: grid; gap: 10px; }
.taxonomy-card { min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: 10px; background: #fffdf9; padding: 11px 12px 12px; }
.taxonomy-card legend { padding: 0 7px; color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.taxonomy-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.taxonomy-options label { display: flex; min-height: 40px; align-items: center; gap: 8px; border: 1px solid #e6e0d7; border-radius: 8px; background: white; padding: 7px 9px; color: #38423e; font-size: 11px; cursor: pointer; }
.taxonomy-options label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: #154f57; font-weight: 700; }
.taxonomy-options input { width: 17px; height: 17px; flex: 0 0 auto; accent-color: var(--accent); }
.taxonomy-options label:focus-within { outline: 3px solid rgba(31, 101, 112, .2); outline-offset: 1px; }
.legacy-category-note { margin: 8px 0 0; border-radius: 7px; background: #fff1d9; padding: 7px 9px; color: #6f501b; font-size: 10px; line-height: 1.5; }
.icon-picker { display: grid; gap: 10px; }
.icon-preview { display: flex; min-height: 82px; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 10px; background: #faf7f1; padding: 10px 12px; }
.icon-preview img { width: 60px; height: 60px; flex: 0 0 auto; object-fit: contain; }
.icon-preview strong, .icon-preview small { display: block; overflow-wrap: anywhere; }
.icon-preview strong { margin-bottom: 4px; color: var(--ink); font-size: 12px; }
.icon-preview small { color: var(--muted); line-height: 1.5; }
.icon-preview small.warning { color: #8a342e; font-weight: 700; }
.icon-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.icon-choice { display: grid; min-height: 84px; place-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 9px; background: white; padding: 7px 5px; color: var(--muted); cursor: pointer; transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease; }
.icon-choice:hover { border-color: var(--accent); background: var(--accent-soft); }
.icon-choice:focus-visible { outline: 3px solid rgba(31, 101, 112, .25); outline-offset: 2px; }
.icon-choice.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); color: #154f57; font-weight: 800; }
.icon-choice img { width: 46px; height: 46px; object-fit: contain; pointer-events: none; }
.icon-choice span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; pointer-events: none; }
.icon-picker-empty { margin: 0; border-radius: 8px; background: #fff1d9; padding: 10px; color: #805c1f; font-size: 11px; }
.admin-marker-icon { display: grid; width: 52px; height: 52px; place-items: center; cursor: grab; }
.admin-marker-icon img { width: 42px; height: 42px; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(0,0,0,.24)); }
.mini-map { height: 280px; border: 1px solid var(--line); border-radius: 10px; background: #e8e3d9; }
.translation-tabs { display: flex; gap: 5px; margin-bottom: 10px; }
.translation-tabs button { border: 1px solid var(--line); border-radius: 99px; background: white; padding: 5px 10px; font-size: 11px; cursor: pointer; }
.translation-tabs button.active { border-color: var(--accent); background: var(--accent-soft); }
.translation-panel { display: none; }
.translation-panel.active { display: grid; gap: 12px; }
.log-diff { max-width: 320px; white-space: pre-wrap; word-break: break-word; color: var(--muted); font-family: ui-monospace, monospace; font-size: 10px; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; max-width: 420px; border-radius: 10px; background: #24322d; padding: 12px 16px; color: white; box-shadow: var(--shadow); font-size: 12px; }
.toast.error { background: #842f29; }

@media (min-width: 861px) {
  body.filter-panel-collapsed .map-shell { --filter-panel-width: 0px; }
  body.result-panel-collapsed .map-shell { --result-panel-width: 0px; }
  body.filter-panel-collapsed .filter-panel, body.result-panel-collapsed .result-panel { display: none; }
}

@media (max-width: 1120px) {
  .map-shell { --filter-panel-width: min(28vw, 280px); --result-panel-width: min(32vw, 330px); }
  .panel-toggle-left .panel-toggle-label, .panel-toggle-right .panel-toggle-label { display: none; }
  .panel-toggle-left, .panel-toggle-right { width: 42px; padding-inline: 8px; }
}

@media (max-width: 860px) {
  .mobile-only { display: flex !important; }
  .topbar { height: 58px; padding: 0 11px; }
  .brand strong { font-size: 15px; }
  .brand small, .user-chip { display: none; }
  .brand-mark-small { width: 34px; height: 34px; }
  .topbar-actions .button { min-height: 32px; padding: 4px 7px; font-size: 11px; }
  .map-shell { position: relative; display: block; height: calc(100vh - 116px); height: calc(100dvh - 116px); overflow: hidden; }
  .filter-panel, .result-panel { position: absolute; top: 0; bottom: 0; z-index: 50; display: block; width: min(90vw, 380px); border: 0; box-shadow: var(--shadow); transition: transform .22s ease; }
  .filter-panel { left: 0; transform: translateX(-105%); padding-top: 22px; }
  .result-panel { right: 0; left: auto; transform: translateX(105%); }
  body.filters-open .filter-panel { transform: translateX(0); }
  body.results-open .result-panel { transform: translateX(0); }
  .map-stage { position: absolute; inset: 0; border: 0; }
  .panel-scrim { position: absolute; inset: 0; z-index: 45; width: 100%; border: 0; background: rgba(15,22,20,.4); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  body.filters-open .panel-scrim, body.results-open .panel-scrim { display: block; opacity: 1; pointer-events: auto; }
  .result-header { padding-top: 14px; }
  .result-header-actions .icon-button { flex: 0 0 38px; align-items: center; justify-content: center; }
  .panel-controls { top: 12px; right: auto; left: 12px; display: block; }
  .panel-toggle-left, .panel-toggle-right { display: none; }
  .panel-toggle-map-only { min-height: 44px; }
  .map-tools { top: 12px; right: 12px; }
  .map-tool { width: 44px; height: 44px; }
  .map-message { top: 68px; }
  .mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 35; height: 58px; align-items: stretch; border-top: 1px solid var(--line); background: var(--surface); padding-bottom: env(safe-area-inset-bottom); }
  .mobile-nav button { min-width: 0; min-height: 48px; flex: 1; border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
  .mobile-nav button.active { color: var(--brand); box-shadow: inset 0 3px var(--brand); }
  body.map-only .map-shell { height: calc(100vh - 58px); height: calc(100dvh - 58px); }
  body.map-only .mobile-nav { display: none !important; }
  .map-count { bottom: 14px; }
  .marker-pin { width: 48px; height: 48px; padding: 6px; }
  .marker-pin img, .marker-pin > span { width: 36px; height: 36px; }
  .area-button { min-height: 52px; font-size: 17px; }
  .check-list label { min-height: 42px; }
  .check-list input, .chip-list input { width: 19px; height: 19px; }
  .chip-list span { min-height: 40px; padding: 7px 12px; font-size: 12px; }
  .spot-card { min-height: 76px; padding-block: 12px; }
  .admin-shell { display: block; }
  .admin-nav { display: flex; overflow-x: auto; border-right: 0; padding: 8px; }
  .admin-nav h2 { display: none; }
  .admin-nav button, .admin-nav a { width: auto; min-width: max-content; }
  .admin-main { padding: 18px 12px 72px; }
  .admin-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .data-card { overflow-x: auto; }
  .data-table { min-width: 720px; }
  .taxonomy-options label { min-height: 44px; }
  .icon-choice { min-height: 88px; }
}

@media (max-width: 560px) {
  .auth-page { padding: 14px; }
  .auth-card { padding: 28px 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .spot-dialog { width: calc(100vw - 20px); }
  .taxonomy-options { grid-template-columns: 1fr; }
  .icon-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .icon-preview { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
