:root {
  --primary: #e74c3c;
  --primary-2: #cf3f2f;
  --primary-ink: #b23425;
  --primary-soft: #fdece9;
  --secondary: #b23425;
  --accent: #a97514;
  --background: #efece8;
  --surface: #fff;
  --surface-2: #f7f4f1;
  --surface-glass: rgba(255, 255, 255, 0.92);
  --text: #191614;
  --muted: #5f5952;
  --border: #e5dfd8;
  --danger: #c0392b;
  --shadow: 0 12px 30px rgba(35, 26, 21, 0.13);
  --shadow-sm: 0 4px 12px rgba(35, 26, 21, 0.08);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --sidebar: 500px;
  --gutter: 20px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
[data-theme="dark"] {
  --primary-ink: #ff8a76;
  --primary-soft: #38211d;
  --secondary: #ff8a76;
  --background: #16130f;
  --surface: #201c18;
  --surface-2: #292420;
  --surface-glass: rgba(32, 28, 24, 0.92);
  --text: #f7f2ec;
  --muted: #b1a79c;
  --border: #37302a;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
body {
  font-family:
    "Be Vietnam Pro",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
  font-weight: 500;
  background: var(--background);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3 {
  font-weight: 800;
  letter-spacing: -0.01em;
}
button,
input {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  color: inherit;
  font-weight: 700;
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  display: block;
  max-width: 100%;
}
.leaflet-container img.leaflet-tile {
  max-width: none !important;
  max-height: none !important;
  width: 256px;
  height: 256px;
  margin: 0;
  padding: 0;
}
.leaflet-container {
  font-family: inherit;
}
[hidden] {
  display: none !important;
}
.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 9999;
  padding: 10px 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  top: 12px;
}

/* Máy hẹp ngang vẫn phải chừa đủ đất cho bản đồ. */
@media (min-width: 821px) and (max-width: 1180px) {
  :root {
    --sidebar: 44vw;
  }
}

/* ---------- Bố cục chính ---------- */
/* Bản đồ tách hẳn khỏi bố cục: nó luôn trải kín khung, còn bảng danh sách
   là một lớp phủ trượt bên trên. Nhờ vậy đóng/mở bảng không hề đổi kích
   thước bản đồ — không có lần dựng lại nào, cũng không có cú nhảy địa hình
   do Leaflet giữ nguyên tâm khi khung đổi bề ngang. Thay vào đó ta chủ động
   trượt nội dung bản đồ nửa bề ngang bảng để vùng đang xem về giữa. */
.app-shell {
  position: relative;
  width: 100%;
  height: 100%;
}
.sidebar {
  position: absolute;
  z-index: 500;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  box-shadow: 4px 0 20px rgba(35, 26, 21, 0.08);
  overflow: hidden;
  transition: transform 0.26s cubic-bezier(0.32, 0.72, 0, 1);
}
.app-shell.sidebar-hidden .sidebar {
  transform: translateX(-100%);
}
.view-stack {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}
.view {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.26s cubic-bezier(0.32, 0.72, 0, 1),
    visibility 0.26s;
}
/* Phải dùng :not(.active) — chọn theo id thì độ ưu tiên cao hơn .view.active
   và khung đang mở sẽ kẹt ở vị trí lệch. */
#detail-view:not(.active) {
  transform: translateX(22px);
}
#list-view:not(.active) {
  transform: translateX(-14px);
}
.view.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}
.sheet-handle {
  display: none;
}

/* Thanh cuộn nổi của riêng panel (chỉ PC).
   Thanh cuộn hệ thống trên Windows chiếm hẳn một rãnh rộng và cắt ngang
   mép phải, nên ẩn nó đi và vẽ thanh nổi đè lên nội dung. */
@media (min-width: 821px) {
  /* Header, ô tìm kiếm, bộ lọc và thanh kết quả đứng yên;
     chỉ từ khối gợi ý trở xuống mới cuộn. */
  #list-view {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .list-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .view,
  .list-scroll {
    scrollbar-width: none;
  }
  .view::-webkit-scrollbar,
  .list-scroll::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
  .sidebar-scroll {
    position: absolute;
    z-index: 40;
    top: 6px;
    right: 3px;
    width: 11px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }
  .sidebar-scroll.is-active,
  .sidebar:hover .sidebar-scroll {
    opacity: 1;
    pointer-events: auto;
  }
  .sidebar-scroll i {
    position: absolute;
    left: 2px;
    top: 0;
    width: 7px;
    border-radius: 999px;
    background: rgba(25, 22, 20, 0.26);
    transition: background 0.16s;
  }
  .sidebar-scroll:hover i {
    background: rgba(25, 22, 20, 0.42);
  }
  .sidebar-scroll.is-dragging i {
    background: var(--primary);
  }
  [data-theme="dark"] .sidebar-scroll i {
    background: rgba(247, 242, 236, 0.24);
  }
  [data-theme="dark"] .sidebar-scroll:hover i {
    background: rgba(247, 242, 236, 0.4);
  }
}

/* ---------- Header ---------- */
.brand-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px var(--gutter);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.brand img {
  flex: 0 0 auto;
  border-radius: var(--radius-sm);
}
.brand span {
  display: grid;
  min-width: 0;
}
.brand b {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand small {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition:
    background 0.16s,
    border-color 0.16s,
    color 0.16s;
}
.icon-btn:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-ink);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* ---------- Tìm kiếm ---------- */
.search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px var(--gutter);
  border-bottom: 1px solid var(--border);
}
.search-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}
.search-wrap > svg {
  position: absolute;
  left: 13px;
  top: 12px;
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}
.search-wrap input {
  width: 100%;
  height: 42px;
  padding: 0 38px 0 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  outline: none;
  transition:
    border-color 0.16s,
    background 0.16s,
    box-shadow 0.16s;
}
.search-wrap input::placeholder {
  color: var(--muted);
}
.search-wrap input:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.14);
}
.search-wrap input::-webkit-search-cancel-button {
  display: none;
}
.clear-search {
  position: absolute;
  right: 6px;
  top: 6px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  border-radius: var(--radius-xs);
  color: var(--muted);
  cursor: pointer;
}
.clear-search:hover {
  background: var(--surface-2);
  color: var(--text);
}
.clear-search svg {
  width: 16px;
  height: 16px;
}
.search-row .icon-btn {
  width: 42px;
  height: 42px;
}
.suggestions {
  position: absolute;
  z-index: 60;
  top: 48px;
  left: 0;
  right: 0;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 330px;
  overflow: auto;
}
.suggestion {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 7px;
  border: 0;
  background: transparent;
  text-align: left;
  border-radius: var(--radius-xs);
  cursor: pointer;
}
.suggestion:hover,
.suggestion[aria-selected="true"] {
  background: var(--primary-soft);
}
.suggestion img {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-xs);
  object-fit: cover;
  background: var(--surface-2);
}
.suggestion span {
  min-width: 0;
}
.suggestion b {
  display: block;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggestion small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Bộ lọc ---------- */
.filter-block {
  position: relative;
  padding: 12px var(--gutter);
  border-bottom: 1px solid var(--border);
}
.filter-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-row {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-more {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary-ink);
  cursor: pointer;
  transition:
    background 0.16s,
    border-color 0.16s;
}
.filter-more:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.filter-more svg {
  width: 16px;
  height: 16px;
  transition: transform 0.18s ease;
}
.filter-more[aria-expanded="true"] {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.filter-more[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.filter-row::-webkit-scrollbar {
  display: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.16s,
    border-color 0.16s,
    color 0.16s;
}
.chip svg {
  width: 15px;
  height: 15px;
}
.chip i.count {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.chip:hover {
  border-color: var(--primary);
  color: var(--primary-ink);
}
.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.chip.active:hover {
  background: var(--primary-2);
  color: #fff;
}
.chip.active i.count {
  color: rgba(255, 255, 255, 0.8);
}
.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  max-height: 38vh;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 4px 2px;
  border: 0;
  border-radius: var(--radius-xs);
  background: none;
  color: var(--primary-ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.text-btn:hover {
  color: var(--primary-2);
}
.text-btn svg {
  width: 15px;
  height: 15px;
}
.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.ghost-btn:hover {
  border-color: var(--primary);
  color: var(--primary-ink);
}
.ghost-btn svg {
  width: 15px;
  height: 15px;
}

/* ---------- Thanh kết quả ---------- */
.sub-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px var(--gutter);
  border-bottom: 1px solid var(--border);
}
.sub-toolbar > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.sub-toolbar b {
  font-size: 15px;
  font-weight: 800;
}
.sub-toolbar small {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Gợi ý ---------- */
.featured-section {
  padding: 14px var(--gutter);
  border-bottom: 1px solid var(--border);
  transition: padding 0.26s ease;
}
.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  transition: margin-bottom 0.26s ease;
}
.section-title > div {
  overflow: hidden;
  max-height: 64px;
  opacity: 1;
  transition:
    max-height 0.26s ease,
    opacity 0.18s ease;
}
.featured-section.is-collapsed .section-title > div {
  max-height: 0;
  opacity: 0;
}
.section-title span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--primary-ink);
}
.section-title h2 {
  font-size: 17px;
  margin: 2px 0 0;
}
.section-title .ghost-btn {
  margin-left: auto;
}
.featured-section.is-collapsed {
  padding-block: 8px;
}
.featured-section.is-collapsed .section-title {
  margin-bottom: 0;
}
.featured-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-height: 240px;
  overflow: hidden;
  transition:
    max-height 0.28s ease,
    opacity 0.2s ease,
    visibility 0s;
}
.featured-section.is-collapsed .featured-strip {
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    max-height 0.28s ease,
    opacity 0.2s ease,
    visibility 0s 0.28s;
}
.featured-card {
  position: relative;
  height: 132px;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0;
  background: var(--surface-2);
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.featured-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.featured-card:hover img {
  transform: scale(1.05);
}
.featured-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(20, 12, 9, 0.88), transparent 68%);
}
.featured-card span {
  position: absolute;
  z-index: 1;
  left: 12px;
  right: 12px;
  bottom: 11px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.featured-empty {
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.featured-restore {
  padding: 12px var(--gutter);
  border-bottom: 1px solid var(--border);
}

/* ---------- Banner ---------- */
.status-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 11px var(--gutter);
  border-bottom: 1px solid var(--border);
  background: #fff6e0;
  color: #7a5600;
  font-size: 13px;
  font-weight: 600;
}
.maintenance-banner {
  background: var(--primary-soft);
  color: var(--primary-ink);
}
[data-theme="dark"] .status-banner {
  background: #3b2f16;
  color: #f0d69b;
}
[data-theme="dark"] .maintenance-banner {
  background: var(--primary-soft);
  color: var(--primary-ink);
}
.status-banner svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

/* ---------- Danh sách địa điểm ---------- */
.place-list {
  display: grid;
  gap: 12px;
  padding: 14px var(--gutter) 36px;
}
.place-card {
  position: relative;
  display: grid;
  grid-template-columns: 40% minmax(0, 1fr);
  height: 146px;
  min-height: 146px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.16s,
    background 0.16s,
    box-shadow 0.16s;
}
.place-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.place-card.active {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.place-image {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: var(--surface-2);
}
.place-image img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.badge {
  position: absolute;
  left: 9px;
  top: 9px;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  background: rgba(25, 22, 20, 0.82);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.card-body {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 12px 13px 0;
  min-width: 0;
  overflow: hidden;
}
.card-body h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 34px 6px 0;
  font-size: 15px;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.meta-line,
.address-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.meta-line {
  flex-wrap: nowrap;
  overflow: hidden;
  white-space: nowrap;
}
.category-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--cat);
}
.meta-line .vr-flag {
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}
.meta-line .distance {
  margin-left: auto;
  color: var(--primary-ink);
  font-weight: 700;
}
.address-line {
  margin-top: 7px;
}
.address-line svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}
.address-line span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: auto -13px 0;
  border-top: 1px solid var(--border);
}
.card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.card-action + .card-action {
  border-left: 1px solid var(--border);
}
.card-action:hover {
  color: var(--primary-ink);
}
.card-action svg {
  width: 15px;
  height: 15px;
}
.card-action.is-on {
  color: var(--primary-ink);
}
.favorite-card {
  position: absolute;
  right: 9px;
  top: 9px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
}
.favorite-card:hover {
  background: var(--surface-2);
  color: var(--primary);
}
.favorite-card svg {
  width: 17px;
  height: 17px;
}
.favorite-card.active {
  color: var(--primary);
}
.favorite-card.active svg {
  fill: currentColor;
}
.empty-state {
  text-align: center;
  padding: 44px 26px;
  color: var(--muted);
}
.empty-state h3 {
  color: var(--text);
  margin: 14px 0 5px;
  font-size: 16px;
}
.empty-state p {
  font-size: 13px;
  margin: 0 0 16px;
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: auto;
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary-ink);
}
.primary-btn,
.secondary-btn,
.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.16s,
    border-color 0.16s,
    color 0.16s;
}
.primary-btn {
  background: var(--primary);
  color: #fff;
}
.primary-btn:hover {
  background: var(--primary-2);
}
.secondary-btn {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.secondary-btn:hover {
  border-color: var(--primary);
  color: var(--primary-ink);
}
.danger-btn {
  background: var(--danger);
  color: #fff;
}
.primary-btn svg,
.secondary-btn svg,
.danger-btn svg {
  width: 17px;
  height: 17px;
}
.skeleton-card {
  pointer-events: none;
  padding: 10px;
  grid-template-columns: 40% 1fr;
  min-height: 132px;
}
.skeleton-card > i,
.skeleton-card b,
.skeleton-card em {
  display: block;
  border-radius: var(--radius-xs);
  background: linear-gradient(
    90deg,
    var(--surface-2),
    var(--border),
    var(--surface-2)
  );
  background-size: 200% 100%;
  animation: skeleton 1.4s infinite;
}
.skeleton-card > i {
  height: 110px;
}
.skeleton-card > span {
  padding: 8px;
}
.skeleton-card b {
  height: 18px;
  width: 72%;
  margin-bottom: 14px;
}
.skeleton-card em {
  height: 11px;
  margin: 9px 0;
}
.skeleton-card em:last-child {
  width: 58%;
}
@keyframes skeleton {
  to {
    background-position: -200% 0;
  }
}

/* ---------- Bản đồ ---------- */
.map-stage {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
  background: var(--surface-2);
}
.map-stage #map {
  width: 100%;
  height: 100%;
  z-index: 1;
}
.leaflet-control-container .leaflet-top.leaflet-left {
  display: none;
}
.leaflet-control-attribution {
  font-size: 12px !important;
}
.map-topbar {
  position: absolute;
  z-index: 400;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  pointer-events: none;
}
/* Nút danh sách có thể bị ẩn, nên đẩy "Vị trí của tôi" bằng margin
   thay vì space-between — nếu không nó sẽ nhảy sang trái khi còn một nút. */
.list-toggle {
  margin-right: auto;
}
.map-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-glass);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  pointer-events: auto;
  cursor: pointer;
  transition:
    border-color 0.16s,
    color 0.16s;
}
.map-pill:hover {
  border-color: var(--primary);
  color: var(--primary-ink);
}
.map-pill svg {
  width: 17px;
  height: 17px;
  color: var(--primary);
}
.list-toggle b {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.map-controls {
  position: absolute;
  z-index: 400;
  right: 16px;
  top: 68px;
  display: grid;
  gap: 10px;
  justify-items: end;
}
.control-group {
  display: grid;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-glass);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  overflow: hidden;
}
.control-group button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition:
    background 0.16s,
    color 0.16s;
}
.control-group button + button {
  border-top: 1px solid var(--border);
}
.control-group button:hover {
  background: var(--primary-soft);
  color: var(--primary-ink);
}
.control-group svg {
  width: 18px;
  height: 18px;
}
.layer-menu {
  position: absolute;
  z-index: 410;
  right: 66px;
  top: 196px;
  width: 178px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 13px;
}
.layer-menu > b {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}
.layer-menu label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-radius: var(--radius-xs);
  font-weight: 600;
  cursor: pointer;
}
.layer-menu label:hover {
  background: var(--surface-2);
}
.layer-menu input {
  accent-color: var(--primary);
  margin: 0;
}
.journey-fab {
  position: absolute;
  z-index: 400;
  right: 16px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 15px;
  border: 0;
  border-radius: var(--radius);
  background: #191614;
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.journey-fab:hover {
  background: #2c2622;
}
.journey-fab svg {
  width: 18px;
  height: 18px;
}
.journey-fab b {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.map-credit {
  position: absolute;
  z-index: 390;
  left: 16px;
  bottom: 0;
  padding: 3px 7px;
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
  background: rgba(255, 255, 255, 0.8);
  color: #4a423c;
  font-size: 12px;
  font-weight: 600;
}
/* Lớp phủ bên trái che mất góc dưới trái của bản đồ, nên đẩy những thứ đặt
   ở đó sang phải chừng nào bảng còn mở. */
@media (min-width: 821px) {
  .map-credit {
    left: calc(var(--sidebar) + 16px);
    transition: left 0.26s cubic-bezier(0.32, 0.72, 0, 1);
  }
  .app-shell.sidebar-hidden .map-credit {
    left: 16px;
  }
  .map-tile-status {
    left: calc(50% + var(--sidebar) / 2);
    transition: left 0.26s cubic-bezier(0.32, 0.72, 0, 1);
  }
  .app-shell.sidebar-hidden .map-tile-status {
    left: 50%;
  }
}
.map-fallback {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 30px;
  background: var(--surface-2);
  color: var(--text);
}
.map-fallback svg {
  width: 52px;
  height: 52px;
  margin: auto;
  color: var(--primary);
}
.map-fallback h2 {
  margin: 15px 0 5px;
  font-size: 18px;
}
.map-fallback p {
  max-width: 380px;
  color: var(--muted);
}
.map-tile-status {
  position: absolute;
  z-index: 405;
  left: 50%;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(470px, calc(100% - 36px));
  padding: 10px 12px;
  border-radius: var(--radius);
  background: #191614;
  box-shadow: var(--shadow);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transform: translateX(-50%);
}
.map-tile-status > svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: #ff8a76;
}
.map-tile-status span {
  min-width: 0;
}
.map-tile-status button {
  min-height: 30px;
  flex: 0 0 auto;
  padding: 0 11px;
  border: 0;
  border-radius: var(--radius-xs);
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.map-tile-status.loading > svg {
  animation: pulse 1.2s ease-in-out infinite;
}

/* ---------- Marker ---------- */
.marker-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 48px;
}
.place-marker {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 3px solid #fff;
  border-radius: 14px 14px 14px 4px;
  transform: rotate(-45deg);
  background: var(--marker);
  box-shadow: 0 6px 14px rgba(35, 26, 21, 0.32);
  transition: 0.18s;
}
.place-marker span {
  font-size: 15px;
  transform: rotate(45deg);
}
.marker-wrap.active .place-marker {
  width: 40px;
  height: 40px;
  background: #191614;
  box-shadow: 0 8px 18px rgba(35, 26, 21, 0.4);
}
.marker-wrap.active::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  animation: pulse 1.7s infinite;
}
.user-marker {
  width: 18px;
  height: 18px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 8px rgba(231, 76, 60, 0.2);
}
@keyframes pulse {
  0% {
    transform: scale(0.8);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

/* ---------- Trang chi tiết ---------- */
.detail-hero {
  position: relative;
  height: 208px;
  background: var(--surface-2);
  overflow: hidden;
  cursor: pointer;
}
.detail-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 12, 9, 0.34),
    transparent 38%,
    rgba(20, 12, 9, 0.3)
  );
}
.detail-top {
  position: absolute;
  z-index: 2;
  left: 14px;
  right: 14px;
  top: 14px;
  display: flex;
  justify-content: space-between;
}
.detail-top > div {
  display: flex;
  gap: 8px;
}
.detail-top button {
  background: rgba(255, 255, 255, 0.94);
  border-color: transparent;
  color: #191614;
}
.detail-count {
  position: absolute;
  z-index: 2;
  left: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  background: rgba(25, 22, 20, 0.8);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.detail-count svg {
  width: 14px;
  height: 14px;
}
.detail-content {
  padding: 18px var(--gutter) 40px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--primary-ink);
  font-size: 13px;
  font-weight: 700;
}
.eyebrow svg {
  width: 15px;
  height: 15px;
}
.detail-title-row h1 {
  margin: 8px 0 6px;
  font-size: 26px;
  line-height: 1.2;
}
.detail-address {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.detail-address svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 2px;
}
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin: 18px 0;
}
.quick-action {
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 72px;
  padding: 10px 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    border-color 0.16s,
    background 0.16s;
}
.quick-action:hover:not([disabled]) {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.quick-action svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}
.quick-action[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.detail-tabs {
  position: relative;
  display: flex;
  gap: 6px;
  padding: 5px;
  background: var(--surface-2);
  border-radius: var(--radius);
  overflow: auto;
  scrollbar-width: none;
}
.detail-tabs::-webkit-scrollbar {
  display: none;
}
.tab-indicator {
  position: absolute;
  z-index: 0;
  top: 5px;
  bottom: 5px;
  left: 0;
  width: 0;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  transition:
    transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.detail-tab {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: max-content;
  padding: 9px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.detail-tab:hover {
  color: var(--text);
}
.detail-tab.active {
  color: var(--primary-ink);
}
.tab-panel {
  padding: 18px 2px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.75;
}
.tab-panel p {
  margin: 0;
}
.info-list,
.highlight-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.highlight-list li {
  display: flex;
  gap: 10px;
}
.highlight-list li::before {
  content: "✓";
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-ink);
  font-size: 12px;
  font-weight: 800;
}
.info-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
}
.info-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.info-list span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.info-list b,
.info-list a {
  text-align: right;
  font-weight: 700;
}
.info-list a {
  color: var(--primary-ink);
}
.place-feature-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
.detail-journey {
  width: 100%;
  margin-top: 10px;
}
.nearby {
  margin-top: 24px;
}
.nearby h3 {
  font-size: 16px;
  margin: 0 0 12px;
}
.nearby-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.nearby-card {
  position: relative;
  height: 104px;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  padding: 0;
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.nearby-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nearby-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(20, 12, 9, 0.88), transparent 66%);
}
.nearby-card b {
  position: absolute;
  z-index: 1;
  left: 10px;
  right: 10px;
  bottom: 9px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* ---------- Drawer ---------- */
.side-menu {
  position: fixed;
  z-index: 1200;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: min(396px, 90vw);
  height: 100%;
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translateX(-105%);
  transition: transform 0.24s ease;
}
.side-menu.open {
  transform: none;
}
.menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  border-bottom: 1px solid var(--border);
}
.menu-head b {
  font-size: 16px;
  font-weight: 800;
}
.menu-links {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px var(--gutter);
}
.menu-links > a,
.menu-links > button {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 58px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.menu-links > a + a,
.menu-links > button + button,
.menu-links > button + a {
  border-top: 1px solid var(--border);
}
.menu-links > a:hover,
.menu-links > button:hover {
  color: var(--primary-ink);
}
.menu-links svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  padding: 8px;
  box-sizing: content-box;
  border-radius: var(--radius-xs);
  background: var(--primary-soft);
  color: var(--primary);
}
.menu-links span {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.menu-note {
  display: flex;
  gap: 10px;
  margin: 4px var(--gutter) 16px;
  padding: 13px;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
}
.menu-note svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}
.menu-note p {
  margin: 0;
}
.menu-footer {
  padding: 16px var(--gutter) calc(16px + var(--safe-bottom));
  border-top: 1px solid var(--border);
}
.menu-footer .primary-btn {
  width: 100%;
  min-height: 48px;
}
.menu-footer b {
  font-weight: 700;
}
.scrim {
  position: fixed;
  z-index: 1100;
  inset: 0;
  background: rgba(25, 22, 20, 0.45);
}

/* ---------- Modal ---------- */
.modal-root:not(:empty) {
  position: fixed;
  z-index: 2000;
  inset: 0;
}
.modal-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(25, 22, 20, 0.62);
  backdrop-filter: blur(5px);
}
.modal {
  width: min(680px, 100%);
  max-height: min(780px, 92vh);
  overflow: auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.modal.full {
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  max-height: none;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 {
  font-size: 16px;
  margin: 0;
}
.modal-header > div {
  display: flex;
  gap: 8px;
}
.modal-body {
  padding: 18px;
}
.vr-stage {
  height: calc(100% - 61px);
  min-height: 430px;
  background: #141010;
}
.vr-stage iframe,
.vr-stage #panorama {
  width: 100%;
  height: 100%;
  border: 0;
}
.loading-box {
  display: grid;
  place-content: center;
  height: 100%;
  color: #fff;
  text-align: center;
}
.journey-list {
  display: grid;
  gap: 9px;
}
.journey-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.journey-item .number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.journey-item button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.journey-item button:hover {
  color: var(--primary);
}
.journey-actions {
  display: flex;
  gap: 9px;
  margin-top: 16px;
}
.gallery-modal {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #100c0a;
}
.modal.gallery-shell {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  background: #100c0a;
}
.gallery-modal img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}
.gallery-nav {
  position: absolute;
  inset-inline: 15px;
  top: 50%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.gallery-nav button {
  pointer-events: auto;
}
.gallery-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-weight: 700;
}
.toast-region {
  position: fixed;
  z-index: 3000;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 8px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 250px;
  max-width: 370px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #191614;
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 600;
  animation: toast-in 0.22s;
}
.toast.error {
  background: var(--danger);
}
.toast svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
button:focus-visible,
input:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
  html,
  body {
    overscroll-behavior: none;
  }
  .app-shell,
  .app-shell.sidebar-hidden {
    display: block;
    grid-template-columns: none;
  }
  .map-stage {
    position: absolute;
    inset: 0;
  }
  .sidebar {
    position: fixed;
    z-index: 600;
    left: 0;
    right: 0;
    /* Phải huỷ top của bản gốc: có cả top lẫn bottom lẫn height thì trình
       duyệt bỏ bottom, sheet sẽ dính lên đỉnh màn hình. */
    top: auto;
    bottom: 0;
    width: 100%;
    height: 57%;
    border: 0;
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: 0 -10px 30px rgba(35, 26, 21, 0.2);
    transition:
      transform 0.26s ease,
      height 0.26s ease;
  }
  .app-shell.sidebar-hidden .sidebar {
    transform: translateY(calc(100% - 26px));
  }
  /* Nấc 1 phải luôn để lọt tay cầm + header + ô tìm kiếm, nên đo theo nội
     dung thật chứ không lấy phần trăm màn hình — máy màn ngắn mà lấy 38%
     thì ô tìm kiếm bị cắt mất. Giá trị do ui.js đo rồi đặt vào --sheet-min. */
  .sidebar.sheet-collapsed {
    height: calc(var(--sheet-min, 160px) + var(--safe-bottom));
  }
  .sidebar.sheet-half {
    height: 57%;
  }
  .sidebar.sheet-full {
    height: 94%;
  }
  .sheet-handle {
    position: sticky;
    z-index: 80;
    top: 0;
    display: grid;
    place-items: center;
    width: 100%;
    height: 26px;
    border: 0;
    background: var(--surface);
    cursor: ns-resize;
    /* Bắt buộc: không có dòng này thì trình duyệt hiểu cú vuốt dọc là cuộn
       trang và nuốt mất sự kiện, sheet không kéo được. */
    touch-action: none;
  }
  .sheet-handle span {
    width: 44px;
    height: 4px;
    border-radius: 5px;
    background: var(--border);
  }
  :root {
    --gutter: 16px;
  }
  .brand-header {
    position: relative;
    padding: 8px var(--gutter) 12px;
  }
  .brand-header .brand {
    flex: 1 1 0;
    overflow: hidden;
  }
  .brand-header .header-actions {
    gap: 6px;
  }
  .brand-header .icon-btn {
    width: 36px;
    height: 36px;
  }
  .brand img {
    width: 36px;
    height: 36px;
  }
  .brand b {
    font-size: 15px;
  }
  /* Mobile đã có danh sách kết quả ngay trong sheet, nên không phủ thêm
     bảng gợi ý bên dưới ô tìm kiếm. Giao diện PC vẫn dùng bảng này. */
  .suggestions {
    display: none;
  }
  #list-view.search-active .filter-block,
  #list-view.search-active .sub-toolbar,
  #list-view.search-active .featured-section {
    display: none;
  }
  #sidebar-collapse {
    display: none;
  }
  .search-row,
  .filter-block,
  .sub-toolbar,
  .featured-section {
    padding-block: 12px;
  }
  .featured-card {
    height: 116px;
  }
  .place-list {
    padding-bottom: 120px;
  }
  .place-card {
    grid-template-columns: 40% minmax(0, 1fr);
    height: 146px;
    min-height: 146px;
  }
  .place-image {
    min-height: 0;
  }
  .map-topbar {
    top: 12px;
    left: 12px;
    right: 12px;
  }
  .map-controls {
    top: 62px;
    right: 12px;
  }
  .layer-menu {
    right: 62px;
    top: 190px;
  }
  /* Vùng chạm tối thiểu thoải mái hơn cho ngón tay. */
  .icon-btn,
  .search-row .icon-btn {
    width: 42px;
    height: 42px;
  }
  .chip {
    height: 38px;
  }
  .card-action {
    min-height: 44px;
  }
  .journey-fab,
  .map-credit {
    transition: bottom 0.26s ease;
  }
  .journey-fab {
    right: 12px;
    bottom: calc(57% + 12px);
  }
  .map-credit {
    left: 12px;
    bottom: calc(57% + 4px);
  }
  .sidebar.sheet-collapsed ~ .map-stage .journey-fab {
    bottom: calc(var(--sheet-min, 160px) + var(--safe-bottom) + 12px);
  }
  .sidebar.sheet-collapsed ~ .map-stage .map-credit {
    bottom: calc(var(--sheet-min, 160px) + var(--safe-bottom) + 4px);
  }
  /* Nấc 3 gần kín màn hình: mọi thứ nổi trên bản đồ phải tắt, nếu không
     nút "Vị trí của tôi" và cụm điều khiển sẽ đè lên mép trên của sheet. */
  .sidebar.sheet-full ~ .map-stage .journey-fab,
  .sidebar.sheet-full ~ .map-stage .map-credit,
  .sidebar.sheet-full ~ .map-stage .map-topbar,
  .sidebar.sheet-full ~ .map-stage .map-controls,
  .sidebar.sheet-full ~ .map-stage .layer-menu {
    opacity: 0;
    pointer-events: none;
  }
  .map-topbar,
  .map-controls {
    transition: opacity 0.2s ease;
  }
  .app-shell.sidebar-hidden .journey-fab {
    bottom: calc(34px + var(--safe-bottom));
  }
  .app-shell.sidebar-hidden .map-credit {
    bottom: calc(26px + var(--safe-bottom));
  }
  .map-tile-status {
    top: 62px;
    bottom: auto;
    max-width: calc(100% - 110px);
    padding: 8px 10px;
    font-size: 12px;
  }
  .detail-hero {
    height: 196px;
  }
  .detail-title-row h1 {
    font-size: 22px;
  }
  .modal.full {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
  .modal-overlay {
    padding: 0;
  }
  .toast-region {
    left: 12px;
    right: 12px;
    bottom: calc(90px + var(--safe-bottom));
  }
  .toast {
    min-width: 0;
    max-width: none;
  }
}
@media (max-width: 400px) {
  .card-action {
    gap: 4px;
    font-size: 12px;
  }
  .featured-card {
    height: 104px;
  }
  .quick-actions {
    gap: 6px;
  }
  .quick-action {
    padding-inline: 2px;
  }
  .map-pill span {
    display: none;
  }
  .list-toggle span {
    display: none;
  }
}
/* Chỉ giấu phụ đề trên màn hình thật sự hẹp — nấc 1 của bottom sheet lấy
   header làm chuẩn nên phụ đề vẫn phải thấy ở cỡ điện thoại thông thường. */
@media (max-width: 340px) {
  .brand small {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
