:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --ink: #0f1115;
  --ink-soft: #3f4651;
  --muted: #8b93a0;
  --line: #e7eaef;
  --line-strong: #d5d9e0;
  --chip-bg: #eef0f4;
  --chip-hover: #e4e7ec;

  --accent: #3b82f6;
  --accent-deep: #1d4ed8;
  --accent-soft: #dbeafe;
  --accent-softer: #eff6ff;

  /* CI: Falling Leaf autumn palette */
  --leaf: #d4722c;
  --leaf-deep: #8b4513;
  --leaf-soft: #f5e6d3;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  display: grid;
  grid-template-columns: 380px 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ---------- Sidebar ---------- */
.sidebar {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-right: 1px solid var(--line);
  min-width: 0;
  min-height: 0;
  height: 100vh;
}

.brand {
  padding: 22px 22px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.brand__main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}
.brand__mark {
  flex-shrink: 0;
  padding-top: 2px;
}
.brand__logo {
  width: 48px;
  height: 60px;
  display: block;
  color: var(--ink);
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1);
}
.brand__mark:hover .brand__logo {
  transform: rotate(-4deg) translateY(-1px);
}
.brand__type {
  min-width: 0;
  padding-top: 4px;
}
.brand__wordmark {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
}
.brand__dot {
  color: var(--leaf);
}
.brand__tagline {
  margin: 5px 0 0;
  font-size: 11px;
  color: var(--muted);
  font-family: Georgia, 'Times New Roman', 'Nanum Myeongjo', serif;
  font-style: italic;
  letter-spacing: 0.01em;
  font-weight: 400;
  line-height: 1.3;
}
.brand__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 6px;
}
.brand__count {
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: var(--accent-deep);
  font-size: 12px;
  background: var(--accent-softer);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid var(--accent-soft);
}
.brand__count strong {
  font-size: 16px;
  color: var(--accent-deep);
  font-weight: 800;
}

/* Character picker */
.char-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1.5px solid var(--line-strong);
  background: var(--card);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  padding: 0;
}
.char-btn:hover {
  border-color: var(--accent);
  background: var(--accent-softer);
  transform: translateY(-1px);
}

.char-picker {
  position: absolute;
  top: 72px;
  right: 18px;
  z-index: 1000;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 17, 21, .12), 0 3px 8px rgba(15, 17, 21, .05);
  padding: 16px;
  width: 288px;
  animation: slideIn .18s ease-out;
}
.char-picker--hidden { display: none; }
.char-picker__title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.char-picker__grid {
  display: grid;
  grid-template-columns: repeat(6, 40px);
  grid-auto-rows: 40px;
  gap: 6px;
  justify-content: center;
}
.char-option {
  width: 40px;
  height: 40px;
  border: 1.5px solid transparent;
  background: transparent;
  border-radius: 10px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .12s;
  padding: 0;
}
.char-option:hover {
  background: var(--chip-bg);
  transform: scale(1.1);
}
.char-option.char-option--active {
  background: var(--accent-softer);
  border-color: var(--accent);
}
.char-picker__hint {
  font-size: 10px;
  color: var(--muted);
  margin-top: 10px;
  text-align: center;
  letter-spacing: -0.01em;
}

.filters {
  padding: 14px 18px 14px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  position: relative;
}
.search-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.search {
  position: relative;
  flex: 1;
}

.filter-btn {
  flex-shrink: 0;
  width: 42px;
  height: auto;
  border-radius: 10px;
  border: 1.5px solid var(--line-strong);
  background: var(--bg);
  cursor: pointer;
  color: var(--ink-soft);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .18s cubic-bezier(.2, .9, .3, 1);
  padding: 0;
}
.filter-btn:hover {
  border-color: var(--ink-soft);
  color: var(--ink);
  transform: translateY(-1px);
}
.filter-btn:active { transform: translateY(0); }
.filter-btn--active {
  border-color: var(--accent);
  background: var(--accent-softer);
  color: var(--accent-deep);
}
.filter-btn__icon {
  width: 16px;
  height: 16px;
}
.filter-btn__count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(59, 130, 246, .4);
}
.filter-btn__count:empty { display: none; }

.active-filters {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 10px;
  transition: all .2s ease;
}
.active-filters--empty { margin-top: 0; }
.active-filter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px 4px 10px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: background .15s, transform .15s;
  animation: tagIn .2s cubic-bezier(.3, 1.3, .4, 1);
}
.active-filter:hover { background: var(--accent-deep); transform: translateY(-1px); }
.active-filter svg { width: 12px; height: 12px; }
@keyframes tagIn {
  from { opacity: 0; transform: scale(.8); }
  to { opacity: 1; transform: scale(1); }
}

/* Filter panel (dropdown) */
.filter-panel {
  position: absolute;
  top: calc(100% - 1px);
  left: 10px;
  right: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 17, 21, .14), 0 4px 12px rgba(15, 17, 21, .05);
  padding: 16px;
  z-index: 800;
  transform-origin: top right;
  animation: filterIn .25s cubic-bezier(.3, 1.3, .4, 1);
}
.filter-panel--hidden { display: none; }
@keyframes filterIn {
  from { opacity: 0; transform: translateY(-8px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.filter-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.filter-panel__title {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.filter-panel__close {
  width: 26px;
  height: 26px;
  border: none;
  background: var(--chip-bg);
  border-radius: 7px;
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.filter-panel__close:hover {
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.filter-panel__close svg { width: 14px; height: 14px; }

.filter-panel__section {
  padding: 10px 0 6px;
}
.filter-panel__section + .filter-panel__section {
  border-top: 1px dashed var(--line);
}
.filter-panel__label {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.filter-panel__foot {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
}
.filter-panel__clear {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  transition: color .15s;
  letter-spacing: -0.01em;
}
.filter-panel__clear:hover { color: var(--accent-deep); }
.search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.search input {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border: 1.5px solid var(--line-strong);
  background: var(--bg);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  transition: all .15s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-soft);
}


.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}
.chip {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .15s;
  letter-spacing: -0.01em;
  font-family: inherit;
}
.chip:hover {
  background: var(--chip-hover);
}
.chip.chip--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, .25);
}

.chip--pick {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px 5px 10px;
  background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
  color: #7c3a03;
  border-color: rgba(245, 158, 11, .45);
  box-shadow:
    0 2px 6px rgba(245, 158, 11, .22),
    inset 0 1px 0 rgba(255, 255, 255, .5);
}
.chip--pick svg {
  width: 11px;
  height: 11px;
  opacity: 0.85;
}
.chip--pick:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  transform: translateY(-1px);
}
.chip--pick.chip--active {
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  color: #fff;
  border-color: #b45309;
  box-shadow: 0 3px 10px rgba(180, 83, 9, .35);
}

/* ---------- View toggle ---------- */
.view-toggle {
  display: flex;
  gap: 4px;
  margin-top: 10px;
}
.view-toggle__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  transition: all .15s;
}
.view-toggle__btn svg {
  width: 14px;
  height: 14px;
}
.view-toggle__btn:hover {
  border-color: var(--ink-soft);
  color: var(--ink-soft);
}
.view-toggle__btn--active {
  border-color: var(--accent);
  background: var(--accent-softer);
  color: var(--accent);
}

/* ---------- Timeline ---------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 12px 18px 20px;
  overflow-y: auto;
  flex: 1 1 0;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.timeline::-webkit-scrollbar { width: 8px; }
.timeline::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
.timeline--hidden { display: none; }
.list--hidden { display: none; }

.tl-group {
  position: relative;
  padding-left: 20px;
  border-left: 2px solid var(--line-strong);
  margin-left: 8px;
}
.tl-group + .tl-group { margin-top: 8px; }
.tl-group__label {
  position: relative;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.02em;
  padding: 4px 0 8px;
}
.tl-group__label::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--card);
  box-shadow: 0 0 0 2px var(--accent);
}

.tl-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 2px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s;
  position: relative;
}
.tl-item:hover {
  background: var(--chip-bg);
}
.tl-item--active {
  background: var(--accent-softer);
  box-shadow: inset 3px 0 0 var(--accent);
}
.tl-item__dot {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  position: relative;
}
.tl-item__dot::before {
  content: '';
  position: absolute;
  left: -25px;
  top: 50%;
  width: 12px;
  height: 2px;
  background: var(--line-strong);
}
.tl-item__body {
  flex: 1;
  min-width: 0;
}
.tl-item__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.tl-item__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.tl-item__date {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--chip-bg);
  padding: 2px 8px;
  border-radius: 999px;
}
.tl-item__meta {
  display: flex;
  gap: 6px;
  color: var(--muted);
  font-size: 11.5px;
  margin-top: 2px;
  align-items: center;
}
.tl-item__cat {
  font-weight: 700;
}
.tl-item__meta span + span::before {
  content: "·";
  margin-right: 6px;
  color: var(--line-strong);
}
.tl-item__comment {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 4px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  letter-spacing: -0.01em;
}

/* ---------- List ---------- */
.list {
  list-style: none;
  margin: 0;
  padding: 8px 10px 12px;
  overflow-y: auto;
  flex: 1 1 0;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.list::-webkit-scrollbar { width: 8px; }
.list::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }

.list__item {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s;
  position: relative;
}
.list__item:hover {
  background: var(--chip-bg);
}
.list__item.list__item--active {
  background: var(--accent-softer);
  box-shadow: inset 3px 0 0 var(--accent);
}
.list__item + .list__item { margin-top: 2px; }

.list__emoji {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1.5px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
}
.list__body {
  flex: 1;
  min-width: 0;
}

.list__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.list__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.parking {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  line-height: 1.2;
}

.pick-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  padding: 4px 11px 4px 9px;
  background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
  color: #7c3a03;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  line-height: 1.3;
  border-radius: 999px;
  box-shadow:
    0 2px 6px rgba(245, 158, 11, .25),
    inset 0 1px 0 rgba(255, 255, 255, .5);
  border: 1px solid rgba(245, 158, 11, .45);
}
.pick-badge__icon {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  opacity: 0.85;
}
.pick-badge--lg {
  margin: 0 0 12px;
  padding: 5px 13px 5px 11px;
  font-size: 12px;
  gap: 5px;
}
.pick-badge--lg .pick-badge__icon {
  width: 13px;
  height: 13px;
}
.parking--yes {
  background: #dcfce7;
  color: #166534;
}
.parking--no {
  background: #fee2e2;
  color: #991b1b;
}
.parking--unknown {
  background: #f1f3f5;
  color: #6b7280;
}
.list__meta {
  display: flex;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
  align-items: center;
  flex-wrap: wrap;
}
.list__cat {
  font-weight: 700;
}
.list__meta span + span::before {
  content: "·";
  margin-right: 6px;
  color: var(--line-strong);
}
.list__comment {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 6px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  letter-spacing: -0.01em;
}

.list__empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.side-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.08em;
  flex-shrink: 0;
  text-transform: uppercase;
  font-weight: 600;
}

/* ---------- Map ---------- */
.map-wrap { position: relative; min-width: 0; }
#map {
  width: 100%;
  height: 100%;
  background: #e9edf2;
}
.leaflet-container {
  font-family: inherit;
  background: #e9edf2;
}
.leaflet-interactive {
  cursor: pointer;
  transition: fill-opacity .15s ease;
}
.province-tooltip {
  background: rgba(15, 17, 21, .85) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 4px 10px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  box-shadow: 0 4px 12px rgba(15, 17, 21, .2) !important;
  backdrop-filter: blur(4px);
}
.province-tooltip::before { display: none !important; }
.leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 4px 16px rgba(15, 17, 21, .08) !important;
  border-radius: 10px !important;
  overflow: hidden;
  margin: 14px !important;
}
.leaflet-control-zoom a {
  background: #fff !important;
  color: var(--ink) !important;
  border: none !important;
  font-weight: 500 !important;
  width: 34px !important;
  height: 34px !important;
  line-height: 34px !important;
}
.leaflet-control-zoom a:hover {
  background: var(--accent-soft) !important;
  color: var(--accent-deep) !important;
}
.leaflet-control-attribution {
  background: rgba(255,255,255,.9) !important;
  font-size: 10px !important;
  color: var(--muted) !important;
  border-radius: 6px 0 0 0 !important;
  padding: 2px 8px !important;
}

.home-btn {
  position: absolute;
  bottom: 24px;
  right: 24px;
  z-index: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px 9px 11px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 17, 21, .10), 0 1px 3px rgba(15, 17, 21, .04);
  transition: all .18s cubic-bezier(.2, .9, .3, 1);
  letter-spacing: -0.01em;
}
.home-btn:hover {
  background: var(--accent-softer);
  border-color: var(--accent);
  color: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(59, 130, 246, .18), 0 2px 4px rgba(15, 17, 21, .05);
}
.home-btn:active {
  transform: translateY(0);
}
.home-btn svg {
  width: 14px;
  height: 14px;
}

/* ---------- Markers ---------- */
.fm-marker {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--marker-color);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(15, 17, 21, .15), 0 1px 3px rgba(15, 17, 21, .08);
  cursor: pointer;
  transition: transform .2s cubic-bezier(.3, 1.3, .5, 1);
  position: relative;
}
.fm-marker::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--marker-color);
  filter: drop-shadow(0 2px 2px rgba(15, 17, 21, .12));
}
.fm-marker__emoji {
  font-size: 18px;
  line-height: 1;
}
.fm-marker:hover {
  transform: scale(1.1) translateY(-2px);
  z-index: 500;
}
.fm-marker--active {
  transform: scale(1.2) translateY(-3px);
  z-index: 501;
  box-shadow: 0 8px 22px rgba(59, 130, 246, .3), 0 3px 6px rgba(15, 17, 21, .1);
  border-color: var(--marker-color);
  outline: 3px solid rgba(59, 130, 246, .25);
  outline-offset: 2px;
}

/* ---------- Angel delivery ---------- */
.angel {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 900;
  pointer-events: none;
  width: 60px;
  height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  will-change: transform, opacity;
  transition: opacity .35s ease-out;
}
.angel--hidden { opacity: 0; }
.angel__body {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 10px rgba(59, 130, 246, .35))
          drop-shadow(0 2px 4px rgba(15, 17, 21, .18));
}
.angel__emoji {
  font-size: 36px;
  line-height: 1;
  animation: angel-bob 0.9s ease-in-out infinite;
}
.angel__wing {
  position: absolute;
  top: 6px;
  font-size: 14px;
  opacity: 0.9;
}
.angel__wing--l { left: -8px; animation: wing-l 0.6s ease-in-out infinite; }
.angel__wing--r { right: -8px; animation: wing-r 0.6s ease-in-out infinite; }
.angel__label {
  background: rgba(15, 17, 21, .85);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: -0.01em;
  backdrop-filter: blur(4px);
  animation: label-bob 0.9s ease-in-out infinite;
}
.angel--arrived .angel__body {
  animation: angel-land 0.9s cubic-bezier(.3, 1.6, .4, 1);
}
.angel--arrived .angel__label {
  animation: label-pop 0.45s cubic-bezier(.3, 1.8, .4, 1) forwards;
}
.angel--arrived .angel__wing {
  animation: wing-burst 0.8s ease-out forwards;
}

@keyframes angel-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes label-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
@keyframes wing-l {
  0%, 100% { transform: translateX(0) rotate(-12deg); }
  50% { transform: translateX(-3px) rotate(-22deg); }
}
@keyframes wing-r {
  0%, 100% { transform: translateX(0) rotate(12deg); }
  50% { transform: translateX(3px) rotate(22deg); }
}
@keyframes angel-land {
  0% { transform: scale(1); }
  35% { transform: scale(1.3); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); }
}
@keyframes label-pop {
  0% { transform: scale(1); background: rgba(15, 17, 21, .85); }
  50% { transform: scale(1.15); background: var(--accent); }
  100% { transform: scale(1); background: var(--accent); }
}
@keyframes wing-burst {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.5) translateY(-10px); }
}

/* ---------- Detail panel ---------- */
.detail {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 360px;
  max-width: calc(100% - 40px);
  max-height: calc(100% - 40px);
  overflow-y: auto;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(15, 17, 21, .12), 0 3px 10px rgba(15, 17, 21, .04);
  padding: 24px 22px 20px;
  z-index: 500;
  animation: slideIn .2s cubic-bezier(.2, .9, .3, 1);
  border: 1px solid var(--line);
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.detail--hidden { display: none; }
.detail__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 0;
  background: var(--chip-bg);
  cursor: pointer;
  color: var(--ink-soft);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.detail__close:hover {
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.detail__close svg { width: 16px; height: 16px; }

.detail__photo {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 14px;
  background: var(--line);
}
.detail__photo-placeholder {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: 12px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed var(--line);
}
.detail__photo-placeholder span {
  font-size: 2.5rem;
  opacity: 0.7;
}
.detail__emoji {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1.5px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 12px;
}
.detail__badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  margin-bottom: 8px;
}
.detail__name {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.3;
}
.detail__comment {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: -0.01em;
}
.detail__grid {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-bottom: 16px;
}
.detail__row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  font-size: 13px;
  padding: 6px 0;
  letter-spacing: -0.01em;
}
.detail__row dt {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}
.detail__row dd {
  margin: 0;
  color: var(--ink);
}
.detail__links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.detail__links a,
.detail__links button {
  padding: 11px;
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  transition: all .15s;
  letter-spacing: -0.01em;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.detail__links a.link--primary {
  background: var(--accent);
  color: #fff;
}
.detail__links a.link--primary:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, .25);
}
.detail__links a.link--ghost {
  background: var(--chip-bg);
  color: var(--ink);
}
.detail__links a.link--ghost:hover {
  background: var(--chip-hover);
}

/* ---------- Suggestion phone widget ---------- */
.suggest-btn {
  position: absolute;
  bottom: 24px;
  left: 24px;
  z-index: 700;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(59, 130, 246, .35), 0 3px 8px rgba(15, 17, 21, .15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: box-shadow .18s;
  transform-origin: center;
}
.suggest-btn__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  animation: phone-ring 3s ease-in-out infinite;
  transform-origin: center;
}
.suggest-btn:hover {
  box-shadow: 0 12px 32px rgba(59, 130, 246, .45), 0 4px 10px rgba(15, 17, 21, .18);
}
.suggest-btn:hover .suggest-btn__inner {
  animation: none;
  transform: scale(1.08) translateY(-1px);
  transition: transform .18s cubic-bezier(.3, 1.5, .5, 1);
}
.suggest-btn:active .suggest-btn__inner {
  transform: scale(0.96);
}
.suggest-btn__emoji {
  font-size: 24px;
  line-height: 1;
}
.suggest-btn__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
@keyframes phone-ring {
  0%, 22%, 100% { transform: translate(0) rotate(0); }
  2%  { transform: translate(-3px, -1px) rotate(-8deg); }
  4%  { transform: translate(3px, 1px)   rotate(8deg); }
  6%  { transform: translate(-3px, 0)    rotate(-7deg); }
  8%  { transform: translate(3px, -1px)  rotate(7deg); }
  10% { transform: translate(-3px, 1px)  rotate(-6deg); }
  12% { transform: translate(3px, 0)     rotate(6deg); }
  14% { transform: translate(-2px, -1px) rotate(-5deg); }
  16% { transform: translate(2px, 1px)   rotate(5deg); }
  18% { transform: translate(-1px, 0)    rotate(-2deg); }
  20% { transform: translate(1px, 0)     rotate(1deg); }
}

.suggest {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 21, .35);
  backdrop-filter: blur(4px);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .2s ease-out;
}
.suggest--hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.suggest__phone {
  width: 420px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  background: #111318;
  border-radius: 44px;
  padding: 12px;
  box-shadow: 0 24px 60px rgba(15, 17, 21, .4), 0 0 0 2px rgba(255,255,255,.08) inset;
  position: relative;
  animation: phoneIn .28s cubic-bezier(.3, 1.4, .4, 1);
}
@keyframes phoneIn {
  from { opacity: 0; transform: translateY(20px) scale(.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.suggest__notch {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 26px;
  background: #000;
  border-radius: 16px;
  z-index: 2;
}
.suggest__screen {
  background: #fff;
  border-radius: 32px;
  padding: 56px 22px 22px;
  max-height: calc(100vh - 88px);
  overflow-y: auto;
  position: relative;
}
.suggest__close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 3;
  width: 28px;
  height: 28px;
  border: none;
  background: var(--chip-bg);
  border-radius: 8px;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: all .15s;
}
.suggest__close:hover {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.suggest__head {
  text-align: center;
  padding: 4px 4px 14px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 12px;
}
.suggest__title {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}
.suggest__sub {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.suggest__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.suggest__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.suggest__field > span {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: 0;
}
.suggest__field em {
  font-style: normal;
  color: var(--muted);
  font-weight: 500;
  font-size: 10.5px;
  margin-left: 2px;
}
.suggest__field input,
.suggest__field select,
.suggest__field textarea {
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  transition: all .15s;
  resize: vertical;
}
.suggest__field input:focus,
.suggest__field select:focus,
.suggest__field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.suggest__foot {
  margin-top: 18px;
}
.suggest__submit {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all .15s;
  letter-spacing: -0.01em;
}
.suggest__submit:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, .3);
}
.suggest__hint {
  font-size: 10.5px;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
  letter-spacing: -0.01em;
}
.suggest__foot--hidden { display: none; }
.suggest__body--hidden { display: none; }
.suggest__submit--ghost {
  background: var(--chip-bg);
  color: var(--ink);
}
.suggest__submit--ghost:hover {
  background: var(--chip-hover);
  box-shadow: none;
}

/* Chat view inside phone */
.chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat--hidden { display: none; }
.chat__peer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 10px;
  border-bottom: 1px dashed var(--line);
  font-size: 11px;
}
.chat__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.chat__name { font-weight: 700; color: var(--ink); }
.chat__online {
  margin-left: auto;
  color: #10b981;
  font-size: 10px;
  font-weight: 600;
}
.chat__stream {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
  padding: 6px 2px;
}
.chat__bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  animation: bubbleIn .25s cubic-bezier(.3, 1.4, .4, 1);
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat__bubble--out {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat__bubble--in {
  align-self: flex-start;
  background: var(--chip-bg);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.chat__bubble__head {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
}
.chat__bubble__line {
  font-size: 11.5px;
  opacity: 0.95;
}
.chat__bubble__line--dim { opacity: 0.75; font-size: 11px; margin-top: 2px; }
.chat__bubble .kaomoji {
  display: inline-block;
  margin-top: 2px;
  font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
  font-weight: 700;
  letter-spacing: 0;
}

/* Typing indicator */
.chat__bubble--typing {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  align-items: center;
}
.chat__bubble--typing span {
  width: 6px;
  height: 6px;
  background: var(--ink-soft);
  border-radius: 50%;
  opacity: 0.4;
  animation: typing-dot 1s ease-in-out infinite;
}
.chat__bubble--typing span:nth-child(2) { animation-delay: 0.15s; }
.chat__bubble--typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-dot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  z-index: 2000;
  box-shadow: 0 8px 24px rgba(15, 17, 21, .35);
  letter-spacing: -0.01em;
  animation: toastIn .25s cubic-bezier(.3, 1.3, .4, 1);
}
.toast--hidden { display: none; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ---------- Mobile tab bar (hidden on desktop) ---------- */
.mobile-tabs { display: none; }

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
  body {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 60px;
    grid-template-areas:
      "view"
      "tabs";
  }
  .sidebar,
  .map-wrap {
    grid-area: view;
    height: 100%;
    border-right: 0;
  }
  .sidebar { display: none; }
  body.mv-list .sidebar { display: flex; }
  body.mv-list .map-wrap { display: none; }
  body.mv-map .sidebar { display: none; }
  body.mv-map .map-wrap { display: block; }

  .brand { padding: 16px 16px 12px; gap: 10px; }
  .brand__main { gap: 12px; }
  .brand__wordmark { font-size: 20px; }
  .brand__logo { width: 42px; height: 52px; }
  .brand__tagline { font-size: 10px; margin-top: 3px; }
  .brand__actions { gap: 5px; padding-top: 4px; }
  .detail {
    width: calc(100% - 24px);
    top: 12px;
    right: 12px;
    max-height: calc(100% - 24px);
  }

  .mobile-tabs {
    grid-area: tabs;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--card);
    border-top: 1px solid var(--line);
    box-shadow: 0 -2px 12px rgba(15, 17, 21, .05);
    z-index: 100;
  }
  .mobile-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: none;
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: color .15s;
    padding: 8px;
    letter-spacing: -0.01em;
    position: relative;
  }
  .mobile-tab svg { width: 22px; height: 22px; }
  .mobile-tab--active {
    color: var(--accent);
  }
  .mobile-tab--active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 3px;
    background: var(--accent);
    border-radius: 0 0 3px 3px;
  }

  .suggest-btn { bottom: 14px; left: 14px; width: 56px; height: 56px; }
  .home-btn { bottom: 14px; right: 14px; padding: 8px 12px; font-size: 11.5px; }
}

/* ---------- Dark mode ---------- */
:root[data-theme="dark"] {
  --bg: #0f1115;
  --card: #181b21;
  --ink: #e7eaef;
  --ink-soft: #b4bac4;
  --muted: #7e8693;
  --line: #2a2e37;
  --line-strong: #3a3f4a;
  --chip-bg: #232830;
  --chip-hover: #2d333c;

  --accent: #60a5fa;
  --accent-deep: #93c5fd;
  --accent-soft: #1e3a8a;
  --accent-softer: #1a2438;

  /* CI: Falling Leaf — brightened for dark bg */
  --leaf: #f0a261;
  --leaf-deep: #d4722c;
  --leaf-soft: #3a2818;
}

:root[data-theme="dark"] .leaflet-container {
  background: #1a1d22;
}
:root[data-theme="dark"] .leaflet-control-attribution,
:root[data-theme="dark"] .leaflet-control-zoom a {
  background: rgba(24, 27, 33, .9);
  color: var(--ink);
}
:root[data-theme="dark"] .leaflet-control-zoom a { border-color: var(--line-strong); }
:root[data-theme="dark"] .province-tooltip {
  background: rgba(24, 27, 33, .92) !important;
  color: var(--ink) !important;
  border-color: var(--line-strong) !important;
}

.theme-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1.5px solid var(--line-strong);
  background: var(--card);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  padding: 0;
  color: var(--ink);
}
.theme-btn:hover {
  border-color: var(--accent);
  background: var(--accent-softer);
  transform: translateY(-1px);
}

/* ---------- Favorite indicator ---------- */
.list__fav {
  display: inline-block;
  margin-right: 4px;
  font-size: 13px;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.05));
}
.detail__fav {
  background: var(--chip-bg);
  color: var(--ink);
  grid-column: 1 / -1;
}
.detail__fav:hover { background: var(--chip-hover); }
.detail__fav[aria-pressed="true"] {
  background: #ffe4e6;
  color: #be123c;
}
:root[data-theme="dark"] .detail__fav[aria-pressed="true"] {
  background: #3f1d2a;
  color: #fda4af;
}

.chip--fav { font-weight: 600; }

/* ---------- Data-load error & empty ---------- */
.list__empty small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }

/* ---------- Cluster tweaks ---------- */
.marker-cluster-small,
.marker-cluster-small div { background: rgba(59, 130, 246, .3); color: #fff; }
.marker-cluster-small div { background: rgba(59, 130, 246, .85); }
.marker-cluster-medium,
.marker-cluster-medium div { background: rgba(37, 99, 235, .3); color: #fff; }
.marker-cluster-medium div { background: rgba(37, 99, 235, .9); }
.marker-cluster-large,
.marker-cluster-large div { background: rgba(29, 78, 216, .3); color: #fff; }
.marker-cluster-large div { background: rgba(29, 78, 216, .95); }
.marker-cluster div { font-weight: 700; font-size: 12px; }

/* ---------- Submit loading state ---------- */
.suggest__submit--loading { opacity: .75; cursor: wait; }
.suggest__submit--loading::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: sgspin .7s linear infinite;
  vertical-align: -2px;
}
@keyframes sgspin { to { transform: rotate(360deg); } }

