/* ==========================================================================
   JORIE DAILY — trip.css · Phase 32 · Plan a Trip ♡
   Loaded by plan-a-trip.html, index.html (Today card) and calendar.html.
   Uses only the existing design tokens (style.css / refresh.css / profile.css),
   so light and dark mode, fonts, radii and spacing follow the rest of the site.
   Class prefix: .tp-  (page)  ·  .tt-  (Today card)  ·  .tc-  (Calendar)
   ========================================================================== */

/* ---------- shared bits ---------------------------------------------------- */
.trip-app { display: grid; gap: var(--space-card, var(--gap)); }
.tp-ico { display: inline-flex; }
.tp-ico .icon, .tp-chip .icon { width: 16px; height: 16px; }
.tp-h2 { font: 600 var(--fs-xl)/1.1 var(--font-display); color: var(--ink); letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.tp-h2 em { font-style: italic; font-weight: 400; }
.tp-h2:focus { outline: none; }
.tp-h3 { font: 600 var(--fs-lg)/1.2 var(--font-display); color: var(--ink); margin: 0 0 var(--space-2); }
.tp-lede { font-size: var(--fs-md); color: var(--ink-2); margin: var(--space-2) 0 0; }
.tp-hint { font-size: var(--fs-sm); color: var(--ink-3); margin: 0; }
.tp-ok { font-size: var(--fs-sm); color: var(--ink-2); font-weight: 600; margin: var(--space-2) 0 0; }
.tp-ok::before { content: "✓ "; }
.tp-warn { display: block; font-size: var(--fs-sm); color: var(--ink-2); background: rgb(var(--pink-rgb) / 0.35); border-radius: var(--radius-xs); padding: 8px 12px; margin: var(--space-2) 0 0; }
.tp-err { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.tp-err::before { content: "! "; font-weight: 800; }
.tp-errs { margin: var(--space-2) 0 0; display: grid; gap: 4px; }
.tp-errs[hidden] { display: none; }
.tp-inline-err { display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--ink); margin-top: 6px; }
.tp-list { margin: var(--space-2) 0; padding-left: 1.2em; display: grid; gap: 4px; }
.tp-list li { overflow-wrap: anywhere; }
.tp-danger { color: var(--ink); border-color: var(--jd-danger-line, var(--line-2)); }
.tp-icon-btn { min-width: 36px; justify-content: center; padding-inline: 8px; }
.tp-icon-btn .icon { width: 16px; height: 16px; }
.tp-back { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); text-decoration: none; min-height: var(--tap, 44px); }
.tp-back:hover { color: var(--ink); }
.tp-back .icon { width: 18px; height: 18px; }
.tp-back:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 6px; }
.tp-enter { animation: tpIn 380ms var(--ease-out) both; }
@keyframes tpIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.tp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: 700;
  background: var(--tint-chip, rgb(var(--pink-rgb) / 0.45)); color: var(--ink); border: 1px solid var(--line); line-height: 1.3; }
.tp-chip--proposed { background: rgb(var(--pink-rgb) / 0.7); }
.tp-chip--planned { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tp-chip--cancelled, .tp-chip--declined { background: transparent; color: var(--ink-2); border-style: dashed; }
.tp-chip--draft { background: transparent; border-style: dashed; color: var(--ink-2); }
.tp-chip--cat { font-weight: 600; background: var(--surface-sunk); }

.tp-alert { display: grid; gap: var(--space-2); padding: 14px 16px; border-radius: var(--jd-radius-inner, var(--radius-sm)); border: 1px solid var(--line-2);
  background: rgb(var(--pink-rgb) / 0.32); color: var(--ink); }
.tp-alert p { margin: 0; }
.tp-alert--info { background: var(--surface); }
.tp-alert__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.tp-loading { display: flex; align-items: center; gap: 12px; padding: var(--pad-card); }
.tp-loading p { margin: 0; color: var(--ink-2); }
.tp-loading__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--pink); animation: beat 1.6s var(--ease-in-out) infinite; }

.tp-toast { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translate(-50%, 12px); z-index: 80; max-width: min(560px, calc(100vw - 32px));
  padding: 12px 18px; border-radius: var(--radius-pill); background: var(--ink); color: var(--bg); font-weight: 600; font-size: var(--fs-sm);
  box-shadow: var(--shadow-lg); opacity: 0; transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); text-align: center; }
.tp-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.tp-toast[hidden] { display: none; }

/* ---------- dashboard ------------------------------------------------------ */
.tp-dash { display: grid; gap: var(--space-section, var(--space-6)); }
.tp-dash__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4); }
.tp-newbtn .icon { width: 18px; height: 18px; }
.tp-group { display: grid; gap: var(--space-4); }
.tp-group__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.tp-group__title { font: 800 var(--fs-xl)/1 var(--font-display); font-variation-settings: "SOFT" 100; letter-spacing: -0.03em; margin: 0; color: var(--ink); }
.tp-group__count { margin: 0; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.tp-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--space-card, var(--gap)); }
.tp-card { padding: 0; overflow: hidden; transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out); }
.tp-card:hover { transform: translateY(-2px); }
.tp-card--turn { border: 1.5px solid var(--ink); }
.tp-card--cancelled, .tp-card--declined { opacity: 0.86; }
.tp-card__link { display: grid; gap: 8px; padding: var(--pad-card); color: inherit; text-decoration: none; height: 100%; }
.tp-card__link:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: -3px; border-radius: inherit; }
.tp-card__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tp-card__title { font: 600 var(--fs-lg)/1.2 var(--font-display); margin: 4px 0 0; color: var(--ink); overflow-wrap: anywhere; }
.tp-card__dates, .tp-card__places { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: var(--fs-sm); color: var(--ink-2); overflow-wrap: anywhere; }
.tp-card__dates .icon, .tp-card__places .icon { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.tp-card__status { margin: 4px 0 0; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }

.tp-notices { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.tp-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 18px; border-radius: var(--jd-radius-inner, var(--radius-sm));
  background: var(--tint-bg); color: var(--tint-ink); border: 1px solid var(--line); }
.tp-notice p { flex: 1 1 240px; margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.tp-notice__icon .icon { width: 22px; height: 22px; }
.tp-notice--declined, .tp-notice--cancelled { background: var(--surface); }

.tp-empty { display: grid; justify-items: center; gap: var(--space-3); text-align: center; padding: clamp(28px, 5vw, 48px) var(--pad-card); }
.tp-empty h2, .tp-empty h3 { font: 600 var(--fs-lg)/1.2 var(--font-display); margin: 0; }
.tp-empty p { margin: 0; max-width: 46ch; color: var(--ink-2); }
.tp-empty__icon .icon { width: 34px; height: 34px; color: var(--ink-2); }
.tp-empty--small { padding: var(--space-5) var(--space-3); }

/* ---------- new trip: who's coming along -------------------------------- */
.tp-new { display: grid; gap: var(--space-3); }
.tp-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--space-card, var(--gap)); margin-top: var(--space-3); }
.tp-mode { display: grid; gap: 10px; justify-items: start; text-align: left; padding: clamp(22px, 3.4vw, 36px); cursor: pointer; font: inherit; color: var(--ink);
  border: 1.5px solid var(--line); transition: transform var(--dur-2) var(--ease-out), border-color var(--dur-2); min-height: 170px; }
.tp-mode:hover { transform: translateY(-3px); border-color: var(--ink); }
.tp-mode:focus-visible { outline: none; box-shadow: var(--jd-ring); }
.tp-mode[disabled] { opacity: 0.7; cursor: progress; }
.tp-mode__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--tint-bg); color: var(--tint-ink); }
.tp-mode__icon .icon { width: 24px; height: 24px; }
.tp-mode__title { font: 600 var(--fs-xl)/1.1 var(--font-display); letter-spacing: -0.02em; }
.tp-mode__text { color: var(--ink-2); font-size: var(--fs-base); }

/* ---------- trip view ------------------------------------------------------ */
.tp-view, .tp-editor { display: grid; gap: var(--space-card, var(--gap)); min-width: 0; }
.tp-triphead, .tp-edhead { display: grid; gap: var(--space-2); }
.tp-triphead__chips, .tp-tripmeta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 0; font-size: var(--fs-sm); color: var(--ink-2); }
.tp-tripmeta > span { display: inline-flex; align-items: center; gap: 6px; }
.tp-tripmeta .icon { width: 16px; height: 16px; }
.tp-status { display: grid; gap: var(--space-2); padding: var(--pad-card); }
.tp-status--turn { border: 1.5px solid var(--ink); }
.tp-status--planned { background: linear-gradient(125deg, var(--cream, var(--surface)), var(--pink-soft, rgb(var(--pink-rgb) / 0.5))); }
:root[data-theme="dark"] .tp-status--planned { background: linear-gradient(125deg, #522635, #41232c); }
.tp-status__title { font: 600 var(--fs-lg)/1.2 var(--font-display); margin: 0; color: var(--ink); }
.tp-status__text { margin: 0; color: var(--ink-2); max-width: 70ch; }
.tp-status__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--space-2); }
.tp-status__actions:empty { display: none; }
.tp-status__actions .icon { width: 16px; height: 16px; }
.tp-lockline { display: flex; gap: 8px; align-items: flex-start; text-align: left; font-weight: 600; }
.tp-lockline .icon { width: 18px; height: 18px; flex: none; }
.tp-changes, .tp-history { padding: var(--space-4) var(--pad-card); }
.tp-changes > summary, .tp-history > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; min-height: 32px; }
.tp-changes > summary:focus-visible, .tp-history > summary:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; border-radius: 6px; }
.tp-changes__title { font: 600 var(--fs-md)/1.3 var(--font-display); color: var(--ink); }
.tp-changes__body { margin-top: var(--space-3); }
.tp-diffs { display: grid; gap: var(--space-3); margin-top: var(--space-3); }
.tp-diff h4 { margin: 0 0 4px; font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.tp-diff ul { margin: 0; padding-left: 1.2em; display: grid; gap: 2px; }
.tp-diff li { overflow-wrap: anywhere; }
.tp-diff--added li::marker { content: "+  "; font-weight: 800; }
.tp-diff--removed li::marker { content: "−  "; font-weight: 800; }
.tp-versions { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: var(--space-3); }
.tp-version { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.tp-version p { margin: 0; overflow-wrap: anywhere; }
.tp-version > .plan-btn { justify-self: start; }

/* read-only itinerary */
.tp-itin { display: grid; gap: var(--space-card, var(--gap)); min-width: 0; }
.tp-itin__places { padding: var(--pad-card); display: grid; gap: var(--space-3); }
.tp-itin__country { display: grid; gap: 6px; }
.tp-itin__cname { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 0; }
.tp-itin__cname span, .tp-itin__cities li span + span { color: var(--ink-2); font-size: var(--fs-sm); }
.tp-itin__cities { list-style: none; margin: 0; padding: 0 0 0 14px; display: grid; gap: 4px; border-left: 2px solid var(--line); }
.tp-itin__cities li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; }
.tp-itin__private { padding: 0 4px; }
.tp-itin__days { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-card, var(--gap)); }
.tp-itin--compact .tp-itin__places, .tp-itin--compact .tp-day { box-shadow: none; }
.tp-day { padding: var(--pad-card); display: grid; gap: var(--space-4); min-width: 0; }
.tp-day__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; padding-bottom: var(--space-3); border-bottom: 1px solid var(--line); }
.tp-day__date { margin: 0; font: 600 var(--fs-lg)/1.2 var(--font-display); color: var(--ink); display: grid; gap: 2px; }
.tp-day__n { font: 700 var(--fs-xs)/1 var(--font-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.tp-day__place { margin: 0; display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: var(--ink-2); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.tp-day__place .icon { width: 16px; height: 16px; flex: none; }
.tp-day__free { margin: 0; font-family: var(--font-display); font-style: italic; color: var(--ink-2); }
.tp-period { display: grid; gap: var(--space-2); }
.tp-period__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tp-period__title { margin: 0; font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.tp-acts { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.tp-act { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 16px; padding: 12px 14px; border-radius: var(--jd-radius-inner, var(--radius-sm));
  background: var(--surface-sunk); border: 1px solid var(--line); min-width: 0; }
.tp-act.is-done { border-color: var(--line-2); }
.tp-act.is-flagged { border: 1.5px dashed var(--ink); }
.tp-act__main { flex: 1 1 240px; display: grid; gap: 4px; min-width: 0; }
.tp-act__title { margin: 0; font-weight: 700; color: var(--ink); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; overflow-wrap: anywhere; }
.tp-act__time { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.tp-act__meta { margin: 0; }
.tp-act__desc { margin: 0; color: var(--ink-2); font-size: var(--fs-sm); white-space: pre-line; overflow-wrap: anywhere; }
.tp-act__side, .tp-act__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tp-act__tools { align-self: flex-start; }
.tp-done, .tp-fav { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 700; color: var(--ink); }
.tp-done .icon, .tp-fav .icon, .tp-fav-btn .icon { width: 15px; height: 15px; }

/* ---------- editor --------------------------------------------------------- */
.tp-stepnav { overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.tp-stepnav::-webkit-scrollbar { display: none; }
.tp-steps { list-style: none; margin: 0; padding: 2px 0; display: flex; gap: 8px; min-width: max-content; }
.tp-step { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap, 44px); padding: 6px 14px 6px 6px; border-radius: var(--radius-pill); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font: 600 var(--fs-sm)/1 var(--font-body); cursor: pointer; position: relative; }
.tp-step:hover:not([disabled]) { border-color: var(--ink); color: var(--ink); }
.tp-step[aria-current="step"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tp-step[disabled] { opacity: 0.45; cursor: not-allowed; }
.tp-step:focus-visible { outline: none; box-shadow: var(--jd-ring); }
.tp-step__n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-sunk); color: var(--ink); font-weight: 800; }
.tp-step[aria-current="step"] .tp-step__n { background: var(--pink); color: var(--burgundy); }
.tp-step__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.6; }
.tp-panel { padding: var(--pad-card); display: grid; gap: var(--space-4); min-width: 0; }
.tp-step-body { display: grid; gap: var(--space-4); min-width: 0; }
.tp-summary { margin: 0; font-weight: 600; color: var(--ink-2); }
.tp-locked { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--jd-radius-inner, var(--radius-sm)); background: var(--surface-sunk); border: 1px dashed var(--line-2); }
.tp-locked p { margin: 0; }
.tp-locked .icon { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.tp-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--space-3); }
.tp-choice { display: grid; gap: 6px; text-align: left; padding: 18px 20px; font: inherit; color: var(--ink); cursor: pointer; border: 1.5px solid var(--line); }
.tp-choice:hover { border-color: var(--ink); }
.tp-choice.is-on { border-color: var(--ink); background: var(--tint-bg); color: var(--tint-ink); }
.tp-choice:focus-visible { outline: none; box-shadow: var(--jd-ring); }
.tp-choice__title { font: 600 var(--fs-lg)/1.15 var(--font-display); }
.tp-choice__text { font-size: var(--fs-sm); color: var(--ink-2); }
.tp-choice.is-on .tp-choice__text { color: inherit; opacity: 0.85; }
.tp-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.tp-row { display: grid; gap: var(--space-3); padding: 14px 16px; box-shadow: none; border: 1px solid var(--line); min-width: 0; }
.tp-row.has-error { border-color: var(--ink); }
.tp-row__main { display: flex; gap: 10px; align-items: center; min-width: 0; }
.tp-row__n { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-sunk); font-weight: 800; font-size: var(--fs-sm); }
.tp-row__place { flex: 1; display: grid; gap: 8px; min-width: 0; }
.tp-manual[hidden] { display: none; }
.tp-range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.tp-range .input, .tp-step-body input[type="date"] { min-width: 0; width: 100%; }
.tp-cityset { display: grid; gap: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.tp-cityset:first-of-type { border-top: 0; padding-top: 0; }
.tp-cityset__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.tp-cityset__head h4 { margin: 0; font: 600 var(--fs-lg)/1.2 var(--font-display); }
.tp-daynav { display: flex; gap: 8px; align-items: center; }
.tp-daysel { flex: 1; min-width: 0; }
.tp-daynav__btn { flex: none; width: var(--tap, 44px); height: var(--tap, 44px); padding: 0; border-radius: 50%; justify-content: center; }
.tp-day--edit { padding: 0; }
.tp-add-act { justify-self: start; }
.tp-add-act .icon { width: 15px; height: 15px; }
.tp-review__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: var(--space-3); border-top: 1px solid var(--line); }

/* the save bar sits right under the step (in the normal flow, so it never covers anything) */
.tp-bar { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 14px;
  padding: 10px 12px 10px 18px; border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.tp-bar__status { margin: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.tp-bar__status.is-dirty { color: var(--ink); }
.tp-bar__status.is-error { color: var(--ink); }
.tp-bar__status.is-error::before { content: "! "; font-weight: 800; }
.tp-bar__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }

/* activity dialog */
.tp-sheet { width: min(640px, calc(100vw - 24px)); }
.tp-sheet .sheet__inner { max-height: calc(100dvh - 24px); overflow: auto; }
.tp-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; border-radius: var(--radius-pill); background: var(--surface-sunk); }
.tp-tab { flex: 1 1 180px; min-height: 40px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--ink-2); font: 600 var(--fs-sm)/1.2 var(--font-body); cursor: pointer; padding: 8px 12px; }
.tp-tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.tp-tab:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.tp-tabpanel[hidden] { display: none; }
.tp-tabpanel { display: grid; gap: var(--space-3); }
.tp-fromfav { margin: 0; padding: 10px 12px; border-radius: var(--radius-xs); background: var(--tint-bg); color: var(--tint-ink); font-size: var(--fs-sm); font-weight: 600; }
.tp-fromfav[hidden] { display: none; }
.tp-favs { display: grid; gap: var(--space-3); }
.tp-favlist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.tp-favitem { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--jd-radius-inner, var(--radius-sm)); background: var(--surface-sunk); border: 1px solid var(--line); }
.tp-favitem > div { flex: 1 1 220px; display: grid; gap: 4px; min-width: 0; }
.tp-confirm .confirm__text { display: grid; gap: 8px; text-align: center; }
.tp-confirm .confirm__text p { margin: 0; }
.tp-confirm .tp-list { text-align: left; }
.tp-confirm .tp-danger { border-color: var(--ink); }

@media (max-width: 599.98px) {
  .tp-dash__head .btn { width: 100%; justify-content: center; }
  .tp-bar { border-radius: var(--jd-radius-inner, var(--radius-sm)); padding: 10px; }
  .tp-bar__actions { width: 100%; }
  .tp-bar__actions .btn, .tp-bar__actions .plan-btn { flex: 1 1 auto; justify-content: center; }
  .tp-act__tools { width: 100%; }
  .tp-status__actions .btn { flex: 1 1 100%; justify-content: center; }
}
@media (max-width: 479.98px) { .tp-range { grid-template-columns: 1fr; } }
@media (pointer: coarse) { .tp-icon-btn { min-width: 44px; min-height: 44px; } .tp-act__tools .plan-btn, .tp-add-act { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) {
  .tp-enter, .tp-loading__dot { animation: none; }
  .tp-card, .tp-mode, .tp-toast { transition: none; }
  .tp-card:hover, .tp-mode:hover { transform: none; }
}
@media print { .tp-bar, .tp-stepnav, .tp-back, .tp-status__actions, .tp-toast { display: none !important; } }

/* ---------- Today: Our Adventure Today ♡ ---------------------------------- */
.tt-card { grid-column: 1 / -1; padding: var(--pad-card); display: grid; gap: var(--space-4); border: 1px solid var(--line); min-width: 0; }
.tt-card[hidden] { display: none !important; }
.tt-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px 16px; }
.tt-head h2 { margin: 0; font: 600 var(--fs-xl)/1.1 var(--font-display); color: var(--ink); }
.tt-head h2 em { font-weight: 400; }
.tt-place { margin: 0; display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: var(--ink-2); }
.tt-place .icon { width: 16px; height: 16px; }
.tt-sub { margin: 0; color: var(--ink-2); font-size: var(--fs-sm); }
.tt-trip { display: grid; gap: var(--space-4); }
.tt-trip + .tt-trip { padding-top: var(--space-4); border-top: 1px solid var(--line); }
.tt-acts { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.tt-act { display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--jd-radius-inner, var(--radius-sm)); background: var(--surface-sunk); border: 1px solid var(--line); min-width: 0; }
.tt-act.is-pending { border: 1.5px dashed var(--ink); }
.tt-act.is-done { border-color: var(--line-2); }
.tt-act__foot { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.tt-act__foot .icon { width: 15px; height: 15px; }
.tt-note { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 18px; }
.tt-note p { flex: 1 1 240px; margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.tt-err { margin: 0; font-size: var(--fs-xs); font-weight: 600; color: var(--ink); }

/* ---------- Calendar: finalized trips --------------------------------------- */
.cal-page .cal-day .tc-mark { position: absolute; top: 4px; right: 6px; color: var(--ink-2); display: inline-flex; pointer-events: none; }
.cal-page .cal-day .tc-mark .icon { width: 13px; height: 13px; }
.cal-page .cal-day:has(.od-inline__marker) .tc-mark { right: 20px; }
.cal-page .cal-day.is-today .tc-mark, .cal-page .cal-day[aria-pressed="true"] .tc-mark { color: currentColor; }
:root[data-theme="dark"] .cal-page .cal-day .tc-mark { color: var(--pink); }
@media (max-width: 599.98px) {
  .cal-page .cal-day .tc-mark { top: 2px; right: 3px; }
  .cal-page .cal-day .tc-mark .icon { width: 10px; height: 10px; }
  .cal-page .cal-day:has(.od-inline__marker) .tc-mark { right: 13px; }
}
.tc-inline { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.tc-inline h3 { font-size: 1rem; margin: 0 0 .55rem; }
.tc-inline ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tc-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--surface-sunk); border: 1px solid var(--line); }
.tc-item .icon { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--ink-2); }
.tc-item p { margin: 0; overflow-wrap: anywhere; }
.tc-item__meta { color: var(--ink-2); font-size: .85rem; margin-top: 2px !important; }
.tc-item a { display: inline-flex; align-items: center; margin-top: 2px; color: var(--ink); font-weight: 600; text-decoration: underline; min-height: 36px; }
.cal-key .tc-key { display: inline-flex; vertical-align: -2px; margin-right: 6px; }
.cal-key .tc-key .icon { width: 13px; height: 13px; }

/* Scotty's Today hides Marjorie's own completion controls (style.css: .act__complete,
   .save-confirm, .save-fix). Trip activities are HIS too (shared trips, or his solo
   trips), and Supabase authorizes each write — so inside a trip card they stay visible. */
:root[data-viewer] [data-jd-trip] .act__complete { display: inline-flex !important; }
:root[data-viewer] [data-jd-trip] .save-confirm,
:root[data-viewer] [data-jd-trip] .save-fix { display: grid !important; }

/* Phase 32.1: long user-authored travel notes and narrow-device controls */
.tp-card, .tp-card__link, .tt-card, .tt-trip, .tt-act, .tp-period { min-width: 0; }
.tt-act, .tt-act p, .tt-act span, .tp-card__title, .tp-card__places { overflow-wrap: anywhere; }
.tt-act__foot { align-items: stretch; }
.tt-act__foot button { min-height: 44px; }
@media (max-width: 400px) {
  .tt-act { padding: 12px; }
  .tt-act__foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 125px), 1fr)); }
  .tt-act__foot button { width: 100%; min-width: 0; white-space: normal; }
}

/* Phase 32.2: clear period separation and resilient trip actions in both themes */
.tt-trip .tt-acts + .tt-acts { margin-top: var(--space-2); }
.tt-act__foot > button { max-width: 100%; overflow-wrap: anywhere; }
.tt-act p, .tt-act__title { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 599.98px) {
  .tt-trip { gap: var(--space-3); }
  .tt-act__foot { gap: 10px; }
  .tt-act__foot > button { flex: 1 1 150px; }
}

/* Compact icons and consistent destination indicators */
/* Phase 32.7: tiny decorative line icons, inherited colors in both themes. */
.tp-question-heading { display: flex; align-items: center; gap: 9px; }
.tp-question-icon { display: inline-flex; width: 16px; height: 16px; flex: 0 0 16px; color: var(--ink-2); }
.tp-question-icon svg { display: block; width: 100%; height: 100%; }

.tp-step-body .form-grid { align-items: start; }
.tp-itin__cities { border-left: 0; padding-left: 20px; }
.tp-itin__cities > li { position: relative; }
.tp-itin__cities > li::before { content: ''; position: absolute; left: -20px; top: .35em; height: 1em; width: 2px; border-radius: 2px; background: var(--line-2); }
.tp-edhead { position: relative; }
.tp-card__discard { position: relative; z-index: 2; margin: 6px 0 0 14px; align-self: end; }
.tp-card__discard .icon { width: 16px; height: 16px; }

/* Phase 32.8 — visible compact draft deletion control, separate from card link */
.tp-card--draft { position:relative; }
.tp-card--draft .tp-card__link { padding-right:max(var(--pad-card), 56px); }
.tp-card--draft .tp-card__discard { position:absolute; top:14px; right:14px; z-index:4; display:inline-grid; place-items:center; width:36px; height:36px; margin:0; padding:0; border:1px solid var(--line); border-radius:var(--radius-pill); color:var(--ink-2); background:var(--surface); cursor:pointer; transition:background 160ms ease, border-color 160ms ease; }
.tp-card--draft .tp-card__discard:hover { color:var(--ink); border-color:var(--ink-2); background:var(--surface-sunk); }
.tp-card--draft .tp-card__discard:focus-visible { outline:2px solid var(--focus-ring); outline-offset:2px; }
.tp-card--draft .tp-card__discard .tp-ico, .tp-card--draft .tp-card__discard .icon { width:17px; height:17px; display:inline-flex; }
