/* App shell + screens */

body { min-height: 100vh; background: var(--color-canvas); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--color-ink); color: var(--color-on-ink); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

.app-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--color-bg-glass); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  padding-top: env(safe-area-inset-top, 0px);
}
.app-header .wordmark { font-family: var(--font-serif); font-weight: 400; font-size: 1.55rem; letter-spacing: -0.01em; }
.app-bar { max-width: 1240px; margin: 0 auto; padding-inline: var(--gutter); min-height: 60px; display: flex; align-items: center; gap: 20px; justify-content: space-between; }
.tabs { display: flex; gap: 4px; }
.tabs a, .bottom-tabs a { text-decoration: none; color: var(--color-muted); font-weight: 600; font-size: 0.92rem; padding: 8px 12px; border-radius: 999px; }
.tabs a:hover { color: var(--color-ink); }
.tabs a[aria-current] { color: var(--color-link); background: var(--color-sea); }

.bottom-tabs { display: none; }
@media (max-width: 720px) {
  .tabs { display: none; }
  .bottom-tabs {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    background: var(--color-surface); border-top: 1px solid var(--color-border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .bottom-tabs a { text-align: center; padding: 10px 2px; font-size: 0.78rem; border-radius: 12px; }
  .bottom-tabs a[aria-current] { color: var(--color-link); background: var(--color-sea); }
  .app-main { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important; }
  .toast-wrap { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}

.app-main { max-width: 1080px; margin: 0 auto; padding: 32px var(--gutter) 72px; outline: none; }
.page-head { margin-bottom: 26px; }
.page-head h1 { font-size: clamp(2.1rem, 4.2vw, 3rem); line-height: 1.05; }
.page-head > .muted, .page-head > p:last-child { max-width: 44em; }
.back { display: inline-block; margin-bottom: 10px; text-decoration: none; color: var(--color-muted); }
.h2 { font-size: clamp(1.5rem, 3.6vw, 2rem); }
.h3 { font-size: 1.2rem; font-family: var(--font-sans); font-weight: 700; }
.h4 { font-size: 1.02rem; font-weight: 700; }
.mt { margin-top: 18px; }
.mt-sm { margin-top: 10px; }
.mt-lg { margin-top: 36px; }
.narrow-card { max-width: 520px; margin: 24px auto; }

.notice { display: flex; gap: 12px; align-items: flex-start; background: var(--color-sea); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px; text-align: left; font-size: 0.93rem; color: var(--color-body); }
.demo-notice { background: var(--color-surface-2); box-shadow: inset 0 0 0 1px var(--color-border-soft); margin-top: 14px; font-size: 0.88rem; }
.notice-icon { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; font-size: 0.75rem; font-weight: 800; font-style: italic; font-family: var(--font-serif); background: var(--color-ink); color: var(--color-on-ink); }

.loading { display: flex; align-items: center; gap: 10px; color: var(--color-muted); padding: 40px 0; justify-content: center; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--color-pto); border-top-color: var(--color-primary); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 18px 6px; }
.empty .btn { margin-top: 6px; }

/* Forms */
.form-section { padding-block: 18px; border-bottom: 1px solid var(--color-border); }
.form-section:first-child { padding-top: 0; }
.form-section h3 { margin-bottom: 4px; }
.form-section > .hint { margin-bottom: 12px; }
.form-actions { margin-top: 20px; }
.holiday-table { margin-top: 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2px 18px; }
.holiday-row { border-bottom: 1px dashed var(--color-border); }
.sub-list { margin-top: 18px; }
.add-row { display: grid; grid-template-columns: 1fr 1fr 1.3fr auto; gap: 8px; margin-top: 10px; align-items: center; }
.add-row:has(> :nth-child(3):last-child) { grid-template-columns: 1fr 1fr auto; }
.add-row:has(> :nth-child(2):last-child) { grid-template-columns: 1fr auto; }
@media (max-width: 560px) {
  .add-row, .add-row:has(> :nth-child(3):last-child) { grid-template-columns: 1fr 1fr; }
  .add-row > .btn { grid-column: 1 / -1; }
  .add-row:has(> :nth-child(2):last-child) { grid-template-columns: 1fr auto; }
  .add-row:has(> :nth-child(2):last-child) > .btn { grid-column: auto; }
}
.range-list, .friend-pick, .member-list, .trip-list, .window-list { list-style: none; padding: 0; margin: 10px 0 0; }
.range-list li, .friend-pick li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--color-border); flex-wrap: wrap; }
.privacy-note { margin-top: 18px; background: var(--color-off); color: var(--color-off-deep); padding: 14px 16px; border-radius: var(--radius); font-size: 0.92rem; }
.consent { padding: 14px 16px; border-radius: var(--radius); margin-top: 14px; }

/* Results */
.results-head { margin: 26px 0 8px; }
.window-list { display: grid; gap: 14px; margin-top: 14px; }
.window { margin: 0 !important; }
.window.is-selected { border-color: var(--color-off-deep); box-shadow: 0 0 0 2px var(--color-off); }
.window-dates { font-size: 1.35rem; margin: 0; }
.explain { margin: 10px 0 0; padding-left: 18px; color: var(--color-body); font-size: 0.93rem; }
.explain li + li { margin-top: 2px; }
.you-cost { margin-top: 10px; background: var(--color-approved); border-radius: 10px; padding: 8px 12px; display: inline-block; }
.vote-row { margin-top: 12px; gap: 8px; }
.vote-row .chip { min-height: 36px; font-size: 0.85rem; }
.cta-card { margin-top: 22px; }
.selected-card .window-dates { font-size: 1.7rem; }
.next-step { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.next-step p { margin: 0; }

.strip { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.strip .d { width: 36px; height: 44px; border-radius: 9px; display: grid; place-items: center; align-content: center; line-height: 1.1; font-weight: 600; }
.strip .dw { font-size: 0.62rem; opacity: 0.75; }
.strip .dn { font-size: 0.85rem; }
.k-work { background: var(--color-pto); color: var(--color-pto-deep); }
.k-off { background: var(--color-off); color: var(--color-off-deep); }
.k-holiday, .k-closure { background: var(--color-holiday); color: var(--color-holiday-deep); }
.k-approved { background: var(--color-approved); color: var(--color-approved-deep); }
.k-plain { background: var(--color-surface-2); color: var(--color-ink); }
.strip .soft { outline: 2px dashed var(--color-accent); outline-offset: -2px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; color: var(--color-muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }

/* Members */
.member { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--color-border); flex-wrap: wrap; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--color-holiday); display: grid; place-items: center; font-weight: 700; flex: none; }
.member-main { flex: 1; min-width: 180px; }
.member-main .badge { margin-left: 6px; }
.member-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.invite-box { margin-top: 18px; }
.card.inset { margin-top: 16px; box-shadow: none; background: var(--color-surface-2); }

/* Trips & home */
.trip-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }
.trip-card { display: flex; align-items: center; gap: 18px; padding: 12px 18px 12px 12px; text-decoration: none; color: inherit; margin: 0 !important; height: 100%; }
.trip-thumb { flex: none; width: 96px; height: 96px; border-radius: 14px; overflow: hidden; background: var(--color-approved); }
.trip-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.trip-card:hover .trip-thumb img { transform: scale(1.07); }
.trip-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.trip-top { display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; }
.trip-name { font-size: 1.3rem; font-weight: 500; letter-spacing: -0.015em; }
.trip-go { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--color-surface-2); color: var(--color-ink); transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease); }
.trip-card:hover .trip-go { background: var(--color-primary); color: var(--color-on-primary); transform: translateX(2px); }
@media (max-width: 520px) { .trip-thumb { width: 72px; height: 72px; } .trip-go { display: none; } }
.home-tile { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 4px; margin: 0 !important; }
.home-tile .btn { align-self: flex-start; margin-top: auto; }
.danger-zone { margin-top: 28px; justify-content: flex-end; }

/* ─── Home: photo hero + "Escape routes" breakout ─── */
.app-main:has(.home) { max-width: 1240px; }
.home { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4vw, 44px); }
.home-hero {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end;
  min-height: clamp(360px, 44vw, 500px); border-radius: 28px; background: var(--color-navy); box-shadow: var(--shadow);
}
.home-hero picture { position: absolute; inset: 0; z-index: -2; }
.home-hero img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 45%; }
.home-hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, var(--color-photo-scrim) 0%, var(--color-photo-scrim-soft) 50%, transparent 78%),
    linear-gradient(0deg, var(--color-photo-scrim) 0%, transparent 65%);
}
.home-hero-copy { padding: clamp(24px, 4.5vw, 56px); max-width: 680px; color: var(--color-on-navy); }
.home-hero .eyebrow { color: var(--color-on-navy); }
.home-hero-title { font-size: clamp(2.4rem, 5.6vw, 4.4rem); line-height: 1.04; color: var(--color-on-navy); margin-bottom: 0.3em; }
.home-hero-sub { color: var(--color-on-navy); font-size: 1.06rem; max-width: 30em; margin-bottom: 22px; }

.escapes { background: var(--color-sea); border-radius: 28px; padding-block: clamp(24px, 3.5vw, 40px) clamp(14px, 2.5vw, 30px); }
.escapes-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px;
  padding-inline: clamp(20px, 3.5vw, 40px); margin-bottom: 20px;
}
.escapes-head p.muted { margin: 0; color: var(--color-body); }
.escapes-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.escapes-tools .legend { background: var(--color-surface); padding: 6px 14px; border-radius: 999px; gap: 12px; }
.rail-nav { display: none; gap: 8px; }
.rail-nav button {
  width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--color-border-strong);
  background: var(--color-surface); color: var(--color-ink); font-size: 1.1rem; cursor: pointer; display: grid; place-items: center;
}
.rail-nav button:hover:not([disabled]) { border-color: var(--color-ink); }
.rail-nav button[disabled] { opacity: 0.4; cursor: default; }
@media (hover: hover) and (min-width: 700px) { .rail-nav:not([hidden]) { display: flex; } }
.escapes-title { font-size: clamp(2.1rem, 4.6vw, 3.2rem); margin: 0 0 0.12em; }
.escape-rail {
  list-style: none; margin: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(262px, 82%); scrollbar-width: none;
  gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding: 4px clamp(20px, 3.5vw, 40px) 16px; scroll-padding-inline: clamp(20px, 3.5vw, 40px);
}
.escape-rail:focus-visible { border-radius: 0; }
.escape-rail::-webkit-scrollbar { display: none; }
@media (min-width: 700px) { .escape-rail { grid-auto-columns: minmax(262px, calc((100% - 3 * 14px) / 3.6)); } }
@media (min-width: 1100px) { .escape-rail { grid-auto-columns: calc((100% - 3 * 14px) / 4.25); } }
@media (prefers-reduced-motion: no-preference) { .escape-rail { scroll-behavior: smooth; } }
.escape, .escape-link {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
}
.escape {
  position: relative; scroll-snap-align: start; padding: 18px 18px 14px; border-radius: 20px;
  background: var(--color-surface); box-shadow: var(--shadow-sm); border: 1.5px solid transparent;
}
.escape.is-next { border-color: var(--color-primary); }
.escape-trip { padding: 0; background: var(--color-navy); color: var(--color-on-navy); }
.escape-trip.is-next { border-color: var(--color-navy); }
.escape-link { height: 100%; width: 100%; padding: 18px 18px 14px; border-radius: 19px; color: inherit; text-decoration: none; }
.escape-head { display: flex; width: 100%; align-items: flex-start; justify-content: space-between; gap: 8px; }
.escape-date { display: grid; place-items: center; align-content: center; width: 58px; height: 62px; border-radius: 14px; background: var(--color-sea); line-height: 1; }
.escape-mon { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-link); }
.escape-day { font-family: var(--font-serif); font-size: 1.75rem; color: var(--color-ink); margin-top: 3px; }
.escape-trip .escape-date { background: var(--color-btn-on-navy); }
.escape-tag { font-size: 0.72rem; font-weight: 700; padding: 0.3em 0.75em; border-radius: 999px; background: var(--color-holiday); color: var(--color-holiday-deep); }
.escape-trip .escape-tag { background: var(--color-off); color: var(--color-off-deep); }
.escape-title { font-size: 1.45rem; line-height: 1.15; font-weight: 500; margin-top: 6px; }
.escape-range { font-size: 0.86rem; color: var(--color-muted); margin-top: -4px; }
.escape-trip .escape-range { color: var(--color-on-navy-muted); }
.escape-dots { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 2px; }
.escape-dots i { width: 14px; height: 14px; border-radius: 4px; }
.escape-math { font-size: 0.98rem; color: var(--color-body); }
.escape-math strong { color: var(--color-ink); }
.escape-trip .escape-math, .escape-trip .escape-math strong { color: var(--color-on-navy); }
.escape-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--color-border);
}
.escape-trip .escape-foot { border-color: var(--color-on-navy-line); }
.escape-when { font-size: 0.82rem; font-weight: 700; color: var(--color-link); }
.escape-trip .escape-when, .escape-cta { color: var(--color-on-navy); }
.escape-cta { font-weight: 600; font-size: 0.88rem; min-height: 36px; display: inline-flex; align-items: center; }
.escape-link:hover .escape-cta { text-decoration: underline; text-underline-offset: 3px; }
.escape-empty { margin: 0 clamp(20px, 3.5vw, 40px) 10px; }

.home-lower { display: grid; gap: 20px; }
.home-lower .row-between { margin-bottom: 12px; }
.home-lower .row-between .h3 { margin: 0; }
@media (min-width: 900px) {
  .home-lower .home-tile { min-height: 210px; }
  .home-lower { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
  .home-lower .home-tile { margin-top: 42px !important; }
}

/* ─── Onboarding: photo panel on the left, numbered stepper + one question per card on the right ─── */
body.is-onboarding .app-header, body.is-onboarding .bottom-tabs { display: none; }
body.is-onboarding { background: var(--color-bg); }
body.is-onboarding .app-main { max-width: none; padding: 0 !important; }
.ob {
  overflow-x: clip; min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: clamp(20px, 3vw, 48px);
  padding: calc(14px + env(safe-area-inset-top, 0px)) 14px calc(14px + env(safe-area-inset-bottom, 0px));
}

/* Photo panel: sticks to the viewport, crossfades between steps, handwritten note on a soft scrim */
.ob-photo {
  position: sticky; top: 14px; height: calc(100dvh - 28px); min-height: 560px; overflow: hidden; isolation: isolate;
  border-radius: 28px; background: var(--color-sea); box-shadow: var(--shadow);
}
.ob-photo-layers, .ob-photo-layers img { position: absolute; inset: 0; width: 100%; height: 100%; }
.ob-photo-layers { z-index: -2; }
.ob-photo-layers img { object-fit: cover; }
.ob-photo::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, var(--color-photo-scrim) 0%, transparent 46%); }
.ob-note {
  position: absolute; left: clamp(24px, 3vw, 40px); right: 24px; bottom: clamp(26px, 4vh, 44px); margin: 0;
  color: var(--color-on-navy); font-size: clamp(1.7rem, 2.4vw, 2.3rem); transform: rotate(-3deg); transform-origin: left bottom;
}

.ob-panel { display: flex; flex-direction: column; min-width: 0; padding: clamp(10px, 2vw, 24px) clamp(4px, 3vw, 48px) 8px 0; }
.ob-top { display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; width: 100%; max-width: 640px; margin: 0 auto; }
.ob-top > .wordmark { font-family: var(--font-serif); font-weight: 400; font-size: 1.65rem; letter-spacing: -0.01em; }

/* Numbered stepper: done steps get a check, the line between them fills in */
.ob-steps { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 10px; counter-reset: none; }
.ob-steps li { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; font-weight: 600; color: var(--color-muted); white-space: nowrap; }
.ob-steps li + li::before { content: ''; width: clamp(14px, 2.4vw, 34px); height: 2px; border-radius: 2px; background: var(--color-border); transition: background .4s var(--ease); }
.ob-steps li.is-done + li::before, .ob-steps li.is-done + li.is-current::before { background: var(--color-primary); }
.ob-num {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none;
  font-size: 0.8rem; font-weight: 700; color: var(--color-muted); background: var(--color-surface); box-shadow: inset 0 0 0 1.5px var(--color-border-strong);
  transition: background .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease);
}
.ob-steps li.is-current { color: var(--color-ink); }
.ob-steps li.is-current .ob-num { background: var(--color-primary); color: var(--color-on-primary); box-shadow: 0 0 0 4px var(--color-selected); }
.ob-steps li.is-done .ob-num { background: var(--color-off); color: var(--color-off-deep); box-shadow: none; font-size: 0; }
.ob-steps li.is-done .ob-num::after { content: '✓'; font-size: 0.82rem; }

/* Cards top-align: when one card replaces another of a different height, nothing re-centres or jumps */
.ob-stage { flex: 1; display: grid; align-items: start; justify-items: center; padding-block: clamp(40px, 14vh, 150px) clamp(20px, 6vh, 64px); }
.ob-stage > * { grid-area: 1 / 1; }
.ob-card { width: 100%; max-width: 560px; will-change: transform, opacity; outline: none; }
.ob-card-wide { max-width: 640px; }
.ob-card h1 { font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1.06; margin-bottom: 0.55em; }
.ob-card > .muted { margin-top: -0.4em; }
.input-xl { min-height: 60px; font-size: 1.15rem; padding-inline: 1.1em; border-radius: 16px; }
.ob .btn { border-radius: 999px; }
.ob-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--color-border-soft); }
.ob-actions .btn { min-width: 150px; min-height: 50px; }
.ob-actions .btn-ghost { min-width: 0; }
.ob-actions-center { justify-content: center; flex-wrap: wrap; border-top: 0; padding-top: 0; }
.ob-alt { margin: 18px 0 0; text-align: center; }

.ob-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 26px; }
@media (max-width: 460px) { .ob-tiles { grid-template-columns: 1fr; } }
.ob-allowance { margin-top: 22px; }
.ob-tile {
  position: relative; display: flex; flex-direction: column; gap: 4px; cursor: pointer;
  padding: 18px 18px 18px 52px; border-radius: 18px; background: var(--color-surface); box-shadow: var(--shadow-xs);
  transition: box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.ob-tile::before {
  content: ''; position: absolute; left: 18px; top: 20px; width: 20px; height: 20px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--color-border-strong); transition: box-shadow .2s var(--ease);
}
.ob-tile:hover { box-shadow: var(--shadow-sm); }
.ob-tile input { position: absolute; opacity: 0; pointer-events: none; }
.ob-tile:has(input:checked) { background: var(--color-selected); box-shadow: 0 0 0 2px var(--color-primary); }
.ob-tile:has(input:checked)::before { box-shadow: inset 0 0 0 6px var(--color-primary); }
.ob-tile:has(input:focus-visible) { box-shadow: var(--focus), 0 0 0 2px var(--color-primary); }
.ob-tile-title { font-weight: 700; }
.stepper { display: grid; grid-template-columns: 60px 1fr 60px; gap: 10px; margin: 10px 0 8px; }
.stepper-btn { min-height: 60px; font-size: 1.4rem; padding: 0; border-radius: 16px; }
.stepper-input { text-align: center; font-weight: 700; font-size: 1.5rem; -moz-appearance: textfield; }
.stepper-input::-webkit-outer-spin-button, .stepper-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Holidays: toggle chips */
.ob-presets { margin: 4px 0 16px; gap: 8px; }
.ob-holidays { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px; }
.ob-holiday {
  position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none;
  padding: 8px 14px 8px 10px; border-radius: 999px; background: var(--color-surface); box-shadow: var(--shadow-xs);
  font-size: 0.9rem; font-weight: 600; transition: background-color .15s var(--ease), box-shadow .15s var(--ease), color .15s var(--ease);
}
.ob-holiday:hover { box-shadow: var(--shadow-sm); }
.ob-holiday input { position: absolute; opacity: 0; pointer-events: none; }
.ob-holiday-text { display: inline-flex; align-items: baseline; gap: 6px; }
.ob-holiday-date { font-size: 0.76rem; font-weight: 500; color: var(--color-muted); }
.ob-check {
  width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1.5px var(--color-border-strong); font-size: 0.7rem; font-weight: 800; transition: all .15s var(--ease);
}
.ob-check::after { content: '+'; color: var(--color-muted); font-size: 0.85rem; }
.ob-holiday:has(input:checked) { background: var(--color-off-soft); box-shadow: 0 0 0 1.5px var(--color-off-deep); color: var(--color-off-deep); }
.ob-holiday:has(input:checked) .ob-holiday-date { color: var(--color-off-deep); }
.ob-holiday:has(input:checked) .ob-check { background: var(--color-off-deep); box-shadow: none; }
.ob-holiday:has(input:checked) .ob-check::after { content: '✓'; color: var(--color-off-soft); font-size: 0.72rem; }
.ob-holiday:has(input:focus-visible) { box-shadow: var(--focus); }

.ob-done { text-align: center; }
.ob-burst {
  width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 2rem; font-weight: 700;
  background: var(--color-off); color: var(--color-off-deep);
  animation: ob-pop .6s cubic-bezier(.34,1.56,.64,1) .15s both;
}
.lede-ob { color: var(--color-body); font-size: 1.08rem; }
.ob-done .notice { text-align: left; }
@keyframes ob-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ob-welcome { display: flex; align-items: baseline; gap: 0.4em; font-weight: 600; color: var(--color-link); margin-bottom: 0.6rem; }
.ob-welcome .wordmark { font-size: 1.05rem; }

@media (max-width: 900px) {
  .ob { grid-template-columns: 1fr; gap: 0; padding: calc(10px + env(safe-area-inset-top, 0px)) 10px calc(20px + env(safe-area-inset-bottom, 0px)); }
  .ob-photo { position: relative; top: 0; height: 150px; min-height: 0; border-radius: 22px; }
  .ob-note { font-size: 1.35rem; bottom: 16px; left: 20px; }
  .ob-panel { padding: 18px 10px 0; }
  .ob-top { order: 0; }
  .ob-steplabel { display: none; }
  .ob-steps li.is-current .ob-steplabel { display: inline; }
  .ob-stage { align-items: start; padding-top: 28px; }
}

/* ─── Month calendar (My PTO): date-picker style. Plain numbers; trips are one sea-blue band,
   PTO days solid blue circles, holidays a small coral dot. ─── */
.cal-card { margin-bottom: 8px; }
.cal-nav { gap: 6px; }
.cal-nav .btn-secondary { width: 40px; padding: 0; font-size: 1.2rem; }
.cal-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 322px)); gap: 20px 48px; margin-top: 14px; }
@media (max-width: 420px) { .cal-months { grid-template-columns: minmax(0, 1fr); } }
.cal-side .cal-legend { margin-top: 18px; }
/* Wide: months stay compact (about 46px a day) and the legend becomes a column on the right */
@media (min-width: 1000px) {
  .cal-body { display: grid; grid-template-columns: auto minmax(180px, 220px); justify-content: space-between; gap: 40px; align-items: start; }
  .cal-body .cal-months { grid-template-columns: repeat(2, 322px); }
  .cal-side { margin-top: 14px; padding-left: 28px; border-left: 1px solid var(--color-border-soft); }
  .cal-side .cal-legend { flex-direction: column; gap: 12px; margin: 30px 0 14px; padding-top: 0; border-top: 0; }
}
.cal-title { font-family: var(--font-serif); font-weight: 400; font-size: 1.3rem; margin-bottom: 10px; }
.cal-grid { width: 100%; border-collapse: separate; border-spacing: 0 5px; table-layout: fixed; }
.cal-grid th { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; color: var(--color-muted); padding-bottom: 4px; }
.cal-grid td { padding: 0; text-align: center; }
.cal-grid td.cal-day { background: none; color: inherit; }
.cal-num {
  position: relative; display: grid; place-items: center;
  margin: 0 auto; width: 100%; max-width: 40px; aspect-ratio: 1; border-radius: 50%;
  font-size: 0.88rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--color-ink);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.cal-day.k-off .cal-num { color: var(--color-muted); font-weight: 500; }
.cal-day:is(.k-holiday, .k-closure) .cal-num { font-weight: 700; }
.cal-day:is(.k-holiday, .k-closure) .cal-num::after {
  content: ''; position: absolute; left: 50%; bottom: 4px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--color-accent);
}
.cal-day.k-approved .cal-num { background: var(--color-approved); color: var(--color-approved-deep); }
.cal-day.is-hard .cal-num {
  background: repeating-linear-gradient(135deg, var(--color-hatch-a) 0 4px, var(--color-hatch-b) 4px 8px);
  color: var(--color-muted); text-decoration: line-through; text-decoration-color: var(--color-muted);
}
.cal-day.is-soft .cal-num { box-shadow: inset 0 0 0 1.5px var(--color-accent); }

/* Suggested trips: one continuous band, rounded at the ends */
.cal-grid td.cal-day.in-trip { background: var(--color-off); }
.cal-grid td.cal-day.in-trip.trip-start { border-radius: 999px 0 0 999px; }
.cal-grid td.cal-day.in-trip.trip-end { border-radius: 0 999px 999px 0; }
.cal-grid td.cal-day.in-trip.trip-start.trip-end { border-radius: 999px; }
.cal-grid td.cal-day.in-trip:first-child:not(.trip-start) { border-radius: 10px 0 0 10px; }
.cal-grid td.cal-day.in-trip:last-child:not(.trip-end) { border-radius: 0 10px 10px 0; }
.cal-day.in-trip .cal-num { color: var(--color-ink); }
.cal-day.is-pto .cal-num { background: var(--color-primary); color: var(--color-on-primary); box-shadow: 0 2px 6px -2px var(--color-primary-glow); }
.cal-grid td.cal-day.is-focus { background: var(--color-trip-focus); }
.cal-day.is-focus.is-pto .cal-num { background: var(--color-navy); color: var(--color-on-navy); }
.cal-day.is-today .cal-num { box-shadow: inset 0 0 0 1.5px var(--color-ink); }
.cal-day.is-outside .cal-num { opacity: 0.35; }

.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 18px 0 6px; padding-top: 14px; border-top: 1px solid var(--color-border-soft); color: var(--color-muted); }
.cal-legend span { display: inline-flex; align-items: center; }
.cal-legend .sw { position: relative; display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 7px; }
.cal-legend .sw-pto { background: var(--color-primary); }
.cal-legend .sw-trip { width: 24px; border-radius: 999px; background: var(--color-off); }
.cal-legend .sw-holiday { width: 6px; height: 6px; margin-inline: 4px 11px; background: var(--color-accent); }
.cal-legend .sw.k-approved { background: var(--color-approved); }
.cal-legend .sw-hard { background: repeating-linear-gradient(135deg, var(--color-hatch-a) 0 3px, var(--color-border-strong) 3px 5px); }
.cal-legend .sw-soft { box-shadow: inset 0 0 0 1.5px var(--color-accent); }
@media (max-width: 420px) { .cal-num { font-size: 0.8rem; } }

/* Day-dot strips (Home, My PTO cards) speak the same language as the calendar */
:is(.escape-dots, .legend) i.k-work { background: var(--color-primary); }
:is(.escape-dots, .legend) i.k-off { background: var(--color-off); }
:is(.escape-dots, .legend) i:is(.k-holiday, .k-closure) { background: var(--color-accent); }

/* ─── Segmented controls ─── */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-radius: 13px; background: var(--color-surface-2); box-shadow: inset 0 0 0 1px var(--color-border-soft); }
.seg button {
  min-height: 38px; padding: 6px 14px; border-radius: 10px; border: 0; background: transparent; white-space: nowrap;
  font-weight: 600; font-size: 0.88rem; color: var(--color-muted); cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.seg button:hover { color: var(--color-ink); }
.seg button[aria-pressed="true"] { background: var(--color-surface); color: var(--color-ink); box-shadow: var(--shadow-xs); }
.seg-lg { display: flex; width: 100%; margin: 6px 0 16px; }
.seg-lg button { flex: 1; min-height: 46px; font-size: 1rem; }
.linklike { background: none; border: 0; padding: 0; color: var(--color-link); font: inherit; text-decoration: underline; cursor: pointer; }

.stepper-sm { grid-template-columns: 46px 1fr 46px; max-width: 240px; margin: 0; }
.stepper-sm .stepper-btn { min-height: 46px; font-size: 1.2rem; }
.stepper-sm .stepper-input { min-height: 46px; font-size: 1.15rem; }

/* ─── Share sheet ─── */
.sheet-overlay { position: fixed; inset: 0; z-index: 80; background: var(--color-scrim); display: grid; place-items: center; padding: 16px; }
.sheet { width: min(440px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--color-surface); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }
.sheet-preview { margin: 12px auto 8px; max-width: 260px; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; border: 1px solid var(--color-border); display: grid; place-items: center; background: var(--color-surface-2); }
.sheet-preview img { width: 100%; height: 100%; object-fit: cover; }
.sheet-actions { justify-content: center; margin-top: 12px; }

/* ─── Split layout with photo panel (task pages) ─── */
.app-main:has(.layout-aside) { max-width: 1240px; }
.layout-aside { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.layout-main .narrow-card { margin: 0; max-width: none; }
.photo-aside {
  position: relative; order: -1; overflow: hidden;
  height: 150px; border-radius: var(--radius-lg); background: var(--color-sea);
}
.photo-aside img { width: 100%; height: 100%; object-fit: cover; }
.photo-aside-caption { display: none; }
@media (min-width: 1100px) {
  .layout-aside { grid-template-columns: minmax(0, 640px) minmax(0, 1fr); gap: 48px; align-items: start; }
  .photo-aside {
    order: 0; position: sticky; top: calc(84px + env(safe-area-inset-top, 0px));
    height: calc(100vh - 120px); min-height: 520px; max-height: 860px; border-radius: 28px; box-shadow: var(--shadow);
  }
  .photo-aside-caption {
    display: block; position: absolute; inset: auto 0 0 0; padding: 120px 36px 34px;
    background: linear-gradient(180deg, transparent 0%, var(--color-photo-scrim) 100%);
    color: var(--color-on-navy);
  }
  .photo-aside-title { font-size: 2rem; line-height: 1.15; margin: 0 0 8px; font-weight: 500; }
  .photo-aside-body { margin: 0; color: var(--color-on-navy); opacity: 0.92; max-width: 34em; }
}

/* ─── Page enter: each freshly rendered screen rises in, children lightly staggered ─── */
.view > * { animation: rise .5s var(--ease) both; }
.view > :nth-child(2) { animation-delay: 50ms; }
.view > :nth-child(3) { animation-delay: 100ms; }
.view > :nth-child(4) { animation-delay: 150ms; }
.view > :nth-child(n+5) { animation-delay: 200ms; }

/* ─── Trip detail: photo banner + main column with a sticky sidebar ─── */
.trip-hero {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end;
  min-height: clamp(230px, 28vw, 320px); margin-bottom: 24px; border-radius: 28px;
  background: var(--color-navy); box-shadow: var(--shadow);
}
.trip-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.trip-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, var(--color-photo-scrim) 0%, var(--color-photo-scrim-soft) 45%, transparent 80%); }
.trip-hero-copy { width: 100%; padding: 68px clamp(20px, 3.5vw, 36px) clamp(20px, 3.5vw, 36px); color: var(--color-on-navy); }
.trip-hero h1 { color: var(--color-on-navy); font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.04; margin: 12px 0 8px; }
.trip-facts { color: var(--color-on-navy); margin: 0; opacity: 0.92; }
.trip-facts + .trip-facts { margin-top: 4px; }
.trip-back {
  position: absolute; top: 18px; left: 18px; display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px;
  border-radius: 999px; background: var(--color-glass-strong); color: var(--color-ink); backdrop-filter: blur(10px);
  text-decoration: none; font-weight: 600; font-size: 0.85rem; box-shadow: var(--shadow-xs);
}
.detail-grid { display: grid; gap: 16px; }
.detail-main > .card, .detail-side > .card { margin: 0 0 16px; }
.detail-side .next-step { display: block; }
.surface-navy .next-text { color: var(--color-on-navy); font-size: 1.06rem; font-weight: 600; line-height: 1.4; margin: 0 0 16px; }
.detail-side .next-step .eyebrow { color: var(--color-on-navy-muted); margin-bottom: 8px; }
.detail-side .danger-zone { margin-top: 4px; justify-content: flex-start; }
@media (min-width: 980px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
  .detail-side { position: sticky; top: calc(84px + env(safe-area-inset-top, 0px)); }
}
@media (max-width: 979px) {
  .detail-side { display: contents; }
  .detail-side .next-step { order: -1; margin-bottom: 0; }
}

.window-dates { letter-spacing: -0.015em; }

/* ─── My PTO: "Your optimal vacation windows" (moodboard screen 3) ─── */
.pto-head { display: grid; gap: 8px 32px; align-items: end; margin-bottom: 22px; }
.pto-head h1 { font-size: clamp(2.3rem, 4.8vw, 3.4rem); line-height: 1.02; margin-bottom: 0.25em; }
.pto-basis { font-size: 1.08rem; color: var(--color-body); margin: 0 0 6px; }
.pto-profile { color: var(--color-muted); margin: 0; }
.pto-profile .linklike { font-weight: 600; margin-left: 4px; }
.pto-doodle { position: relative; width: 250px; height: 116px; justify-self: end; margin-bottom: 6px; }
.pto-doodle[hidden] { display: none; }
.pto-cal-doodle { position: absolute; left: 0; top: 4px; width: 112px; height: auto; transform: rotate(-5deg); stroke-width: 2; }
.pto-cal-doodle rect.on { fill: var(--color-pto); stroke: var(--color-pto-deep); }
.pto-cal-doodle .ring { stroke-dasharray: 210; stroke-dashoffset: 210; animation: doodle-draw 1s var(--ease) .45s forwards; }
.pto-doodle-note { position: absolute; left: 124px; top: 0; width: 126px; margin: 0; font-size: 1.32rem; transform: rotate(-6deg); }
.pto-doodle-arrow { left: 150px; top: 66px; width: 54px; height: auto; transform: scaleX(-1) rotate(-12deg); }
@keyframes doodle-draw { to { stroke-dashoffset: 0; } }
@media (min-width: 760px) { .pto-head { grid-template-columns: minmax(0, 1fr) auto; } }
@media (max-width: 759px) { .pto-doodle { justify-self: start; transform: scale(.86); transform-origin: left top; height: 100px; margin: 4px 0 -14px; } }

/* Tool tabs: underlined, like the moodboard's trip tabs */
.pto-tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--color-border); margin-bottom: 20px; }
.pto-tabs button {
  position: relative; padding: 10px 2px 13px; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 0.98rem; color: var(--color-muted); transition: color .2s var(--ease);
}
.pto-tabs button::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2.5px; border-radius: 2px; background: var(--color-primary); transform: scaleX(0); transition: transform .3s var(--ease); }
.pto-tabs button:hover { color: var(--color-ink); }
.pto-tabs button[aria-pressed="true"] { color: var(--color-ink); }
.pto-tabs button[aria-pressed="true"]::after { transform: scaleX(1); }

/* "Show me:" pills + period and PTO what-if */
.pto-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-bottom: 22px; }
.pto-show { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pto-show-label { font-weight: 600; font-size: 0.92rem; color: var(--color-body); margin-right: 4px; }
.pto-show .chip { font-weight: 600; padding-inline: 1.05em; }
.pto-toolbar-end { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.pto-budget { display: flex; align-items: center; gap: 10px; }
.pto-budget-label { font-weight: 600; font-size: 0.92rem; color: var(--color-body); white-space: nowrap; }
.pto-budget .stepper-sm { width: 150px; grid-template-columns: 40px 1fr 40px; gap: 6px; }
.pto-budget .stepper-sm :is(.stepper-btn, .stepper-input) { min-height: 42px; }
.pto-whatif { margin: -10px 0 18px; }
.pto-more { margin: -8px 0 22px; padding-block: 0; }
.pto-more summary { cursor: pointer; padding: 16px 0; font-weight: 600; font-size: 0.94rem; color: var(--color-body); }
.pto-more[open] summary { border-bottom: 1px solid var(--color-border-soft); margin-bottom: 16px; }
.pto-more .planner { padding-bottom: 20px; }

.pto-results-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; margin-bottom: 16px; }
.pto-results-head p { margin: 0; }
.pto-results-title { font-size: clamp(1.45rem, 2.8vw, 1.9rem); line-height: 1.15; margin: 0 0 4px; letter-spacing: -0.02em; }
.pto-big { color: var(--color-link); }
.pto-results-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.pto-empty { margin-bottom: 22px; }
.pto-fine { margin: 10px 0 0; }

/* Window cards: text on top, photo below with actions floating on it */
.vw-grid { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.vw {
  display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; background: var(--color-surface); box-shadow: var(--shadow-sm);
  transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.vw:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.vw-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px 20px 16px; }
.vw-dates { margin: 0; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-link); }
.vw-title { margin: 0; font-size: 1.5rem; line-height: 1.12; font-weight: 400; }
.vw-math { margin: 0; color: var(--color-body); }
.vw-math strong { color: var(--color-ink); }
.vw-dots { margin-top: 4px; }
.vw-note { margin: 2px 0 0; }
.vw-photo { position: relative; margin: auto 10px 10px; height: 190px; border-radius: 15px; overflow: hidden; background: var(--color-sea); }
.vw-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.vw:hover .vw-photo img { transform: scale(1.04); }
.vw-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, var(--color-photo-scrim-soft) 0%, transparent 55%); pointer-events: none; }
.vw-badge {
  position: absolute; left: 12px; top: 12px; z-index: 1; padding: 0.4em 0.85em; border-radius: 999px;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--color-glass-strong); color: var(--color-ink); backdrop-filter: blur(8px); box-shadow: var(--shadow-xs);
}
.vw-actions { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vw-actions .btn { border-radius: 999px; }
.vw-cal {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--color-glass-strong); color: var(--color-ink); backdrop-filter: blur(8px); box-shadow: var(--shadow-xs);
  transition: background .2s var(--ease);
}
.vw-cal:hover { background: var(--color-btn-on-navy); }
.vw-cal svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* Navy CTA with a taped polaroid */
.pto-cta { position: relative; display: grid; gap: 20px; align-items: center; overflow: hidden; }
.pto-cta h3 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.1; }
.pto-cta-polaroid { display: none; }
@media (min-width: 760px) {
  .pto-cta { grid-template-columns: minmax(0, 1fr) 200px; padding: 30px 40px; }
  .pto-cta-polaroid { display: block; width: 188px; margin: 0; transform: rotate(4deg); justify-self: center; }
  .pto-cta-polaroid figcaption { font-size: 1rem; line-height: 1.15; }
}
@media (prefers-reduced-motion: reduce) { .pto-cal-doodle .ring { animation: none; stroke-dashoffset: 0; } .vw, .vw-photo img { transition: none; } }

/* Money input: fixed "$" inside the field */
.input-money { position: relative; }
.input-money > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 600; color: var(--color-muted); pointer-events: none; }
.input-money .input { padding-left: 28px; font-variant-numeric: tabular-nums; }

/* ─── Friends (moodboard screen 4) ─── */
.fr-head { display: grid; gap: 18px 40px; align-items: center; margin-bottom: 26px; }
.fr-head h1 { font-size: clamp(2.3rem, 4.8vw, 3.4rem); line-height: 1.02; margin-bottom: 0.3em; }
.fr-sub { font-size: 1.06rem; color: var(--color-body); max-width: 32em; margin: 0; }
.fr-count { margin: 14px 0 0; color: var(--color-body); }
.fr-count strong { font-family: var(--font-serif); font-weight: 400; font-size: 1.5rem; color: var(--color-ink); margin-right: 2px; }
.fr-art { position: relative; width: 300px; height: 252px; justify-self: end; }
.fr-polaroid { position: absolute; right: 14px; top: 4px; width: 168px; margin: 0; transform: rotate(5deg); }
.fr-note { position: absolute; left: 0; bottom: 2px; margin: 0; font-size: 1.45rem; transform: rotate(-7deg); }
.fr-heart { left: 196px; bottom: 6px; width: 30px; height: auto; transform: rotate(-12deg); }
@media (min-width: 760px) { .fr-head { grid-template-columns: minmax(0, 1fr) auto; } }
@media (max-width: 759px) { .fr-art { justify-self: center; width: 270px; height: 178px; margin-top: -4px; } .fr-polaroid { width: 118px; right: 8px; } .fr-note { font-size: 1.3rem; } .fr-heart { left: 168px; bottom: 4px; } }

.fr-incoming-link { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; margin-bottom: 18px; }
.fr-incoming-link p { margin: 4px 0 0; }
.fr-incoming-link .fr-dismiss { color: var(--color-on-navy); }

.fr-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
@media (min-width: 940px) { .fr-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 24px; } }
.fr-side { display: grid; gap: 18px; }
.fr .card { margin: 0; }
.fr .card > .h3, .fr .row-between .h3 { margin: 0; }
.fr .row-between { margin-bottom: 4px; }
.fr-pill { border-radius: 999px; }

.fr-add .notice { margin: 16px 0; }
.fr-tabs { display: inline-flex; gap: 4px; padding: 4px; margin: 16px 0 20px; border-radius: 999px; background: var(--color-surface-2); box-shadow: inset 0 0 0 1px var(--color-border-soft); }
.fr-tabs button {
  min-height: 38px; padding: 6px 18px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 0.9rem; color: var(--color-muted); transition: background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.fr-tabs button:hover { color: var(--color-ink); }
.fr-tabs button[aria-selected="true"] { background: var(--color-surface); color: var(--color-ink); box-shadow: 0 0 0 1.5px var(--color-primary), var(--shadow-xs); }
.fr-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 6px; }
.fr-field .input { min-height: 50px; border-radius: 999px; padding-inline: 18px; }
.fr-field .btn { min-height: 50px; padding-inline: 22px; }
@media (max-width: 480px) { .fr-field { grid-template-columns: 1fr; } }
#fr-link { color: var(--color-body); background: var(--color-surface-2); }
.input-at { position: relative; }
.input-at > span { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-weight: 600; color: var(--color-muted); pointer-events: none; }
.fr-field .input-at .input { padding-left: 36px; }
.fr-requests .h3 { display: flex; align-items: center; gap: 8px; }

.fr-people { list-style: none; margin: 8px 0 0; padding: 0; }
.fr-person { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--color-border-soft); }
.fr-person:first-child { border-top: 0; }
.fr-avatar {
  flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 0.9rem; letter-spacing: 0.02em; background: var(--color-off); color: var(--color-off-deep);
}
.fr-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.fr-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-who .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-actions { display: flex; gap: 4px; flex: none; }
.fr-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.fr .fr-incoming-link { margin-bottom: 18px; }
.fr-field + .hint { margin-top: 10px; }
.fr .fr-privacy .h3 { margin: 0 0 14px; }
.fr-see { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fr-see li { position: relative; padding-left: 30px; color: var(--color-body); font-size: 0.95rem; }
.fr-see li::before {
  content: '✓'; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.7rem; font-weight: 800; background: var(--color-primary); color: var(--color-on-primary);
}
.fr-see li.is-no::before { content: '✕'; background: var(--color-surface); color: var(--color-ink); box-shadow: inset 0 0 0 1.5px var(--color-border-strong); }
@media (max-width: 939px) { .fr-main, .fr-side { display: contents; } .fr-privacy { order: 5; } }

/* ─── Trip page: crew, tabs, availability timeline, vote cards (moodboard screens 5 and 8) ─── */
.trip-crew { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.av-stack { display: inline-flex; }
.av-stack .fr-avatar { width: 38px; height: 38px; font-size: 0.72rem; letter-spacing: 0; box-shadow: 0 0 0 2.5px var(--color-surface); }
.av-stack .fr-avatar + .fr-avatar { margin-left: -5px; }
.av-more { background: var(--color-surface-2); color: var(--color-ink); }
.trip-hero .av-stack .fr-avatar { box-shadow: 0 0 0 2.5px var(--color-navy); }
.trip-crew-text { font-size: 0.9rem; font-weight: 600; color: var(--color-on-navy); }
.trip-crew-add {
  width: 36px; height: 36px; border-radius: 50%; border: 1.5px dashed var(--color-on-navy); background: var(--color-on-navy-hover);
  color: var(--color-on-navy); font-size: 1.2rem; line-height: 1; cursor: pointer; display: grid; place-items: center; backdrop-filter: blur(6px);
}
.trip-crew-add:hover { background: var(--color-on-navy-line); }

.trip-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 20px; border-bottom: 1px solid var(--color-border); }
.trip-tabs::-webkit-scrollbar { display: none; }
.trip-tabs button {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 12px 14px 14px; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 0.96rem; color: var(--color-muted); transition: color .2s var(--ease);
}
.trip-tabs button::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2.5px; border-radius: 2px; background: var(--color-primary); transform: scaleX(0); transition: transform .3s var(--ease); }
.trip-tabs button:hover:not(:disabled) { color: var(--color-ink); }
.trip-tabs button[aria-selected="true"] { color: var(--color-ink); }
.trip-tabs button[aria-selected="true"]::after { transform: scaleX(1); }
.trip-tabs button:disabled { opacity: 0.45; cursor: default; }
.trip-tab-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; font-size: 0.74rem; background: var(--color-surface-2); color: var(--color-body); box-shadow: inset 0 0 0 1px var(--color-border-soft); }
.trip-tabs button[aria-selected="true"] .trip-tab-count { background: var(--color-selected); color: var(--color-link); box-shadow: none; }
.trip-panel { animation: fade .35s var(--ease); }
.trip-panel .row-between .h3 { margin: 0; }
.trip-panel .card > .row-between { margin-bottom: 8px; }

/* Best group windows */
.bw-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.bw { display: flex; gap: 12px; align-items: flex-start; }
.bw-check {
  flex: none; width: 26px; height: 26px; margin-top: 12px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; font-weight: 800;
  color: var(--color-muted); box-shadow: inset 0 0 0 1.5px var(--color-border-strong);
}
.bw.is-full .bw-check { background: var(--color-primary); color: var(--color-on-primary); box-shadow: none; }
.bw-body {
  flex: 1; display: grid; gap: 2px; text-align: left; padding: 10px 14px; border: 0; border-radius: 14px; cursor: pointer; font: inherit;
  background: var(--color-surface-2); color: inherit; transition: background .2s var(--ease), box-shadow .2s var(--ease);
}
.bw-body:hover { background: var(--color-selected); }
.bw-dates { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-ink); }
.bw-meta { font-size: 0.88rem; color: var(--color-body); }
.bw-share { font-size: 0.82rem; font-weight: 600; color: var(--color-link); }
.bw:not(.is-full) .bw-share { color: var(--color-muted); }

.ov-crew { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
.ov-crew p { margin: 0; }

/* Availability timeline */
.av-grid { display: grid; gap: 18px; align-items: start; }
@media (min-width: 980px) { .av-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; } .av-side { position: sticky; top: calc(84px + env(safe-area-inset-top, 0px)); } }
.trip-panel .av-card, .trip-panel .av-side { margin: 0; }
.av-title { font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.7rem, 3vw, 2.2rem); margin: 0 0 2px; }
.av-side .h3 { margin: 0 0 12px; }
.av-vote { margin-top: 16px; width: 100%; }
.hm { margin: 22px 0 14px; display: grid; gap: 10px; }
.hm-months { display: grid; grid-template-columns: 64px minmax(0, 1fr); }
.hm-months > div { position: relative; height: 18px; }
.hm-months > div span { position: absolute; top: 0; font-size: 0.74rem; font-weight: 600; color: var(--color-muted); white-space: nowrap; }
.hm-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; }
.hm-label { font-size: 0.86rem; font-weight: 600; color: var(--color-body); }
.hm-track { display: flex; height: 34px; border-radius: 10px; overflow: hidden; background: var(--color-surface-2); }
.hm-seg { min-width: 0; }
.hm-seg + .hm-seg { box-shadow: inset 1px 0 0 var(--color-surface); }
.hm-full { background: var(--color-primary); }
.hm-most { background: var(--color-trip-focus); }
.hm-some { background: var(--color-off); }
.hm-none, .hm-work, .hm-unknown { background: var(--color-surface-2); }
.hm-off { background: var(--color-off); }
.hm-hard { background: repeating-linear-gradient(135deg, var(--color-hatch-a) 0 4px, var(--color-border-strong) 4px 6px); }
.hm-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--color-muted); margin-bottom: 8px; }
.hm-legend span { display: inline-flex; align-items: center; gap: 7px; }
.hm-legend i { width: 22px; height: 12px; border-radius: 4px; }

/* Vote cards */
.vote-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; margin-bottom: 14px; }
.vote-head p { margin: 0; }
.vote-title { font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin: 0 0 4px; }
.trip-panel .selected-card { margin: 0 0 18px; }
.opt-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); margin: 6px 0 20px; }
.opt { display: flex; flex-direction: column; padding: 10px !important; overflow: hidden; border-radius: 22px; border: 0; box-shadow: var(--shadow-sm); transition: box-shadow .25s var(--ease); }
.opt.is-mine { box-shadow: 0 0 0 2px var(--color-primary), var(--shadow-sm); }
.opt.is-selected { box-shadow: 0 0 0 2.5px var(--color-navy), var(--shadow-sm); }
.opt-photo { position: relative; height: 150px; border-radius: 15px; overflow: hidden; background: var(--color-sea); }
.opt-photo img { width: 100%; height: 100%; object-fit: cover; }
.opt-pick {
  position: absolute; right: 12px; top: 12px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.85rem; font-weight: 800; background: var(--color-glass-strong); color: var(--color-on-primary); box-shadow: inset 0 0 0 2px var(--color-surface);
}
.opt.is-selected .opt-pick { background: var(--color-navy); }
.opt-body { padding: 14px 10px 8px; display: flex; flex-direction: column; flex: 1; }
.opt-body .window-dates { font-size: 1.35rem; }
.opt-meta { margin: 2px 0 8px; }
.opt-body .explain { font-size: 0.88rem; }
.opt-body .you-cost { align-self: flex-start; }
.vote-row { flex-wrap: wrap; }
.vote-tally { margin: 8px 0 0; }
.vote-tally strong { color: var(--color-ink); }
.opt-body > .btn { align-self: flex-start; }
.opt-chosen { margin: 10px 0 0; color: var(--color-ink); }

/* People */
.member .fr-avatar { width: 40px; height: 40px; }
.member-status.is-ready { color: var(--color-off-deep); font-weight: 600; }
.opt-why { margin: 2px 0 4px; }
.opt-why summary { cursor: pointer; font-size: 0.86rem; font-weight: 600; color: var(--color-link); padding: 6px 0; }
.opt-why .explain { margin-top: 2px; }
@media (max-width: 480px) { .trip-tabs { gap: 0; } .trip-tabs button { padding-inline: 9px; font-size: 0.9rem; gap: 5px; } .trip-tabs button::after { left: 6px; right: 6px; } }

/* ─── Home: hero note, countdown banner, photo escape cards (moodboard screens 11–12) ─── */
.home-scribble { text-shadow: 0 1px 14px var(--color-photo-scrim); position: absolute; right: clamp(28px, 5vw, 64px); top: clamp(26px, 4vw, 48px); margin: 0; color: var(--color-on-navy); font-size: clamp(1.4rem, 2.2vw, 1.9rem); transform: rotate(-6deg); text-align: right; }
.home-heart { right: clamp(30px, 5vw, 66px); top: calc(clamp(26px, 4vw, 48px) + 84px); width: 30px; height: auto; transform: rotate(10deg); }
@media (max-width: 759px) { .home-scribble, .home-heart { display: none; } }

.home-countdown {
  position: relative; isolation: isolate; overflow: hidden; border-radius: 28px; min-height: 260px;
  display: grid; place-items: center; padding: clamp(18px, 4vw, 40px); background: var(--color-navy); box-shadow: var(--shadow);
}
.home-countdown > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.home-countdown::after { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--color-photo-scrim-soft); }
.cd-glass {
  width: min(100%, 620px); padding: 22px clamp(18px, 3vw, 30px); border-radius: 22px; text-align: center;
  background: var(--color-on-navy-hover); backdrop-filter: blur(14px) saturate(1.2); box-shadow: inset 0 0 0 1px var(--color-on-navy-line), var(--shadow-lg);
}
.cd-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 24px; }
.cd-title { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.1; color: var(--color-on-navy); }
.cd-tiles { display: flex; gap: 8px; }
.cd-tile { display: grid; place-items: center; min-width: 66px; padding: 8px 10px; border-radius: 14px; background: var(--color-glass-strong); color: var(--color-ink); }
.cd-tile strong { font-family: var(--font-serif); font-weight: 400; font-size: 1.6rem; line-height: 1; }
.cd-tile span { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; color: var(--color-body); margin-top: 3px; white-space: nowrap; }
.cd-dates { margin: 12px 0 14px; color: var(--color-on-navy); font-weight: 600; }
.cd-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cd-actions .btn { border-radius: 999px; }

/* Escape cards get a photo on top, with the date tile overlapping it */
.escape { padding-top: 10px; }
.escape-link { padding-top: 10px; }
.escape-photo { position: relative; display: block; width: calc(100% + 16px); margin: 0 -8px 0; height: 128px; border-radius: 14px; overflow: hidden; background: var(--color-sea); }
.escape-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.escape:hover .escape-photo img { transform: scale(1.04); }
.escape-photo .escape-tag { position: absolute; right: 10px; top: 10px; }
.escape-head { margin-top: -38px; padding-left: 6px; position: relative; z-index: 1; }
.escape-date { background: var(--color-surface); box-shadow: var(--shadow-sm); }
.escape-trip .escape-date { background: var(--color-btn-on-navy); }
@media (prefers-reduced-motion: reduce) { .escape-photo img { transition: none; } }

/* ─── New trip: four-step card with a stepper; photo + handwritten note change per step ─── */
.nt-head { margin-bottom: 18px; }
.nt-card { padding: clamp(22px, 3vw, 34px); }
.nt-steps { margin-bottom: 26px; flex-wrap: wrap; row-gap: 8px; }
.nt-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.nt-title { padding: 0; margin: 0 0 18px; font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.7rem, 3vw, 2.2rem); line-height: 1.1; color: var(--color-ink); }
.nt-lede { margin: -8px 0 18px; }
.nt-stepper { max-width: none; }
.nt-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--color-border-soft); }
.nt-actions .btn { border-radius: 999px; min-height: 48px; }
.nt-next { min-width: 150px; margin-left: auto; }
.nt-summary dl { margin: 0 0 18px; display: grid; gap: 0; border-radius: 16px; background: var(--color-surface-2); padding: 6px 18px; }
.nt-summary dl > div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--color-border-soft); }
.nt-summary dl > div:first-child { border-top: 0; }
.nt-summary dt { font-size: 0.82rem; font-weight: 700; color: var(--color-muted); }
.nt-summary dd { margin: 0; color: var(--color-ink); font-weight: 500; overflow-wrap: anywhere; }
.photo-aside picture { position: absolute; inset: 0; }
.photo-aside picture img { position: absolute; inset: 0; }
.nt-note { position: absolute; left: 28px; right: 24px; bottom: 26px; margin: 0; color: var(--color-on-navy); font-size: clamp(1.3rem, 2.2vw, 2.1rem); transform: rotate(-4deg); transform-origin: left bottom; text-shadow: 0 1px 14px var(--color-photo-scrim); }
.layout-aside:has(.nt-card) .photo-aside::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, var(--color-photo-scrim) 0%, transparent 45%); pointer-events: none; }
.layout-aside:has(.nt-card) .nt-note { z-index: 1; }
@media (max-width: 1099px) { .nt-note { font-size: 1.25rem; bottom: 14px; left: 18px; } }
@media (max-width: 600px) { .nt-steps .ob-steplabel { display: none; } .nt-steps li.is-current .ob-steplabel { display: inline; } }

/* ─── Join a trip: the first screen an invited friend sees ─── */
.app-main:has(.jn) { max-width: 1240px; }
.jn { display: grid; gap: 22px; align-items: stretch; }
.jn-photo { position: relative; isolation: isolate; overflow: hidden; height: 190px; border-radius: 24px; background: var(--color-sea); box-shadow: var(--shadow); }
.jn-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.jn-photo::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, var(--color-photo-scrim) 0%, transparent 55%); }
.jn-note { position: absolute; left: 22px; right: 22px; bottom: 16px; margin: 0; color: var(--color-on-navy); font-size: 1.35rem; transform: rotate(-4deg); transform-origin: left bottom; }
.jn-panel { display: flex; flex-direction: column; justify-content: center; padding: 6px 4px; }
.jn-preview { margin-bottom: 22px; }
.jn-title { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.02; margin: 0 0 12px; }
.jn-sub { margin: 0; color: var(--color-body); font-size: 1.05rem; }
.jn-crew { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.jn-see { margin: 26px 0 20px; padding: 20px 22px; border-radius: 20px; background: var(--color-surface); box-shadow: var(--shadow-xs); }
.jn-see .h4 { margin: 0 0 12px; font-family: var(--font-sans); font-weight: 700; }
.jn-consent { margin: 0; }
.jn-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.jn-cta { border-radius: 999px; min-width: 180px; }
.jn-cta[disabled] { opacity: 0.55; cursor: not-allowed; }
.jn > .jn-panel > .jn-cta { align-self: flex-start; }
@media (min-width: 900px) {
  .jn { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(32px, 4vw, 64px); min-height: calc(100vh - 160px); }
  .jn-photo { height: auto; min-height: 560px; border-radius: 28px; }
  .jn-note { left: 34px; bottom: 30px; font-size: clamp(1.8rem, 2.4vw, 2.3rem); }
  .jn-panel { padding: 20px 0; max-width: 560px; }
}
.people-tools { gap: 14px; }

/* ─── Propose a trip: date options, people picker, free/busy chips ─── */
.pp-range { display: grid; grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; padding: 14px 0; border-top: 1px solid var(--color-border-soft); }
.pp-range:first-child { border-top: 0; padding-top: 0; }
.pp-range .field { margin: 0; }
.pp-range-num { width: 30px; height: 30px; margin-bottom: 9px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; background: var(--color-sea); color: var(--color-link); }
.pp-remove { margin-bottom: 4px; }
.pp-add { margin-top: 8px; border-radius: 999px; }
@media (max-width: 520px) { .pp-range { grid-template-columns: 30px minmax(0, 1fr) auto; } .pp-range .field:nth-of-type(2) { grid-column: 2; } }
/* Dates step: Exact dates | Flexible (season or months) */
.pp-mode { margin: 2px 0 18px; }
.pp-lede { margin: 0 0 16px; }
.pp-seasons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
@media (max-width: 560px) { .pp-seasons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pp-season {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 0; border-radius: 16px; text-align: left; cursor: pointer;
  background: var(--color-surface); box-shadow: var(--shadow-xs); color: var(--color-ink); font: inherit;
  transition: box-shadow .2s var(--ease), background-color .2s var(--ease), transform .2s var(--ease-spring);
}
.pp-season:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.pp-season svg { flex: none; color: var(--color-accent); }
.pp-season > span { display: grid; line-height: 1.25; }
.pp-season[aria-pressed="true"] { background: var(--color-selected); box-shadow: 0 0 0 2px var(--color-primary); }
.pp-season:focus-visible { outline: none; box-shadow: var(--focus); }
.chip-sub { margin-left: 0.45em; font-weight: 400; opacity: 0.72; }
.pp-window:empty { display: none; }
.pp-window { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--color-sea); color: var(--color-ink); }
.pp-window svg { flex: none; margin-top: 2px; color: var(--color-link); }
.pp-people { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; gap: 8px; }
.pp-person { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; cursor: pointer; background: var(--color-surface); box-shadow: var(--shadow-xs); transition: box-shadow .2s var(--ease), background-color .2s var(--ease); }
.pp-person:hover { box-shadow: var(--shadow-sm); }
.pp-person input { position: absolute; opacity: 0; pointer-events: none; }
.pp-tick { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1.5px var(--color-border-strong); display: grid; place-items: center; font-size: 0.75rem; font-weight: 800; }
.pp-person:has(input:checked) { background: var(--color-selected); box-shadow: 0 0 0 2px var(--color-primary); }
.pp-person:has(input:checked) .pp-tick { background: var(--color-primary); color: var(--color-on-primary); box-shadow: none; }
.pp-person:has(input:checked) .pp-tick::after { content: '✓'; }
.pp-person:has(input:focus-visible) { box-shadow: var(--focus); }
.pp-chip { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; border-radius: 999px; background: var(--color-surface); box-shadow: var(--shadow-xs); }
.pp-chip .fr-avatar { width: 32px; height: 32px; font-size: 0.75rem; }
.pp-chip .btn { margin-left: auto; }
.pp-sample { margin: 14px 0 10px; }
.pp-privacy { margin: 14px 0 0; }

.sig-list { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; gap: 6px; }
.sig { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.sig .fr-avatar { width: 30px; height: 30px; font-size: 0.7rem; }
.sig-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-ink); font-weight: 500; }
.sig-chip { flex: none; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: var(--color-surface-2); color: var(--color-muted); }
.sig-free .sig-chip { background: var(--color-primary); color: var(--color-on-primary); }
.sig-pto .sig-chip { background: var(--color-off); color: var(--color-off-deep); }
.sig-unlikely .sig-chip { background: var(--color-surface); color: var(--color-body); box-shadow: inset 0 0 0 1.5px var(--color-border-strong); }
.sig-none .sig-chip { background: transparent; box-shadow: inset 0 0 0 1.5px var(--color-border); font-weight: 600; }
.trips-ctas { gap: 10px; }

/* ─── Trips list: photo cards grouped by Coming up / In the works / Past ─── */
.tl-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 28px; margin-bottom: 26px; }
.tl-head h1 { font-size: clamp(2.3rem, 4.8vw, 3.4rem); line-height: 1.02; margin-bottom: 0.25em; }
.tl-head p { margin: 0; max-width: 40em; }
.tl-head .trips-ctas .btn { border-radius: 999px; }
.tl-group + .tl-group { margin-top: 30px; }
.tl-group-title { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; }
.tl-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.tl-card {
  display: flex; flex-direction: column; height: 100%; padding: 10px; border-radius: 22px; text-decoration: none; color: inherit;
  background: var(--color-surface); box-shadow: var(--shadow-sm); transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.tl-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.tl-card.is-invite { box-shadow: 0 0 0 2px var(--color-primary), var(--shadow-sm); }
.tl-photo { position: relative; display: block; height: 160px; border-radius: 15px; overflow: hidden; background: var(--color-sea); }
.tl-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.tl-card:hover .tl-photo img { transform: scale(1.04); }
.tl-kind, .tl-when {
  position: absolute; top: 12px; padding: 0.35em 0.85em; border-radius: 999px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--color-glass-strong); color: var(--color-ink); backdrop-filter: blur(8px); box-shadow: var(--shadow-xs);
}
.tl-kind { left: 12px; }
.tl-when { right: 12px; background: var(--color-navy); color: var(--color-on-navy); text-transform: none; letter-spacing: 0; font-weight: 700; }
.tl-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 14px 8px 4px; }
.tl-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tl-name { font-size: 1.45rem; line-height: 1.12; font-weight: 400; }
.tl-top .badge { flex: none; margin-top: 4px; }
.tl-dates { color: var(--color-body); font-size: 0.93rem; }
.tl-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; }
.tl-empty { display: grid; gap: 28px; align-items: center; padding: clamp(24px, 4vw, 44px); }
.tl-empty-title { font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.8rem, 3.4vw, 2.4rem); margin: 0 0 8px; }
.tl-empty-polaroid { width: 200px; margin: 0 auto; transform: rotate(-4deg); }
.tl-empty-note { margin: 18px 0 0; font-size: 1.4rem; transform: rotate(-3deg); transform-origin: left; color: var(--color-body); }
@media (min-width: 760px) { .tl-empty { grid-template-columns: 220px minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .tl-card, .tl-photo img { transition: none; } }

/* ─── Profile ─── */
.pf-head { display: flex; align-items: center; gap: clamp(16px, 3vw, 28px); margin-bottom: 24px; }
.pf-head h1 { font-size: clamp(2.2rem, 4.6vw, 3.2rem); line-height: 1.04; margin: 0 0 4px; }
.pf-sub { margin: 0; }
.pf-avatar {
  flex: none; width: clamp(72px, 9vw, 96px); height: clamp(72px, 9vw, 96px); border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-serif); font-size: clamp(1.8rem, 3.4vw, 2.4rem); background: var(--color-navy); color: var(--color-on-navy);
  box-shadow: 0 0 0 5px var(--color-surface), var(--shadow);
}
/* Profile photo: replaces initials anywhere an avatar is shown */
.has-photo { overflow: hidden; background: var(--color-surface-2); }
.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-photo { position: relative; flex: none; }
.pf-photo.is-busy .pf-avatar { opacity: 0.55; transition: opacity .2s var(--ease); }
.pf-photo-cam {
  position: absolute; right: -2px; bottom: -2px; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--color-surface); color: var(--color-ink); box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease-spring), box-shadow .2s var(--ease);
}
.pf-photo-cam:hover { transform: scale(1.06); box-shadow: var(--shadow-lg); }
.pf-photo-cam:focus-visible { outline: none; box-shadow: var(--focus); }
.pf-photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; }
.pf .demo-notice { margin: 0 0 18px; }
.pf .card { margin: 0; }
.pf-grid { display: grid; gap: 18px; align-items: start; }
@media (min-width: 900px) { .pf-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 24px; } }
.pf-main, .pf-side { display: grid; gap: 18px; }
.pf .card > .h3, .pf .card .row-between .h3 { margin: 0 0 14px; }
.pf .card .row-between { margin-bottom: 8px; }
.pf .card .row-between .h3 { margin: 0; }
.pf-details .input-at .input { padding-left: 34px; }
.pf-airport { max-width: 140px; text-transform: uppercase; letter-spacing: 0.08em; }
.pf-save { border-radius: 999px; min-width: 160px; }
.pf-cal p { margin: 0 0 4px; }
.pf-privacy .fr-see { margin-bottom: 16px; }
.pf-toggle { margin: 0; padding-top: 14px; border-top: 1px solid var(--color-border); }
.pf-data .row { margin-top: 10px; }

/* ─── Who has to come (trip forms + People tab), auto-updated dates ─── */
.crew-choice .crew-tiles { margin: 6px 0 12px; }
.crew-min { margin-bottom: 4px; }
.crew-min label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.crew-edit { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--color-border-soft); display: grid; gap: 4px; justify-items: start; }
.crew-edit .crew-choice { width: 100%; }
.crew-note { margin: 14px 0 0; }
.trip-badges { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.opt-goal { margin: 8px 0 0; color: var(--color-muted); font-weight: 600; }
.opt-goal.is-met { color: var(--color-off-deep); }
.dates-changed .notice-icon { font-size: 1rem; }

/* ─── Badges (Profile) and friends' shared badges ─── */
.pf-badges .h3 { margin-bottom: 6px; }
.bdg-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 6px; }
.bdg-count { font-size: 0.92rem; color: var(--color-body); white-space: nowrap; }
.bdg-meter, .bdg-progress { position: relative; flex: 1; height: 6px; border-radius: 99px; background: var(--color-sea); overflow: hidden; }
.bdg-meter i, .bdg-progress i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--color-primary); }
.bdg-progress { flex: none; width: 100%; height: 5px; margin-top: 6px; }
.bdg-group { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-muted); margin: 18px 0 10px; }
.bdg-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.bdg { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 14px; border-radius: var(--radius); background: var(--color-surface); box-shadow: var(--shadow-xs); }
.bdg-sticker {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 8px; border-radius: 50%;
  background: var(--color-surface); color: var(--color-accent); /* coral line icon on white: 3:1+ (palette test) */
  box-shadow: 0 0 0 4px var(--color-sea), var(--shadow-sm); transform: rotate(var(--tilt, 0deg));
  transition: transform 0.3s var(--ease-spring);
}
.bdg.is-earned:hover .bdg-sticker { transform: rotate(0deg) scale(1.06); }
.bdg-name { font-weight: 700; color: var(--color-ink); }
.bdg-how { line-height: 1.35; }
.bdg-date { color: var(--color-off-deep); font-weight: 600; margin-top: 4px; }
.bdg-share { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; cursor: pointer; }
.bdg.is-locked { background: var(--color-canvas); box-shadow: none; }
.bdg.is-locked .bdg-sticker { background: var(--color-surface); color: var(--color-muted); box-shadow: 0 0 0 1.5px var(--color-border) inset; transform: none; opacity: 0.8; }
.bdg.is-locked .bdg-name { color: var(--color-body); }
.bdg-note { margin: 16px 0 0; }
.fr-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.fr-badge { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--color-surface); color: var(--color-accent); box-shadow: 0 0 0 2px var(--color-sea); }
@media (prefers-reduced-motion: reduce) { .bdg-sticker { transition: none; } }

/* ─── Accounts: sign in, create account, reset (views/auth.js) ─── */
.auth-card { padding: clamp(22px, 4vw, 34px); }
.auth-card .h2 { margin: 2px 0 10px; }
.auth-card form { margin-top: 14px; }
.auth-forgot { margin: -6px 0 12px; text-align: right; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--color-muted); font-size: 0.85rem; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--color-border-soft); }
.auth-switch { margin: 16px 0 0; text-align: center; }
.auth-legal { margin: 18px 0 0; }
.auth-captcha:empty { display: none; }
.auth-captcha { margin: 0 0 12px; }
.auth-sent-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; background: var(--color-sea); color: var(--color-link); margin-bottom: 12px; }
.auth-card [data-resend] { margin-top: 6px; }

/* Password field: show/hide button inside the input, live rule checklist under it (app/password.js) */
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 68px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; padding: 6px 10px; border-radius: 8px; font: inherit; font-size: 0.82rem; font-weight: 700; color: var(--color-link); cursor: pointer; }
.pw-toggle:hover { background: var(--color-hover); }
.pw-toggle:focus-visible { outline: none; box-shadow: var(--focus); }
.pw-rules { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px 16px; font-size: 0.84rem; color: var(--color-muted); }
@media (min-width: 480px) { .pw-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pw-rules li { display: flex; align-items: center; gap: 8px; }
.pw-rules li::before { content: ''; width: 14px; height: 14px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--color-border-strong); }
.pw-rules li.is-ok { color: var(--color-off-deep); }
.pw-rules li.is-ok::before { content: '✓'; box-shadow: none; background: var(--color-off-deep); color: var(--color-on-ink); font-size: 0.6rem; font-weight: 800; display: grid; place-items: center; }
.pw-rules li.is-bad { color: var(--color-error); }
.pw-rules li.is-bad::before { box-shadow: inset 0 0 0 1.5px var(--color-error); }

/* Profile: password card */
.pf-password p { margin: 0 0 12px; }
.pf-pw-more > summary { list-style: none; display: inline-flex; width: auto; }
.pf-pw-more > summary::-webkit-details-marker { display: none; }
.pf-pw-more[open] > summary { display: none; }
.pf-pw-more form { margin-top: 4px; }
/* Our own Show/Hide button replaces the browser's password reveal (Edge) */
.pw-wrap input::-ms-reveal, .pw-wrap input::-ms-clear { display: none; }
.pf-notyou { margin: 14px 0 0; text-align: center; }
/* Signed-out banner right after sign-up: "confirm your email" + resend (views/auth.js guestNoticeHtml) */
.guest-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 6px; }
.guest-actions .auth-captcha { margin: 0; }
