/* ============================================================
   Mamas Berlin – Styles
   Palette in OKLCH · Display: Fraunces · Text/UI: Inter
   ============================================================ */

:root {
  /* --- Brand & neutrals ------------------------------------ */
  --brand:        oklch(0.64 0.17 25);
  --brand-deep:   oklch(0.52 0.16 24);
  --brand-soft:   oklch(0.93 0.05 28);
  --sun:          oklch(0.84 0.15 82);
  --sun-deep:     oklch(0.74 0.15 70);

  --bg:           oklch(0.975 0.014 28);
  --bg-2:         oklch(0.955 0.018 30);
  --surface:      oklch(0.995 0.004 40);
  --surface-2:    oklch(0.97 0.012 32);

  --ink:          oklch(0.26 0.03 300);
  --ink-soft:     oklch(0.44 0.025 300);
  --ink-faint:    oklch(0.58 0.02 300);

  --line:         oklch(0.90 0.014 32);
  --line-strong:  oklch(0.84 0.02 32);

  /* --- Type ------------------------------------------------ */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;

  /* --- Radius / shadow ------------------------------------- */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --shadow-sm: 0 1px 2px oklch(0.4 0.05 30 / 0.06), 0 2px 6px oklch(0.4 0.05 30 / 0.05);
  --shadow-md: 0 6px 18px oklch(0.4 0.06 30 / 0.10), 0 2px 6px oklch(0.4 0.06 30 / 0.06);
  --shadow-lg: 0 18px 50px oklch(0.4 0.08 30 / 0.16), 0 6px 16px oklch(0.4 0.06 30 / 0.08);

  /* --- Motion ---------------------------------------------- */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);

  /* --- z-index scale --------------------------------------- */
  --z-header: 100;
  --z-rail: 60;
  --z-bar: 200;
  --z-backdrop: 900;
  --z-modal: 950;
  --z-toast: 3000;
  --z-confetti: 3500;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1100px 600px at 85% -10%, var(--brand-soft), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, oklch(0.92 0.05 85), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--ink);
  margin: 0;
}
p { text-wrap: pretty; }

a { color: var(--brand-deep); }

button { font-family: inherit; cursor: pointer; }

/* ============================================================
   App shell + header / stepper
   ============================================================ */
.app { min-height: 100dvh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: var(--z-header);
  display: flex; align-items: center; gap: 1rem;
  padding: 0.75rem clamp(1rem, 4vw, 2.5rem);
  background: oklch(0.99 0.006 40 / 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.brand-mark {
  display: flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem;
  letter-spacing: -0.01em; white-space: nowrap;
}
.brand-mark .dot {
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 1rem;
  background: linear-gradient(140deg, var(--brand), var(--sun-deep));
  box-shadow: var(--shadow-sm);
}

/* Stepper */
.stepper { display: flex; align-items: center; gap: 0.35rem; margin-left: auto; flex-wrap: wrap; }
.step {
  display: inline-flex; align-items: center; gap: 0.45rem;
  border: none; background: transparent; color: var(--ink-faint);
  padding: 0.35rem 0.6rem; border-radius: 999px;
  font-size: 0.86rem; font-weight: 500;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}
.step .num {
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.78rem; font-weight: 600;
  background: var(--surface-2); color: var(--ink-faint);
  border: 1px solid var(--line); transition: all 0.3s var(--ease);
}
.step .label { display: none; }
@media (min-width: 880px) { .step .label { display: inline; } }
.step:not(:disabled):hover { color: var(--ink); }
.step.done .num { background: var(--brand-soft); color: var(--brand-deep); border-color: transparent; }
.step.done .num::after { content: "✓"; }
.step.done .num .n { display: none; }
.step.active { color: var(--ink); }
.step.active .num {
  background: var(--brand); color: white; border-color: transparent;
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.step:disabled { cursor: default; opacity: 0.65; }
.step-sep { width: 14px; height: 1px; background: var(--line-strong); }
@media (max-width: 879px){ .step-sep { width: 8px; } }

/* ============================================================
   Screens
   ============================================================ */
.screen { display: none; animation: screen-in 0.55s var(--ease) both; }
.screen.is-active { display: block; }
@keyframes screen-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wrap { max-width: 1180px; margin: 0 auto; padding: clamp(1.25rem, 4vw, 3rem) clamp(1rem, 4vw, 2.5rem); }
.section-head { margin-bottom: 1.6rem; }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
.section-head p { color: var(--ink-soft); max-width: 60ch; margin: 0.5rem 0 0; font-size: 1.02rem; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border: 1px solid transparent; border-radius: 999px;
  padding: 0.8rem 1.5rem; font-size: 0.98rem; font-weight: 600;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: white; box-shadow: var(--shadow-md);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--ink-faint); }
.btn-lg { padding: 1rem 2rem; font-size: 1.08rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ============================================================
   Welcome / hero
   ============================================================ */
.hero { position: relative; min-height: calc(100dvh - 60px); display: grid; place-items: center; overflow: hidden; }
.hero-inner { text-align: center; max-width: 760px; padding: clamp(2rem, 6vw, 4rem) 1.25rem; position: relative; z-index: 2; }
.hero .gift-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--surface); border: 1px solid var(--line);
  padding: 0.45rem 1rem; border-radius: 999px; font-size: 0.9rem; font-weight: 600;
  color: var(--brand-deep); box-shadow: var(--shadow-sm); margin-bottom: 1.6rem;
}
.hero h1 {
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  font-optical-sizing: auto; font-variation-settings: "SOFT" 40, "WONK" 0;
}
.hero h1 .accent { color: var(--brand); font-style: italic; }
.hero .lede { font-size: clamp(1.1rem, 2.3vw, 1.4rem); color: var(--ink-soft); margin: 1.4rem auto 2.2rem; max-width: 54ch; }
.hero-cta { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.hero .mini-note { margin-top: 1.6rem; color: var(--ink-faint); font-size: 0.9rem; }

/* floating decorative blobs */
.blob { position: absolute; border-radius: 50%; filter: blur(14px); opacity: 0.5; z-index: 1; pointer-events: none; }
.blob.b1 { width: 280px; height: 280px; top: 8%; left: 6%; background: radial-gradient(var(--brand-soft), transparent 70%); }
.blob.b2 { width: 360px; height: 360px; bottom: 4%; right: 4%; background: radial-gradient(oklch(0.9 0.07 85), transparent 70%); }
.float-emoji { position: absolute; font-size: clamp(1.6rem, 4vw, 2.6rem); opacity: 0.9; z-index: 1; animation: bob 6s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-16px) rotate(4deg); } }

/* ============================================================
   Date selection
   ============================================================ */
.date-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.date-card {
  position: relative; text-align: left; background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--r-lg);
  padding: 1.5rem; box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.date-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
  background: linear-gradient(90deg, var(--brand), var(--sun));
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.date-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.date-card.selected { border-color: var(--brand); box-shadow: var(--shadow-md); }
.date-card.selected::before { opacity: 1; }
.date-card .d-emoji { font-size: 2rem; }
.date-card h3 { font-size: 1.4rem; margin: 0.6rem 0 0.15rem; }
.date-card .d-range { font-weight: 600; color: var(--brand-deep); }
.date-card .d-days { display: inline-block; margin-top: 0.1rem; font-size: 0.84rem; color: var(--ink-faint); }
.date-card .d-vibe { color: var(--ink-soft); font-size: 0.95rem; margin: 0.7rem 0 0; }
.date-card .d-check {
  position: absolute; top: 1.1rem; right: 1.1rem; width: 1.7rem; height: 1.7rem;
  border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center;
  color: white; font-size: 0.9rem; transition: all 0.3s var(--ease);
}
.date-card.selected .d-check { background: var(--brand); border-color: var(--brand); }
.date-card.selected .d-check::after { content: "✓"; }
.date-card-custom { cursor: text; }
.custom-date-input {
  width: 100%;
  margin-top: 0.75rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink);
  padding: 0.72rem 0.85rem;
  font: 0.95rem var(--font-body);
}
.custom-date-input::placeholder { color: var(--ink-faint); opacity: 1; }
.custom-date-input:focus {
  outline: 3px solid var(--brand-soft);
  border-color: var(--brand);
  background: var(--surface);
}

/* ============================================================
   Ideas (discover + select)
   ============================================================ */
.ideas-layout { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 1000px) { .ideas-layout { grid-template-columns: 1fr 320px; align-items: start; } }

.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.chip {
  border: 1.5px solid var(--line-strong); background: var(--surface);
  color: var(--ink-soft); padding: 0.45rem 0.95rem; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600; display: inline-flex; align-items: center; gap: 0.4rem;
  transition: all 0.25s var(--ease);
}
.chip:hover { border-color: var(--ink-faint); color: var(--ink); }
.chip.active { color: white; border-color: transparent; box-shadow: var(--shadow-sm); }
.chip .c-count { font-size: 0.78rem; opacity: 0.7; }

.gallery { display: grid; gap: 1.15rem; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); }

.card {
  position: relative; background: var(--surface); border-radius: var(--r-md);
  overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  display: flex; flex-direction: column;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  opacity: 0; transform: translateY(12px); animation: card-in 0.5s var(--ease) forwards;
}
@keyframes card-in { to { opacity: 1; transform: translateY(0); } }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card.selected { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand), var(--shadow-md); }

.tile {
  position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center;
  background-size: cover; background-position: center; isolation: isolate;
}
.tile .tile-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 3.4rem; filter: drop-shadow(0 4px 8px oklch(0.2 0.05 30 / 0.25));
}
.tile::after { /* readability veil for bottom text on photos */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, oklch(0.2 0.04 30 / 0.28));
}
.tile .cat-tag {
  position: absolute; top: 0.7rem; left: 0.7rem; z-index: 2;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.01em;
  padding: 0.28rem 0.6rem; border-radius: 999px; color: white;
  background: oklch(0.3 0.03 300 / 0.55); backdrop-filter: blur(6px);
  display: inline-flex; align-items: center; gap: 0.3rem;
}
.tile .add-btn {
  position: absolute; bottom: 0.7rem; right: 0.7rem; z-index: 2;
  width: 2.5rem; height: 2.5rem; border-radius: 50%; border: none;
  background: var(--surface); color: var(--brand); font-size: 1.3rem; font-weight: 700;
  display: grid; place-items: center; box-shadow: var(--shadow-md);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}
.tile .add-btn:hover { transform: scale(1.1); }
.tile .add-btn.added { background: var(--brand); color: white; }
.tile .add-btn.pop { animation: pop 0.4s var(--ease); }
@keyframes pop { 0%{transform:scale(1);} 40%{transform:scale(1.35);} 100%{transform:scale(1);} }

.card-body { padding: 0.9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }
.card-body h3 { font-size: 1.18rem; }
.card-meta { display: flex; gap: 0.6rem; font-size: 0.82rem; color: var(--ink-faint); font-weight: 500; }
.card-meta .sep { color: var(--line-strong); }
.card-body .blurb { font-size: 0.92rem; color: var(--ink-soft); margin: 0.2rem 0 0; }

/* Trip rail (selected summary) */
.rail { position: sticky; top: 80px; }
.rail-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.25rem; box-shadow: var(--shadow-sm);
}
.rail-card h3 { font-size: 1.25rem; display: flex; align-items: center; justify-content: space-between; }
.rail-count {
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 700; color: white;
  background: var(--brand); border-radius: 999px; padding: 0.15rem 0.6rem; min-width: 1.6rem; text-align: center;
}
.rail-empty { color: var(--ink-faint); font-size: 0.92rem; margin: 0.8rem 0; }
.rail-list { list-style: none; margin: 0.8rem 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; max-height: 46vh; overflow: auto; }
.rail-list li {
  display: flex; align-items: center; gap: 0.55rem; font-size: 0.9rem;
  background: var(--surface-2); border-radius: var(--r-sm); padding: 0.45rem 0.6rem;
  animation: screen-in 0.3s var(--ease) both;
}
.rail-list li .ri-emoji { font-size: 1.05rem; }
.rail-list li .ri-title { flex: 1; font-weight: 500; }
.rail-list li .ri-x { border: none; background: none; color: var(--ink-faint); font-size: 1.1rem; padding: 0 0.2rem; border-radius: 6px; }
.rail-list li .ri-x:hover { color: var(--brand); background: var(--brand-soft); }

/* Sticky bottom action bar (mobile-friendly) */
.actionbar {
  position: sticky; bottom: 0; z-index: var(--z-bar);
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin-top: 1.6rem; padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
  background: oklch(0.99 0.006 40 / 0.9); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.actionbar .ab-info { font-size: 0.95rem; color: var(--ink-soft); }
.actionbar .ab-info b { color: var(--ink); }
.actionbar .ab-spacer { margin-left: auto; }

/* ============================================================
   Planner (days + map)
   ============================================================ */
.planner-layout { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 1040px) { .planner-layout { grid-template-columns: 1fr 1fr; align-items: start; } }

.days-col { display: flex; flex-direction: column; gap: 1rem; }
.daybox {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1rem 1.15rem 1.15rem; box-shadow: var(--shadow-sm);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.daybox.drop-hover { border-color: var(--brand); background: var(--brand-soft); }
.daybox-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.7rem; }
.daybox-head .day-dot { width: 0.9rem; height: 0.9rem; border-radius: 50%; }
.daybox-head h3 { font-size: 1.2rem; }
.daybox-head .day-sub { margin-left: auto; font-size: 0.82rem; color: var(--ink-faint); }

.slot {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.6rem;
  border-radius: var(--r-sm); background: var(--surface-2); margin-bottom: 0.45rem;
  border: 1px solid transparent; cursor: grab;
  animation: screen-in 0.3s var(--ease) both;
}
.slot:active { cursor: grabbing; }
.slot.dragging { opacity: 0.4; }
.slot .s-num { width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; color: white; font-size: 0.78rem; font-weight: 700; flex: none; }
.slot .s-emoji { font-size: 1.1rem; }
.slot .s-body { flex: 1; min-width: 0; }
.slot .s-title { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot .s-hood { font-size: 0.78rem; color: var(--ink-faint); }
.slot .s-move { display: flex; gap: 0.15rem; }
.slot .s-move button { border: none; background: var(--surface); color: var(--ink-soft); width: 1.6rem; height: 1.6rem; border-radius: 6px; font-size: 0.8rem; box-shadow: var(--shadow-sm); }
.slot .s-move button:hover { color: var(--brand); }
.daybox-empty { font-size: 0.88rem; color: var(--ink-faint); padding: 0.5rem 0.2rem; font-style: italic; }

.s-days { display: flex; gap: 0.2rem; margin-left: 0.3rem; }
.da-chip {
  width: 1.6rem; height: 1.6rem; border-radius: 7px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink-soft); font-size: 0.78rem; font-weight: 700;
  display: grid; place-items: center; transition: transform 0.15s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.da-chip:hover { border-color: var(--ink-faint); color: var(--ink); transform: translateY(-1px); }
.da-chip.on { color: #fff; border-color: transparent; }

.pool { background: var(--surface-2); border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); padding: 1rem 1.15rem; }
.pool h3 { font-size: 1.05rem; margin-bottom: 0.6rem; color: var(--ink-soft); }
.pool.drop-hover { border-color: var(--brand); background: var(--brand-soft); }

.map-col { position: sticky; top: 80px; }
#map { width: 100%; height: clamp(380px, 60vh, 640px); border-radius: var(--r-lg); box-shadow: var(--shadow-md); border: 1px solid var(--line); z-index: 0; }
.map-legend { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 0.8rem; font-size: 0.85rem; }
.map-legend .lg { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--ink-soft); }
.map-legend .lg .lg-dot { width: 0.85rem; height: 0.85rem; border-radius: 50%; }

/* Leaflet custom marker */
.pin {
  width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  display: grid; place-items: center; box-shadow: 0 3px 8px oklch(0.2 0.05 30 / 0.4);
  border: 2px solid white;
}
.pin span { transform: rotate(45deg); color: white; font-weight: 700; font-size: 0.78rem; }
.pin.drop { animation: pin-drop 0.5s var(--ease); }
@keyframes pin-drop { 0% { transform: rotate(-45deg) translateY(-18px); opacity: 0; } 100% { transform: rotate(-45deg) translateY(0); opacity: 1; } }

/* ============================================================
   Final plan
   ============================================================ */
.plan-hero { text-align: center; padding: 1rem 0 2rem; }
.plan-hero .p-tag { color: var(--brand-deep); font-weight: 700; letter-spacing: 0.02em; }
.plan-hero h2 { font-size: clamp(2rem, 6vw, 3.4rem); margin: 0.4rem 0; }
.plan-hero .p-dates { font-size: 1.2rem; color: var(--ink-soft); }

.itinerary { display: flex; flex-direction: column; gap: 1.4rem; margin: 2rem 0; }
.itin-day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.itin-day-head { display: flex; align-items: center; gap: 0.7rem; padding: 1rem 1.3rem; border-bottom: 1px solid var(--line); }
.itin-day-head .day-dot { width: 1rem; height: 1rem; border-radius: 50%; }
.itin-day-head h3 { font-size: 1.35rem; }
.itin-day-head .id-count { margin-left: auto; font-size: 0.85rem; color: var(--ink-faint); }
.itin-stops { list-style: none; margin: 0; padding: 0.5rem 0; }
.itin-stop { display: flex; align-items: center; gap: 1rem; padding: 0.8rem 1.3rem; }
.itin-stop + .itin-stop { border-top: 1px dashed var(--line); }
.itin-stop .is-thumb { width: 64px; height: 64px; border-radius: var(--r-sm); flex: none; display: grid; place-items: center; font-size: 1.6rem; background-size: cover; background-position: center; }
.itin-stop .is-body { flex: 1; }
.itin-stop .is-title { font-weight: 600; font-size: 1.08rem; }
.itin-stop .is-meta { font-size: 0.85rem; color: var(--ink-faint); }
.itin-stop .is-blurb { font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.2rem; }

.plan-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; justify-content: center; margin: 1.5rem 0; }
.plan-note {
  text-align: center; max-width: 60ch; margin: 1.5rem auto 0; color: var(--ink-soft);
  font-family: var(--font-display); font-size: 1.15rem; font-style: italic;
}
#map-final { width: 100%; height: clamp(340px, 50vh, 520px); border-radius: var(--r-lg); box-shadow: var(--shadow-md); border: 1px solid var(--line); margin-top: 1rem; z-index: 0; }

/* ============================================================
   Toast + share dialog
   ============================================================ */
.toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: white; padding: 0.8rem 1.3rem; border-radius: 999px;
  font-size: 0.92rem; font-weight: 500; box-shadow: var(--shadow-lg); z-index: var(--z-toast);
  opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

dialog.share {
  border: none; border-radius: var(--r-lg); padding: 0; max-width: 520px; width: 92vw;
  box-shadow: var(--shadow-lg); color: var(--ink); background: var(--surface);
}
dialog.share::backdrop { background: oklch(0.2 0.04 300 / 0.45); backdrop-filter: blur(3px); }
.share-inner { padding: 1.8rem; }
.share-inner h3 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.share-inner p { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 1.1rem; }
.share-field { display: flex; gap: 0.5rem; margin-bottom: 0.7rem; }
.share-field textarea, .share-field input {
  flex: 1; font-family: var(--font-body); font-size: 0.88rem; border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); padding: 0.7rem; resize: none; color: var(--ink); background: var(--surface-2);
}
.share-close { margin-top: 0.5rem; }

/* ============================================================
   Confetti canvas
   ============================================================ */
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: var(--z-confetti); }

/* ============================================================
   Responsive tweaks
   ============================================================ */
@media (max-width: 999px) {
  .rail { position: static; }
  .map-col { position: static; }
}

/* Phones: let the planner slot controls wrap instead of overflowing */
@media (max-width: 600px) {
  .slot { flex-wrap: wrap; row-gap: 0.5rem; }
  .slot .s-body { flex: 1 1 55%; }
  .s-days { margin-left: 2.1rem; flex-wrap: wrap; }
  .slot .s-move { margin-left: auto; }
  .share-field { flex-direction: column; }
  .share-field .btn { width: 100%; }
  .plan-actions .btn { flex: 1 1 100%; }
}

/* ============================================================
   Print – the itinerary as a clean handout
   ============================================================ */
@media print {
  .topbar, .actionbar, .plan-actions, .blob, .float-emoji, #map, .map-legend, #confetti { display: none !important; }
  body { background: white; }
  .screen:not(.is-active) { display: none; }
  .itin-day { box-shadow: none; break-inside: avoid; }
  #map-final { break-inside: avoid; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .screen { animation: none; }
  .float-emoji { animation: none; }
}
