/* USA 2027 — design tokens
   Americana road-trip palette: bold navy/red/gold on a warm cream ground,
   with sage reserved for positive/paid states. Real flags carry the
   "American" identity now (masthead bunting + title), so color can lean
   bolder than a purely referential highway-sign palette would allow. */
:root{
  --paper: #F7EFDD;
  --ink: #241D15;
  --navy: #1B2A4A;
  --navy-deep: #101B32;
  --red: #C8362E;
  --gold: #E8A93A;
  --sage: #4F7A5B;

  --navy-08: rgba(27,42,74,0.07);
  --navy-10: rgba(27,42,74,0.08);
  --navy-20: rgba(27,42,74,0.12);
  --navy-40: rgba(27,42,74,0.35);
  --gold-18: rgba(232,169,58,0.2);
  --gold-30: rgba(232,169,58,0.4);
  --red-10: rgba(200,54,46,0.1);
  --red-30: rgba(200,54,46,0.35);
  --sage-15: rgba(79,122,91,0.16);
  --ink-60: rgba(36,29,21,0.62);
  --ink-40: rgba(36,29,21,0.4);
  --line: rgba(36,29,21,0.16);

  --font-head: 'Bevan', 'Georgia', serif;
  --font-label: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;

  --fs-h1: 2.1rem;
  --fs-h2: 1.4rem;
  --fs-h3: 1.1rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-tiny: 0.75rem;

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
  --radius: 6px;
}

*{ box-sizing: border-box; }
/* An author rule setting `display` on an element (e.g. .auth-screen{display:flex})
   otherwise beats the UA stylesheet's [hidden]{display:none} outright, since
   author origin always wins regardless of specificity — so toggling the
   `hidden` attribute alone wouldn't hide it. This restores that. */
[hidden]{ display:none !important; }
html,body{ margin:0; padding:0; }
body{
  background: var(--paper);
  background-image: radial-gradient(rgba(36,29,21,0.035) 1px, transparent 1px);
  background-size: 3px 3px;
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3{ font-family: var(--font-head); font-weight:400; margin:0; letter-spacing:0.01em; text-wrap: balance; }
h1{ font-size: var(--fs-h1); }
h2{ font-size: var(--fs-h2); }
h3{ font-size: var(--fs-h3); }
p{ margin:0; }
a{ color: var(--navy); }
button{ font-family: var(--font-body); cursor:pointer; }
input,select,textarea{ font-family: var(--font-body); }

.tabular{ font-variant-numeric: tabular-nums; }
.label{ font-family: var(--font-label); text-transform:uppercase; letter-spacing:0.05em; }

button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, [tabindex]:focus-visible{
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; animation:none !important; }
}

/* ---------------- bunting: real flags on a string ---------------- */
.bunting{
  display:flex; justify-content:center; overflow:hidden; background: var(--navy-deep);
  line-height:0; padding-top:6px; position:relative;
}
.bunting::before{ content:''; position:absolute; top:14px; left:0; right:0; height:1px; background: rgba(247,239,221,0.35); }
.bunting-row{ display:flex; align-items:flex-start; }
.flag-flutter{ width:30px; height:auto; margin:0 3px; flex-shrink:0; transform-origin:top center; filter: drop-shadow(0 3px 3px rgba(0,0,0,0.25)); }
.flag-flutter:nth-child(odd){ transform: rotate(-3deg) translateY(1px); }
.flag-flutter:nth-child(even){ transform: rotate(3deg); }

/* ---------------- layout shell ---------------- */
.app-header{
  background: var(--navy);
  color: var(--paper);
}
.app-header-top{
  max-width: 880px; margin:0 auto; padding: var(--sp-4) var(--sp-4) var(--sp-3);
  display:flex; align-items:flex-start; justify-content:space-between; gap: var(--sp-3); flex-wrap:wrap;
}
.brand{ display:flex; flex-direction:column; gap:4px; }
.eyebrow{ font-family: var(--font-label); font-size: var(--fs-tiny); letter-spacing:0.16em; text-transform:uppercase; color: var(--gold); font-weight:600; }
.brand-title{
  font-family: var(--font-head); font-size:2.2rem; font-weight:400; color: var(--paper);
  display:flex; align-items:center; gap:10px; line-height:1;
}
.title-flag{ width:34px; height:auto; flex-shrink:0; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3)); transform: rotate(-4deg); }
.title-flag-r{ transform: rotate(4deg) scaleX(-1); }
.brand-sub{ font-family: var(--font-label); font-size: var(--fs-small); letter-spacing:0.02em; color: rgba(247,239,221,0.65); }

/* Slim strip above the main header — account controls are page-level, not
   part of the trip-specific header content below it. */
.utility-bar{
  background: var(--navy-deep); display:flex; align-items:center; justify-content:flex-end;
  gap:10px; padding:7px var(--sp-4);
}
.signed-in-as{
  font-family: var(--font-label); font-size: var(--fs-tiny); color: rgba(247,239,221,0.5);
  max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.signout-btn{
  background:transparent; border:1px solid rgba(247,239,221,0.3); color: rgba(247,239,221,0.75);
  font-family: var(--font-label); font-size: var(--fs-tiny); font-weight:600; letter-spacing:0.03em;
  text-transform:uppercase; padding:5px 12px; border-radius:999px; white-space:nowrap; flex-shrink:0;
}
.signout-btn:hover{ border-color: var(--paper); color: var(--paper); }
.export-btn{
  background:transparent; border:1px solid rgba(232,169,58,0.5); color: var(--gold);
  font-family: var(--font-label); font-size: var(--fs-tiny); font-weight:600; letter-spacing:0.03em;
  text-transform:uppercase; padding:5px 12px; border-radius:999px; white-space:nowrap; flex-shrink:0;
}
.export-btn:hover{ border-color: var(--gold); background: rgba(232,169,58,0.12); }
.install-btn{
  background:transparent; border:1px solid rgba(79,122,91,0.6); color: var(--sage);
  font-family: var(--font-label); font-size: var(--fs-tiny); font-weight:600; letter-spacing:0.03em;
  text-transform:uppercase; padding:5px 12px; border-radius:999px; white-space:nowrap; flex-shrink:0;
}
.install-btn:hover{ border-color: var(--sage); background: rgba(79,122,91,0.18); }

.install-instructions{
  background: var(--navy-deep); padding: var(--sp-3) var(--sp-4); position:relative;
  border-top:1px solid rgba(247,239,221,0.12);
}
.install-instructions-inner{ max-width:480px; margin:0 auto; color: rgba(247,239,221,0.9); }
.install-instructions-inner p.eyebrow{ margin:0 0 8px; }
.install-instructions-inner ol{ margin:0; padding-left:20px; font-size: var(--fs-small); line-height:1.6; }
.install-instructions-inner li{ margin-bottom:4px; }
.install-instructions-inner li:last-child{ margin-bottom:0; }
.install-instructions-close{
  position:absolute; top:10px; right:14px; background:transparent; border:none;
  color: rgba(247,239,221,0.5); font-size:1.3rem; line-height:1; cursor:pointer; padding:4px;
}
.install-instructions-close:hover{ color: var(--paper); }

.currency-toggle{ display:flex; align-items:center; gap: var(--sp-2); flex-shrink:0; }
.currency-toggle .fx-note{ font-family: var(--font-label); font-size: var(--fs-tiny); color: rgba(247,239,221,0.55); white-space:nowrap; }
.toggle-pair{ display:inline-flex; background: rgba(247,239,221,0.12); border-radius: 999px; padding:3px; }
.toggle-pair button{
  border:none; background:transparent; color: rgba(247,239,221,0.65); font-family: var(--font-label);
  font-size: var(--fs-small); font-weight:600; letter-spacing:0.02em; padding:6px 14px; border-radius:999px;
}
.toggle-pair button.is-active{ background: var(--gold); color: var(--navy-deep); }
.fx-edit-form{ display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
.fx-edit-row{ display:flex; align-items:center; gap:6px; }
.fx-edit-form input{ width:76px; padding:5px 8px; font-size: var(--fs-small); border-radius:6px; border:none; }
.fx-edit-form button{ font-family: var(--font-label); font-size: var(--fs-tiny); padding:5px 10px; border-radius:999px; border:none; font-weight:700; letter-spacing:0.02em; }
.fx-edit-form .fx-save{ background: var(--gold); color: var(--navy-deep); }
.fx-edit-form .fx-cancel{ background: transparent; color: rgba(247,239,221,0.7); }
.fx-live-hint{ font-family: var(--font-label); font-size:0.68rem; color: rgba(247,239,221,0.6); white-space:nowrap; }
.fx-live-hint button{
  background:transparent; border:none; color: var(--gold); font-weight:700; text-decoration:underline;
  padding:0; font-family: var(--font-label); font-size:0.68rem; cursor:pointer;
}
.fx-edit-btn{
  background:transparent; border:1px solid rgba(247,239,221,0.3); color: rgba(247,239,221,0.75);
  border-radius:999px; width:26px; height:26px; font-size:0.8rem; line-height:1;
}
.fx-edit-btn:hover{ border-color: var(--paper); color: var(--paper); }

/* ---- masthead strip: countdown + postmark stamps for the four legs ---- */
.masthead-strip{ max-width:880px; margin:0 auto; padding: 0 var(--sp-4) var(--sp-4); }
.countdown-slot{ display:flex; align-items:baseline; gap:10px; margin-bottom: var(--sp-4); }
.countdown-slot .num{ font-family: var(--font-head); font-size:2.4rem; font-weight:400; line-height:1; color: var(--gold); }
.countdown-slot .unit{ font-family: var(--font-label); font-size: var(--fs-small); color: rgba(247,239,221,0.7); letter-spacing:0.02em; }

.stamp-row{ display:flex; gap: var(--sp-3); flex-wrap:wrap; }
.stamp{
  width:110px; height:110px; border-radius:50%; border:2px dashed rgba(247,239,221,0.55);
  display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center;
  padding:0 8px; transform: rotate(var(--tilt,0deg)); flex-shrink:0;
}
.stamp:nth-child(4n+1){ --tilt:-4deg; } .stamp:nth-child(4n+2){ --tilt:3deg; }
.stamp:nth-child(4n+3){ --tilt:-3deg; } .stamp:nth-child(4n+4){ --tilt:4deg; }
.stamp.is-current{ border-color: var(--gold); border-style:solid; }
.stamp .stamp-no{ font-family: var(--font-label); font-size:0.58rem; letter-spacing:0.1em; color: var(--gold); font-weight:700; }
.stamp .stamp-city{ font-family: var(--font-head); font-size:0.92rem; line-height:1.05; margin-top:2px; padding:0 6px; color: var(--paper); }
.stamp .stamp-dates{ font-family: var(--font-label); font-size:0.56rem; line-height:1.2; color: rgba(247,239,221,0.6); margin-top:3px; }

/* ---- stops (legs) panel, in the masthead so it lives where the stamps do ---- */
.stops-toggle{
  margin-top:14px; background:transparent; border:1.5px dashed rgba(247,239,221,0.35);
  color: rgba(247,239,221,0.75); font-family: var(--font-label); font-size: var(--fs-small);
  font-weight:600; letter-spacing:0.03em; text-transform:uppercase; padding:8px 16px; border-radius:999px;
}
.stops-toggle:hover{ border-color: var(--gold); color: var(--gold); }
.stops-panel{ margin-top:14px; padding-top:14px; border-top:1px solid rgba(247,239,221,0.16); }
.stop-row{ display:flex; align-items:center; gap:10px; padding:9px 0; border-bottom:1px solid rgba(247,239,221,0.1); }
.stop-row:last-of-type{ border-bottom:none; }
.stop-row-main{ flex:1; min-width:0; }
.stop-row-name{ font-family: var(--font-head); font-size:1rem; font-weight:400; color: var(--paper); }
.stop-row-meta{ font-family: var(--font-label); font-size: var(--fs-tiny); color: rgba(247,239,221,0.55); margin-top:2px; }
.stop-row-actions{ display:flex; align-items:center; gap:2px; flex-shrink:0; }
.stop-row-actions button{
  background:transparent; border:none; color: rgba(247,239,221,0.6); width:26px; height:26px;
  border-radius:7px; font-size:0.85rem; display:flex; align-items:center; justify-content:center;
}
.stop-row-actions button:hover{ background: rgba(247,239,221,0.14); color: var(--paper); }
.stop-row-actions button:disabled{ opacity:0.3; }
.stop-form{
  background: rgba(16,27,50,0.55); border:1px solid rgba(247,239,221,0.22); border-radius: var(--radius);
  padding: var(--sp-4); margin-top:10px; display:flex; flex-direction:column; gap: var(--sp-3);
}
.stop-form .field label{ color: rgba(247,239,221,0.6); }
.stop-form .field-checkbox label{ color: rgba(247,239,221,0.8); text-transform:none; font-family: var(--font-body); font-size: var(--fs-small); }
/* .btn-quiet is styled for a light form on a light page — on this dark
   masthead form its navy text was nearly invisible against the dark
   background. */
.stop-form .btn-quiet{ color: rgba(247,239,221,0.8); border-color: rgba(247,239,221,0.35); }
.stop-form .btn-quiet:hover{ border-color: var(--paper); color: var(--paper); }

/* ---- tab bar ---- */
/* Only the slim tab strip stays pinned on scroll — the flags/title/
   countdown/stamps above it scroll away, so the fixed part of the header
   stays a single row instead of eating half the screen. Full-bleed
   background so the pinned strip doesn't show page background at its
   edges on screens wider than the 880px content column. */
.app-nav{
  background: var(--navy-deep);
  position: sticky; top:0; z-index:20;
  box-shadow: 0 2px 0 var(--gold);
  display:flex; overflow-x:auto;
}
.app-nav-inner{
  max-width:880px; margin:0 auto; padding: 0 var(--sp-4);
  display:flex; gap: var(--sp-1);
}
.app-nav a{
  flex-shrink:0; text-decoration:none; color: rgba(247,239,221,0.6); font-family: var(--font-label);
  font-size: var(--fs-small); font-weight:600; letter-spacing:0.04em; text-transform:uppercase;
  padding: var(--sp-3) var(--sp-3) 10px; border-bottom: 3px solid transparent;
}
.app-nav a.is-active{ color: var(--paper); border-bottom-color: var(--gold); }
.app-nav a:hover{ color: var(--paper); }

.app-main{ max-width:880px; margin:0 auto; padding: var(--sp-5) var(--sp-4) var(--sp-7); }

.page-head{ margin-bottom: var(--sp-5); }
.page-head p.lede{ margin-top:4px; color: var(--ink-60); font-size: var(--fs-small); }

/* ---------------- toast ---------------- */
#toast-host{
  position: fixed; left:50%; bottom: var(--sp-5); transform:translateX(-50%);
  z-index: 100; display:flex; flex-direction:column; gap: var(--sp-2); align-items:center;
  pointer-events:none;
}
.toast{
  background: var(--ink); color: var(--paper); font-family: var(--font-label); font-size: var(--fs-small); font-weight:600;
  letter-spacing:0.02em; padding: 10px 18px; border-radius:999px; box-shadow: 0 8px 24px -8px rgba(0,0,0,0.4);
  opacity:0; transform: translateY(8px); transition: opacity 0.18s ease, transform 0.18s ease;
}
.toast.is-visible{ opacity:1; transform:translateY(0); }

/* ---------------- section ---------------- */
.section{ margin-bottom: var(--sp-6); }
.section-head{ display:flex; align-items:baseline; justify-content:space-between; gap: var(--sp-3); margin-bottom: var(--sp-3); border-bottom: 2px solid var(--ink); padding-bottom:8px; }
.section-head h2{ color: var(--navy); }
.section-note{ font-family: var(--font-label); font-size: var(--fs-tiny); color: var(--ink-40); letter-spacing:0.02em; }

/* ---------------- buttons ---------------- */
.btn{
  display:inline-flex; align-items:center; gap:6px; border-radius:999px; border:none;
  font-family: var(--font-label); font-size: var(--fs-small); font-weight:600; letter-spacing:0.02em;
  text-transform:uppercase; padding: 9px 16px; white-space:nowrap;
}
.btn-primary{ background: var(--navy); color: var(--paper); }
.btn-primary:hover{ background: var(--navy-deep); }
.btn-quiet{ background:transparent; color: var(--navy); border:1.5px solid var(--navy-40); }
.btn-quiet:hover{ border-color: var(--navy); }
.btn-danger{ background:transparent; color: var(--red); }
.btn-danger:hover{ text-decoration:underline; }
.btn-sm{ padding:6px 12px; font-size: var(--fs-tiny); }
.btn-block{ width:100%; justify-content:center; }

.add-affordance{
  width:100%; text-align:left; background: transparent; border:2px dashed var(--navy-40);
  color: var(--navy); font-family: var(--font-label); font-weight:600; font-size: var(--fs-small);
  letter-spacing:0.02em; text-transform:uppercase; padding: 13px 16px; border-radius: var(--radius);
}
.add-affordance:hover{ border-color: var(--red); color: var(--red); background: var(--red-10); }

/* ---------------- forms ---------------- */
.field{ display:flex; flex-direction:column; gap:5px; }
.field label{ font-family: var(--font-label); font-size: var(--fs-tiny); font-weight:600; letter-spacing:0.04em; color: var(--ink-40); text-transform:uppercase; }
.field input, .field select, .field textarea{
  background: #fffdf7; border:1px solid var(--line); border-radius:6px; padding:9px 11px;
  font-size: var(--fs-body); color: var(--ink); width:100%;
}
.field textarea{ resize:vertical; min-height:64px; }
.field-row{ display:grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.field-checkbox{ flex-direction:row; align-items:center; gap:8px; }
.field-checkbox input{ width:18px; height:18px; accent-color: var(--navy); flex:none; }
.field-checkbox label{ text-transform:none; font-family: var(--font-body); font-size: var(--fs-small); color: var(--ink); }

.inline-form{
  background: #fffdf7; border:1.5px solid var(--line); border-radius: var(--radius);
  padding: var(--sp-4); display:flex; flex-direction:column; gap: var(--sp-3); margin-top: var(--sp-3);
}
.form-actions{ display:flex; gap: var(--sp-2); justify-content:flex-end; margin-top:2px; }

/* ---------------- pills / badges ---------------- */
.pill{
  display:inline-flex; align-items:center; gap:4px; font-family: var(--font-label); font-size: var(--fs-tiny);
  font-weight:700; letter-spacing:0.03em; text-transform:uppercase; padding:4px 10px; border-radius:999px; white-space:nowrap;
}
.pill-placeholder{ background: var(--navy-08); color: var(--ink-60); border:1.5px dashed var(--navy-40); }
.pill-held{ background: var(--gold-18); color:#8a5f14; }
.pill-booked{ background: var(--sage); color: var(--paper); }
.pill-paid{ background: var(--sage-15); color: var(--sage); }
.pill-unpaid{ background: var(--red-10); color: var(--red); }
.pill-fixed{ background: var(--red); color: #fff; }
.pill-planned{ background: var(--navy-08); color: var(--navy); }
.pill-idea{ background: transparent; color: var(--ink-40); border:1.5px dashed var(--line); }

/* ---------------- placeholder rows: unmistakably provisional ---------------- */
.is-placeholder-row{
  background: repeating-linear-gradient(135deg, var(--navy-08) 0 6px, transparent 6px 12px);
  border: 2px dashed var(--navy-40) !important;
}

/* ---------------- generic row/card ---------------- */
.row-card{
  background:#fffdf7; border:1.5px solid var(--line); border-radius: var(--radius);
  padding: var(--sp-4); margin-bottom: var(--sp-3);
}
.row-card-head{ display:flex; align-items:flex-start; justify-content:space-between; gap: var(--sp-3); }
.row-card-title{ font-family: var(--font-head); font-size:1.15rem; font-weight:400; color: var(--navy); }
.row-card-meta{ font-family: var(--font-label); font-size: var(--fs-small); color: var(--ink-60); margin-top:2px; }
.row-card-actions{ display:flex; gap:4px; flex-shrink:0; }
.icon-btn{
  background:transparent; border:none; color: var(--ink-40); width:28px; height:28px;
  border-radius:7px; display:flex; align-items:center; justify-content:center; font-size:0.95rem;
}
.icon-btn:hover{ background: var(--navy-08); color: var(--navy); }

/* ---------------- money ---------------- */
.money{ font-variant-numeric: tabular-nums; font-weight:600; white-space:nowrap; }
.money-converted{ color: var(--ink-40); font-weight:400; }

/* ---------------- tables (Costs screen) ---------------- */
.data-table{ width:100%; border-collapse:collapse; font-size: var(--fs-small); }
.data-table th, .data-table td{ padding: 9px 10px; border-bottom:1px solid var(--line); text-align:left; }
.data-table th{ font-family: var(--font-label); font-size: var(--fs-tiny); text-transform:uppercase; letter-spacing:0.03em; color: var(--ink-40); font-weight:700; }
.data-table td.num, .data-table th.num{ text-align:right; font-variant-numeric: tabular-nums; }
.data-table tr.total-row td{ font-weight:700; border-top:2px solid var(--ink); border-bottom:none; }
.table-scroll{ overflow-x:auto; }

/* ---------------- empty state ---------------- */
.empty-state{
  border:2px dashed var(--line); border-radius: var(--radius); padding: var(--sp-5);
  text-align:center; color: var(--ink-40); font-size: var(--fs-small);
}
.empty-state strong{ display:block; color: var(--ink); font-size: var(--fs-body); margin-bottom:4px; font-family: var(--font-body); }

/* ---------------- Overview ---------------- */
.stat-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); margin-bottom: var(--sp-5); }
.stat-tile{ background: var(--navy); color: var(--paper); border-radius: var(--radius); padding: var(--sp-4); }
.stat-tile .stat-label{ font-family: var(--font-label); font-size: var(--fs-tiny); text-transform:uppercase; letter-spacing:0.06em; color: rgba(247,239,221,0.7); margin-bottom:8px; font-weight:700; }
.stat-tile .stat-value{ font-family: var(--font-head); font-size:1.7rem; font-weight:400; color: var(--gold); }
.stat-tile.is-callout{ background: var(--red); }
.stat-tile.is-callout .stat-value{ color: var(--paper); }

.notice{ border:2px solid var(--red); border-radius: var(--radius); padding:16px 18px; background: var(--red-10); display:flex; flex-direction:column; gap:10px; }
.notice-row{ display:flex; justify-content:space-between; gap:10px; font-size:0.92rem; }
.notice-row b{ color: var(--red); }

.list-plain{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap: var(--sp-2); }
.list-plain li{ display:flex; align-items:center; justify-content:space-between; gap: var(--sp-3); background:#fffdf7; border:1.5px solid var(--line); border-radius:6px; padding:10px 14px; font-size: var(--fs-small); }

/* A shared item card needs several stacked lines (date/type, title, place,
   notes, cost) rather than the single-row layout list-plain li assumes. */
.list-plain li.shared-item{ display:block; }
.shared-item-head{ display:flex; align-items:center; justify-content:space-between; gap: var(--sp-2); }
.shared-item-date{ font-family: var(--font-label); font-size: var(--fs-small); color: var(--ink-60); }
.shared-item-title{ font-weight:600; margin-top:4px; }

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

/* ---------------- Itinerary ---------------- */
.day-group{ margin-bottom: var(--sp-5); }
.day-group-head{ display:flex; align-items:baseline; gap: var(--sp-2); margin-bottom: var(--sp-2); padding-bottom:7px; border-bottom:2px solid var(--ink); }
.day-group-head .dow{ font-family: var(--font-head); font-size:1.3rem; font-weight:400; color: var(--navy); }
.day-group-head .full-date{ font-family: var(--font-label); font-size: var(--fs-small); color: var(--ink-40); }
.day-group-head .leg-tag{ margin-left:auto; font-family: var(--font-label); font-size: var(--fs-tiny); font-weight:700; color: var(--ink-40); text-transform:uppercase; letter-spacing:0.05em; }

/* Collapsed by default so someone else's plan never competes with your own
   for attention -- expands in place to the same card used on Overview. */
.also-badge{
  display:inline-flex; align-items:center; gap:6px; background: var(--gold-18); color:#8a5f14;
  border:none; border-radius:999px; font-family: var(--font-label); font-size: var(--fs-tiny);
  font-weight:600; letter-spacing:0.02em; padding:5px 12px; margin-bottom: var(--sp-2);
}
.also-detail{ margin-bottom: var(--sp-3); }

.itin-item{ display:flex; gap: var(--sp-3); padding: 10px 0; border-bottom:1px solid var(--line); }
.itin-item:last-of-type{ border-bottom:none; }
.itin-item.type-fixed{ background: var(--red-10); margin: 0 -14px; padding: 12px 14px; border-radius:6px; border-bottom:none; border-left:4px solid var(--red); }
.itin-item-time{ flex-shrink:0; width:52px; font-family: var(--font-label); font-size: var(--fs-tiny); color: var(--ink-40); font-weight:600; padding-top:2px; }
.itin-item.type-fixed .itin-item-time{ color: var(--red); }
.itin-item-body{ flex:1; min-width:0; }
.itin-item-title{ font-weight:600; font-size: var(--fs-body); display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.itin-item.type-idea .itin-item-title{ color: var(--ink-60); font-style:italic; }
.itin-item-meta{ font-family: var(--font-label); font-size: var(--fs-tiny); color: var(--ink-40); margin-top:2px; display:flex; gap:8px; flex-wrap:wrap; }
.itin-item-actions{ display:flex; gap:2px; flex-shrink:0; }
.reorder-btns{ display:flex; flex-direction:column; }
.reorder-btns button{ height:14px; line-height:1; font-size:0.6rem; }

.add-form-actions{ display:flex; gap:8px; }

/* ---- itinerary options (choice groups) ---- */
.choice-toggle{ display:flex; gap:6px; flex-wrap:wrap; margin-bottom:10px; }
.choice-pill{
  font-family: var(--font-label); font-size: var(--fs-tiny); font-weight:600; letter-spacing:0.02em;
  padding:6px 13px; border-radius:999px; border:1.5px solid var(--navy-40); background:#fff; color: var(--ink-60);
}
.choice-pill:hover{ border-color: var(--navy); }
.choice-pill.is-active{ background: var(--navy); color: var(--paper); border-color: var(--navy); }
.itin-item-actions-inline{ display:flex; gap:14px; flex-wrap:wrap; margin-top:8px; }
.itin-item-actions-inline button{
  background:transparent; border:none; padding:0; font-family: var(--font-label); font-size:0.68rem;
  font-weight:600; letter-spacing:0.03em; text-transform:uppercase; color: var(--ink-40);
}
.itin-item-actions-inline button:hover{ color: var(--navy); text-decoration:underline; }
.choice-card .inline-form{ margin-top:10px; }

/* ---------------- Bookings ---------------- */
.tabs{ display:flex; gap: var(--sp-3); margin-bottom: var(--sp-4); border-bottom:1.5px solid var(--line); }
.tabs button{ background:transparent; border:none; font-family: var(--font-label); font-size: var(--fs-body); font-weight:600; letter-spacing:0.02em; text-transform:uppercase; color: var(--ink-40); padding: 9px 4px; border-bottom:3px solid transparent; margin-bottom:-1.5px; }
.tabs button.is-active{ color: var(--navy); border-bottom-color: var(--red); }

.booking-row-grid{ display:grid; grid-template-columns: 1fr auto; gap: var(--sp-3); }
.gym-flag{ display:inline-flex; align-items:center; gap:4px; font-family: var(--font-label); font-size: var(--fs-tiny); font-weight:700; letter-spacing:0.03em; text-transform:uppercase; color: var(--sage); background: var(--sage-15); padding:4px 10px; border-radius:999px; }
.gym-flag.is-missing{ color: var(--red); background: var(--red-10); }

/* ---------------- Places ---------------- */
.filter-bar{ display:flex; flex-wrap:wrap; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.filter-chip{ font-family: var(--font-label); font-size: var(--fs-small); font-weight:600; letter-spacing:0.02em; padding:6px 14px; border-radius:999px; border:1.5px solid var(--navy-40); background:#fffdf7; color: var(--ink-60); }
.filter-chip.is-active{ background: var(--navy); color: var(--paper); border-color: var(--navy); }

.place-grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--sp-3); }
.place-card{ background:#fffdf7; border:1.5px solid var(--line); border-radius: var(--radius); padding: var(--sp-4); display:flex; flex-direction:column; gap:8px; }
.place-card-top{ display:flex; justify-content:space-between; align-items:flex-start; gap:8px; }
.place-name{ font-family: var(--font-head); font-size:1.1rem; font-weight:400; color: var(--navy); }
.place-category{ font-family: var(--font-label); font-size: var(--fs-tiny); text-transform:uppercase; letter-spacing:0.04em; color: var(--ink-40); font-weight:700; }
.place-rating{ font-family: var(--font-label); font-size: var(--fs-small); font-weight:700; color:#8a5f14; white-space:nowrap; }
.place-rating .unrated{ color: var(--ink-40); font-weight:600; font-style:italic; text-transform:none; letter-spacing:0; font-family: var(--font-body); }
.place-desc{ font-size: var(--fs-small); color: var(--ink); }
.place-meta-row{ display:flex; justify-content:space-between; align-items:center; font-size: var(--fs-small); }
.place-maps-link{ font-family: var(--font-label); font-size: var(--fs-small); font-weight:600; color: var(--navy); border-bottom:1px dotted var(--navy); }
.place-card-actions{ display:flex; gap:6px; margin-top:4px; flex-wrap:wrap; }

.rejected-toggle{ width:100%; text-align:left; background:transparent; border:none; border-top:1.5px solid var(--line); padding: var(--sp-3) 0; font-family: var(--font-label); font-weight:700; letter-spacing:0.03em; text-transform:uppercase; color: var(--ink-40); font-size: var(--fs-small); margin-top: var(--sp-4); }
.rejected-list .place-card{ opacity:0.75; }
.rejected-reason{ font-family: var(--font-label); font-size: var(--fs-tiny); color: var(--red); }

/* ---------------- Checklist ---------------- */
.checklist-group{ margin-bottom: var(--sp-5); }
.checklist-group h3{ margin-bottom: var(--sp-2); color: var(--navy); }
.check-row{ display:flex; align-items:flex-start; gap:10px; padding:9px 0; border-bottom:1px solid var(--line); }
.check-row input[type="checkbox"]{ width:19px; height:19px; accent-color: var(--navy); margin-top:2px; flex-shrink:0; }
.check-row.is-done .check-title{ text-decoration:line-through; color: var(--ink-40); }
.check-title{ font-weight:600; font-size: var(--fs-body); }
.check-meta{ font-family: var(--font-label); font-size: var(--fs-tiny); color: var(--ink-40); margin-top:2px; }

/* ---------------- auth / onboarding screens ---------------- */
.auth-screen{
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  padding: var(--sp-5); background: var(--paper);
}
.auth-card{
  max-width:380px; width:100%; background:#fffdf7; border:1.5px solid var(--line);
  border-radius: var(--radius); padding: var(--sp-6) var(--sp-5); text-align:center;
}
.auth-card .eyebrow{ color:#8a6a34; }
.auth-title{
  display:flex; align-items:center; justify-content:center; gap:10px;
  font-family: var(--font-head); font-size:1.8rem; font-weight:400; color: var(--navy);
  margin:8px 0 14px;
}
.auth-title .title-flag{ width:30px; transform:none; filter:none; }
.auth-lede{ font-size: var(--fs-small); color: var(--ink-60); margin-bottom: var(--sp-4); line-height:1.5; }
.auth-form{ display:flex; flex-direction:column; gap: var(--sp-3); text-align:left; }
.auth-sent{ margin-top: var(--sp-4); }
.form-error{ color: var(--red); font-size: var(--fs-small); margin:0; }

/* ---------------- responsive ---------------- */
@media (max-width: 640px){
  .brand-title{ font-size:1.6rem; }
  .title-flag{ width:26px; }
  .signed-in-as{ max-width:52vw; }
  .stat-grid{ grid-template-columns: 1fr 1fr; }
  .field-row{ grid-template-columns: 1fr; }
  .countdown-slot .num{ font-size:1.8rem; }
  .stamp{ width:88px; height:88px; }
  .place-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 420px){
  .stat-grid{ grid-template-columns: 1fr; }
}
