/* ─── SCROLLBAR ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(100,116,139,.4);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(100,116,139,.65); }

/* ─── LAYOUT ────────────────────────────────────────────────────── */
.app {
  display: grid;
  grid-template-columns: 256px 1fr;
  min-height: 100vh;
}

.main { overflow-x: hidden; position: relative; }
.page.active { animation: rise .35s ease-out both; }

/* ─── EMPTY STATE ──────────────────────────────────────────────── */
.empty {
  padding: 100px 48px;
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
}
.empty-icon { font-size: 2.5rem; margin-bottom: 14px; opacity: .6; }

/* ─── HAMBURGER ────────────────────────────────────────────────── */
.hamburger {
  display: none; position: fixed; top: 12px; left: 12px; z-index: 220;
  width: 42px; height: 42px; border-radius: 8px;
  background: rgba(15,23,42,.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-2);
  box-shadow: 0 4px 14px rgba(0,0,0,.45);
  align-items: center; justify-content: center;
  cursor: pointer; flex-direction: column; gap: 4px; padding: 11px;
  transition: left .28s ease, background .15s;
}
.hamburger span {
  display: block; width: 18px; height: 1.5px;
  background: var(--ivory); border-radius: 1px;
  transition: transform .2s, opacity .2s;
}
/* When drawer is open, slide the button to the right edge of the drawer
   so it sits beside the logo as a close affordance, not on top of it. */
body.no-scroll .hamburger { left: calc(282px - 54px); background: transparent; border-color: transparent; box-shadow: none; }
body.no-scroll .hamburger span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
body.no-scroll .hamburger span:nth-child(2) { opacity: 0; }
body.no-scroll .hamburger span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Focus discipline — kill the chunky default outline on tap, keep keyboard focus visible */
a, button { -webkit-tap-highlight-color: transparent; }
a:focus, button:focus { outline: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ─── SIDEBAR BACKDROP ─────────────────────────────────────────── */
.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,23,42,.6);
  backdrop-filter: blur(2px);
  z-index: 90;
  opacity: 0;
  transition: opacity .25s ease;
}
.sidebar-backdrop.show { opacity: 1; }
body.no-scroll { overflow: hidden; }

/* ─── MOBILE ──────────────────────────────────────────────────── */
@media(max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: -300px; top: 0;
    width: 282px; height: 100%;
    transition: left .28s ease;
    box-shadow: 20px 0 40px rgba(0,0,0,.5);
  }
  .sidebar.open { left: 0; }
  .sidebar-backdrop.show { display: block; }
  .hamburger { display: flex; }

  /* Page-level padding ─ unified 16px gutter */
  .hero, .toolbar, .resort-grid, .detail-grid, .comparison-row {
    padding-left: 16px; padding-right: 16px;
  }
  .resort-grid {
    padding-top: 16px; padding-bottom: 32px;
    gap: 14px;
    grid-template-columns: 1fr;
  }
  .toolbar { padding: 10px 16px; gap: 8px; position: static; }
  .comparison-row { padding: 8px 16px 10px; gap: 6px; }
  .cmp-pill { padding: 6px 12px; font-size: .76rem; }

  /* Hero — leave room for hamburger, tight rhythm */
  .hero { padding: 60px 16px 20px; }
  .hero .brand-watermark { display: none; }
  .hero-badge { margin-bottom: 12px; padding: 3px 8px; font-size: .64rem; }
  .hero h2 { font-size: 1.55rem !important; max-width: none; margin-bottom: 8px; line-height: 1.18; }
  .hero p { font-size: .9rem; margin-bottom: 14px; line-height: 1.5; }

  /* Stats: switch to a real 2-col grid so wrapping/dividers are predictable */
  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
  }
  .stat {
    padding: 0;
    margin: 0;
    border-right: none;
    text-align: left;
  }
  .stat-num { font-size: 1.15rem; }
  .stat-label { font-size: .58rem; letter-spacing: .1em; margin-top: 4px; }

  /* Detail page */
  .detail-grid { grid-template-columns: 1fr; padding: 20px 16px 40px; gap: 14px; }
  .detail-hero { height: auto; min-height: 260px; }
  .detail-hero-content { padding: 60px 16px 22px; }
  .detail-name { font-size: 1.55rem !important; }
  .detail-loc { font-size: .85rem; margin-top: 4px; }
  .detail-badges { margin-top: 10px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .section-block { margin-bottom: 14px; }
  .section-header { padding: 12px 14px; }
  .section-body { padding: 14px; }
  .section-title { font-size: .88rem; }
  .rating-grid { gap: 8px; }
  .rating-box { padding: 12px 10px; }

  /* Sidebar: tighter on mobile, leave room for the close (X) button on the right */
  .sidebar-logo { padding: 18px 60px 14px 20px; }
  .brand-mark { max-width: 124px; }
  .brand-tag { font-size: .6rem; margin-top: 6px; letter-spacing: .14em; }
  .sidebar-section { padding: 14px 20px 6px; }
  .region-btn { padding: 8px 20px; }
  .resort-link { padding: 4px 20px 4px 44px; }
  .sidebar-footer { padding: 14px 20px; }

  /* Search + sort full-width when they wrap */
  .search-box { flex: 1 1 100%; min-width: 0; padding: 8px 12px; font-size: .88rem; }
  .sort-select { flex: 1 1 100%; padding: 8px 12px; font-size: .82rem; }

  /* Card hero a touch shorter, body padding tighter */
  .card-hero { height: 156px; }
  .card-hero-info { padding: 12px 14px; }
  .card-body { padding: 14px; }
  .card-footer { padding: 12px 14px; }
  .card-meta { gap: 10px; margin-bottom: 12px; padding-bottom: 10px; }
  .card-ratings { gap: 8px; margin-bottom: 12px; }
  .rating-chip { padding: 9px 11px; }
  .sentiment-bar { margin-bottom: 12px; }
  .card-excerpt { margin-bottom: 12px; font-size: .82rem; }
}

@media(max-width: 480px) {
  .hero { padding: 58px 14px 18px; }
  .hero h2 { font-size: 1.4rem !important; }
  .hero p { font-size: .86rem; margin-bottom: 12px; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 12px; }
  .stat-num { font-size: 1.05rem; }

  .detail-hero-content { padding: 58px 14px 16px; }
  .detail-name { font-size: 1.4rem !important; }
  .detail-grid { padding: 16px 14px 32px; }

  .photo-grid { grid-template-columns: 1fr; }
  .rating-grid { grid-template-columns: repeat(2, 1fr); }
  .resort-grid { padding-left: 14px; padding-right: 14px; }
  .toolbar { padding-left: 14px; padding-right: 14px; }
  .comparison-row { padding-left: 14px; padding-right: 14px; }

  .review-header, .review-body { padding-left: 12px; padding-right: 12px; }
  .back-btn { margin-bottom: 10px; padding: 5px 10px; font-size: .76rem; }
  .card-name { font-size: 1.02rem; }
  .card-tag { margin-bottom: 6px; }
}
