/* System fonts — readable on Mac/Safari, no stylized web fonts */

:root {
  /* Boot polish + Tuscany — waxed leather, plaster, walnut grain */
  --cream: #f2e8d5;
  --cream-dark: #e6d9bf;
  --leather: #2a1810;
  --leather-dark: #1a0e08;
  --cognac: #9a5a2e;
  --cognac-light: #c48850;
  --terracotta: #a6553a;
  --tan: #d9c9a8;
  --tan-dark: #c9b592;
  --soft-blue: #8a7560;
  --soft-blue-deep: #6b5340;
  --soft-blue-light: #ebe0cc;
  --soft-blue-wash: #f2e8d5;
  --sand: #f2e8d5;
  --sand-dark: #e6d9bf;
  --denim: #6b5340;
  --denim-dark: #4a3828;
  --clay: #a6553a;
  --clay-dark: #8a4530;
  --earth: #9a5a2e;
  --primary: #2a1810;
  --primary-dark: #1a0e08;
  --primary-glow: transparent;
  --accent: #9a5a2e;
  --accent-dark: #7a4624;
  --accent-glow: transparent;
  --teal: #6b5340;
  --sky: #8a7560;
  --dark: #2a1810;
  --darker: #f2e8d5;
  --gray: #6b5340;
  --muted: #8a7560;
  --text: #3a2a1c;
  --text-muted: #8a7560;
  --heading: #2a1810;
  --card: #faf6ed;
  --card-hover: #f0e6d4;
  --card-solid: #faf6ed;
  --border: #d9c9a8;
  --border-strong: #c9b592;
  --input-bg: #faf6ed;
  --danger: #8b3a32;
  --success: #6b5340;
  --sidebar-width: 228px;
  --radius-lg: 3px;
  --radius-md: 3px;
  --shadow-card: none;
  --shadow-soft: none;
  --horizon-line: #c9b592;
  --wood-dark: #3d2214;
  --wood: #5c3824;
  --wood-mid: #7a4a30;
  --wood-light: #b87848;
  --wood-trim: 4px;
  --wood-grain-base: #452818;
  --wood-grain-size: 360px 64px;
  --wood-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='64' viewBox='0 0 360 64'%3E%3Cdefs%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.011 0.94' numOctaves='5' seed='7' stitchTiles='stitch'/%3E%3C/filter%3E%3Cfilter id='k'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.055 0.16' numOctaves='3' seed='31' stitchTiles='stitch'/%3E%3C/filter%3E%3ClinearGradient id='w' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0%25' stop-color='%23d4a068' stop-opacity='0.32'/%3E%3Cstop offset='42%25' stop-color='%236b4028' stop-opacity='0.06'/%3E%3Cstop offset='100%25' stop-color='%23180c06' stop-opacity='0.22'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='360' height='64' fill='%23452818'/%3E%3Crect width='360' height='64' filter='url(%23g)' opacity='0.65'/%3E%3Crect width='360' height='64' filter='url(%23k)' opacity='0.16'/%3E%3Crect width='360' height='64' fill='url(%23w)'/%3E%3C/svg%3E");
  --font-display: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-serif: var(--font-display);
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.app-bg {
  background-color: var(--cream);
  background-image: radial-gradient(ellipse 130% 70% at 50% -15%, rgba(212, 160, 104, 0.1), transparent 58%);
}

body.app-layout {
  min-height: 100vh;
}

@media (min-width: 1024px) {
  body.app-layout.app-bg {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    align-items: start;
  }
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

[hidden] { display: none !important; }

/* ---- Navigation ---- */
.web-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: var(--card-solid);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

@media (min-width: 1024px) {
  body.app-layout .web-nav {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    height: 100vh;
    position: sticky;
    top: 0;
    padding: 32px 24px 28px;
    border-bottom: none;
    border-right: 1px solid var(--border);
    background: var(--cream);
    box-shadow: none;
  }

  body.app-layout .app-shell {
    width: min(1120px, 100%);
    max-width: min(1120px, 100%);
    margin-inline: auto;
    justify-self: center;
    padding: 20px 22px 36px;
  }

  body.app-layout .nav-toggle {
    display: none;
  }

  body.app-layout .web-nav .links {
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 8px;
  }

  body.app-layout .nav-links-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  body.app-layout .nav-links-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  body.app-layout .web-nav .nav-link {
    padding: 9px 0;
    border: none;
    border-radius: 0;
    background: transparent;
    font-size: 0.92rem;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
  }

  body.app-layout .web-nav .nav-link:hover {
    color: var(--cognac);
    text-decoration: none;
  }

  body.app-layout .web-nav .nav-link.active {
    background: transparent;
    box-shadow: none;
    color: var(--leather);
    font-weight: 600;
    text-decoration: none;
  }

  body.app-layout .web-nav .nav-user {
    max-width: none;
    font-size: 0.8rem;
    padding: 0 4px;
  }
}

.web-nav .brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--leather);
  text-decoration: none;
  white-space: nowrap;
}

.brand-text em {
  display: none;
}

.web-nav .brand:hover { text-decoration: none; }

.brand-icon {
  display: none;
}

.web-nav .links {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links-main,
.nav-links-footer {
  display: contents;
}

.web-nav .nav-link {
  display: block;
  color: var(--gray);
  font-weight: 500;
  font-size: 0.88rem;
  padding: 8px 0;
  border-radius: 0;
  background: transparent;
  text-decoration: none;
  transition: color 0.15s ease;
}

.web-nav .nav-link:hover {
  color: var(--heading);
  background: transparent;
  text-decoration: none;
}

.web-nav .nav-link.active {
  color: var(--leather);
  background: transparent;
  font-weight: 600;
  text-decoration: none;
}

.nav-sign-out {
  display: inline-block;
  padding: 6px 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-strong);
}

.nav-sign-out:hover {
  color: var(--heading);
  text-decoration-color: var(--gray);
}

.web-nav .nav-user {
  color: var(--muted);
  font-size: 0.85rem;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--heading);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* ---- Layout ---- */
.auth-shell {
  max-width: 440px;
  margin: 48px auto;
  padding: 0 20px 48px;
}

.auth-shell .card {
  box-shadow: none;
}

.auth-shell h1 {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.app-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.page-header {
  margin-bottom: 20px;
}

body.app-layout .page-header {
  margin-bottom: 18px;
}

body.app-layout .page-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2vw, 1.75rem);
  margin-bottom: 4px;
  font-weight: 500;
}

body.app-layout .page-header p,
body.app-layout .page-header .subtitle {
  font-size: 0.92rem;
  line-height: 1.5;
}

.page-header h1 {
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 2.8vw, 1.9rem);
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--leather);
  letter-spacing: -0.02em;
}

.page-header p,
.page-header .subtitle {
  color: var(--gray);
  max-width: 640px;
  word-break: break-word;
  font-size: 1.02rem;
  line-height: 1.6;
}

.page-header__brand {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.dashboard-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 1100px) {
  .dashboard-grid--trip {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
  }

  .dashboard-grid--trip .dashboard-grid__full {
    grid-column: 1 / -1;
  }

  .dashboard-grid--trip .card--analysis {
    grid-column: 1 / -1;
  }

  .dashboard-grid--trip .card--partnership {
    grid-column: 1 / -1;
  }

  .dashboard-grid--trip .card--map {
    grid-column: 1;
    grid-row: span 1;
  }

  .dashboard-grid--trip .card--timeline {
    grid-column: 2;
  }

  .dashboard-grid--trip .card--highlights {
    grid-column: 1 / -1;
  }

  .dashboard-grid--trip .card--danger,
  .dashboard-grid--trip .card--edit {
    grid-column: 1 / -1;
    max-width: 420px;
  }
}

.skeleton-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.09) 50%,
    rgba(255, 255, 255, 0.04) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-block {
  height: 14px;
  margin-bottom: 0;
}

.skeleton-block--lg {
  height: 48px;
}

.skeleton-block--btn {
  height: 40px;
  width: 160px;
  border-radius: 10px;
}

.skeleton-map {
  height: 280px;
  width: 100%;
  border-radius: 12px;
}

.dashboard-split {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .dashboard-split {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.dashboard-split .card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dashboard-import-scroll {
  max-height: min(320px, 42vh);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 4px;
  margin-top: 2px;
}

.dashboard-import-scroll::-webkit-scrollbar {
  width: 6px;
}

.dashboard-import-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

.dashboard-import-scroll .import-card:last-child {
  margin-bottom: 0;
}

.dashboard-import-scroll .empty-state {
  padding: 24px 12px;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

/* ---- Cards & forms ---- */
.card {
  background: transparent;
  border-radius: 0;
  padding: 20px 0 0;
  box-shadow: none;
  border: none;
  border-top: 1px solid var(--border);
  transition: none;
}

body.app-layout .card {
  padding: 20px 0 0;
}

.card:hover {
  border-color: var(--border);
}

.card h1 {
  font-family: var(--font-sans);
  font-size: 1.35rem;
  margin-bottom: 8px;
  color: var(--leather);
  font-weight: 600;
}

.card h2 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--leather);
  letter-spacing: -0.01em;
}

.card .subtitle,
.subtitle {
  color: var(--gray);
  margin-bottom: 16px;
  line-height: 1.55;
}

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--gray);
  letter-spacing: 0.02em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font: inherit;
  font-size: 0.95rem;
  background: var(--input-bg);
  color: var(--heading);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--cognac);
  box-shadow: 0 0 0 2px rgba(143, 107, 74, 0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  max-width: 100%;
  padding: 11px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: normal;
  text-transform: none;
  cursor: pointer;
  text-decoration: none;
}

.auth-shell .btn,
.auth-shell form .btn,
.join-shell .btn,
.join-shell form .btn {
  width: 100%;
}

.bucket-form .btn-primary,
.trip-edit-actions .btn,
.form-actions .btn {
  width: auto;
  min-width: 8rem;
}

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

.btn-sm {
  width: auto;
  padding: 9px 16px;
  font-size: 0.86rem;
}

.btn-primary {
  background: linear-gradient(180deg, #5a3826 0%, var(--leather) 45%, var(--leather-dark) 100%);
  color: var(--cream);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(212, 160, 104, 0.22);
  border: 1px solid var(--leather-dark);
  border-radius: var(--radius-md);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, var(--cognac-light) 0%, var(--cognac) 52%, var(--accent-dark) 100%);
  border-color: var(--accent-dark);
  transform: none;
  box-shadow: inset 0 1px 0 rgba(244, 210, 170, 0.28);
  filter: none;
}

.btn-secondary {
  background: var(--card);
  color: var(--heading);
  border: 1px solid var(--border-strong);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--leather);
  color: var(--leather);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-outline:hover:not(:disabled) {
  background: var(--leather);
  border-color: var(--leather);
  color: var(--cream);
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: underline;
}

.link-btn:hover { color: var(--primary-dark); }

.toggle-mode {
  text-align: center;
  margin-top: 20px;
  color: var(--gray);
  font-size: 0.95rem;
}

.error {
  background: #fef2f2;
  color: #991b1b;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  margin-bottom: 16px;
  border: 1px solid #fecaca;
}

.success {
  background: var(--sand-dark);
  color: var(--denim-dark);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.info-banner {
  background: var(--sand-dark);
  border: 1px solid var(--border);
  color: var(--denim-dark);
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: none;
  position: relative;
}

.stat::before {
  display: none;
}

.stat .label { color: var(--muted); font-size: 0.82rem; font-weight: 500; text-transform: none; letter-spacing: normal; }
.stat .value { font-size: 1.5rem; font-weight: 700; margin-top: 6px; color: var(--leather); letter-spacing: normal; }

.stat--icon {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
}

.stat__icon svg {
  width: 22px;
  height: 22px;
}

.stat__icon--credits {
  background: rgba(91, 141, 239, 0.12);
  color: var(--primary);
}

.stat__icon--trips {
  background: rgba(91, 141, 239, 0.12);
  color: var(--primary);
}

.stat__icon--pending {
  background: rgba(148, 163, 184, 0.12);
  color: var(--gray);
}

.paywall-banner {
  background: rgba(91, 141, 239, 0.06);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.paywall-banner strong { display: block; margin-bottom: 4px; }

.list-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.list-item:last-child { border-bottom: none; }

.ingest-tabs {
  display: flex;
  gap: 16px;
  margin: 0 0 18px;
  padding: 0;
  background: transparent;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border);
}

.ingest-tabs__btn {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  padding: 8px 0 10px;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}

.ingest-tabs__btn--active {
  background: transparent;
  color: var(--leather);
  border-bottom-color: var(--cognac);
  box-shadow: none;
}

.ingest-panel[hidden] {
  display: none !important;
}

.booking-meta {
  margin: 10px 0 0;
  display: grid;
  gap: 6px;
}

.booking-meta__row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px;
  align-items: baseline;
}

.booking-meta__row dt {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

.booking-meta__row dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--leather);
  word-break: break-word;
}

.booking-meta__copy {
  margin-top: 8px;
}

.booking-meta-wrap {
  margin-top: 10px;
}

.import-card__body .booking-meta {
  margin: 8px 0 4px;
}

.mono,
.copy-row {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88rem;
  background: var(--cream-dark);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  word-break: break-all;
  border: 1px solid var(--border);
  color: var(--leather);
}

.copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.copy-row code {
  flex: 1;
  font-family: inherit;
  font-size: inherit;
}

.stat-row--compact {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.card--ai {
  border-color: var(--border);
  background: var(--card);
}

.dashboard-grid__full {
  grid-column: 1 / -1;
}

.card--analysis .trip-analysis__intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.trip-analysis__credits {
  font-size: 0.92rem;
  margin: 0;
}

.trip-analysis__loading {
  color: var(--muted);
  padding: 8px 0;
}

.trip-analysis__empty {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.trip-analysis__results {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.trip-analysis__score-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

.trip-analysis__score {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 3px solid currentColor;
  flex-shrink: 0;
}

.trip-analysis__score--good { color: var(--soft-blue-deep); background: var(--soft-blue-light); }
.trip-analysis__score--fair { color: var(--gray); background: rgba(148, 163, 184, 0.1); }
.trip-analysis__score--warn { color: #fb923c; background: rgba(251, 146, 60, 0.12); }
.trip-analysis__score--poor { color: #f87171; background: rgba(248, 113, 113, 0.12); }

.trip-analysis__grade {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
}

.trip-analysis__score-num {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
}

.trip-analysis__score-label {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 4px;
}

.trip-analysis__all-clear {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--soft-blue-light);
  border: 1px solid var(--border);
  color: var(--soft-blue-deep);
}

.trip-analysis__section h3 {
  font-size: 1rem;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.trip-analysis__count {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--soft-blue-light);
  color: var(--muted);
}

.trip-analysis__gaps,
.trip-analysis__bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trip-analysis__gap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trip-analysis__gap-body {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.trip-analysis__gap--hotel,
.trip-analysis__gap--flight,
.trip-analysis__gap--empty {
  border-left: var(--wood-trim) solid var(--wood-mid);
}

.card--partnership {
  border-color: var(--border);
}

.card--partnership[open] .trip-analysis-summary,
.card--analysis[open] .trip-analysis-summary {
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  padding-bottom: 12px;
}

.card--partnership .trip-panel-scroll--compact {
  max-height: 280px;
}

.trip-partnership__intro {
  margin: 0 0 16px;
  font-size: 0.88rem;
}

.trip-partnership__clear {
  margin: 0;
  padding: 12px 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.trip-partnership__group + .trip-partnership__group {
  margin-top: 18px;
}

.trip-partnership__group-title {
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.trip-partnership__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.trip-panel-scroll {
  max-height: min(320px, 42vh);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.trip-panel-scroll--compact {
  max-height: min(260px, 34vh);
}

.trip-panel-scroll::-webkit-scrollbar {
  width: 6px;
}

.trip-panel-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

.card--timeline {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.card--timeline .trip-panel-scroll {
  flex: 1;
  min-height: 0;
  max-height: min(480px, 56vh);
}

.card--map {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.card--map .trip-map {
  flex: 1;
  min-height: 220px;
  max-height: min(480px, 56vh);
  height: auto;
}

.trip-partnership__item {
  padding: 14px 0;
  border-radius: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  position: relative;
  padding-left: 14px;
}

.trip-partnership__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: var(--wood-trim);
}

.trip-partnership__item--hotel,
.trip-partnership__item--flight,
.trip-partnership__item--activity {
  border-left: none;
}

.trip-partnership__item-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.trip-partnership__icon {
  flex-shrink: 0;
  font-size: 1.1rem;
}

.trip-partnership__desc {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
}

.trip-partnership__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 4px;
}

.trip-partnership__link {
  display: inline;
  padding: 0;
  border: none;
  background: none;
  border-radius: 0;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--cognac);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-transform: none;
  letter-spacing: normal;
}

.trip-partnership__link:hover {
  color: var(--leather);
  background: none;
}

.trip-analysis__gap-icon {
  flex-shrink: 0;
}

.trip-analysis__bullets li {
  padding: 8px 0 8px 16px;
  position: relative;
  border-bottom: 1px solid var(--border);
  font-size: 0.94rem;
  color: var(--text);
}

.trip-analysis__bullets li:last-child { border-bottom: none; }

.trip-analysis__bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
}

.trip-analysis__error { margin-bottom: 12px; }

.card--trips {
  border-color: var(--border);
  background: var(--card);
}

.card--email {
  border-color: var(--border);
}

.card--map {
  border-color: var(--border);
}

.card--highlights {
  border-color: var(--border);
  background: var(--card);
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.highlight-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  position: relative;
}

.highlight-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.highlight-card__media {
  aspect-ratio: 16 / 10;
  background: var(--soft-blue-light);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.highlight-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.highlight-card__media--loading {
  background: var(--soft-blue-light);
}

.highlight-card__placeholder {
  font-size: 2rem;
  opacity: 0.7;
}

.highlight-card__body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.highlight-card__title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.35;
}

.highlight-card__location {
  margin: 0;
  font-size: 0.8rem;
  color: var(--soft-blue-deep);
  font-weight: 600;
}

.highlight-card__desc {
  margin: 0;
  font-size: 0.82rem;
  color: var(--gray);
  line-height: 1.45;
}

.highlights-panel {
  margin-top: 4px;
}

.highlights-panel__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  list-style: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--heading);
  user-select: none;
}

.highlights-panel__summary::-webkit-details-marker {
  display: none;
}

.highlights-panel[open] .highlights-panel__summary {
  margin-bottom: 14px;
  border-bottom-color: var(--border-strong);
}

.highlights-panel__chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.highlights-panel[open] .highlights-panel__chevron {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.highlights-panel__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.highlights-panel__note {
  margin: 0;
  font-size: 0.78rem;
}

.highlights-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.highlights-filter {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--gray);
  border-radius: 0;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.highlights-filter:hover {
  border-color: var(--soft-blue);
  color: var(--soft-blue-deep);
}

.highlights-filter--active {
  border-color: var(--soft-blue-deep);
  background: var(--soft-blue-light);
  color: var(--soft-blue-deep);
}

.highlights-filter__count {
  opacity: 0.75;
  font-weight: 500;
}

.highlight-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.highlight-card__kind {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  color: var(--cognac);
  background: var(--soft-blue-light);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 3px 8px;
}

.highlight-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.highlight-card__book,
.highlight-card__link {
  display: inline;
  padding: 0;
  border: none;
  background: none;
  border-radius: 0;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--cognac);
  text-decoration: underline;
  text-underline-offset: 3px;
  letter-spacing: normal;
  text-transform: none;
}

.highlight-card__book:hover,
.highlight-card__link:hover {
  color: var(--leather);
  background: none;
}

.highlight-card__book--viator,
.highlight-card__book--gyg {
  background: none;
  color: var(--cognac);
}

.card--form .subtitle {
  margin-top: -8px;
  margin-bottom: 12px;
}

.card--form .section-head--compact {
  margin-bottom: 8px;
}

.section-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.section-head h2 {
  margin-bottom: 4px;
}

.section-head .subtitle {
  margin-bottom: 0;
}

.section-head--compact {
  align-items: center;
  margin-bottom: 14px;
}

.section-head--compact h2 {
  margin: 0;
}

.icon-chip {
  display: none;
}

.icon-chip svg {
  width: 18px;
  height: 18px;
}

.icon-chip--brand {
  background: rgba(91, 141, 239, 0.1);
  color: var(--primary);
  box-shadow: none;
}

.icon-chip--blue {
  background: rgba(91, 141, 239, 0.1);
  color: var(--primary);
}

.icon-chip--amber {
  background: rgba(148, 163, 184, 0.1);
  color: var(--gray);
}

.icon-chip--green {
  background: var(--soft-blue-light);
  color: var(--soft-blue-deep);
}

.email-hero {
  text-align: center;
  margin-bottom: 8px;
}

.email-hero__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(91, 141, 239, 0.1);
  color: var(--primary);
  margin-bottom: 12px;
}

.email-hero__icon svg {
  width: 34px;
  height: 34px;
}

.email-hero h2 {
  margin-bottom: 6px;
}

.field-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray);
  margin: 16px 0 8px;
}

.registered-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--gray);
  margin-top: 12px;
}

.registered-note svg {
  color: var(--success);
  flex-shrink: 0;
}

.bucket-ai-form,
.bucket-form {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.muted {
  color: var(--gray);
  font-size: 0.9rem;
}

.error-inline {
  color: var(--danger);
  font-size: 0.92rem;
  margin: 0;
}

.list-item-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.country-group {
  margin-bottom: 20px;
}

.country-group:last-child {
  margin-bottom: 0;
}

.country-heading {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray);
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.ai-suggestions-panel {
  margin-top: 20px;
}

.ai-suggestion-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.suggestion-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
}

.suggestion-card strong {
  display: block;
  font-size: 1rem;
  color: var(--leather);
  font-weight: 600;
}

.suggestion-card--added {
  opacity: 0.65;
  background: var(--cream-dark);
}

.ai-actions {
  margin-top: 14px;
}

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 12px;
  margin: 16px 0;
  padding: 0;
}

.step {
  display: block;
  padding: 12px 12px 12px 44px;
  background: var(--card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  position: relative;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.5;
}

.step strong { color: var(--leather); font-weight: 600; }

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--leather);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 600;
}

.step p { color: var(--gray); font-size: 0.92rem; margin-top: 6px; }

.import-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.import-row select {
  flex: 1;
  min-width: 160px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: var(--input-bg);
  color: var(--text);
}

.import-row .btn { width: auto; padding: 10px 16px; font-size: 0.9rem; }

.trip-grid {
  display: grid;
  gap: 12px;
}

.trip-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  background: transparent;
  border-radius: 0;
  padding: 16px 0;
  border: none;
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  transition: none;
}

.trip-card:hover {
  background: transparent;
  border-color: var(--border);
  box-shadow: none;
  transform: none;
}

.trip-card__icon {
  display: none;
}

.trip-card__title {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  color: var(--leather);
}

.trip-card__code {
  font-size: 0.82rem;
  color: var(--gray);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--gray);
  margin: 4px 0 0;
  word-break: break-word;
}

.meta-row__icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--gray);
}

.meta-row__icon--pin {
  color: #ef4444;
}

.meta-row__icon svg {
  width: 16px;
  height: 16px;
}

.trip-card__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  align-self: center;
}

.trip-card__cta {
  align-self: center;
  white-space: nowrap;
}

.trip-card__delete {
  color: rgba(252, 165, 165, 0.9);
  border-color: rgba(239, 68, 68, 0.35);
}

.trip-card__delete:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.55);
  color: #fecaca;
}

.inbound-source-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.app-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.app-modal[hidden],
.inbound-source-modal[hidden] {
  display: none !important;
}

.app-modal__backdrop,
.inbound-source-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(4px);
}

.app-modal__panel,
.inbound-source-modal__panel {
  position: relative;
  width: min(760px, 100%);
  max-height: min(86vh, 900px);
  display: flex;
  flex-direction: column;
  background: var(--card-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.app-modal__panel--sm {
  width: min(420px, 100%);
}

.app-modal__head,
.inbound-source-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.app-modal__head h3,
.inbound-source-modal__head h3 {
  margin: 0 0 4px;
  color: var(--leather);
  font-size: 1.05rem;
  font-weight: 600;
}

.app-modal__body,
.inbound-source-modal__body {
  padding: 16px 18px 18px;
  overflow: auto;
}

.app-modal .bucket-form {
  gap: 10px;
}

.app-modal .field {
  margin-bottom: 10px;
}

.app-modal .field input {
  padding: 10px 12px;
  font-size: 0.95rem;
}

.app-modal .trip-edit-actions {
  margin-top: 4px;
  padding-top: 4px;
}

.inbound-source-modal__files + .inbound-source-modal__message,
.inbound-source-modal__files + .muted {
  margin-top: 16px;
}

.inbound-source-modal__files h4,
.inbound-source-modal__message h4 {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.inbound-source-modal__file-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inbound-source-modal__pre {
  margin: 0;
  padding: 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 420px;
  overflow: auto;
}

.import-source-actions {
  margin: 8px 0 10px;
}

.card--danger {
  border-color: rgba(239, 68, 68, 0.22);
}

.card--edit {
  max-width: 420px;
  padding: 0;
  overflow: hidden;
  align-self: start;
}

.card--edit[open] {
  padding-bottom: 4px;
}

.trip-edit-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--leather);
  user-select: none;
}

.trip-edit-summary::-webkit-details-marker {
  display: none;
}

.trip-edit-summary::after {
  content: "▸";
  color: var(--gray);
  transition: transform 0.15s ease;
}

.card--edit[open] .trip-edit-summary::after {
  transform: rotate(90deg);
}

.card--edit .bucket-form {
  padding: 0 16px 14px;
  margin-top: 0;
  gap: 10px;
}

.card--edit .field {
  margin-bottom: 10px;
}

.card--edit .field input {
  padding: 9px 12px;
  font-size: 0.95rem;
}

.trip-edit-drawer {
  max-width: 420px;
  margin-bottom: 16px;
}

.trip-edit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.trip-edit-delete {
  color: rgba(252, 165, 165, 0.9);
  border-color: rgba(239, 68, 68, 0.35);
  margin-left: auto;
}

.trip-edit-delete:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.55);
  color: #fecaca;
}

.import-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: none;
  margin-bottom: 10px;
  color: var(--text);
}

.import-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  font-size: 1.25rem;
  flex-shrink: 0;
  background: var(--cream-dark);
}

.import-card--blue .import-card__icon { background: var(--cream-dark); }
.import-card--purple .import-card__icon { background: var(--cream-dark); }
.import-card--green .import-card__icon { background: var(--cream-dark); }

.import-card__title {
  display: block;
  margin: 6px 0 2px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--leather);
}

.import-booking-summary {
  margin: 6px 0 10px;
  font-size: 0.92rem;
  color: var(--text);
}

.import-card:last-child {
  margin-bottom: 0;
}

.import-card__icon--brand {
  background: #fff !important;
  padding: 4px;
}

.import-card__icon--brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.import-hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.empty-state {
  text-align: center;
  padding: 28px 16px;
  color: var(--gray);
}

.empty-state__icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 10px;
}

.empty-state strong {
  display: block;
  color: var(--leather);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 0.92rem;
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.5;
}

.trip-map--compact {
  height: min(360px, 42vh);
  min-height: 260px;
}

.card--timeline {
  min-height: 0;
}

.card--map {
  min-height: 0;
}

.trip-page-stable #trip-analysis-root {
  min-height: 100px;
}

.trip-page-stable #trip-partnership-root {
  min-height: 0;
}

.trip-page-stable #timeline-list {
  min-height: 0;
}

.trip-page-stable #trip-map {
  min-height: 220px;
}

.card--highlights {
  padding: 18px 20px;
}

.card--highlights .section-head--compact {
  margin-bottom: 10px;
}

.highlights-panel__summary {
  padding: 8px 12px;
}

.web-nav[data-mounted="true"] {
  min-height: 56px;
}

@media (min-width: 1024px) {
  body.app-layout .web-nav[data-mounted="true"] {
    min-height: 100vh;
  }
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.timeline-date {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  color: var(--muted);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.timeline-day + .timeline-day {
  margin-top: 24px;
}

.timeline-day__items {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: block;
  padding: 14px 0;
  border-radius: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
}

.timeline-item__top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.timeline-item__top-main {
  flex: 1;
  min-width: 0;
}

.timeline-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.timeline-item__meta-sep {
  color: var(--border-strong);
  font-size: 0.82rem;
}

.timeline-item__subtitle {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.45;
}

.timeline-item__media {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  overflow: hidden;
  background: var(--cream-dark);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.timeline-item__media--brand {
  background: #fff;
  border-color: var(--border);
}

.timeline-item__media--brand img {
  object-fit: contain;
  padding: 8px;
}

.timeline-item__icon-fallback {
  font-size: 1.6rem;
  line-height: 1;
}

.timeline-item--activity .timeline-item__media--loading {
  background: var(--soft-blue-light);
}

.timeline-item--hotel .timeline-item__media--loading {
  background: var(--soft-blue-light);
}

.timeline-item--transport .timeline-item__media--loading {
  background: var(--soft-blue-light);
}

.timeline-item__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 0;
  flex-shrink: 0;
  background: var(--soft-blue-light);
  border: 1px solid var(--border);
}

.timeline-item__icon-wrap--activity,
.timeline-item__icon-wrap--hotel,
.timeline-item__icon-wrap--transport {
  background: var(--soft-blue-light);
}

.timeline-item__icon {
  font-size: 1.2rem;
  line-height: 1;
}

.timeline-item__body {
  flex: 1;
  min-width: 0;
}

.timeline-item__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.timeline-type {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--cognac);
}

.timeline-type--activity,
.timeline-type--hotel,
.timeline-type--transport,
.timeline-type--car,
.timeline-type--train,
.timeline-type--bus {
  background: transparent;
  color: var(--muted);
}

.timeline-item__head-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.timeline-item__delete {
  flex-shrink: 0;
  align-self: flex-start;
  margin-left: auto;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.timeline-item__delete:hover:not(:disabled) {
  background: transparent;
  border-color: var(--cognac);
  color: var(--cognac);
}

.timeline-item__delete:disabled {
  opacity: 0.55;
  cursor: wait;
}

.timeline-time {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
}

.timeline-item__title {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--leather);
  margin: 0 0 4px;
  line-height: 1.3;
}

.timeline-item__location {
  display: none;
}

.timeline-item__details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px 20px;
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.timeline-item__subtitle + .timeline-item__details {
  border-top: none;
  padding-top: 0;
  margin-top: 8px;
}

.timeline-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.84rem;
}

.timeline-detail dt {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.timeline-detail dd {
  margin: 0;
  color: var(--heading);
  font-weight: 500;
}

.timeline-item__notes {
  font-size: 0.86rem;
  color: var(--gray);
  line-height: 1.55;
  margin: 0;
}

.timeline-item__notes--inline {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.timeline-item__notes-panel {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.timeline-item__notes-panel summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  user-select: none;
  list-style: none;
}

.timeline-item__notes-panel summary::-webkit-details-marker {
  display: none;
}

.timeline-item__notes-panel summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s ease;
}

.timeline-item__notes-panel[open] summary::before {
  transform: rotate(90deg);
}

.timeline-item__notes-panel .timeline-item__notes {
  margin-top: 8px;
  max-height: 240px;
  overflow-y: auto;
}

.timeline-item__link {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.timeline-item__link:hover {
  text-decoration: underline;
}

.card--timeline {
  border-color: var(--border);
}

@media (max-width: 640px) {
  .field-row {
    grid-template-columns: 1fr;
  }

  .trip-card {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .trip-card__actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .trip-card__cta {
    flex: 1;
    min-width: 140px;
    text-align: center;
  }

  .trip-card__delete {
    flex: 1;
    min-width: 100px;
  }

  .page-header__brand {
    flex-direction: column;
    gap: 10px;
  }
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge--pending { background: var(--cream-dark); color: var(--muted); }
.badge--imported { background: var(--cream-dark); color: var(--cognac); }
.badge--owner { background: var(--cream-dark); color: var(--cognac); }
.badge--member { background: var(--cream-dark); color: var(--muted); }
.badge--past { background: var(--cream-dark); color: var(--muted); }
.badge--current { background: rgba(143, 107, 74, 0.12); color: var(--cognac-dark); }
.badge--upcoming { background: var(--cream-dark); color: var(--cognac); }

.trip-map--global {
  height: min(320px, 38vh);
  min-height: 220px;
}

.card--trips #trips-list {
  max-height: min(420px, 46vh);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.card--trips #trips-list::-webkit-scrollbar {
  width: 6px;
}

.card--trips #trips-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

.dashboard-split .card #imports-list,
.dashboard-import-scroll {
  max-height: min(320px, 42vh);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.dashboard-split .card #imports-list::-webkit-scrollbar,
.dashboard-import-scroll::-webkit-scrollbar {
  width: 6px;
}

.dashboard-split .card #imports-list::-webkit-scrollbar-thumb,
.dashboard-import-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

.trip-map-popup__rating {
  margin: 4px 0 6px;
  font-size: 0.82rem;
  color: var(--gray);
  font-weight: 600;
}

.travel-passport {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--card);
}

.travel-passport--empty {
  padding: 14px;
  margin-bottom: 12px;
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.travel-passport__score-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(148, 163, 184, 0.15);
  box-shadow: none;
}

.travel-passport__score {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-solid);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.travel-passport__tier {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--leather);
}

.travel-passport__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  font-size: 0.88rem;
  color: var(--text);
}

.travel-passport__stats strong {
  color: var(--leather);
  font-weight: 600;
}

.travel-passport--compact {
  padding: 12px 14px;
  margin-bottom: 12px;
}

.travel-passport--compact .travel-passport__score-ring {
  width: 56px;
  height: 56px;
}

.travel-passport--compact .travel-passport__score {
  width: 44px;
  height: 44px;
  font-size: 1.05rem;
}

.travel-passport__subtitle {
  margin: 2px 0 8px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.travel-passport__countries {
  margin: 8px 0 0;
  font-size: 0.85rem;
}

.trip-rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid var(--border);
}

.trip-rating__score {
  font-weight: 700;
  color: var(--text);
  font-size: 0.92rem;
}

.trip-rating__stars {
  color: var(--gray);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

.ingest-tabs--map {
  max-width: 320px;
  margin-bottom: 12px;
}

#trip-stats .travel-passport {
  margin-bottom: 0;
}

.trip-map {
  height: min(420px, 55vh);
  min-height: 280px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #1e293b;
  position: relative;
}

.trip-map > .trip-map-root {
  height: 100%;
  width: 100%;
  min-height: inherit;
}

.trip-map-root .leaflet-container {
  width: 100%;
  height: 100%;
  background: #1e293b;
  font-family: inherit;
}

.trip-map .empty-state {
  padding: 48px 16px;
}

.trip-map-pin-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 1.15rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.45));
}

.trip-map-legend__emoji {
  display: inline-block;
  margin-right: 4px;
  font-size: 0.85rem;
  vertical-align: middle;
}

.list-item--highlight {
  animation: list-item-flash 1.8s ease;
}

@keyframes list-item-flash {
  0%,
  100% {
    background: transparent;
  }
  20%,
  60% {
    background: rgba(236, 72, 153, 0.12);
    border-radius: 10px;
  }
}

.bucket-layout {
  align-items: start;
}

.bucket-map-card {
  border-color: var(--border);
}

.bucket-forward-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 768px) {
  .bucket-forward-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.bucket-forward-block {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--card);
}

.bucket-forward-block__title {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--leather);
}

.bucket-forward-block .field-label {
  margin-top: 12px;
  margin-bottom: 6px;
}

#travel-passport .travel-passport {
  margin-bottom: 0;
}

@media (min-width: 1024px) {
  .bucket-layout .card--ai,
  .bucket-layout .card:not(.card--map):not(.dashboard-grid__full) {
    grid-column: span 1;
  }
}

.trip-map-pin {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.35);
}

.trip-map-legend {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 500;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.trip-map-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.trip-map-note {
  margin-top: 10px;
  font-size: 0.85rem;
}

.trip-map-popup strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.trip-map-popup__status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray);
  margin-bottom: 6px;
}

.trip-map-popup__kind {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--soft-blue-deep);
  margin-bottom: 6px;
}

.trip-map-popup p {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--gray);
}

.trip-card--highlight {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.app-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: white;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 0.92rem;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  max-width: min(90vw, 420px);
}

.app-toast--success { background: #166534; }
.app-toast--error { background: #991b1b; }

.ad-slot { display: none; }

/* ---- Trips page ---- */
.app-shell--wide {
  max-width: 1180px;
}

.page-header--trips {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.page-header--trip .page-header__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.page-header--trip .page-header__main {
  min-width: 0;
  flex: 1 1 240px;
}

.trip-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.trip-publish-form {
  display: grid;
  gap: 14px;
}

.trip-publish-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  cursor: pointer;
}

.trip-publish-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.trip-publish-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trip-publish-note {
  font-size: 0.88rem;
  margin: 0;
}

.trip-recap-link {
  font-size: 0.85rem;
  word-break: break-all;
}

.trip-published-review__label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray);
  margin-bottom: 8px;
}

.trip-published-review__body {
  font-size: 1rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.trip-published-review--public .trip-published-review__body {
  font-size: 1.05rem;
}

.trip-analysis-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 600;
  color: var(--leather);
  list-style: none;
  padding: 4px 0 12px;
}

.trip-analysis-summary::-webkit-details-marker {
  display: none;
}

.card--analysis[open] .trip-analysis-summary {
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  margin-bottom: 14px;
}

.app-shell--narrow {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.recap-footer {
  margin-top: 20px;
  font-size: 0.88rem;
}

.trips-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trips-hero {
  margin-bottom: 24px;
}

.trips-hero__inner {
  display: grid;
  gap: 14px;
}

.trips-hero__inner .travel-passport {
  margin-bottom: 0;
}

.trips-hero__inner .trips-stats {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .trips-hero__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 16px;
  }

  .trips-hero__inner .trips-stats {
    min-width: 240px;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

.trips-stats {
  margin-bottom: 0;
}

.stat--pill {
  text-align: center;
}

.stat--pill.stat--current { border-color: rgba(91, 141, 239, 0.25); }
.stat--pill.stat--upcoming { border-color: var(--border-strong); }
.stat--pill.stat--past { border-color: var(--border); }

.trips-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.trips-layout__panel {
  width: 100%;
  max-width: 480px;
}

.trips-layout__panel .bucket-form .btn-primary {
  width: auto;
}

.page-header--trips {
  margin-bottom: 16px;
}

.page-header--trips .page-header__row,
.page-header--trip .page-header__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.trip-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.trips-body {
  display: grid;
  gap: 20px;
  align-items: start;
}

.trips-body__list {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.trips-body__map {
  min-width: 0;
}

.trips-map-card {
  margin: 0;
  height: fit-content;
}

.trip-map--trips-sidebar {
  height: min(360px, 52vh);
  min-height: 240px;
}

@media (min-width: 1024px) {
  .trips-body {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    gap: 24px;
  }

  .trips-body__map {
    position: sticky;
    top: 16px;
  }

  .trip-map--trips-sidebar {
    height: min(420px, calc(100vh - 200px));
    min-height: 280px;
  }
}

.trips-sections {
  display: grid;
  gap: 18px;
}

.trips-hero__inner .stat-row--compact {
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 10px;
}

@media (min-width: 768px) {
  .trips-hero__inner .stat-row--compact {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .trips-hero__inner .stat--pill {
    padding: 10px 14px;
  }
}

.trips-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

.trips-section__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.trips-section__head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--leather);
}

.trips-section__count {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--cream-dark);
  padding: 2px 8px;
  border-radius: 999px;
}

.trip-card--rich {
  grid-template-columns: auto 1fr auto;
}

.trip-card__emoji {
  font-size: 1.35rem;
  line-height: 1;
}

.trip-card__meta {
  font-size: 0.88rem;
  color: var(--gray);
  margin: 4px 0 0;
  line-height: 1.45;
}

.trip-card--rich {
  grid-template-columns: auto 1fr auto;
}

.trip-card__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  flex-shrink: 0;
}

.trip-card__icon-wrap--current {
  background: rgba(143, 107, 74, 0.12);
}

.trip-card__icon-wrap--upcoming {
  background: var(--cream-dark);
}

.trip-card__icon-wrap--past,
.trip-card__icon-wrap--unknown {
  background: var(--cream-dark);
}

.trip-card__meta--dates {
  color: var(--muted);
}

.trips-empty {
  text-align: center;
  padding: 32px 20px;
}

.section-head .panel-close {
  margin-left: auto;
  font-size: 0.85rem;
}

.new-trip-inline {
  margin: 12px 0;
  padding: 14px;
  border-radius: 0;
  background: var(--soft-blue-light);
  border: 1px dashed var(--border-strong);
}

.import-assign {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.import-assign select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: var(--input-bg);
  color: var(--text);
}

.import-assign .import-btn {
  width: auto;
  justify-self: start;
}

.import-card__toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.import-edit {
  margin: 0 0 12px;
  padding: 12px;
  border-radius: 0;
  border: 1px solid var(--border);
  background: var(--soft-blue-light);
}

.import-edit__title {
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.import-edit__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.field--compact label {
  font-size: 0.78rem;
}

.field--compact input,
.field--compact select {
  padding: 8px 10px;
  font-size: 0.88rem;
}

.import-edit__actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

@media (min-width: 1100px) {
  .dashboard-grid--dashboard {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .dashboard-grid--dashboard > .paywall-banner,
  .dashboard-grid--dashboard > .card--map,
  .dashboard-grid--dashboard > .dashboard-split {
    grid-column: 1 / -1;
  }

  .dashboard-grid--dashboard > .card--trips {
    grid-column: 1;
  }

  .dashboard-grid--dashboard > .card--email {
    grid-column: 2;
  }
}

@media (max-width: 768px) {
  .web-nav { padding: 12px 16px; flex-wrap: wrap; }

  .nav-toggle { display: inline-flex; margin-left: auto; }

  .web-nav .links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 8px;
    gap: 12px;
  }

  .nav-links-main,
  .nav-links-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .web-nav .links.open { display: flex; }

  .web-nav .nav-link,
  .web-nav .btn { width: 100%; text-align: center; justify-content: center; }

  .web-nav .nav-user {
    max-width: none;
    text-align: center;
    padding: 4px 0;
  }

  .paywall-banner { flex-direction: column; align-items: stretch; }
  .copy-row { flex-direction: column; align-items: stretch; }

  .page-header--trips {
    flex-direction: column;
  }

  .trips-toolbar {
    width: 100%;
  }

  .trips-toolbar .btn {
    flex: 1;
  }
}

/* ---- Horizon: focus trip hero (retention) ---- */
.trip-focus-hero-wrap {
  margin-bottom: 22px;
}

.trip-focus-hero {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 22px;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.trip-focus-hero__glow {
  display: none;
}

.trip-focus-hero__eyebrow {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.trip-focus-hero__body {
  flex: 1 1 240px;
  min-width: 0;
}

.trip-focus-hero__title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: normal;
  color: var(--leather);
}

.trip-focus-hero__place {
  margin: 0 0 4px;
  font-size: 1rem;
  color: var(--gray);
}

.trip-focus-hero__dates {
  margin: 0 0 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

.trip-focus-hero__hint {
  margin: 0;
  font-size: 0.92rem;
  color: var(--gray);
}

.trip-focus-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}

.trip-focus-hero--empty .trip-focus-hero__title {
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
}

.card--map {
  position: relative;
  overflow: hidden;
}

.card--map::before {
  display: none;
}

@media (max-width: 640px) {
  .trip-focus-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .trip-focus-hero__actions .btn {
    width: 100%;
  }
}

/* ---- Dashboard compact ---- */
.page-header--compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.page-header--compact h1 {
  margin: 0;
  font-size: 1.5rem;
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.01em;
}

.dashboard-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 0.88rem;
  color: var(--gray);
}

.dashboard-meta__stat .label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-right: 4px;
}

.dashboard-meta__stat strong {
  color: var(--text);
  font-weight: 700;
}

.paywall-banner--slim {
  padding: 10px 14px;
  margin-bottom: 0;
  gap: 12px;
  font-size: 0.88rem;
}

.paywall-banner--slim .paywall-banner__text {
  flex: 1;
  min-width: 0;
}

.paywall-banner--slim strong {
  display: inline;
  margin-right: 6px;
}

.paywall-banner--slim span {
  color: var(--gray);
}

.section-head--map {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 10px;
}

.section-head--map h2 {
  margin: 0;
  flex: 0 0 auto;
}

.ingest-tabs--inline {
  margin: 0;
  padding: 2px;
  max-width: none;
  flex: 0 0 auto;
}

.ingest-tabs--inline .ingest-tabs__btn {
  flex: 0 0 auto;
  padding: 6px 12px;
  font-size: 0.82rem;
}

.travel-passport--inline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font-size: 0.82rem;
  color: var(--gray);
  flex: 1 1 auto;
  min-width: 0;
}

.travel-passport__score-inline {
  font-weight: 700;
  color: var(--text);
}

.travel-passport__tier-inline {
  color: var(--text);
}

.travel-passport__stats-inline {
  color: var(--muted);
}

.travel-passport-inline:empty {
  display: none;
}

.subtitle--tight {
  margin: -4px 0 12px;
  font-size: 0.88rem;
}

.steps--compact {
  margin: 0 0 14px;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  color: var(--gray);
}

.steps--compact .step {
  margin-bottom: 4px;
}

.steps--compact .step strong {
  color: var(--text);
}

.link-btn--plain {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.link-btn--plain:hover {
  text-decoration: underline;
}

.trip-focus-hero-wrap {
  margin-bottom: 12px;
}

.trip-focus-hero--compact {
  padding: 12px 16px;
  gap: 12px;
  align-items: center;
}

.trip-focus-hero--compact .trip-focus-hero__title {
  font-size: 1.125rem;
  font-weight: 700;
  font-family: var(--font-sans);
  margin: 0 0 2px;
  color: var(--heading);
  letter-spacing: -0.01em;
}

.trip-focus-hero__sep {
  font-weight: 400;
  color: var(--muted);
  margin: 0 0.35em;
}

.trip-focus-hero--compact .trip-focus-hero__place {
  font-weight: 500;
  color: var(--gray);
}

.trip-focus-hero__meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.trip-focus-hero--compact .trip-focus-hero__eyebrow {
  margin: 0 0 2px;
  font-size: 0.68rem;
}

.dashboard-grid--dashboard {
  gap: 12px;
}

body.app-layout .dashboard-grid .card {
  padding: 24px 0 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

body.app-layout .dashboard-grid .card h2,
.section-head--compact h2,
body.app-layout .page-header h1,
.trip-analysis-summary,
.trip-edit-summary,
.auth-shell h1,
.app-modal__head h3,
.timeline-item__title {
  font-family: var(--font-sans);
  font-weight: 600;
}

.import-card,
.import-card__title,
.import-card__body,
.import-card .booking-meta__row dd,
.import-booking-summary {
  color: var(--text);
}

.import-card__title {
  color: var(--leather);
}

.badge {
  text-transform: none;
  letter-spacing: normal;
  font-weight: 600;
  border-radius: var(--radius-md);
}

/* ---- R.M. Williams — heritage tones ---- */
.stat .value { color: var(--leather); }

.paywall-banner {
  background: var(--cream-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.trip-analysis-summary,
.trip-edit-summary {
  color: var(--leather);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  list-style: none;
}

.app-modal__panel,
.inbound-source-modal__panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.app-modal__head h3,
.inbound-source-modal__head h3 {
  color: var(--leather);
  font-family: var(--font-sans);
  font-weight: 600;
}

.badge--owner,
.badge--upcoming,
.badge--member,
.badge--past,
.badge--current {
  background: transparent;
  color: var(--cognac);
  border-radius: 0;
  font-size: 0.78rem;
  letter-spacing: normal;
  text-transform: none;
  padding: 0;
}

.timeline-item strong { color: var(--leather); }

.copy-row code {
  background: var(--cream-dark);
  border: 1px solid var(--border);
  color: var(--leather);
  padding: 10px 12px;
  border-radius: var(--radius-md);
}

.empty-state strong { color: var(--leather); }

.trip-map {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.auth-shell h1 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--leather);
}

.trip-focus-hero__eyebrow {
  color: var(--cognac);
  letter-spacing: normal;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: none;
}

a { color: var(--leather); }
a:hover { color: var(--cognac); }

.link-btn {
  color: var(--cognac);
  font-size: 0.9rem;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-btn:hover { color: var(--leather); }

/* ---- Timeline — warm, readable ---- */
.timeline-item {
  background: transparent;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  padding-left: 0;
  padding-right: 0;
}

.timeline-time {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: normal;
  text-transform: none;
}

.timeline-item__title {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--leather);
}

.timeline-item__meta-sep {
  color: var(--border-strong);
}

.timeline-item__subtitle {
  color: var(--text);
  border-top-color: var(--border);
}

.timeline-item__details {
  border-top-color: var(--border);
}

.timeline-detail dt {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: none;
  letter-spacing: normal;
}

.timeline-detail dd {
  color: var(--leather);
  font-weight: 400;
}

.timeline-type--activity,
.timeline-type--hotel,
.timeline-type--transport,
.timeline-type--train,
.timeline-type--bus {
  background: transparent;
  color: var(--cognac);
}

.timeline-item__delete {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  letter-spacing: normal;
  text-transform: none;
}

.timeline-item__delete:hover:not(:disabled) {
  background: transparent;
  border-color: var(--cognac);
  color: var(--cognac);
}

.timeline-item__media {
  background: var(--cream-dark);
  border-color: var(--border);
  border-radius: var(--radius-md);
}

.trip-map-legend {
  background: rgba(253, 251, 247, 0.96);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
  font-size: 0.78rem;
  letter-spacing: normal;
  text-transform: none;
  border-radius: var(--radius-md);
}

.trip-map-legend i {
  border: 1px solid rgba(61, 42, 31, 0.15);
}

.highlights-filter {
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  letter-spacing: normal;
  text-transform: none;
}

.highlights-filter--active {
  background: var(--leather);
  border-color: var(--leather);
  color: var(--cream);
}

.empty-state__icon {
  display: none;
}

.import-card__icon:empty {
  display: none;
}

.trip-card__emoji,
.trip-card__icon-wrap,
.trip-partnership__icon,
.trip-analysis__gap-icon,
.trip-map-legend__emoji,
.trip-map-pin-emoji,
.highlight-card__placeholder {
  display: none;
}

.import-card:not(:has(.import-card__icon img)) {
  gap: 0;
}

.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: none;
}

/* ---- Wood grain trim — walnut with boot-polish amber sheen ---- */
body.app-layout .web-nav::after,
body.app-layout .web-nav .brand::after,
body.app-layout .nav-links-footer::before,
body.app-layout .page-header::after,
body.app-layout .dashboard-grid .card::before,
.import-card::before,
.trip-card::before,
.trip-focus-hero::after,
.paywall-banner::before,
.stat::before,
.section-head--compact h2::before,
.app-modal__panel::before,
.inbound-source-modal__panel::before,
.highlight-card::before,
.trip-partnership__item::before {
  background-color: var(--wood-grain-base);
  background-image: var(--wood-grain);
  background-repeat: repeat;
  background-size: var(--wood-grain-size);
}

body.app-layout .web-nav::after,
.import-card::before,
.trip-card::before,
.section-head--compact h2::before,
.trip-partnership__item::before {
  background-size: auto 64px;
}

body.app-layout .web-nav {
  position: relative;
}

body.app-layout .web-nav::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 6px;
  pointer-events: none;
}

@media (max-width: 1023px) {
  body.app-layout .web-nav::after {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: 4px;
    background-size: auto 64px;
  }
}

body.app-layout .web-nav .brand {
  padding-bottom: 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

body.app-layout .web-nav .brand::after {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  margin-top: 10px;
}

body.app-layout .nav-links-footer {
  border-top: none;
  padding-top: 18px;
}

body.app-layout .nav-links-footer::before {
  content: "";
  display: block;
  height: 4px;
  margin-bottom: 14px;
}

body.app-layout .page-header {
  position: relative;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

body.app-layout .page-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: min(140px, 42%);
  height: 4px;
}

body.app-layout .dashboard-grid .card {
  position: relative;
  border-top: none;
  padding-top: 22px;
}

body.app-layout .dashboard-grid .card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

body.app-layout .dashboard-grid .card::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

body.app-layout .dashboard-grid > .card:first-child,
body.app-layout .dashboard-grid > .dashboard-grid__full:first-child {
  padding-top: 22px;
}

.import-card {
  position: relative;
  padding-left: 16px;
  border-left: none;
  box-shadow: none;
}

.import-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
}

.trip-card {
  position: relative;
  padding-left: 16px;
  border-left: none;
  box-shadow: none;
}

.trip-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
}

.trip-focus-hero {
  position: relative;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}

.trip-focus-hero::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: min(160px, 50%);
  height: 4px;
}

.paywall-banner {
  border-top: 4px solid transparent;
  border-image: none;
  position: relative;
  padding-top: 18px;
}

.paywall-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.stat {
  position: relative;
  border-top: none;
  padding-top: 14px;
}

.stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.section-head--compact h2 {
  padding-left: 12px;
  border-left: none;
  position: relative;
}

.section-head--compact h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 3px;
}

.trip-map {
  outline: none;
  box-shadow: none;
  border: 1px solid var(--border);
}

.app-modal__panel,
.inbound-source-modal__panel {
  position: relative;
  border-top: none;
  padding-top: 4px;
}

.app-modal__panel::before,
.inbound-source-modal__panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

/* No neon outline pills on trip page actions */
body.app-layout .trip-partnership__link.btn,
body.app-layout .highlight-card__link.btn,
body.app-layout .highlight-card__book.btn {
  all: unset;
  display: inline;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--cognac);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
