:root {
  /* Youthful, Cute & Sunlit Coastal Exploration Palette */
  --bg-paper: #fffbf2;
  --bg-card: #ffffff;
  --bg-soft: #f6efe6;

  /* Fresh Coastal Mint-Lagoon (Discovery / Map) */
  --teal: #13b5a2;
  --teal-dark: #0e9484;
  --teal-soft: #e3faf6;
  --teal-border: #a3e8de;

  /* Juicy Peach-Coral (Love / Suggest / Primary CTA) */
  --coral: #ff6b57;
  --coral-dark: #eb5440;
  --coral-soft: #fff0ed;
  --coral-border: #ffc7be;

  /* Sunny Mango & Sky Spark */
  --sun: #ffb703;
  --sun-soft: #fff6d6;
  --sky: #4d96ff;
  --sky-soft: #edf4ff;

  --green-ok: #0fa37f;
  --green-soft: #e3faf3;

  --rose-no: #ff5c77;
  --rose-soft: #fff0f3;

  /* Warm Indigo-Charcoal Ink (crisp outdoor readability >= WCAG AA) */
  --ink: #232136;
  --ink-secondary: #4a4761;
  --ink-muted: #5c5973;
  --line: #efe6db;
  --line-strong: #dfd3c5;

  --shadow-xs: 0 2px 8px rgba(35, 33, 54, 0.05);
  --shadow-sm: 0 6px 18px rgba(35, 33, 54, 0.08);
  --shadow-card: 0 20px 44px rgba(35, 33, 54, 0.11), 0 3px 10px rgba(255, 107, 87, 0.06);
  --shadow-lg: 0 24px 56px rgba(35, 33, 54, 0.16);

  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --font-display: 'Plus Jakarta Sans', 'Be Vietnam Pro', -apple-system, sans-serif;
  --font-sans: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;

  --topbar-h: 66px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255, 107, 87, 0.12);
}

a {
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2.5px solid var(--teal);
  outline-offset: 2px;
}

.is-hidden {
  display: none !important;
}

/* ==================== APP SHELL ==================== */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  padding-top: env(safe-area-inset-top);
}

/* ==================== TOPBAR ==================== */
.topbar {
  height: var(--topbar-h);
  flex-shrink: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--line);
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  z-index: 900;
}

.brand-button {
  display: flex;
  align-items: center;
  gap: 11px;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--bg-paper);
  border: 1px solid var(--line);
  box-shadow: 0 3px 10px rgba(255, 107, 87, 0.14);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
}

.brand-sub {
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.brand-sub strong {
  color: var(--teal);
  font-weight: 600;
}

/* View Switcher (2 clean tabs) */
.view-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-paper);
  border: 1px solid var(--line);
  padding: 4px;
  border-radius: var(--radius-pill);
}

.view-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: none;
  background: transparent;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  transition: all 0.16s ease;
  white-space: nowrap;
}

.view-tab svg {
  width: 16px;
  height: 16px;
}

.view-tab:hover {
  color: var(--ink);
}

.view-tab.is-active {
  background: var(--bg-card);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.tab-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: var(--teal-soft);
  color: var(--teal);
}

.tab-badge--coral {
  background: var(--coral-soft);
  color: var(--coral-dark);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.saved-heart {
  color: var(--coral);
  font-size: 13px;
}

.pill-count {
  background: var(--coral-soft);
  color: var(--coral-dark);
  font-size: 11.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 13.5px;
  padding: 9px 16px;
  border: 1px solid transparent;
  transition: all 0.16s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
}

.btn-xs {
  padding: 6px 12px;
  font-size: 12.5px;
}

.btn-primary {
  background: var(--coral);
  color: #fff;
}

.btn-primary:hover {
  background: var(--coral-dark);
}

.btn-teal {
  background: var(--teal);
  color: #fff;
}

.btn-teal:hover {
  background: var(--teal-dark);
}

.btn-outline {
  background: var(--bg-card);
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-outline:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-secondary);
}

.btn-ghost:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

/* ==================== MAIN STAGE ==================== */
.stage {
  flex: 1;
  display: flex;
  min-height: 0;
  position: relative;
}

/* 4-View Stage Switching (Trang chủ · Thử thách · Chọn giùm · Ráp kèo) */
.stage[data-view='home'] .quest-pane,
.stage[data-view='home'] .pick-pane,
.stage[data-view='home'] .keo-stage,
.stage[data-view='quest'] .home-pane,
.stage[data-view='quest'] .pick-pane,
.stage[data-view='quest'] .keo-stage,
.stage[data-view='pick'] .home-pane,
.stage[data-view='pick'] .quest-pane,
.stage[data-view='pick'] .keo-stage,
.stage[data-view='keo'] .home-pane,
.stage[data-view='keo'] .quest-pane,
.stage[data-view='keo'] .pick-pane {
  display: none;
}

.stage[data-view='home'] .home-pane,
.stage[data-view='quest'] .quest-pane,
.stage[data-view='pick'] .pick-pane,
.stage[data-view='keo'] .keo-stage {
  display: flex;
}

/* ==================== CALM HOME HUB (FULL-WIDTH CENTERED) ==================== */
.home-pane,
.quest-pane,
.pick-pane {
  width: 100%;
  flex: 1;
  background: var(--bg-paper);
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.home-top-sticky {
  flex-shrink: 0;
  padding: 12px 20px 11px;
  background: rgba(255, 251, 242, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 20;
}

.home-top-inner {
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.home-loc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.home-loc-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.home-loc-dropdown {
  position: relative;
  min-width: 0;
  flex: 0 1 auto;
}

.home-loc-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 10px 4px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.home-loc-trigger.is-gps {
  border-color: rgba(37, 99, 235, 0.34);
  background: #f2f7ff;
  color: #1d4ed8;
}

.home-loc-trigger.is-gps .home-loc-ico {
  color: #2563eb;
}

.home-loc-trigger > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-loc-trigger:hover,
.home-loc-trigger.is-open {
  border-color: var(--teal);
  background: #fff;
}

.home-loc-ico {
  width: 15px;
  height: 15px;
  color: var(--teal);
  flex-shrink: 0;
}

.home-gps-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--teal-dark);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, transform 0.14s ease;
}

.home-gps-btn:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.home-gps-btn.is-active {
  border-color: rgba(37, 99, 235, 0.38);
  background: #e8f1ff;
  color: #2563eb;
}

.home-gps-btn.is-locating {
  border-color: #2563eb;
  background: #e8f1ff;
  color: #2563eb;
  animation: gpsPulseRing 1.15s ease-in-out infinite;
}

@keyframes gpsPulseRing {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.34);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0);
  }
}

.home-chev {
  width: 12px;
  height: 12px;
  color: var(--ink-muted);
  flex-shrink: 0;
  transition: transform 0.16s ease;
}

.home-loc-trigger.is-open .home-chev {
  transform: rotate(180deg);
}

.home-total-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal-dark);
  background: var(--teal-soft);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Live Da Nang Weather Card (Actionable & Calm) */
.home-weather-card {
  border-radius: 16px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.home-weather-card--rain {
  background: linear-gradient(135deg, #eef6ff 0%, #f5f9ff 100%);
  border-color: #c7dfff;
}

.home-weather-card--hot {
  background: linear-gradient(135deg, #fff7e4 0%, #fff2dc 100%);
  border-color: #f6d892;
}

.home-weather-card--clear {
  background: linear-gradient(135deg, #e9fbf6 0%, #f4fdf9 100%);
  border-color: #b4ece0;
}

.home-weather-card--evening {
  background: linear-gradient(135deg, #f3f0ff 0%, #f9f6ff 100%);
  border-color: #d8cdfa;
}

.hw-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hw-ico-wrap {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(35, 33, 54, 0.06);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--teal-dark);
}

.home-weather-card--rain .hw-ico-wrap { color: #2468cc; }
.home-weather-card--hot .hw-ico-wrap { color: #c77700; }
.home-weather-card--evening .hw-ico-wrap { color: #6339c9; }

.hw-body {
  flex: 1;
  min-width: 0;
}

.hw-top-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.hw-temp {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.hw-cond {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.hw-meta {
  font-size: 11.5px;
  color: var(--ink-secondary);
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
}

.hw-cta-btn {
  border: 1px solid var(--coral);
  background: var(--coral);
  color: #fff;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255, 107, 87, 0.24);
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, transform 0.14s ease;
}

.hw-cta-btn:hover {
  border-color: var(--coral-dark);
  background: var(--coral-dark);
  color: #fff;
  transform: translateY(-1px);
}

.hw-tip {
  margin: 0;
  font-size: 12.2px;
  line-height: 1.42;
  color: var(--ink-secondary);
}

.home-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.home-search-ico {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--ink-muted);
  pointer-events: none;
}

.home-search-input {
  width: 100%;
  height: 44px;
  padding: 0 38px 0 40px;
  border-radius: 14px;
  border: 1.5px solid var(--line-strong);
  background: var(--bg-card);
  color: var(--ink);
  font-size: 14px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.home-search-input::placeholder {
  color: #76738c;
}

.home-search-input::-webkit-search-cancel-button,
.home-search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.home-search-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(19, 181, 162, 0.14);
}

.home-search-clear {
  position: absolute;
  right: 8px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--ink-secondary);
  display: grid;
  place-items: center;
  padding: 0;
}

.home-search-clear:hover {
  background: var(--coral-soft);
  color: var(--coral-dark);
}

.home-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 18px 28px;
}

.home-overview,
.home-browse {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.home-hero-head {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.home-greeting {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.24;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

.home-lead {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-secondary);
}

.home-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.home-sec-head h2 {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
}

.home-see-all {
  border: none;
  background: none;
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--teal-dark);
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
}

.home-see-all:hover {
  background: var(--teal-soft);
}

/* 6 Clean Category Entry Cards */
.home-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.home-cat-card {
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 13px 13px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 108px;
  box-shadow: 0 2px 8px rgba(35, 33, 54, 0.035);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.home-cat-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 8px 20px rgba(35, 33, 54, 0.07);
}

.home-cat-card:active {
  background: var(--bg-paper);
}

.home-cat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.home-cat-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.home-cat-icon svg {
  width: 20px;
  height: 20px;
}

.home-cat-card--coral .home-cat-icon { background: #fff0ec; color: #e0523d; }
.home-cat-card--amber .home-cat-icon { background: #fff6df; color: #b67200; }
.home-cat-card--sky .home-cat-icon { background: #edf4ff; color: #2e6de0; }
.home-cat-card--rose .home-cat-icon { background: #fff0f5; color: #d63b6b; }
.home-cat-card--plum .home-cat-icon { background: #f3eeff; color: #6741d9; }
.home-cat-card--mint .home-cat-icon { background: #e4faf6; color: #0e9484; }

.home-cat-count {
  font-size: 11.5px;
  font-weight: 700;
  color: #6b6880;
  background: var(--bg-paper);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-variant-numeric: tabular-nums;
}

.home-cat-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
}

.home-cat-sub {
  font-size: 12px;
  color: #68657d;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Quick Context Strip (clean wrap — zero right-edge clipping!) */
.home-quick-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.home-refine-row {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.home-refine-row::-webkit-scrollbar {
  display: none;
}

.home-quick-chip,
.refine-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.home-quick-chip:hover,
.refine-chip:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.refine-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* Playful Swipe Discovery Banner (for when users are free & want to browse randomly!) */
.home-swipe-banner {
  background: linear-gradient(135deg, #fff2ee 0%, #fff8e6 100%);
  border: 1px solid #ffd5c8;
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hsb-title {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 3px;
}

.hsb-desc {
  margin: 0;
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.45;
}

.hsb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Clean Scannable Spot List Cards */
.home-spot-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spot-list-card {
  position: relative;
  display: flex;
  align-items: stretch;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: 104px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.spot-list-card:hover,
.spot-list-card.is-selected {
  border-color: var(--teal-border);
  box-shadow: 0 6px 18px rgba(19, 181, 162, 0.1);
}

.slc-main-btn {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 11px 6px 11px 11px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
}

.slc-thumb {
  width: 68px;
  height: 68px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(35, 33, 54, 0.06);
}

.slc-thumb-art {
  width: 100%;
  height: 100%;
  display: block;
}

.slc-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slc-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.28;
  color: var(--ink);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.slc-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 12px;
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
}

.slc-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
  color: #9e6000;
}

.slc-rating svg {
  color: #f59e0b;
}

.slc-rating--mint {
  color: var(--teal-dark);
}

.slc-rev {
  font-weight: 500;
  color: #6b6880;
}

.slc-sep {
  color: var(--line-strong);
}

.slc-dist {
  font-weight: 700;
  color: #1f64cc;
}

.slc-tags-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.slc-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-paper);
  border: 1px solid var(--line);
  color: var(--ink-secondary);
}

.slc-tag--threads {
  background: #f3ecff;
  border-color: #d6c2ff;
  color: #5b2fc9;
}

.slc-budget {
  font-size: 11.5px;
  color: #6b6880;
}

.slc-tip {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--ink-secondary);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slc-save-btn {
  width: 44px;
  min-height: 44px;
  align-self: flex-start;
  margin: 6px 6px 0 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #8b889e;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.slc-save-btn:hover {
  background: var(--coral-soft);
  color: var(--coral);
}

.slc-save-btn.is-saved {
  color: var(--coral);
}

/* Sub-state B: Category Browse Bar */
.home-browse-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.home-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 12px 0 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.home-back-btn:hover {
  border-color: var(--ink-muted);
  background: #fff;
}

.home-to-swipe-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--coral-border);
  background: var(--coral-soft);
  color: var(--coral-dark);
  font-size: 12.5px;
  font-weight: 700;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.home-to-swipe-btn:hover {
  background: var(--coral);
  color: #fff;
}

.home-browse-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.home-browse-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

.home-browse-count {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--teal-dark);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.home-load-more {
  width: 100%;
  min-height: 44px;
}

.home-empty-box {
  background: var(--bg-card);
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  padding: 28px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.home-empty-box h3 {
  font-family: var(--font-display);
  font-size: 16.5px;
  margin: 0;
}

.home-empty-box p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-secondary);
  max-width: 300px;
}

.home-empty-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

/* Swipe Category Scope Banner */
.swipe-scope-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 12px;
  background: var(--teal-soft);
  border: 1px solid var(--teal-border);
  font-size: 12px;
  font-weight: 700;
  color: var(--teal-dark);
  flex-shrink: 0;
}

.swipe-scope-clear {
  border: none;
  background: #fff;
  color: var(--teal-dark);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
}

/* Detail Sheet Quick Actions */
.sheet-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.sheet-spot-story {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-secondary);
}

/* ==================== LEFT/CENTER: TINDER DECK PANE ==================== */
.deck-pane {
  width: 520px;
  max-width: 100%;
  flex-shrink: 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 224, 178, 0.55) 0%, transparent 42%),
    radial-gradient(circle at 90% 84%, rgba(185, 243, 232, 0.55) 0%, transparent 46%),
    radial-gradient(circle at 88% 16%, rgba(255, 212, 206, 0.42) 0%, transparent 38%),
    var(--bg-paper);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 10px 16px 12px;
  gap: 8px;
  z-index: 400;
}

.deck-top {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex-shrink: 0;
}

.deck-source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.source-pills {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 3px;
}

.source-pill {
  border: none;
  background: transparent;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.source-pill.is-active {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 3px 10px rgba(19, 181, 162, 0.28);
}

.source-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dot--live {
  background: #20d3b5;
}

.source-pill.is-active .dot--live {
  background: #fff6d6;
}

.dot--pending {
  background: var(--sun);
}

.source-num {
  opacity: 0.78;
  font-weight: 600;
}

.deck-meta-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sort-near-btn {
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--ink-secondary);
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.sort-near-btn:hover {
  border-color: var(--sky);
  color: var(--sky);
  background: var(--sky-soft);
}

.sort-near-btn.is-active {
  background: var(--sky);
  border-color: var(--sky);
  color: #fff;
  box-shadow: 0 3px 10px rgba(77, 150, 255, 0.28);
}

.deck-progress {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* User Location Bar */
.location-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.loc-dropdown {
  position: relative;
  min-width: 0;
}

.loc-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5.5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid #cce0ff;
  background: rgba(255, 255, 255, 0.9);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  max-width: 100%;
  transition: all 0.15s ease;
}

.loc-trigger:hover,
.loc-trigger.is-open {
  border-color: var(--sky);
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.loc-trigger svg {
  width: 12px;
  height: 12px;
  color: var(--ink-muted);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.loc-trigger.is-open svg {
  transform: rotate(180deg);
}

.loc-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--sky);
  box-shadow: 0 0 0 3px rgba(77, 150, 255, 0.24);
  flex-shrink: 0;
}

.loc-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 268px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 6px;
  box-shadow: var(--shadow-lg);
  z-index: 950;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.loc-option {
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  display: flex;
  align-items: center;
  gap: 7px;
  transition: background 0.12s ease, color 0.12s ease;
}

.loc-option:hover {
  background: var(--bg-paper);
  color: var(--ink);
}

.loc-option.is-active {
  background: var(--sky-soft);
  color: #2168d4;
  font-weight: 700;
}

.loc-option--gps {
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-weight: 700;
}

.loc-option--gps:hover {
  background: #cef5ee;
  color: var(--teal-dark);
}

.loc-option--pick {
  border-top: 1px solid var(--line);
  margin-top: 3px;
  padding-top: 9px;
  color: var(--coral-dark);
  font-weight: 600;
}

.loc-divider {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-muted);
  padding: 6px 10px 3px;
}

.loc-distance-now {
  font-size: 12px;
  font-weight: 700;
  color: #2168d4;
  background: var(--sky-soft);
  border: 1px solid #cce0ff;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.loc-distance-now:empty {
  display: none;
}

/* Inline Quick Search inside Deck Top / Mobile Filter Sheet */
.deck-search-wrap {
  position: relative;
  flex: 1;
  min-width: 145px;
  display: flex;
  align-items: center;
}

.deck-search-ico {
  position: absolute;
  left: 10px;
  font-size: 12px;
  pointer-events: none;
  opacity: 0.72;
}

.deck-search-input {
  width: 100%;
  height: 31px;
  padding: 0 26px 0 28px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 12.2px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.deck-search-input::placeholder {
  color: var(--ink-muted);
}

.deck-search-input::-webkit-search-cancel-button,
.deck-search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.deck-search-input:focus {
  outline: none;
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(19, 181, 162, 0.14);
}

.deck-search-clear {
  position: absolute;
  right: 6px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--ink-secondary);
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0;
}

.deck-search-clear:hover {
  background: var(--coral-soft);
  color: var(--coral-dark);
}

/* Context Filter Bar (Giờ này · Ngày mưa · Đi với ai · Chọn giùm) */
.context-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.ctx-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4.5px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink-secondary);
  font-size: 11.8px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.ctx-pill svg {
  width: 11px;
  height: 11px;
  color: var(--ink-muted);
  transition: transform 0.15s ease;
}

.ctx-pill:hover {
  border-color: var(--teal-border);
  color: var(--teal-dark);
  background: #fff;
}

.ctx-pill.is-active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  box-shadow: 0 3px 10px rgba(19, 181, 162, 0.25);
}

.ctx-pill.is-active svg {
  color: #fff;
}

.ctx-pill.is-open svg {
  transform: rotate(180deg);
}

.ctx-pill--random {
  margin-left: auto;
  background: var(--sun-soft);
  border-color: #f6d374;
  color: #8c5a00;
  font-weight: 700;
}

.ctx-pill--random:hover {
  background: #ffecb3;
  border-color: var(--sun);
  color: #704700;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 183, 3, 0.28);
}

.ctx-pill--random.is-rolling .dice-ico {
  display: inline-block;
  animation: diceSpin 0.35s ease;
}

@keyframes diceSpin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(22deg) scale(1.25); }
  100% { transform: rotate(0deg) scale(1); }
}

.ctx-dropdown {
  position: relative;
}

.ctx-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 184px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 5px;
  box-shadow: var(--shadow-lg);
  z-index: 960;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ctx-option {
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.12s ease, color 0.12s ease;
}

.ctx-option:hover {
  background: var(--bg-paper);
  color: var(--ink);
}

.ctx-option.is-active {
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-weight: 700;
}

.fact-chip--now {
  background: var(--green-soft);
  border-color: #aeead4;
  color: var(--green-ok);
  font-weight: 700;
}

.fact-chip--rain {
  background: #eef4ff;
  border-color: #c8dcff;
  color: #2d62b8;
  font-weight: 600;
}

/* Clean wrap vibe strip — all 7 vibes visible, no hidden right-edge clipping */
.vibe-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.vibe-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5.5px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--ink-secondary);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.vibe-chip:hover {
  border-color: var(--coral-border);
  color: var(--coral-dark);
  background: var(--coral-soft);
  transform: translateY(-1px);
}

.vibe-chip.is-active {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(255, 107, 87, 0.28);
}

/* ==================== CARD STACK ARENA ==================== */
.deck-arena {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  padding: 6px 0 4px;
}

.card-stack {
  position: relative;
  flex: 1;
  width: 100%;
  max-width: 422px;
  height: min(540px, 100%);
  min-height: 410px;
}

/* TikTok-style Vertical Browse Rail right beside the Card Stack */
.vertical-nav-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  z-index: 40;
}

.vnav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-secondary);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-xs);
  transition: all 0.16s ease;
}

.vnav-btn svg {
  width: 18px;
  height: 18px;
}

.vnav-btn:hover:not(:disabled) {
  border-color: var(--teal);
  color: var(--teal);
  background: #fff;
  transform: scale(1.08);
  box-shadow: var(--shadow-sm);
}

.vnav-btn:active:not(:disabled) {
  transform: scale(0.94);
}

.vnav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.vnav-hint {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink-muted);
  user-select: none;
}

.gesture-guide {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  text-align: center;
  padding: 2px 6px;
}

.swipe-card.is-picked {
  animation: pickedPop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pickedPop {
  0% { transform: scale(0.93) rotate(-2deg); opacity: 0.7; }
  65% { transform: scale(1.02) rotate(0.8deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Individual Swipeable Card */
.swipe-card {
  position: absolute;
  inset: 0;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  transform-origin: 50% 85%;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.swipe-card.is-dragging {
  transition: none;
  cursor: grabbing;
}

.swipe-card[data-depth='0'] {
  z-index: 30;
  cursor: grab;
  transform: translateY(0) scale(1);
}

.swipe-card[data-depth='1'] {
  z-index: 20;
  pointer-events: none;
  transform: translateY(10px) scale(0.96);
  opacity: 0.92;
  filter: saturate(0.92);
}

.swipe-card[data-depth='2'] {
  z-index: 10;
  pointer-events: none;
  transform: translateY(19px) scale(0.92);
  opacity: 0.65;
}

.swipe-card[data-depth='1'] .card-content,
.swipe-card[data-depth='2'] .card-content {
  opacity: 0;
}

.swipe-card.fly-right {
  transform: translate(135%, 24px) rotate(18deg) !important;
  opacity: 0 !important;
  transition: transform 0.32s ease-out, opacity 0.28s ease !important;
}

.swipe-card.fly-left {
  transform: translate(-135%, 24px) rotate(-18deg) !important;
  opacity: 0 !important;
  transition: transform 0.32s ease-out, opacity 0.28s ease !important;
}

.swipe-card.fly-skip {
  transform: translateY(-28px) scale(0.94) !important;
  opacity: 0 !important;
  transition: transform 0.22s ease, opacity 0.22s ease !important;
}

.swipe-card.fly-up {
  transform: translateY(-95%) scale(0.95) !important;
  opacity: 0 !important;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease !important;
}

.swipe-card.fly-down {
  transform: translateY(95%) scale(0.95) !important;
  opacity: 0 !important;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease !important;
}

.swipe-card.enter-from-bottom {
  animation: enterFromBottom 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.swipe-card.enter-from-top {
  animation: enterFromTop 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes enterFromBottom {
  from { transform: translateY(24px) scale(0.97); opacity: 0.7; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes enterFromTop {
  from { transform: translateY(-24px) scale(0.97); opacity: 0.7; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.swipe-stamp--next,
.swipe-stamp--prev {
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  padding: 6px 15px;
  border-width: 2px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.swipe-stamp--next {
  top: auto;
  bottom: 24px;
  color: var(--teal-dark);
  border-color: var(--teal);
  background: rgba(227, 250, 246, 0.96);
}

.swipe-stamp--prev {
  top: 22px;
  color: #2168d4;
  border-color: var(--sky);
  background: rgba(237, 244, 255, 0.96);
}

/* Tinder-Style Drag Stamps */
.swipe-stamp {
  position: absolute;
  top: 22px;
  z-index: 40;
  padding: 6px 14px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
  border: 3px solid;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.swipe-stamp--yes {
  left: 20px;
  color: var(--green-ok);
  border-color: var(--green-ok);
  background: rgba(231, 246, 239, 0.92);
  transform: rotate(-10deg);
}

.swipe-stamp--no {
  right: 20px;
  color: var(--rose-no);
  border-color: var(--rose-no);
  background: rgba(253, 238, 238, 0.92);
  transform: rotate(10deg);
}

/* Card Visual Hero */
.card-hero {
  position: relative;
  height: 142px;
  flex-shrink: 0;
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.card-hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.card-hero-top,
.card-hero-bottom {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-pill--score {
  background: rgba(231, 246, 239, 0.96);
  color: var(--green-ok);
  font-weight: 700;
}

.hero-pill--warn {
  background: rgba(254, 241, 234, 0.96);
  color: var(--coral-dark);
  font-weight: 700;
}

.hero-pill--hidden {
  background: rgba(242, 236, 227, 0.96);
  color: var(--ink-secondary);
}

.hero-pill--fresh {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-secondary);
  font-weight: 600;
}

.score-summary--fresh {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.score-summary--fresh strong {
  font-size: 14px;
  color: var(--ink);
}

.comments-empty-hint {
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  background: var(--bg-paper);
  border: 1px dashed var(--line-strong);
  font-size: 13px;
  color: var(--ink-secondary);
  text-align: center;
}

.card-hero-left {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.card-hero-bottom .hero-pill {
  max-width: none;
}

.fact-chip--local {
  background: var(--sun-soft);
  border-color: #f3d782;
  color: #8a5600;
  font-weight: 700;
}

.fact-chip--tourist {
  background: var(--coral-soft);
  border-color: var(--coral-border);
  color: #b84230;
  font-weight: 600;
}

.card-hero-right {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.gmaps-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(35, 33, 54, 0.74);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  backdrop-filter: blur(6px);
  transition: background 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.gmaps-mini-btn:hover {
  background: rgba(35, 33, 54, 0.92);
  transform: translateY(-1px);
}

.share-mini-btn {
  background: rgba(255, 107, 87, 0.92);
}

.share-mini-btn:hover {
  background: var(--coral-dark);
}

/* Card Main Content */
.card-content {
  flex: 1;
  min-height: 0;
  padding: 13px 18px 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  scrollbar-width: none;
}

.card-content::-webkit-scrollbar {
  display: none;
}

.card-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.24;
  margin: 0;
  color: var(--ink);
}

.card-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fact-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  padding: 3.5px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-paper);
  border: 1px solid var(--line);
  color: var(--ink-secondary);
}

.fact-chip--distance {
  background: var(--sky-soft);
  border-color: #c5ddff;
  color: #1f64cc;
  font-weight: 700;
}

.fact-chip--gmaps {
  background: #fff8df;
  border-color: #f4d67c;
  color: #8a5600;
  font-weight: 700;
}

.fact-chip--threads {
  background: #f3ecff;
  border-color: #d6c2ff;
  color: #5b2fc9;
  font-weight: 700;
}

.sheet-gmaps-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 13px;
  background: #fffaf0;
  border: 1px solid #f4dea2;
}

.sheet-gmaps-bar strong {
  display: block;
  font-size: 13px;
  color: #6b4809;
}

.sheet-gmaps-bar span {
  display: block;
  font-size: 11.5px;
  color: var(--ink-secondary);
  margin-top: 1px;
}

.card-story {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.52;
  color: var(--ink-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Honest Warning Callout (builds radical trust!) */
.honest-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 12px;
  background: #fff8e6;
  border: 1px solid #f4dea2;
  font-size: 12px;
  line-height: 1.4;
  color: #6b4809;
}

.honest-note strong {
  color: #523502;
}

.honest-note-ico {
  flex-shrink: 0;
  font-size: 13px;
  line-height: 1.35;
}

/* Pending Progress inside Card */
.card-pending-bar {
  background: var(--coral-soft);
  border: 1px solid var(--coral-border);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 12.5px;
  color: #6f391f;
}

.card-pending-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-weight: 600;
}

.progress-track {
  height: 6px;
  background: rgba(224, 118, 66, 0.2);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--coral);
  border-radius: 99px;
}

/* Quick Tag Summary + Latest Comment Preview */
.card-social-preview {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--bg-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.top-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.qtag-chip {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2.5px 9px;
  border-radius: var(--radius-pill);
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.qtag-chip--warn {
  background: var(--bg-soft);
  color: var(--ink-secondary);
}

.mini-comment-btn {
  width: 100%;
  text-align: left;
  background: var(--bg-paper);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.mini-comment-btn:hover {
  border-color: var(--teal-border);
  background: var(--teal-soft);
}

.mini-comment-copy {
  min-width: 0;
  flex: 1;
}

.mini-comment-author {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1px;
}

.mini-comment-text {
  font-size: 12.5px;
  color: var(--ink-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-comment-cta {
  font-size: 12px;
  font-weight: 700;
  color: var(--teal);
  white-space: nowrap;
}

/* Empty Deck State */
.deck-empty {
  position: absolute;
  inset: 0;
  background: var(--bg-card);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
  gap: 12px;
}

.deck-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--teal-soft);
  color: var(--teal);
  display: grid;
  place-items: center;
  font-size: 26px;
}

.deck-empty h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  margin: 0;
}

.deck-empty p {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 13.5px;
  max-width: 310px;
}

.deck-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

/* ==================== TINDER ACTION DOCK ==================== */
.action-dock {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 2px;
}

.action-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.act-btn {
  border: 1px solid var(--line);
  background: var(--bg-card);
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.act-btn:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.03);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease, background 0.15s ease;
}

.act-btn:active:not(:disabled) {
  transform: scale(0.94);
}

.act-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.act-btn--undo {
  width: 46px;
  height: 46px;
  color: var(--ink-secondary);
}

.act-btn--undo svg {
  width: 20px;
  height: 20px;
}

.act-btn--comment {
  position: relative;
  width: 50px;
  height: 50px;
  color: var(--sky);
  border-color: #c8dfff;
  background: var(--sky-soft);
}

.act-btn--comment svg {
  width: 22px;
  height: 22px;
}

.comment-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--sky);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
}

.act-btn--no {
  height: 54px;
  padding: 0 20px;
  color: var(--rose-no);
  border-color: #ffd0d9;
  background: var(--bg-card);
  font-weight: 700;
  font-size: 13.5px;
}

.act-btn--no svg {
  width: 20px;
  height: 20px;
}

.act-btn--no:hover:not(:disabled) {
  background: var(--rose-soft);
  border-color: var(--rose-no);
}

.act-btn--yes {
  height: 54px;
  padding: 0 26px;
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #ff7e5f 0%, #ff5864 100%);
  box-shadow: 0 10px 24px rgba(255, 98, 96, 0.34);
  font-weight: 700;
  font-size: 14.5px;
}

.act-btn--yes svg {
  width: 20px;
  height: 20px;
}

.act-btn--yes:hover:not(:disabled) {
  background: linear-gradient(135deg, #ff6b4a 0%, #f54257 100%);
  box-shadow: 0 14px 28px rgba(255, 90, 96, 0.44);
}

.action-subrow {
  display: flex;
  align-items: center;
  justify-content: center;
}

.skip-link {
  border: none;
  background: none;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-muted);
  border-radius: var(--radius-pill);
  transition: color 0.15s ease, background 0.15s ease;
}

.skip-link:hover {
  color: var(--ink);
  background: var(--bg-soft);
}

/* ==================== RIGHT: SYNCED MAP PANE ==================== */
.map-pane {
  flex: 1;
  position: relative;
  min-width: 0;
  background: #b7f0ea;
}

#map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

.maplibregl-ctrl-group {
  border-radius: 14px !important;
  border: 1px solid var(--line) !important;
  box-shadow: var(--shadow-xs) !important;
  overflow: hidden;
}

.maplibregl-ctrl-group button {
  background-color: var(--bg-card) !important;
  width: 34px !important;
  height: 34px !important;
}

.maplibregl-ctrl-attrib {
  background: rgba(255, 251, 242, 0.78) !important;
  font-size: 10.5px !important;
  color: var(--ink-muted) !important;
}

/* Map Pins (MapLibre native HTML markers) */
.maplibregl-marker {
  cursor: pointer;
}

.map-dot-pin {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2.5px solid var(--teal);
  display: grid;
  place-items: center;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(35, 33, 54, 0.18);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.16s ease;
}

.map-dot-pin--coral {
  border-color: var(--coral);
}

.map-dot-pin--pending {
  border-style: dashed;
  border-color: var(--sun);
  background: var(--sun-soft);
}

.map-dot-pin--compact {
  width: 26px;
  height: 26px;
  border-width: 2px;
  font-size: 11.5px;
  box-shadow: 0 2px 7px rgba(35, 33, 54, 0.16);
}

.map-dot-pin:hover {
  transform: scale(1.2);
}

.map-dot-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: var(--shadow-sm);
  transition: opacity 0.14s ease;
}

.map-dot-pin:hover .map-dot-tooltip {
  opacity: 1;
}

/* Active Synced Pin (highlights current top Tinder card!) */
.map-active-pin {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px 7px 10px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #13b5a2 0%, #0ea5a0 100%);
  border: 2.5px solid #fff;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(19, 181, 162, 0.42);
  margin-bottom: 10px;
}

.map-active-pin::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 8px solid #0ea5a0;
}

.map-active-pin--pending {
  background: linear-gradient(135deg, #ff7e5f 0%, #ff5864 100%);
  box-shadow: 0 10px 26px rgba(255, 107, 87, 0.44);
}

.map-active-pin--pending::after {
  border-top-color: #ff5864;
}

.picker-temp-pin {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--coral);
  border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(255, 107, 87, 0.3), 0 4px 12px rgba(35, 33, 54, 0.25);
}

/* Pulsing User Location Marker on Da Nang Map */
.user-loc-pin {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3b82f6;
  border: 3px solid #ffffff;
  box-shadow: 0 3px 10px rgba(59, 130, 246, 0.45);
}

.user-loc-pin::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: rgba(77, 150, 255, 0.28);
  animation: userPulse 2s ease-out infinite;
}

.user-loc-label {
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-50%);
  background: #232136;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  pointer-events: none;
}

@keyframes userPulse {
  0% {
    transform: scale(0.75);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.65);
    opacity: 0;
  }
}

/* Vietnam Sovereignty Labels (Hoàng Sa, Trường Sa & Biển Đông) */
.vn-archipelago-marker {
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
  user-select: none;
}

.vn-island-cluster {
  width: 44px;
  height: 18px;
  display: block;
}

.vn-archipelago-text {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.28;
  color: #26233d;
  background: rgba(255, 251, 242, 0.88);
  border: 1px solid rgba(19, 181, 162, 0.32);
  padding: 3px 9px;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(24, 136, 133, 0.14);
}

.vn-archipelago-sub {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: #0e8a7d;
}

.vn-sea-marker {
  pointer-events: none;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #168582;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  user-select: none;
}

.map-quick-nav {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 500;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  padding: 5px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}

.quick-nav-btn {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: all 0.15s ease;
}

.quick-nav-btn:hover {
  color: var(--ink);
  background: var(--bg-soft);
}

.quick-nav-btn.is-active {
  background: var(--teal);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(19, 181, 162, 0.28);
}

.map-locate-btn {
  position: absolute;
  bottom: 136px;
  right: 10px;
  z-index: 500;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, transform 0.14s ease;
}

.map-locate-btn:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: #fff;
}

.map-locate-btn.is-active {
  border-color: rgba(37, 99, 235, 0.42);
  background: #eff6ff;
  color: #2563eb;
}

.map-locate-btn.is-locating {
  border-color: #2563eb;
  background: #eff6ff;
  color: #2563eb;
  animation: gpsPulseRing 1.15s ease-in-out infinite;
}

.map-sync-pill {
  position: absolute;
  bottom: 38px;
  left: 16px;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-size: 12.5px;
  color: var(--ink-secondary);
  box-shadow: var(--shadow-xs);
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
}

.map-to-swipe-fab {
  display: none;
}

/* Map Picker Mode Banner */
.picker-banner {
  position: absolute;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 700;
}

.picker-banner-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  box-shadow: var(--shadow-lg);
}

.picker-banner-inner .btn-ghost {
  color: #ffd6be;
}

.picker-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 5px rgba(224, 118, 66, 0.35);
}

/* ==================== SLIDE-OVER SHEETS (COMMENTS & SAVED) ==================== */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 30, 28, 0.44);
  backdrop-filter: blur(3px);
  z-index: 1200;
  display: flex;
  justify-content: flex-end;
}

.sheet-panel {
  width: 460px;
  max-width: 100%;
  height: 100%;
  background: var(--bg-card);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: sheetIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes sheetIn {
  from {
    transform: translateX(28px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.sheet-header {
  padding: 20px 22px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sheet-kicker {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 2px;
}

.sheet-header h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.25;
}

.icon-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-paper);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.icon-close:hover {
  background: var(--bg-soft);
}

.icon-close svg {
  width: 15px;
  height: 15px;
}

.sheet-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Fast Review Composer inside Comment Sheet */
.review-composer {
  background: var(--bg-paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.composer-step-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.stance-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stance-btn {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--line-strong);
  background: var(--bg-card);
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.stance-btn--yes.is-selected {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.stance-btn--no.is-selected {
  background: var(--rose-no);
  border-color: var(--rose-no);
  color: #fff;
}

.quick-tags-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-toggle {
  border: 1px solid var(--line-strong);
  background: var(--bg-card);
  color: var(--ink-secondary);
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.14s ease;
}

.tag-toggle:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.tag-toggle.is-selected {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal-dark);
}

.tag-toggle--warn.is-selected {
  background: var(--coral-soft);
  border-color: var(--coral);
  color: var(--coral-dark);
}

.composer-input-row {
  display: flex;
  gap: 8px;
}

.composer-input-row input {
  flex: 1;
  height: 40px;
  padding: 0 13px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--bg-card);
  font-size: 13.5px;
}

.composer-input-row input:focus {
  outline: none;
  border-color: var(--teal);
}

/* Score Gauge inside Comment Sheet */
.score-summary {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 15px;
}

.score-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 7px;
  font-size: 13px;
}

.score-pct-lg {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--teal);
}

.score-pct-lg--low {
  color: var(--coral-dark);
}

.ratio-bar-wrap {
  position: relative;
  height: 8px;
  background: var(--bg-soft);
  border-radius: 99px;
}

.ratio-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--teal), #2c969f);
}

.ratio-bar-fill--low {
  background: var(--coral);
}

.ratio-threshold-mark {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: var(--ink);
  opacity: 0.45;
}

.score-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-muted);
}

/* Comments List */
.comments-heading {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 10px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-card {
  background: var(--bg-paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comment-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
}

.comment-author {
  font-weight: 700;
  color: var(--ink);
}

.comment-verdict {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
}

.comment-verdict--yes {
  background: var(--green-soft);
  color: var(--green-ok);
}

.comment-verdict--no {
  background: var(--rose-soft);
  color: var(--rose-no);
}

.comment-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.comment-body {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-secondary);
}

/* Saved Spots List inside Drawer */
.saved-item {
  background: var(--bg-paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.saved-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.saved-item h4 {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  margin: 0 0 2px;
}

.saved-item-meta {
  font-size: 12px;
  color: var(--ink-muted);
}

.saved-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 4px;
}

.saved-group-cta {
  background: linear-gradient(135deg, #fff0ed 0%, #fff6d6 100%);
  border: 1px solid var(--coral-border);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.saved-group-cta strong {
  display: block;
  font-size: 13.5px;
  color: var(--ink);
}

.saved-group-cta span {
  font-size: 12px;
  color: var(--ink-secondary);
}

/* Share / Invite Modal */
.share-tones {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tone-pill {
  border: 1px solid var(--line-strong);
  background: var(--bg-paper);
  color: var(--ink-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.14s ease;
}

.tone-pill:hover {
  border-color: var(--coral-border);
  color: var(--coral-dark);
}

.tone-pill.is-active {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

.share-preview-box {
  line-height: 1.55;
  resize: vertical;
  min-height: 136px;
}

.share-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--teal-soft);
  border: 1px solid var(--teal-border);
  font-size: 12px;
}

.share-link-label {
  color: var(--teal-dark);
  font-weight: 600;
  white-space: nowrap;
}

.share-link-code {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-invite-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 14px;
  background: var(--coral-soft);
  border: 1px solid var(--coral-border);
}

.sheet-invite-bar span {
  font-size: 12.5px;
  font-weight: 600;
  color: #823125;
}

/* ==================== MODALS ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 30, 28, 0.48);
  backdrop-filter: blur(4px);
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-card {
  width: 100%;
  max-width: 540px;
  max-height: min(85vh, 85dvh);
  background: var(--bg-card);
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-card--compact {
  max-width: 460px;
}

.modal-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-kicker {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--coral-dark);
  margin-bottom: 3px;
}

.modal-header h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  margin: 0;
}

.modal-body {
  padding: 18px 22px 20px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field > span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.field input,
.field select,
.field textarea {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-paper);
  padding: 9px 12px;
  font-size: 13.5px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--bg-card);
}

.coord-picker-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--teal-soft);
  border: 1px solid var(--teal-border);
}

.coord-label {
  display: block;
  font-size: 11.5px;
  color: var(--teal-dark);
}

.coord-info strong {
  font-size: 12.5px;
}

.modal-vibe-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.modal-vibe-option input {
  display: none;
}

.modal-vibe-option span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--bg-paper);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}

.modal-vibe-option input:checked + span {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.modal-note {
  font-size: 12.5px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--coral-soft);
  color: #6b381e;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.modal-footer--spread {
  justify-content: space-between;
}

.rules-lead {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-secondary);
}

.rules-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13.5px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.simulator-box {
  background: var(--bg-paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.simulator-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--teal);
}

.slider-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slider-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.slider-field input[type='range'] {
  accent-color: var(--coral);
}

/* ==================== TOASTS ==================== */
.toast-stack {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  width: min(400px, calc(100vw - 28px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  width: 100%;
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.45;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--teal);
  animation: toastIn 0.22s ease;
}

.toast--promoted {
  border-left-color: #46c89a;
}

.toast--hidden {
  border-left-color: var(--coral);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== RÁP KÈO & CHAT ROOM STAGE ==================== */
.keo-stage {
  flex: 1;
  min-height: 0;
  width: 100%;
  background: var(--bg-paper);
  overflow: hidden;
}

.keo-sidebar {
  width: 390px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.keo-sidebar-head {
  padding: 18px 18px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.keo-sidebar-head h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 3px;
  letter-spacing: -0.02em;
}

.keo-sidebar-head p {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.4;
}

.keo-filter-row {
  padding: 0 18px 10px;
  display: flex;
  gap: 7px;
}

.keo-filter-pill {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--bg-paper);
  color: var(--ink-secondary);
  padding: 6px 8px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.keo-filter-pill:hover {
  border-color: var(--teal-border);
  color: var(--teal-dark);
}

.keo-filter-pill.is-active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.keo-f-count {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: rgba(35, 33, 54, 0.08);
}

.keo-filter-pill.is-active .keo-f-count {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.keo-visibility-hint {
  padding: 8px 18px 10px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-secondary);
  background: var(--bg-paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.keo-visibility-hint strong {
  color: var(--ink);
}

/* Owner Access Control Bar inside Chat Room */
.chat-access-bar {
  padding: 9px 22px;
  background: var(--sun-soft);
  border-bottom: 1px solid #f4da8b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #6b4809;
}

.chat-access-bar--public {
  background: var(--teal-soft);
  border-bottom-color: var(--teal-border);
  color: var(--teal-dark);
}

.chat-access-bar--done {
  background: var(--green-soft);
  border-bottom-color: #a9e5ce;
  color: var(--green-ok);
}

.chat-access-copy {
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: 1.35;
}

.chat-owner-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.access-switch-btn {
  border: 1px solid currentColor;
  background: rgba(255, 255, 255, 0.88);
  color: inherit;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.access-switch-btn:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-xs);
}

.access-switch-btn--done {
  border-color: var(--green-ok);
  color: var(--green-ok);
}

.access-switch-btn--delete {
  border-color: #efb9c3;
  color: var(--rose-no);
}

.access-switch-btn--delete.is-confirming {
  background: var(--rose-no);
  border-color: var(--rose-no);
  color: #fff;
}

.keo-privacy-tag--done {
  background: var(--green-soft);
  color: var(--green-ok);
}

/* Completed Kèo Closed Footer -> Post-Hangout Review CTA! */
.chat-done-footer {
  background: linear-gradient(135deg, #e7f6ef 0%, #fff6d6 100%);
  border-top: 1px solid #bce8d6;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.chat-done-footer strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 2px;
}

.chat-done-footer span {
  font-size: 12.5px;
  color: var(--ink-secondary);
}

/* Schedule Builder inside Create Kèo Modal */
.schedule-builder {
  background: var(--bg-paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.end-mode-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.end-mode-tabs {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 2px;
  gap: 2px;
}

.end-mode-tab {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
}

.end-mode-tab.is-active {
  background: var(--teal);
  color: #fff;
}

.duration-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.dur-pill {
  border: 1px solid var(--line-strong);
  background: var(--bg-card);
  color: var(--ink-secondary);
  padding: 8px 6px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.14s ease;
}

.dur-pill:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.dur-pill.is-active {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal-dark);
  font-weight: 700;
}

.schedule-preview-pill {
  font-size: 12.5px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border: 1px solid var(--teal-border);
  padding: 8px 12px;
  border-radius: 10px;
}

.keo-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.keo-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
  background: var(--bg-paper);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 14px 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: all 0.16s ease;
}

.keo-card-top-right {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.keo-card-del-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.keo-card-del-btn:hover {
  background: #fff0ed;
  border-color: #ffd0c6;
  color: #d63d2d;
}

.keo-card-del-btn.is-confirming {
  background: #e14232;
  border-color: #e14232;
  color: #fff;
  padding: 0 9px;
}

.keo-card:hover {
  border-color: var(--teal-border);
  background: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-xs);
}

.keo-card.is-active {
  background: #fff;
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(19, 181, 162, 0.16), var(--shadow-sm);
}

.keo-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
}

.keo-privacy-tag {
  font-weight: 700;
  padding: 2.5px 9px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

.keo-privacy-tag--public {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.keo-privacy-tag--private {
  background: var(--sun-soft);
  color: #8a5600;
}

.keo-time-tag {
  color: var(--ink-muted);
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.keo-card-title {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
  color: var(--ink);
}

.keo-card-spot {
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.keo-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.keo-slots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.keo-avatars {
  display: inline-flex;
}

.keo-ava {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  margin-left: -6px;
}

.keo-ava:first-child {
  margin-left: 0;
  background: var(--coral);
}

.keo-ava:nth-child(3) {
  background: var(--sky);
}

.keo-joined-chip {
  font-size: 11px;
  font-weight: 700;
  color: var(--green-ok);
  background: var(--green-soft);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

/* Right: Active Chat Room */
.keo-chat-pane {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 88% 12%, rgba(185, 243, 232, 0.35) 0%, transparent 45%),
    radial-gradient(circle at 12% 88%, rgba(255, 224, 178, 0.35) 0%, transparent 45%),
    var(--bg-paper);
}

.keo-chat-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chat-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--line);
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.chat-back-btn {
  display: none;
  border: 1px solid var(--line);
  background: var(--bg-paper);
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
}

.chat-title-wrap h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 2px;
  line-height: 1.25;
}

.chat-meta-sub {
  font-size: 12.5px;
  color: var(--ink-secondary);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Linked Spot Strip inside Chat */
.chat-spot-strip {
  padding: 10px 22px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
}

.chat-spot-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--ink-secondary);
}

.chat-spot-info strong {
  color: var(--ink);
}

.chat-spot-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-safety-note {
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-muted);
  padding: 9px 16px 2px;
}

/* Messages Stream */
.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg-row {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  max-width: 78%;
}

.msg-row--mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-row--system {
  align-self: center;
  max-width: 90%;
}

.msg-system-pill {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal-dark);
  background: var(--teal-soft);
  padding: 5px 13px;
  border-radius: var(--radius-pill);
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.msg-row--mine .msg-avatar {
  background: var(--teal);
}

.msg-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.msg-row--mine .msg-col {
  align-items: flex-end;
}

.msg-sender {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
  padding: 0 4px;
}

.msg-bubble {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 18px 18px 18px 6px;
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.msg-row--mine .msg-bubble {
  background: linear-gradient(135deg, #13b5a2 0%, #0ea5a0 100%);
  border-color: transparent;
  color: #fff;
  border-radius: 18px 18px 6px 18px;
}

/* Quick Replies + Composer */
.chat-composer-area {
  background: var(--bg-card);
  border-top: 1px solid var(--line);
  padding: 11px 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.quick-replies-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quick-reply-btn {
  border: 1px solid var(--teal-border);
  background: var(--teal-soft);
  color: var(--teal-dark);
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.14s ease;
}

.quick-reply-btn:hover {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.chat-input-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-input-form input {
  flex: 1;
  height: 42px;
  padding: 0 15px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--line-strong);
  background: var(--bg-paper);
  font-size: 13.5px;
}

.chat-input-form input:focus {
  outline: none;
  border-color: var(--teal);
  background: #fff;
}

/* Create Kèo Privacy Selector */
.keo-privacy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.keo-privacy-option input {
  display: none;
}

.keo-privacy-option div {
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  padding: 11px 13px;
  background: var(--bg-paper);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: all 0.14s ease;
}

.keo-privacy-option strong {
  font-size: 13px;
  color: var(--ink);
}

.keo-privacy-option span {
  font-size: 11.5px;
  color: var(--ink-muted);
  line-height: 1.35;
}

.keo-privacy-option input:checked + div {
  border-color: var(--teal);
  background: var(--teal-soft);
}

/* Desktop hides mobile-only chrome cleanly */
.mobile-deck-bar,
.mobile-bottom-nav,
.mobile-sheet-handle,
.mobile-filter-header,
.deck-top-backdrop {
  display: none;
}

/* Install PWA Modal */
.install-hero-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--bg-paper);
  border: 1px solid var(--line);
}

.install-app-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.install-hero-row strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  margin-bottom: 2px;
}

.install-hero-sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-secondary);
  line-height: 1.42;
}

.install-steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.install-step-box {
  background: var(--bg-paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 13px;
  font-size: 12.5px;
}

.install-step-box > strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.install-step-box ol {
  margin: 0;
  padding-left: 16px;
  color: var(--ink-secondary);
  display: flex;
  flex-direction: column;
  gap: 5px;
  line-height: 1.45;
}

.install-step-box li strong {
  color: var(--ink);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1380px) {
  .topbar {
    padding: 0 16px;
    gap: 10px;
  }
  .hide-md {
    display: none;
  }
  .view-tab {
    padding: 7px 12px;
    font-size: 13px;
  }
  .topbar-actions {
    gap: 6px;
  }
}

@media (max-width: 1180px) {
  .brand-sub {
    display: none;
  }
  .deck-pane {
    width: 470px;
  }
  .home-pane {
    width: 100%;
  }
}

/* ==================== NATIVE MOBILE APP MODE (<= 840px) ==================== */
@media (max-width: 840px) {
  :root {
    --topbar-h: 54px;
  }

  .topbar {
    height: var(--topbar-h);
    flex-wrap: nowrap;
    padding: 0 14px;
    gap: 8px;
  }

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

  .brand-title {
    font-size: 16.5px;
  }

  /* Move tabs & Saved into the native Bottom Navigation Bar */
  .view-tabs,
  .hide-mobile-nav,
  .map-to-swipe-fab {
    display: none !important;
  }

  .topbar-actions {
    gap: 4px;
  }

  .topbar-actions .btn-sm {
    padding: 6px 10px;
    font-size: 12.5px;
  }

  .topbar-actions .btn-ghost {
    width: 36px;
    height: 36px;
    padding: 0;
  }

  .home-pane {
    width: 100%;
    border-right: none;
    z-index: auto;
  }

  .stage[data-view='home'] .map-pane {
    display: none;
  }

  .home-top-sticky {
    padding: 10px 14px 10px;
  }

  .home-loc-trigger {
    font-size: 12px;
    padding: 4px 8px 4px 7px;
  }

  .home-gps-btn {
    width: 32px;
    height: 32px;
  }

  .map-locate-btn {
    bottom: 136px;
    right: 10px;
  }

  .home-total-pill {
    font-size: 11px;
    padding: 3px 8px;
    flex-shrink: 0;
  }

  .home-scroll {
    padding: 14px 14px 24px;
  }

  .home-greeting {
    font-size: 20px;
  }

  .deck-pane {
    width: 100%;
    border-right: none;
    padding: 8px 14px 10px;
    gap: 8px;
    z-index: auto;
  }

  .stage[data-view='swipe'] .map-pane {
    display: none;
  }

  /* Sleek 1-row Mobile Deck Control Bar */
  .mobile-deck-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-shrink: 0;
  }

  .source-pills--sm .source-pill {
    padding: 5px 8px;
    font-size: 11.5px;
    gap: 4px;
    white-space: nowrap;
  }

  .mobile-deck-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
  }

  .m-bar-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 32px;
    padding: 0 9px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line);
    background: var(--bg-card);
    color: var(--ink);
    font-size: 11.5px;
    font-weight: 700;
    box-shadow: var(--shadow-xs);
    white-space: nowrap;
  }

  .m-bar-btn--random {
    background: var(--sun-soft);
    border-color: #f4d272;
    color: #8a5600;
  }

  .m-filter-dot {
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: var(--radius-pill);
    background: var(--coral);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: grid;
    place-items: center;
  }

  /* Transform .deck-top into a native iOS-style Bottom Sheet ABOVE Mobile Bottom Nav! */
  .deck-top-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(24, 30, 28, 0.45);
    backdrop-filter: blur(3px);
    z-index: 1100;
  }

  .deck-top {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1150;
    background: var(--bg-card);
    border-radius: 26px 26px 0 0;
    padding: 10px 18px calc(26px + env(safe-area-inset-bottom));
    box-shadow: 0 -16px 40px rgba(24, 30, 28, 0.18);
    max-height: 84dvh;
    overflow-y: auto;
    transform: translateY(105%);
    transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
    gap: 13px;
  }

  .deck-top.is-mobile-open {
    transform: translateY(0);
  }

  .deck-top .ctx-pill--random,
  .deck-top .source-pills {
    display: none;
  }

  .deck-top .deck-source-row {
    justify-content: space-between;
  }

  .deck-top .deck-meta-right {
    width: 100%;
    justify-content: space-between;
  }

  .deck-top .loc-dropdown,
  .deck-top .ctx-dropdown {
    width: 100%;
  }

  .deck-top .location-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .deck-top .loc-menu,
  .deck-top .ctx-menu {
    position: static;
    width: 100%;
    margin-top: 6px;
    box-shadow: none;
    background: var(--bg-paper);
  }

  .hero-pill {
    font-size: 11px;
    padding: 3.5px 8px;
    max-width: 62%;
  }

  .mobile-sheet-handle {
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 99px;
    background: var(--line-strong);
    margin: 0 auto 4px;
  }

  .mobile-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
  }

  .mobile-filter-header h3 {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 800;
    margin: 0;
  }

  /* Hide vertical rail on narrow phones (users naturally touch-swipe up/down!) */
  .vertical-nav-rail {
    display: none;
  }

  .deck-arena {
    padding: 2px 0;
  }

  .card-stack {
    max-width: 100%;
    height: 100%;
    min-height: 360px;
  }

  .card-hero {
    height: 146px;
    padding: 12px 14px;
  }

  .card-content {
    padding: 14px 16px 14px;
    gap: 8px;
  }

  .card-title {
    font-size: 19px;
  }

  .action-dock {
    padding-top: 2px;
    gap: 4px;
  }

  .action-buttons {
    gap: 14px;
  }

  .act-label {
    display: none;
  }

  .act-btn--no,
  .act-btn--yes {
    width: 58px;
    height: 58px;
    padding: 0;
  }

  .act-btn--comment {
    width: 48px;
    height: 48px;
  }

  .act-btn--undo {
    width: 42px;
    height: 42px;
  }

  .gesture-guide {
    font-size: 11px;
  }

  /* Native Mobile Bottom Navigation Bar (5 clean SVG tabs, >= 44px touch targets) */
  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    padding: 4px 4px calc(5px + env(safe-area-inset-bottom));
    z-index: 900;
  }

  .mb-tab {
    position: relative;
    border: none;
    background: transparent;
    color: #6b6880;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 46px;
    padding: 4px 2px;
    font-size: 10.5px;
    font-weight: 600;
    transition: color 0.14s ease;
  }

  .mb-tab svg {
    width: 21px;
    height: 21px;
  }

  .mb-tab.is-active {
    color: var(--coral);
    font-weight: 700;
  }

  .mb-badge {
    position: absolute;
    top: 1px;
    right: calc(50% - 21px);
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: var(--radius-pill);
    background: var(--teal);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: grid;
    place-items: center;
    border: 1.5px solid #fff;
  }

  .mb-badge--coral {
    background: var(--coral);
  }

  /* Bottom-Sheet presentation for Comment Sheet & Saved Drawer on Mobile */
  .sheet-backdrop {
    align-items: flex-end;
    justify-content: center;
  }

  .sheet-panel {
    width: 100%;
    height: 86dvh;
    border-left: none;
    border-top: 1px solid var(--line);
    border-radius: 26px 26px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
    animation: sheetUp 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes sheetUp {
    from {
      transform: translateY(36px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  .toast-stack {
    bottom: calc(74px + env(safe-area-inset-bottom));
    right: 14px;
    left: 14px;
    width: auto;
    align-items: center;
  }

  .map-quick-nav {
    top: 10px;
    left: 10px;
    right: 10px;
    justify-content: space-between;
  }

  .quick-nav-btn {
    padding: 5px 8px;
    font-size: 11.5px;
  }

  .form-grid-2,
  .keo-privacy-grid,
  .install-steps-grid {
    grid-template-columns: 1fr;
  }

  .keo-sidebar {
    width: 100%;
    border-right: none;
  }

  .keo-stage.is-mobile-chat .keo-sidebar {
    display: none;
  }

  .keo-stage:not(.is-mobile-chat) .keo-chat-pane {
    display: none;
  }

  .chat-back-btn {
    display: inline-flex;
  }

  .chat-header {
    padding: 12px 14px;
  }

  .chat-spot-strip,
  .chat-access-bar,
  .chat-composer-area {
    padding-left: 14px;
    padding-right: 14px;
  }

  .chat-messages {
    padding: 12px 14px;
  }

  .msg-row {
    max-width: 90%;
  }
}

/* ==================== FULL-WIDTH CENTERED HOME, QUEST GAME & EMOTIONAL MOOD PICKER ==================== */
.home-scroll {
  padding: 20px 20px 36px;
}

.home-overview,
.home-browse {
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 760px) {
  .home-cat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .home-spot-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .home-swipe-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
  }

  .hsb-actions {
    flex-shrink: 0;
  }
}

/* ----- QUEST GAME VIEW (Thử thách & Nhật ký trải nghiệm) ----- */
.quest-scroll,
.pick-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 20px 40px;
}

.quest-inner {
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.quest-hero {
  background: linear-gradient(135deg, #fff6ea 0%, #eefcf8 100%);
  border: 1px solid #d7ede5;
  border-radius: 22px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.quest-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.quest-kicker,
.pick-kicker {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 4px;
}

.quest-rank-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.quest-rank-desc {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--ink-secondary);
}

.quest-xp-box {
  text-align: right;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(35, 33, 54, 0.08);
  border-radius: 16px;
  padding: 10px 14px;
}

.quest-xp-num {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--coral);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.quest-xp-num span {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-muted);
}

.quest-xp-sub {
  font-size: 11.5px;
  color: var(--ink-secondary);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.quest-bar-track {
  height: 9px;
  background: rgba(35, 33, 54, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.quest-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--teal) 0%, var(--coral) 100%);
  transition: width 0.35s ease;
}

.quest-stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quest-stat-pill {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(35, 33, 54, 0.07);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quest-stat-pill strong {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.quest-stat-pill span {
  font-size: 12px;
  color: var(--ink-secondary);
}

.quest-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.quest-mode-tab {
  min-height: 40px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 13.5px;
  font-weight: 700;
  transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.quest-mode-tab.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.quest-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.quest-filter-pills {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.quest-random-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.quest-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.quest-card.is-active {
  border-color: var(--teal);
  box-shadow: 0 8px 24px rgba(19, 181, 162, 0.12);
}

.quest-card.is-done {
  border-color: #c8eadf;
  background: linear-gradient(180deg, #ffffff 0%, #f6fdfb 100%);
}

.quest-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.quest-card-ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.quest-card-ico svg {
  width: 22px;
  height: 22px;
}

.quest-card-ico--amber { background: #fff4de; color: #c77700; }
.quest-card-ico--teal { background: #e6f9f5; color: #0e8a7d; }
.quest-card-ico--coral { background: #ffefeb; color: #df4d3a; }
.quest-card-ico--blue { background: #ebf4ff; color: #2468cc; }
.quest-card-ico--violet { background: #f3eeff; color: #6b46c1; }

.quest-card-head-main {
  flex: 1;
  min-width: 0;
}

.quest-card-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 5px;
}

.quest-xp-tag {
  font-size: 11px;
  font-weight: 800;
  color: var(--coral);
  background: #fff0ec;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-variant-numeric: tabular-nums;
}

.quest-diff-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-secondary);
  background: var(--bg-soft);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.quest-status-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.quest-status-tag--active {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.quest-status-tag--done {
  background: #def7ec;
  color: #0d7a55;
}

.quest-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
}

.quest-card-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.45;
}

.quest-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-muted);
  padding-top: 2px;
}

.quest-card-meta strong {
  color: var(--ink);
}

.quest-done-preview {
  background: rgba(19, 181, 162, 0.06);
  border-left: 3px solid var(--teal);
  border-radius: 10px;
  padding: 9px 11px;
}

.qdp-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 2px;
}

.quest-done-preview p {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-secondary);
  line-height: 1.45;
}

.quest-steps-box {
  background: var(--bg-paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quest-steps-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.quest-steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.quest-step-btn {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 10px;
  min-height: 40px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 12.8px;
  line-height: 1.4;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.quest-step-btn:hover {
  border-color: var(--teal);
}

.quest-step-btn.is-checked {
  background: #effbf8;
  border-color: #a9e5d8;
  color: var(--ink-secondary);
}

.quest-step-btn.is-checked .quest-step-text {
  text-decoration: line-through;
  opacity: 0.85;
}

.quest-step-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
  background: #fff;
  margin-top: 1px;
}

.quest-step-btn.is-checked .quest-step-check {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.quest-spots-suggest {
  border-top: 1px dashed var(--line);
  padding-top: 9px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.quest-spots-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-secondary);
}

.quest-spots-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quest-spot-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  color: var(--ink);
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.quest-spot-chip:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.quest-spot-chip span {
  font-size: 11px;
  color: var(--teal-dark);
  font-weight: 600;
}

.quest-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.quest-empty-box {
  text-align: center;
  background: var(--bg-card);
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  padding: 36px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.quest-empty-ico {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  display: grid;
  place-items: center;
}

.quest-empty-box h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
}

.quest-empty-box p {
  margin: 0;
  max-width: 440px;
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.5;
}

/* Post-Challenge Memories Grid */
.quest-memories-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.memory-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.memory-card--amber { border-left-color: #e59a16; }
.memory-card--coral { border-left-color: var(--coral); }
.memory-card--violet { border-left-color: #7c52db; }
.memory-card--blue { border-left-color: #3478e5; }

.memory-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.memory-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--teal-dark);
  background: var(--teal-soft);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.memory-time {
  font-size: 11.5px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.memory-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 800;
  color: var(--ink);
}

.memory-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.memory-feeling-pill,
.memory-rating-pill,
.memory-xp-pill {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.memory-feeling-pill--teal { background: #e6f9f5; color: #0e8a7d; }
.memory-feeling-pill--amber { background: #fff4de; color: #b96e00; }
.memory-feeling-pill--coral { background: #ffefeb; color: #d64633; }
.memory-feeling-pill--violet { background: #f3eeff; color: #6741be; }
.memory-feeling-pill--blue { background: #ebf4ff; color: #2468cc; }

.memory-rating-pill {
  background: var(--bg-soft);
  color: var(--ink-secondary);
}

.memory-xp-pill {
  background: #fff0ec;
  color: var(--coral);
  font-variant-numeric: tabular-nums;
}

.memory-spot-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.memory-link-btn {
  border: none;
  background: transparent;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 700;
  padding: 0 2px;
  text-decoration: underline;
}

.memory-quote {
  margin: 0;
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--bg-paper);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
}

.memory-card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Post-Challenge Reflection Modal */
.qc-badge-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eefcf8 0%, #fff7eb 100%);
  border: 1px solid #ccebe2;
}

.qc-badge-ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #fff;
  color: var(--teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.qc-badge-ico svg {
  width: 22px;
  height: 22px;
  display: block;
}

.qc-badge-banner > div > strong {
  display: block;
  font-size: 14.5px;
  color: var(--ink);
}

.qc-badge-banner > div > span {
  display: block;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-secondary);
  margin-top: 2px;
}

.qc-badge-banner > div > span strong {
  display: inline;
  font-size: inherit;
  color: var(--ink);
  font-weight: 700;
}

.qc-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.qc-step {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.qc-feelings-row,
.qc-spot-chips,
.qc-prompts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.qc-feeling-btn,
.qc-rating-btn,
.qc-spot-chip,
.qc-prompt-chip {
  min-height: 36px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-secondary);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.14s ease;
}

.qc-feeling-btn.is-active,
.qc-rating-btn.is-active,
.qc-spot-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.qc-prompt-chip {
  min-height: 30px;
  padding: 3px 10px;
  font-size: 11.5px;
  background: var(--bg-paper);
}

.qc-prompt-chip:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.qc-input,
.qc-form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--ink);
  background: #fff;
}

/* ----- EMOTIONAL MOOD-FIRST PICKER ("CHỌN GIÙM") ----- */
.pick-inner {
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pick-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.pick-weather-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pick-title {
  margin: 4px 0 6px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.24;
}

.pick-lead {
  margin: 0;
  font-size: 14px;
  color: var(--ink-secondary);
  line-height: 1.5;
}

.pick-scope-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 14px;
  background: var(--teal-soft);
  border: 1px solid #b5ece0;
  font-size: 13px;
  color: var(--teal-dark);
}

.pick-scope-clear {
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
}

.pick-revealing-card {
  background: linear-gradient(135deg, #fff5ec 0%, #eefcf8 100%);
  border: 1px solid #d5eee5;
  border-radius: 22px;
  padding: 32px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.pick-reveal-pulse {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  color: var(--coral);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(255, 107, 87, 0.22);
  animation: gpsPulseRing 0.9s ease-in-out infinite;
}

.pick-revealing-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--ink);
}

.pick-revealing-card p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-secondary);
}

/* Hero Emotional Result Card */
.pick-result-wrap {
  border-radius: 24px;
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.pick-empathy-box {
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #edfbf7 0%, #f7fefc 100%);
}

.pick-empathy-box--teal { background: linear-gradient(135deg, #e8fbf6 0%, #f5fefc 100%); }
.pick-empathy-box--blue { background: linear-gradient(135deg, #eef5ff 0%, #f7faff 100%); }
.pick-empathy-box--mint { background: linear-gradient(135deg, #eafcf3 0%, #f5fefa 100%); }
.pick-empathy-box--amber { background: linear-gradient(135deg, #fff6e2 0%, #fffbf0 100%); }
.pick-empathy-box--violet { background: linear-gradient(135deg, #f3efff 0%, #faf8ff 100%); }
.pick-empathy-box--coral { background: linear-gradient(135deg, #fff0ec 0%, #fff8f6 100%); }

.pick-empathy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.pick-empathy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(35, 33, 54, 0.08);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.pick-empathy-ico {
  display: inline-flex;
  width: 15px;
  height: 15px;
  color: var(--coral);
}

.pick-empathy-ico svg {
  width: 15px;
  height: 15px;
}

.pick-reset-link {
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 6px;
  text-decoration: underline;
}

.pick-empathy-quote {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink);
}

.pick-empathy-context {
  margin: 9px 0 0;
  font-size: 12.8px;
  color: var(--ink-secondary);
}

.pick-spot-card {
  padding: 18px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pick-spot-hero {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.pick-spot-art {
  width: 112px;
  height: 112px;
  border-radius: 18px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--line);
}

.pick-spot-svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.pick-spot-info {
  flex: 1;
  min-width: 0;
}

.pick-spot-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.pick-spot-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
}

.pick-spot-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  font-size: 13px;
  color: var(--ink-secondary);
}

.pick-spot-dist {
  color: var(--teal-dark);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pick-spot-addr {
  margin: 6px 0 0;
  font-size: 12.8px;
  color: var(--ink-muted);
}

.pick-spot-tip {
  margin: 7px 0 0;
  font-size: 13.2px;
  line-height: 1.48;
  color: var(--ink-secondary);
  background: var(--bg-paper);
  padding: 8px 11px;
  border-radius: 11px;
}

.pick-primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.pick-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

/* Mood Selection Grid */
.pick-selector-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pick-switcher-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-secondary);
}

.mood-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.mood-card {
  text-align: left;
  padding: 14px 13px;
  border-radius: 18px;
  border: 1.5px solid var(--line);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 118px;
  transition: border-color 0.16s ease, transform 0.14s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.mood-card:hover {
  border-color: var(--teal);
  transform: translateY(-1px);
  box-shadow: var(--shadow-xs);
}

.mood-card.is-selected {
  border-color: var(--coral);
  background: #fff6f3;
  box-shadow: 0 6px 20px rgba(255, 107, 87, 0.15);
}

.mood-card-ico {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 2px;
}

.mood-card-ico svg {
  width: 20px;
  height: 20px;
}

.mood-card--teal .mood-card-ico { background: #e6f9f5; color: #0e8a7d; }
.mood-card--blue .mood-card-ico { background: #ebf4ff; color: #2468cc; }
.mood-card--mint .mood-card-ico { background: #e8fcf2; color: #128a5c; }
.mood-card--amber .mood-card-ico { background: #fff4de; color: #c77700; }
.mood-card--violet .mood-card-ico { background: #f3eeff; color: #6b46c1; }
.mood-card--coral .mood-card-ico { background: #ffefeb; color: #df4d3a; }

.mood-card-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.28;
}

.mood-card-sub {
  font-size: 12px;
  color: var(--ink-secondary);
  line-height: 1.38;
}

.pick-prefs-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.pick-cta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 2px;
}

.pick-main-cta {
  min-height: 46px;
  padding: 0 22px;
  font-size: 14.5px;
  font-weight: 800;
}

@media (max-width: 840px) {
  .home-scroll,
  .quest-scroll,
  .pick-scroll {
    padding: 14px 14px 28px;
  }

  .quest-hero {
    padding: 16px;
  }

  .quest-hero-top {
    flex-direction: column;
    gap: 10px;
  }

  .quest-xp-box {
    text-align: left;
    width: 100%;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
  }

  .quest-rank-title,
  .pick-title {
    font-size: 21px;
  }

  .quest-grid,
  .quest-memories-grid {
    grid-template-columns: 1fr;
  }

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

  .mood-card {
    padding: 12px;
    min-height: 108px;
  }

  .pick-empathy-box,
  .pick-spot-card {
    padding: 15px;
  }

  .pick-empathy-quote {
    font-size: 15.5px;
  }

  .pick-spot-hero {
    flex-direction: column;
    gap: 12px;
  }

  .pick-spot-art {
    width: 100%;
    height: 128px;
  }

  .pick-spot-name {
    font-size: 18px;
  }

  .pick-primary-actions {
    flex-direction: column;
  }

  .pick-primary-actions > * {
    width: 100%;
    justify-content: center;
  }

  .pick-main-cta {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 1180px) and (min-width: 841px) {
  .topbar {
    padding: 0 12px;
    gap: 8px;
  }

  .brand-sub {
    display: none;
  }

  .view-tab {
    padding: 6px 10px;
    font-size: 12.5px;
    gap: 5px;
  }

  .topbar-actions {
    gap: 6px;
  }
}

/* Inline Live Multi-Filter Panel on Trang chủ */
.home-cat-card.is-selected {
  border-color: var(--coral);
  background: #fff6f3;
  box-shadow: 0 6px 20px rgba(255, 107, 87, 0.14);
}

.home-cat-card.is-selected .home-cat-count {
  background: var(--coral);
  color: #fff;
}

.home-filter-panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  box-shadow: var(--shadow-xs);
}

.hfp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.hfp-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
}

.hfp-title-wrap svg {
  color: var(--teal-dark);
  flex-shrink: 0;
}

.hfp-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink);
}

.hfp-count-pill {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--teal-dark);
  background: var(--teal-soft);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-variant-numeric: tabular-nums;
}

.hfp-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hfp-pick-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  border: 1px solid #ffd0c4;
  background: #fff3ef;
  color: var(--coral);
  font-size: 12px;
  font-weight: 700;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.hfp-pick-btn:hover {
  background: var(--coral);
  color: #fff;
  border-color: var(--coral);
}

.hfp-clear-btn {
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 6px;
  text-decoration: underline;
}

.hfp-clear-btn:hover {
  color: var(--coral);
}

.hfp-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hfp-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}

.hfp-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.hfp-chips .refine-chip {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12px;
}

@media (max-width: 840px) {
  .home-filter-panel {
    padding: 13px;
    border-radius: 18px;
    gap: 10px;
  }

  .hfp-chips .refine-chip {
    min-height: 33px;
    padding: 0 10px;
    font-size: 11.8px;
  }
}

/* Real Spot Photography + Seamless Fallback + 9:16 Story Preview Modal */
.spot-real-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sheet-hero-photo-wrap {
  position: relative;
  width: 100%;
  height: 196px;
  flex-shrink: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 4px;
  background: var(--bg-paper);
}

.sheet-hero-top-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sheet-photo-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(24, 22, 36, 0.72);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  transition: background-color 0.14s ease, transform 0.14s ease;
}

.sheet-photo-pill-btn:hover {
  background: rgba(24, 22, 36, 0.9);
}

.sheet-photo-pill-btn--teal {
  background: rgba(14, 138, 125, 0.92);
  border-color: rgba(255, 255, 255, 0.45);
}

.sheet-photo-pill-btn--teal:hover {
  background: #0b7368;
}

.sheet-photo-pill-btn--danger {
  background: rgba(185, 28, 28, 0.85);
}

.sheet-photo-pill-btn--danger.is-confirming {
  background: #dc2626;
}

.sheet-hero-bottom-bar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.sheet-hero-bottom-bar > * {
  pointer-events: auto;
}

.sheet-photo-credit {
  max-width: 68%;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(24, 22, 36, 0.7);
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.94);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-photo-gallery {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 0 6px;
  flex-shrink: 0;
  scrollbar-width: none;
}

.sheet-photo-gallery::-webkit-scrollbar {
  display: none;
}

.sheet-photo-thumb {
  width: 56px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  background: var(--bg-paper);
  opacity: 0.72;
  transition: border-color 0.14s ease, opacity 0.14s ease;
}

.sheet-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sheet-photo-thumb.is-active,
.sheet-photo-thumb:hover {
  border-color: var(--coral);
  opacity: 1;
}

.sheet-photo-upload-card {
  width: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1.5px dashed var(--teal-border);
  background: linear-gradient(135deg, #f4fbf9 0%, #fffbf4 100%);
  text-align: left;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.sheet-photo-upload-card:hover {
  border-color: var(--teal);
  background: #edf9f6;
}

.sheet-photo-upload-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sheet-photo-upload-ico {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--teal-border);
  color: var(--teal-dark);
  display: grid;
  place-items: center;
}

.sheet-photo-upload-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sheet-photo-upload-copy strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.sheet-photo-upload-copy span {
  font-size: 11.5px;
  color: var(--ink-secondary);
}

.sheet-photo-upload-cta {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--teal);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.submit-photo-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1.5px dashed var(--line-strong);
  background: var(--bg-paper);
  margin-bottom: 6px;
}

.submit-photo-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.submit-photo-status {
  font-size: 12px;
  color: var(--ink-secondary);
  flex: 1 1 140px;
}

.submit-photo-preview {
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.story-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.story-preview-frame {
  width: min(270px, 72vw);
  aspect-ratio: 9 / 16;
  border-radius: 22px;
  overflow: hidden;
  background: var(--bg-paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
}

.story-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.story-preview-loading {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
  padding: 16px;
  text-align: center;
}

.story-actions-row {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.story-actions-row > * {
  flex: 1 1 160px;
  justify-content: center;
}

/* ==================== MOBILE DECLUTTER, NATIVE PULL-TO-REFRESH & FLOATING RESET (?v=37) ==================== */
#homeResultsSection {
  scroll-margin-top: 148px;
}

.refine-chip--adv-toggle,
.refine-chip--reset-inline {
  display: none;
}

.hfp-advanced {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-floating-reset {
  position: fixed;
  right: 18px;
  bottom: 24px;
  z-index: 880;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 15px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(35, 33, 54, 0.88);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(35, 33, 54, 0.22);
  transition: transform 0.16s ease, background-color 0.16s ease, opacity 0.16s ease;
}

.home-floating-reset:hover {
  background: #232136;
  transform: translateY(-1px);
}

.home-floating-reset.is-reset-mode {
  background: var(--coral);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 22px rgba(255, 107, 87, 0.34);
}

@media (max-width: 840px) {
  /* Unlock native iOS Safari / Android Chrome pull-to-refresh & address-bar collapse on Home, Quest, Pick */
  .app-shell:not([data-view='keo']) {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }

  .app-shell:not([data-view='keo']) .topbar {
    position: sticky;
    top: 0;
  }

  .app-shell:not([data-view='keo']) .stage,
  .app-shell:not([data-view='keo']) .home-pane,
  .app-shell:not([data-view='keo']) .home-scroll,
  .app-shell:not([data-view='keo']) .quest-stage,
  .app-shell:not([data-view='keo']) .quest-scroll,
  .app-shell:not([data-view='keo']) .pick-stage,
  .app-shell:not([data-view='keo']) .pick-scroll {
    height: auto;
    min-height: 0;
    overflow: visible;
    overscroll-behavior: auto;
  }

  .app-shell:not([data-view='keo']) .home-top-sticky {
    position: sticky;
    top: var(--topbar-h);
    z-index: 800;
    background: rgba(255, 251, 242, 0.96);
    backdrop-filter: blur(12px);
  }

  .app-shell:not([data-view='keo']) .home-scroll,
  .app-shell:not([data-view='keo']) .quest-scroll,
  .app-shell:not([data-view='keo']) .pick-scroll {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 920;
  }

  .app-shell[data-view='keo'] {
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }

  .home-floating-reset {
    right: 14px;
    bottom: calc(74px + env(safe-area-inset-bottom));
    min-height: 38px;
    padding: 0 13px;
    font-size: 12px;
  }
}

@media (max-width: 760px) {
  /* Calm, airy, photo-first Mobile Home (dramatically less text, zero visual clutter) */
  .brand-sub {
    display: none;
  }

  .home-top-sticky {
    padding: 8px 14px 10px;
    gap: 8px;
  }

  .home-search-box {
    min-height: 40px;
    padding: 0 10px 0 12px;
    border-radius: 13px;
  }

  .home-scroll {
    padding: 12px 14px calc(96px + env(safe-area-inset-bottom));
  }

  .home-overview {
    gap: 13px;
  }

  .home-greeting {
    font-size: 19px;
    line-height: 1.25;
  }

  .home-lead {
    display: none;
  }

  /* 1-line compact Weather strip on Mobile */
  .home-weather-card {
    padding: 9px 12px;
    border-radius: 15px;
    gap: 0;
  }

  .hw-main {
    gap: 9px;
  }

  .hw-ico-wrap {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .hw-temp {
    font-size: 15.5px;
  }

  .hw-cond {
    font-size: 13px;
  }

  .hw-meta,
  .hw-tip {
    display: none;
  }

  .hw-cta-btn {
    min-height: 32px;
    padding: 0 11px;
    font-size: 11.5px;
  }

  /* Clean 3x2 Compact App-Icon Category Grid on Mobile */
  .home-cat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .home-cat-card {
    min-height: 76px;
    padding: 9px 9px 10px;
    border-radius: 15px;
    gap: 7px;
    align-items: flex-start;
    text-align: left;
  }

  .home-cat-top {
    width: 100%;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
  }

  .home-cat-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .home-cat-icon svg {
    width: 17px;
    height: 17px;
  }

  .home-cat-count {
    font-size: 10px;
    padding: 2px 6px;
    line-height: 1.25;
  }

  .home-cat-title {
    font-size: 12px;
    line-height: 1.22;
  }

  .home-cat-sub {
    display: none;
  }

  /* Single-line horizontal Quick Filter Strip + Collapsible Advanced Drawer on Mobile */
  .home-filter-panel {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
    gap: 10px;
  }

  .home-filter-panel.is-expanded {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px;
    box-shadow: var(--shadow-xs);
  }

  .hfp-head,
  .hfp-group--quick .hfp-label {
    display: none;
  }

  .home-filter-panel.is-expanded .hfp-head {
    display: flex;
  }

  .hfp-quick-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 7px;
    padding: 2px 2px 4px;
    margin: 0 -2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .hfp-quick-strip::-webkit-scrollbar {
    display: none;
  }

  .hfp-quick-strip .refine-chip {
    flex-shrink: 0;
    white-space: nowrap;
    min-height: 35px;
    padding: 0 12px;
    font-size: 12.2px;
    background: var(--bg-card);
    box-shadow: 0 1px 4px rgba(35, 33, 54, 0.04);
  }

  .hfp-quick-strip .refine-chip.is-active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
  }

  .refine-chip--adv-toggle,
  .refine-chip--reset-inline {
    display: inline-flex;
  }

  .refine-chip--reset-inline {
    border-color: var(--coral-border) !important;
    background: #fff3ef !important;
    color: var(--coral-dark) !important;
  }

  .home-filter-panel:not(.is-expanded) .hfp-advanced {
    display: none;
  }

  .hfp-advanced .hfp-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .hfp-advanced .hfp-chips::-webkit-scrollbar {
    display: none;
  }

  .hfp-advanced .refine-chip {
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* Photo-Forward, Breathable 3-Line Spot Cards on Mobile */
  .home-sec-head h2 {
    font-size: 15.5px;
  }

  .home-spot-list {
    gap: 10px;
  }

  .spot-list-card {
    border-radius: 16px;
    padding: 10px;
  }

  .slc-main-btn {
    gap: 11px;
    align-items: center;
  }

  .slc-thumb {
    width: 76px;
    height: 76px;
    border-radius: 13px;
  }

  .slc-body {
    gap: 4px;
  }

  .slc-title {
    font-size: 14.2px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .slc-meta {
    font-size: 12px;
  }

  .slc-tags-row {
    gap: 5px;
  }

  .slc-tip {
    display: none;
  }

  /* Full-width, easy-to-tap Bottom CTA Banner on Mobile */
  .home-swipe-banner {
    padding: 16px;
    border-radius: 18px;
    gap: 12px;
  }

  .hsb-title {
    font-size: 15px;
  }

  .hsb-desc {
    display: none;
  }

  .hsb-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hsb-actions .btn {
    width: 100%;
    min-height: 46px;
    justify-content: center;
    padding: 10px 16px;
    font-size: 13.5px;
  }
}

/* ==================== V38 UX AUDIT POLISH (12-ITEM COMPREHENSIVE FIX) ==================== */
/* #2 Topbar overflow menu (⋯) & compact header <= 1180px */
.topbar-more-wrap {
  position: relative;
  display: none;
  align-items: center;
}

.topbar-more-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  justify-content: center;
}

.topbar-more-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 980;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.topbar-more-item {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.topbar-more-item:hover {
  background: var(--bg-paper);
  color: var(--teal-dark);
}

.topbar-submit-btn {
  border-color: var(--line-strong);
  color: var(--ink);
}

@media (max-width: 1180px) {
  .topbar {
    padding: 0 12px;
    gap: 8px;
  }

  .brand-title {
    font-size: 15.5px;
  }

  .view-tabs {
    gap: 2px;
    padding: 3px;
  }

  .view-tab {
    padding: 6px 9px;
    font-size: 12.5px;
    gap: 5px;
  }

  .topbar-util-btn {
    display: none !important;
  }

  .topbar-more-wrap {
    display: inline-flex;
  }

  #openSavedBtn .saved-label-text {
    display: none;
  }

  #openSavedBtn {
    padding: 7px 10px;
    gap: 5px;
  }

  .topbar-submit-btn {
    padding: 7px 11px;
    font-size: 12.5px;
  }
}

/* #6 Sticky modal footer so primary submit stays pinned inside 85dvh modal */
.modal-footer--sticky {
  position: sticky;
  bottom: -20px;
  z-index: 3;
  background: var(--bg-card);
  margin: 4px -22px -20px;
  padding: 12px 22px 16px;
  border-top: 1px solid var(--line);
}

/* #10 Review stance validation cue */
.req-mark {
  color: var(--coral-dark);
  font-weight: 800;
}

.stance-row.is-error .stance-btn {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 107, 87, 0.22);
  animation: stanceShake 0.34s ease;
}

@keyframes stanceShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  55% { transform: translateX(4px); }
  80% { transform: translateX(-2px); }
}

/* #12 Single empty-state Tạo kèo button across Desktop & Mobile */
.keo-empty-box {
  text-align: center;
  padding: 36px 16px;
  color: var(--ink-secondary);
}

.keo-empty-box p {
  margin: 0 0 14px;
  line-height: 1.45;
}

.keo-empty-mobile-only {
  display: none;
}

/* #3 Desktop First-Screen Optimization (>= 761px): spots immediately visible above the fold! */
.adv-lbl-mobile {
  display: none;
}

@media (min-width: 761px) {
  .home-top-sticky {
    padding: 9px 20px;
  }

  .home-top-inner {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    max-width: 1080px;
  }

  .home-loc-row {
    flex: 0 1 auto;
    gap: 8px;
  }

  .home-loc-controls {
    flex: 0 1 auto;
  }

  .home-total-pill {
    order: 3;
    min-height: 36px;
    padding: 0 11px;
  }

  .home-search-box {
    flex: 1 1 280px;
    min-width: 200px;
  }

  .home-search-input {
    height: 40px;
  }

  .home-scroll {
    padding: 12px 20px 32px;
  }

  .home-overview {
    max-width: 1080px;
    gap: 11px;
  }

  .home-hero-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 14px;
  }

  .home-greeting {
    font-size: 21px;
    line-height: 1.2;
    margin: 0;
  }

  .home-lead {
    font-size: 13px;
    margin: 0;
    color: var(--ink-secondary);
  }

  .home-weather-card {
    padding: 9px 14px;
    gap: 4px;
  }

  .hw-tip {
    display: none;
  }

  /* 6 categories in a crisp single horizontal row on Desktop */
  .home-cat-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
  }

  .home-cat-card {
    min-height: 76px;
    padding: 10px 10px 9px;
    border-radius: 15px;
    gap: 6px;
  }

  .home-cat-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .home-cat-icon svg {
    width: 17px;
    height: 17px;
  }

  .home-cat-count {
    font-size: 10.5px;
    padding: 2px 6px;
  }

  .home-cat-title {
    font-size: 13px;
    line-height: 1.22;
  }

  .home-cat-sub {
    display: none;
  }

  /* Default-collapsed filter bar on Desktop with "Bộ lọc nâng cao" toggle */
  .home-filter-panel {
    padding: 8px 12px;
    border-radius: 16px;
    gap: 8px;
  }

  .home-filter-panel:not(.is-expanded) .hfp-head,
  .home-filter-panel:not(.is-expanded) .hfp-group--quick .hfp-label,
  .home-filter-panel:not(.is-expanded) .hfp-advanced {
    display: none;
  }

  .home-filter-panel.is-expanded {
    padding: 12px 14px;
    gap: 10px;
  }

  .refine-chip--adv-toggle,
  .refine-chip--reset-inline {
    display: inline-flex;
  }

  .hfp-quick-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .hfp-quick-strip::-webkit-scrollbar {
    display: none;
  }

  .hfp-quick-strip .refine-chip {
    flex-shrink: 0;
    min-height: 36px;
  }

  .home-spot-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* #5 & #11 & #12 Mobile Touch Target Upgrade (>= 40-44px), Tab Alignment & Contrast */
@media (max-width: 840px) {
  .topbar-more-btn {
    width: 42px;
    height: 42px;
  }

  .topbar-actions .btn-sm,
  .topbar-submit-btn {
    min-height: 40px;
    padding: 0 12px;
    font-size: 12.5px;
  }

  .icon-close {
    width: 44px;
    height: 44px;
  }

  .home-loc-trigger {
    min-height: 42px;
    padding: 4px 10px 4px 9px;
    font-size: 12.5px;
  }

  .home-gps-btn {
    width: 42px;
    height: 42px;
  }

  .app-shell:not([data-view='keo']) .home-scroll,
  .app-shell:not([data-view='keo']) .quest-scroll,
  .app-shell:not([data-view='keo']) .pick-scroll {
    padding-bottom: calc(116px + env(safe-area-inset-bottom));
  }

  .home-floating-reset {
    bottom: calc(78px + env(safe-area-inset-bottom));
    min-height: 42px;
    padding: 0 14px;
    font-size: 12.5px;
  }

  .keo-filter-pill {
    min-height: 42px;
    padding: 6px 10px;
    font-size: 12.5px;
  }

  .keo-card-del-btn {
    min-width: 40px;
    height: 40px;
  }

  .keo-sidebar-head .btn,
  .keo-empty-box .btn {
    min-height: 42px;
    padding: 8px 14px;
    font-size: 13px;
  }

  .keo-empty-mobile-only {
    display: inline-flex;
  }

  .sheet-quick-actions .btn,
  .sheet-invite-bar .btn,
  .quest-card-actions .btn,
  .pick-prefs-row .refine-chip,
  .quest-filter-pills .refine-chip {
    min-height: 42px;
  }

  .quest-mode-tab {
    min-height: 42px;
    white-space: nowrap;
  }
}

@media (max-width: 760px) {
  .adv-lbl-desktop {
    display: none;
  }

  .adv-lbl-mobile {
    display: inline;
  }

  .hw-cta-btn {
    min-height: 40px;
    padding: 0 12px;
    font-size: 12px;
  }

  .hfp-quick-strip .refine-chip,
  .hfp-advanced .refine-chip {
    min-height: 42px;
    padding: 0 13px;
    font-size: 12.5px;
  }

  .home-scroll {
    padding: 12px 14px calc(116px + env(safe-area-inset-bottom));
  }

  .modal-footer--sticky {
    margin: 4px -16px -16px;
    padding: 12px 16px 14px;
  }
}

@media (max-width: 640px) {
  .hide-sm-label {
    display: none;
  }
}

/* ==================== V39 NEARBY-FIRST CHỌN GIÙM LOCATION BAR & NEARBY STRIP ==================== */
.pick-loc-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 11px 14px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--teal-border);
  box-shadow: var(--shadow-xs);
}

.pick-loc-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 220px;
}

.pick-loc-pin {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.pick-loc-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.pick-loc-label {
  font-size: 13px;
  color: var(--ink-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pick-loc-label strong {
  color: var(--ink);
  font-weight: 700;
}

.pick-loc-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal-dark);
}

.pick-loc-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pick-area-select {
  height: 40px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background-color: var(--bg-paper);
  color: var(--ink);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 38px;
  max-width: 215px;
  cursor: pointer;
}

.pick-gps-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--teal-border);
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.pick-gps-btn:hover,
.pick-gps-btn.is-active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.pick-gps-btn.is-locating {
  border-color: #2563eb;
  background: #e8f1ff;
  color: #1d4ed8;
}

.pick-dist-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--teal-soft);
  border: 1px solid var(--teal-border);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.pick-nearby-wrap {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.pick-nearby-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.pick-nearby-head strong {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
}

.pick-nearby-head span {
  font-size: 12px;
  color: var(--ink-muted);
}

.pick-nearby-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.pick-nearby-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-paper);
  text-align: left;
  min-height: 62px;
  transition: border-color 0.14s ease, background-color 0.14s ease, transform 0.14s ease;
}

.pick-nearby-card:hover {
  border-color: var(--teal);
  background: #fff;
  transform: translateY(-1px);
}

.pick-nearby-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(35, 33, 54, 0.06);
}

.pick-nearby-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pick-nearby-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pick-nearby-name {
  font-size: 12.8px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pick-nearby-meta {
  font-size: 11.5px;
  color: var(--ink-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pick-nearby-dist {
  font-weight: 700;
  color: var(--teal-dark);
}

@media (max-width: 840px) {
  .pick-loc-bar {
    padding: 10px 12px;
    gap: 9px;
  }

  .pick-loc-controls {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .pick-area-select {
    width: 100%;
    max-width: none;
    height: 42px;
    min-height: 42px;
  }

  .pick-gps-btn {
    min-height: 42px;
    padding: 0 14px;
  }

  .pick-nearby-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .pick-nearby-card {
    padding: 9px;
    min-height: 66px;
  }
}

/* ==================== V40 VERIFIED QUEST CHECK-IN (3 TIERS · GPS <= 200M · LIVE CAMERA STAMP) ==================== */
.quest-tier-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
  font-size: 12px;
  color: var(--ink-secondary);
}

.quest-tier-legend strong {
  color: var(--ink);
  font-weight: 700;
}

.quest-status-tag--verified {
  background: #fff1e6;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.quest-status-tag--self {
  background: var(--bg-soft);
  color: var(--ink-secondary);
  border: 1px solid var(--line-strong);
}

.memory-photo-wrap {
  width: 100%;
  height: 204px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-paper);
}

.memory-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.memory-tier-pill {
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.memory-tier-pill--verified {
  background: #fff1e6;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.memory-tier-pill--gps {
  background: var(--teal-soft);
  color: var(--teal-dark);
  border: 1px solid var(--teal-border);
}

.memory-tier-pill--self {
  background: var(--bg-soft);
  color: var(--ink-secondary);
  border: 1px solid var(--line-strong);
}

.memory-xp-pill--zero {
  background: var(--bg-soft);
  color: var(--ink-muted);
}

.qc-select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background-color: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 40px;
}

@media (max-width: 560px) {
  .qc-form .modal-footer--sticky {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 8px;
  }

  .qc-form .modal-footer--sticky .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
}

.qc-verify-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 13px;
  border-radius: 16px;
  background: var(--bg-paper);
  border: 1px solid var(--teal-border);
}

.qc-verify-tiers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qc-tier-tag {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-muted);
}

.qc-tier-tag.is-current {
  border-color: var(--ink);
  color: var(--ink);
  background: #fff;
}

.qc-tier-tag.is-current.is-ok {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.qc-tier-tag.is-current.is-gold {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

.qc-verify-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qc-verify-actions .btn {
  flex: 1 1 180px;
  min-height: 42px;
  justify-content: center;
}

.qc-gps-hint {
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-secondary);
}

.qc-gps-status {
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.qc-gps-status--ok {
  background: var(--teal-soft);
  border-color: var(--teal-border);
  color: var(--teal-dark);
}

.qc-gps-status--warn {
  background: #fff4ec;
  border-color: #ffd0b8;
  color: #9a3412;
}

.qc-photo-preview-wrap {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}

.qc-photo-preview {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.qc-photo-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--teal-dark);
  font-weight: 600;
}

/* ==================== v41 SECURITY & TRUST UI POLISH ==================== */
.modal-note--queue {
  background: rgba(19, 181, 162, 0.08);
  border-color: rgba(19, 181, 162, 0.24);
  color: var(--ink);
}

.rules-fixed-box {
  background: var(--cream-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}

.rules-fixed-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
}

.rules-fixed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.rules-fixed-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rules-fixed-item strong {
  font-size: 13.5px;
  color: var(--teal-dark);
}

.rules-fixed-item span {
  font-size: 11.5px;
  color: var(--ink-muted);
  line-height: 1.4;
}

.quest-window-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.14);
  color: #9a5700;
}

.quest-sync-bar {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(35, 33, 54, 0.16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.quest-sync-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--ink);
}

.quest-sync-copy code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  background: rgba(19, 181, 162, 0.12);
  color: var(--teal-dark);
  padding: 1px 6px;
  border-radius: 6px;
}

.quest-sync-hint {
  font-size: 11px;
  color: var(--ink-muted);
}

.quest-sync-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.quest-sync-restore-form {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.quest-sync-restore-form input {
  flex: 1;
  min-width: 0;
}

.qc-window-note {
  font-size: 12px;
  color: #9a5700;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 10px;
  padding: 7px 10px;
  margin-bottom: 6px;
}

.qc-char-counter {
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--coral-dark);
  text-align: right;
}

.qc-char-counter.is-ok {
  color: var(--teal-dark);
}

.comment-author-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.comment-verified-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(19, 181, 162, 0.14);
  color: var(--teal-dark);
}

.review-already-banner {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal-dark);
  background: rgba(19, 181, 162, 0.1);
  border: 1px solid rgba(19, 181, 162, 0.24);
  border-radius: 11px;
  padding: 8px 10px;
}

.review-gps-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.review-gps-msg {
  font-size: 11.5px;
  line-height: 1.45;
  padding: 6px 9px;
  border-radius: 9px;
}

.review-gps-msg.is-ok {
  background: rgba(19, 181, 162, 0.1);
  color: var(--teal-dark);
  font-weight: 600;
}

.review-gps-msg.is-warn {
  background: rgba(245, 158, 11, 0.12);
  color: #9a5700;
}

.access-switch-btn--report {
  border-color: rgba(214, 70, 51, 0.35);
  color: var(--coral-dark);
  background: rgba(255, 107, 87, 0.08);
}

.msg-sender-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.msg-block-btn {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.72;
}

.msg-block-btn:hover {
  background: rgba(214, 70, 51, 0.1);
  color: var(--coral-dark);
  opacity: 1;
}

.chat-blocked-banner {
  font-size: 11.5px;
  color: var(--ink-muted);
  background: var(--cream-soft);
  border-radius: 10px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-name-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.chat-name-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  cursor: pointer;
}

@media (max-width: 560px) {
  .rules-fixed-grid {
    grid-template-columns: 1fr;
  }
  .quest-sync-restore-form {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Reduced Motion Accessibility (Vercel Web Interface Guidelines & UI/UX Pro Max) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
