:root {
  --night: #172651;
  --night-deep: #0d1736;
  --ink: #1f2949;
  --muted: #66708b;
  --paper: #f7f6f0;
  --surface: #fffdf8;
  --surface-blue: #edf5fa;
  --line: #dcdedc;
  --gold: #f2bd55;
  --gold-deep: #a66a16;
  --coral: #d76852;
  --teal: #247c85;
  --plum: #68518f;
  --green: #4e7655;
  --danger: #aa3d3d;
  --profile: var(--gold);
  --profile-deep: var(--gold-deep);
  --shadow: 0 16px 44px rgb(15 27 63 / 13%);
  --soft-shadow: 0 7px 20px rgb(15 27 63 / 10%);
  --radius: 24px;
  --font-display: ui-rounded, "Avenir Next Rounded", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

body[data-tone="coral"] { --profile: #ef8a70; --profile-deep: #a83f38; }
body[data-tone="teal"] { --profile: #53a9ad; --profile-deep: #176773; }
body[data-tone="plum"] { --profile: #9a80c2; --profile-deep: #583d7e; }

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; color-scheme: light; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, summary, label[for], select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid #3c8fa6;
  outline-offset: 3px;
  border-radius: 8px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 12px;
  top: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  color: white;
  background: var(--night);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; }
h1 { letter-spacing: -.035em; }
h2 { letter-spacing: -.02em; }

.section-label, .eyebrow {
  margin-bottom: 7px;
  color: var(--profile-deep);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.auth-view { min-height: 100svh; background: var(--surface); }
.auth-hero {
  position: relative;
  min-height: 47svh;
  overflow: hidden;
  color: white;
  background:
    linear-gradient(180deg, rgb(8 15 39 / 15%) 0%, rgb(8 15 39 / 76%) 100%),
    linear-gradient(90deg, rgb(9 19 50 / 70%), transparent 80%),
    url("assets/florida-magic-hero.webp") center 45% / cover no-repeat,
    var(--night);
}
.auth-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 42px;
  background: var(--surface);
  clip-path: polygon(0 78%, 6% 64%, 14% 74%, 21% 55%, 32% 73%, 41% 52%, 50% 72%, 59% 55%, 69% 76%, 78% 60%, 88% 73%, 100% 55%, 100% 100%, 0 100%);
}
.auth-brand { position: relative; z-index: 2; padding: max(24px, env(safe-area-inset-top)) 22px 55px; max-width: 620px; }
.unofficial-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: clamp(24px, 7vh, 56px);
  padding: 7px 11px;
  border: 1px solid rgb(255 255 255 / 36%);
  border-radius: 999px;
  color: #fff8d8;
  background: rgb(7 15 41 / 48%);
  backdrop-filter: blur(8px);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.auth-brand .eyebrow { color: #ffd67d; }
.auth-brand h1 { margin-bottom: 12px; font-size: clamp(2.7rem, 13vw, 5.6rem); text-shadow: 0 5px 22px rgb(3 8 27 / 42%); }
.auth-brand h1 em { color: #ffe39b; font-style: normal; }
.auth-lede { max-width: 490px; margin-bottom: 22px; color: #f6f6fb; font-size: 1rem; }
.flight-ribbon { display: flex; align-items: center; gap: 10px; max-width: 440px; font-size: .73rem; }
.flight-ribbon span:not(.flight-line) { display: flex; flex-direction: column; }
.flight-ribbon b { color: #ffe39b; font-size: .9rem; }
.flight-line { display: flex; flex: 1; align-items: center; gap: 5px; color: #ffe39b; }
.flight-line::before, .flight-line::after { content: ""; flex: 1; height: 1px; background: rgb(255 227 155 / 50%); }

.auth-sky { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.auth-sky i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #ffe7a6; box-shadow: 0 0 12px 4px rgb(255 220 125 / 60%); animation: twinkle 3.5s ease-in-out infinite; }
.auth-sky i:nth-child(1) { left: 12%; top: 15%; }
.auth-sky i:nth-child(2) { left: 42%; top: 8%; animation-delay: .7s; }
.auth-sky i:nth-child(3) { left: 78%; top: 20%; animation-delay: 1.4s; }
.auth-sky i:nth-child(4) { left: 67%; top: 43%; animation-delay: 2.1s; }
.auth-sky i:nth-child(5) { left: 91%; top: 9%; animation-delay: 2.8s; }

.login-sheet { position: relative; z-index: 3; padding: 15px 20px max(32px, env(safe-area-inset-bottom)); background: var(--surface); }
.login-sheet h2 { margin-bottom: 8px; font-size: clamp(1.65rem, 7vw, 2.35rem); }
.support-copy { margin-bottom: 22px; color: var(--muted); }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.profile-card {
  position: relative;
  min-height: 120px;
  padding: 17px 14px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--card-colour) 36%, #d9d9dc);
  border-radius: 20px;
  text-align: left;
  background: color-mix(in srgb, var(--card-colour) 10%, white);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.profile-card::after { content: "✦"; position: absolute; right: 12px; top: 6px; color: color-mix(in srgb, var(--card-colour) 55%, transparent); font-size: 1.8rem; transform: rotate(13deg); }
.profile-card:hover { transform: translateY(-2px); box-shadow: var(--soft-shadow); border-color: var(--card-colour); }
.profile-card .profile-avatar { margin-bottom: 10px; }
.profile-card b { display: block; font-family: var(--font-display); font-size: 1rem; }
.profile-card small { color: var(--muted); }
.profile-avatar, .large-avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 2px solid rgb(255 255 255 / 76%);
  border-radius: 50% 50% 45% 55%;
  color: white;
  background: var(--profile);
  box-shadow: 0 4px 10px rgb(20 28 52 / 17%);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 900;
}
.profile-card[data-role="parent"] { --card-colour: #d69932; }
.profile-card[data-role="child"] { --card-colour: #6d5a9b; }
.profile-card[data-role="parent"] .profile-avatar { background: #d69932; }
.profile-card[data-role="child"] .profile-avatar { background: #6d5a9b; }
.private-note { display: flex; gap: 11px; margin: 20px 0 0; padding: 13px; border-radius: 16px; color: var(--muted); background: #f2f1ed; font-size: .78rem; }
.private-note > span:first-child { color: var(--teal); font-size: 1.35rem; }
.private-note b { display: block; color: var(--ink); }

.login-form { max-width: 480px; margin: 0 auto; }
.text-button { min-height: 44px; padding: 8px 0; border: 0; color: var(--profile-deep); background: transparent; font-weight: 800; cursor: pointer; }
.back-button { margin: -6px 0 10px; }
.selected-profile { display: flex; align-items: center; gap: 13px; margin-bottom: 23px; padding: 13px; border: 1px solid var(--line); border-radius: 18px; background: #faf9f5; }
.selected-profile b { display: block; font-family: var(--font-display); font-size: 1.1rem; }
.selected-profile span:last-child span { color: var(--muted); font-size: .8rem; }

.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field > span:first-child { color: #3c4561; font-size: .78rem; font-weight: 800; }
input, textarea, select {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid #c9ccd3;
  border-radius: 13px;
  color: var(--ink);
  background: white;
}
textarea { min-height: 92px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--profile-deep); box-shadow: 0 0 0 3px color-mix(in srgb, var(--profile) 22%, transparent); outline: 0; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 66px; }
.reveal-button { position: absolute; right: 4px; top: 4px; min-width: 52px; min-height: 40px; border: 0; color: var(--profile-deep); background: transparent; font-size: .75rem; font-weight: 900; cursor: pointer; }

.primary-button, .secondary-button, .signout-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  padding: 11px 17px;
  border: 0;
  border-radius: 15px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease;
}
.primary-button { color: #15203d; background: linear-gradient(135deg, #ffd778, var(--gold)); box-shadow: 0 7px 16px rgb(171 112 26 / 22%); }
.primary-button.compact { width: auto; min-width: 135px; }
.secondary-button { color: white; background: var(--night); }
.primary-button:hover, .secondary-button:hover { filter: brightness(1.035); transform: translateY(-1px); }
.primary-button:disabled, .secondary-button:disabled { opacity: .6; cursor: wait; transform: none; }
.form-error, .config-warning { margin: 0 0 13px; padding: 10px 12px; border-radius: 12px; color: #7f2929; background: #fce5e1; font-size: .78rem; }
.config-warning { color: #73510f; background: #fff1c8; }

.app-shell { min-height: 100svh; padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
.app-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: max(9px, env(safe-area-inset-top)) 16px 8px;
  color: white;
  background: linear-gradient(105deg, var(--night-deep), var(--night));
  box-shadow: 0 3px 15px rgb(10 21 53 / 20%);
}
.mini-brand { margin-bottom: 2px; color: #fff3cb; font-family: var(--font-display); font-size: .82rem; font-weight: 900; }
.app-date { margin: 0; color: #c8cee0; font-size: .67rem; }
.profile-chip { display: flex; align-items: center; gap: 7px; min-height: 46px; padding: 4px 9px 4px 5px; border: 1px solid rgb(255 255 255 / 22%); border-radius: 999px; color: white; background: rgb(255 255 255 / 9%); cursor: pointer; }
.profile-chip .profile-avatar { width: 34px; height: 34px; font-size: .8rem; }
.profile-chip > span:last-child { max-width: 82px; overflow: hidden; font-size: .74rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }

.app-main { width: 100%; max-width: 1080px; min-height: calc(100svh - 146px); margin: 0 auto; }
.tab-panel { padding: 18px 14px 30px; }
.home-panel { padding-top: 0; }

.bottom-nav {
  position: fixed;
  z-index: 80;
  inset: auto 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: calc(68px + env(safe-area-inset-bottom));
  padding: 5px max(8px, env(safe-area-inset-left)) env(safe-area-inset-bottom) max(8px, env(safe-area-inset-right));
  border-top: 1px solid rgb(29 43 77 / 14%);
  background: rgb(255 253 248 / 96%);
  box-shadow: 0 -7px 22px rgb(15 28 59 / 9%);
  backdrop-filter: blur(13px);
}
.nav-button { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; min-height: 56px; border: 0; border-radius: 16px; color: #777f91; background: transparent; cursor: pointer; }
.nav-button > span { font-size: 1.28rem; line-height: 1; }
.nav-button b { font-size: .66rem; }
.nav-button.active { color: var(--profile-deep); background: color-mix(in srgb, var(--profile) 13%, transparent); }

.phase-hero {
  position: relative;
  min-height: 270px;
  margin: 0 -14px 18px;
  padding: 26px 20px 24px;
  overflow: hidden;
  color: white;
  background:
    linear-gradient(90deg, rgb(11 20 50 / 88%), rgb(11 20 50 / 30%)),
    url("assets/florida-magic-hero.webp") 62% center / cover no-repeat,
    var(--night);
}
.phase-hero::after { content: ""; position: absolute; inset: auto -5% -36px; height: 58px; border-radius: 50% 50% 0 0; background: var(--paper); }
.phase-hero > * { position: relative; z-index: 1; }
.phase-hero .section-label { color: #ffd878; }
.phase-hero h1 { max-width: 420px; margin-bottom: 7px; font-size: clamp(2rem, 10vw, 4rem); }
.phase-hero p:not(.section-label) { max-width: 420px; color: #e8eaf2; }
.countdown-badge { display: inline-flex; align-items: baseline; gap: 7px; margin-top: 8px; padding: 9px 13px; border: 1px solid rgb(255 255 255 / 24%); border-radius: 999px; background: rgb(10 19 48 / 50%); }
.countdown-badge b { color: #ffdc84; font-family: var(--font-display); font-size: 1.45rem; }
.countdown-badge span { font-size: .74rem; font-weight: 800; }

.today-grid { display: grid; gap: 13px; margin-bottom: 20px; }
.now-card, .day-glance {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}
.now-card { padding: 19px; }
.now-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--profile); }
.now-card .date-overline { margin-bottom: 7px; color: var(--profile-deep); font-size: .7rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.now-card h2 { margin-bottom: 7px; font-size: 1.45rem; }
.now-card > p:last-of-type { margin-bottom: 12px; color: var(--muted); font-size: .88rem; }
.now-card.tomorrow::before { background: var(--teal); }
.glance-times { display: grid; gap: 7px; margin: 14px 0 0; }
.glance-times div { display: grid; grid-template-columns: 74px 1fr; gap: 9px; padding-top: 8px; border-top: 1px solid #eeeae2; font-size: .78rem; }
.glance-times b { color: var(--muted); font-size: .67rem; letter-spacing: .09em; text-transform: uppercase; }
.card-action { display: inline-flex; align-items: center; min-height: 44px; margin-top: 13px; padding: 8px 13px; border: 0; border-radius: 13px; color: white; background: var(--night); font-size: .78rem; font-weight: 900; cursor: pointer; }

.challenge-spotlight {
  margin: 18px 0 22px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--profile) 35%, var(--line));
  border-radius: var(--radius);
  background: linear-gradient(145deg, color-mix(in srgb, var(--profile) 12%, white), white);
  box-shadow: var(--soft-shadow);
}
.challenge-spotlight .challenge-person { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.challenge-spotlight h2 { margin-bottom: 5px; font-size: 1.35rem; }
.challenge-spotlight p { margin-bottom: 13px; }
.task-complete-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 8px 15px; border: 1px solid var(--profile-deep); border-radius: 14px; color: var(--profile-deep); background: white; font-size: .8rem; font-weight: 900; cursor: pointer; }
.task-complete-button[aria-pressed="true"] { color: white; background: var(--profile-deep); }

.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 24px 2px 13px; }
.section-heading h2 { margin-bottom: 0; }
.compact-heading { align-items: center; }
.privacy-pill, .status-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 9px; border-radius: 999px; color: #295c45; background: #e2f0e7; font-size: .64rem; font-weight: 900; text-transform: uppercase; }

.journal-section { margin-top: 22px; }
.journal-composer { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--soft-shadow); }
.journal-actions { display: flex; justify-content: space-between; align-items: center; gap: 9px; }
.photo-button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 48px; padding: 9px 12px; border: 1px dashed #9a9fac; border-radius: 14px; color: var(--ink); background: #f7f6f2; font-size: .76rem; font-weight: 900; cursor: pointer; }
.photo-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-note { margin: 10px 1px 0; color: var(--muted); font-size: .67rem; }
.photo-preview { display: grid; grid-template-columns: 58px minmax(0, 1fr) 44px; align-items: center; gap: 10px; margin-bottom: 14px; padding: 8px; border-radius: 15px; background: #f0f2f4; }
.photo-preview img { width: 58px; height: 58px; border-radius: 10px; object-fit: cover; }
.photo-preview b, .photo-preview span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-preview b { font-size: .74rem; }
.photo-preview span { color: var(--muted); font-size: .68rem; }
.icon-button { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; color: var(--muted); background: transparent; font-size: 1.45rem; cursor: pointer; }
.memory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 13px; }
.memory-card { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 5px 13px rgb(18 30 65 / 7%); }
.memory-card img { width: 100%; aspect-ratio: 1 / .82; object-fit: cover; background: #e7e9eb; }
.memory-card-content { padding: 11px; }
.memory-card p { margin-bottom: 7px; font-size: .75rem; overflow-wrap: anywhere; }
.memory-card footer { display: flex; justify-content: space-between; align-items: center; gap: 5px; color: var(--muted); font-size: .62rem; }
.memory-owner { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; }
.delete-memory { min-width: 44px; min-height: 44px; margin: -10px -10px -10px 0; border: 0; color: var(--danger); background: transparent; cursor: pointer; }
.empty-state { grid-column: 1 / -1; padding: 22px; border: 1px dashed #b7bbc3; border-radius: 17px; color: var(--muted); text-align: center; font-size: .8rem; }

.page-intro { margin: -18px -14px 16px; padding: 30px 20px 25px; }
.page-intro h1 { margin-bottom: 7px; font-size: clamp(2rem, 10vw, 3.6rem); }
.page-intro p:last-child { max-width: 520px; margin-bottom: 0; }
.illustrated-intro { min-height: 230px; color: white; }
.illustrated-intro .section-label { color: #ffdc89; }
.illustrated-intro p:last-child { color: #e7e9ef; }
.plan-intro { background: linear-gradient(90deg, rgb(13 24 57 / 93%), rgb(13 24 57 / 35%)), url("assets/storybook-parks.webp") 35% center / cover no-repeat, var(--night); }
.explore-intro { background: linear-gradient(90deg, rgb(16 29 57 / 92%), rgb(16 29 57 / 28%)), url("assets/storybook-old-florida.webp") center / cover no-repeat, var(--night); }
.more-intro { padding-bottom: 5px; }

.calendar-legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 2px 13px; color: var(--muted); font-size: .67rem; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-dot.park { background: var(--plum); }.legend-dot.slow { background: var(--gold); }.legend-dot.local { background: var(--coral); }.legend-dot.travel { background: var(--teal); }
.date-strip { display: flex; gap: 8px; margin: 0 -14px 15px; padding: 0 14px 5px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.date-strip::-webkit-scrollbar { display: none; }
.date-button { flex: 0 0 58px; min-height: 66px; padding: 7px 4px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: var(--surface); scroll-snap-align: center; cursor: pointer; }
.date-button span, .date-button b { display: block; }
.date-button span { color: var(--muted); font-size: .58rem; font-weight: 800; text-transform: uppercase; }
.date-button b { font-family: var(--font-display); font-size: 1.2rem; }
.date-button i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--kind-colour, var(--plum)); }
.date-button.active { border-color: var(--profile-deep); color: white; background: var(--profile-deep); box-shadow: 0 6px 14px color-mix(in srgb, var(--profile) 30%, transparent); }
.date-button.active span { color: rgb(255 255 255 / 76%); }
.date-button.today { box-shadow: inset 0 0 0 2px var(--gold); }

.plan-list { display: grid; gap: 12px; }
.plan-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 6px 17px rgb(17 29 62 / 7%); }
.plan-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--kind-colour); }
.plan-card-button { display: grid; grid-template-columns: 49px minmax(0, 1fr) 24px; align-items: center; gap: 10px; width: 100%; min-height: 100px; padding: 13px 13px 13px 16px; border: 0; text-align: left; background: transparent; cursor: pointer; }
.plan-date { display: grid; place-items: center; min-height: 59px; border-radius: 14px; color: var(--kind-deep); background: color-mix(in srgb, var(--kind-colour) 14%, white); }
.plan-date span, .plan-date b { display: block; }
.plan-date span { font-size: .57rem; font-weight: 900; text-transform: uppercase; }
.plan-date b { font-family: var(--font-display); font-size: 1.4rem; line-height: 1; }
.plan-card h2 { margin-bottom: 3px; font-size: 1.05rem; }
.plan-card .destination { margin: 0 0 7px; color: var(--muted); font-size: .73rem; }
.plan-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.mini-pill { display: inline-flex; align-items: center; min-height: 23px; padding: 3px 7px; border-radius: 999px; color: #4b5265; background: #eff0ef; font-size: .59rem; font-weight: 800; }
.mini-pill.crowd-1, .mini-pill.crowd-2 { color: #316547; background: #e2efe6; }
.mini-pill.crowd-4, .mini-pill.crowd-5 { color: #884235; background: #f5e1da; }
.card-chevron { color: var(--muted); font-size: 1.2rem; }
.kind-park { --kind-colour: #715798; --kind-deep: #4d3673; }.kind-slow { --kind-colour: #d59d3f; --kind-deep: #8d5b13; }.kind-local, .kind-town { --kind-colour: #d56a52; --kind-deep: #91402f; }.kind-nature { --kind-colour: #587e5b; --kind-deep: #35583b; }.kind-special { --kind-colour: #aa4f7b; --kind-deep: #753052; }.kind-travel { --kind-colour: #2a7e8f; --kind-deep: #15576b; }

.explore-filter { display: flex; gap: 7px; margin: 0 -14px 16px; padding: 0 14px 4px; overflow-x: auto; scrollbar-width: none; }
.filter-chip { flex: 0 0 auto; min-height: 44px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--surface); font-size: .74rem; font-weight: 900; cursor: pointer; }
.filter-chip.active { border-color: var(--night); color: white; background: var(--night); }
.explore-grid { display: grid; gap: 14px; }
.explore-card { position: relative; min-height: 280px; overflow: hidden; border-radius: 23px; color: white; background: var(--night); box-shadow: var(--shadow); }
.explore-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.explore-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(9 18 44 / 5%) 24%, rgb(9 18 44 / 92%) 100%); }
.explore-card-content { position: absolute; z-index: 2; inset: auto 0 0; padding: 19px; }
.explore-card .place-type { display: inline-flex; margin-bottom: 7px; padding: 4px 8px; border-radius: 999px; color: #172651; background: #ffdc83; font-size: .61rem; font-weight: 900; text-transform: uppercase; }
.explore-card h2 { margin-bottom: 5px; font-size: 1.45rem; }
.explore-card p { margin-bottom: 10px; color: #e7eaf2; font-size: .8rem; }
.explore-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.explore-tags span { padding: 4px 7px; border: 1px solid rgb(255 255 255 / 25%); border-radius: 999px; background: rgb(11 20 48 / 50%); font-size: .58rem; font-weight: 800; }

.more-card { margin-bottom: 13px; padding: 17px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 5px 16px rgb(17 29 62 / 6%); }
.more-card h2 { margin-bottom: 5px; font-size: 1rem; }
.more-card p { margin: 0; color: var(--muted); font-size: .78rem; }
.profile-more { display: flex; align-items: center; gap: 14px; background: linear-gradient(140deg, color-mix(in srgb, var(--profile) 14%, white), white); }
.large-avatar { width: 58px; height: 58px; font-size: 1.35rem; }
.profile-more .section-label { margin-bottom: 3px; }
.detail-list { margin: 12px 0 0; }
.detail-list div { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid #ebe9e2; font-size: .75rem; }
.detail-list dt { color: var(--muted); }.detail-list dd { margin: 0; font-weight: 800; }
.setting-row { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.toggle-button { position: relative; display: flex; align-items: center; gap: 6px; min-width: 78px; min-height: 44px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; background: #eeefef; cursor: pointer; }
.toggle-button span { width: 27px; height: 27px; border-radius: 50%; background: white; box-shadow: 0 2px 6px rgb(19 29 57 / 23%); transition: transform .2s ease; }
.toggle-button b { color: var(--muted); font-size: .66rem; }
.toggle-button[aria-checked="true"] { background: var(--teal); }
.toggle-button[aria-checked="true"] span { transform: translateX(31px); }
.toggle-button[aria-checked="true"] b { position: absolute; left: 10px; color: white; }
.password-details summary { min-height: 44px; padding: 11px 0; color: var(--profile-deep); font-weight: 900; cursor: pointer; }
.change-password-form { padding-top: 8px; }
.privacy-card { display: flex; gap: 11px; background: #edf5f2; }
.privacy-icon { color: var(--teal); font-size: 1.6rem; }
.signout-button { margin-top: 19px; border: 1px solid #c55e58; color: #9c3633; background: transparent; }
.unofficial-note { margin: 19px 12px; color: var(--muted); text-align: center; font-size: .66rem; }

.password-policy { margin: -8px 2px 14px; color: var(--muted); font-size: .7rem; }
.trust-line { margin: 9px 2px 15px; color: var(--muted); font-size: .67rem; line-height: 1.45; }
.loading-card, .load-error { margin-top: 24px; padding: 42px 22px; border: 1px solid var(--line); border-radius: var(--radius); text-align: center; background: var(--surface); box-shadow: var(--soft-shadow); }
.loading-card h1, .load-error h1 { margin: 12px 0 7px; font-size: 1.55rem; }
.loading-card p, .load-error p { color: var(--muted); }
.loading-star { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; color: var(--night); background: #ffe3a2; font-size: 1.7rem; animation: twinkle 1.8s ease-in-out infinite; }
.load-error > span { color: var(--teal); font-size: 2rem; }
.load-error .secondary-button { max-width: 220px; margin: 8px auto 0; }

.forecast-pill { display: inline-flex; align-items: center; min-height: 23px; padding: 3px 7px; border: 1px dashed #9ba0aa; border-radius: 999px; color: #51596d; background: #f8f8f6; font-size: .59rem; font-weight: 900; }
.forecast-pill::before { content: "≈"; margin-right: 4px; }
.forecast-pill.crowd-1, .forecast-pill.crowd-2 { border-color: #7ea58b; color: #316547; background: #edf6ef; }
.forecast-pill.crowd-4, .forecast-pill.crowd-5 { border-color: #c89082; color: #884235; background: #fbefeb; }

.event-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.event-badge { display: inline-flex; align-items: center; gap: 5px; min-height: 31px; padding: 5px 9px; border: 1px solid #d4d6da; border-radius: 10px; color: #4b5368; background: #f5f5f3; font-size: .64rem; }
.event-badge b { font-size: .56rem; letter-spacing: .06em; text-transform: uppercase; }
.event-badge.ticket { border-style: solid; border-color: #b75d81; color: #74304f; background: #f9e8f0; }
.event-badge.included, .event-badge.confirmed { border-style: solid; border-color: #5f9675; color: #285b3e; background: #e7f2ea; }
.event-badge.local { border-color: #d78d65; color: #7e452a; background: #faece3; }
.event-badge.perk { border-color: #b49546; color: #705517; background: #fbf2d7; }
.event-badge.tbd { border-style: dashed; }
.forecast-caption { margin: -3px 0 9px; color: var(--muted); font-size: .67rem; }
.hours-grid em { display: block; margin-top: 3px; color: var(--muted); font-size: .57rem; font-style: normal; }
.family-note { margin: 0 0 18px; padding: 13px; border-left: 4px solid var(--gold); border-radius: 12px; background: #fff6dc; }
.family-note b { font-size: .7rem; text-transform: uppercase; }
.family-note p { margin: 3px 0 0; font-size: .78rem; }
.day-reason { padding-top: 11px; border-top: 1px solid #e7e5df; font-size: .76rem; }

.daily-progress { margin: 19px 0 22px; }
.progress-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.progress-person { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 11px 5px; border: 1px solid color-mix(in srgb, var(--person-colour) 30%, var(--line)); border-radius: 17px; background: color-mix(in srgb, var(--person-colour) 8%, white); text-align: center; }
.progress-person .profile-avatar { width: 37px; height: 37px; margin-bottom: 6px; background: var(--person-colour); font-size: .76rem; }
.progress-person b { display: block; width: 100%; overflow: hidden; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.progress-person > span:last-child { color: var(--muted); font-size: .6rem; font-weight: 800; }
.progress-person.claimed { border-style: dashed; }
.progress-person.stamped { box-shadow: inset 0 0 0 2px #f4c75f; }
.progress-person.stamped > span:last-child { color: #785713; }

.challenge-spotlight + .challenge-spotlight { margin-top: -10px; }
.challenge-spotlight.task-card-status-claimed { border-style: dashed; }
.challenge-spotlight.task-card-status-stamped { box-shadow: inset 0 0 0 2px #f3c75c, var(--soft-shadow); }
.task-status { display: inline-flex; margin-top: 2px; padding: 3px 7px; border-radius: 999px; color: #5f6677; background: #e9e9e8; font-size: .59rem; font-weight: 900; }
.task-status.claimed { color: #76520e; background: #fff0bd; }
.task-status.stamped { color: #2d6444; background: #dff0e5; }
.task-title { font-size: .9rem; }
.task-reward { margin-top: -4px; padding: 8px 10px; border-radius: 11px; color: #6d5014; background: #fff3cf; font-size: .73rem; }
.task-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.task-actions .task-complete-button { flex: 1 1 170px; }
.review-section { margin: 26px 0; }
.review-count { display: grid; place-items: center; min-width: 32px; height: 32px; border-radius: 50%; color: white; background: var(--plum); font-size: .78rem; font-weight: 900; }
.review-grid { display: grid; gap: 10px; }
.review-task { margin: 0; }
.empty-challenge { border-style: dashed; box-shadow: none; }
.task-evidence { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 9px; margin: 11px 0; padding: 8px; border-radius: 13px; background: rgb(255 255 255 / 70%); }
.task-evidence img { width: 62px; height: 62px; border-radius: 9px; object-fit: cover; }
.task-evidence b, .task-evidence span { display: block; font-size: .64rem; }
.task-evidence p { display: -webkit-box; margin: 2px 0; overflow: hidden; font-size: .7rem; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.task-evidence span { color: var(--muted); }
.row-actions { display: grid; gap: 4px; }
.row-reward { display: block; margin-top: 4px; color: #725616; font-size: .62rem; }
.stamp-mark { color: #c59024; font-size: 1.3rem; }

.journal-task-context { display: grid; grid-template-columns: 32px minmax(0, 1fr) 44px; align-items: center; gap: 8px; margin-bottom: 12px; padding: 9px; border: 1px solid #e1be63; border-radius: 14px; color: #654b12; background: #fff3ce; }
.journal-task-context > span:first-child { text-align: center; }
.journal-task-context b, .journal-task-context span span { display: block; }
.journal-task-context b { font-size: .67rem; text-transform: uppercase; }
.journal-task-context span span { overflow: hidden; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.memory-card.text-only { grid-column: span 2; background: linear-gradient(145deg, #fff8e7, white); }
.memory-card.text-only .memory-card-content { min-height: 125px; display: flex; flex-direction: column; justify-content: space-between; }
.memory-owner i { width: 7px; height: 7px; border-radius: 50%; }
.evidence-label { display: inline-flex; margin-bottom: 6px; padding: 3px 6px; border-radius: 999px; color: #664b11; background: #fff0bf; font-size: .54rem; font-weight: 900; text-transform: uppercase; }

.sheet-dialog { width: min(100%, 680px); max-height: min(92svh, 830px); margin: auto 0 0; padding: 0; overflow: auto; border: 0; border-radius: 24px 24px 0 0; color: var(--ink); background: var(--surface); box-shadow: 0 -15px 60px rgb(5 12 35 / 30%); }
.sheet-dialog::backdrop { background: rgb(7 15 39 / 66%); backdrop-filter: blur(3px); }
.dialog-close { position: sticky; z-index: 4; top: 9px; float: right; display: grid; place-items: center; width: 44px; height: 44px; margin: 9px 10px -53px 0; border: 0; border-radius: 50%; color: var(--ink); background: rgb(255 255 255 / 90%); box-shadow: 0 3px 9px rgb(15 24 52 / 16%); font-size: 1.45rem; cursor: pointer; }
.dialog-hero { min-height: 170px; padding: 33px 58px 22px 21px; color: white; background: linear-gradient(100deg, var(--night-deep), var(--night)); }
.dialog-hero .section-label { color: #ffda83; }
.dialog-hero h2 { margin-bottom: 6px; font-size: 1.7rem; }
.dialog-hero p { margin: 0; color: #dfe2ed; font-size: .82rem; }
.dialog-body { padding: 18px 18px max(27px, env(safe-area-inset-bottom)); }
.day-timeline { display: grid; gap: 8px; margin-bottom: 18px; }
.timeline-block { display: grid; grid-template-columns: 75px 1fr; gap: 9px; padding: 11px; border-radius: 14px; background: #f1f2f2; font-size: .78rem; }
.timeline-block b { color: var(--profile-deep); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; }
.hours-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 10px 0 18px; }
.hours-grid div { padding: 9px; border-left: 4px solid var(--park-colour); border-radius: 9px; background: #f3f3f2; }
.hours-grid b, .hours-grid span { display: block; }
.hours-grid b { font-size: .63rem; }.hours-grid span { font-size: .71rem; }
.task-list { display: grid; gap: 8px; margin: 10px 0 17px; }
.task-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 10px; border: 1px solid color-mix(in srgb, var(--task-colour) 28%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--task-colour) 8%, white); }
.task-row .profile-avatar { width: 34px; height: 34px; background: var(--task-colour); font-size: .72rem; }
.task-row b { display: block; font-size: .7rem; }.task-row p { margin: 2px 0 0; font-size: .72rem; }
.task-row.completed p { text-decoration: line-through; opacity: .68; }
.tiny-button { min-height: 44px; padding: 7px 10px; border: 0; border-radius: 12px; color: var(--profile-deep); background: white; font-size: .66rem; font-weight: 900; cursor: pointer; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dialog-actions button { flex: 1 1 140px; }
.edit-day-form { padding: 24px 19px max(27px, env(safe-area-inset-bottom)); }
.edit-day-form h2 { margin-bottom: 20px; }

.toast { position: fixed; z-index: 200; left: 50%; bottom: calc(82px + env(safe-area-inset-bottom)); width: max-content; max-width: calc(100% - 28px); padding: 11px 15px; border-radius: 14px; color: white; background: #13203f; box-shadow: var(--shadow); font-size: .76rem; font-weight: 800; opacity: 0; pointer-events: none; transform: translate(-50%, 14px); transition: opacity .18s ease, transform .18s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.spark-layer { position: fixed; z-index: 190; inset: 0; overflow: hidden; pointer-events: none; }
.spark { position: absolute; width: 8px; height: 8px; border-radius: 50% 50% 50% 0; background: var(--spark-colour); animation: spark-fly .85s ease-out forwards; }

@keyframes twinkle { 0%,100% { opacity: .3; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.3); } }
@keyframes spark-fly { to { opacity: 0; transform: translate(var(--x), var(--y)) rotate(220deg) scale(.2); } }

@media (min-width: 650px) {
  .auth-view { display: grid; grid-template-columns: minmax(0, 1.14fr) minmax(390px, .86fr); }
  .auth-hero { min-height: 100svh; }
  .auth-hero::after { display: none; }
  .auth-brand { display: flex; flex-direction: column; justify-content: center; min-height: 100%; padding: 40px clamp(34px, 6vw, 90px); }
  .unofficial-badge { align-self: flex-start; margin-bottom: 48px; }
  .login-sheet { display: flex; align-items: center; padding: 40px clamp(26px, 5vw, 68px); }
  .login-sheet > div, .login-sheet > form { width: 100%; }
  .app-header { padding-inline: max(24px, calc((100vw - 1040px) / 2)); }
  .tab-panel { padding: 28px 28px 45px; }
  .home-panel { padding-top: 0; }
  .phase-hero, .page-intro { margin-inline: -28px; padding-inline: 42px; }
  .today-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .memory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .explore-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .date-strip, .explore-filter { margin-inline: -2px; padding-inline: 2px; }
  .plan-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet-dialog { margin: auto; border-radius: 24px; }
}

@media (min-width: 1000px) {
  .app-shell { padding-bottom: 0; }
  .app-header { min-height: 78px; }
  .app-main { padding-left: 112px; }
  .bottom-nav { inset: 78px auto 0 0; display: flex; flex-direction: column; justify-content: flex-start; width: 112px; min-height: auto; padding: 22px 10px; border-top: 0; border-right: 1px solid var(--line); box-shadow: 5px 0 20px rgb(15 28 59 / 6%); }
  .nav-button { width: 100%; min-height: 70px; }
  .phase-hero { min-height: 320px; border-radius: 0 0 28px 28px; }
  .explore-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plan-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 360px) {
  .auth-brand { padding-inline: 17px; }
  .login-sheet { padding-inline: 14px; }
  .profile-grid { gap: 8px; }
  .profile-card { min-height: 112px; padding: 13px 11px; }
  .journal-actions { align-items: stretch; flex-direction: column; }
  .journal-actions > * { width: 100% !important; }
  .photo-button { justify-content: center; }
  .hours-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

@media print {
  .app-header, .bottom-nav, .journal-section, .dialog-actions, .signout-button { display: none !important; }
  .app-shell { padding: 0; }
  .app-main { max-width: none; padding: 0; }
  .tab-panel { display: block !important; padding: 0; }
  .tab-panel:not(#tab-plan) { display: none !important; }
  .page-intro { margin: 0; min-height: 0; color: var(--ink); background: none; }
  .page-intro p { color: var(--ink) !important; }
  .date-strip { display: none; }
  .plan-list { grid-template-columns: repeat(2, 1fr); }
  .plan-card { break-inside: avoid; box-shadow: none; }
}
