/* ============================================================
   Flight About Now! (FAN) — TERMINAL REDESIGN
   Space Mono · near-black · neon green accents
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg: #060606;
  --surface: #0d0d0d;
  --surface-2: #131313;
  --line: #1c1c1c;
  --line-bright: #262626;
  --accent: #00e87a;
  --accent-ink: #00c464;
  --accent-dim: rgba(0, 232, 122, 0.1);
  --sky: #4477ee;
  --good: #00e87a;
  --good-bg: rgba(0, 232, 122, 0.08);
  --warn: #ffaa00;
  --danger: #ff3355;
  --ink: #e8e8e8;
  --ink-soft: #aaaaaa;
  --ink-faint: #666666;
  --shadow: none;
  --shadow-sm: none;
  --font: 'Space Mono', monospace;
  --fs-base: 16px;
  --radius: 3px;
  --radius-sm: 2px;
}

@keyframes cur { 0%,49%{opacity:1}50%,100%{opacity:0} }

/* ── Light theme ──────────────────────────────────────────────────── */
html.light {
  --bg: #f5f5f3;
  --surface: #ffffff;
  --surface-2: #ececea;
  --line: #e2e2de;
  --line-bright: #d0d0cc;
  --accent: #009955;
  --accent-ink: #007a44;
  --accent-dim: rgba(0, 153, 85, 0.1);
  --good: #009955;
  --good-bg: rgba(0, 153, 85, 0.08);
  --warn: #cc8800;
  --danger: #cc2233;
  --ink: #000000;
  --ink-soft: #1f1f1f;
  --ink-faint: #474747;
  --shadow: 0 1px 4px rgba(0,0,0,.07);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
}
/* Light theme: keep body copy properly black, not grey. */
html.light body { color: #000; }
html.light .cat-card__city,
html.light .cat-card__why,
html.light .rv-lead,
html.light .rv-sec li,
html.light .rv-sec p,
html.light .guide-row__city { color: #000; }
/* Override the handful of hardcoded near-white colors from the dark theme */
html.light .brand__name,
html.light .hero__title,
html.light .dash__title,
html.light .watch__route,
html.light .dialog__title,
html.light .empty__title { color: var(--ink); }
html.light .dialog::backdrop { background: rgba(0,0,0,.45); }
html.light .accent { text-shadow: none; }
html.light .price-now.is-deal { text-shadow: none; }
html.light .btn--ghost:hover { border-color: var(--line-bright); color: var(--ink-soft); }

* { box-sizing: border-box; }
html { font-size: var(--fs-base); }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.5rem; }
.brand__logo { display: none; }
.brand__name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #e8e8e8;
  display: flex;
  align-items: center;
}
.brand__cursor {
  display: inline-block;
  width: 3px;
  height: 1.05em;
  background: var(--accent);
  margin-left: 3px;
  border-radius: 1px;
  vertical-align: middle;
  animation: cur 1s step-end infinite;
}
.topbar__end { display: flex; align-items: center; gap: 0.5rem; }
.topbar__actions { display: flex; align-items: center; gap: 0.7rem; }
.user-email { color: var(--ink-faint); font-size: 0.7rem; letter-spacing: 0.05em; margin-right: 0.2rem; }
.theme-btn { font-size: 1rem; min-height: 34px; padding: 0.3em 0.65em; border-color: transparent; color: var(--ink-faint); }
.theme-btn:hover { border-color: var(--line-bright); color: var(--ink-soft); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.2rem clamp(1rem, 4vw, 2.5rem) 5rem;
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  padding: 0.6em 1.1em;
  min-height: 40px;
  cursor: pointer;
  transition: border-color 0.1s, color 0.1s, background 0.1s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--ink-faint);
}
.btn:active { opacity: 0.75; }
.btn--primary {
  border-color: rgba(0,232,122,.35);
  color: var(--accent);
  background: var(--accent-dim);
}
.btn--primary:hover { background: rgba(0,232,122,.16); border-color: rgba(0,232,122,.55); }
.btn--ghost { background: transparent; color: var(--ink-faint); border-color: var(--line-bright); }
.btn--ghost:hover { border-color: #363636; color: var(--ink-soft); }
.btn--block { width: 100%; }
.btn--lg { font-size: 0.73rem; padding: 0.65em 1.3em; }
.btn--xl { font-size: 0.8rem; padding: 0.78em 1.5em; }
.btn--danger-ghost { background: transparent; color: rgba(255,51,85,.5); border-color: transparent; }
.btn--danger-ghost:hover { color: var(--danger); }
.btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ---------- Cards & forms ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: clamp(1.4rem, 4vw, 2.2rem);
}
.form { display: flex; flex-direction: column; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field__label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink-faint);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.field__hint { font-size: 0.75rem; color: var(--ink-faint); }
.input {
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 0.6rem 0;
  border: none;
  border-bottom: 1px solid var(--line-bright);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  width: 100%;
  min-height: 44px;
  transition: border-bottom-color 0.15s;
}
.input:focus {
  outline: none;
  border-bottom-color: var(--accent);
  box-shadow: none;
}
select.input { cursor: pointer; }
.input--code { text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.1rem; }
.form__error {
  background: rgba(255,51,85,.07);
  color: var(--danger);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,51,85,.2);
  margin: 0;
}
.form__ok {
  background: var(--good-bg);
  color: var(--good);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0,232,122,.2);
  margin: 0;
}

/* Destination autocomplete */
.dest-suggestions {
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow-y: auto;
  max-height: 16rem;
  margin-top: -0.5rem;
  box-shadow: none;
}
.dest-suggestion {
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.dest-suggestion:last-child { border-bottom: none; }
.dest-suggestion:hover, .dest-suggestion:focus { background: var(--surface-2); outline: none; }
.dest-suggestion__code { font-weight: 700; color: var(--accent); min-width: 2.5rem; }
.dest-suggestion__info { color: var(--ink-faint); font-size: 0.76rem; }

/* Toggle checkbox */
.field--toggle { flex-direction: row; align-items: center; gap: 0.75rem; cursor: pointer; }
.toggle-check { width: 18px; height: 18px; min-width: 18px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }

/* ---------- Auth view ---------- */
.auth {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-top: clamp(1rem, 5vw, 3.5rem);
}
.hero__title {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1.2rem;
  color: #e8e8e8;
}
.accent {
  color: var(--accent);
  text-shadow: 0 0 20px rgba(0,232,122,.35);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}
.hero__sub { font-size: 0.88rem; color: var(--ink-soft); max-width: 36ch; line-height: 1.75; }
.auth__card { max-width: 420px; width: 100%; }
.tabs {
  display: flex;
  gap: 0;
  background: transparent;
  padding: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.8rem;
}
.tab {
  flex: none;
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: none;
  background: transparent;
  color: var(--ink-faint);
  padding: 0.6rem 1.4rem 0.6rem 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  min-height: unset;
  margin-bottom: -1px;
}
.tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.tab:hover:not(.is-active) { color: var(--ink-soft); }

/* ---------- Help card — always visible ---------- */
.help-card {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.8rem;
}
.help-card__label {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.5;
  margin-bottom: 1rem;
}
.help-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.help-step {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--ink-faint);
}
.help-step strong { color: var(--ink-soft); }
.help-step__num {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.45;
  min-width: 22px;
  flex-shrink: 0;
  padding-top: 2px;
}

/* ---------- Dashboard ---------- */
.dash__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.8rem;
}
.dash__title {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  color: #e0e0e0;
  text-transform: uppercase;
}
.dash__sub { color: var(--ink-faint); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; margin: 0.3rem 0 0; }
.dash__head-actions { display: flex; gap: 0.5rem; }

.watch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.2rem;
}

/* ---------- Watch card ---------- */
.watch {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  border-left: 2px solid var(--line);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  position: relative;
}
.watch.is-deal { border-left-color: var(--accent); }
.watch__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.watch__route {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  color: #e0e0e0;
  text-transform: uppercase;
}
.watch__route .arrow { color: var(--accent); opacity: 0.65; margin: 0 0.35rem; }
.watch__label { color: var(--ink-faint); font-size: 0.68rem; letter-spacing: 0.07em; text-transform: uppercase; margin: 0.2rem 0 0; }

.badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.28rem 0.5rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  border: 1px solid;
}
.badge--deal { background: var(--good-bg); color: var(--good); border-color: rgba(0,232,122,.2); }
.badge--watching { background: rgba(68,119,238,.06); color: #4477ee; border-color: rgba(68,119,238,.14); }
.badge--paused { background: transparent; color: var(--ink-faint); border-color: var(--line-bright); }

.watch__price-row { display: flex; align-items: baseline; gap: 0.8rem; flex-wrap: wrap; }
.price-now {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink-soft);
}
.price-now.is-deal { color: var(--accent); text-shadow: 0 0 18px rgba(0,232,122,.3); }
.price-now.is-none { font-size: 1.15rem; color: var(--ink-faint); font-weight: 400; }
.price-target { font-size: 0.78rem; color: var(--ink-faint); font-weight: 400; letter-spacing: 0.04em; }

.meta { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; color: var(--ink-faint); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; }
.meta b { color: var(--ink-soft); }

.chart { width: 100%; height: 60px; display: block; }
.chart-empty { color: var(--ink-faint); font-size: 0.72rem; letter-spacing: 0.04em; }

.watch__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: auto; align-items: center; }
.watch__actions .spacer { flex: 1; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 4rem 1rem; }
.empty__emoji { display: none; }
.empty__title { font-size: 1.3rem; font-weight: 700; margin: 0.5rem 0; text-transform: uppercase; letter-spacing: 0.02em; color: #e0e0e0; }
.empty__text { font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 1.6rem; }

/* ---------- Dialog ---------- */
.dialog {
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  padding: 0;
  width: min(600px, 92vw);
  background: var(--surface);
  color: var(--ink);
}
.dialog::backdrop { background: rgba(0,0,0,.82); }
.dialog .form { padding: clamp(1.4rem, 4vw, 2rem); }
.dialog__title {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 0.6rem;
  color: #e0e0e0;
}
.dialog__title::before { content: '› '; color: var(--accent); }
.dialog__lead { color: var(--ink-soft); font-size: 0.8rem; margin: 0 0 0.4rem; }
.dialog__section-title {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 0 0.4rem;
  color: var(--accent);
  opacity: 0.55;
}
.dialog__divider { border: none; border-top: 1px solid var(--line); margin: 0.5rem 0; }
.dialog__note {
  font-size: 0.78rem;
  color: var(--ink-faint);
  background: transparent;
  border: 1px solid var(--line);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
}
.dialog__actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 0.6rem; flex-wrap: wrap; }
.dialog__actions--spread { justify-content: space-between; align-items: center; }
.dialog__actions--spread > div { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.dialog__test-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--line-bright);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius);
  z-index: 50;
  max-width: 90vw;
  text-align: center;
}
.toast.is-error { border-color: rgba(255,51,85,.3); color: var(--danger); }

/* ---------- Inline link button ---------- */
.btn--link {
  display: block;
  background: none;
  border: none;
  color: var(--ink-faint);
  font-family: var(--font);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.6rem 0 0;
  text-align: center;
  width: 100%;
}
.btn--link:hover { color: var(--accent); }

/* ---------- Admin panel ---------- */
.admin-tabs { margin-bottom: 1.4rem; }
.admin-panel { margin-top: 0.5rem; }
.admin-ai-form { max-width: 700px; }
.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.admin-table th {
  text-align: left;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line-bright);
  padding: 0.5rem 0.8rem 0.5rem 0;
}
.admin-table td {
  padding: 0.7rem 0.8rem 0.7rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.admin-table__email { font-weight: 700; color: var(--ink); word-break: break-all; }
.admin-table__date { color: var(--ink-faint); white-space: nowrap; }
.admin-table__actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.btn--sm { font-size: 0.62rem; padding: 0.4em 0.75em; min-height: 30px; }

/* ---------- Textarea input ---------- */
.input--area {
  resize: vertical;
  min-height: 120px;
  padding: 0.7rem 0.1rem;
  line-height: 1.6;
  border-bottom: 1px solid var(--line-bright);
}
.input--area:focus { border-bottom-color: var(--accent); }

/* ---------- Responsive (tablet) ---------- */
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth__hero { order: -1; }
  .watch-grid { grid-template-columns: 1fr; }
  .help-steps { grid-template-columns: 1fr; }
}

/* ---------- Responsive (mobile) ---------- */
@media (max-width: 600px) {
  :root { --fs-base: 15px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .user-email { display: none; }

  /* Topbar — compact, wrap nav actions below brand row */
  .topbar {
    padding: 0.6rem 1rem;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .brand__name { font-size: 0.95rem; }
  .topbar__end {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
  }
  .theme-btn { font-size: 0.9rem; min-height: 36px; padding: 0.25em 0.5em; }
  .topbar__actions {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
    width: 100%;
    padding-top: 0.3rem;
    border-top: 1px solid var(--line);
  }
  #navSearchBtn { display: none; } /* redundant on mobile — back buttons exist on each view */
  .topbar__actions .btn { font-size: 0.65rem; min-height: 36px; padding: 0.4em 0.7em; }

  /* Container — less horizontal breathing room needed */
  .container { padding: 1rem 1rem 4rem; }

  /* Auth view — stack tighter */
  .auth { padding-top: 1rem; gap: 1.5rem; }
  .hero__title { font-size: clamp(1.5rem, 6vw, 2.2rem); margin-bottom: 0.8rem; }
  .hero__sub { font-size: 0.84rem; max-width: 100%; }
  .auth__card { max-width: 100%; }

  /* Search card */
  .search-card { padding: 1rem; gap: 1.2rem; }
  .prefs { gap: 0.8rem; }
  .field--kids { max-width: 100%; }

  /* Dash head */
  .dash__head { flex-direction: column; align-items: flex-start; gap: 0.6rem; margin-bottom: 1.2rem; }
  .dash__title { font-size: 1.3rem; }
  .dash__head-actions { width: 100%; }
  .dash__head-actions .btn { flex: 1; justify-content: center; }

  /* Dialog — full-screen sheet */
  .dialog {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    margin: 0;
    overflow-y: auto;
  }
  .dialog::backdrop { display: none; }
  .dialog .form { padding: 1.1rem 1rem; }
  .dialog__title { font-size: 1rem; }
  .dialog__actions { flex-direction: column-reverse; gap: 0.5rem; }
  .dialog__actions .btn { width: 100%; }
  .dialog__actions--spread { flex-direction: column-reverse; align-items: stretch; }
  .dialog__actions--spread > div { flex-direction: column-reverse; }
  .dialog__test-btns { flex-direction: column; }

  .watch__actions .btn { min-height: 44px; }
  .watch__route { font-size: 1.05rem; }
  .price-now { font-size: 1.9rem; }
}

/* ============================================================
   Holiday Selector — search, catalogue cards, review, guides
   ============================================================ */

/* ---------- Topbar nav ---------- */
#navSearchBtn, #navGuidesBtn { font-size: 0.66rem; }

/* ---------- Search card ---------- */
.search-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.3rem, 4vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  max-width: 920px;
}
.prefs { display: flex; flex-direction: column; gap: 1.1rem; }
.prefs__label {
  font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); opacity: 0.55;
}
.prefs__climate { display: flex; flex-direction: column; gap: 0.5rem; }

.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.5rem; }
.chip {
  display: flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  padding: 0.55rem 0.8rem;
  font-size: 0.78rem;
  cursor: pointer;
  color: var(--ink-soft);
  transition: border-color 0.1s, color 0.1s, background 0.1s;
  min-height: 44px;
}
.chip:hover { border-color: #3a3a3a; }
.chip input { accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }
.chip:has(input:checked) { border-color: var(--accent); color: var(--ink); background: var(--accent-dim); }
.field--kids { max-width: 360px; }

/* ---------- Catalogue grid + cards ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.2rem;
}
.cat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: border-color 0.12s, transform 0.12s;
}
.cat-card:hover, .cat-card:focus-visible { border-color: var(--accent); transform: translateY(-2px); outline: none; }
.cat-card__media { position: relative; height: 200px; background: var(--surface-2); overflow: hidden; }
.cat-card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-card__img--none { display: flex; align-items: center; justify-content: center; color: var(--ink-faint); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; }
.cat-card__code {
  position: absolute; top: 0.6rem; left: 0.6rem;
  background: rgba(6,6,6,0.78); color: var(--accent);
  font-weight: 700; font-size: 0.72rem; letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem; border-radius: var(--radius-sm);
}
.cat-card__body { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.cat-card__top { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.cat-card__city { margin: 0; font-size: 1.15rem; font-weight: 700; color: #e0e0e0; text-transform: uppercase; letter-spacing: 0.01em; }
html.light .cat-card__city { color: var(--ink); }
.cat-card__country { font-size: 0.68rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }
.cat-card__why { margin: 0; font-size: 0.85rem; line-height: 1.5; color: var(--ink-soft); }
.cat-card__meta { font-size: 0.7rem; color: var(--ink-faint); letter-spacing: 0.04em; text-transform: uppercase; }
.cat-card__tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.cat-card__tags li { font-size: 0.68rem; color: var(--ink-soft); border: 1px solid var(--line-bright); border-radius: 999px; padding: 0.12rem 0.55rem; }
.cat-card__foot { margin-top: auto; padding-top: 0.6rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.cat-card__price { font-size: 1.4rem; font-weight: 700; color: var(--accent); }
.cat-card__price--none { font-size: 0.8rem; color: var(--ink-faint); font-weight: 400; }
.cat-card__per { font-size: 0.62rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.08em; margin-left: 0.3rem; }
.cat-card__airline { display: block; font-size: 0.66rem; color: var(--accent); font-weight: 700; letter-spacing: 0.04em; margin-top: 0.2rem; }
.cat-card__go { font-size: 0.68rem; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- Loading ---------- */
.loading { display: flex; align-items: center; gap: 0.8rem; padding: 2.5rem 0.5rem; color: var(--ink-soft); font-size: 0.85rem; letter-spacing: 0.04em; }
.loading__spin { width: 16px; height: 16px; border: 2px solid var(--line-bright); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.results__more { display: flex; justify-content: center; margin: 2rem 0 0; }

/* ---------- Review ---------- */
.review__bar { display: flex; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.rv { max-width: 760px; margin: 0 auto; }
.rv-hero { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); aspect-ratio: 16 / 9; }
.rv-hero__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv-hero__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem 1.5rem; background: linear-gradient(transparent, rgba(0,0,0,.82)); color: #fff; }
.rv-hero__cap h1 { margin: 0; font-size: clamp(1.5rem, 4vw, 2.2rem); text-transform: uppercase; letter-spacing: 0.01em; }
.rv-hero__tag { margin: 0.3rem 0 0; font-style: italic; opacity: 0.92; font-size: 0.92rem; }
.rv-facts { color: var(--ink-faint); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 1rem 0 1.2rem; }
.rv-book { background: var(--good-bg); border: 1px solid rgba(0,232,122,.2); border-radius: var(--radius); padding: 0.9rem 1.1rem; margin-bottom: 1.6rem; }
.rv-book h3 { margin: 0 0 0.3rem; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--accent); }
.rv-book p { margin: 0; font-size: 0.88rem; color: var(--ink); }
.rv-lead { font-size: 1.02rem; line-height: 1.7; color: var(--ink); }
.rv-tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0 1.4rem; }
.rv-tags li { font-size: 0.74rem; color: var(--ink-soft); border: 1px solid var(--line-bright); border-radius: 999px; padding: 0.2rem 0.7rem; }
.rv-sec { border-top: 1px solid var(--line); padding-top: 1.2rem; margin-top: 1.4rem; }
.rv-sec h2 { font-size: 1.05rem; margin: 0 0 0.5rem; text-transform: uppercase; letter-spacing: 0.02em; color: #e0e0e0; }
html.light .rv-sec h2 { color: var(--ink); }
.rv-sec ul { margin: 0; padding-left: 1.2rem; }
.rv-sec li { margin: 0.55rem 0; line-height: 1.6; color: var(--ink-soft); }
.rv-sec p { margin: 0; line-height: 1.7; color: var(--ink-soft); }
.rv-links li a { color: var(--accent); font-weight: 700; text-decoration: none; border-bottom: 1px solid transparent; }
.rv-links li a:hover { border-bottom-color: var(--accent); }
.rv-meta { color: var(--ink-faint); font-size: 0.88em; }
.rv-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 1.6rem 0 0; }
.rv-gallery img { width: 100%; height: 160px; object-fit: cover; border-radius: var(--radius-sm); display: block; }
.rv-gallery figcaption { font-size: 0.66rem; color: var(--ink-faint); margin-top: 0.2rem; }

/* ---------- My guides ---------- */
.guides-list { display: flex; flex-direction: column; gap: 0.7rem; }
.guide-row {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.guide-row__city { margin: 0; font-size: 1.05rem; text-transform: uppercase; color: #e0e0e0; display: flex; align-items: baseline; gap: 0.6rem; }
html.light .guide-row__city { color: var(--ink); }
.guide-row__country { font-size: 0.66rem; color: var(--ink-faint); letter-spacing: 0.06em; }
.guide-row__meta { font-size: 0.72rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.3rem; }
.guide-row__actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
@media (max-width: 600px) {
  /* Cards */
  .cat-grid { grid-template-columns: 1fr; }
  .cat-card__media { height: 180px; }
  .cat-card__city { font-size: 1rem; }

  /* Preference chips */
  .chip-grid { grid-template-columns: 1fr 1fr; }
  .chip { font-size: 0.74rem; padding: 0.5rem 0.6rem; min-height: 40px; }

  /* Results action bar */
  .results__more { margin: 1.2rem 0 0; }
  #newSearchBtn { font-size: 0.7rem; }

  /* Review */
  .review__bar { flex-direction: column-reverse; gap: 0.5rem; }
  .review__bar .btn { width: 100%; justify-content: center; min-height: 46px; }
  .rv-hero { aspect-ratio: 4 / 3; }
  .rv-hero__cap h1 { font-size: 1.4rem; }
  .rv-lead { font-size: 0.93rem; }
  .rv-gallery { grid-template-columns: 1fr; }
  .rv-gallery img { height: 200px; }

  /* Guides list */
  .guide-row { flex-direction: column; align-items: stretch; gap: 0.8rem; }
  .guide-row__actions { display: flex; gap: 0.4rem; }
  .guide-row__actions .btn { flex: 1; min-height: 42px; }
}

[hidden] { display: none !important; }
