:root {
  color-scheme: light;
  --ink: #171a1f;
  --muted: #68707d;
  --soft: #8c94a1;
  --line: #e4e7eb;
  --line-strong: #d8dee7;
  --line-hover: #c7d0dc;
  --paper: #f6f7f9;
  --panel: #ffffff;
  --panel-tint: #fafbfc;
  --panel-soft: #fbfcfd;
  --chip-bg: #f8fafc;
  --chip-active: #ffffff;
  --chip-hover: #f2f5f8;
  --hero-chip-bg: #ffffff;
  --hero-chip-border: #d8dee7;
  --hero-chip-ink: #414b58;
  --info-badge-bg: #edf3ff;
  --accent-soft: #eef4ff;
  --accent-soft-strong: #f7faff;
  --accent-soft-border: #cfe0ff;
  --accent-ink: #2457bd;
  --success-soft: #e8f7ef;
  --success-soft-strong: #edf8f2;
  --success-border: #b9dac8;
  --success-ink: #16643f;
  --warning-soft: #fff4e5;
  --warning-soft-strong: #fff8ed;
  --warning-border: #f2d4aa;
  --warning-ink: #8a4b13;
  --danger-soft: #fff0ef;
  --danger-soft-strong: #fff7f7;
  --danger-border: #f0c7c7;
  --danger-ink: #9a332e;
  --map-canvas: #eef3f7;
  --map-wash: #f4f7fa;
  --marker-label-bg: rgb(255 255 255 / 96%);
  --overlay-panel: rgb(255 255 255 / 94%);
  --overlay-panel-strong: rgb(248 250 252 / 96%);
  --on-color: #ffffff;
  --eyebrow: #58615a;
  --carbon: #171a1f;
  --green: #218653;
  --amber: #a05d1c;
  --red: #b1423d;
  --blue: #256f9c;
  --accent: #2563eb;
  --focus: #2563eb;
  --shadow: 0 12px 28px rgb(23 26 31 / 8%);
  --shadow-soft: 0 8px 18px rgb(23 26 31 / 6%);
  --shadow-chip: 0 4px 10px rgb(23 26 31 / 7%);
  --shadow-button: 0 8px 18px rgb(37 99 235 / 18%);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e8eaed;
  --muted: #9aa3b2;
  --soft: #7d8694;
  --line: #2c3340;
  --line-strong: #3a4252;
  --line-hover: #4a5568;
  --paper: #12151a;
  --panel: #1a1f27;
  --panel-tint: #1e2430;
  --panel-soft: #1c222c;
  --chip-bg: #151a22;
  --chip-active: #242b36;
  --chip-hover: #222833;
  --hero-chip-bg: #1a1f27;
  --hero-chip-border: #323a48;
  --hero-chip-ink: #c5ccd6;
  --info-badge-bg: #243044;
  --accent-soft: #243044;
  --accent-soft-strong: #2a364c;
  --accent-soft-border: #3a5080;
  --accent-ink: #8eb4ff;
  --success-soft: #1a2e24;
  --success-soft-strong: #1e3429;
  --success-border: #2f6b4a;
  --success-ink: #6dcea0;
  --warning-soft: #332617;
  --warning-soft-strong: #3a2b18;
  --warning-border: #8a6230;
  --warning-ink: #e0a05a;
  --danger-soft: #332020;
  --danger-soft-strong: #3a2222;
  --danger-border: #8a4540;
  --danger-ink: #e0716b;
  --map-canvas: #151a22;
  --map-wash: #1a1f27;
  --marker-label-bg: rgb(26 31 39 / 96%);
  --overlay-panel: rgb(26 31 39 / 94%);
  --overlay-panel-strong: rgb(22 26 33 / 96%);
  --on-color: #ffffff;
  --eyebrow: #9aa3b2;
  --carbon: #e8eaed;
  --green: #3ecf8e;
  --amber: #e0a05a;
  --red: #e0716b;
  --blue: #5ba3c9;
  --accent: #5b8def;
  --focus: #5b8def;
  --shadow: 0 12px 28px rgb(0 0 0 / 36%);
  --shadow-soft: 0 8px 18px rgb(0 0 0 / 28%);
  --shadow-chip: 0 4px 10px rgb(0 0 0 / 28%);
  --shadow-button: 0 8px 18px rgb(0 0 0 / 28%);
}

* {
  box-sizing: border-box;
}

[hidden],
.is-filtered {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}

body.editor-page {
  overflow: auto;
}

body.topo-focused {
  overflow: auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 18px 24px;
  background: var(--paper);
  position: relative;
  overflow: visible;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 24px 0 24px;
  height: 1px;
  background: var(--line);
}

.hero-copy {
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--eyebrow);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 6px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.lede {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.hero-toolbar {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.hero-chip,
.site-disclaimer summary.hero-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  border: 1px solid var(--hero-chip-border);
  border-radius: 10px;
  background: var(--hero-chip-bg);
  color: var(--hero-chip-ink);
  padding: 8px 12px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  list-style: none;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}

.hero-chip:hover,
.site-disclaimer summary.hero-chip:hover {
  border-color: color-mix(in srgb, var(--accent), var(--hero-chip-border) 55%);
  background: color-mix(in srgb, var(--info-badge-bg), var(--hero-chip-bg) 45%);
}

.settings-toggle {
  width: 40px;
  padding: 0;
  flex: 0 0 40px;
}

.settings-toggle svg,
.theme-option svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settings-toggle[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--accent), var(--hero-chip-border) 40%);
  background: var(--info-badge-bg);
  color: var(--accent);
  box-shadow: var(--shadow-chip);
}

.site-settings {
  position: relative;
  z-index: 90;
}

.settings-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(220px, calc(100vw - 32px));
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.settings-menu[hidden] {
  display: none;
}

.settings-section {
  display: grid;
  gap: 6px;
}

.settings-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.language-switcher,
.theme-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--chip-bg);
  padding: 3px;
}

.contribute,
button {
  min-height: 42px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-color);
  padding: 10px 15px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-button);
}

button.hero-chip,
.site-disclaimer summary.hero-chip {
  min-height: 40px;
  border: 1px solid var(--hero-chip-border);
  background: var(--hero-chip-bg);
  color: var(--hero-chip-ink);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 850;
  box-shadow: var(--shadow-soft);
}

button.hero-chip:hover,
.site-disclaimer summary.hero-chip:hover {
  border-color: color-mix(in srgb, var(--accent), var(--hero-chip-border) 55%);
  background: color-mix(in srgb, var(--info-badge-bg), var(--hero-chip-bg) 45%);
}

button.settings-toggle {
  width: 40px;
  padding: 0;
}

button.settings-toggle[aria-expanded="true"],
.site-disclaimer details[open] summary.hero-chip {
  border-color: color-mix(in srgb, var(--accent), var(--hero-chip-border) 40%);
  background: var(--info-badge-bg);
  color: var(--accent);
  box-shadow: var(--shadow-chip);
}

.hero-toolbar .contribute,
.hero-toolbar .etiquette-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.hero-toolbar .etiquette-link {
  border: 1px solid var(--hero-chip-border);
  border-radius: 10px;
  background: var(--hero-chip-bg);
  color: var(--hero-chip-ink);
  box-shadow: none;
  font-weight: 700;
}

.hero-toolbar .etiquette-link:hover {
  border-color: color-mix(in srgb, var(--accent), var(--hero-chip-border) 55%);
  background: color-mix(in srgb, var(--info-badge-bg), var(--hero-chip-bg) 45%);
  color: var(--accent);
}

button.language-option,
button.theme-option {
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 6px 9px;
  box-shadow: none;
  font-size: 13px;
  font-weight: 800;
}

button.theme-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

button.language-option.active,
button.theme-option.active {
  background: var(--chip-active);
  color: var(--accent);
  box-shadow: var(--shadow-chip);
}

.site-disclaimer {
  position: relative;
  z-index: 80;
}

body.topo-expanded .site-disclaimer,
body.topo-expanded .site-settings {
  visibility: hidden;
  pointer-events: none;
}

.site-disclaimer details {
  position: relative;
  height: 100%;
}

.site-disclaimer summary.hero-chip {
  width: 100%;
  height: 100%;
}

.site-disclaimer summary::-webkit-details-marker {
  display: none;
}

.site-disclaimer summary::after {
  content: "i";
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--info-badge-bg);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.site-disclaimer details[open] summary::after {
  content: "×";
}

.site-disclaimer details[open] summary.hero-chip {
  border-color: color-mix(in srgb, var(--accent), var(--hero-chip-border) 40%);
  background: var(--info-badge-bg);
  color: var(--accent);
}

.site-disclaimer summary span:last-child {
  display: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.disclaimer-body {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(820px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-height: min(62vh, 520px);
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.disclaimer-body h2 {
  margin-bottom: 6px;
  font-size: 14px;
  line-height: 1.2;
}

.disclaimer-body p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.disclaimer-community {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(360px, 430px) minmax(500px, 1fr);
  gap: 16px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 16px 24px 24px;
  height: calc(100vh - 128px);
  min-height: 0;
  transition: grid-template-columns .22s ease;
}

.editor-shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 16px 24px 48px;
  min-height: calc(100vh - 128px);
}

.editor-panel {
  padding: 20px;
  max-height: none;
  overflow: visible;
  position: static;
}

.editor-workbench {
  margin-top: 18px;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  align-items: start;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.editor-page .topo-sidebar {
  max-height: none;
}

.editor-page .editor-tools {
  margin-bottom: 24px;
}

.app-shell.area-focused {
  grid-template-columns: 76px 156px minmax(760px, 1fr);
}

.app-shell.map-mode {
  grid-template-columns: 300px minmax(0, 1fr);
}

.map-mode .results-panel {
  grid-column: 2;
}

.map-mode .detail-panel {
  display: none;
}

.map-mode .japan-map {
  height: clamp(520px, 68vh, 760px);
  min-height: 520px;
}

.app-shell.area-focused.topo-focused {
  grid-template-columns: 76px minmax(860px, 1fr);
  grid-template-rows: 76px minmax(76px, 1fr);
}

.filters,
.results-panel,
.detail-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.filters {
  align-self: start;
  max-height: 100%;
  padding: 12px;
  position: sticky;
  top: 16px;
  overflow-y: auto;
  transition: padding .22s ease;
}

.mobile-filter-toggle,
.filter-drawer-head,
.filter-drawer-actions,
.filter-backdrop {
  display: none;
}

.topo-focused .filters {
  grid-column: 1;
  grid-row: 1;
  position: static;
}

.results-panel,
.detail-panel {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  padding: 20px;
}

.search-label,
.filter-group span {
  display: block;
  margin-bottom: 6px;
  font-weight: 800;
}

.rail-icon {
  display: none;
}

.rail-icon svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.25;
}

input[type="search"],
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--panel-tint);
  color: var(--ink);
  padding: 10px 13px;
  font: inherit;
}

input[type="search"]::placeholder {
  color: var(--soft);
}

input:focus,
select:focus,
button:focus,
a:focus {
  outline: 3px solid color-mix(in srgb, var(--focus), transparent 68%);
  outline-offset: 2px;
}

.filter-group {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  color: var(--muted);
}

.filter-group label {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 26px;
  border-radius: 8px;
  padding: 2px 4px;
  font-size: 14px;
}

.filter-group label:hover {
  background: var(--chip-hover);
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent);
}

.filter-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--chip-bg);
  padding: 3px;
}

.focused-mode-nav {
  display: none;
}

.filter-nav-button {
  min-height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 6px 8px;
  box-shadow: none;
  font-size: 14px;
}

.filter-nav-button.active {
  background: var(--chip-active);
  color: var(--accent);
  box-shadow: var(--shadow-chip);
}

.results-panel {
  min-width: 0;
}

.results-head {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

.results {
  display: grid;
  gap: 12px;
}

.map-card {
  display: grid;
  gap: 12px;
  min-height: 0;
}

.map-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 380px);
  gap: 14px;
  align-items: stretch;
  min-height: 0;
}

.map-info-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  max-height: clamp(520px, 68vh, 760px);
  overflow: auto;
  scroll-margin-top: 16px;
}

.map-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.japan-map,
.local-map {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, var(--panel-soft) 0%, var(--map-wash) 100%),
    radial-gradient(circle at 60% 45%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 24%),
    var(--chip-bg);
}

.japan-outline-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: .98;
  pointer-events: none;
  user-select: none;
}

.real-map {
  background: var(--map-canvas);
  isolation: isolate;
}

.real-map.leaflet-container {
  color: var(--ink);
  font-family: inherit;
}

.real-map .map-fallback {
  position: absolute;
  inset: 0;
  opacity: .52;
}

.real-map.leaflet-ready .map-fallback {
  display: none;
}

.real-map .leaflet-pane,
.real-map .leaflet-control {
  z-index: 2;
}

.leaflet-unavailable .map-fallback {
  opacity: 1;
}

.area-map-marker {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
}

.area-map-marker span {
  display: block;
  width: 14px;
  height: 14px;
  border: 3px solid var(--on-color);
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 18%), 0 10px 20px rgb(23 26 31 / 20%);
}

.boulder-map-marker {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
}

.boulder-map-marker span {
  display: block;
  width: 13px;
  height: 13px;
  border: 3px solid var(--on-color);
  border-radius: 999px;
  background: #0f172a;
  box-shadow: 0 0 0 3px rgb(15 23 42 / 13%), 0 10px 18px rgb(23 26 31 / 18%);
}

.boulder-map-marker strong {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  max-width: 150px;
  transform: translateX(-50%);
  border: 1px solid color-mix(in srgb, var(--line-strong) 85%, transparent);
  border-radius: 999px;
  background: var(--marker-label-bg);
  color: var(--ink);
  padding: 5px 9px;
  box-shadow: 0 12px 28px rgb(23 26 31 / 14%);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.boulder-map-marker.active span {
  width: 18px;
  height: 18px;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgb(37 99 235 / 18%), 0 16px 32px rgb(23 26 31 / 24%);
}

.boulder-map-marker.active strong,
.boulder-map-marker:hover strong {
  opacity: 1;
}

.boulder-map-marker.muted {
  opacity: .36;
}

.parking-map-marker {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
}

.parking-map-marker span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 3px solid var(--on-color);
  border-radius: 999px;
  background: #64748b;
  box-shadow: 0 0 0 3px rgb(100 116 139 / 14%), 0 10px 18px rgb(23 26 31 / 18%);
  color: var(--on-color);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.parking-map-marker.free span {
  background: #059669;
  box-shadow: 0 0 0 3px rgb(5 150 105 / 14%), 0 10px 18px rgb(23 26 31 / 18%);
}

.parking-map-marker.paid span {
  background: #d97706;
  box-shadow: 0 0 0 3px rgb(217 119 6 / 14%), 0 10px 18px rgb(23 26 31 / 18%);
}

.parking-map-marker strong {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  max-width: 180px;
  transform: translateX(-50%);
  border: 1px solid color-mix(in srgb, var(--line-strong) 85%, transparent);
  border-radius: 999px;
  background: var(--marker-label-bg);
  color: var(--ink);
  padding: 5px 9px;
  box-shadow: 0 12px 28px rgb(23 26 31 / 14%);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.parking-map-marker:hover strong {
  opacity: 1;
}

.washroom-map-marker {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
}

.washroom-map-marker span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 3px solid var(--on-color);
  border-radius: 6px;
  background: #0f766e;
  color: var(--on-color);
  font-size: 7px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 0 0 3px rgb(15 118 110 / 14%), 0 10px 18px rgb(23 26 31 / 18%);
}

.washroom-map-marker strong {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  max-width: 180px;
  transform: translateX(-50%);
  border: 1px solid color-mix(in srgb, var(--line-strong) 85%, transparent);
  border-radius: 999px;
  background: var(--marker-label-bg);
  color: var(--ink);
  padding: 5px 9px;
  box-shadow: 0 12px 28px rgb(23 26 31 / 14%);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.washroom-map-marker:hover strong {
  opacity: 1;
}

.area-map-marker strong {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  max-width: 150px;
  transform: translateX(-50%);
  border: 1px solid color-mix(in srgb, var(--line-strong) 85%, transparent);
  border-radius: 999px;
  background: var(--marker-label-bg);
  color: var(--ink);
  padding: 5px 9px;
  box-shadow: 0 12px 28px rgb(23 26 31 / 14%);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.area-map-marker.active span {
  width: 18px;
  height: 18px;
  background: #2563eb;
  box-shadow: 0 0 0 5px rgb(37 99 235 / 18%), 0 16px 32px rgb(23 26 31 / 24%);
}

.area-map-marker.active strong,
.area-map-marker:hover strong {
  opacity: 1;
}

.real-map .leaflet-control-zoom {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line-strong) 90%, transparent);
  border-radius: 10px;
  box-shadow: 0 12px 24px rgb(23 26 31 / 12%);
}

.real-map .leaflet-control-zoom a {
  border: 0;
  background: var(--panel);
  color: var(--ink);
}

.real-map .leaflet-control-zoom a:hover {
  background: var(--chip-hover);
}

.real-map .leaflet-control-attribution {
  border-top-left-radius: 8px;
  background: var(--overlay-panel);
  font-size: 10px;
}

.japan-map svg,
.local-map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-island {
  fill: var(--map-wash);
  stroke: var(--line-strong);
  stroke-linejoin: round;
  stroke-width: 1.1;
}

.map-river {
  fill: none;
  stroke: #9bc9ef;
  stroke-linecap: round;
  stroke-width: 2;
}

.map-river.wide {
  stroke-width: 7;
  opacity: .55;
}

.map-trail {
  fill: none;
  stroke: #b7c0cc;
  stroke-dasharray: 3 3;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.map-pin,
.boulder-pin,
.parking-pin,
.washroom-pin {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  padding: 6px 9px 6px 7px;
  box-shadow: 0 8px 18px rgb(23 26 31 / 12%);
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.map-pin {
  width: 24px;
  height: 24px;
  justify-content: center;
  border-color: var(--line-hover);
  padding: 0;
  z-index: 2;
}

.map-pin span,
.boulder-pin span,
.parking-pin span,
.washroom-pin span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgb(37 99 235 / 14%);
}

.parking-pin span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  background: #64748b;
  box-shadow: 0 0 0 4px rgb(100 116 139 / 16%);
  color: var(--on-color);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.parking-pin.free span {
  background: #059669;
  box-shadow: 0 0 0 4px rgb(5 150 105 / 16%);
}

.parking-pin.paid span {
  background: #d97706;
  box-shadow: 0 0 0 4px rgb(217 119 6 / 16%);
}

.washroom-pin span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 6px;
  background: #0f766e;
  box-shadow: 0 0 0 4px rgb(15 118 110 / 16%);
  color: var(--on-color);
  font-size: 7px;
  font-weight: 900;
  line-height: 1;
}

.map-pin span {
  width: 9px;
  height: 9px;
  box-shadow: 0 0 0 4px rgb(37 99 235 / 12%);
}

.map-pin strong,
.boulder-pin strong,
.parking-pin strong,
.washroom-pin strong {
  font-size: 12px;
}

.map-pin strong {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  display: block;
  max-width: 132px;
  transform: translateX(-50%);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  padding: 5px 8px;
  box-shadow: 0 8px 18px rgb(23 26 31 / 10%);
  opacity: 0;
  pointer-events: none;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.map-pin.active,
.map-pin:hover,
.map-pin:focus-visible {
  border-color: rgb(37 99 235 / 50%);
  background: var(--accent-soft);
  z-index: 4;
}

.map-pin.active strong,
.map-pin:hover strong,
.map-pin:focus-visible strong {
  opacity: 1;
}

.map-pin.active,
.boulder-pin.active,
.parking-pin:hover,
.parking-pin:focus-visible,
.washroom-pin:hover,
.washroom-pin:focus-visible {
  border-color: rgb(37 99 235 / 50%);
  background: var(--accent-soft);
}

.map-selected {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 14px;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 14px;
}

.map-selected strong,
.map-selected span {
  display: block;
}

.map-selected strong {
  margin-bottom: 2px;
}

.map-selected span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.map-selected-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.map-selected-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--ink);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.map-area-preview {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 14px;
}

.map-preview-title {
  display: grid;
  gap: 10px;
}

.map-preview-title h4 {
  margin: 0 0 4px;
  font-size: 24px;
  line-height: 1.05;
}

.map-preview-title p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.map-preview-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.map-preview-facts div {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  padding: 10px;
}

.map-preview-facts span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.map-preview-facts strong {
  color: var(--ink);
  font-size: 15px;
}

.map-preview-footer {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.map-preview-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.primary-lite {
  border-color: rgb(37 99 235 / 28%);
  background: var(--accent-soft);
  color: var(--accent);
}

.local-map {
  min-height: 360px;
}

.problem-index-tools {
  margin: 12px 0;
}

.problem-index-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
}

.topo-screen {
  display: grid;
  gap: 14px;
  min-height: 100%;
}

.topo-screen-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.topo-screen-head h2 {
  margin-bottom: 3px;
}

.topo-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.topo-map-head {
  display: flex;
  width: 100%;
  cursor: pointer;
}

.mobile-topo-map-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topo-filterbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(112px, .16fr) minmax(130px, .2fr) minmax(150px, .22fr) minmax(130px, .2fr) auto;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--overlay-panel);
  padding: 10px;
  box-shadow: 0 10px 24px rgb(15 23 42 / 6%);
  backdrop-filter: blur(14px);
}

.topo-layout {
  display: grid;
  grid-template-columns: minmax(320px, .68fr) minmax(0, 1fr);
  grid-template-areas:
    "map photo"
    "problems photo";
  gap: 10px;
  align-items: start;
  min-height: 0;
}

.topo-layout.map-collapsed {
  grid-template-columns: minmax(320px, .68fr) minmax(0, 1fr);
  grid-template-areas:
    "map photo"
    "problems photo";
}

.topo-map-panel,
.topo-problem-panel,
.topo-photo-panel {
  container-type: inline-size;
  --topo-stage-max-height: calc(100vh - 300px);
  --topo-stage-height: clamp(420px, calc(100dvh - 360px), min(var(--topo-stage-max-height), 620px));
  --topo-problem-panel-max-height: min(calc(100dvh - 240px), 720px);
  justify-self: stretch;
  width: 100%;
  min-width: 0;
}

.topo-local-map {
  min-height: 300px;
  border-radius: 12px;
}

.topo-layout.map-collapsed .topo-local-map {
  display: none;
}

.boulder-pin.muted {
  opacity: .35;
}

.topo-problem-panel {
  grid-area: problems;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: var(--topo-problem-panel-max-height);
  gap: 10px;
  align-content: start;
  min-height: 0;
}

.topo-map-panel {
  grid-area: map;
  display: grid;
  gap: 8px;
  align-content: start;
}

.topo-photo-panel {
  grid-area: photo;
}

.topo-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 8px 10px;
}

button.topo-panel-head {
  appearance: none;
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.topo-panel-head .eyebrow {
  margin-bottom: 0;
}

.topo-map-head-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.topo-map-head-indicator {
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
}

.topo-index-list {
  grid-template-columns: 1fr;
  min-height: 0;
  max-height: calc(var(--topo-problem-panel-max-height) - 52px);
  overflow-y: auto;
  gap: 6px;
  padding-right: 2px;
}

.topo-photo-panel .topo-section {
  position: relative;
  width: 100%;
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

.topo-photo-panel .section-head {
  display: none;
}

.topo-photo-panel .topo-workbench {
  width: 100%;
  justify-items: stretch;
  grid-template-columns: 1fr;
  gap: 12px;
}

.topo-photo-panel .topo-sidebar {
  display: none;
}

.topo-photo-panel .topo-photo-frame.has-photo-rail {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 8px;
}

.topo-photo-panel .photo-tabs {
  position: static;
  width: 58px;
  max-height: 100%;
}

.topo-empty.small {
  min-height: 120px;
  padding: 16px;
}

.boulder-row {
  display: grid;
  gap: 6px;
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--ink);
  padding: 9px 11px;
  text-align: left;
  overflow: visible;
}

.boulder-row.active {
  border-color: var(--accent-soft-border);
  background: var(--accent-soft-strong);
  box-shadow: inset 3px 0 0 var(--accent);
}

.problem-index-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  align-content: center;
}

.problem-index-row:focus {
  outline: none;
}

.problem-index-row:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--focus), transparent 35%);
  outline-offset: 1px;
}

.problem-index-row.active:focus,
.problem-index-row.active:focus-visible {
  outline: none;
}

.problem-index-row .chips {
  display: flex;
  justify-content: end;
  white-space: nowrap;
}

.area-card {
  display: grid;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 18px;
  color: inherit;
  text-align: left;
  box-shadow: 0 6px 16px rgb(23 26 31 / 5%);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.area-card,
.problem-select,
.secondary-action {
  box-shadow: none;
}

.area-card.active {
  border-color: rgb(37 99 235 / 48%);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 12%), 0 12px 28px rgb(23 26 31 / 10%);
}

.area-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-hover);
}

.card-top,
.meta-row,
.problem-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.area-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
}

.subtitle,
.summary,
.access-note {
  color: var(--muted);
}

.summary {
  line-height: 1.38;
}

.badge {
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.open {
  background: var(--success-soft);
  color: var(--success-ink);
}

.badge.seasonal {
  background: var(--warning-soft);
  color: var(--warning-ink);
}

.badge.sensitive {
  background: var(--danger-soft);
  color: var(--danger-ink);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--chip-bg);
  padding: 4px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.chip-blue {
  border-color: var(--accent-soft-border);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.detail-panel {
  align-self: start;
  position: sticky;
  top: 16px;
  background: var(--panel);
}

.detail-titlebar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.detail-titlebar h2 {
  margin-bottom: 3px;
}

.area-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 8px;
  margin: 16px 0;
}

.fact-card {
  display: grid;
  align-content: center;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 10px 12px;
  color: var(--ink);
  text-decoration: none;
}

.fact-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.fact-card strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gps-card:hover {
  border-color: var(--line-hover);
  background: var(--chip-hover);
}

.season-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.season-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  padding: 4px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  line-height: 1;
}

.season-chip.best {
  border-color: var(--success-border);
  background: var(--success-soft-strong);
  color: var(--success-ink);
  box-shadow: inset 0 0 0 1px rgb(33 134 83 / 5%);
}

.season-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 13px 14px;
  margin-bottom: 10px;
}

.season-section h3 {
  margin-bottom: 0;
  font-size: 17px;
}

.season-section .season-list {
  justify-content: flex-end;
}

.parking-section,
.mat-rental-section {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 14px;
  margin-bottom: 10px;
}

.parking-section .section-head,
.mat-rental-section .section-head {
  align-items: center;
}

.parking-section h3,
.mat-rental-section h3 {
  margin-bottom: 0;
  font-size: 17px;
}

.parking-list,
.mat-rental-list {
  display: grid;
  gap: 8px;
}

.parking-card,
.mat-rental-card {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  padding: 10px;
}

.parking-card-main,
.mat-rental-card-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.parking-card strong,
.mat-rental-card strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.parking-type-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  margin-right: 7px;
  place-items: center;
  border-radius: 999px;
  background: #64748b;
  color: var(--on-color);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  vertical-align: text-bottom;
}

.parking-type-icon.free {
  background: #059669;
}

.parking-type-icon.paid {
  background: #d97706;
}

.parking-type-icon.forbidden {
  background: #b42318;
}

.parking-card .summary,
.mat-rental-card .summary {
  margin: 0;
}

.parking-map-link,
.mat-rental-link {
  flex: 0 0 auto;
  min-height: 34px;
  padding-inline: 10px;
  white-space: nowrap;
}

.parking-meta,
.parking-warnings {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.parking-meta span,
.parking-warnings span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  padding: 3px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

.parking-warnings span {
  border-color: var(--warning-border);
  background: var(--warning-soft-strong);
  color: var(--warning-ink);
}

.guidebook-section {
  display: grid;
  gap: 12px;
  border: 1px solid var(--success-border);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--success-soft-strong) 0%, var(--success-soft) 100%);
  box-shadow: inset 0 0 0 1px rgb(33 134 83 / 5%);
  padding: 14px;
  margin-bottom: 10px;
}

.guidebook-section .section-head {
  align-items: center;
}

.guidebook-section .eyebrow {
  color: var(--success-ink);
}

.guidebook-section h3 {
  margin-bottom: 0;
  color: var(--success-ink);
  font-size: 17px;
}

.guidebook-list {
  display: grid;
  gap: 12px;
}

.guidebook-card {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.guidebook-card:not(.has-sellers) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--success-border);
  border-radius: 10px;
  background: var(--panel);
  padding: 11px 12px;
}

.guidebook-card strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.guidebook-card-main {
  display: grid;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.guidebook-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.guidebook-required {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid var(--warning-border);
  border-radius: 999px;
  background: var(--warning-soft-strong);
  padding: 2px 8px;
  color: var(--warning-ink);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

.guidebook-publisher,
.guidebook-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
}

.guidebook-card .summary {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.guidebook-link {
  justify-self: start;
  flex: 0 0 auto;
  min-height: 36px;
  white-space: nowrap;
}

.guidebook-sellers {
  display: grid;
  gap: 10px;
  margin-top: 2px;
  border: 1px solid var(--success-border);
  border-radius: 10px;
  background: var(--panel);
  padding: 12px;
}

.guidebook-sellers-label {
  margin: 0;
  color: var(--success-ink);
  font-size: 12px;
  font-weight: 900;
}

.guidebook-seller-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px 14px;
}

.guidebook-seller-group {
  display: grid;
  gap: 6px;
  min-width: 0;
  align-content: start;
}

.guidebook-seller-group h5 {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
}

.guidebook-seller-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guidebook-seller-link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  max-width: 100%;
  border: 1px solid var(--success-border);
  border-radius: 8px;
  background: var(--success-soft-strong);
  padding: 6px 8px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}

.guidebook-seller-link:hover,
.guidebook-seller-link:focus-visible {
  border-color: var(--success-border);
  background: var(--success-soft);
  color: var(--success-ink);
}

.guidebook-seller-link span,
.guidebook-seller-link small {
  overflow-wrap: anywhere;
}

.guidebook-seller-link span {
  font-size: 12px;
  font-weight: 780;
  line-height: 1.25;
}

.guidebook-seller-link small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.guidebook-seller-link:hover small,
.guidebook-seller-link:focus-visible small {
  color: var(--success-ink);
}

.parking-map-popup {
  display: grid;
  gap: 6px;
  min-width: 180px;
}

.parking-map-popup strong,
.parking-map-popup p {
  margin: 0;
}

.parking-map-popup p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.access-section {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  padding: 14px;
  margin-bottom: 10px;
}

.access-section.sensitive {
  border-color: var(--warning-border);
  background: linear-gradient(180deg, var(--warning-soft-strong) 0%, var(--warning-soft) 100%);
  box-shadow: inset 0 0 0 1px rgb(180 83 9 / 6%);
}

.access-section .section-head {
  align-items: center;
}

.access-section h3 {
  margin-bottom: 0;
  font-size: 17px;
}

.access-note {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.access-section.sensitive .access-note {
  color: var(--warning-ink);
}

.rule-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rule-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  padding: 5px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.access-section.sensitive .rule-list span {
  border-color: var(--warning-border);
  background: var(--panel);
  color: var(--warning-ink);
}

body.area-focused .hero {
  padding-top: 12px;
  padding-bottom: 12px;
}

body.area-focused h1 {
  font-size: clamp(24px, 3vw, 34px);
}

body.area-focused .lede {
  display: none;
}

.area-focused .filters {
  padding: 12px;
  cursor: pointer;
}

.area-focused .filter-search {
  display: grid;
  place-items: center;
}

.area-focused .search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.area-focused .rail-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--accent);
  box-shadow: var(--shadow-soft);
}

.area-focused .filters:hover {
  border-color: rgb(37 99 235 / 42%);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 10%), var(--shadow);
}

.area-focused #search,
.area-focused .filter-nav,
.area-focused .filter-group {
  display: none;
}

.area-focused .results-panel {
  padding: 10px;
}

.topo-focused .results-panel {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  display: grid;
  place-items: center;
  width: 72px;
  height: 68px;
  min-height: 68px;
  max-height: 68px;
  justify-self: stretch;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.topo-focused .results-panel:hover {
  border-color: rgb(37 99 235 / 42%);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 10%), var(--shadow-soft);
}

.topo-focused .detail-panel {
  grid-column: 2;
  grid-row: 1 / span 2;
  max-height: none;
  overflow: visible;
}

.topo-focused .results-panel::before {
  content: "";
  display: block;
  width: 20px;
  height: 16px;
  border: 2px solid var(--accent);
  border-width: 2px 0;
  border-radius: 0;
  background:
    linear-gradient(var(--accent), var(--accent)) center / 20px 2px no-repeat;
  box-shadow: none;
}

.topo-focused .focused-mode-nav,
.topo-focused .results-head,
.topo-focused .results {
  display: none !important;
}

.area-focused .focused-mode-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--chip-bg);
  padding: 4px;
}

.area-focused .results-head {
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.area-focused .results-head select {
  display: none;
}

.area-focused .area-card {
  gap: 6px;
  padding: 10px;
}

.area-focused .area-title {
  font-size: 14px;
}

.area-focused .summary,
.area-focused .chips {
  display: none;
}

.topo-focused .problem-index-row .chips {
  display: flex;
}

.area-focused .card-top {
  align-items: start;
  flex-direction: column;
  gap: 6px;
}

.area-focused .subtitle {
  font-size: 12px;
  line-height: 1.15;
}

.area-focused .meta-row {
  display: grid;
  gap: 4px;
  font-size: 11px;
}

.area-focused .badge {
  padding: 4px 7px;
  font-size: 11px;
}

.area-focused .results-head h2 {
  font-size: 18px;
}

.area-focused .results-head .eyebrow {
  font-size: 10px;
}

.area-focused .detail-panel {
  position: static;
}

.app-shell.area-focused.topo-focused {
  height: auto;
  min-height: calc(100vh - 128px);
  align-items: start;
}

.area-focused .topo-workbench {
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
}

.area-focused .topo-photo-panel .topo-workbench {
  grid-template-columns: 1fr;
}

.section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.secondary-action {
  min-height: 36px;
  min-width: 86px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--ink);
  padding: 8px 11px;
  font-size: 14px;
}

.secondary-action:hover,
.photo-tab:hover {
  border-color: var(--line-strong);
  background: var(--chip-bg);
}

.secondary-action:disabled {
  color: var(--soft);
  cursor: not-allowed;
  background: var(--chip-bg);
}

.photo-tabs {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 0;
  left: calc(100% + 8px);
  z-index: 3;
  width: 58px;
  max-height: min(100%, 360px);
  gap: 6px;
  margin: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  padding: 5px;
}

.photo-tab {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 38px;
  min-width: 46px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

.photo-tab img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .72;
  filter: saturate(.9);
}

.photo-tab span {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: grid;
  min-width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 999px;
  background: rgb(15 23 42 / 72%);
  color: var(--on-color);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.photo-tab.active {
  border-color: rgb(37 99 235 / 64%);
  box-shadow: 0 0 0 2px rgb(37 99 235 / 14%);
}

.photo-tab.active img {
  opacity: 1;
}

.photo-tab.active span {
  background: #2563eb;
}

.topo-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .8fr);
  gap: 16px;
  align-items: start;
}

.topo-media {
  display: grid;
  gap: 8px;
  width: 100%;
  justify-items: stretch;
  min-width: 0;
}

.topo-editor-action {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: none;
  font-size: 20px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
}

.topo-editor-action:hover {
  border-color: var(--line-hover);
  background: var(--chip-bg);
}

.topo-photo-frame {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

.topo-photo-frame.has-photo-rail {
  display: block;
}

.topo-stage {
  position: relative;
  width: min(100%, calc(var(--topo-stage-height) * var(--topo-photo-ratio, 1)));
  aspect-ratio: var(--topo-photo-aspect, auto);
  height: auto;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  max-height: var(--topo-stage-height);
  justify-self: center;
  align-self: start;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: transparent;
}

.topo-stage.drawing {
  cursor: crosshair;
}

.topo-stage img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.topo-expand-toggle,
.topo-stage-controls,
.topo-selected-caption {
  display: none;
}

.topo-screen:not(.topo-expanded) .topo-photo-panel .topo-selected-caption {
  display: none !important;
}

.topo-photo-panel .topo-expand-toggle,
.topo-screen.topo-expanded .topo-expand-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgb(15 23 42 / 26%), rgb(15 23 42 / 40%));
  color: var(--on-color);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  box-shadow: 0 8px 20px rgb(15 23 42 / 10%);
  backdrop-filter: blur(5px);
}

.topo-photo-panel .topo-stage-controls,
.topo-screen.topo-expanded .topo-stage-controls {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: calc(100% - 126px);
}

.topo-photo-panel .topo-lines-toggle,
.topo-screen.topo-expanded .topo-lines-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgb(15 23 42 / 26%), rgb(15 23 42 / 40%));
  color: var(--on-color);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  box-shadow: 0 8px 20px rgb(15 23 42 / 10%);
  backdrop-filter: blur(5px);
}

.topo-screen.topo-expanded {
  position: fixed;
  inset: 16px;
  z-index: 40;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--overlay-panel-strong);
  box-shadow: 0 30px 80px rgb(15 23 42 / 24%);
  padding: 16px;
  overflow: auto;
  overscroll-behavior: contain;
  backdrop-filter: blur(18px);
}

.topo-screen.topo-expanded .topo-screen-head,
.topo-screen.topo-expanded .topo-filterbar,
.topo-screen.topo-expanded .topo-map-panel,
.topo-screen.topo-expanded .topo-problem-panel,
.topo-screen.topo-expanded .photo-tabs {
  display: none;
}

.topo-screen.topo-expanded .topo-layout,
.topo-screen.topo-expanded .topo-layout.mobile-map-open {
  display: block;
  height: 100%;
}

.topo-screen.topo-expanded .topo-photo-panel {
  --topo-stage-max-height: calc(100dvh - 96px);
  --topo-stage-height: min(calc(100dvh - 96px), 900px);
  display: grid;
  height: 100%;
  align-items: center;
}

.topo-screen.topo-expanded .topo-workbench,
.topo-screen.topo-expanded .topo-photo-panel .topo-workbench {
  display: block;
  height: 100%;
}

.topo-screen.topo-expanded .topo-media {
  display: grid;
  gap: 0;
  height: 100%;
  align-content: center;
  justify-items: center;
}

.topo-screen.topo-expanded .topo-photo-frame {
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: 0;
  width: 100%;
}

.topo-screen.topo-expanded .topo-stage {
  width: auto;
  aspect-ratio: auto;
  height: auto;
  max-width: min(100%, 1400px);
  max-height: none;
  margin: 0 auto;
  border-radius: 14px;
  background: transparent;
  overflow: visible;
}

.topo-screen.topo-expanded .topo-stage img {
  width: auto;
  max-width: min(100%, 1400px);
  height: auto;
  max-height: var(--topo-stage-height);
  object-fit: contain;
}

.topo-screen.topo-expanded .topo-selected-caption {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 4;
  display: grid;
  gap: 1px;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 10px;
  background: linear-gradient(180deg, rgb(15 23 42 / 26%), rgb(15 23 42 / 40%));
  color: rgb(255 255 255 / 92%);
  padding: 8px 12px;
  box-shadow: 0 10px 24px rgb(15 23 42 / 10%);
  backdrop-filter: blur(5px);
  pointer-events: none;
}

.topo-screen.topo-expanded .topo-legend,
.topo-screen.topo-expanded .topo-photo-panel .summary,
.topo-screen.topo-expanded .topo-section > .section-head {
  display: none;
}

.topo-empty {
  display: grid;
  min-height: 260px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--chip-bg);
  color: var(--muted);
  font-weight: 800;
}

.topo-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.topo-marker-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.editor-page .topo-overlay {
  pointer-events: none;
}

.editor-page .topo-start-area,
.editor-page .topo-start-area circle {
  pointer-events: visiblePainted;
}

.topo-start-area {
  opacity: .9;
  cursor: pointer;
  pointer-events: visiblePainted;
  transition: opacity .16s ease;
}

.topo-start-area circle {
  fill: rgb(255 255 255 / 18%);
  stroke: rgb(255 255 255 / 88%);
  stroke-width: .7;
  paint-order: stroke fill;
  filter: drop-shadow(0 1px 1.5px rgb(0 0 0 / 45%));
}

.topo-start-area.active circle {
  fill: rgb(47 128 255 / 16%);
  stroke: rgb(47 128 255 / 88%);
  stroke-width: .85;
}

.topo-start-area.dimmed {
  opacity: .55;
}

.topo-start-area.dimmed:hover,
.topo-start-area.dimmed:focus-visible {
  opacity: .8;
}

.topo-start-area.selected circle {
  fill: rgb(47 128 255 / 20%);
  stroke: rgb(96 165 250 / 95%);
  stroke-width: .95;
  stroke-dasharray: 1.4 1;
}

.topo-start-area.preview circle {
  fill: rgb(47 128 255 / 8%);
  stroke: rgb(147 197 253 / 75%);
  stroke-width: .7;
  stroke-dasharray: 1.2 1.2;
}

.topo-start-area:focus,
.topo-start-area:focus-visible {
  outline: none;
}

.topo-start-radius-handle {
  position: absolute;
  z-index: 5;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  transform: translate(-50%, -50%);
  appearance: none;
  border: 2px solid var(--on-color);
  border-radius: 999px;
  background: rgb(47 128 255 / 95%);
  box-shadow: 0 0 0 3px rgb(15 23 42 / 35%), 0 2px 7px rgb(0 0 0 / 45%);
  pointer-events: auto;
  cursor: ew-resize;
  padding: 0;
}

.topo-marker.start.selected {
  box-shadow: 0 0 0 3px rgb(47 128 255 / 35%), 0 1px 5px rgb(0 0 0 / 42%);
}

.topo-line {
  opacity: .88;
  cursor: pointer;
  pointer-events: visibleStroke;
  transition: opacity .16s ease, filter .16s ease;
}

.topo-line:focus,
.topo-line:focus-visible {
  outline: none;
}

.topo-line polyline {
  fill: none;
  stroke: rgb(255 255 255 / 88%);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.15;
  paint-order: stroke;
  filter: drop-shadow(0 1px 1.5px rgb(0 0 0 / 58%));
}

.topo-line.active {
  opacity: 1;
}

.topo-line.dimmed {
  opacity: .58;
  filter: saturate(.88);
}

.topo-line.dimmed:hover,
.topo-line.dimmed:focus-visible {
  opacity: .78;
}

.topo-line.active polyline,
.topo-line.draft polyline {
  stroke: rgb(47 128 255 / 84%);
  stroke-width: 1.2;
}

.topo-line.dimmed polyline {
  stroke: rgb(255 255 255 / 78%);
  stroke-width: 1.05;
  filter: drop-shadow(0 1px 1.5px rgb(0 0 0 / 46%));
}

.topo-line.draft polyline {
  stroke-dasharray: 3 2;
}

.topo-restricted-line {
  pointer-events: none;
}

.topo-restricted-line polyline {
  fill: none;
  stroke: rgb(220 38 38 / 92%);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
  stroke-dasharray: 2.2 1.5;
  paint-order: stroke;
  filter: drop-shadow(0 1px 1.5px rgb(255 255 255 / 82%)) drop-shadow(0 1px 2px rgb(0 0 0 / 55%));
}

.topo-restricted-line.draft polyline {
  stroke: rgb(248 113 113 / 98%);
  stroke-dasharray: 1.2 1.2;
}

.topo-restricted-line.draft circle {
  fill: rgb(248 113 113 / 98%);
  stroke: rgb(255 255 255 / 92%);
  stroke-width: 0.35;
}

.topo-marker,
.topo-number {
  position: absolute;
  transform: translate(-50%, -50%);
  appearance: none;
  box-sizing: border-box;
  pointer-events: auto;
  cursor: pointer;
  font: inherit;
  transition: opacity .16s ease, transform .16s ease;
}

.topo-marker.dimmed,
.topo-number.dimmed {
  opacity: .68;
}

.topo-marker.dimmed:hover,
.topo-number.dimmed:hover {
  opacity: .88;
}

.editor-page .topo-marker.start::before {
  content: "";
  position: absolute;
  inset: -12px;
}

.topo-marker.start {
  display: grid;
  width: 13px;
  height: 13px;
  min-width: 13px;
  min-height: 13px;
  max-width: 13px;
  max-height: 13px;
  place-items: center;
  border: 2px solid rgb(255 255 255 / 94%);
  border-radius: 999px;
  background: rgb(255 255 255 / 72%);
  box-shadow: 0 1px 5px rgb(0 0 0 / 42%);
  padding: 0;
}

.topo-marker.start.area {
  width: 11px;
  height: 11px;
  min-width: 11px;
  min-height: 11px;
  max-width: 11px;
  max-height: 11px;
  background: rgb(255 255 255 / 88%);
}

.topo-marker.start.active {
  width: 15px;
  height: 15px;
  min-width: 15px;
  min-height: 15px;
  max-width: 15px;
  max-height: 15px;
  background: rgb(47 128 255 / 88%);
  box-shadow: 0 0 0 3px rgb(47 128 255 / 18%), 0 1px 5px rgb(0 0 0 / 42%);
}

.topo-marker.start.area.active {
  width: 12px;
  height: 12px;
  min-width: 12px;
  min-height: 12px;
  max-width: 12px;
  max-height: 12px;
}

.topo-marker.start i {
  color: var(--on-color);
  font-size: 8px;
  font-style: normal;
  font-weight: 850;
  line-height: 1;
}

.topo-marker.restricted {
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  max-width: 14px;
  max-height: 14px;
  border: 2px solid var(--on-color);
  border-radius: 999px;
  background:
    linear-gradient(45deg, transparent 42%, rgb(214 56 56) 42% 58%, transparent 58%),
    rgb(214 56 56 / 78%);
  box-shadow: 0 1px 5px rgb(0 0 0 / 42%);
  padding: 0;
}

.topo-marker.editor-point-target {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  border: 2px solid var(--on-color);
  border-radius: 999px;
  background: rgb(47 128 255 / 88%);
  box-shadow: 0 0 0 3px rgb(15 23 42 / 45%), 0 2px 7px rgb(0 0 0 / 48%);
  z-index: 4;
}

.topo-marker.editor-point-target.start-point {
  background: rgb(255 255 255 / 92%);
}

.topo-marker.editor-point-target.restricted-point {
  background: rgb(214 56 56 / 92%);
}

.topo-marker.editor-point-target.restricted-line-point {
  background: rgb(220 38 38 / 94%);
  box-shadow: 0 0 0 3px rgb(127 29 29 / 45%), 0 2px 7px rgb(0 0 0 / 48%);
}

.topo-number {
  box-sizing: border-box;
  transform: translate(calc(-50% + var(--topo-number-offset-x, 0px)), -50%);
  min-width: 18px;
  width: 18px;
  height: 18px;
  min-height: 18px;
  max-height: 18px;
  border: 1px solid rgb(255 255 255 / 82%);
  border-radius: 999px;
  background: rgb(15 23 42 / 72%);
  color: rgb(255 255 255 / 96%);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  box-shadow: 0 1px 5px rgb(0 0 0 / 36%);
  padding: 0;
  text-align: center;
}

.topo-number.active {
  background: rgb(37 99 235 / 86%);
}

.topo-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--chip-bg) 100%);
  padding: 9px;
}

.topo-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #4b5563;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  white-space: nowrap;
}

.topo-legend i {
  display: inline-block;
  flex: 0 0 auto;
  font-style: normal;
}

.legend-line {
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: #9aa3af;
  box-shadow: 0 1px 2px rgb(15 23 42 / 16%);
}

.legend-line.active {
  height: 3px;
  background: #2f80ff;
}

.legend-start {
  display: inline-grid !important;
  width: 14px;
  height: 14px;
  place-items: center;
  border: 2px solid var(--on-color);
  border-radius: 999px;
  background: var(--line-strong);
  box-shadow: 0 0 0 1px var(--line-hover), 0 1px 4px rgb(15 23 42 / 18%);
}

.legend-start.active {
  background: #2f80ff;
  color: var(--on-color);
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 0 0 1px rgb(47 128 255 / 36%), 0 1px 4px rgb(15 23 42 / 18%);
}

.legend-start-area {
  display: inline-grid !important;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 2px solid #94a3b8;
  border-radius: 999px;
  background: rgb(148 163 184 / 22%);
  box-shadow: 0 0 0 1px var(--line-strong), 0 1px 4px rgb(15 23 42 / 14%);
}

.legend-number {
  display: inline-grid !important;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid var(--on-color);
  border-radius: 999px;
  background: #111827;
  color: rgb(255 255 255 / 96%);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 1px 4px rgb(15 23 42 / 20%);
}

.legend-restricted {
  width: 14px;
  height: 14px;
  border: 2px solid var(--on-color);
  border-radius: 999px;
  background:
    linear-gradient(45deg, transparent 42%, rgb(214 56 56) 42% 58%, transparent 58%),
    rgb(214 56 56 / 82%);
  box-shadow: 0 0 0 1px rgb(214 56 56 / 20%), 0 1px 4px rgb(15 23 42 / 18%);
}

.legend-restricted-line {
  width: 24px;
  height: 0;
  border-top: 3px dashed rgb(220 38 38 / 92%);
  filter: drop-shadow(0 1px 0 rgb(255 255 255 / 80%));
}

.restriction-note {
  border: 1px solid var(--danger-border);
  border-radius: 10px;
  background: var(--danger-soft-strong);
  color: var(--danger-ink);
  margin: 0;
  padding: 10px 12px;
  line-height: 1.4;
}

.problem-credit {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel-soft);
  color: #29313d;
  margin: 0;
  padding: 10px 12px;
  line-height: 1.4;
}

.topo-sidebar {
  display: grid;
  align-content: start;
  gap: 14px;
}

.topo-problems {
  gap: 8px;
}

.problem-select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--ink);
  text-align: left;
}

.problem-select.active {
  border-color: rgb(37 99 235 / 42%);
  background: var(--accent-soft);
}

.secondary-action.active {
  border-color: rgb(37 99 235 / 42%);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.danger-action {
  border-color: var(--danger-border);
  background: var(--danger-soft-strong);
  color: var(--danger-ink);
}

.editor-tools {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  padding: 12px;
}

.editor-map-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  padding: 12px;
}

.editor-map-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.editor-map-header strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 15px;
}

.editor-boulder-map {
  min-height: 230px;
  cursor: crosshair;
}

.editor-boulder-map .boulder-map-marker span {
  display: grid;
  place-items: center;
  color: var(--on-color);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.editor-boulder-pin {
  cursor: pointer;
  padding: 5px 8px 5px 5px;
}

.editor-boulder-pin span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: var(--on-color);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.editor-map-fields label {
  display: grid;
  flex: 1;
  gap: 4px;
}

.editor-map-fields {
  align-items: end;
}

.editor-map-fields .editor-guide-field {
  flex: 0 0 72px;
}

.editor-coordinate-fields label {
  flex-basis: 0;
}

.editor-map-fields input {
  width: 100%;
}

.editor-photo-stack {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.editor-canvas-tools {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 8;
  display: grid;
  gap: 6px;
  justify-items: end;
  width: max-content;
  max-width: calc(100% - 20px);
  color: var(--on-color);
  pointer-events: none;
}

.editor-canvas-toolbar,
.editor-canvas-drawer {
  pointer-events: auto;
}

.editor-canvas-toolbar {
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  width: max-content;
  max-width: 100%;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 999px;
  background: rgb(15 23 42 / 68%);
  box-shadow: 0 6px 18px rgb(15 23 42 / 20%);
  padding: 3px;
  backdrop-filter: blur(8px);
}

.editor-tool-button {
  display: inline-flex;
  min-width: 32px;
  min-height: 32px;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: rgb(255 255 255 / 90%);
  padding: 0;
  font: inherit;
  font-size: 16px;
  font-weight: 850;
  line-height: 1;
  box-shadow: none;
}

.editor-tool-button small {
  display: none;
}

.editor-tool-button:hover:not(:disabled) {
  border-color: rgb(255 255 255 / 18%);
  background: rgb(255 255 255 / 12%);
}

.editor-tool-button.active {
  border-color: rgb(147 197 253 / 70%);
  background: rgb(37 99 235 / 88%);
  color: var(--on-color);
}

.editor-tool-button.apply:not(:disabled) {
  background: rgb(22 163 74 / 82%);
  color: var(--on-color);
}

.editor-tool-button:disabled {
  color: rgb(255 255 255 / 34%);
  cursor: not-allowed;
}

.editor-tool-button.icon-only {
  min-width: 32px;
  width: 32px;
  padding: 0;
}

.editor-tool-divider {
  width: 1px;
  height: 20px;
  margin: 0 1px;
  background: rgb(255 255 255 / 18%);
}

.editor-canvas-drawer {
  grid-row: 2;
  display: grid;
  gap: 7px;
  width: min(300px, calc(100vw - 52px));
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 10px;
  background: rgb(15 23 42 / 78%);
  box-shadow: 0 8px 24px rgb(15 23 42 / 24%);
  padding: 10px;
  backdrop-filter: blur(10px);
}

.editor-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.editor-canvas-drawer p,
.editor-canvas-drawer label {
  margin: 0;
  color: rgb(255 255 255 / 82%);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.editor-canvas-drawer textarea {
  width: 100%;
  min-height: 58px;
  resize: vertical;
  border-color: rgb(255 255 255 / 20%);
  background: rgb(255 255 255 / 92%);
  color: var(--ink);
  padding: 8px 9px;
  font-size: 13px;
}

.editor-start-radius-controls {
  display: grid;
  gap: 8px;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 8px;
  background: rgb(15 23 42 / 35%);
  padding: 8px;
}

.editor-start-radius-controls.disabled {
  opacity: .55;
}

.editor-start-radius-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.editor-start-radius-head strong {
  color: rgb(255 255 255 / 92%);
  font-size: 12px;
  font-weight: 800;
}

.editor-start-radius-controls input[type="range"] {
  width: 100%;
  accent-color: #60a5fa;
}

.editor-start-radius-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.editor-start-radius-actions .editor-tool-button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 11px;
}

.editor-photo-tabs {
  position: static;
  flex-direction: row;
  width: 100%;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
}

.photo-upload-button {
  cursor: pointer;
}

.photo-upload-card {
  display: grid;
  gap: 14px;
  min-height: 360px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--panel-soft);
  padding: 24px;
  text-align: center;
}

.photo-upload-card strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 22px;
}

.photo-upload-target {
  display: inline-grid;
  min-height: 40px;
  place-items: center;
  border: 1px solid rgb(37 99 235 / 28%);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0 14px;
  cursor: pointer;
  font-weight: 850;
}

.photo-upload-target input {
  display: none;
}

.problem-form {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 10px;
}

.problem-form input,
.problem-form select,
textarea#restrictionNote {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--panel);
  color: #29313d;
  padding: 8px 10px;
  font: inherit;
}

.problem-form select {
  appearance: auto;
}

.style-choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.style-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel);
  color: #4b5563;
  padding: 0 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.style-choice.active {
  border-color: rgb(37 99 235 / 42%);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.style-choice input {
  width: 13px;
  min-height: 13px;
  accent-color: var(--accent);
}

textarea#restrictionNote {
  min-height: 76px;
  resize: vertical;
}

.tool-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.json-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

textarea#lineJson {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--panel);
  color: #29313d;
  padding: 10px;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.full-width {
  width: 100%;
}

.detail-empty {
  display: grid;
  min-height: 280px;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.detail-section {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 18px;
}

.grade-table {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
  gap: 2px;
  overflow: hidden;
  padding: 2px 0 4px;
}

.grade-bar {
  display: grid;
  grid-template-rows: 15px 38px 15px;
  align-items: end;
  justify-items: center;
  gap: 2px;
  min-width: 0;
  min-height: 80px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  padding: 5px 2px 4px;
  text-align: center;
  box-shadow: none;
}

.grade-bar:hover:not(:disabled) {
  border-color: var(--line-hover);
  background: var(--chip-hover);
}

.grade-bar.active {
  border-color: rgb(37 99 235 / 42%);
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px rgb(37 99 235 / 10%);
}

.grade-bar:disabled {
  color: #a0a7b2;
  cursor: default;
}

.grade-bar span {
  align-self: center;
  color: #5b6573;
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
}

.grade-track {
  display: flex;
  align-items: end;
  justify-content: center;
  overflow: hidden;
  width: 7px;
  height: 38px;
  border-radius: 999px;
  background: var(--chip-bg);
  box-shadow: inset 0 0 0 1px rgb(23 26 31 / 4%);
}

.grade-track i {
  display: block;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
}

.grade-bar:disabled .grade-track i {
  background: var(--line-strong);
}

.grade-bar strong {
  display: inline-grid;
  min-width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 999px;
  background: transparent;
  color: #5f6976;
  font-size: 10px;
}

.grade-bar.active strong {
  background: transparent;
  color: var(--accent-ink);
}

.problem-list {
  display: grid;
  gap: 8px;
}

.problem-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--ink);
  padding: 12px;
  text-align: left;
  box-shadow: none;
}

.problem-row p {
  margin-bottom: 0;
}

.representative-problem {
  width: 100%;
}

.representative-problem:hover {
  border-color: var(--line-hover);
  background: var(--chip-hover);
}

.meta-row {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

@media (max-width: 1060px) {
  .app-shell {
    grid-template-columns: 290px 1fr;
  }

  .detail-panel {
    grid-column: 1 / -1;
    position: static;
  }

  .area-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1320px) {
  .map-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
  }

  .app-shell.area-focused {
    grid-template-columns: 72px 148px minmax(0, 1fr);
  }

  .app-shell.area-focused.topo-focused {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-rows: 72px minmax(72px, 1fr);
  }

  .topo-layout {
    grid-template-columns: minmax(240px, .52fr) minmax(0, 1fr);
    grid-template-areas:
      "map photo"
      "problems photo";
    gap: 10px;
  }

  .topo-photo-panel {
    --topo-stage-height: clamp(360px, calc(100dvh - 320px), 540px);
  }

  .topo-map-panel {
    grid-area: map;
  }

  .topo-layout.map-collapsed {
    grid-template-columns: minmax(240px, .52fr) minmax(0, 1fr);
    grid-template-areas:
      "map photo"
      "problems photo";
  }

  .topo-problem-panel {
    grid-area: problems;
    --topo-problem-panel-max-height: min(44dvh, 420px);
    max-height: var(--topo-problem-panel-max-height);
    gap: 8px;
  }

  .topo-index-list {
    max-height: calc(var(--topo-problem-panel-max-height) - 48px);
    padding-right: 4px;
  }

  .topo-photo-panel {
    grid-area: photo;
  }

  .topo-workbench {
    grid-template-columns: 1fr;
  }

  .area-focused .topo-workbench {
    grid-template-columns: 1fr;
  }

  .topo-photo-panel .topo-workbench,
  .area-focused .topo-photo-panel .topo-workbench {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .editor-shell {
    padding: 0 10px 24px;
  }

  .editor-panel {
    padding: 12px;
  }

  .editor-panel .detail-titlebar {
    gap: 10px;
  }

  .editor-workbench {
    margin-top: 12px;
  }

  .editor-canvas-tools {
    top: 6px;
    right: 6px;
    max-width: calc(100% - 12px);
  }

  .editor-canvas-toolbar {
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .editor-canvas-toolbar::-webkit-scrollbar {
    display: none;
  }

  .editor-tool-button {
    min-width: 30px;
    min-height: 30px;
    width: 30px;
    height: 30px;
    padding: 0;
  }

  .editor-tool-button.icon-only {
    min-width: 30px;
    width: 30px;
  }

  body {
    overflow: auto;
  }

  body.filters-open {
    overflow: hidden;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px 12px 10px;
  }

  .hero::after {
    display: none;
  }

  .hero h1 {
    margin-bottom: 0;
    font-size: 24px;
    line-height: 1.08;
  }

  .lede {
    display: none;
  }

  .hero-actions {
    display: flex;
    justify-content: end;
  }

  .hero-toolbar {
    gap: 6px;
  }

  .hero-chip,
  .site-disclaimer summary.hero-chip,
  .hero-toolbar .contribute,
  .hero-toolbar .etiquette-link {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 12px;
  }

  .settings-toggle {
    width: 36px;
    flex-basis: 36px;
  }

  .site-disclaimer summary span:last-child {
    display: none;
  }

  .disclaimer-body {
    position: fixed;
    top: 82px;
    right: 10px;
    left: 10px;
    width: auto;
    grid-template-columns: 1fr;
    gap: 12px;
    max-height: calc(100vh - 104px);
    padding: 14px;
  }

  .app-shell {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    height: auto;
    padding: 0 10px 16px;
  }

  .app-shell.area-focused {
    display: grid;
  }

  .app-shell.map-mode {
    grid-template-columns: 1fr;
  }

  .app-shell.area-focused.topo-focused {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .filters,
  .results-panel,
  .detail-panel {
    max-height: none;
    margin-bottom: 0;
    position: static;
  }

  .filters {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 10px;
    overflow: visible;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 20px rgb(23 26 31 / 8%);
  }

  .filters-open .filters {
    z-index: 60;
  }

  .mobile-filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
  }

  .mobile-filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    min-width: 84px;
    color: var(--accent);
    white-space: nowrap;
  }

  .filter-search {
    min-width: 0;
  }

  .search-label,
  .area-focused .search-label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
    writing-mode: initial;
    transform: none;
    margin-bottom: 8px;
  }

  .rail-icon,
  .area-focused .rail-icon {
    display: none;
  }

  .area-focused #search {
    display: block;
  }

  .filter-drawer {
    position: fixed;
    inset: calc(env(safe-area-inset-top) + 188px) 0 0 0;
    z-index: 70;
    display: flex;
    flex-direction: column;
    max-height: none;
    border: 1px solid var(--line);
    border-radius: 14px 14px 0 0;
    background: var(--panel);
    padding: 14px;
    box-shadow: 0 -18px 40px rgb(23 26 31 / 18%);
    overflow-y: auto;
    transform: translateY(105%);
    transition: transform .2s ease;
  }

  .filters-open .filter-drawer {
    transform: translateY(0);
  }

  .filter-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 0 0 auto;
    margin-bottom: 10px;
  }

  .filter-drawer-head h2 {
    margin-bottom: 0;
    font-size: 20px;
    line-height: 1.15;
  }

  .filter-drawer-close {
    min-width: auto;
    flex: 0 0 auto;
  }

  .filter-drawer-actions {
    display: grid;
    position: static;
    flex: 0 0 auto;
    margin: 14px -14px -14px;
    border-top: 1px solid var(--line);
    background: var(--panel);
    padding: 12px 14px 14px;
  }

  .filter-drawer-actions .secondary-action {
    width: 100%;
    min-height: 44px;
  }

  .filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: block;
    border: 0;
    border-radius: 0;
    background: rgb(23 26 31 / 36%);
    padding: 0;
    box-shadow: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  .filters-open .filter-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .filter-group {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 14px;
  }

  .filter-group label {
    min-height: 34px;
    padding: 5px 4px;
  }

  .filter-group label span {
    min-width: 0;
    line-height: 1.25;
  }

  .area-focused .filter-nav,
  .area-focused .filter-group {
    display: grid;
  }

  .area-focused .summary,
  .area-focused .chips {
    display: revert;
  }

  .filter-nav {
    flex: 0 0 auto;
    margin-top: 0;
  }

  .topo-focused .filters {
    display: none;
  }

  .topo-focused .results-panel {
    display: none;
  }

  .topo-focused .results-panel::before {
    content: none;
  }

  .topo-focused .focused-mode-nav,
  .topo-focused .results-head,
  .topo-focused .results {
    display: none !important;
  }

  .topo-focused .detail-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .results-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 12px;
  }

  .map-mode .results-panel {
    grid-column: auto;
  }

  .results-panel,
  .detail-panel {
    padding: 14px;
    overflow: visible;
  }

  .detail-panel {
    scroll-margin-top: 92px;
  }

  .area-card {
    padding: 14px;
  }

  .contribute {
    min-height: 38px;
    padding: 8px 12px;
  }

  .language-option,
  .theme-option {
    min-height: 32px;
    padding: 5px 7px;
    font-size: 12px;
  }

  .theme-option {
    padding: 5px;
  }

  .map-workspace,
  .map-preview-actions {
    grid-template-columns: 1fr;
  }

  .map-workspace {
    align-items: start;
    gap: 10px;
  }

  .map-info-panel {
    max-height: none;
    overflow: visible;
    scroll-margin-top: 92px;
  }

  .map-area-preview {
    padding: 12px;
  }

  .map-preview-title h4 {
    font-size: 20px;
    line-height: 1.12;
  }

  .map-preview-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-selected .secondary-action,
  .map-preview-actions .secondary-action {
    width: 100%;
  }

  .map-head {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  .parking-card-main,
  .mat-rental-card-main {
    display: grid;
  }

  .guidebook-card:not(.has-sellers) {
    display: grid;
  }

  .guidebook-seller-groups {
    grid-template-columns: 1fr;
  }

  .guidebook-seller-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .parking-map-link,
  .guidebook-link {
    justify-self: start;
  }

  .topo-photo-frame.has-photo-rail {
    display: block;
  }

  .photo-tabs {
    position: static;
    flex-direction: row;
    width: 100%;
    max-height: none;
    margin-top: 8px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .map-mode .japan-map {
    width: 100%;
    height: clamp(340px, 48vh, 460px);
    min-height: 340px;
  }

  .area-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topo-screen-head,
  .topo-head-actions,
  .topo-filterbar,
  .topo-layout {
    grid-template-columns: 1fr;
  }

  .topo-screen-head,
  .topo-head-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .topo-screen {
    gap: 10px;
  }

  .topo-screen-head {
    gap: 8px;
  }

  .topo-screen-head h2 {
    font-size: 20px;
    line-height: 1.15;
  }

  .topo-screen-head .subtitle {
    margin-bottom: 0;
    font-size: 13px;
  }

  .topo-head-actions {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 6px;
  }

  .topo-head-actions .secondary-action {
    min-height: 38px;
    padding: 8px 10px;
  }

  .mobile-topo-map-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .topo-editor-action {
    width: 38px;
    height: 38px;
  }

  .topo-filterbar {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    border-radius: 10px;
    padding: 8px;
  }

  .topo-filterbar input[type="search"] {
    grid-column: 1 / -1;
  }

  .topo-filterbar input[type="search"],
  .topo-filterbar select,
  .topo-filterbar .secondary-action {
    min-height: 38px;
    padding: 7px 8px;
    font-size: 13px;
  }

  .topo-filterbar .secondary-action {
    grid-column: 1 / -1;
  }

  .topo-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "photo"
      "problems";
    gap: 10px;
    align-items: start;
  }

  .topo-layout.mobile-map-open {
    grid-template-areas:
      "map"
      "photo"
      "problems";
  }

  .topo-map-panel {
    display: none;
    grid-area: map;
  }

  .topo-layout.mobile-map-open .topo-map-panel {
    display: grid;
    gap: 8px;
  }

  .topo-map-head {
    display: flex;
  }

  .topo-local-map {
    min-height: 220px;
  }

  .topo-problem-panel {
    grid-area: problems;
    max-height: min(38dvh, 320px);
    gap: 6px;
  }

  .topo-panel-head {
    min-height: 34px;
    padding: 6px 8px;
  }

  .topo-index-list {
    max-height: calc(min(38dvh, 320px) - 40px);
    overflow-y: auto;
    gap: 5px;
    padding-right: 0;
  }

  .problem-index-row {
    min-height: auto;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 5px;
    padding: 8px;
  }

  .problem-index-row strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
  }

  .problem-index-row .subtitle {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 0;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 11px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .problem-index-row .chips {
    justify-content: start;
  }

  .problem-index-row .chip {
    padding: 2px 6px;
    font-size: 11px;
  }

  .topo-photo-panel {
    grid-area: photo;
    --topo-stage-height: min(70dvh, 520px);
  }

  .topo-photo-panel .topo-workbench,
  .area-focused .topo-photo-panel .topo-workbench {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .topo-photo-panel .topo-photo-frame.has-photo-rail {
    display: block;
  }

  .topo-stage {
    width: 100%;
    max-height: var(--topo-stage-height);
    border-radius: 10px;
  }

  .topo-stage img {
    max-height: var(--topo-stage-height);
    object-fit: contain;
  }

  .topo-expand-toggle {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border: 1px solid rgb(255 255 255 / 28%);
    border-radius: 999px;
    background: linear-gradient(180deg, rgb(15 23 42 / 26%), rgb(15 23 42 / 40%));
    color: var(--on-color);
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0;
    box-shadow: 0 8px 20px rgb(15 23 42 / 10%);
    backdrop-filter: blur(5px);
  }

  .topo-stage-controls {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: calc(100% - 126px);
  }

  .topo-lines-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border: 1px solid rgb(255 255 255 / 28%);
    border-radius: 999px;
    background: linear-gradient(180deg, rgb(15 23 42 / 26%), rgb(15 23 42 / 40%));
    color: var(--on-color);
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0;
    box-shadow: 0 8px 20px rgb(15 23 42 / 10%);
    backdrop-filter: blur(5px);
  }

  .topo-lines-toggle[aria-pressed="true"] {
    border-color: rgb(255 255 255 / 28%);
  }

  .topo-selected-caption {
    position: absolute;
    right: 8px;
    bottom: 8px;
    left: 8px;
    z-index: 4;
    display: grid;
    gap: 1px;
    border: 1px solid rgb(255 255 255 / 28%);
    border-radius: 10px;
    background: linear-gradient(180deg, rgb(15 23 42 / 26%), rgb(15 23 42 / 40%));
    color: rgb(255 255 255 / 92%);
    padding: 7px 10px;
    box-shadow: 0 10px 24px rgb(15 23 42 / 10%);
    backdrop-filter: blur(5px);
    pointer-events: none;
  }

  .topo-selected-caption strong {
    overflow: hidden;
    color: var(--on-color);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topo-selected-caption em {
    overflow: hidden;
    color: rgb(255 255 255 / 72%);
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topo-legend,
  .topo-photo-panel .summary {
    display: none;
  }

  .topo-screen.topo-expanded {
    gap: 8px;
  }

  .topo-screen.topo-expanded .topo-screen-head,
  .topo-screen.topo-expanded .topo-filterbar,
  .topo-screen.topo-expanded .topo-map-panel,
  .topo-screen.topo-expanded .topo-problem-panel,
  .topo-screen.topo-expanded .photo-tabs {
    display: none;
  }

  .topo-screen.topo-expanded .topo-layout,
  .topo-screen.topo-expanded .topo-layout.mobile-map-open {
    display: block;
  }

  .topo-screen.topo-expanded .topo-photo-panel {
    --topo-stage-height: min(78dvh, 690px);
  }

  .topo-screen.topo-expanded .topo-stage {
    width: auto;
    aspect-ratio: auto;
    height: auto;
    border-radius: 14px;
    background: transparent;
    max-height: none;
    overflow: visible;
  }

  .topo-screen.topo-expanded .topo-stage img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: var(--topo-stage-height);
    object-fit: contain;
  }

  .topo-screen.topo-expanded .topo-selected-caption {
    right: 10px;
    bottom: 10px;
    left: 10px;
    padding: 8px 12px;
  }

  .topo-empty {
    min-height: 180px;
  }

  .season-section {
    align-items: start;
    flex-direction: column;
  }

  .season-section .season-list {
    justify-content: flex-start;
  }

  .meta-row,
  .card-top,
  .problem-row,
  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .topo-workbench {
    grid-template-columns: 1fr;
  }

  .topo-photo-panel .topo-workbench,
  .area-focused .topo-photo-panel .topo-workbench {
    grid-template-columns: 1fr;
  }
}

html[data-theme="dark"] .leaflet-container {
  background: var(--map-canvas);
}

html[data-theme="dark"] .leaflet-control-attribution,
html[data-theme="dark"] .leaflet-bar a,
html[data-theme="dark"] .real-map .leaflet-control-zoom a {
  background: var(--panel);
  color: var(--muted);
  border-color: var(--line);
}

html[data-theme="dark"] .leaflet-bar a:hover {
  background: var(--chip-hover);
  color: var(--ink);
}

html[data-theme="dark"] .japan-outline-img {
  opacity: .72;
  filter: invert(1) brightness(1.25) contrast(0.9);
}

html[data-theme="dark"] .area-card.active,
html[data-theme="dark"] .boulder-row.active,
html[data-theme="dark"] .problem-select.active,
html[data-theme="dark"] .map-pin.active,
html[data-theme="dark"] .boulder-pin.active {
  background: var(--accent-soft);
  border-color: var(--accent-soft-border);
}

html[data-theme="dark"] select,
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] textarea {
  color-scheme: dark;
}

/* Etiquette page */

body.etiquette-page {
  overflow-x: hidden;
  overflow-y: auto;
  height: auto;
  max-height: none;
}

.etiquette-hero {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.etiquette-hero .lede {
  margin-top: 8px;
}

.etiquette-motto {
  margin: 10px 0 0;
  max-width: 36em;
  color: var(--ink);
  font-size: clamp(16px, 2.2vw, 20px);
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.etiquette-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.etiquette-shell {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 760px);
  gap: 40px;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 72px;
}

.etiquette-toc {
  position: sticky;
  top: 24px;
  align-self: start;
  width: 100%;
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 16px 0;
}

.etiquette-toc-label {
  margin: 0 0 10px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.etiquette-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.etiquette-toc a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.35;
}

.etiquette-toc a:hover {
  color: var(--accent-ink);
}

.etiquette-article {
  display: grid;
  gap: 42px;
}

.etiquette-section {
  display: grid;
  gap: 14px;
  padding-top: 8px;
}

.etiquette-kicker {
  margin: 0;
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.etiquette-section h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.etiquette-section > p,
.etiquette-prose p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.etiquette-prose {
  display: grid;
  gap: 12px;
}

.etiquette-callout {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.etiquette-callout strong {
  font-size: 15px;
}

.etiquette-callout p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.etiquette-callout-danger {
  border-color: var(--danger-border);
  background: var(--danger-soft);
}

.etiquette-callout-danger strong {
  color: var(--danger-ink);
}

.etiquette-callout-warning {
  border-color: var(--warning-border);
  background: var(--warning-soft);
}

.etiquette-callout-warning strong {
  color: var(--warning-ink);
}

.etiquette-emphasis {
  display: inline;
  color: var(--danger-ink);
  font-weight: 800;
  background: color-mix(in srgb, var(--danger-soft) 80%, transparent);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0 0.15em;
  border-radius: 4px;
}

.etiquette-infographic {
  margin: 8px 0 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--accent-soft) 70%, transparent), transparent 42%),
    var(--panel);
}

.etiquette-infographic figcaption {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

.etiquette-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.etiquette-svg .svg-label {
  fill: var(--ink);
  font-size: 13px;
  font-weight: 750;
  font-family: inherit;
}

.etiquette-svg .svg-caption {
  fill: var(--muted);
  font-size: 11px;
  font-family: inherit;
}

.etiquette-phrases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.etiquette-phrase {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-tint);
}

.etiquette-phrase-ja {
  color: var(--ink);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.3;
}

.etiquette-phrase-say {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 1.35;
}

.etiquette-phrase-en {
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 650;
}

.etiquette-phrase-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.etiquette-fire-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 2px;
}

.etiquette-fire-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
}

.etiquette-fire-panel p {
  margin: 0;
  color: var(--warning-ink);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
}

.etiquette-fire-banner {
  border-color: var(--warning-border);
  background: var(--warning-soft);
}

.etiquette-footer {
  display: grid;
  gap: 16px;
  justify-items: start;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.etiquette-footer p {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .etiquette-shell {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px 16px 56px;
  }

  .etiquette-toc {
    position: static;
    padding: 0 0 8px;
    border-bottom: 1px solid var(--line);
  }

  .etiquette-toc ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .etiquette-phrases {
    grid-template-columns: 1fr;
  }

  .etiquette-hero {
    position: static;
  }
}

@media (max-width: 640px) {
  .etiquette-infographic {
    padding: 12px;
  }

  .etiquette-svg .svg-label {
    font-size: 12px;
  }

  .etiquette-svg .svg-caption {
    font-size: 10px;
  }
}
