/* =========================================================================
   MyPixieGuide brand: marketing pages, accounts, builder, shared controls.
   Trip themes never reach these styles; the trip site re-points the shared
   control variables (--sheet-*, --btn-*, --field-*) at its own tokens.
   ========================================================================= */
:root {
  --navy: #0F2D56;
  --navy-2: #1B3F70;
  --teal: #14B8A6;
  --teal-ink: #0B7366;
  --sky: #60B5FF;
  --sky-soft: #E3F2FF;
  --coral: #FF8B7A;
  --coral-soft: #FFE7E2;
  --cream: #FFF7ED;
  --white: #FFFFFF;
  --muted: #516781;
  --border: #DDE8ED;
  --success: #167A5C;
  --error: #B42336;
  --shadow-sm: 0 2px 10px rgba(15, 45, 86, .06);
  --shadow: 0 14px 40px rgba(15, 45, 86, .10);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;

  --sheet-bg: #FFFFFF;
  --sheet-ink: var(--navy);
  --sheet-muted: var(--muted);
  --sheet-border: var(--border);
  --sheet-radius: 22px;
  --sheet-font-display: var(--font);
  --field-bg: #FFFFFF;
  --field-border: #C5D4DE;
  --btn-primary-bg: var(--coral);
  --btn-primary-ink: var(--navy);
  --btn-radius: 14px;
  --focus: #1F6FD1;
  --choice-on-bg: #E3F8F5;
  --choice-on-border: var(--teal-ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--navy);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--teal-ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--navy); color: #fff; border-radius: 10px; }
.skip:focus { top: 12px; }
#app { min-height: 100vh; }

.b-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .b-wrap { padding: 0 16px; } }

/* ---------- logo ---------- */
.b-logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; flex: none; }
.logo-mark { display: block; flex: none; }
.wordmark { font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; line-height: 1; white-space: nowrap; }
.wm-my, .wm-guide { color: var(--navy); }
.wm-pixie { background: linear-gradient(100deg, #0FA394, #2F7FE0); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- buttons ---------- */
.btn, .b-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 22px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  color: var(--navy);
  background: #fff;
  border: 2px solid transparent;
  border-radius: var(--btn-radius);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover, .b-btn:hover { transform: translateY(-1px); }
.btn:active, .b-btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary, .b-btn-cta { color: var(--btn-primary-ink); background: var(--btn-primary-bg); box-shadow: 0 6px 18px rgba(255, 139, 122, .35); }
.b-btn-cta:hover, .btn-primary:hover { box-shadow: 0 8px 24px rgba(255, 139, 122, .45); }
.btn-secondary { color: var(--navy); background: #fff; border-color: var(--navy); }
.btn-ghost { color: var(--sheet-ink); background: transparent; border-color: var(--sheet-border); }
.btn-danger { color: #fff; background: var(--error); }
.btn-danger-ghost { color: var(--error); background: transparent; border-color: currentColor; }
.btn-block { width: 100%; }
.btn-sm, .b-btn-sm { min-height: 44px; padding: 8px 16px; font-size: .92rem; }
.b-linkbtn { padding: 0; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- header ---------- */
.b-header { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.b-header-in { display: flex; align-items: center; gap: 20px; min-height: 70px; }
.b-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; font-weight: 600; font-size: .95rem; }
.b-nav a, .b-nav .b-linkbtn { color: var(--navy); text-decoration: none; }
.b-nav a:hover, .b-nav .b-linkbtn:hover { color: var(--teal-ink); }
.b-header-cta { display: flex; align-items: center; gap: 10px; }
.b-menu { display: none; width: 44px; height: 44px; padding: 10px; background: none; border: 0; border-radius: 10px; cursor: pointer; }
.b-menu span { display: block; height: 2.5px; margin: 4px 0; background: var(--navy); border-radius: 2px; }
@media (max-width: 960px) {
  .b-menu { display: block; }
  .b-nav {
    position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 16px; background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .b-nav.open { display: flex; }
  .b-nav a, .b-nav .b-linkbtn { padding: 12px 4px; border-bottom: 1px solid var(--border); text-align: left; text-decoration: none; }
  .b-header-cta { margin-left: auto; }
}
@media (max-width: 420px) { .wordmark { font-size: 1.12rem; } .b-header-cta .b-btn { padding: 8px 12px; } }

/* ---------- footer ---------- */
.b-footer { margin-top: 40px; padding: 40px 0 90px; background: #fff; border-top: 1px solid var(--border); }
.b-footer-in { display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; align-items: start; }
.b-tagline { margin: 10px 0 0; font-size: .78rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.b-tagline span { color: var(--coral); }
.b-footer-nav { display: flex; flex-wrap: wrap; gap: 10px 22px; font-weight: 600; }
.b-footer-nav a, .b-footer-nav .b-linkbtn { color: var(--navy); text-decoration: none; }
.b-disclaimer { grid-column: 1 / -1; margin: 6px 0 0; font-size: .85rem; color: var(--muted); }
@media (max-width: 700px) { .b-footer-in { grid-template-columns: 1fr; } }

/* ---------- type ---------- */
.b-eyebrow { margin: 0 0 12px; font-size: .8rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--teal-ink); }
.b-h1 { margin: 0; font-size: clamp(2.5rem, 5vw, 4.3rem); font-weight: 800; line-height: 1.06; letter-spacing: -.03em; text-wrap: balance; }
.b-h1 .hl { position: relative; color: var(--teal-ink); white-space: nowrap; }
.b-h1 .hl::after { content: ""; position: absolute; left: 2%; right: 2%; bottom: -.06em; height: .14em; border-radius: 99px; background: var(--coral); opacity: .9; }
.b-h2 { margin: 0 0 12px; font-size: clamp(1.9rem, 3vw, 2.8rem); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; }
.b-lead { margin: 0; font-size: 1.15rem; color: var(--muted); max-width: 40em; }
.b-section { padding: 88px 0; }
.b-section-head { max-width: 760px; margin: 0 auto 44px; text-align: center; }
.b-section-head .b-lead { margin: 0 auto; }
.b-alt { background: #fff; }
@media (max-width: 600px) { .b-section { padding: 60px 0; } }

/* ---------- home: hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 80px;
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(96, 181, 255, .28), transparent 60%),
    radial-gradient(700px 420px at 0% 100%, rgba(20, 184, 166, .16), transparent 60%),
    var(--cream);
}
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
.hero-copy .b-lead { margin-top: 20px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note { margin: 12px 0 0; font-size: .9rem; color: var(--muted); }
.key-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 30px; padding: 14px 16px; background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-sm); max-width: 520px; }
.key-form label { flex: 1 1 100%; font-weight: 700; font-size: .95rem; }
.key-input {
  flex: 1 1 180px; min-width: 0; min-height: 48px; padding: 8px 14px;
  font: 700 1.25rem/1 var(--font); letter-spacing: .18em; color: var(--navy);
  background: var(--cream); border: 2px solid var(--field-border); border-radius: 12px;
}
.key-form .form-error { flex-basis: 100%; margin: 0; }
.hero-visual { position: relative; min-height: 460px; }
.device-browser {
  position: relative; border-radius: 18px; overflow: hidden; background: #fff;
  box-shadow: 0 30px 80px rgba(15, 45, 86, .22); border: 1px solid rgba(15, 45, 86, .08);
}
.device-browser .bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: #EEF3F7; }
.device-browser .bar i { width: 10px; height: 10px; border-radius: 50%; background: #CBD6E0; }
.device-browser .bar span { flex: 1; margin-left: 10px; height: 16px; border-radius: 8px; background: #fff; }
.device-phone {
  position: absolute; right: -6px; bottom: -40px; width: 34%; min-width: 150px; padding: 8px; border-radius: 34px;
  background: #0F2D56; box-shadow: 0 30px 70px rgba(15, 45, 86, .35);
}
.device-browser .mini-frame { aspect-ratio: 16 / 10.5; }
.device-phone .mini-frame { aspect-ratio: 9 / 18; border-radius: 26px; }
.sparkle { position: absolute; pointer-events: none; color: var(--coral); font-size: 1.6rem; }
.sparkle.s1 { top: 6%; left: -4%; color: var(--teal); }
.sparkle.s2 { top: -3%; right: 30%; }
.sparkle.s3 { bottom: 4%; left: 8%; color: var(--sky); font-size: 1.1rem; }
@media (max-width: 960px) {
  .hero { padding: 40px 0 72px; }
  .hero-in { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { min-height: 0; margin-right: 10%; }
}

/* ---------- mini trip previews (real trip markup, scaled) ---------- */
.mini-frame { position: relative; overflow: hidden; background: #ddd; }
.mini-frame > .trip-shell { position: absolute; top: 0; left: 0; transform-origin: 0 0; transform: scale(var(--mini-scale, .3)); pointer-events: none; }
.mini-frame[data-w="1120"] > .trip-shell { width: 1120px; }
.mini-frame[data-w="390"] > .trip-shell { width: 390px; }

/* ---------- home: steps / features / faq ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 0; padding: 0; list-style: none; }
.step { position: relative; padding: 28px 26px; background: #fff; border-radius: 24px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.step-n { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 16px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--teal), #2F7FE0); border-radius: 14px; }
.step h3 { margin: 0 0 8px; font-size: 1.3rem; }
.step p { margin: 0; color: var(--muted); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.feature { padding: 22px; background: var(--cream); border-radius: 20px; }
.feature .fi { font-size: 1.8rem; }
.feature h3 { margin: 8px 0 6px; font-size: 1.08rem; }
.feature p { margin: 0; font-size: .95rem; color: var(--muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split ul { padding-left: 1.2em; }
.split li { margin: 8px 0; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.together-card { padding: 26px; background: #fff; border-radius: 24px; box-shadow: var(--shadow); }
.together-card .key-demo { display: flex; gap: 8px; margin: 14px 0; }
.together-card .key-demo span { flex: 1; padding: 14px 0; text-align: center; font-weight: 800; font-size: 1.4rem; background: var(--sky-soft); border-radius: 12px; }

.faq { max-width: 820px; margin: 0 auto; }
.faq details { padding: 4px 22px; margin-bottom: 12px; background: #fff; border: 1px solid var(--border); border-radius: 18px; }
.faq summary { padding: 16px 0; font-weight: 700; font-size: 1.05rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--teal-ink); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; color: var(--muted); }

.cta-band { padding: 72px 0; text-align: center; color: #fff; background: linear-gradient(120deg, #0F2D56, #12507A 55%, #0E8C80); }
.cta-band .b-h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .85); margin: 0 auto 26px; max-width: 34em; }

/* ---------- theme tiles ---------- */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 22px; }
.theme-tile { display: flex; flex-direction: column; overflow: hidden; color: var(--navy); text-decoration: none; background: #fff; border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s; }
.theme-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.theme-tile .mini-frame { aspect-ratio: 16 / 10; }
.tile-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px 16px; }
.tile-name { margin: 0; font-weight: 700; font-size: 1.05rem; }
.tile-mood { margin: 0; font-size: .88rem; color: var(--muted); }
.tile-go { flex: none; font-weight: 700; font-size: .9rem; color: var(--teal-ink); }
.tile-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; font-size: .72rem; font-weight: 700; vertical-align: middle; color: var(--navy); background: var(--coral-soft); border-radius: 99px; }
.swatches { display: flex; gap: 4px; }
.swatches i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .1); }

/* ---------- example page bar ---------- */
.ex-bar { position: sticky; top: 0; z-index: 20; color: #fff; background: var(--navy); }
.ex-bar-in { display: flex; align-items: center; gap: 14px; min-height: 64px; padding-top: 8px; padding-bottom: 8px; }
.ex-bar .wordmark .wm-my, .ex-bar .wordmark .wm-guide { color: #fff; }
.ex-label { flex: none; font-weight: 600; font-size: .9rem; opacity: .85; }
.ex-themes { display: flex; gap: 8px; flex: 1; min-width: 0; overflow-x: auto; padding: 4px 2px; scrollbar-width: thin; }
.ex-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; font: 600 .85rem var(--font); color: #fff; background: rgba(255, 255, 255, .1); border: 2px solid transparent; border-radius: 99px; cursor: pointer; }
.ex-chip[aria-pressed="true"] { color: var(--navy); background: #fff; }
.ex-chip .swatches i { width: 10px; height: 10px; }
@media (max-width: 760px) { .ex-bar-in { flex-wrap: wrap; } .ex-bar .b-logo { display: none; } .ex-label { display: none; } .ex-themes { order: 3; flex-basis: 100%; } .ex-bar .b-btn { margin-left: auto; } }

/* trip top bar (planner chrome above a live trip) */
.trip-topbar { color: #fff; background: var(--navy); }
.trip-topbar .b-wrap { display: flex; align-items: center; gap: 16px; min-height: 52px; }
.trip-topbar .wordmark { font-size: 1.05rem; }
.trip-topbar .wm-my, .trip-topbar .wm-guide { color: #fff; }
.trip-topbar .wm-pixie { background: linear-gradient(100deg, #5BE3D2, #8CC8FF); -webkit-background-clip: text; background-clip: text; }
.trip-topbar nav { display: flex; gap: 18px; margin-left: auto; font-size: .9rem; font-weight: 600; }
.trip-topbar a, .trip-topbar .b-linkbtn { color: #fff; text-decoration: none; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > span, .field > legend { font-weight: 700; font-size: .92rem; padding: 0; }
.field legend small { display: block; font-weight: 500; color: var(--sheet-muted); }
.field input:not([type=radio]):not([type=checkbox]), .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font: 500 1rem/1.4 var(--font);
  color: var(--sheet-ink);
  background: var(--field-bg);
  border: 2px solid var(--field-border);
  border-radius: 12px;
}
.trip-site .field input, .trip-site .field select, .trip-site .field textarea { font-family: inherit; }
.field textarea { resize: vertical; }
/* iPhone Safari sizes date and time boxes to their text and ignores width, so they spilled out of narrow rows. */
.field input[type=date], .field input[type=time] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; }
.field input::-webkit-date-and-time-value { min-height: 1.4em; text-align: left; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(31, 111, 209, .2); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 12px; }
.field-row.tight { grid-template-columns: repeat(auto-fit, minmax(min(100%, 110px), 1fr)); }
.form-help { margin: -6px 0 0; font-size: .88rem; color: var(--sheet-muted); }
.form-error { margin: 0; font-weight: 700; font-size: .92rem; color: var(--error); }
.form-error:empty { display: none; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.form-actions .spacer { flex: 1; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.choice, .chip-check { position: relative; display: block; cursor: pointer; }
.choice input, .chip-check input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice > span {
  display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 10px 14px; font-weight: 700;
  background: var(--field-bg); border: 2px solid var(--field-border); border-radius: 14px;
}
.choice input:checked + span, .chip-check input:checked + span { background: var(--choice-on-bg); border-color: var(--choice-on-border); box-shadow: inset 0 0 0 1px var(--choice-on-border); }
.choice input:checked + span::after, .chip-check input:checked + span::after { content: "✓"; margin-left: auto; font-weight: 900; color: var(--choice-on-border); }
.choice input:focus-visible + span, .chip-check input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
/* Park picker: the four theme parks two across, water parks and Disney Springs three across, every tile the same height. */
.park-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 1fr; }
.park-grid .choice { grid-column: span 2; }
.park-grid .pk-core { grid-column: span 3; }
.park-grid .choice > span { height: 100%; flex-direction: column; justify-content: center; gap: 2px; padding: 10px 8px; text-align: center; line-height: 1.2; }
.park-grid .choice > span > span { font-size: 1.5rem; line-height: 1.1; }
.park-grid .pk-core > span { font-size: 1.05rem; }
.park-grid .pk-core > span > span { font-size: 1.9rem; }
.park-grid .pk-more > span { font-size: .92rem; }
.park-grid .choice input:checked + span::after { position: absolute; top: 6px; right: 10px; margin: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check > span { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px; font-weight: 700; background: var(--field-bg); border: 2px solid var(--field-border); border-radius: 99px; }

/* ---------- dialogs ---------- */
dialog.sheet {
  width: 100%;
  max-width: min(620px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  color: var(--sheet-ink);
  background: transparent;
  border: 0;
  overflow: visible;
}
dialog.sheet-wide { max-width: min(920px, calc(100vw - 24px)); }
dialog.sheet::backdrop { background: rgba(8, 18, 38, .58); }
.sheet-inner { display: flex; flex-direction: column; max-height: calc(100dvh - 32px); overflow: hidden; background: var(--sheet-bg); border-radius: var(--sheet-radius); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 12px 22px; border-bottom: 1px solid var(--sheet-border); }
.sheet-title { flex: 1; margin: 0; font-family: var(--sheet-font-display); font-size: 1.3rem; line-height: 1.2; }
.sheet-x {
  flex: none; display: grid; place-items: center; width: 52px; height: 52px; font-size: 1.5rem; font-weight: 700; line-height: 1;
  color: var(--sheet-ink); background: color-mix(in srgb, currentColor 8%, transparent);
  border: 2px solid color-mix(in srgb, currentColor 35%, transparent); border-radius: 14px; cursor: pointer;
}
.sheet-x:hover { background: color-mix(in srgb, currentColor 18%, transparent); }
.sheet-body { padding: 18px 22px 24px; overflow: auto; overscroll-behavior: contain; }
.confirm-msg { margin: 0 0 18px; font-size: 1.05rem; }
@media (max-width: 600px) {
  dialog.sheet, dialog.sheet-wide { max-width: 100vw; margin: auto 0 0; }
  .sheet-inner { border-radius: 22px 22px 0 0; max-height: calc(100dvh - 24px); }
  .sheet-body { padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
}

/* ---------- auth / cards ---------- */
.auth { min-height: calc(100vh - 70px); padding: 56px 16px; display: grid; place-items: start center; background: radial-gradient(700px 400px at 80% 0%, rgba(96, 181, 255, .22), transparent 60%), var(--cream); }
.card { width: 100%; max-width: 480px; padding: 34px 30px; background: #fff; border-radius: 26px; box-shadow: var(--shadow); }
.card h1 { margin: 0 0 6px; font-size: 1.8rem; line-height: 1.15; }
.card .sub { margin: 0 0 24px; color: var(--muted); }
.card-foot { margin: 20px 0 0; text-align: center; color: var(--muted); }
@media (max-width: 480px) { .card { padding: 26px 18px; } }

/* ---------- dashboard ---------- */
.dash { padding: 44px 0 40px; }
.dash-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.dash-head h1 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.4rem); }
.dash-head p { margin: 4px 0 0; color: var(--muted); }
.trip-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.trip-card { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-sm); }
.trip-card .mini-frame { aspect-ratio: 16 / 7; }
.tc-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.tc-name { margin: 0; font-size: 1.2rem; line-height: 1.25; }
.tc-dates { margin: 0; color: var(--muted); font-weight: 600; font-size: .92rem; }
.tc-count { margin: 4px 0 0; font-weight: 700; color: var(--teal-ink); }
.tc-keys { margin: 6px 0 0; font-size: .88rem; color: var(--muted); }
.tc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.empty-state { padding: 56px 24px; text-align: center; background: #fff; border: 2px dashed var(--border); border-radius: 26px; }
.empty-state .big { font-size: 3rem; }
.empty-state h2 { margin: 8px 0; }
.empty-state p { margin: 0 auto 22px; max-width: 30em; color: var(--muted); }

/* ---------- wizard ---------- */
.wz { padding: 36px 0 60px; }
.wz-card { max-width: 760px; margin: 0 auto; padding: 32px 34px; background: #fff; border-radius: 28px; box-shadow: var(--shadow); }
.wz-steps { display: flex; gap: 6px; margin: 0 0 26px; padding: 0; list-style: none; }
.wz-steps li { flex: 1; height: 6px; border-radius: 99px; background: var(--border); }
.wz-steps li.done { background: var(--teal); }
.wz-steps li.now { background: var(--coral); }
.wz-kicker { margin: 0 0 4px; font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-ink); }
.wz-card h1 { margin: 0 0 6px; font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.15; }
.wz-card .sub { margin: 0 0 26px; color: var(--muted); }
/* The Back / Skip / Continue bar stays pinned to the bottom of the screen while the step scrolls. */
.wz-nav {
  position: sticky; bottom: 0; z-index: 10; display: flex; align-items: center; gap: 12px;
  margin: 28px -34px -32px; padding: 14px 34px calc(14px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--border); border-radius: 0 0 28px 28px; box-shadow: 0 -10px 24px rgba(15, 45, 86, .07);
}
.wz-nav .spacer { flex: 1; }
.wz-skip { font-weight: 600; color: var(--muted); }
@media (max-width: 600px) {
  .wz { padding: 16px 0 40px; }
  .wz-card { padding: 22px 16px; border-radius: 22px; }
  .wz-nav { gap: 10px; margin: 22px -16px -22px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-radius: 0 0 22px 22px; }
  .wz-nav .spacer { display: none; }
  .wz-nav .btn-primary { flex: 1 1 auto; padding-left: 14px; padding-right: 14px; }
  .wz-nav .btn-ghost { padding-left: 14px; padding-right: 14px; }
  .wz-skip { margin-left: auto; font-size: .92rem; white-space: nowrap; }
}
.row-card { position: relative; padding: 16px; margin-bottom: 12px; background: var(--cream); border-radius: 18px; }
.row-card .row-x { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; font-size: 1rem; color: var(--muted); background: none; border: 0; border-radius: 10px; cursor: pointer; }
.row-card .row-x:hover { background: rgba(0, 0, 0, .06); }
.person-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: end; padding-right: 44px; }
.emoji-btn { width: 56px; height: 56px; font-size: 1.8rem; background: #fff; border: 2px solid var(--field-border); border-radius: 16px; cursor: pointer; }
.emoji-pop { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 8px; padding: 8px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.emoji-pop button { min-height: 44px; font-size: 1.5rem; background: none; border: 0; border-radius: 10px; cursor: pointer; }
.emoji-pop button:hover { background: var(--cream); }
.person-extra { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; align-items: end; }
@media (max-width: 520px) { .person-extra { grid-template-columns: 1fr; } }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg .chip-check > span { min-height: 40px; padding: 4px 12px; font-size: .88rem; }
.add-row { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 18px; font: 700 1rem var(--font); color: var(--teal-ink); background: #fff; border: 2px dashed var(--teal); border-radius: 14px; cursor: pointer; }

/* Road trips: "Driving from" shows a short list of matching cities to tap; the hint below the times explains the estimate. */
.place-pick { position: relative; }
.place-list { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; display: grid; gap: 2px; max-height: 280px; overflow: auto;
  padding: 6px; background: #fff; border: 2px solid var(--field-border); border-radius: 14px; box-shadow: var(--shadow); }
.place-list[hidden] { display: none; }
.place-list button { min-height: 44px; padding: 8px 12px; font: 600 1rem var(--font); color: var(--navy); text-align: left; background: none; border: 0; border-radius: 10px; cursor: pointer; }
.place-list button:hover, .place-list button:focus-visible { background: var(--sky-soft); outline: none; }
.place-none { margin: 0; padding: 8px 12px; font-size: .92rem; color: var(--muted); }
.drive-hint { margin-top: -2px; }
.drive-hint:empty { display: none; }
.more-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.more-row .form-help { margin: 0; }
.confirm-type { margin: 0 0 16px; }
.link-btn { padding: 0; font: 700 .88rem var(--font); color: var(--teal-ink); text-decoration: underline; text-underline-offset: 2px; background: none; border: 0; cursor: pointer; }
.subhead { margin: 18px 0 10px; font-size: 1rem; font-weight: 800; }
.mode-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; }
@media (max-width: 640px) { .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mode-grid .choice > span { height: 100%; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 2px; min-height: 96px; padding-right: 30px; }
.mode-grid .choice input:checked + span::after { position: absolute; top: 10px; right: 12px; margin: 0; }
.mode-grid .choice > span b { font-size: 1.5rem; }
.wz-theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 14px; }
.wz-theme { position: relative; display: block; cursor: pointer; }
.wz-theme input { position: absolute; opacity: 0; inset: 0; }
.wz-theme .theme-tile { height: 100%; border-width: 3px; }
.wz-theme .theme-tile .mini-frame { aspect-ratio: 16 / 11; }
.wz-theme input:checked + .theme-tile { border-color: var(--teal-ink); box-shadow: 0 0 0 3px rgba(20, 184, 166, .3); }
.wz-theme input:checked + .theme-tile .tile-go::before { content: "✓ "; }
.wz-theme input:focus-visible + .theme-tile { outline: 3px solid var(--focus); outline-offset: 3px; }
.wz-theme .tile-meta { padding: 10px 12px 12px; }
.wz-theme .tile-name { font-size: .95rem; }

/* ---------- share sheet ---------- */
.share-grid { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; align-items: start; }
.share-qr { padding: 10px; background: #fff; border-radius: 16px; border: 1px solid var(--sheet-border); }
.share-qr svg { display: block; width: 100%; height: auto; }
.key-box { padding: 12px 16px; text-align: center; background: var(--choice-on-bg); border-radius: 14px; }
.key-box .key-l { display: block; font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.key-box .key-v { display: block; font: 800 2rem/1.2 var(--font); letter-spacing: .12em; color: var(--sheet-ink); }
.copy-row { display: flex; gap: 8px; margin-top: 12px; }
.copy-row input { flex: 1; min-width: 0; min-height: 48px; padding: 8px 12px; font: 500 .9rem var(--font); color: var(--sheet-ink); background: var(--field-bg); border: 2px solid var(--field-border); border-radius: 12px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.share-note { margin: 14px 0 0; font-size: .88rem; color: var(--sheet-muted); }
.share-sec { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--sheet-border); }
.share-sec h3 { margin: 0 0 6px; font-size: 1.05rem; }
@media (max-width: 600px) { .share-grid { grid-template-columns: 1fr; } .share-qr { width: 170px; margin: 0 auto; } }

/* settings sheet */
.set-sec + .set-sec { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--sheet-border); }
.set-sec h3 { margin: 0 0 10px; font-size: 1.05rem; }
.set-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.set-theme { display: flex; flex-direction: column; gap: 6px; min-height: 64px; padding: 10px 12px; text-align: left; font: 700 .9rem/1.2 var(--font); color: var(--sheet-ink); background: var(--field-bg); border: 2px solid var(--field-border); border-radius: 14px; cursor: pointer; }
.set-theme[aria-current="true"] { border-color: var(--choice-on-border); background: var(--choice-on-bg); }
.set-links { display: flex; flex-wrap: wrap; gap: 8px; }
.danger-zone { padding: 16px; border: 2px solid rgba(180, 35, 54, .25); border-radius: 16px; }
.danger-zone p { margin: 0 0 12px; font-size: .92rem; }

/* ---------- /app start ---------- */
.start { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(700px 400px at 50% 0%, rgba(96, 181, 255, .3), transparent 65%), var(--cream); }
.start .card { text-align: center; }
.start .logo-wrap { display: flex; justify-content: center; margin-bottom: 18px; }
.start .key-input { width: 100%; text-align: center; font-size: 1.8rem; }
.last-trip { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 14px 16px; text-align: left; color: var(--navy); text-decoration: none; background: var(--sky-soft); border-radius: 16px; }
.last-trip b { display: block; }
.last-trip span { font-size: .88rem; color: var(--muted); }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: .85rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- not found / prose ---------- */
.prose { max-width: 760px; margin: 0 auto; padding: 48px 0; }
.prose h1 { font-size: 2.2rem; line-height: 1.15; }
.prose h2 { margin-top: 32px; font-size: 1.3rem; }
.center-msg { padding: 80px 16px; text-align: center; }
.center-msg .big { font-size: 3.2rem; }
.loading { padding: 120px 16px; text-align: center; color: var(--muted); font-weight: 600; }
.loading::before { content: ""; display: block; width: 40px; height: 40px; margin: 0 auto 14px; border: 4px solid var(--border); border-top-color: var(--teal); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- toast + feedback ---------- */
#toasts { position: fixed; left: 50%; top: 16px; z-index: 200; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100% - 32px)); pointer-events: none; }
.toast { padding: 12px 18px; font: 600 .95rem var(--font); color: #fff; background: var(--navy); border-radius: 14px; box-shadow: var(--shadow); transition: opacity .4s, transform .4s; }
.toast-warn { color: #3d2500; background: #FFD98A; }
.toast.out { opacity: 0; transform: translateY(-8px); }
.fb-fab {
  position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40;
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px;
  font: 600 .88rem var(--font); color: var(--navy); background: #fff; border: 1px solid var(--border); border-radius: 99px; box-shadow: var(--shadow); cursor: pointer;
}
@media (max-width: 600px) { .fb-fab .fb-label { display: none; } .fb-fab { padding: 8px 12px; } }
body:has(.theme-bar) .fb-fab { display: none; }
/* On setup steps, sit above the pinned Back / Skip / Continue bar. */
body:has(.wz-nav) .fb-fab { bottom: calc(96px + env(safe-area-inset-bottom)); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
