* { box-sizing: border-box; }

:root {
  --bg-page: #f4efe7;
  --bg-panel: rgba(255, 252, 247, 0.94);
  --bg-panel-strong: #fffaf3;
  --bg-soft: #efe4d4;
  --bg-map-fallback: #d6d1c8;
  --text-main: #171411;
  --text-sub: #675f56;
  --text-soft: #857b71;
  --line-soft: rgba(82, 63, 36, 0.12);
  --line-strong: rgba(82, 63, 36, 0.18);
  --ink-active: #211d19;
  --ink-active-soft: #29241f;
  --seg-mode-bg: rgba(255, 249, 240, 0.96);
  --seg-nav-bg: rgba(247, 239, 228, 0.94);
  --seg-filter-bg: rgba(242, 234, 221, 0.92);
  --accent-1: #ffd274;
  --accent-2: #ff9f7d;
  --accent-3: #1c6ef2;
  --shadow-soft: 0 12px 34px rgba(35, 26, 16, 0.08);
  --shadow-strong: 0 24px 56px rgba(28, 20, 12, 0.18);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Avenir Next", "Hiragino Sans", "Yu Gothic", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 210, 116, 0.32), transparent 30%),
    radial-gradient(circle at top right, rgba(255, 159, 125, 0.22), transparent 26%),
    linear-gradient(180deg, #f7f0e7 0%, #f1e8dc 100%);
  color: var(--text-main);
  font-size: 16px;
  line-height: 1.45;
}

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

body.controls-open {
  overflow: hidden;
}

@media (max-width: 1023px) {
  .controls-toggle {
    background: rgba(232, 232, 232, 0.96);
    border-color: rgba(86, 82, 77, 0.18);
    color: #201a15;
    box-shadow: 0 10px 22px rgba(56, 49, 42, 0.12);
  }

  .controls-toggle-icon,
  .controls-toggle-label {
    color: #201a15;
  }
}

.app-header {
  position: relative;
  z-index: 20;
  flex: 0 0 auto;
  padding: 14px 14px 12px;
  color: #fffdf9;
  background:
    linear-gradient(135deg, rgba(20, 17, 14, 0.96) 0%, rgba(43, 35, 28, 0.92) 100%),
    linear-gradient(180deg, rgba(255, 210, 116, 0.18), transparent 70%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.app-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-header-copy {
  min-width: 0;
}

.app-header h1 {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.app-subtitle {
  margin: 4px 0 0;
  font-size: 0.74rem;
  color: rgba(255, 253, 249, 0.8);
}

.controls-toggle,
.controls-close,
.reopen-controls,
.mode-chip,
.filter-chip,
.nav-btn {
  -webkit-tap-highlight-color: transparent;
}

.controls-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fffdf9;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.controls-toggle-icon {
  font-size: 0.94rem;
  line-height: 1;
}

.controls-toggle-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

@media (max-width: 1023px) {
  .app-header .controls-toggle {
    background: rgba(232, 232, 232, 0.96);
    border-color: rgba(86, 82, 77, 0.18);
    color: #201a15;
    box-shadow: 0 10px 22px rgba(56, 49, 42, 0.12);
  }

  .app-header .controls-toggle-icon,
  .app-header .controls-toggle-label {
    color: #201a15;
  }
}

.app-layout {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.map-pane {
  position: relative;
  order: -1;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 38svh;
  background: linear-gradient(180deg, #dfe8ef 0%, #cfd8df 100%);
}

.map-canvas {
  position: absolute;
  inset: 0;
  min-height: 100%;
}

.map-fallback {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 14px 14px 72px;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.28), transparent 18%),
    linear-gradient(180deg, rgba(227, 220, 207, 0.96) 0%, rgba(208, 199, 185, 0.98) 100%);
}

.map-fallback-grid {
  display: grid;
  max-width: calc(100% - 8px);
  gap: 6px;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 251, 243, 0.84);
  color: #6b6256;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.map-fallback-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #201a15;
}

.map-fallback-note {
  color: #5c564d;
  font-size: 0.75rem;
  line-height: 1.35;
}

.map-fallback-dots,
.map-fallback-user {
  position: absolute;
  inset: 0;
}

.map-fallback-dot,
.map-fallback-user-dot {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 999px;
}

.map-fallback-dot {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  background: #171411;
  box-shadow: 0 6px 16px rgba(20, 17, 14, 0.16);
}

.map-fallback-dot.is-featured {
  width: 14px;
  height: 14px;
  background: #f58d61;
}

.map-fallback-dot.is-focused {
  width: 18px;
  height: 18px;
  background: #1c6ef2;
}

.map-fallback-user-dot {
  width: 16px;
  height: 16px;
  border: 3px solid rgba(255, 255, 255, 0.92);
  background: #1c6ef2;
  box-shadow: 0 0 0 6px rgba(28, 110, 242, 0.16);
}

.map-fallback-legend {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 72px;
  z-index: 1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.map-fallback-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 251, 243, 0.82);
  color: #4e453b;
  font-size: 0.7rem;
  font-weight: 700;
}

.map-fallback-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.map-fallback-legend-swatch.poi { background: #171411; }
.map-fallback-legend-swatch.focused { background: #1c6ef2; }
.map-fallback-legend-swatch.user { background: #1c6ef2; box-shadow: 0 0 0 3px rgba(28, 110, 242, 0.16); }

.map-notice {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px;
  text-align: center;
  color: #5a544d;
  font-size: 0.92rem;
  background: linear-gradient(180deg, rgba(255, 249, 239, 0.92), rgba(248, 240, 228, 0.96));
}

.map-notice-sub {
  color: #847b71;
  font-size: 0.78rem;
}

.map-infowindow {
  font-size: 0.86rem;
  line-height: 1.45;
  max-width: 220px;
}

.left-pane {
  order: 0;
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.94), rgba(249, 243, 235, 0.98));
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
  margin-top: -18px;
  box-shadow: 0 -12px 26px rgba(36, 28, 18, 0.08);
  backdrop-filter: blur(14px);
}

.controls-backdrop {
  position: fixed;
  inset: 0;
  z-index: 29;
  background: rgba(16, 13, 10, 0.34);
  backdrop-filter: blur(3px);
}

.left-pane-controls {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 0 10px calc(10px + env(safe-area-inset-bottom));
  transform: translateY(calc(100% + 28px));
  transition: transform 220ms ease;
  pointer-events: none;
}

body.controls-open .left-pane-controls {
  transform: translateY(0);
  pointer-events: auto;
}

.controls-shell {
  display: grid;
  gap: 12px;
  max-height: min(78dvh, 720px);
  overflow-y: auto;
  padding: 16px 14px 14px;
  border: 1px solid rgba(93, 69, 40, 0.08);
  border-radius: 24px 24px 18px 18px;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.98) 0%, rgba(247, 240, 231, 0.98) 100%);
  box-shadow: var(--shadow-strong);
}

.controls-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.controls-panel-overlay {
  display: grid;
  gap: 12px;
}

.current-context-overlay {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(83, 63, 38, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
}

.controls-panel-kicker {
  display: block;
  margin-bottom: 4px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #856b47;
}

.controls-panel-title {
  display: block;
  font-size: 1rem;
}

.controls-close {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-main);
  font-size: 0.76rem;
  font-weight: 700;
}

.mode-bar,
.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

.filter-apply {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(23, 20, 17, 0.12);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 100%);
  color: #171411;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: 0 12px 22px rgba(187, 117, 77, 0.16);
}

.mode-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
  padding-bottom: 0;
  padding: 10px;
  border: 1px solid rgba(73, 54, 31, 0.1);
  border-radius: 14px;
  background: var(--seg-mode-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.mode-chip {
  width: 100%;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid rgba(34, 27, 21, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-main);
  text-align: left;
  box-shadow: 0 12px 18px rgba(25, 19, 13, 0.05);
}

.mode-chip[aria-pressed="true"] {
  background: var(--ink-active);
  border-color: var(--ink-active);
  color: #fffaf4;
  box-shadow: 0 16px 28px rgba(26, 21, 16, 0.2);
}

.mode-chip-title {
  display: block;
  margin-bottom: 2px;
  font-size: 0.78rem;
  font-weight: 700;
}

.mode-chip-copy {
  display: block;
  font-size: 0.64rem;
  line-height: 1.22;
  color: rgba(23, 20, 17, 0.72);
}

.mode-chip[aria-pressed="true"] .mode-chip-copy {
  color: rgba(255, 250, 244, 0.84);
}

.filter-bar[hidden] {
  display: none;
}

.bottom-nav {
  padding-top: 10px;
  border-top: 1px solid rgba(73, 54, 31, 0.14);
}

#bottom-nav {
  padding: 10px;
  border: 1px solid rgba(73, 54, 31, 0.1);
  border-radius: 14px;
  background: var(--seg-nav-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

#filter-bar {
  margin-top: 4px;
  padding: 10px;
  border: 1px solid rgba(73, 54, 31, 0.12);
  border-radius: 14px;
  background: var(--seg-filter-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.filter-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding: 7px 11px;
  border: 1px solid rgba(60, 45, 28, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #3a3128;
  font-size: 0.74rem;
}

.filter-chip-none {
  border-style: dashed;
  background: rgba(242, 236, 228, 0.92);
}

.filter-chip-none[aria-pressed="true"] {
  background: var(--ink-active-soft);
  border-color: var(--ink-active-soft);
  color: #fffaf4;
}

.filter-chip-check {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border: 1.6px solid rgba(86, 68, 45, 0.42);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.filter-chip[aria-pressed="true"] .filter-chip-check {
  border-color: var(--ink-active-soft);
  background: var(--ink-active-soft);
  position: relative;
}

.filter-chip[aria-pressed="true"] .filter-chip-check::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 1px;
  width: 5px;
  height: 8px;
  border-right: 2px solid #fffaf4;
  border-bottom: 2px solid #fffaf4;
  transform: rotate(40deg);
}

.filter-chip-label {
  min-width: 0;
}

.filter-chip[aria-pressed="true"] {
  background: var(--ink-active-soft);
  border-color: var(--ink-active-soft);
  color: #fffaf4;
  font-weight: 700;
}

.filter-chip[aria-pressed="true"] .filter-chip-check {
  box-shadow: none;
}

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

.nav-btn {
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid rgba(66, 49, 29, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  color: #30271f;
  font-size: 0.68rem;
  box-shadow: 0 10px 18px rgba(28, 21, 13, 0.04);
}

.nav-btn .nav-icon {
  flex: 0 0 auto;
  font-size: 1.1rem;
  line-height: 1;
}

.nav-btn span:last-child {
  min-width: 0;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
}

.nav-btn[aria-pressed="true"] {
  background: var(--ink-active-soft);
  border-color: var(--ink-active-soft);
  color: #fffaf4;
  box-shadow: 0 14px 24px rgba(28, 23, 18, 0.17);
}

.nav-btn[aria-pressed="true"] .nav-icon {
  transform: scale(1.08);
}

.left-pane-scroll {
  flex: 1 1 auto;
  position: relative;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 12px 12px;
}

.left-pane > .monetization-slot-primary {
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin: 0 12px calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 20px rgba(65, 45, 21, 0.08), 0 12px 24px rgba(65, 45, 21, 0.08);
}

.results-shell-head {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 -2px 12px;
  padding: 0 2px 10px;
  background: linear-gradient(180deg, rgba(249, 243, 235, 0.96) 0%, rgba(249, 243, 235, 0) 100%);
  backdrop-filter: blur(8px);
}

.current-context {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 7px;
}

.current-context-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.current-context-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(70, 53, 31, 0.08);
  color: #3d3227;
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(30, 23, 16, 0.04);
}

.current-context-note,
.filter-count-note,
.partial-load-note,
.location-hint {
  font-size: 0.78rem;
  color: var(--text-sub);
}

.current-context-note {
  margin: 0;
}

.reopen-controls {
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 9px 12px;
  border: 1px solid rgba(66, 49, 29, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-main);
  font-size: 0.74rem;
  font-weight: 700;
  box-shadow: 0 10px 18px rgba(26, 21, 17, 0.06);
}

@media (max-width: 1023px) {
  .reopen-controls {
    position: sticky;
    top: 10px;
    z-index: 8;
    margin-left: auto;
    background: rgba(245, 245, 245, 0.96);
    border-color: rgba(68, 60, 52, 0.18);
    box-shadow: 0 12px 22px rgba(34, 28, 23, 0.14);
  }
}

.poi-list {
  min-height: 0;
  padding: 0;
}

.mode-summary,
.location-hint,
.partial-load-note {
  margin-bottom: 10px;
  padding: 11px 12px;
  border-radius: var(--radius-md);
}

.mode-summary {
  border: 1px solid rgba(214, 174, 104, 0.32);
  background: linear-gradient(180deg, rgba(255, 248, 232, 0.98), rgba(255, 238, 210, 0.92));
  color: #5a4320;
  box-shadow: 0 12px 24px rgba(93, 66, 29, 0.08);
}

.mode-summary-title {
  display: block;
  margin-bottom: 4px;
  font-size: 0.82rem;
  font-weight: 700;
}

.mode-summary-copy {
  display: block;
  font-size: 0.76rem;
}

.location-hint {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(80, 64, 43, 0.08);
}

.partial-load-note {
  background: rgba(255, 244, 220, 0.92);
  border: 1px solid rgba(196, 142, 58, 0.28);
  color: #7b560f;
}

.filter-count-note {
  margin: 0 0 12px;
}

@media (max-width: 1023px) {
  .filter-actions {
    justify-content: stretch;
  }

  .filter-apply {
    width: 100%;
    min-height: 40px;
  }
}

.empty-state,
.no-results {
  padding: 34px 16px;
  text-align: center;
  color: var(--text-sub);
  font-size: 0.96rem;
}

.featured-result {
  margin-bottom: 14px;
}

.inline-sponsored-card {
  margin-bottom: 10px;
  border: 1px dashed rgba(184, 137, 51, 0.45);
  border-radius: 20px;
  padding: 12px 13px;
  background: linear-gradient(180deg, rgba(255, 249, 239, 0.96), rgba(255, 241, 214, 0.95));
  color: #5f4a24;
  box-shadow: 0 10px 20px rgba(65, 45, 21, 0.08);
}

.inline-sponsored-label {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  margin-bottom: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #8a6730;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.inline-sponsored-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.inline-sponsored-card p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
}

.result-cluster {
  display: grid;
  gap: 10px;
}

.result-cluster-title {
  margin: 0 0 2px;
  padding-left: 4px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-soft);
}

.poi-card {
  border: 1px solid rgba(73, 54, 31, 0.1);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(252, 247, 240, 0.96));
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.poi-card-featured {
  border-color: rgba(226, 170, 74, 0.52);
  background: linear-gradient(180deg, rgba(255, 251, 242, 1), rgba(255, 239, 212, 0.95));
  box-shadow: 0 20px 34px rgba(135, 88, 27, 0.14);
}

.poi-card-head {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 13px 11px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.poi-card-main {
  min-width: 0;
}

.poi-card-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.poi-card h2 {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.28;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poi-card-supporting {
  display: none;
  overflow: hidden;
}

.poi-card-side {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 8px;
}

.poi-card-toggle-text {
  font-size: 0.73rem;
  font-weight: 700;
  color: #6b6258;
}

.poi-card-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(23, 20, 17, 0.07);
  color: #51473c;
  font-size: 0.9rem;
  transition: transform 180ms ease, background 180ms ease;
}

.poi-card[data-expanded="true"] .poi-card-chevron {
  transform: rotate(180deg);
  background: rgba(23, 20, 17, 0.12);
}

.card-meta-row,
.poi-card-detail {
  padding-left: 13px;
  padding-right: 13px;
}

.card-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.poi-card-quick-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 13px 0;
  padding: 0 0 11px;
}

.priority-line,
.featured-kicker,
.distance-badge,
.mode-badge,
.reliability-badge,
.signal-chip,
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  border-radius: 999px;
}

.priority-line {
  padding: 4px 8px;
  background: rgba(255, 233, 184, 0.82);
  color: #7c4b00;
  font-size: 0.72rem;
  font-weight: 700;
}

.featured-kicker {
  padding: 4px 8px;
  background: rgba(23, 20, 17, 0.08);
  color: #5a4320;
  font-size: 0.7rem;
  font-weight: 700;
}

.distance-badge {
  padding: 4px 8px;
  background: #e6f0ff;
  color: #0a4aa2;
  font-size: 0.74rem;
  font-weight: 700;
}

.mode-badge {
  padding: 4px 8px;
  background: #fff0d8;
  color: #8b4e00;
  font-size: 0.73rem;
  font-weight: 700;
}

.reliability-badge {
  padding: 4px 8px;
  background: #f0f0f0;
  color: #666;
  font-size: 0.73rem;
}

.signal-chip,
.tag-chip {
  padding: 5px 9px;
  font-size: 0.74rem;
}

.signal-chip {
  font-weight: 700;
}

.signal-chip-strong {
  background: rgba(255, 210, 116, 0.3);
  color: #6c4300;
}

.signal-chip-neutral {
  background: rgba(23, 20, 17, 0.06);
  color: #4e453b;
}

.signal-chip-warn {
  background: rgba(194, 97, 62, 0.13);
  color: #8b3f28;
}

.tag-chip {
  background: #eee7dd;
  color: #30271f;
}

.poi-card-detail {
  border-top: 1px solid rgba(73, 54, 31, 0.08);
  padding-top: 0;
  padding-bottom: 13px;
}

.poi-card-detail[hidden] {
  display: none;
}

.poi-card .description {
  margin: 0 0 10px;
  font-size: 0.86rem;
  color: #37302a;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.gray-zone-banner {
  margin-bottom: 10px;
  padding: 9px 10px;
  border: 1px solid #e0a000;
  border-radius: 10px;
  background: #fff6dd;
  color: #6b4c00;
  font-size: 0.8rem;
}

.info-note {
  margin-bottom: 10px;
  padding: 5px 10px;
  border-left: 3px solid #d7c8b3;
  color: #5e554d;
  font-size: 0.8rem;
}

.monetization-slot {
  border: 1px dashed rgba(184, 137, 51, 0.45);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 249, 239, 0.96), rgba(255, 241, 214, 0.94));
  padding: 12px 13px;
  color: #5f4a24;
}

.monetization-slot-primary {
  margin-top: 2px;
}

.monetization-slot-secondary {
  margin-top: 16px;
  margin-bottom: 6px;
}

.monetization-slot-label {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #8a6730;
}

.monetization-slot-body strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.84rem;
}

.monetization-slot-body p {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.5;
}

.faq-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed rgba(83, 63, 38, 0.12);
  color: var(--text-sub);
}

.faq-section h2 {
  margin: 0 0 10px;
  font-size: 0.88rem;
  color: var(--text-main);
}

.faq-section details {
  border-top: 1px solid rgba(83, 63, 38, 0.1);
  padding: 10px 0;
}

.faq-section summary {
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
}

.faq-section p {
  margin-top: 8px;
  font-size: 0.84rem;
  color: #474038;
}

@media (min-width: 1024px) {
  .app-header {
    padding: 16px 18px 14px;
  }

  .app-header h1 {
    font-size: 1.32rem;
  }

  .app-subtitle {
    font-size: 0.84rem;
  }

  .controls-toggle,
  .controls-backdrop {
    display: none;
  }

  .controls-close,
  .reopen-controls {
    display: inline-flex;
  }

  .app-layout {
    flex-direction: row;
    align-items: stretch;
  }

  .left-pane {
    order: 1;
    flex: 0 0 min(470px, 38vw);
    width: min(470px, 38vw);
    margin-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-right: 1px solid rgba(83, 63, 38, 0.08);
    box-shadow: 10px 0 26px rgba(23, 20, 17, 0.06);
  }

  .map-pane {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 100%;
  }

  .left-pane-controls {
    position: sticky;
    top: 0;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: 6;
    padding: 0;
    transform: translateY(0);
    pointer-events: auto;
    overflow: visible;
  }

  .controls-shell {
    position: relative;
    display: block;
    max-height: none;
    overflow: visible;
    padding: 14px 14px 10px;
    border: 0;
    border-radius: 0;
    background: rgba(255, 252, 247, 0.96);
    box-shadow: none;
    border-bottom: 1px solid rgba(83, 63, 38, 0.08);
  }

  .controls-panel-head {
    position: relative;
    z-index: 3;
    margin-bottom: 0;
    cursor: pointer;
  }

  .controls-panel-overlay {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 4;
    gap: 10px;
    padding: 12px 14px 12px;
    border: 1px solid rgba(83, 63, 38, 0.12);
    border-radius: 0 0 16px 16px;
    background: #fffaf4;
    box-shadow: 0 14px 28px rgba(23, 20, 17, 0.16);
    max-height: 76dvh;
    overflow: visible;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
  }

  body.controls-open .controls-panel-overlay {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  body:not(.controls-open) .controls-panel-overlay {
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
  }

  body.controls-open .results-shell-head {
    display: none;
  }

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

  .left-pane-scroll {
    padding: 14px 14px 12px;
  }

  .left-pane > .monetization-slot-primary {
    margin: 0 14px 14px;
  }

  .results-shell-head {
    padding-bottom: 12px;
  }

  .poi-card-head {
    padding: 15px 15px 12px;
  }

  .card-meta-row,
  .poi-card-detail {
    padding-left: 15px;
    padding-right: 15px;
  }

  .poi-card-quick-tags {
    margin-left: 15px;
    margin-right: 15px;
  }
}

@media (max-width: 1023px) {
  .app-header button.controls-toggle {
    background: rgba(232, 232, 232, 0.96) !important;
    border-color: rgba(86, 82, 77, 0.18) !important;
    color: #201a15 !important;
    box-shadow: 0 10px 22px rgba(56, 49, 42, 0.12) !important;
  }

  .app-header button.controls-toggle .controls-toggle-icon,
  .app-header button.controls-toggle .controls-toggle-label {
    color: #201a15 !important;
  }

  .inline-sponsored-card,
  .monetization-slot {
    padding: 8px 9px;
    border-radius: 14px;
  }

  .inline-sponsored-label,
  .monetization-slot-label {
    margin-bottom: 4px;
    font-size: 0.56rem;
  }

  .inline-sponsored-card strong,
  .monetization-slot-body strong {
    margin-bottom: 2px;
    font-size: 0.78rem;
  }

  .inline-sponsored-card p,
  .monetization-slot-body p {
    font-size: 0.68rem;
    line-height: 1.32;
  }
}

@media (max-width: 1023px) {
  .app-header button.controls-toggle {
    background: rgba(232, 232, 232, 0.96) !important;
    border-color: rgba(86, 82, 77, 0.18) !important;
    color: #201a15 !important;
    box-shadow: 0 10px 22px rgba(56, 49, 42, 0.12) !important;
  }

  .app-header button.controls-toggle .controls-toggle-icon,
  .app-header button.controls-toggle .controls-toggle-label {
    color: #201a15 !important;
  }
}

@media (min-width: 1024px) and (max-height: 760px) {
  .controls-shell {
    gap: 8px;
    padding: 10px 12px 9px;
  }

  .controls-panel-overlay {
    top: calc(100% + 6px);
    max-height: 72dvh;
    padding: 10px 12px 10px;
    overflow: visible;
  }

  .controls-panel-title {
    font-size: 0.92rem;
  }

  .mode-chip {
    min-width: 0;
    padding: 7px 10px;
    border-radius: 14px;
  }

  .mode-chip-title {
    margin-bottom: 2px;
    font-size: 0.76rem;
  }

  .mode-chip-copy {
    display: block;
    font-size: 0.6rem;
    line-height: 1.15;
  }

  .bottom-nav {
    gap: 6px;
  }

  .nav-btn {
    min-height: 44px;
    padding: 8px 10px;
  }

  .nav-btn .nav-icon {
    font-size: 0.98rem;
  }

  .nav-btn span:last-child {
    font-size: 0.7rem;
  }
}
