/* =========================================================
   home.css — homepage layout

   Home uses .page-grid (12-col, defined in shell.css) with three modules:
   - .module--day            (span 5, col 1, row 1) — date + mini-month + trip-strip
   - .module--capture-stream (span 7, col 6, row 1-2) — capture + recently saved
   - .module--launchers      (span 5, col 1, row 2) — trip-launch + juice link

   Layout:
              col 1               col 2
     row 1: [ day module    ] [ capture+stream    ]
     row 2: [ launchers     ] [ ... continuation  ]

   The capture-stream module spans BOTH rows (grid-row: 1 / 3) so it can
   grow tall without forcing a row break.

   Tablet (721-1100): single column. Order: day, capture-stream, launchers.
   Mobile (<=720): single column. Order: capture-stream FIRST, launchers,
   day module HIDDEN.
   ========================================================= */

.page-home {
  padding-top: var(--space-9);   /* 80px */
}

/* Desktop layout: 5/7 split — day+launchers in left (span 5), capture-stream in right (span 7). */
.module--day {
  grid-column: 1 / span 5;
  grid-row: 1;
}
.module--capture-stream {
  grid-column: 6 / span 7;
  grid-row: 1 / span 2;
}
.module--launchers {
  grid-column: 1 / span 5;
  grid-row: 2;
}

/* Tablet (721-1100): all modules full-width, stacked.
   Order: day, capture-stream, launchers. */
@media (max-width: 1100px) and (min-width: 721px) {
  .module--day,
  .module--capture-stream,
  .module--launchers {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .module--day        { order: 1; }
  .module--capture-stream { order: 2; }
  .module--launchers  { order: 3; }
}

/* Mobile (<=720): day module HIDDEN entirely.
   Order: capture-stream first (primary), launchers below. */
@media (max-width: 720px) {
  .page-home {
    padding-top: var(--space-7);   /* 32px */
  }

  /* Reset grid placement so `order` reflow can work cleanly */
  .module--day,
  .module--capture-stream,
  .module--launchers {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  /* Day module fully hidden on mobile per design decision.
     Date/moon/DOY context is carried by the slim header. */
  .module--day,
  .module--day .day-sum,
  #day-sum {
    display: none !important;
  }

  /* Mobile flow order */
  .module--capture-stream { order: 1; }
  .module--launchers      { order: 2; }

  .capture-wrap { max-width: none !important; }
  .capture { padding: 14px 16px; }
  /* Mobile capture: bigger font, line-height + min-height scale together
     so the click target matches the text. iOS zoom rule already forces 16px,
     this ensures the surrounding box is sized for it. */
  .capture__input {
    font-size: var(--text-medium);
    line-height: 26px;
    min-height: 26px;
  }
  .capture__plus {
    font-size: var(--text-medium);
    line-height: 26px;
  }
}

/* =========================================================
   DAY SUMMARY (left column)
   ========================================================= */
.day-sum {}
.day-sum__head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}
.day-sum__date {
  font-size: clamp(26px, 2.6vw, 32px);
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0;
  line-height: 1.15;
}
.day-sum__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: var(--text-small);
  color: var(--ink-2);
  letter-spacing: 0.02em;
  flex-wrap: wrap;
}
.day-sum__meta .item { display: inline-flex; align-items: center; gap: 6px; }
.day-sum__meta .sep { color: var(--ink-3); }
@media (max-width: 720px) {
  .day-sum__meta { font-size: var(--text-small); }
}
.moon-wrap {
  display: inline-flex;
  align-items: center;
}
.moon {
  display: inline-block;
  width: 10px; height: 10px;
  vertical-align: -1px;
}
/* ===== Active trip strip + trip-now: REMOVED in C6.5.
   Trip access on home is the launcher button "Open trip" only.
   These styles are gone — to restore, see git history before C6.5. ===== */

.day-sum__section {
  padding: 14px 0;
  border-top: 1px solid var(--rule);
}
.day-sum__section:first-of-type { border-top: 0; }
.day-sum__section__label {
  font-size: var(--text-tiny);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
  font-weight: 500;
}

/* note button — opens the overlay editor */
.note-btn {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 8px 0;
  cursor: pointer;
  color: var(--ink);
  transition: color var(--ease-quick);
}
.note-btn:hover { color: var(--accent); }
.note-btn:hover .note-btn__arrow { color: var(--accent); transform: translateX(2px); }
.note-btn__preview {
  font-size: var(--text-body);
  letter-spacing: -0.005em;
  color: inherit;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.note-btn__preview.is-empty {
  color: var(--ink-3);
  font-style: italic;
}
.note-btn__arrow {
  font-family: var(--mono);
  font-size: var(--text-strong);
  color: var(--ink-3);
  flex-shrink: 0;
  padding: 4px 6px;
  margin-right: -6px;
  transition: transform var(--ease-medium), color var(--ease-quick);
}

/* idle empty state */
.day-sum__idle {
  padding: 28px 0 8px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.day-sum__idle__svg {
  width: 100%;
  max-width: 200px;
  height: auto;
  display: block;
  color: var(--ink);
}
.day-sum__idle__quote {
  font-family: var(--sans);
  font-size: var(--text-body);
  letter-spacing: -0.011em;
  color: var(--ink);
  line-height: 1.45;
  font-weight: 400;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
  margin: 0;
}
.day-sum__idle__caption {
  font-family: var(--mono);
  font-size: var(--text-tiny);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* =========================================================
   CAPTURE + STREAM module (right half on desktop, top on mobile)
   ========================================================= */
.module--capture-stream {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.capture-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}

/* =========================================================
   CAPTURE LAUNCHER
   Looks like a field, behaves like a button. Tap opens overlay.
   ========================================================= */
.capture-launcher {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: var(--surface);
  border: 0;
  border-radius: var(--r-input);
  padding: 14px 16px;
  text-align: left;
  font-family: var(--sans);
  font-size: var(--text-body);
  letter-spacing: -0.005em;
  color: var(--ink);
  cursor: pointer;
  transition: background var(--ease-quick);
  min-height: 52px;
}
.capture-launcher:hover { background: var(--surface-2); }
.capture-launcher__plus {
  font-size: var(--text-medium);
  color: var(--ink-3);
  flex-shrink: 0;
  line-height: 1;
  margin-top: -1px;
}
.capture-launcher__placeholder {
  flex: 1;
  color: var(--ink-3);
  font-size: var(--text-body);
}
.capture-launcher__city {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: var(--text-small);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  letter-spacing: -0.005em;
}
.capture-launcher__city-caret {
  font-size: var(--text-tiny);
  color: var(--ink-3);
}

/* =========================================================
   CAPTURE OVERLAY (fullscreen)
   ========================================================= */
/* =====================================================================
   FULLSCREEN OVERLAY — viewport contract (kit standard)

   Mobile browsers (iOS Safari especially) have collapsing URL bars and
   bottom toolbars that constantly resize the visible viewport. Using
   `100vh` causes overlays to clip behind these bars. Using `100dvh`
   (dynamic viewport height) makes the overlay track the actual visible
   area as the chrome appears/disappears.

   Combined with safe-area insets (env(safe-area-inset-*)), this ensures:
   - Top: close button never sits under the notch / status bar
   - Bottom: action buttons never sit under the home indicator / nav bar
   - Overlay always fills the actual visible area

   This pattern should apply to ALL fullscreen overlays in kit:
   trip itinerary, todos fullscreen, future capture flows, etc.
   ===================================================================== */
.capture-fs {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  /* Dynamic viewport height — adapts to URL-bar collapse on iOS */
  height: 100dvh;
  height: 100vh; /* fallback for browsers without dvh support */
  height: 100dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  /* Slide-up animation when shown */
  transform: translateY(8px);
  opacity: 0;
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity var(--ease-medium);
  pointer-events: none;
  /* Honor iOS safe areas (notch + home indicator) */
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  box-sizing: border-box;
}
.capture-fs[hidden] {
  display: none;
}
.capture-fs.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.capture-fs__inner {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px var(--gutter) 32px;
}

/* Header: just the close button (top-left).
   The bind controls (city, been) live BELOW, in their own block. */
.capture-fs__head {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  flex-shrink: 0;
}

/* Bind controls: "In [City] [been pill]" all on one line.
   Single row, generous gap, breathing space between. */
.capture-fs__bind {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
  margin-bottom: 32px;
}
.capture-fs__bind-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.capture-fs__bind-label {
  color: var(--ink-3);
  font-size: var(--text-strong);
  font-family: var(--sans);
  letter-spacing: -0.005em;
}

/* City button — bigger, more substantial */
.capture-fs__city-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 0;
  font-family: var(--sans);
  font-size: var(--text-strong);
  color: var(--ink);
  font-weight: 500;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background var(--ease-quick);
  letter-spacing: -0.005em;
  min-height: 44px;
}
.capture-fs__city-btn:hover { background: var(--surface-2); }
.capture-fs__city-caret { font-size: var(--text-tiny); color: var(--ink-3); }

.capture-fs__city-popover {
  position: absolute;
  top: 60px;
  left: 36px;
  right: auto;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  z-index: 5;
  display: none;
  width: 320px;
  max-width: calc(100vw - 64px);
}
.capture-fs__city-popover.is-open { display: block; }
.capture-fs__city-search {
  width: 100%;
  background: var(--surface);
  border: 0;
  border-radius: var(--r-input);
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: var(--text-body);
  outline: none;
  color: var(--ink);
  margin-bottom: 6px;
}
.capture-fs__city-list {
  max-height: 260px;
  overflow-y: auto;
}
.capture-fs__city-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 8px 12px;
  font-family: var(--sans);
  font-size: var(--text-body);
  color: var(--ink);
  cursor: pointer;
  border-radius: var(--r-input);
  letter-spacing: -0.005em;
}
.capture-fs__city-item:hover { background: var(--surface); }
.capture-fs__city-item.is-current { color: var(--accent); }
.capture-fs__city-item__country { color: var(--ink-3); margin-left: 6px; font-size: var(--text-small); }

/* Been pill — bigger, on its own line under the city */
.capture-fs__been-btn {
  font-family: var(--sans);
  font-size: var(--text-strong);
  font-weight: 500;
  color: var(--ink);
  background: var(--surface);
  border: 0;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  cursor: pointer;
  letter-spacing: -0.005em;
  transition: background var(--ease-quick), color var(--ease-quick);
  min-height: 44px;
  align-self: flex-start;
}
.capture-fs__been-btn:hover { background: var(--surface-2); }
.capture-fs__been-btn[data-been="false"] { color: var(--accent); }

/* The actual writing surface — bare. No box. Cursor in air. Big and breathing.
   28px is well above iOS auto-zoom floor (16px), so we keep our chosen size
   on mobile too. The !important wins the cascade against the global
   "input/textarea must be 16px on mobile" iOS-zoom-fix rule. */
.capture-fs__body {
  flex: 1;
  display: flex;
  align-items: flex-start;
  padding: 0 0 32px;
}
.capture-fs__textarea {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: var(--text-hero) !important;
  line-height: 1.4;
  letter-spacing: -0.018em;
  color: var(--ink);
  outline: none;
  padding: 0;
  margin: 0;
  resize: none;
  min-height: 240px;
  caret-color: var(--accent);
}
.capture-fs__textarea::placeholder { color: var(--ink-3); }

/* Foot: two equal-shape buttons, secondary on left, primary on right.
   No more status text, no more text-link styling. Both are real buttons. */
.capture-fs__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  flex-shrink: 0;
  gap: 12px;
}
.capture-fs__foot .kbd {
  font-family: var(--mono);
  font-size: var(--text-tiny);
  color: var(--ink-3);
  margin-left: 6px;
  letter-spacing: 0.04em;
  font-weight: 400;
}
.btn:hover .kbd,
.btn--secondary:hover .kbd { color: inherit; opacity: 0.7; }

/* Mobile sizing — capture stays generous but reflows for narrow viewports */
@media (max-width: 720px) {
  .capture-fs__inner { padding: 16px var(--gutter) 24px; }
  .capture-fs__head { margin-bottom: 16px; }
  .capture-fs__bind { margin-bottom: 24px; gap: 10px; }
  .capture-fs__textarea {
    /* Same 28px on mobile — wins via !important on the base rule */
    line-height: 1.4;
    min-height: 200px;
  }
  .capture-fs__city-popover {
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
  }
  .capture-fs__foot {
    flex-direction: row;
    gap: 10px;
  }
  .capture-fs__foot .btn,
  .capture-fs__foot .btn--secondary {
    flex: 1;
    justify-content: center;
  }
  .capture-fs__foot .kbd { display: none; } /* hide shortcut hint on mobile */
}

/* stream */
.stream__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.stream__label {
  font-size: var(--text-small);
  letter-spacing: -0.005em;
  color: var(--ink);
  font-weight: 500;
}
.stream__more {
  font-family: var(--mono);
  font-size: var(--text-tiny);
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.stream__more:hover { color: var(--accent); }

.stream {
  display: flex;
  flex-direction: column;
}
.stream__empty {
  padding: 24px 0;
  font-size: var(--text-small);
  color: var(--ink-3);
  font-style: italic;
}
.stream__item {
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: baseline;
  cursor: pointer;
  transition: opacity var(--ease-quick);
}
.stream__item:hover .stream__name { color: var(--ink-2); }
.stream__item.stream__ghost { cursor: default; }
.stream__item.stream__ghost:hover .stream__name { color: var(--ink); }
.stream__item:first-child { border-top: 0; padding-top: 4px; }
.stream__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.stream__name {
  font-size: var(--text-strong);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.012em;
  line-height: 1.3;
  word-break: break-word;
}
.stream__meta {
  font-family: var(--sans);
  font-size: var(--text-small);
  color: var(--ink-3);
  letter-spacing: -0.005em;
  margin-top: 4px;
}
.stream__meta .dot { color: var(--ink-3); margin: 0 5px; }
.stream__when {
  font-family: var(--mono);
  font-size: var(--text-tiny);
  color: var(--ink-3);
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: start;
  padding-top: 2px;
}

/* Structured save rendering (when AI parsed a place_name) */
.stream__name--raw {
  font-weight: 400;
  font-size: var(--text-body);
  color: var(--ink-2);
}
.stream__name--tip {
  /* Tip without a place_name: render the tip as the heading, italic to signal "not a venue yet" */
  font-style: italic;
  font-weight: 400;
  font-size: var(--text-body);
  color: var(--ink);
  letter-spacing: -0.005em;
}

/* Want-to-go saves — quiet blue dot AFTER the name */
.stream__item.is-want .stream__name::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 8px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}
.stream__tip {
  font-size: var(--text-body);
  color: var(--ink-2);
  letter-spacing: -0.005em;
  line-height: 1.45;
  margin-top: 3px;
}
.stream__pending {
  font-family: var(--mono);
  font-size: var(--text-tiny);
  color: var(--ink-3);
  margin-left: 6px;
  vertical-align: 1px;
  letter-spacing: 0.1em;
  opacity: 0.6;
}

/* Ghost row shown immediately on capture, while AI parse runs */
.stream__ghost .stream__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stream__ghost-bar {
  display: block;
  background: var(--rule);
  border-radius: var(--r-tight);
  animation: ghostPulse 1.2s ease-in-out infinite;
}
.stream__ghost-bar--name { width: 38%; height: 14px; }
.stream__ghost-bar--tip  { width: 62%; height: 11px; opacity: 0.7; animation-delay: 120ms; }
.stream__ghost-bar--meta { width: 22%; height: 9px;  opacity: 0.55; animation-delay: 240ms; }
@keyframes ghostPulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 0.95; }
}
.stream__ghost .stream__when {
  font-family: var(--mono);
  color: var(--ink-3);
  opacity: 0.6;
}

/* =========================================================
   TODOS (right column) — notes-style, API-persisted
   ========================================================= */
.todos__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.todos__label {
  font-size: var(--text-tiny);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.todos__expand {
  font-family: var(--mono);
  font-size: var(--text-strong);
  color: var(--ink-3);
  letter-spacing: 0.04em;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 6px 8px;
  margin: -6px -8px;
  transition: color var(--ease-quick), transform var(--ease-quick);
}
.todos__expand:hover {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.todo-list { display: flex; flex-direction: column; gap: 0; }
.todo {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  padding: 2px 0;
  align-items: baseline;
}
.todo__dot {
  position: relative;
  width: 14px; height: 14px;
  border: 1.5px solid var(--ink-3);
  border-radius: 50%;
  background: transparent;
  margin-top: 4px;
  cursor: pointer;
  transition: background 140ms, border-color 140ms;
  flex-shrink: 0;
}
.todo:hover .todo__dot { border-color: var(--ink); }
.todo.is-done .todo__dot {
  background: var(--ink);
  border-color: var(--ink);
}
.todo__text {
  font-size: var(--text-body);
  color: var(--ink);
  line-height: 1.4;
  outline: none;
  cursor: text;
  min-height: 1.4em;
  padding: 0;
  word-break: break-word;
}
.todo.is-done .todo__text {
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-thickness: 0.5px;
}
.todos__add-zone {
  min-height: 24px;
  cursor: text;
  padding: 4px 0 0;
}

/* Empty state — ghost row prompting first todo */
.todo.is-ghost,
.todo-fs__row.is-ghost {
  cursor: text;
  opacity: 0.6;
  transition: opacity var(--ease-quick);
}
.todo.is-ghost:hover,
.todo-fs__row.is-ghost:hover {
  opacity: 1;
}
.is-ghost-text {
  color: var(--ink-3) !important;
  font-style: italic;
}

/* =========================================================
   TODO FULLSCREEN EDITOR — Apple Notes style
   ========================================================= */
.todo-fs .modal__head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 26px var(--gutter) 28px;
}
.todo-fs__title {
  font-family: var(--sans);
  font-size: var(--text-body);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
  justify-self: start;
}
.todo-fs__date {
  font-family: var(--sans);
  font-size: var(--text-body);
  color: var(--ink-3);
  letter-spacing: -0.005em;
  justify-self: center;
  font-variant-numeric: tabular-nums;
}
.todo-fs .modal__close { justify-self: end; }

.todo-fs__inner {
  max-width: 720px;
  padding-top: 4px;
}
.todo-fs__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.todo-fs__row {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 14px;
  padding: 3px 0;
  align-items: baseline;
}
.todo-fs__dot {
  position: relative;
  width: 20px; height: 20px;
  border: 1.5px solid var(--ink-3);
  border-radius: 50%;
  background: transparent;
  margin-top: 4px;
  cursor: pointer;
  transition: background 140ms, border-color 140ms;
  flex-shrink: 0;
}
.todo-fs__row:hover .todo-fs__dot { border-color: var(--ink); }
.todo-fs__row.is-done .todo-fs__dot {
  background: var(--ink);
  border-color: var(--ink);
}
.todo-fs__text {
  font-size: var(--text-medium);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.45;
  letter-spacing: -0.008em;
  outline: none;
  cursor: text;
  min-height: 1.45em;
  padding: 2px 0;
  word-break: break-word;
}
.todo-fs__row.is-done .todo-fs__text {
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-thickness: 0.5px;
}
.todo-fs__addzone {
  min-height: 40px;
  cursor: text;
  margin-top: 4px;
}

/* =========================================================
   NOTE OVERLAY — full screen editor
   ========================================================= */
.note-textarea {
  width: 100%;
  min-height: 60vh;
  border: 0;
  background: transparent;
  outline: none;
  font-family: var(--sans);
  font-size: var(--text-display);
  line-height: 1.5;
  letter-spacing: -0.011em;
  color: var(--ink);
  resize: none;
  padding: 0;
  font-weight: 400;
}
.note-textarea::placeholder {
  color: var(--ink-3);
  font-style: italic;
}

/* =========================================================
   ITINERARY OVERLAY (full-screen modal)
   New layout: close button top-left in head bar, content
   block has its own header with title + clean subtitle.
   Segments are single-column, no date-rail.
   ========================================================= */

/* Top bar: just the close button on the left */
.itin-fs__head-bar {
  justify-content: flex-start;
  padding: 18px var(--gutter) 0;
}

/* Header within the content block */
.itin-fs__head {
  margin-bottom: 32px;
}
.itin-fs__title {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 500;
  letter-spacing: -0.025em;
  margin: 0 0 6px;
  line-height: 1.05;
  color: var(--ink);
}
.itin-fs__dates {
  font-family: var(--sans);
  font-size: var(--text-body);
  color: var(--ink-3);
  letter-spacing: -0.005em;
  text-transform: none;
  margin: 0;
}
.itin-fs__inner {
  max-width: 720px;
}
.itin-fs__meta {
  font-family: var(--sans);
  font-size: var(--text-small);
  color: var(--ink-3);
  letter-spacing: -0.005em;
  text-transform: none;
  margin-bottom: 24px;
}
.itin-fs__meta:empty { display: none; }
.itin-fs__trip-notes {
  font-size: var(--text-body);
  line-height: 1.55;
  color: var(--ink-2);
  letter-spacing: -0.005em;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-width: 540px;
  margin: 0 0 32px;
  padding: 0;
}
.itin-fs__trip-notes:empty { display: none; }
.itin-fs__trip-notes code,
.itin-fs__seg-notes code {
  font-family: var(--mono);
  font-size: 0.82em;
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 3px;
  color: var(--ink);
  letter-spacing: 0;
  font-weight: 400;
}
.itin-fs__trip-notes a,
.itin-fs__seg-notes a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.5px;
  transition: color var(--ease-quick), border-color var(--ease-quick);
}
.itin-fs__trip-notes a:hover,
.itin-fs__seg-notes a:hover {
  color: var(--accent);
  border-bottom-width: 1px;
}
.itin-fs__trip-notes strong,
.itin-fs__seg-notes strong {
  color: var(--ink);
  font-weight: 500;
}

/* ## Heading — small uppercase eyebrow, no rule, no border, tight spacing.
   Magazine-style section break. Used inside trip + segment notes. */
.itin-fs__trip-notes .md-h,
.itin-fs__seg-notes .md-h {
  font-family: var(--sans);
  font-size: var(--text-tiny);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 28px 0 -10px;
  padding: 0 !important;
  border: 0 !important;
  background: none;
  display: block;
  line-height: 1.4;
}
.itin-fs__trip-notes .md-h:first-child,
.itin-fs__seg-notes .md-h:first-child {
  margin-top: 0;
}

/* --- Horizontal rule — thin block separator inside notes (use sparingly) */
.itin-fs__trip-notes .md-hr,
.itin-fs__seg-notes .md-hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 14px 0;
  width: 100%;
  height: 0;
  padding: 0;
  background: transparent;
}

/* Segments — single column, no date rail */
.itin-fs__segments {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 48px;
}
.itin-fs__seg {
  padding: 24px 0;
  border-top: 1px solid var(--rule);
}
.itin-fs__seg:last-child { border-bottom: 1px solid var(--rule); }

/* Top row: segment name + nights pill on opposite ends */
.itin-fs__seg-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}
.itin-fs__seg-name {
  font-size: var(--text-display);
  font-weight: 500;
  letter-spacing: -0.018em;
  margin: 0;
  color: var(--ink);
}
.itin-fs__seg-pill {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 4px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
  font-family: var(--sans);
  font-size: var(--text-tiny);
  letter-spacing: -0.005em;
  color: var(--ink-3);
  background: transparent;
  white-space: nowrap;
}
.itin-fs__seg-dates {
  font-family: var(--sans);
  font-size: var(--text-small);
  color: var(--ink-3);
  letter-spacing: -0.005em;
  margin-bottom: 14px;
}
.itin-fs__here {
  color: var(--accent);
  font-weight: 500;
}

/* "You are here" indicator dot */
.itin-fs__seg.is-here .itin-fs__seg-name {
  position: relative;
}
.itin-fs__seg.is-here .itin-fs__seg-name::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.itin-fs__seg-notes {
  font-size: var(--text-body);
  color: var(--ink-2);
  line-height: 1.55;
  letter-spacing: -0.005em;
  margin: 6px 0 0;
  max-width: 540px;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.itin-fs__empty {
  padding: 24px 0;
  font-size: var(--text-body);
  color: var(--ink-3);
  font-style: italic;
}
.itin-fs__placeholders {
  margin-top: 24px;
  padding: 24px 0;
  border-top: 1px dashed var(--rule);
}
.itin-fs__placeholder {
  font-size: var(--text-small);
  color: var(--ink-3);
  font-style: italic;
  margin: 0 0 12px;
  letter-spacing: -0.005em;
  max-width: 520px;
}
.itin-fs__edit-link {
  font-family: var(--mono);
  font-size: var(--text-tiny);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.itin-fs__edit-link:hover { color: var(--accent); }

@media (max-width: 720px) {
  .itin-fs__seg {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 20px 0;
  }
  .itin-fs__seg-date { padding-top: 0; }
  .itin-fs__seg-name { font-size: var(--text-medium); }
}

/* =========================================================
   SAVE EDITOR (fullscreen modal for editing a save)
   ========================================================= */
.save-fs__head {
  /* Close button + title in head bar. Close on the left, title beside it. */
  justify-content: flex-start;
  gap: 14px;
}
.save-fs__title {
  font-family: var(--sans);
  font-size: var(--text-body);
  font-weight: 400;
  color: var(--ink-3);
  letter-spacing: -0.005em;
  margin: 0;
}
.save-fs__inner {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.save-fs__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.save-fs__label {
  font-family: var(--mono);
  font-size: var(--text-tiny);
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.save-fs__captured {
  font-size: var(--text-body);
  color: var(--ink-2);
  line-height: 1.5;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: var(--r-tight);
  letter-spacing: -0.005em;
}
.save-fs__readonly {
  font-size: var(--text-body);
  color: var(--ink-2);
  padding: 6px 0;
}
.save-fs__input,
.save-fs__textarea,
.save-fs__select {
  font-family: var(--sans);
  font-size: var(--text-body);
  color: var(--ink);
  background: var(--surface);
  border: 0;
  outline: 0;
  padding: 11px 12px;
  border-radius: var(--r-tight);
  letter-spacing: -0.005em;
  width: 100%;
  transition: background var(--ease-quick);
}
.save-fs__input:focus,
.save-fs__textarea:focus,
.save-fs__select:focus { background: var(--surface-2); }
.save-fs__textarea { resize: vertical; min-height: 56px; line-height: 1.45; }
.save-fs__select { appearance: none; cursor: pointer; }

/* Been / want-to-go segmented toggle */
.save-fs__been-row {
  display: inline-flex;
  background: var(--surface);
  border-radius: var(--r-pill);
  padding: 3px;
  gap: 0;
}
.save-fs__been-pill {
  font-family: var(--sans);
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--ink-3);
  background: transparent;
  border: 0;
  padding: 7px 16px;
  border-radius: var(--r-pill);
  cursor: pointer;
  letter-spacing: -0.005em;
  transition: background var(--ease-quick), color var(--ease-quick);
}
.save-fs__been-pill[data-active="true"] {
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.save-fs__been-pill[data-active="false"]:hover { color: var(--ink); }

/* City autocomplete suggestions */
.save-fs__suggest {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 2px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--r-tight);
  z-index: 5;
  max-height: 260px;
  overflow-y: auto;
}
.save-fs__suggest:empty { display: none; }
.save-fs__suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--sans);
  font-size: var(--text-body);
  color: var(--ink);
  background: none;
  border: 0;
  padding: 9px 12px;
  cursor: pointer;
  letter-spacing: -0.005em;
}
.save-fs__suggest-item:hover { background: var(--surface); }
.save-fs__suggest-item--create { color: var(--accent); border-top: 1px solid var(--rule); }
.save-fs__suggest-meta {
  font-family: var(--mono);
  font-size: var(--text-tiny);
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-left: 6px;
}

/* Footer actions — Delete (left, ghost destructive) + Save (right, primary btn) */
.save-fs__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.save-fs__danger {
  font-family: var(--sans);
  font-size: var(--text-small);
  color: var(--ink-3);
  background: none;
  border: 0;
  padding: 6px 0;
  cursor: pointer;
  letter-spacing: -0.005em;
  transition: color var(--ease-quick);
}
.save-fs__danger:hover { color: var(--danger); }

/* ===== Mini-month: REMOVED in C6.5.
   Calendar removed from home — no calendar in home page UI for now. ===== */

/* Day-of-year — clickable to open year overlay (easter egg) */
.day-sum__doy--clickable {
  cursor: pointer;
  user-select: none;
  transition: color var(--ease-quick);
}
.day-sum__doy--clickable:hover {
  color: var(--accent);
}
.day-sum__doy--clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-tight);
}

/* Hide mini-month on mobile — too much vertical real estate */
@media (max-width: 720px) {
  .mm { display: none; }
}

/* ===== Year-view calendar overlay (CdG 1986) ===== */
.year-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  display: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.year-overlay.is-open {
  display: block;
}
.year-overlay__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 40px 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.year-overlay__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}
.year-overlay__title {
  font-family: var(--sans);
  font-size: var(--text-body);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}
.year-overlay__close {
  font-family: var(--sans);
  font-size: var(--text-hero);
  color: var(--ink);
  background: none;
  border: 0;
  padding: 0 8px;
  margin-right: -8px;
  cursor: pointer;
  line-height: 1;
  font-weight: 300;
  transition: color var(--ease-quick);
}
.year-overlay__close:hover { color: var(--accent); }
.year-overlay__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  column-gap: 32px;
  row-gap: 56px;
  flex: 1;
}

/* Each month block */
.ym__month {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.ym__num {
  font-family: var(--sans);
  font-size: var(--text-hero);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}
.ym__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
}
.ym__cell {
  font-family: var(--sans);
  font-size: var(--text-body);
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
  text-align: center;
  padding: 5px 2px;
  line-height: 1.3;
}
.ym__cell--empty {
  color: transparent;
}
.ym__cell--trip {
  color: var(--accent);
}

/* Responsive: 3 cols on tablet, 2 cols on mobile */
@media (max-width: 1100px) {
  .year-overlay__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .year-overlay__inner { padding: 24px 20px 60px; }
  .year-overlay__head { margin-bottom: 28px; }
  .year-overlay__grid {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 20px;
    row-gap: 36px;
  }
  .ym__num { font-size: var(--text-display); }
  .ym__cell { font-size: var(--text-small); padding: 4px 1px; }
  .year-overlay__close { font-size: var(--text-display); }
}

/* =====================================================================
   Trip launch button — surfaces a path to the trip overlay or apps.
   Visible on all viewports (desktop in launchers module, mobile in
   launchers module too — same module, different position via grid).
   ===================================================================== */
.trip-launch {
  display: flex;
  width: 100%;
  padding: 16px 18px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--r-button);
  font-family: var(--sans);
  font-size: var(--text-body);
  color: var(--ink);
  letter-spacing: -0.005em;
  cursor: pointer;
  text-align: left;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  transition: color var(--ease-quick), border-color var(--ease-quick);
}
.trip-launch[hidden] { display: none !important; }
.trip-launch:hover { color: var(--accent); border-color: var(--accent); }
.trip-launch__label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trip-launch__caret {
  font-family: var(--mono);
  font-size: var(--text-small);
  color: var(--ink-3);
  transition: transform var(--ease-quick), color var(--ease-quick);
}
.trip-launch:hover .trip-launch__caret {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* Launchers module: stack the buttons vertically with consistent gap. */
.module--launchers {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);   /* 12px */
}
