:root {
  --paper: #f7f4ed;
  --surface: #ffffff;
  --surface-soft: #fbfaf6;
  --ink: #1e2528;
  --muted: #667075;
  --line: #ded8ca;
  --green: #4f9f79;
  --green-soft: #e6f3ed;
  --blue: #4a88bd;
  --blue-soft: #e8f1f8;
  --amber: #c98630;
  --amber-soft: #fff0d8;
  --red: #c95f4b;
  --red-soft: #fbe8e4;
  --violet: #7f72bd;
  --violet-soft: #eeeafa;
  --shadow: 0 18px 48px rgba(45, 42, 34, 0.18);
  --dock-height: 76px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background: var(--paper);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0;
}

body {
  overscroll-behavior: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--paper);
}

.map-surface {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #dfe9df;
}

.leaflet-container {
  width: 100%;
  height: 100%;
  font: inherit;
}

.leaflet-control-attribution {
  margin-bottom: calc(var(--dock-height) + env(safe-area-inset-bottom) + 12px) !important;
  border-radius: 6px 0 0 0;
  font-size: 10px;
}

.topbar {
  position: absolute;
  z-index: 10;
  top: calc(12px + env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 60px;
  padding: 10px 10px 10px 12px;
  border: 1px solid rgba(30, 37, 40, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 28px rgba(36, 32, 25, 0.12);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--green);
  font-weight: 900;
  line-height: 1;
}

.brand strong,
.brand small {
  display: block;
  white-space: nowrap;
}

.brand strong {
  font-size: 18px;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.icon-button,
.nav-button,
.chip,
.text-button {
  -webkit-tap-highlight-color: transparent;
}

.icon-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.icon-button.is-loading {
  color: #ffffff;
  background: var(--green);
}

.icon-button.is-loading svg {
  animation: pulseLocate 900ms ease-in-out infinite;
}

.icon-button svg,
.nav-button svg,
.inline-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

.icon-button svg,
.nav-button svg,
.search-box svg,
.inline-icon {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-panel {
  position: absolute;
  z-index: 11;
  top: calc(84px + env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  padding: 10px;
  border: 1px solid rgba(30, 37, 40, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.search-box svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.search-clear {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #566269;
  background: #edf2f1;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.search-clear[hidden] {
  display: none;
}

.city-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 10px;
  padding-bottom: 2px;
}

.city-strip button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #ffffff;
}

.status-pill {
  position: absolute;
  z-index: 8;
  top: calc(90px + env(safe-area-inset-top));
  left: 12px;
  max-width: calc(100% - 24px);
  padding: 8px 11px;
  border-radius: 999px;
  color: #27322f;
  background: rgba(230, 243, 237, 0.94);
  border: 1px solid rgba(79, 159, 121, 0.24);
  box-shadow: 0 8px 22px rgba(34, 42, 35, 0.12);
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}

.map-quick-rail {
  position: absolute;
  z-index: 8;
  top: calc(128px + env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 2px 5px;
  scrollbar-width: none;
}

.map-quick-rail::-webkit-scrollbar {
  display: none;
}

.quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid rgba(30, 37, 40, 0.1);
  border-radius: 999px;
  color: #27322f;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 22px rgba(34, 42, 35, 0.1);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(14px);
}

.quick-chip span {
  font-size: 16px;
  line-height: 1;
}

.quick-chip strong {
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.quick-chip.is-active {
  border-color: rgba(19, 167, 122, 0.42);
  color: #173f32;
  background: rgba(233, 248, 242, 0.96);
  box-shadow: 0 0 0 2px rgba(19, 167, 122, 0.12), 0 8px 22px rgba(34, 42, 35, 0.1);
}

@keyframes pulseLocate {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.86);
  }
}

.bottom-sheet {
  position: absolute;
  z-index: 9;
  left: 10px;
  right: 10px;
  bottom: calc(var(--dock-height) + env(safe-area-inset-bottom) + 12px);
  max-height: min(54dvh, 470px);
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(30, 37, 40, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.sheet-grip {
  width: 38px;
  height: 4px;
  margin: 0 auto 10px;
  border-radius: 999px;
  background: #c9c0af;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sheet-head h1,
.sheet-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.24;
}

.sheet-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.compact-stat {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 8px;
  color: #234137;
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.filter-row,
.tag-row,
.report-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.chip-emoji,
.report-emoji,
.badge-emoji,
.place-title-emoji,
.scenario-emoji {
  flex: 0 0 auto;
  line-height: 1;
}

.chip-emoji {
  font-size: 15px;
}

.chip.is-active,
.chip.is-selected {
  border-color: rgba(79, 159, 121, 0.38);
  color: #203b31;
  background: var(--green-soft);
}

.chip.danger.is-selected {
  border-color: rgba(201, 95, 75, 0.42);
  color: #6d2d22;
  background: var(--red-soft);
}

.context-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin: 10px 0;
  padding: 9px 10px;
  border: 1px solid rgba(30, 37, 40, 0.08);
  border-radius: 8px;
  background: #f7fbf9;
}

.context-tools span {
  min-width: 0;
  overflow: hidden;
  color: #2d3f3b;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-tools div {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.context-tools button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #415057;
  background: #ffffff;
  font-size: 11px;
  font-weight: 900;
}

.place-section-title {
  margin: 14px 0 8px;
  color: #445057;
  font-size: 12px;
  font-weight: 950;
}

.place-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.compact-list {
  margin-top: 0;
}

.place-card {
  display: block;
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  text-align: left;
}

.place-card.is-selected {
  border-color: rgba(79, 159, 121, 0.52);
  box-shadow: 0 0 0 3px rgba(79, 159, 121, 0.13);
}

.place-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.place-card h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 16px;
  line-height: 1.32;
}

.place-title-emoji {
  font-size: 17px;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 25px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.badge.good {
  color: #244437;
  background: var(--green-soft);
}

.badge.info {
  color: #284863;
  background: var(--blue-soft);
}

.badge.warn {
  color: #754a13;
  background: var(--amber-soft);
}

.badge.caution {
  color: #743026;
  background: var(--red-soft);
}

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

.signal {
  min-height: 62px;
  padding: 9px;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.signal strong,
.signal span {
  display: block;
}

.signal strong {
  font-size: 18px;
  line-height: 1;
}

.signal span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.text-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 8px;
  font-weight: 900;
}

.text-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
}

.primary-button {
  color: #ffffff;
  background: var(--green);
}

.note-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.note-list li {
  padding: 10px 11px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: #3f474a;
  font-size: 13px;
  line-height: 1.45;
}

.live-feed {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.feed-head,
.feed-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 0 11px;
}

.feed-head strong {
  font-size: 13px;
}

.feed-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.feed-item {
  display: grid;
  gap: 10px;
  padding: 11px;
}

.feed-item p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
}

.feed-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.feed-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.feed-actions button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 900;
}

.report-form {
  display: grid;
  gap: 14px;
}

.form-section {
  display: grid;
  gap: 8px;
}

.form-section h3 {
  margin: 0;
  font-size: 14px;
}

.form-section p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

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

.report-grid .chip {
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
}

.report-chip {
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 10px;
  line-height: 1.2;
  text-align: left;
}

.report-emoji {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 17px;
}

.mini-field {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #ffffff;
}

.bottom-nav {
  position: absolute;
  z-index: 12;
  left: 10px;
  right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: var(--dock-height);
  padding: 8px;
  border: 1px solid rgba(30, 37, 40, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 14px 42px rgba(34, 32, 27, 0.2);
  backdrop-filter: blur(16px);
}

.nav-button {
  display: grid;
  place-items: center;
  gap: 3px;
  min-width: 0;
  min-height: 58px;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 900;
}

.nav-button.is-active {
  color: #214035;
  background: var(--green-soft);
}

.nav-report {
  color: #ffffff;
  background: var(--green);
}

.nav-report.is-active {
  color: #ffffff;
  background: #3f8d68;
}

.toast {
  position: absolute;
  z-index: 20;
  left: 18px;
  right: 18px;
  bottom: calc(var(--dock-height) + env(safe-area-inset-bottom) + 24px);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 14px;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(30, 37, 40, 0.94);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.sumimap-marker {
  display: grid;
  place-items: center;
  width: 34px !important;
  height: 34px !important;
  margin-left: -17px !important;
  margin-top: -17px !important;
  border: 3px solid #ffffff;
  border-radius: 999px;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(28, 33, 35, 0.28);
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.marker-charge {
  background: var(--blue);
}

.marker-restroom {
  background: var(--green);
}

.marker-rest {
  background: var(--amber);
}

.marker-korean {
  background: var(--violet);
}

.marker-caution {
  background: var(--red);
}

.static-body {
  overflow: auto;
  background: var(--paper);
}

.static-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 52px;
}

.static-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 34px;
}

.static-nav .brand-mark {
  width: 34px;
  height: 34px;
}

.static-nav a:last-child {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-weight: 900;
}

.static-hero {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.static-hero h1 {
  margin: 0;
  font-size: clamp(30px, 6vw, 52px);
  line-height: 1.06;
}

.static-hero p {
  max-width: 680px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.static-content {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.static-section {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.static-section h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.static-section p,
.static-section li {
  color: #465155;
  line-height: 1.75;
}

.static-section ul {
  margin: 0;
  padding-left: 20px;
}

@media (min-width: 780px) {
  .topbar,
  .search-panel {
    left: 24px;
    right: auto;
    width: 390px;
  }

  .status-pill {
    left: 24px;
  }

  .map-quick-rail {
    left: 24px;
    right: auto;
    width: 420px;
  }

  .bottom-sheet {
    left: 24px;
    right: auto;
    width: 420px;
    max-height: min(62dvh, 620px);
  }

  .bottom-nav {
    left: 24px;
    right: auto;
    width: 420px;
  }
}

@media (max-width: 390px) {
  .brand small {
    display: none;
  }

  .topbar {
    min-height: 56px;
  }

  .sheet-head h1,
  .sheet-head h2 {
    font-size: 18px;
  }

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

  .nav-button span {
    font-size: 10px;
  }
}

/* Mobile map polish */
:root {
  --paper: #f6f8f9;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --ink: #152026;
  --muted: #697780;
  --line: #dfe7e8;
  --green: #13a77a;
  --green-soft: #e9f8f2;
  --blue: #3f88d0;
  --blue-soft: #eaf4ff;
  --amber: #d08a2e;
  --amber-soft: #fff3df;
  --red: #d35f4f;
  --red-soft: #ffebe8;
  --violet: #7667cf;
  --violet-soft: #efecff;
  --shadow: 0 10px 30px rgba(21, 32, 38, 0.16);
  --dock-height: 68px;
}

.app-shell {
  background: #e9f0ed;
}

.leaflet-tile {
  filter: saturate(0.86) contrast(0.96) brightness(1.03);
}

.leaflet-control-zoom {
  display: none;
}

.topbar {
  top: calc(10px + env(safe-area-inset-top));
  left: 10px;
  right: 10px;
  min-height: 52px;
  padding: 7px;
  border-color: rgba(21, 32, 38, 0.1);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 22px rgba(21, 32, 38, 0.13);
}

.brand {
  gap: 8px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  color: #ffffff;
  background: linear-gradient(135deg, #12a77a, #0f8f73);
  font-size: 18px;
}

.brand strong {
  font-size: 17px;
  letter-spacing: 0;
}

.brand small {
  display: none;
}

.icon-button {
  width: 38px;
  height: 38px;
  border-color: var(--line);
  background: #ffffff;
}

.icon-button svg,
.nav-button svg,
.inline-icon {
  width: 19px;
  height: 19px;
}

.search-panel {
  top: calc(68px + env(safe-area-inset-top));
  left: 10px;
  right: 10px;
  padding: 8px;
  box-shadow: 0 12px 30px rgba(21, 32, 38, 0.16);
}

.search-box {
  min-height: 42px;
  background: #ffffff;
}

.city-strip {
  gap: 6px;
  margin-top: 8px;
}

.city-strip button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 850;
}

.status-pill {
  top: calc(72px + env(safe-area-inset-top));
  left: 10px;
  padding: 7px 10px;
  color: #19352c;
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(19, 167, 122, 0.22);
  box-shadow: 0 7px 18px rgba(21, 32, 38, 0.12);
}

.bottom-sheet {
  left: 8px;
  right: 8px;
  bottom: calc(var(--dock-height) + env(safe-area-inset-bottom) + 8px);
  max-height: min(48dvh, 410px);
  padding: 10px;
  border-color: rgba(21, 32, 38, 0.11);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 34px rgba(21, 32, 38, 0.18);
}

.sheet-grip {
  width: 34px;
  height: 3px;
  margin-bottom: 8px;
  background: #cfd8da;
}

.sheet-head {
  gap: 8px;
  margin-bottom: 9px;
}

.sheet-head h1,
.sheet-head h2 {
  font-size: 18px;
  line-height: 1.22;
}

.sheet-head p {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.4;
}

.compact-stat {
  min-width: 46px;
  padding: 7px 9px;
  font-size: 12px;
}

.filter-row,
.tag-row,
.report-grid {
  gap: 6px;
}

.scenario-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(124px, 42%);
  gap: 8px;
  overflow-x: auto;
  margin: 0 -2px 9px;
  padding: 2px 2px 4px;
  scrollbar-width: none;
}

.scenario-rail::-webkit-scrollbar {
  display: none;
}

.scenario-chip {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 7px;
  row-gap: 1px;
  min-height: 56px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  text-align: left;
  box-shadow: 0 1px 0 rgba(21, 32, 38, 0.03);
}

.scenario-emoji {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--green-soft);
  font-size: 16px;
}

.scenario-chip > span:not(.scenario-emoji) {
  font-size: 12px;
  font-weight: 950;
  line-height: 1.15;
}

.scenario-chip small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scenario-chip.is-active {
  border-color: rgba(19, 167, 122, 0.48);
  background: #e9f8f2;
  box-shadow: inset 0 0 0 1px rgba(19, 167, 122, 0.1);
}

.chip {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 850;
}

.chip-emoji {
  font-size: 14px;
}

.chip.is-active,
.chip.is-selected {
  border-color: rgba(19, 167, 122, 0.42);
  background: #e9f8f2;
  box-shadow: inset 0 0 0 1px rgba(19, 167, 122, 0.08);
}

.place-list {
  gap: 8px;
  margin-top: 10px;
}

.place-card {
  padding: 11px;
  border-color: var(--line);
  box-shadow: 0 1px 0 rgba(21, 32, 38, 0.03);
}

.place-card.is-selected {
  border-color: rgba(19, 167, 122, 0.52);
  box-shadow: 0 0 0 2px rgba(19, 167, 122, 0.13);
}

.empty-card {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.empty-card .primary-button {
  width: 100%;
}

.place-card h3 {
  font-size: 15px;
  line-height: 1.3;
}

.place-title-emoji {
  font-size: 16px;
}

.place-card p {
  margin-top: 4px;
  font-size: 12px;
}

.card-meta {
  display: block;
  margin-top: 5px;
  color: #7a878d;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.badge {
  min-height: 23px;
  padding: 0 7px;
  font-size: 10.5px;
  letter-spacing: 0;
}

.signal-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0;
}

.use-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.use-summary div {
  min-width: 0;
  padding: 8px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.use-summary span,
.decision-card span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
}

.use-summary strong,
.decision-card strong {
  display: block;
  min-width: 0;
  margin-top: 4px;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.decision-card {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.35fr);
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid rgba(19, 167, 122, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, #effbf6, #ffffff);
}

.decision-card.is-caution {
  border-color: rgba(211, 95, 79, 0.24);
  background: linear-gradient(135deg, #fff1ef, #ffffff);
}

.decision-card p {
  margin: 0;
  color: #4f5e64;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.45;
}

.signal {
  min-height: 50px;
  padding: 8px;
  background: #fbfcfb;
}

.signal strong {
  font-size: 16px;
}

.signal span {
  margin-top: 4px;
  font-size: 10px;
}

.note-list {
  gap: 6px;
  margin-top: 10px;
}

.note-list li {
  padding: 8px 9px;
  font-size: 12px;
  line-height: 1.42;
}

.live-feed {
  gap: 6px;
  margin-top: 10px;
}

.feed-head {
  min-height: 38px;
  padding: 0 10px;
}

.feed-item {
  gap: 8px;
  padding: 9px;
}

.feed-item p {
  font-size: 12px;
}

.feed-actions button {
  min-height: 34px;
  font-size: 11px;
}

.detail-actions {
  gap: 7px;
  margin-top: 10px;
}

.detail-actions.single {
  grid-template-columns: 1fr;
  margin-top: 7px;
}

.text-button,
.primary-button {
  min-height: 40px;
  padding: 0 11px;
  font-size: 13px;
}

.report-form {
  gap: 12px;
}

.form-section {
  gap: 7px;
}

.form-section h3 {
  font-size: 13px;
}

.form-section p {
  font-size: 11.5px;
}

.report-grid {
  gap: 7px;
}

.report-grid .chip {
  min-height: 40px;
}

.report-chip {
  padding: 7px 9px;
}

.report-emoji {
  width: 23px;
  height: 23px;
  font-size: 16px;
}

.mini-field {
  min-height: 42px;
}

.bottom-nav {
  left: 8px;
  right: 8px;
  bottom: calc(8px + env(safe-area-inset-bottom));
  min-height: var(--dock-height);
  padding: 7px;
  border-color: rgba(21, 32, 38, 0.12);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 30px rgba(21, 32, 38, 0.18);
}

.nav-button {
  min-height: 52px;
  gap: 2px;
  color: #6f7b82;
  font-size: 10.5px;
}

.nav-button.is-active {
  color: #0d7759;
  background: #e9f8f2;
}

.nav-report {
  color: #ffffff;
  background: linear-gradient(135deg, #14ae80, #0f9474);
  box-shadow: 0 7px 18px rgba(19, 167, 122, 0.25);
}

.nav-report.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, #0f9872, #0d7d63);
}

.toast {
  bottom: calc(var(--dock-height) + env(safe-area-inset-bottom) + 18px);
  padding: 10px 12px;
  font-size: 12px;
}

.sumimap-marker {
  width: 30px !important;
  height: 30px !important;
  margin-left: -15px !important;
  margin-top: -15px !important;
  border-width: 2px;
  box-shadow: 0 7px 16px rgba(21, 32, 38, 0.26);
  font-size: 17px;
}

.sumimap-marker.is-selected {
  width: 38px !important;
  height: 38px !important;
  margin-left: -19px !important;
  margin-top: -19px !important;
  border-width: 3px;
  box-shadow: 0 0 0 5px rgba(19, 167, 122, 0.18), 0 10px 24px rgba(21, 32, 38, 0.28);
  font-size: 20px;
  z-index: 500 !important;
}

.sumimap-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 8px;
  height: 8px;
  transform: translateX(-50%) rotate(45deg);
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  background: inherit;
  z-index: -1;
}

.static-body {
  background: #f6f8f9;
}

.static-hero,
.static-section,
.static-nav a:last-child {
  border-color: var(--line);
  box-shadow: 0 1px 0 rgba(21, 32, 38, 0.04);
}

@media (min-width: 780px) {
  .topbar,
  .search-panel {
    width: 360px;
  }

  .bottom-sheet,
  .bottom-nav {
    width: 390px;
  }

  .map-quick-rail {
    width: 390px;
  }

  .bottom-sheet {
    max-height: min(58dvh, 560px);
  }
}

@media (max-width: 390px) {
  .topbar {
    min-height: 50px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .sheet-head h1,
  .sheet-head h2 {
    font-size: 17px;
  }

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

/* Readability pass */
:root {
  --ink: #111b20;
  --muted: #53636c;
  --line: #d6e0e2;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.bottom-sheet {
  max-height: min(55dvh, 470px);
  padding: 12px;
}

.sheet-head {
  margin-bottom: 12px;
}

.sheet-head h1,
.sheet-head h2 {
  font-size: 19px;
  line-height: 1.28;
}

.sheet-head p {
  color: #516069;
  font-size: 13px;
  line-height: 1.55;
}

.context-tools {
  align-items: flex-start;
  padding: 10px;
}

.context-tools span {
  color: #263733;
  line-height: 1.4;
  white-space: normal;
}

.context-tools div {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.place-list {
  gap: 11px;
}

.place-card {
  padding: 13px;
}

.place-title-row {
  gap: 9px;
}

.place-title-row > div {
  min-width: 0;
}

.place-card h3 {
  align-items: flex-start;
  color: #101c21;
  font-size: 16px;
  line-height: 1.38;
}

.place-card p {
  color: #52636b;
  font-size: 13px;
  line-height: 1.55;
}

.card-meta {
  color: #64737b;
  font-size: 11.5px;
  line-height: 1.5;
}

.badge {
  line-height: 1.15;
}

.tag-row .badge {
  min-height: 27px;
  padding: 0 8px;
  font-size: 11px;
}

.use-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.use-summary div {
  padding: 10px;
}

.use-summary span,
.decision-card span {
  color: #5d6d75;
  font-size: 11px;
  line-height: 1.35;
}

.use-summary strong,
.decision-card strong {
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.35;
  white-space: normal;
}

.decision-card {
  grid-template-columns: 1fr;
  gap: 7px;
  padding: 11px;
}

.decision-card p {
  color: #3f5057;
  font-size: 12.5px;
  line-height: 1.62;
}

.signal {
  min-height: 56px;
}

.signal span {
  color: #5d6d75;
  font-size: 10.5px;
  line-height: 1.35;
}

.note-list li {
  color: #33444b;
  font-size: 12.5px;
  line-height: 1.58;
}

.feed-item p {
  line-height: 1.55;
}

.feed-item small {
  color: #64737b;
  line-height: 1.45;
}

.text-button,
.primary-button {
  line-height: 1.2;
}

@media (min-width: 780px) {
  .bottom-sheet {
    max-height: min(60dvh, 590px);
  }
}

@media (max-width: 390px) {
  .bottom-sheet {
    max-height: min(53dvh, 450px);
    padding: 11px;
  }

  .sheet-head h1,
  .sheet-head h2 {
    font-size: 18px;
  }

  .sheet-head p,
  .place-card p {
    font-size: 12.5px;
  }

  .context-tools {
    display: grid;
    gap: 8px;
  }

  .context-tools div {
    justify-content: flex-start;
  }

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

/* Finish polish pass */
:root {
  --paper: #f3f7f6;
  --surface-soft: #f8fbfa;
  --ink: #101a1f;
  --muted: #56666f;
  --line: #d3dedf;
  --green: #0fa478;
  --green-soft: #e8f7f1;
  --shadow: 0 16px 42px rgba(16, 26, 31, 0.16);
}

.app-shell {
  background: #e8f0ed;
}

.leaflet-container {
  background: #dce8e4;
}

.topbar,
.search-panel,
.bottom-sheet,
.bottom-nav {
  border-color: rgba(16, 26, 31, 0.11);
  background: rgba(255, 255, 255, 0.985);
  box-shadow: var(--shadow);
}

.topbar {
  padding: 8px 8px 8px 9px;
}

.brand-mark {
  background: #0fa478;
  box-shadow: inset 0 -9px 16px rgba(6, 96, 73, 0.22);
}

.brand strong {
  color: #0f1b20;
}

.icon-button,
.chip,
.city-strip button,
.context-tools button,
.feed-actions button,
.text-button,
.primary-button,
.place-card,
.scenario-chip,
.quick-chip,
.nav-button {
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, color 140ms ease, transform 140ms ease;
}

button:active {
  transform: translateY(1px);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(15, 164, 120, 0.48);
  outline-offset: 2px;
}

.icon-button,
.search-box,
.city-strip button,
.chip,
.context-tools button,
.feed-actions button,
.text-button {
  box-shadow: inset 0 -1px 0 rgba(16, 26, 31, 0.04);
}

.icon-button {
  color: #15242a;
  background: #ffffff;
}

.search-panel {
  border-color: rgba(16, 26, 31, 0.1);
}

.search-box {
  border-color: #cfdbdc;
}

.search-clear {
  color: #35454c;
  background: #eef4f3;
}

.city-strip button {
  color: #1c2a30;
  background: #ffffff;
}

.status-pill {
  color: #17362c;
  border-color: rgba(15, 164, 120, 0.22);
  background: rgba(248, 251, 250, 0.96);
  box-shadow: 0 9px 22px rgba(16, 26, 31, 0.12);
}

.map-quick-rail {
  padding-bottom: 7px;
}

.quick-chip {
  min-height: 36px;
  border-color: rgba(16, 26, 31, 0.12);
  color: #17272d;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 20px rgba(16, 26, 31, 0.11);
}

.quick-chip.is-active {
  border-color: rgba(15, 164, 120, 0.42);
  color: #0d5d47;
  background: #e8f7f1;
  box-shadow: 0 0 0 2px rgba(15, 164, 120, 0.12), 0 8px 20px rgba(16, 26, 31, 0.11);
}

.bottom-sheet {
  bottom: calc(var(--dock-height) + env(safe-area-inset-bottom) + 16px);
  scrollbar-gutter: stable;
}

.bottom-sheet::-webkit-scrollbar {
  width: 8px;
}

.bottom-sheet::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(83, 99, 108, 0.32);
  background-clip: padding-box;
}

.sheet-grip {
  background: #c8d2d4;
}

.sheet-head h1,
.sheet-head h2 {
  color: #0f1a1f;
}

.compact-stat {
  color: #0f5f48;
  background: #e8f7f1;
  box-shadow: inset 0 0 0 1px rgba(15, 164, 120, 0.1);
}

.context-tools {
  border-color: #d8e3e4;
  background: #f6faf9;
}

.context-tools button {
  border-color: #d1dcdd;
}

.scenario-chip,
.place-card,
.feed-head,
.feed-item,
.signal,
.use-summary div,
.decision-card,
.note-list li {
  border-color: #d6e1e2;
  box-shadow: 0 1px 0 rgba(16, 26, 31, 0.04);
}

.scenario-chip {
  background: linear-gradient(180deg, #ffffff, #fbfdfc);
}

.scenario-chip.is-active {
  border-color: rgba(15, 164, 120, 0.45);
  background: linear-gradient(180deg, #f1fbf7, #ffffff);
  box-shadow: inset 3px 0 0 rgba(15, 164, 120, 0.7), 0 1px 0 rgba(16, 26, 31, 0.04);
}

.place-card {
  background: linear-gradient(180deg, #ffffff, #fbfdfc);
}

.place-card.is-selected {
  border-color: rgba(15, 164, 120, 0.44);
  background: linear-gradient(180deg, #ffffff, #f5fcf9);
  box-shadow: inset 3px 0 0 rgba(15, 164, 120, 0.76), 0 8px 22px rgba(16, 26, 31, 0.08);
}

.place-card h3 {
  font-weight: 950;
}

.place-title-emoji,
.report-emoji,
.scenario-emoji,
.badge-emoji,
.chip-emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.badge {
  border: 1px solid rgba(16, 26, 31, 0.05);
}

.badge.good {
  color: #0e5f48;
}

.badge.info {
  color: #24577d;
}

.badge.warn {
  color: #79500f;
}

.badge.caution {
  color: #7a2d24;
}

.decision-card {
  border-color: rgba(15, 164, 120, 0.2);
  background: linear-gradient(180deg, #f2fbf7, #ffffff);
}

.decision-card.is-caution {
  border-color: rgba(211, 95, 79, 0.22);
  background: linear-gradient(180deg, #fff4f2, #ffffff);
}

.signal,
.use-summary div,
.note-list li {
  background: #fbfdfc;
}

.primary-button,
.nav-report {
  background: #0fa478;
  box-shadow: 0 8px 18px rgba(15, 164, 120, 0.24);
}

.primary-button:active,
.nav-report:active {
  box-shadow: 0 5px 12px rgba(15, 164, 120, 0.2);
}

.bottom-nav {
  box-shadow: 0 12px 32px rgba(16, 26, 31, 0.18);
}

.nav-button {
  color: #687780;
}

.nav-button.is-active {
  color: #0b7054;
  background: #e8f7f1;
  box-shadow: inset 0 0 0 1px rgba(15, 164, 120, 0.08);
}

.toast {
  color: #ffffff;
  background: rgba(16, 26, 31, 0.94);
  box-shadow: 0 10px 24px rgba(16, 26, 31, 0.2);
}

.sumimap-marker {
  border-color: #ffffff;
  box-shadow: 0 9px 18px rgba(16, 26, 31, 0.26);
}

.sumimap-marker.is-selected {
  box-shadow: 0 0 0 5px rgba(15, 164, 120, 0.18), 0 12px 24px rgba(16, 26, 31, 0.3);
}

@media (hover: hover) {
  .icon-button:hover,
  .city-strip button:hover,
  .chip:hover,
  .context-tools button:hover,
  .feed-actions button:hover,
  .text-button:hover {
    border-color: rgba(15, 164, 120, 0.28);
    background: #f5fbf8;
  }

  .place-card:hover,
  .scenario-chip:hover {
    border-color: rgba(15, 164, 120, 0.24);
    box-shadow: 0 8px 20px rgba(16, 26, 31, 0.08);
  }

  .nav-button:hover {
    color: #0b7054;
    background: #f1fbf7;
  }
}

@media (min-width: 780px) {
  .topbar,
  .search-panel,
  .status-pill,
  .map-quick-rail,
  .bottom-sheet,
  .bottom-nav {
    left: 24px;
    right: auto;
  }

  .topbar,
  .search-panel,
  .map-quick-rail,
  .bottom-sheet,
  .bottom-nav {
    width: 398px;
  }

  .bottom-sheet {
    max-height: min(60dvh, 590px);
  }
}

@media (max-width: 390px) {
  .topbar,
  .bottom-sheet,
  .bottom-nav {
    left: 7px;
    right: 7px;
  }

  .quick-chip strong {
    font-size: 11.5px;
  }

  .nav-button {
    min-height: 51px;
  }
}

/* Responsive behavior pass */
@media (max-width: 340px) {
  :root {
    --dock-height: 64px;
  }

  .topbar,
  .bottom-sheet,
  .bottom-nav {
    left: 6px;
    right: 6px;
  }

  .topbar {
    min-height: 50px;
    padding: 6px;
  }

  .brand {
    gap: 7px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .brand strong {
    font-size: 16px;
  }

  .top-actions {
    gap: 5px;
  }

  .icon-button {
    width: 36px;
    height: 36px;
  }

  .status-pill {
    top: calc(66px + env(safe-area-inset-top));
    left: 6px;
    max-width: calc(100% - 12px);
    padding: 6px 9px;
    font-size: 11px;
  }

  .map-quick-rail {
    top: calc(116px + env(safe-area-inset-top));
    left: 6px;
    right: 6px;
    gap: 5px;
  }

  .quick-chip {
    min-height: 34px;
    padding: 0 9px;
    gap: 5px;
  }

  .quick-chip span {
    font-size: 15px;
  }

  .quick-chip strong {
    font-size: 11px;
  }

  .bottom-sheet {
    bottom: calc(var(--dock-height) + env(safe-area-inset-bottom) + 16px);
    max-height: min(51dvh, 410px);
    padding: 10px;
  }

  .sheet-head {
    gap: 7px;
  }

  .sheet-head h1,
  .sheet-head h2 {
    font-size: 17px;
  }

  .compact-stat {
    min-width: 42px;
    padding: 7px 8px;
  }

  .scenario-rail {
    grid-auto-columns: minmax(112px, 46%);
  }

  .scenario-chip {
    min-height: 52px;
    padding: 8px;
  }

  .filter-row,
  .tag-row,
  .report-grid {
    gap: 6px;
  }

  .chip {
    min-height: 33px;
    padding: 0 9px;
    font-size: 11.5px;
  }

  .report-grid {
    grid-template-columns: 1fr;
  }

  .place-card {
    padding: 11px;
  }

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

  .bottom-nav {
    min-height: var(--dock-height);
    padding: 5px;
  }

  .nav-button {
    min-height: 48px;
    font-size: 9.5px;
  }

  .nav-button svg,
  .inline-icon {
    width: 18px;
    height: 18px;
  }
}

@media (min-width: 420px) and (max-width: 599px) {
  .topbar,
  .search-panel,
  .bottom-sheet,
  .bottom-nav {
    left: 12px;
    right: 12px;
  }

  .status-pill,
  .map-quick-rail {
    left: 12px;
    right: 12px;
  }

  .bottom-sheet {
    max-height: min(56dvh, 510px);
  }
}

@media (min-width: 600px) and (max-width: 779px) {
  .topbar,
  .search-panel,
  .status-pill,
  .map-quick-rail,
  .bottom-sheet,
  .bottom-nav {
    left: 16px;
    right: auto;
  }

  .topbar,
  .search-panel,
  .map-quick-rail,
  .bottom-sheet,
  .bottom-nav {
    width: min(420px, calc(100vw - 32px));
  }

  .bottom-sheet {
    max-height: min(60dvh, 560px);
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  :root {
    --dock-height: 58px;
  }

  .leaflet-control-attribution {
    margin-bottom: 8px !important;
  }

  .topbar,
  .search-panel,
  .status-pill,
  .map-quick-rail,
  .bottom-sheet,
  .bottom-nav {
    left: 10px;
    right: auto;
  }

  .topbar,
  .search-panel,
  .map-quick-rail,
  .bottom-sheet,
  .bottom-nav {
    width: min(360px, calc(56vw - 14px));
  }

  .topbar {
    min-height: 48px;
    top: calc(8px + env(safe-area-inset-top));
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .icon-button {
    width: 34px;
    height: 34px;
  }

  .search-panel {
    top: calc(62px + env(safe-area-inset-top));
  }

  .status-pill {
    top: calc(64px + env(safe-area-inset-top));
  }

  .map-quick-rail {
    top: calc(102px + env(safe-area-inset-top));
  }

  .quick-chip {
    min-height: 32px;
  }

  .bottom-sheet {
    top: calc(148px + env(safe-area-inset-top));
    bottom: calc(var(--dock-height) + env(safe-area-inset-bottom) + 14px);
    max-height: none;
    padding: 10px;
  }

  .sheet-head {
    margin-bottom: 8px;
  }

  .sheet-head p {
    display: none;
  }

  .scenario-rail {
    grid-auto-columns: minmax(112px, 44%);
    margin-bottom: 7px;
  }

  .scenario-chip {
    min-height: 48px;
  }

  .signal-grid,
  .use-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bottom-nav {
    min-height: var(--dock-height);
    bottom: calc(6px + env(safe-area-inset-bottom));
    padding: 5px;
  }

  .nav-button {
    min-height: 46px;
  }

  .toast {
    left: 12px;
    right: auto;
    width: min(360px, calc(56vw - 14px));
    bottom: calc(var(--dock-height) + env(safe-area-inset-bottom) + 14px);
  }
}

@media (min-width: 1180px) {
  .topbar,
  .search-panel,
  .map-quick-rail,
  .bottom-sheet,
  .bottom-nav {
    width: 420px;
  }

  .bottom-sheet {
    max-height: min(62dvh, 640px);
  }
}

/* Performance pass */
.map-surface,
.bottom-sheet,
.bottom-nav,
.topbar,
.search-panel,
.map-quick-rail {
  contain: layout paint style;
}

.place-card,
.scenario-chip,
.feed-head,
.feed-item,
.signal,
.use-summary div,
.decision-card,
.note-list li {
  contain: layout paint;
}

.leaflet-tile {
  filter: none;
}

.topbar,
.search-panel,
.bottom-sheet,
.bottom-nav,
.quick-chip {
  backdrop-filter: blur(10px);
}

.place-list,
.live-feed,
.report-form {
  contain: layout style;
}

.sumimap-marker {
  will-change: transform;
}

/* Mobile sheet control */
.sheet-grip {
  display: block;
  padding: 0;
  border: 0;
  appearance: none;
  cursor: pointer;
  touch-action: none;
}

.sheet-head[data-sheet-toggle] {
  cursor: pointer;
}

@media (max-width: 779px) {
  .bottom-sheet {
    transition: max-height 0.22s ease, padding 0.22s ease, transform 0.22s ease;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  .bottom-sheet.is-collapsed {
    max-height: 96px !important;
    overflow: hidden;
    padding: 10px 14px 12px !important;
  }

  .bottom-sheet.is-collapsed .sheet-grip {
    margin-bottom: 8px;
  }

  .bottom-sheet.is-collapsed .sheet-head {
    align-items: center;
    margin-bottom: 0;
  }

  .bottom-sheet.is-collapsed .sheet-head h1,
  .bottom-sheet.is-collapsed .sheet-head h2 {
    font-size: 18px;
    line-height: 1.18;
  }

  .bottom-sheet.is-collapsed .sheet-head p,
  .bottom-sheet.is-collapsed .scenario-rail,
  .bottom-sheet.is-collapsed .filter-row,
  .bottom-sheet.is-collapsed .context-tools,
  .bottom-sheet.is-collapsed .place-card,
  .bottom-sheet.is-collapsed .place-list,
  .bottom-sheet.is-collapsed .note-list,
  .bottom-sheet.is-collapsed .report-form,
  .bottom-sheet.is-collapsed .live-feed {
    display: none !important;
  }

  .bottom-sheet.is-expanded {
    max-height: min(45dvh, 410px) !important;
  }
}

@media (max-width: 390px) {
  .bottom-sheet.is-collapsed {
    max-height: 90px !important;
  }

  .bottom-sheet.is-expanded {
    max-height: min(43dvh, 390px) !important;
  }
}
