/* ==========================================================
   VR Tour - Thép Tây Đô : Liquid Glass UI (desktop + mobile)
   ========================================================== */

:root {
  /* Liquid Glass "clear": ít mờ, thấy rõ nền phía sau, viền phản sáng */
  --lg-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
  --lg-filter: blur(5px) saturate(1.9) brightness(0.68);
  --lg-rim:
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.4),
    inset 1.5px 1.5px 1px -1px rgba(255, 255, 255, 0.95),
    inset -1.5px -1.5px 1px -1px rgba(255, 255, 255, 0.55),
    inset 0 0 20px rgba(255, 255, 255, 0.08);
  --lg-drop: 0 8px 28px rgba(0, 0, 0, 0.2);

  /* Bảng nội dung: vẫn là kính nhưng dày hơn để đọc chữ */
  --panel-bg: linear-gradient(180deg, rgba(34, 38, 36, 0.5), rgba(18, 22, 20, 0.56));
  --panel-filter: blur(30px) saturate(1.7) brightness(0.78);

  --glass-light: rgba(255, 255, 255, 0.16);
  --stroke: rgba(255, 255, 255, 0.2);
  --stroke-strong: rgba(255, 255, 255, 0.36);
  --text: #fff;
  --text-2: rgba(255, 255, 255, 0.8);
  --text-3: rgba(255, 255, 255, 0.58);
  --accent: #f6c453;
  --accent-ink: #231a05;
  --brand: #0b4d34;
  --gutter: 16px;
  --dock-h: 60px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.5, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #101412;
  color: var(--text);
  font-family: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
[hidden] { display: none !important; }

.ic {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ic--xs { width: 14px; height: 14px; }

/* ---------- Liquid Glass ---------- */
.glass {
  background: var(--lg-bg);
  -webkit-backdrop-filter: var(--lg-filter);
  backdrop-filter: var(--lg-filter);
  border: 0;
  box-shadow: var(--lg-rim), var(--lg-drop);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.glass--panel {
  background: var(--panel-bg);
  -webkit-backdrop-filter: var(--panel-filter);
  backdrop-filter: var(--panel-filter);
  text-shadow: none;
}
/* Khúc xạ ở mép kính - chỉ Chromium desktop hỗ trợ url() trong backdrop-filter */
body.lg-refract .glass:not(.glass--panel) {
  backdrop-filter: url(#lg-refract) blur(4px) saturate(1.9) brightness(0.68);
}

/* Kính nhỏ dùng cho nút / nhãn nổi trên ảnh */
.icon-btn--glass,
.hero-count,
.card-badge,
.pin-label,
.pin--nav {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06));
  -webkit-backdrop-filter: blur(6px) saturate(1.8) brightness(0.78);
  backdrop-filter: blur(6px) saturate(1.8) brightness(0.78);
  box-shadow: var(--lg-rim), 0 4px 14px rgba(0, 0, 0, 0.18);
  border: 0;
}

.mobile-only { display: none !important; }

/* ---------- Panorama ---------- */
#panorama {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

.pnlm-panorama-info,
.pnlm-load-box,
.pnlm-about-msg,
.pnlm-controls-container { display: none !important; }

/* ---------- Logo ---------- */
/* Logo nền trong suốt, chuyển sang trắng để nổi trên kính */
.dock-logo {
  display: block;
  height: 36px;
  width: auto;
  flex: none;
  filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

/* ---------- Splash ---------- */
.splash {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(10, 14, 12, 0.5), rgba(10, 14, 12, 0.85)),
    url("../assets/thumbs/scenes/main.jpg") center / cover;
  transition: opacity 0.6s ease, visibility 0.6s;
}
.splash::before {
  content: "";
  position: absolute;
  inset: 0;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.splash-inner { position: relative; text-align: center; display: grid; justify-items: center; gap: 8px; }
.splash-mascot { width: 150px; height: auto; margin-bottom: -6px; animation: wave 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
.splash h1 { font-size: 28px; font-weight: 700; margin-top: 6px; }
.splash p { color: var(--text-2); }
.splash .spinner { margin-top: 16px; }
.splash.is-hidden { opacity: 0; visibility: hidden; }

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
.spinner--sm { width: 16px; height: 16px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-4deg) translateY(-3px); }
}

/* ---------- UI layer ---------- */
.ui {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}
.ui > *, .topbar > * { pointer-events: auto; }
.topbar { pointer-events: none; }

/* ---------- Topbar ---------- */
.topbar {
  position: absolute;
  top: var(--gutter);
  left: var(--gutter);
  right: var(--gutter);
  display: grid;
  grid-template-columns: 1fr minmax(0, 520px) 1fr;
  gap: 12px;
  align-items: center;
}

/* Pill vị trí hiện tại */
.place {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  max-width: 100%;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  font-size: 14px;
  white-space: nowrap;
  transition: transform 0.3s var(--spring);
}
.place:active { transform: scale(0.97); }
.place > .ic:first-child { width: 18px; height: 18px; color: var(--accent); }
.place-group { color: var(--text-2); }
.place-group::after { content: "/"; margin-left: 8px; color: var(--text-3); }
.place b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.place .ic--xs { color: var(--text-3); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  -webkit-appearance: none;
  appearance: none;
  line-height: 0;
  background: transparent;
  color: var(--text);
  transition: background 0.2s, transform 0.3s var(--spring);
}
.icon-btn .ic { display: block; }
.icon-btn:hover { background: var(--glass-light); }
.icon-btn:active { transform: scale(0.9); }
.icon-btn--sm { width: 34px; height: 34px; }
.icon-btn--sm .ic { width: 18px; height: 18px; }

/* ---------- Search ---------- */
.search { position: relative; }
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 10px 0 18px;
  border-radius: 999px;
  cursor: text;
}
.search-field .ic { color: var(--text-2); }
.search-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  text-shadow: inherit;
}
.search-field input::placeholder { color: var(--text-2); }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-field kbd {
  font: inherit;
  font-size: 12px;
  color: var(--text-2);
  border-radius: 7px;
  padding: 2px 8px;
  margin-right: 6px;
  box-shadow: inset 0 0 0 1px var(--stroke);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: min(60vh, 460px);
  overflow-y: auto;
  border-radius: 22px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top center;
  transition: opacity 0.2s, transform 0.35s var(--spring), visibility 0.2s;
  scrollbar-width: thin;
}
.search.is-open .search-results { opacity: 1; visibility: visible; transform: none; }
.result-group {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 10px 10px 6px;
}
.result {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  text-align: left;
}
.result:hover, .result.is-active { background: var(--glass-light); }
.result img {
  width: 56px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex: none;
  background: rgba(255, 255, 255, 0.08);
}
.result b { display: block; font-weight: 600; font-size: 14.5px; }
.result small { display: block; color: var(--text-3); font-size: 12.5px; margin-top: 1px; }
.result mark { background: none; color: var(--accent); }
.result-empty { padding: 18px 12px; color: var(--text-2); font-size: 14px; }

/* ---------- Dock ---------- */
.dock {
  position: absolute;
  left: 50%;
  bottom: calc(var(--gutter) + var(--safe-b));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  height: var(--dock-h);
  padding: 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.dock-brand {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 12px;
  font-weight: 700;
  font-size: 15px;
}

.dock-sep { width: 1px; height: 26px; background: var(--stroke); margin: 0 6px; }
.dock-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  min-width: 44px;
  justify-content: center;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  text-shadow: inherit;
  transition: background 0.25s, color 0.2s, padding 0.35s var(--spring), transform 0.3s var(--spring);
}
.dock-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.1); }
.dock-btn:active { transform: scale(0.92); }
.dock-btn span { display: none; }
.dock-btn.is-active {
  color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.14));
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.45), inset 1px 1px 1px -0.5px rgba(255, 255, 255, 0.9);
  padding: 0 16px;
}
.dock-btn.is-active span { display: inline; }
.dock-btn.is-on { color: var(--accent); }

/* ---------- Explore drawer ---------- */
.explore {
  position: absolute;
  left: 50%;
  bottom: calc(var(--gutter) + var(--dock-h) + 14px + var(--safe-b));
  width: min(1120px, calc(100vw - 2 * var(--gutter)));
  border-radius: 28px;
  padding: 14px 14px 16px;
  transform: translate(-50%, 16px) scale(0.98);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, transform 0.4s var(--spring), visibility 0.25s;
}
body.explore-open .explore { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

.explore-head { display: flex; align-items: center; gap: 14px; padding: 0 2px 12px 6px; }
.explore-head h3 { font-size: 16px; font-weight: 700; white-space: nowrap; }
.explore-head .icon-btn { margin-left: auto; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 0;
  box-shadow: inset 0 0 0 1px var(--stroke);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.chip small { color: var(--text-3); font-size: 12px; }
.chip:hover { color: var(--text); }
.chip.is-active { background: #fff; color: #151a17; box-shadow: none; }
.chip.is-active small { color: rgba(21, 26, 23, 0.6); }

.explore-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 4px;
  padding: 2px 4px 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}
.card {
  position: relative;
  flex: none;
  width: 220px;
  aspect-ratio: 16 / 11;
  border-radius: 18px;
  overflow: hidden;
  border: 0;
  box-shadow: inset 0 0 0 1px var(--stroke);
  padding: 0;
  background: rgba(255, 255, 255, 0.06);
  scroll-snap-align: start;
  text-align: left;
  transition: transform 0.35s var(--spring);
}
.card:hover { transform: translateY(-3px); }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.card:hover img { transform: scale(1.05); }
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.75));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), inset 1px 1px 1px -0.5px rgba(255, 255, 255, 0.5);
}
.card-text { position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 1; }
.card-text b { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.card-text small { display: block; font-size: 12px; color: var(--text-2); margin-top: 2px; }
.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.card-badge .ic { width: 13px; height: 13px; }
.card.is-current { box-shadow: inset 0 0 0 2px var(--accent); }
.card.is-current .card-badge { background: var(--accent); color: var(--accent-ink); }

/* ---------- Loader ---------- */
.loader {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transform: translate(-50%, -50%) scale(0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, transform 0.3s var(--spring), visibility 0.2s;
  pointer-events: none;
}
.loader.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, -50%); }

/* ---------- Mascot hướng dẫn ---------- */
.guide {
  position: absolute;
  right: var(--gutter);
  bottom: calc(var(--gutter) + var(--safe-b));
  pointer-events: none;
  transition: opacity 0.25s, transform 0.3s var(--ease);
}
.guide > * { pointer-events: auto; }
body.detail-open .guide, body.explore-open .guide { opacity: 0; transform: translateY(10px); pointer-events: none; }
body.detail-open .guide > *, body.explore-open .guide > * { pointer-events: none; }

.guide-fab {
  position: relative;
  display: block;
  width: 72px;
  height: 84px;
  padding: 0;
  border: 0;
  background: none;
  transition: transform 0.35s var(--spring);
}
.guide-fab:hover { transform: scale(1.05); }
.guide-fab:active { transform: scale(0.94); }
.guide-fab img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
  /* Đổ bóng theo đúng hình mascot thay cho vòng tròn */
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
  transform-origin: 50% 100%;
  animation: wave 3s ease-in-out infinite;
}
.guide.is-open .guide-fab img { animation: none; }

.guide-bubble {
  position: absolute;
  right: 0;
  bottom: calc(100% + 22px);
  width: max-content;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  max-width: 290px;
  padding: 11px 6px 11px 14px;
  border-radius: 18px 18px 6px 18px;
  font-size: 13.5px;
  line-height: 1.5;
  transform-origin: bottom right;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(0.9);
  transition: opacity 0.2s, transform 0.4s var(--spring), visibility 0.2s;
}
.guide-bubble b { color: var(--accent); font-weight: 600; }
.guide-bubble .icon-btn { width: 26px; height: 26px; margin-top: -3px; flex: none; }
.guide-bubble .icon-btn .ic { width: 15px; height: 15px; }
.guide.has-bubble:not(.is-open) .guide-bubble { opacity: 1; visibility: visible; transform: none; }

.guide-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 22px);
  width: 360px;
  max-height: min(540px, calc(100dvh - 140px));
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  overflow: hidden;
  transform-origin: bottom right;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.92);
  transition: opacity 0.2s, transform 0.4s var(--spring), visibility 0.2s;
}
.guide.is-open .guide-panel { opacity: 1; visibility: visible; transform: none; }

.guide-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.guide-head b { display: block; font-size: 15px; }
.guide-head small { display: block; font-size: 12px; color: var(--text-3); }
.guide-head .icon-btn { margin-left: auto; }
.guide-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff3d6, var(--accent));
  overflow: hidden;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}
.guide-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 8%; display: block; }

.guide-msgs {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 12px 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
}
.msg {
  max-width: 88%;
  padding: 9px 13px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  animation: pop 0.35s var(--spring);
}
.msg--bot { align-self: flex-start; background: rgba(255, 255, 255, 0.12); border-bottom-left-radius: 6px; }
.msg--user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); font-weight: 500; border-bottom-right-radius: 6px; }
.msg b { font-weight: 600; }
.msg-links { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.msg-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  text-align: left;
  font-size: 13.5px;
}
.msg-link:hover { background: rgba(255, 255, 255, 0.18); }
.msg-link .ic { width: 16px; height: 16px; color: var(--accent); }
.msg--typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.msg--typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-2);
  animation: typing 1s infinite ease-in-out;
}
.msg--typing i:nth-child(2) { animation-delay: 0.15s; }
.msg--typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { opacity: 0.3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.96); } }

.guide-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px 14px;
}
.reply {
  height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px var(--stroke-strong);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s;
}
.reply:hover { background: rgba(255, 255, 255, 0.18); }
.reply--primary { background: #fff; color: #151a17; box-shadow: none; }
.reply--primary:hover { background: #fff; }

/* ---------- Hotspots ---------- */
.hs { width: 48px; height: 48px; cursor: pointer; }
.hs:focus-visible { outline: none; }
.pin {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  transition: transform 0.35s var(--spring);
}
.hs:hover .pin, .hs:focus-visible .pin { transform: scale(1.12); }
.pin .ic { width: 22px; height: 22px; stroke-width: 2.2; }

.pin--info {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.1));
  -webkit-backdrop-filter: blur(4px) saturate(1.8);
  backdrop-filter: blur(4px) saturate(1.8);
  box-shadow: var(--lg-rim), 0 6px 20px rgba(0, 0, 0, 0.3);
}
.pin--info .pin-core {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe39a, var(--accent) 60%, #d9a32a);
  color: var(--accent-ink);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.7);
}
.pin--info .ic { width: 19px; height: 19px; }
.pin--info::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: ring 2s ease-out infinite;
  pointer-events: none;
}
@keyframes ring {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(1.9); opacity: 0; }
}

.pin--nav { color: #fff; }
.pin--nav .ic { animation: nudge 1.6s ease-in-out infinite; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3)); }
@keyframes nudge {
  0%, 100% { translate: 0 1px; }
  50% { translate: 0 -3px; }
}
.hs:hover .pin--nav { background: #fff; color: #151a17; }

.pin--label {
  width: 18px;
  height: 18px;
  margin: 15px;
  background: #fff;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.3), 0 4px 12px rgba(0, 0, 0, 0.3);
}
.hs--label { cursor: default; }

.pin-label {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  max-width: 220px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* ---------- Detail panel ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  display: none;
}

.detail {
  position: fixed;
  z-index: 21;
  top: var(--gutter);
  right: var(--gutter);
  bottom: calc(var(--gutter) + var(--dock-h) + 14px + var(--safe-b));
  width: 410px;
  display: flex;
  flex-direction: column;
  border-radius: 28px;
  padding: 10px;
  transform: translateX(calc(100% + 40px));
  transition: transform 0.5s var(--ease);
  overflow: hidden;
}
body.detail-open .detail { transform: none; }

.hero {
  position: relative;
  flex: none;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: rgba(255, 255, 255, 0.06);
}
.hero-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.hero-track::-webkit-scrollbar { display: none; }
.hero-track img {
  flex: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: center;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), transparent 30%, transparent 70%, rgba(0, 0, 0, 0.3));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.hero .icon-btn { position: absolute; z-index: 2; width: 38px; height: 38px; }
.hero .icon-btn .ic { width: 18px; height: 18px; }
.hero-close { top: 10px; right: 10px; }
.hero-zoom { bottom: 10px; right: 10px; }
.hero-prev { left: 10px; top: 50%; translate: 0 -50%; }
.hero-next { right: 10px; top: 50%; translate: 0 -50%; }
.hero-nav { opacity: 0; transition: opacity 0.2s; }
.hero:hover .hero-nav { opacity: 1; }
.hero-nav:disabled { visibility: hidden; }
.hero-count {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.dots { display: flex; justify-content: center; gap: 6px; padding: 10px 0 2px; }
.dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  transition: width 0.3s var(--spring), background 0.2s;
}
.dots span.is-active { width: 18px; background: #fff; }

.detail-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 8px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}
.detail-body h2 { font-size: 22px; font-weight: 700; line-height: 1.3; }
.detail-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--text-2); }
.detail-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.detail-meta .ic { width: 16px; height: 16px; color: var(--accent); }
.detail-body hr { border: 0; border-top: 1px solid rgba(255, 255, 255, 0.1); margin: 14px 0; }
.detail-body h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 16px 0 8px;
}
.detail-body hr + h4 { margin-top: 0; }
.detail-body p { font-size: 14.5px; line-height: 1.65; color: var(--text-2); }

.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.thumbs button {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.06);
  opacity: 0.7;
  transition: opacity 0.2s, border-color 0.2s;
}
.thumbs button:hover { opacity: 1; }
.thumbs button.is-active { opacity: 1; border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

.detail-foot { flex: none; padding: 4px 4px 2px; }
.cta {
  width: 100%;
  height: 50px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.1));
  box-shadow: var(--lg-rim);
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s, transform 0.3s var(--spring);
}
.cta:hover { background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.16)); }
.cta:active { transform: scale(0.98); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(6, 8, 7, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: calc(100vw - 140px);
  max-height: calc(100dvh - 100px);
  border-radius: 14px;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox .icon-btn { position: absolute; }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; translate: 0 -50%; }
.lightbox-next { right: 20px; top: 50%; translate: 0 -50%; }
.lightbox-count {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  color: var(--text-2);
}

/* ==========================================================
   Mobile
   ========================================================== */
@media (max-width: 767px) {
  :root { --gutter: 12px; --dock-h: 64px; }

  .desktop-only { display: none !important; }

  .topbar {
    top: calc(var(--gutter) + env(safe-area-inset-top, 0px));
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .search { grid-row: 1; }
  .place { grid-row: 2; height: 38px; font-size: 13px; padding: 0 12px 0 10px; }

  .search-field { height: 48px; }
  .search-results { position: fixed; top: calc(72px + env(safe-area-inset-top, 0px)); left: var(--gutter); right: var(--gutter); max-height: 60dvh; }

  .dock {
    left: var(--gutter);
    right: var(--gutter);
    transform: none;
    justify-content: space-around;
    padding: 8px 10px;
  }
  .dock-btn { width: 48px; height: 48px; padding: 0; }
  .dock-btn.is-active { padding: 0; }
  .dock-btn.is-active span { display: none; }
  .dock-btn .ic { width: 22px; height: 22px; }

  .explore {
    left: var(--gutter);
    width: auto;
    right: var(--gutter);
    transform: translateY(16px) scale(0.98);
    padding: 12px 10px 12px;
    border-radius: 26px;
  }
  body.explore-open .explore { transform: none; }
  .explore-head { flex-wrap: wrap; gap: 10px; padding: 0 2px 10px 6px; }
  .explore-head h3 { font-size: 15px; }
  .explore-head .chips { order: 3; width: 100%; }
  .card { width: 64vw; max-width: 240px; }

  .guide { bottom: calc(var(--gutter) + var(--dock-h) + 12px + var(--safe-b)); }
  .guide-fab { width: 60px; height: 70px; }
  .guide-bubble { max-width: calc(100vw - 2 * var(--gutter)); }
  .guide-panel { width: calc(100vw - 2 * var(--gutter)); max-height: calc(100dvh - 280px); }

  /* Bottom sheet */
  .backdrop { display: block; }
  body.detail-open .backdrop { opacity: 1; visibility: visible; }
  .detail {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-height: 88dvh;
    border-radius: 28px 28px 0 0;
    padding: 6px 12px calc(12px + var(--safe-b));
    transform: translateY(100%);
  }
  .sheet-handle {
    display: block !important;
    width: 40px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    margin: 2px auto 10px;
    flex: none;
  }
  .hero { aspect-ratio: 16 / 10; }
  .hero-nav { display: none; }
  .detail-body { padding: 8px 4px 10px; }
  .detail-body h2 { font-size: 20px; }
  .thumbs { grid-template-columns: repeat(5, 1fr); gap: 6px; }

  .lightbox img { max-width: 100vw; max-height: 80dvh; border-radius: 0; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: calc(24px + var(--safe-b)); translate: none; }
  .lightbox-prev { left: calc(50% - 60px); }
  .lightbox-next { right: calc(50% - 60px); }

  .pin-label { font-size: 11.5px; max-width: 160px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
/* Người dùng bật "giảm trong suốt" -> kính đặc hơn */
@media (prefers-reduced-transparency: reduce) {
  .glass, .glass--panel { background: rgba(24, 28, 26, 0.92); }
}
