/* ==========================================================================
   Dani & Aedan Travel Plans — forest palette
   ========================================================================== */

:root {
  /* Palette */
  --forest: #2f4a3a;
  --forest-deep: #22382b;
  --moss: #5e7b4f;
  --sage: #a3b18a;
  --fern: #dde5d0;
  --cream: #f7f2e8;
  --beige: #ede4d3;
  --sand: #d9c8a9;
  --bark: #6b4f3a;
  --bark-deep: #3e2c20;
  --clay: #b0744c;

  /* Semantic */
  --bg: #f1eadc;
  --surface: #fffcf6;
  --surface-2: #f7f2e8;
  --surface-3: #efe7d8;
  --text: #2a2b23;
  --text-muted: #6f675a;
  --border: rgba(62, 44, 32, 0.12);
  --border-strong: rgba(62, 44, 32, 0.22);
  --primary: var(--forest);
  --primary-hover: var(--forest-deep);
  --on-primary: var(--cream);
  --accent: var(--moss);
  --focus: rgba(94, 123, 79, 0.45);
  --danger: #a5462f;
  --danger-soft: rgba(165, 70, 47, 0.1);

  --pill-idea-bg: #e6ecd9;
  --pill-idea-fg: #4c6340;
  --pill-planned-bg: #efe2cb;
  --pill-planned-fg: #7a5636;
  --pill-booked-bg: var(--forest);
  --pill-booked-fg: var(--cream);

  --sky-a: #ece5d3;
  --sky-b: #dfe5d0;
  --scene-sun: #e8d6b4;
  --scene-far: #c8d2b6;
  --scene-snow: #fbf8f1;
  --scene-mid: #a3b18a;
  --scene-pine-back: #7d966f;
  --scene-near: #5e7b4f;
  --scene-pine: #2f4a3a;

  --shadow-sm: 0 1px 2px rgba(62, 44, 32, 0.06), 0 2px 6px rgba(47, 74, 58, 0.05);
  --shadow-md: 0 1px 2px rgba(62, 44, 32, 0.06), 0 8px 24px rgba(47, 74, 58, 0.1);
  --shadow-lg: 0 2px 4px rgba(62, 44, 32, 0.06), 0 18px 48px rgba(47, 74, 58, 0.16);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --topbar-h: 68px;
  --page-w: 1120px;
  --gutter: 24px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121a15;
    --surface: #1b251f;
    --surface-2: #212d25;
    --surface-3: #28362d;
    --text: #ece5d5;
    --text-muted: #a8a491;
    --border: rgba(237, 228, 211, 0.09);
    --border-strong: rgba(237, 228, 211, 0.18);
    --primary: #a3b18a;
    --primary-hover: #b8c4a1;
    --on-primary: #16201a;
    --accent: #a3b18a;
    --focus: rgba(163, 177, 138, 0.45);
    --danger: #e08a70;
    --danger-soft: rgba(224, 138, 112, 0.12);

    --pill-idea-bg: rgba(163, 177, 138, 0.16);
    --pill-idea-fg: #c1cda9;
    --pill-planned-bg: rgba(217, 200, 169, 0.14);
    --pill-planned-fg: #e2cfaa;
    --pill-booked-bg: #a3b18a;
    --pill-booked-fg: #16201a;

    --sky-a: #1d2a22;
    --sky-b: #172119;
    --scene-sun: #e9dfc7;
    --scene-far: #2b3a30;
    --scene-snow: #6b7a6c;
    --scene-mid: #31443a;
    --scene-pine-back: #243329;
    --scene-near: #1d2b22;
    --scene-pine: #111a14;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 18px 48px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 100% -10%, rgba(163, 177, 138, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(217, 200, 169, 0.22), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.24 0 0 0 0 0.17 0 0 0 0 0.12 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
}

img {
  max-width: 100%;
  display: block;
}

code {
  font-size: 0.88em;
  background: var(--surface-3);
  padding: 1px 6px;
  border-radius: 6px;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ico {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  vertical-align: -0.2em;
}

.muted {
  color: var(--text-muted);
}

.dot {
  color: var(--text-muted);
  opacity: 0.6;
  margin: 0 2px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

/* ---------- Boot ---------- */

.boot {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-style: italic;
  text-align: center;
  padding: 24px;
}

.boot__leaf {
  width: 46px;
  height: 46px;
  border-radius: 50% 0;
  background: linear-gradient(135deg, var(--sage), var(--moss));
  animation: sway 1.6s ease-in-out infinite;
}

@keyframes sway {
  0%,
  100% {
    transform: rotate(-12deg);
  }
  50% {
    transform: rotate(12deg) scale(1.05);
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.1s, border-color 0.15s;
  color: var(--text);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: progress;
}

.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 1px 2px rgba(34, 56, 43, 0.25), 0 6px 16px rgba(47, 74, 58, 0.22);
}

.btn--primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn--ghost {
  color: var(--text-muted);
}

.btn--ghost:hover {
  background: var(--surface-3);
  color: var(--text);
}

.btn--soft {
  background: var(--pill-idea-bg);
  color: var(--pill-idea-fg);
}

.btn--soft:hover {
  background: var(--fern);
}

@media (prefers-color-scheme: dark) {
  .btn--soft:hover {
    background: rgba(163, 177, 138, 0.26);
  }
}

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

.btn--danger-ghost {
  color: var(--danger);
}

.btn--danger-ghost:hover {
  background: var(--danger-soft);
}

.btn--glass {
  background: rgba(255, 252, 246, 0.82);
  color: #2a2b23;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.btn--glass:hover {
  background: #fffcf6;
}

.btn--sm {
  min-height: 34px;
  padding: 0 14px;
  font-size: 13.5px;
}

.btn--block {
  width: 100%;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex: none;
}

.icon-btn:hover:not(:disabled) {
  background: var(--surface-3);
  color: var(--text);
}

.icon-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.icon-btn--sm {
  width: 32px;
  height: 32px;
}

.icon-btn--sm .ico {
  width: 16px;
  height: 16px;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  padding: 4px 0;
  background: none;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

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

/* ---------- Inputs ---------- */

.input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

.input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus);
}

textarea.input {
  resize: vertical;
  min-height: 80px;
  line-height: 1.55;
}

.input--lg {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
}

.input--invalid,
.field--invalid .input {
  border-color: var(--danger);
}

.select {
  position: relative;
  display: block;
}

.select .input {
  padding-right: 38px;
  cursor: pointer;
}

.select > .ico {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
}

.select--sm .input {
  min-height: 40px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  padding-left: 16px;
}

input[type='date'].input,
input[type='datetime-local'].input,
input[type='time'].input {
  min-width: 0;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 max(var(--gutter), calc((100vw - var(--page-w)) / 2));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--moss), var(--forest));
  color: var(--cream);
  box-shadow: 0 4px 14px rgba(47, 74, 58, 0.3);
  flex: none;
}

.brand__mark .ico {
  width: 22px;
  height: 22px;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}

.brand__names {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand__sub {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
}

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

.cur-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border);
}

.cur-switch__btn {
  border: 0;
  background: transparent;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.cur-switch__btn[aria-checked='true'] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.menu {
  position: relative;
}

.menu__pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 260px;
  padding: 8px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 40;
}

.menu__info {
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 6px 10px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
}

.menu__item:hover {
  background: var(--surface-3);
}

.demo-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  background: var(--pill-planned-bg);
  color: var(--pill-planned-fg);
  text-align: center;
}

/* ---------- Page ---------- */

.main {
  padding: 0 var(--gutter) 80px;
}

.page {
  max-width: var(--page-w);
  margin: 0 auto;
}

/* ---------- Scene illustration ---------- */

.scene {
  display: block;
  width: 100%;
  height: 100%;
}

.scene__sun {
  fill: var(--scene-sun);
  opacity: 0.85;
}
.scene__far {
  fill: var(--scene-far);
}
.scene__snow {
  fill: var(--scene-snow);
  opacity: 0.9;
}
.scene__mid {
  fill: var(--scene-mid);
}
.scene__pine-back {
  fill: var(--scene-pine-back);
}
.scene__near {
  fill: var(--scene-near);
}
.scene__pine,
.scene__ground {
  fill: var(--scene-pine);
}

/* ---------- List page ---------- */

.list-hero {
  position: relative;
  margin-top: 24px;
  height: 230px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky-a), var(--sky-b));
  box-shadow: var(--shadow-md);
}

.list-hero__scene {
  position: absolute;
  inset: 0;
}

.list-hero__text {
  position: relative;
  padding: 30px 34px;
  display: grid;
  gap: 6px;
  max-width: 560px;
}

.list-hero__title {
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 700;
  font-style: italic;
  color: var(--text);
}

.list-hero__stats {
  justify-self: start;
  margin-top: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 26px 0 20px;
}

.search {
  position: relative;
  flex: 1 1 240px;
  max-width: 340px;
  display: flex;
  align-items: center;
}

.search > .ico {
  position: absolute;
  left: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

.search__input {
  padding-left: 42px;
  border-radius: 999px;
  min-height: 42px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.toolbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

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

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--text);
}

.chip[aria-pressed='true'] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.chip__n {
  font-size: 11.5px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-muted);
}

.chip[aria-pressed='true'] .chip__n {
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}

.chips--sm {
  margin-bottom: 14px;
}

.chips--sm .chip {
  min-height: 32px;
  font-size: 13px;
}

.chips--sm:empty {
  display: none;
}

.viewtoggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border);
}

.viewtoggle__btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
}

.viewtoggle__btn[aria-pressed='true'] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* ---------- Pills & badges ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.pill .ico {
  width: 13px;
  height: 13px;
}

.pill--idea {
  background: var(--pill-idea-bg);
  color: var(--pill-idea-fg);
}

.pill--planned {
  background: var(--pill-planned-bg);
  color: var(--pill-planned-fg);
}

.pill--booked {
  background: var(--pill-booked-bg);
  color: var(--pill-booked-fg);
}

.countdown {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--clay);
  white-space: nowrap;
}

.countdown .ico {
  width: 14px;
  height: 14px;
}

.countdown--now {
  color: var(--moss);
}

@media (prefers-color-scheme: dark) {
  .countdown {
    color: #e3b48e;
  }
  .countdown--now {
    color: var(--sage);
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 0;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: var(--surface-3);
  color: var(--text-muted);
}

.badge .ico {
  width: 12px;
  height: 12px;
}

button.badge {
  cursor: pointer;
}

button.badge:hover {
  filter: brightness(0.95);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.badge--want,
.badge--option {
  background: var(--pill-planned-bg);
  color: var(--pill-planned-fg);
}

.badge--reserved,
.badge--booked {
  background: var(--pill-booked-bg);
  color: var(--pill-booked-fg);
}

.badge--visited,
.badge--soft {
  background: var(--pill-idea-bg);
  color: var(--pill-idea-fg);
}

.badge--cheapest {
  background: #f4dcc6;
  color: #8a4a22;
}

@media (prefers-color-scheme: dark) {
  .badge--cheapest {
    background: rgba(227, 180, 142, 0.18);
    color: #e3b48e;
  }
}

/* ---------- Trip list: shared ---------- */

.trip {
  position: relative;
  display: block;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  isolation: isolate;
}

.trip:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.trip__media {
  position: relative;
  overflow: hidden;
  background: var(--surface-3);
}

.cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.trip:hover .cover-img {
  transform: scale(1.04);
}

.cover-ph {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--sky-a), var(--sky-b));
}

.cover-ph--1 {
  background: linear-gradient(180deg, #f2e1c6, #e6d7b9);
}
.cover-ph--2 {
  background: linear-gradient(180deg, #dbe4d8, #cbd8c6);
}
.cover-ph--3 {
  background: linear-gradient(180deg, #eadcc9, #d9dfc6);
}

@media (prefers-color-scheme: dark) {
  .cover-ph--1 {
    background: linear-gradient(180deg, #2a2a20, #1f241b);
  }
  .cover-ph--2 {
    background: linear-gradient(180deg, #1b2621, #16201a);
  }
  .cover-ph--3 {
    background: linear-gradient(180deg, #282620, #1c231c);
  }
}

.trip__body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.trip__top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.trip__title {
  font-size: 22px;
  font-weight: 650;
  margin-top: 2px;
}

.trip__line {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--text-muted);
  font-size: 14.5px;
  min-width: 0;
}

.trip__line .ico {
  margin-top: 3px;
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.trip__line span {
  min-width: 0;
}

.trip__line em {
  font-style: normal;
  opacity: 0.8;
}

.trip__counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.trip__count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.trip__count .ico {
  width: 13px;
  height: 13px;
}

.trip__go {
  display: grid;
  place-items: center;
  color: var(--text-muted);
  padding-right: 18px;
  transition: transform 0.2s, color 0.2s;
}

.trip:hover .trip__go {
  transform: translateX(3px);
  color: var(--accent);
}

/* ---------- Cards view (default) ---------- */

.trips--cards {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.trips--cards .trip {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) auto;
  min-height: 168px;
}

/* The image is masked by the card's rounded corners and fades softly into it. */
.trips--cards .trip__media {
  -webkit-mask-image: linear-gradient(90deg, #000 78%, transparent);
  mask-image: linear-gradient(90deg, #000 78%, transparent);
}

.trips--cards .trip__body {
  justify-content: center;
  padding: 20px 8px 20px 14px;
}

/* ---------- Grid view ---------- */

.trips--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.trips--grid .trip {
  display: flex;
  flex-direction: column;
}

.trips--grid .trip__media {
  aspect-ratio: 16 / 10;
}

.trips--grid .trip__title {
  font-size: 20px;
}

.trips--grid .trip__go {
  display: none;
}

.trips--grid .trip__top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
}

.trips--grid .trip__top .countdown {
  margin-left: auto;
  background: rgba(255, 252, 246, 0.9);
  padding: 4px 9px;
  border-radius: 999px;
  color: #8a4a22;
}

.trips--grid .trip__top .countdown--now {
  color: var(--forest);
}

/* ---------- Compact view ---------- */

.trips--compact {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.trips--compact .trip {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  border-bottom: 1px solid var(--border);
}

.trips--compact .trip:last-child {
  border-bottom: 0;
}

.trips--compact .trip:hover {
  transform: none;
  background: var(--surface-2);
}

.trips--compact .trip__media {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.trips--compact .trip__body {
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: 'title top' 'dates top';
  column-gap: 12px;
  row-gap: 1px;
  align-items: center;
}

.trips--compact .trip__title {
  grid-area: title;
  font-size: 16.5px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trips--compact .trip__dates {
  grid-area: dates;
  font-size: 13.5px;
}

.trips--compact .trip__top {
  grid-area: top;
  justify-content: flex-end;
}

.trips--compact .trip__stops,
.trips--compact .trip__counts {
  display: none;
}

.trips--compact .trip__go {
  padding-right: 0;
}

/* Skeletons */

.trip--skeleton {
  pointer-events: none;
}

.trips--cards .trip--skeleton {
  display: grid;
  grid-template-columns: 230px 1fr;
}

.trip--skeleton .trip__media,
.trip--skeleton .trip__body span,
.item--skeleton {
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}

.trip--skeleton .trip__body span {
  display: block;
  height: 14px;
  border-radius: 8px;
  width: 60%;
}

.trip--skeleton .trip__body span:first-child {
  width: 30%;
}

.trip--skeleton .trip__body span:nth-child(2) {
  height: 22px;
  width: 70%;
}

.trips--grid .trip--skeleton .trip__media {
  aspect-ratio: 16 / 10;
}

.trips--compact .trip--skeleton {
  height: 68px;
}

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

.no-results {
  padding: 30px;
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  font-family: var(--font-display);
  font-size: 17px;
}

/* Memories */

.memories {
  margin-top: 40px;
}

.memories__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: none;
  padding: 12px 4px;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--border-strong);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
}

.memories__toggle .ico:first-child {
  color: var(--bark);
}

@media (prefers-color-scheme: dark) {
  .memories__toggle .ico:first-child {
    color: var(--sand);
  }
}

.memories__count {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-muted);
}

.memories__chev {
  margin-left: auto;
  transition: transform 0.2s;
}

.memories--open .memories__chev {
  transform: rotate(180deg);
}

.memories .trip {
  filter: saturate(0.75);
}

.memories .trip:hover {
  filter: none;
}

/* ---------- Empty states ---------- */

.empty {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
  padding: 44px 24px;
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border-strong);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}

.empty__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--pill-idea-bg);
  color: var(--pill-idea-fg);
  margin-bottom: 6px;
}

.empty__icon .ico {
  width: 28px;
  height: 28px;
}

.empty__title {
  font-size: 22px;
}

.empty__text {
  color: var(--text-muted);
  max-width: 420px;
  margin-bottom: 10px;
}

/* ---------- Modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 33, 27, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.2s;
}

.modal__panel {
  position: relative;
  width: 100%;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.2s, transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

.modal--in .modal__backdrop {
  opacity: 1;
}

.modal--in .modal__panel {
  opacity: 1;
  transform: none;
}

.modal__panel--sm {
  max-width: 420px;
}
.modal__panel--md {
  max-width: 580px;
}
.modal__panel--lg {
  max-width: 700px;
}
.modal__panel--xl {
  max-width: 1000px;
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 6px 26px;
}

.modal__title {
  font-size: 24px;
}

.modal__body {
  padding: 12px 26px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.modal__start {
  margin-right: auto;
}

.modal--busy .modal__body {
  opacity: 0.6;
  pointer-events: none;
}

.confirm-text {
  color: var(--text-muted);
}

/* Photo lightbox */

.modal--photo .modal__body {
  padding: 0 18px 18px;
}

.lightbox {
  display: grid;
  gap: 12px;
}

.lightbox__stage {
  position: relative;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 200px;
}

.lightbox__stage img {
  max-height: calc(100vh - 260px);
  max-height: calc(100dvh - 260px);
  width: auto;
  object-fit: contain;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 252, 246, 0.85);
  color: #2a2b23;
}

.lightbox__nav:hover:not(:disabled) {
  background: #fffcf6;
  color: #2a2b23;
}

.lightbox__nav--prev {
  left: 10px;
}
.lightbox__nav--next {
  right: 10px;
}

/* ---------- Toasts ---------- */

#toast-root {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 200;
  display: grid;
  gap: 8px;
  justify-items: center;
  pointer-events: none;
  width: min(92vw, 460px);
}

.toast {
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--forest-deep);
  color: var(--cream);
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s;
  text-align: center;
}

.toast--in {
  opacity: 1;
  transform: none;
}

.toast--success::before {
  content: '✓  ';
  color: var(--sage);
}

.toast--error {
  background: #7d3423;
  border-radius: 16px;
}

/* ---------- Forms ---------- */

.form {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 14px;
}

.field {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field--half {
  flex: 1 1 calc(50% - 7px);
  min-width: 200px;
}

.field--third {
  flex: 1 1 calc(33% - 10px);
  min-width: 140px;
}

.field__label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.req {
  color: var(--danger);
  font-style: normal;
  margin-left: 3px;
}

.field__hint {
  font-size: 12.5px;
  color: var(--text-muted);
}

.form__heading {
  flex: 1 1 100%;
  font-size: 17px;
  margin-top: 6px;
}

.form__error {
  color: var(--danger);
  font-size: 13.5px;
  font-weight: 700;
}

.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-3);
  border: 1px solid var(--border);
}

.seg__btn {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.seg__btn .ico {
  width: 15px;
  height: 15px;
}

.seg__btn[aria-checked='true'] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.seg--status .seg__btn--idea[aria-checked='true'] {
  background: var(--pill-idea-bg);
  color: var(--pill-idea-fg);
}
.seg--status .seg__btn--planned[aria-checked='true'] {
  background: var(--pill-planned-bg);
  color: var(--pill-planned-fg);
}
.seg--status .seg__btn--booked[aria-checked='true'] {
  background: var(--pill-booked-bg);
  color: var(--pill-booked-fg);
}

.money-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 6px;
}

.scale {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
}

.scale__btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  font-weight: 800;
  color: var(--text-muted);
  opacity: 0.6;
  cursor: pointer;
  transition: all 0.12s;
}

.scale__btn.on {
  opacity: 1;
  background: var(--pill-planned-bg);
  border-color: transparent;
  color: var(--pill-planned-fg);
}

[data-key='rating'] .scale__btn.on {
  color: #c48a2c;
}

[data-key='rating'] .scale__btn.on .ico {
  fill: currentColor;
}

.scale__clear {
  border: 0;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 700;
  user-select: none;
}

.check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check__box {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 2px solid var(--border-strong);
  background: var(--surface);
  color: transparent;
  transition: all 0.15s;
  flex: none;
}

.check__box .ico {
  width: 15px;
  height: 15px;
  stroke-width: 3;
}

.check input:checked + .check__box {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.check input:focus-visible + .check__box {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.check--sm {
  font-size: 13px;
  gap: 8px;
}

.check--sm .check__box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
}

/* Trip form */

.cover-pick {
  flex: 1 1 100%;
  position: relative;
  height: 170px;
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border-strong);
  background: var(--surface-2);
  overflow: hidden;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.15s, background 0.15s;
}

.cover-pick:hover {
  border-color: var(--accent);
}

.cover-pick--has {
  border-style: solid;
  border-color: transparent;
}

.cover-pick img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-pick__empty {
  display: grid;
  justify-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 13.5px;
}

.cover-pick__empty .ico {
  width: 28px;
  height: 28px;
  color: var(--accent);
  margin-bottom: 4px;
}

.cover-pick__empty strong {
  color: var(--text);
  font-size: 15px;
}

.cover-pick__actions {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
}

.stops-edit {
  display: grid;
  gap: 8px;
}

.stop-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1.4fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.stop-row__dot {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 12px;
  font-weight: 800;
}

.stop-row__btns {
  display: flex;
}

.date-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 14px;
  margin-top: 10px;
}

.monthpick {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 6px;
}

/* ---------- Trip detail ---------- */

.hero {
  position: relative;
  margin-top: 24px;
  min-height: 340px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
  color: #fffcf6;
  background: var(--surface-3);
}

.hero__bg {
  position: absolute;
  inset: 0;
}

.hero__bg--loading {
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}

.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 30, 23, 0.35) 0%, transparent 30%),
    linear-gradient(0deg, rgba(20, 30, 23, 0.82) 0%, rgba(20, 30, 23, 0.4) 45%, transparent 75%);
}

.hero__bar {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 16px;
}

.hero__content {
  position: relative;
  padding: 26px 30px 28px;
  display: grid;
  gap: 8px;
}

.hero__pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero__pills .countdown {
  background: rgba(255, 252, 246, 0.92);
  color: #8a4a22;
  padding: 4px 10px;
  border-radius: 999px;
}

.hero__pills .countdown--now {
  color: var(--forest);
}

.hero__pills .pill--booked {
  background: var(--cream);
  color: var(--forest);
}

.hero__title {
  font-size: clamp(30px, 5.5vw, 50px);
  font-weight: 700;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
}

.hero__line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15.5px;
  opacity: 0.95;
}

.hero__line > .ico {
  color: var(--sage);
}

.hero__stops {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.hero__arrow .ico {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.tabs {
  position: sticky;
  top: var(--topbar-h);
  z-index: 20;
  display: flex;
  gap: 4px;
  margin: 18px 0 24px;
  padding: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.tab .ico {
  width: 16px;
  height: 16px;
}

.tab:hover {
  color: var(--text);
  background: var(--surface-3);
}

.tab[aria-selected='true'] {
  background: var(--primary);
  color: var(--on-primary);
}

.tab__n {
  font-size: 11px;
  font-weight: 800;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--text-muted);
}

.tab[aria-selected='true'] .tab__n {
  background: rgba(255, 255, 255, 0.22);
  color: inherit;
}

/* ---------- Sections & items ---------- */

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.section__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 28px;
}

.section__title .ico {
  color: var(--accent);
  width: 24px;
  height: 24px;
}

.section__sub {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 14px;
}

.section__summary:empty {
  display: none;
}

.section__summary {
  margin-bottom: 14px;
}

.summary-strip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--pill-idea-bg);
  color: var(--pill-idea-fg);
  font-size: 14px;
}

.group + .group {
  margin-top: 26px;
}

.group__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  margin: 0 0 12px 4px;
}

.group__title .ico {
  color: var(--accent);
  width: 17px;
  height: 17px;
}

.group__n {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  background: var(--surface-3);
  border-radius: 999px;
  padding: 1px 8px;
}

.items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: 14px;
}

.item {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 16px 48px 16px 16px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  min-width: 0;
}

.item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.item--skeleton {
  height: 96px;
  box-shadow: none;
  margin-bottom: 14px;
  cursor: default;
}

.item__edit {
  position: absolute;
  top: 10px;
  right: 10px;
  opacity: 0.55;
}

.item:hover .item__edit {
  opacity: 1;
}

.item__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--pill-idea-bg);
  color: var(--pill-idea-fg);
  flex: none;
}

.item__main {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  flex: 1;
}

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

.item__title {
  font-size: 18px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.item__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--text-muted);
  font-size: 14px;
}

.item__meta .ico {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

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

.item__notes {
  font-size: 14px;
  color: var(--text-muted);
  background: var(--surface-2);
  border-left: 3px solid var(--sand);
  padding: 7px 11px;
  border-radius: 0 10px 10px 0;
  overflow-wrap: anywhere;
}

.item__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  max-width: 100%;
}

.item__link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.item__price {
  color: var(--text);
}

.money {
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.money sup {
  font-size: 0.65em;
  color: var(--text-muted);
  margin-left: 1px;
}

.money[title] {
  cursor: help;
}

.level {
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--bark);
}

@media (prefers-color-scheme: dark) {
  .level {
    color: var(--sand);
  }
}

.level__dim {
  opacity: 0.3;
}

.stars {
  display: inline-flex;
  gap: 1px;
}

.stars span {
  color: var(--border-strong);
}

.stars span.on {
  color: #c48a2c;
}

.stars .ico {
  width: 14px;
  height: 14px;
  color: inherit !important;
  fill: currentColor;
}

.item--visited .item__icon {
  background: var(--pill-booked-bg);
  color: var(--pill-booked-fg);
}

.item--booked {
  box-shadow: var(--shadow-md), inset 4px 0 0 var(--moss);
}

.item--cheapest {
  box-shadow: var(--shadow-md), inset 0 0 0 2px #e3b48e;
}

.item--booked.item--cheapest {
  box-shadow: var(--shadow-md), inset 4px 0 0 var(--moss), inset 0 0 0 2px #e3b48e;
}

.item--done .item__title {
  text-decoration: line-through;
  text-decoration-color: var(--sage);
  text-decoration-thickness: 2px;
  color: var(--text-muted);
}

.item--done {
  opacity: 0.8;
}

.item--paid .item__title::after {
  content: '';
}

.tick {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-top: 1px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--surface);
  color: transparent;
  cursor: pointer;
  flex: none;
  transition: all 0.15s;
}

.tick:hover {
  border-color: var(--accent);
  color: var(--sage);
}

.tick--on {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.tick .ico {
  width: 16px;
  height: 16px;
  stroke-width: 3;
}

/* Flights */

.section--flights .items {
  grid-template-columns: 1fr;
}

.flight {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  width: 100%;
}

.flight__route {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.flight__code {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flight__path {
  display: flex;
  align-items: center;
  color: var(--accent);
  position: relative;
  padding: 0 16px;
}

.flight__path::before,
.flight__path::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 12px;
  border-top: 2px dotted var(--border-strong);
}

.flight__path::before {
  left: 0;
}
.flight__path::after {
  right: 0;
}

.flight__path .ico {
  transform: rotate(45deg);
}

.flight__main {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.flight__price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.flight__total {
  font-family: var(--font-display);
  font-size: 22px;
}

.flight__pp {
  font-size: 12.5px;
  color: var(--text-muted);
}

.flight__pp .money {
  font-weight: 700;
  color: var(--text-muted);
}

/* ---------- Overview ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.tile {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: 'icon n' 'icon label';
  column-gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s, box-shadow 0.15s;
}

.tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.tile__icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--pill-idea-bg);
  color: var(--pill-idea-fg);
}

.tile__n {
  grid-area: n;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.tile__label {
  grid-area: label;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overview__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  grid-template-areas: 'route notes' 'links notes';
  gap: 18px;
  align-items: start;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 20px 22px;
}

.card--route {
  grid-area: route;
}
.card--notes {
  grid-area: notes;
}
.card--links {
  grid-area: links;
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.card__title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 20px;
}

.card__title .ico {
  color: var(--accent);
  width: 19px;
  height: 19px;
}

.route {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.route__stop {
  position: relative;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 0 0 18px 30px;
}

.route__stop::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 14px;
  bottom: -2px;
  border-left: 2px dashed var(--sage);
}

.route__stop:last-child {
  padding-bottom: 0;
}

.route__stop:last-child::before {
  display: none;
}

.route__dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 4px solid var(--moss);
}

.route__stop:first-child .route__dot,
.route__stop:last-child .route__dot {
  background: var(--moss);
}

.route__name {
  font-weight: 800;
  font-size: 16px;
}

.route__country {
  color: var(--text-muted);
  font-size: 13.5px;
}

.notes {
  min-height: 220px;
  background: var(--surface-2);
  border-color: var(--border);
  font-size: 15px;
}

.saved {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
}

.links {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 6px;
}

.links__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 8px;
  border-radius: 12px;
  background: var(--surface-2);
}

.links__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--pill-idea-bg);
  color: var(--pill-idea-fg);
}

.links__icon .ico {
  width: 15px;
  height: 15px;
}

.links__item a {
  display: grid;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}

.links__item a strong,
.links__item a small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.links__item a small {
  color: var(--text-muted);
}

.links__item a:hover strong {
  text-decoration: underline;
}

.links__empty {
  font-size: 14px;
  padding: 4px 2px;
}

.link-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.link-add .btn {
  justify-self: start;
}

/* ---------- Itinerary ---------- */

.timeline {
  display: grid;
  gap: 14px;
  position: relative;
}

.day {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  position: relative;
}

.day::before {
  content: '';
  position: absolute;
  left: 55px;
  top: 0;
  bottom: -14px;
  border-left: 2px dashed var(--sage);
  opacity: 0.6;
  z-index: -1;
}

.day:last-child::before {
  display: none;
}

.day__badge {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 2px;
  padding: 12px 6px;
  border-radius: 18px;
  background: var(--primary);
  color: var(--on-primary);
  height: fit-content;
  box-shadow: var(--shadow-md);
}

.day--empty .day__badge {
  background: var(--surface-3);
  color: var(--text-muted);
  box-shadow: none;
}

.day__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}

.day__date {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.85;
  text-align: center;
}

.day__card {
  padding: 14px 16px 16px 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  min-width: 0;
}

.day--empty .day__card {
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  box-shadow: none;
  border: 2px dashed var(--border);
}

.day__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.day__head .icon-btn {
  margin-left: auto;
}

.day__title {
  font-size: 18px;
}

.day--empty .day__title {
  font-size: 16px;
  font-weight: 500;
  font-style: italic;
}

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

.day__items li {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  font-size: 14.5px;
  overflow-wrap: anywhere;
}

.day__time {
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.timeline__foot {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-left: 128px;
}

.timeline__foot:empty {
  display: none;
}

.plan-rows {
  display: grid;
  gap: 8px;
}

.plan-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

/* ---------- Budget ---------- */

.budget {
  display: grid;
  gap: 16px;
  margin-bottom: 30px;
}

.budget__totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stat {
  display: grid;
  gap: 2px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.stat--main {
  background: linear-gradient(145deg, var(--moss), var(--forest));
  color: var(--cream);
}

.stat--main .money,
.stat--main .stat__label,
.stat--main .stat__sub {
  color: inherit;
}

.stat__label {
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.stat__value .money {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
}

.stat__sub {
  font-size: 13px;
  color: var(--text-muted);
}

.stat__sub .money {
  font-weight: 700;
  color: inherit;
}

.bar-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 7px 0;
}

.bar-row__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
}

.bar-row__label .ico {
  color: var(--accent);
  width: 16px;
  height: 16px;
}

.bar-row__bars {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.bar--est {
  background: var(--sand);
  opacity: 0.8;
}

.bar--act {
  background: var(--moss);
  top: 3px;
  bottom: 3px;
}

.bar--flights {
  background: var(--forest);
}
.bar--stay {
  background: var(--moss);
}
.bar--food {
  background: var(--clay);
}
.bar--activities {
  background: #7d966f;
}
.bar--transport {
  background: var(--bark);
}
.bar--other {
  background: #8d8a72;
}

@media (prefers-color-scheme: dark) {
  .bar--est {
    background: #4a4536;
  }
  .bar--flights {
    background: var(--sage);
  }
}

.bar-row__val {
  font-size: 14px;
  white-space: nowrap;
  text-align: right;
}

.bar-row__val small .money {
  font-weight: 600;
  color: var(--text-muted);
}

.bar-row__val small {
  color: var(--text-muted);
}

.legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.legend span {
  display: inline-block;
  width: 18px;
  height: 8px;
  border-radius: 999px;
}

.legend__est {
  background: var(--sand);
}

.legend__act {
  background: var(--moss);
  margin-left: 10px;
}

/* ---------- Photos ---------- */

.gallery {
  columns: 3 260px;
  column-gap: 14px;
}

.photo {
  position: relative;
  margin: 0 0 14px;
  break-inside: avoid;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-3);
  box-shadow: var(--shadow-md);
  cursor: zoom-in;
}

.photo img {
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}

.photo:hover img {
  transform: scale(1.03);
}

.photo figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 14px 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(0deg, rgba(20, 30, 23, 0.75), transparent);
}

.photo__cover {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.9);
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
}

.photo__cover .ico {
  width: 12px;
  height: 12px;
}

.drop-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-muted);
}

@media (pointer: coarse) {
  .drop-hint {
    display: none;
  }
}

.dropping .section--photos {
  outline: 3px dashed var(--accent);
  outline-offset: 10px;
  border-radius: var(--radius-lg);
}

/* ---------- Lock / setup ---------- */

.lock {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px 30vh;
  background: linear-gradient(180deg, var(--sky-a), var(--sky-b) 70%);
  overflow: hidden;
}

.lock__scene {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48vh;
}

.lock__card {
  position: relative;
  width: min(100%, 380px);
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 34px 30px 26px;
  border-radius: var(--radius-xl);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.lock__card--wide {
  width: min(100%, 480px);
}

.lock__mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(145deg, var(--moss), var(--forest));
  color: var(--cream);
  box-shadow: 0 8px 20px rgba(47, 74, 58, 0.35);
}

.lock__mark .ico {
  width: 32px;
  height: 32px;
}

.lock__title {
  font-size: 32px;
  font-weight: 700;
  margin-top: 6px;
}

.lock__sub {
  margin-top: -8px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.lock__field {
  position: relative;
  width: 100%;
}

.lock__field > .ico {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.lock__field .input {
  padding-left: 44px;
  min-height: 50px;
  font-size: 16px;
  border-radius: 14px;
}

.lock__card .btn--block {
  min-height: 48px;
  font-size: 15.5px;
}

.lock__error {
  min-height: 1.4em;
  color: var(--danger);
  font-weight: 700;
  font-size: 14px;
}

.lock__error:empty {
  min-height: 0;
}

.lock__hint {
  font-size: 12.5px;
  color: var(--text-muted);
}

.shake {
  animation: shake 0.4s;
}

@keyframes shake {
  20%,
  60% {
    transform: translateX(-8px);
  }
  40%,
  80% {
    transform: translateX(8px);
  }
}

.setup {
  text-align: left;
  font-size: 14.5px;
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.setup ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 4px;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .tiles {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .overview__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'route' 'notes' 'links';
  }
}

@media (max-width: 720px) {
  :root {
    --gutter: 16px;
    --topbar-h: 60px;
  }

  body {
    font-size: 15px;
  }

  .brand__mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .brand__names {
    font-size: 17px;
  }

  .brand__sub {
    font-size: 10px;
  }

  .topbar__new span {
    display: none;
  }

  .topbar__new {
    width: 42px;
    padding: 0;
  }

  .cur-switch__btn {
    padding: 6px 8px;
    font-size: 11.5px;
  }

  .list-hero {
    height: 190px;
    margin-top: 16px;
  }

  .list-hero__text {
    padding: 22px;
  }

  .toolbar {
    gap: 10px;
  }

  .search {
    max-width: none;
    flex-basis: 100%;
  }

  .toolbar__right {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }

  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .chips::-webkit-scrollbar {
    display: none;
  }

  .chip {
    flex: none;
  }

  .trips--cards .trip {
    grid-template-columns: 116px minmax(0, 1fr);
    min-height: 136px;
  }

  .trips--cards .trip__go {
    display: none;
  }

  .trips--cards .trip__media {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .trips--cards .trip__body {
    padding: 14px 14px 14px 14px;
    gap: 4px;
  }

  .trip__title {
    font-size: 18.5px;
  }

  .trip__line {
    font-size: 13.5px;
  }

  .trips--cards .trip__counts {
    display: none;
  }

  .trips--compact .trip__top .pill span {
    display: none;
  }

  .trips--compact .trip__top .pill {
    padding: 5px;
  }

  .trips--compact .trip__top .countdown span {
    display: none;
  }

  .trips--compact .trip__go {
    display: none;
  }

  .hero {
    min-height: 290px;
    margin-top: 16px;
    border-radius: var(--radius-lg);
  }

  .hero__content {
    padding: 18px 20px 22px;
  }

  .tabs {
    border-radius: 18px;
    margin: 14px calc(var(--gutter) * -1) 20px;
    border-radius: 0;
    padding: 6px var(--gutter);
  }

  .tab {
    flex: none;
  }

  .section__title {
    font-size: 23px;
  }

  .section__head .btn span {
    display: none;
  }

  .section__head .btn {
    width: 46px;
    padding: 0;
  }

  .item {
    padding: 14px 44px 14px 14px;
  }

  .item__icon {
    display: none;
  }

  .flight {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
  }

  .flight__route {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .flight__main {
    grid-column: 1;
  }

  .flight__price {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
  }

  .budget__totals {
    grid-template-columns: minmax(0, 1fr);
  }

  .stat {
    padding: 14px 18px;
  }

  .stat__value .money {
    font-size: 26px;
  }

  .bar-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
  }

  .bar-row__bars {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .day {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 10px;
  }

  .day::before {
    left: 36px;
  }

  .day__num {
    font-size: 15px;
  }

  .day__date {
    font-size: 11px;
  }

  .timeline__foot {
    padding-left: 0;
    flex-wrap: wrap;
  }

  .gallery {
    columns: 2 140px;
    column-gap: 10px;
  }

  .photo {
    margin-bottom: 10px;
  }

  /* Modals become bottom sheets */
  .modal {
    padding: 0;
    place-items: end stretch;
  }

  .modal__panel {
    max-width: none !important;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: 24px 24px 0 0;
    transform: translateY(40px);
  }

  .modal__foot {
    border-radius: 0;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  .modal__head {
    padding: 16px 12px 4px 20px;
  }

  .modal__title {
    font-size: 21px;
  }

  .modal__body {
    padding: 10px 20px 20px;
  }

  .modal__foot .btn {
    padding: 0 14px;
  }

  .field--half {
    flex-basis: 100%;
  }

  .stop-row {
    grid-template-columns: 26px minmax(0, 1fr) auto;
  }

  .stop-row__country {
    grid-column: 2;
    grid-row: 2;
  }

  .stop-row__btns {
    grid-column: 3;
    grid-row: 1 / span 2;
    flex-direction: column;
  }

  .plan-row {
    grid-template-columns: 96px minmax(0, 1fr) auto;
  }

  .seg__btn {
    font-size: 13px;
    padding: 0 8px;
  }
}

@media (max-width: 440px) {
  /* Keep the name visible on phones; drop the logo mark instead. */
  .brand__mark {
    display: none;
  }

  .topbar__right {
    gap: 6px;
  }

  .topbar .menu .icon-btn {
    width: 30px;
  }

  .cur-switch__btn {
    padding: 6px 7px;
    font-size: 11px;
  }
}

@media (max-width: 370px) {
  .brand__names {
    font-size: 15px;
    line-height: 1.02;
    white-space: normal;
  }

  .brand__sub {
    font-size: 9px;
    letter-spacing: 0.12em;
  }

  .cur-switch__btn {
    padding: 5px 5px;
    font-size: 10.5px;
  }

  .topbar__new {
    width: 38px;
    min-height: 38px;
  }

  .trips--cards .trip {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .trips--cards .trip__body {
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
