:root {
  --navy: #0B1F3A;
  --navy-soft: #243752;
  --navy-muted: #5A6577;
  --navy-hint: #8B93A0;
  --coral: #FF5A5F;
  --coral-soft: #FFE3E4;
  --coral-hover: #E84549;
  --cyan: #11B2D6;
  --cyan-soft: #D4F1F8;
  --cream: #F7F4EF;
  --cream-warm: #FCFAF6;
  --white: #FFFFFF;
  --line: #E8E2D6;
  --line-soft: #F0EBE0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--cream);
  color: var(--navy);
  font-family: 'Poppins', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.doodle-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.20;
  overflow: hidden;
  flex-shrink: 0;
}
.doodle-background svg {
  width: 100%;
  height: 100%;
  display: block;
}

.app, .gate {
  position: relative;
  z-index: 1;
}

.gate {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.head { font-family: 'League Spartan', sans-serif; font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; }

/* ============ APP LAYOUT ============ */
.app {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.75rem 4rem;
  flex: 1;
  width: 100%;
}

/* ============ MASTHEAD ============ */
.masthead {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 2;
}
.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1.75rem;
  gap: 1rem;
}
.masthead-age {
  flex: 1;
  text-align: center;
  font-family: 'League Spartan', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--navy-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.masthead-logo {
  cursor: pointer;
  height: 56px;
  width: auto;
  display: block;
}
.masthead-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}
.masthead-link {
  background: none;
  border: none;
  font-family: 'League Spartan', sans-serif;
  font-size: 11px;
  color: var(--coral);
  cursor: pointer;
  padding: 0;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.15s;
}
.masthead-link:hover { color: var(--coral-hover); }

/* ============ NAV ============ */
nav.sections {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}
nav.sections button {
  background: transparent;
  border: 1px solid transparent;
  font-family: 'League Spartan', sans-serif;
  font-size: 13px;
  color: var(--navy-muted);
  cursor: pointer;
  padding: 0.55rem 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: all 0.15s;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-flex-direction: row;
  flex-direction: row;
  -webkit-align-items: center;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  flex-wrap: nowrap;
}
nav.sections button .nav-icon {
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  width: 16px;
  height: 16px;
}
nav.sections button:hover {
  color: var(--navy);
  background: var(--cream-warm);
}
nav.sections button.active {
  color: var(--coral);
  background: var(--coral-soft);
}
nav.sections button[data-ritual] { margin-left: auto; }

/* ============ GATE ============ */
.gate {
  max-width: 460px;
  margin: 7vh auto;
  padding: 2rem 1.75rem;
}
.gate-logo-wrap {
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
}
.gate-logo { height: 110px; width: auto; display: block; }
.gate p {
  color: var(--navy-muted);
  font-size: 15px;
  margin-bottom: 2rem;
  line-height: 1.7;
  text-align: center;
}
.gate-form {
  background: var(--white);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  border: none;
}
.gate input {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  background: var(--cream);
  border: none;
  border-radius: 10px;
  color: var(--navy);
  margin-bottom: 1rem;
  outline: none;
  transition: border-color 0.15s;
}
.gate input::placeholder { color: var(--navy-hint); }
.gate input:focus { border-color: var(--coral); }
.gate button.gate-submit {
  width: 100%;
  background: var(--coral);
  color: var(--white);
  border: none;
  padding: 0.9rem 1.5rem;
  font-family: 'League Spartan', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 10px;
  transition: background 0.15s;
}
.gate button.gate-submit:hover { background: var(--coral-hover); }
.gate .hint {
  font-size: 12px;
  color: var(--navy-hint);
  margin-top: 1.5rem;
  line-height: 1.6;
  text-align: center;
}
.gate .error {
  color: var(--coral);
  font-size: 13px;
  margin-top: 0.5rem;
  min-height: 18px;
  text-align: center;
}
.gate-remember {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-family: 'League Spartan', sans-serif;
  font-size: 12px;
  color: var(--navy-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  user-select: none;
}
.gate-remember input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--coral);
  cursor: pointer;
  margin: 0;
}

/* ============ VIEWS ============ */
.view { display: none; }
.view.active { display: block; animation: fadein 0.35s ease-out; }
@keyframes fadein {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.re-label {
  font-family: 'League Spartan', sans-serif;
  font-size: 11px;
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.view h2.title {
  font-family: 'League Spartan', sans-serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  color: var(--navy);
}

.subtitle {
  color: var(--navy-muted);
  font-size: 15px;
  margin-bottom: 2.5rem;
  max-width: 60ch;
  line-height: 1.7;
}
.subtitle .quiet-link { font-size: 14px; }

/* ============ STAGE HERO ============ */
.stage-hero {
  background: var(--white);
  border: none;
  border-radius: 16px;
  padding: 2rem 1.75rem;
  margin-bottom: 1.25rem;
}

.stage-timeline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px dashed var(--line);
  position: relative;
  gap: 4px;
}
.stage-timeline::before {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  top: 7px;
  height: 1px;
  background: var(--line);
  z-index: 0;
}
.timeline-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: transform 0.15s;
}
.timeline-stage:hover { transform: translateY(-1px); }
.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cream);
  border: 1.5px solid var(--line);
  transition: all 0.2s;
}
.timeline-stage.is-past .timeline-dot {
  background: var(--coral-soft);
  border-color: var(--coral-soft);
}
.timeline-stage.is-current .timeline-dot {
  background: var(--coral);
  border-color: var(--coral);
  width: 16px;
  height: 16px;
  box-shadow: 0 0 0 4px var(--coral-soft);
}
.timeline-label {
  font-family: 'League Spartan', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--navy-hint);
  letter-spacing: 0.04em;
}
.timeline-stage.is-current .timeline-label { color: var(--coral); }
.timeline-stage.is-past .timeline-label { color: var(--navy-muted); }
.stage-tag-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.stage-tag {
  font-family: 'League Spartan', sans-serif;
  font-size: 11px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  background: var(--cyan-soft);
  padding: 5px 12px;
  border-radius: 999px;
}
.stage-tag.current {
  color: var(--coral);
  background: var(--coral-soft);
  font-weight: 600;
}
.stage-hero h3 {
  font-family: 'League Spartan', sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--navy);
}
.stage-hero .stage-range {
  font-size: 14px;
  color: var(--navy-muted);
  margin-bottom: 0.25rem;
}
.stage-hero .stage-tagline {
  font-size: 14px;
  color: var(--navy-muted);
}

/* ============ SUB-PHASE NAV ============ */
.subphase-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
  padding: 1.1rem 1.25rem;
  background: var(--white);
  border: none;
  border-radius: 16px 16px 0 0;
  gap: 0.75rem;
  border-bottom: 1px solid var(--line-soft);
}
.subphase-nav .nav-arrow {
  background: transparent;
  border: none;
  color: var(--navy-soft);
  cursor: pointer;
  font-family: 'League Spartan', sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  transition: all 0.15s;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.subphase-nav .nav-arrow:hover:not(:disabled) {
  color: var(--coral);
  border-color: var(--coral);
}
.subphase-nav .nav-arrow:disabled {
  color: var(--navy-hint);
  cursor: default;
  opacity: 0.45;
}
.subphase-nav .nav-current {
  text-align: center;
  flex: 1;
  min-width: 0;
}
.subphase-nav .nav-current strong {
  font-family: 'League Spartan', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  display: block;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.subphase-nav .nav-current .nav-weeks {
  display: block;
  font-size: 12px;
  color: var(--cyan);
  margin-top: 0.25rem;
  font-weight: 500;
}
.subphase-nav .nav-status {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: 'League Spartan', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 999px;
  border: none;
  cursor: default;
}
.subphase-nav .nav-status.here {
  background: var(--coral-soft);
  color: var(--coral);
}
.subphase-nav .nav-status.return {
  background: transparent;
  color: var(--coral);
  cursor: pointer;
  padding: 3px 0;
  transition: opacity 0.15s;
}
.subphase-nav .nav-status.return:hover { opacity: 0.7; }

/* ============ SUB-PHASE CONTENT ============ */
.subphase-content {
  background: var(--white);
  border: none;
  border-radius: 0 0 16px 16px;
  padding: 1.75rem 1.75rem 2.25rem;
}
.subphase-content h4 {
  font-family: 'League Spartan', sans-serif;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 0.35rem;
  letter-spacing: -0.015em;
  color: var(--navy);
}
.subphase-content .weeks {
  font-size: 13px;
  color: var(--cyan);
  margin-bottom: 1.5rem;
  font-weight: 500;
}
.subphase-content p.body {
  font-size: 16px;
  color: var(--navy-soft);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.notice-block {
  background: var(--cyan-soft);
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
  margin: 1.75rem 0;
  font-size: 14px;
  color: var(--navy-soft);
  line-height: 1.7;
}
.notice-block strong {
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}
.notice-block .block-icon {
  flex-shrink: 0;
  display: block;
}

.spend-time {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
}
.spend-time .spend-label {
  font-family: 'League Spartan', sans-serif;
  font-size: 11px;
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.spend-time .block-icon {
  flex-shrink: 0;
  display: block;
}
.spend-time h5 {
  font-family: 'League Spartan', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.spend-time ul { list-style: none; }
.spend-time li {
  padding: 1.1rem 0;
  border-top: 1px solid var(--line-soft);
  font-size: 15px;
  color: var(--navy-soft);
  line-height: 1.7;
}
.spend-time li:first-child { border-top: none; padding-top: 0.5rem; }
.spend-time li strong {
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  color: var(--navy);
  display: block;
  margin-bottom: 0.35rem;
  font-size: 15px;
}

.end-mark {
  display: flex;
  justify-content: center;
  margin: 2rem 0 0.5rem;
  opacity: 0.7;
}
.end-mark svg circle {
  fill: var(--coral);
}

.leap-indicator {
  margin-top: 1.75rem;
  padding: 1rem 1.15rem;
  background: var(--cream);
  border: 1px dashed var(--coral);
  border-radius: 12px;
  font-size: 13px;
  color: var(--navy-soft);
  cursor: pointer;
  transition: background 0.15s;
  line-height: 1.6;
}
.leap-indicator:hover { background: var(--coral-soft); }
.leap-indicator strong { color: var(--coral); font-weight: 600; }

/* ============ STAGE BROWSER ============ */
.stage-browser {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.stage-browser h3.section-heading {
  font-family: 'League Spartan', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.section-sub {
  font-size: 13px;
  color: var(--navy-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.stage-list {
  list-style: none;
  background: var(--white);
  border: none;
  border-radius: 16px;
  overflow: hidden;
}
.stage-item {
  border-top: 1px solid var(--line-soft);
}
.stage-item:first-child { border-top: none; }
.stage-item.is-current > .stage-header { background: var(--coral-soft); }
.stage-item.is-current > .stage-header .stage-name { color: var(--coral); }
.stage-header {
  padding: 1.1rem 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  transition: background 0.15s;
}
.stage-header:hover { background: var(--cream-warm); }
.stage-item.is-current > .stage-header:hover { background: var(--coral-soft); }
.stage-list .stage-num {
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  color: var(--navy-hint);
  font-size: 13px;
  min-width: 20px;
}
.stage-list .stage-name {
  font-family: 'League Spartan', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  flex: 1;
  letter-spacing: -0.005em;
}
.stage-list .stage-rng {
  font-size: 12px;
  color: var(--navy-muted);
  text-align: right;
}
.stage-chevron {
  font-family: 'League Spartan', sans-serif;
  font-size: 16px;
  color: var(--navy-hint);
  min-width: 20px;
  text-align: center;
  font-weight: 600;
}
.subphase-list {
  list-style: none;
  background: var(--cream);
  padding: 0;
}
.subphase-item {
  padding: 0.85rem 1.5rem 0.85rem 3.25rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  transition: background 0.15s;
  border-top: 1px solid var(--line-soft);
}
.subphase-item:hover { background: var(--cream-warm); }
.subphase-item.is-active-sub { background: var(--coral-soft); }
.subphase-item.is-active-sub .subphase-name { color: var(--coral); }
.subphase-name {
  font-family: 'League Spartan', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-soft);
  letter-spacing: -0.005em;
}
.subphase-weeks {
  font-size: 11px;
  color: var(--navy-muted);
  text-align: right;
  white-space: nowrap;
}

.quiet-link {
  display: inline-block;
  margin-top: 2rem;
  font-size: 13px;
  color: var(--coral);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.4rem 0;
}
.quiet-link:hover { color: var(--coral-hover); }
.quiet-link.inline { margin-top: 0; padding: 0; font-size: 12px; }

/* ============ MEMORIES ============ */
.memory-controls {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  align-items: center;
}
.memory-controls select {
  padding: 0.6rem 0.95rem;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  background: var(--white);
  border: none;
  border-radius: 8px;
  color: var(--navy);
  cursor: pointer;
}
.btn-primary {
  background: var(--coral);
  color: var(--white);
  border: none;
  padding: 0.65rem 1.3rem;
  font-family: 'League Spartan', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-left: auto;
  transition: background 0.15s;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.btn-primary:hover { background: var(--coral-hover); }

.memories { display: block; }
.memory-group { margin-bottom: 2.5rem; }
.memory-group:last-child { margin-bottom: 0; }
.memory-group-label {
  font-family: 'League Spartan', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line-soft);
}
.memory-group-items { display: grid; gap: 1.25rem; }
.memory-card {
  border: none;
  background: var(--white);
  padding: 1.5rem;
  border-radius: 16px;
}
.memory-card img {
  width: 100%;
  display: block;
  border-radius: 10px;
}
.memory-photos {
  margin-bottom: 1.25rem;
}
.memory-photos.multi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.memory-photos.multi img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}
.memory-photos:not(.multi) img {
  width: 100%;
  border-radius: 10px;
}
.memory-card .meta {
  display: flex;
  justify-content: space-between;
  font-family: 'League Spartan', sans-serif;
  font-size: 11px;
  color: var(--navy-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  font-weight: 500;
}
.memory-card .tag {
  display: inline-block;
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--coral);
  margin-bottom: 0.5rem;
  letter-spacing: -0.005em;
}
.memory-card .reflection {
  font-size: 15px;
  color: var(--navy-soft);
  line-height: 1.7;
}
.memory-card .memory-actions {
  display: flex;
  gap: 1.25rem;
  margin-top: 1rem;
}
.memory-card .memory-actions button {
  background: none;
  border: none;
  color: var(--navy-hint);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  font-family: 'League Spartan', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  transition: color 0.15s;
}
.memory-card .memory-actions button:hover { color: var(--coral); }
.memory-card .memory-actions button.copied { color: var(--coral); }

.memory-card.highlight {
  animation: memory-pulse 2.5s ease-out;
}
@keyframes memory-pulse {
  0% { box-shadow: 0 0 0 0 var(--coral-soft); }
  20% { box-shadow: 0 0 0 8px var(--coral-soft); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.comment-thread {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-soft);
}
.comment-list {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.comment {
  background: var(--cream);
  padding: 0.85rem 1rem;
  border-radius: 10px;
}
.comment-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.35rem;
  gap: 0.75rem;
}
.comment-author {
  font-family: 'League Spartan', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.comment-date {
  font-family: 'League Spartan', sans-serif;
  font-size: 10px;
  color: var(--navy-hint);
  letter-spacing: 0.04em;
}
.comment-text {
  font-size: 14px;
  color: var(--navy-soft);
  line-height: 1.65;
}
.comment-form {
  display: grid;
  gap: 0.6rem;
}
.comment-form .comment-name,
.comment-form .comment-text-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  background: var(--cream);
  border: none;
  border-radius: 10px;
  color: var(--navy);
  outline: none;
  transition: border-color 0.15s;
  resize: vertical;
}
.comment-form .comment-name { font-size: 13px; }
.comment-form .comment-text-input { min-height: 60px; line-height: 1.6; }
.comment-form .comment-name:focus,
.comment-form .comment-text-input:focus { border-color: var(--coral); }
.comment-form .comment-submit {
  align-self: flex-end;
  background: transparent;
  color: var(--coral);
  border: 1px solid var(--coral);
  padding: 0.4rem 1rem;
  font-family: 'League Spartan', sans-serif;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: all 0.15s;
}
.comment-form .comment-submit:hover {
  background: var(--coral);
  color: var(--white);
}

.empty {
  padding: 3rem 2rem;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--navy-muted);
  font-size: 15px;
  background: var(--white);
}

.show-more-btn {
  display: block;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.9rem 1.5rem;
  background: var(--white);
  border: none;
  border-radius: 12px;
  font-family: 'League Spartan', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.15s;
}
.show-more-btn:hover { background: var(--coral-soft); }

/* ============ MODAL ============ */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 58, 0.55);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 100;
  padding: 3rem 1rem;
  overflow-y: auto;
}
.modal-bg.active { display: flex; }
.modal {
  background: var(--cream);
  max-width: 580px;
  width: 100%;
  padding: 2.25rem 1.75rem;
  position: relative;
  border-radius: 20px;
  border: none;
  margin: auto;
}
.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: var(--white);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  color: var(--navy-muted);
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.modal-close:hover {
  color: var(--coral);
  border-color: var(--coral);
}
.modal h3 {
  font-family: 'League Spartan', sans-serif;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 0.4rem;
  letter-spacing: -0.015em;
  color: var(--navy);
}
.modal .modal-sub {
  font-size: 13px;
  color: var(--navy-muted);
  margin-bottom: 1.5rem;
}
.modal label {
  display: block;
  font-family: 'League Spartan', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy-muted);
  margin-bottom: 0.5rem;
  margin-top: 1.25rem;
  font-weight: 600;
}
.modal label:first-of-type { margin-top: 0; }
.modal input[type="text"],
.modal input[type="date"],
.modal textarea,
.modal select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 0.9rem;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  background: var(--white);
  border: none;
  border-radius: 10px;
  color: var(--navy);
  outline: none;
  resize: vertical;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.modal textarea:focus,
.modal input:focus,
.modal select:focus { border-color: var(--coral); }
.modal textarea {
  min-height: 110px;
  line-height: 1.65;
}
.modal input[type="file"] {
  font-size: 13px;
  color: var(--navy-muted);
  background: transparent;
  border: 1px dashed var(--line);
  padding: 0.85rem;
}
.modal .modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.75rem;
  justify-content: flex-end;
}
.modal button.secondary {
  background: var(--white);
  border: none;
  color: var(--navy-soft);
  padding: 0.65rem 1.3rem;
  font-family: 'League Spartan', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.modal button.primary {
  background: var(--coral);
  color: var(--white);
  border: none;
  padding: 0.65rem 1.3rem;
  font-family: 'League Spartan', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.modal button.primary:hover { background: var(--coral-hover); }

/* ============ LEAPS MODAL ============ */
.leap-list {
  list-style: none;
  margin-top: 1rem;
  background: var(--white);
  border: none;
  border-radius: 12px;
  overflow: hidden;
}
.leap-list li {
  padding: 0.95rem 1.15rem;
  border-top: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background 0.15s;
}
.leap-list li:first-child { border-top: none; }
.leap-list li:hover { background: var(--cream); }
.leap-list .leap-num {
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  color: var(--coral);
  font-size: 11px;
  display: block;
  margin-bottom: 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.leap-list .leap-name {
  font-family: 'League Spartan', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
}
.leap-detail { margin-top: 1rem; }
.leap-detail p { font-size: 15px; color: var(--navy-soft); line-height: 1.75; margin-bottom: 0.75rem; }
.leap-caveat {
  background: var(--cream);
  padding: 1rem 1.15rem;
  font-size: 12px;
  color: var(--navy-muted);
  line-height: 1.65;
  margin-bottom: 1.25rem;
  border-left: 3px solid var(--cyan);
  border-radius: 4px;
}

/* ============ RITUAL ============ */
.ritual-intro {
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  background: var(--white);
  border: none;
  border-radius: 16px;
  font-size: 15px;
  color: var(--navy-soft);
  line-height: 1.75;
  max-width: 56ch;
}
.ritual-phase {
  background: var(--white);
  border: none;
  border-radius: 16px;
  padding: 1.75rem;
  margin-bottom: 1rem;
}
.ritual-phase .phase-label {
  font-family: 'League Spartan', sans-serif;
  font-size: 11px;
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.ritual-phase h4 {
  font-family: 'League Spartan', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 0.85rem;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.ritual-phase p.prompt {
  font-size: 15px;
  color: var(--navy-soft);
  margin-bottom: 1.25rem;
  max-width: 60ch;
  line-height: 1.75;
}
.ritual-phase textarea {
  width: 100%;
  min-height: 95px;
  padding: 0.9rem 1rem;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  background: var(--cream);
  border: none;
  border-radius: 10px;
  color: var(--navy);
  outline: none;
  resize: vertical;
  line-height: 1.7;
  transition: border-color 0.15s;
}
.ritual-phase textarea:focus { border-color: var(--coral); }

.ritual-save {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--white);
  border: none;
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.ritual-save .save-status {
  font-size: 12px;
  color: var(--navy-muted);
}
.ritual-save .btn-primary { margin-left: 0; }

.past-rituals {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.past-rituals .section-heading {
  font-family: 'League Spartan', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--navy);
}
.ritual-filter-controls {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.ritual-search {
  flex: 1;
  min-width: 160px;
  padding: 0.6rem 0.9rem;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  background: var(--white);
  border: none;
  border-radius: 10px;
  color: var(--navy);
  outline: none;
  transition: border-color 0.15s;
}
.ritual-search:focus { box-shadow: 0 0 0 2px var(--coral-soft); }
.ritual-search::placeholder { color: var(--navy-hint); }
.ritual-month-select {
  padding: 0.6rem 0.9rem;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  background: var(--white);
  border: none;
  border-radius: 10px;
  color: var(--navy);
  cursor: pointer;
}
.past-ritual {
  background: var(--white);
  border: none;
  border-radius: 12px;
  padding: 1.1rem 1.4rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: background 0.15s;
}
.past-ritual:hover { background: var(--cream-warm); }
.past-ritual .date {
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--cyan);
}
.past-ritual .preview {
  font-size: 13px;
  color: var(--navy-muted);
  margin-top: 0.35rem;
  line-height: 1.6;
}

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 58, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 2rem;
}
.lightbox.active { display: flex; }
.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  user-select: none;
  -webkit-user-select: none;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: var(--cream);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 1;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.3); }
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: var(--cream);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.lightbox-arrow:hover { background: rgba(255, 255, 255, 0.3); }
.lightbox-arrow:disabled { opacity: 0.2; cursor: default; }
.lightbox-arrow:disabled:hover { background: rgba(255, 255, 255, 0.15); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-counter {
  font-family: 'League Spartan', sans-serif;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.lightbox-bottom {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.lightbox-download {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: var(--cream);
  padding: 8px 14px;
  border-radius: 8px;
  font-family: 'League Spartan', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}
.lightbox-download:hover { background: rgba(255, 255, 255, 0.3); }

/* Make photos clickable */
.memory-photos img {
  cursor: pointer;
  transition: opacity 0.15s;
}
.memory-photos img:hover { opacity: 0.85; }

/* ============ FOOTER ============ */
footer {
  background: var(--navy);
  position: relative;
  z-index: 2;
}
.footer-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem 1.75rem;
  font-family: 'League Spartan', sans-serif;
  font-size: 11px;
  color: var(--cream);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
footer button {
  background: none;
  border: none;
  color: var(--cream);
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
  font-family: 'League Spartan', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  opacity: 0.8;
}
footer button:hover { color: var(--coral); opacity: 1; }

@media (max-width: 700px) {
  /* === Layout === */
  .app { padding: 1.25rem 1rem 3rem; }
  .gate { margin: 4vh auto; padding: 1.5rem 1.25rem; }

  /* === Masthead === */
  .masthead-inner {
    padding: 0.85rem 1rem;
  }
  .masthead-logo { height: 40px; }
  .gate-logo { height: 75px; }
  .masthead-link { font-size: 10px; }
  .masthead-age { font-size: 10px; }

  /* === Footer === */
  .footer-inner {
    padding: 1.25rem 1rem;
    font-size: 10px;
  }
  footer button { font-size: 10px; }

  /* === Nav buttons === */
  nav.sections {
    margin-bottom: 1.75rem;
    gap: 0.35rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
  }
  nav.sections::-webkit-scrollbar { display: none; }
  nav.sections button {
    font-size: 11px;
    padding: 0.5rem 0.75rem;
    gap: 6px;
    flex-shrink: 0;
    white-space: nowrap;
  }
  nav.sections button .nav-icon {
    width: 14px;
    height: 14px;
  }
  nav.sections button[data-ritual] { margin-left: 0; }

  /* === Titles === */
  .view h2.title {
    font-size: 26px;
    margin-bottom: 0.5rem;
  }
  .subtitle {
    font-size: 14px;
    margin-bottom: 1.75rem;
  }
  .re-label { font-size: 10px; }

  /* === Stage hero === */
  .stage-hero {
    padding: 1.25rem 1.1rem 1.5rem;
    border-radius: 14px;
  }
  .stage-hero h3 {
    font-size: 22px;
  }
  .stage-hero .stage-range,
  .stage-hero .stage-tagline {
    font-size: 13px;
  }
  .stage-tag { font-size: 10px; padding: 4px 9px; }

  /* === Stage timeline (mobile) — hide entirely, stage tags do the job === */
  .stage-timeline {
    display: none;
  }

  /* === Subphase navigation === */
  .subphase-nav {
    padding: 0.85rem 0.85rem;
    gap: 0.5rem;
    border-radius: 14px 14px 0 0;
  }
  .subphase-nav .nav-arrow {
    font-size: 10px;
    padding: 0.5rem 0.7rem;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .subphase-nav .nav-current strong { font-size: 17px; }
  .subphase-nav .nav-current .nav-weeks { font-size: 11px; }

  /* === Subphase content === */
  .subphase-content {
    padding: 1.5rem 1.1rem 1.75rem;
    border-radius: 0 0 14px 14px;
  }
  .subphase-content h4 {
    font-size: 21px;
    margin-bottom: 0.3rem;
  }
  .subphase-content .weeks { font-size: 12px; margin-bottom: 1.25rem; }
  .subphase-content p.body {
    font-size: 15px;
    line-height: 1.7;
  }

  /* === Notice block === */
  .notice-block {
    padding: 1rem 1.15rem;
    margin: 1.5rem 0;
  }
  .notice-block strong { font-size: 10px; }

  /* === Spend time === */
  .spend-time {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
  }
  .spend-time .spend-label { font-size: 10px; }
  .spend-time li {
    padding: 1rem 0;
    font-size: 14px;
  }
  .spend-time li strong { font-size: 14px; }

  /* === End mark === */
  .end-mark { margin: 1.75rem 0 0.5rem; }

  /* === Stage browser === */
  .stage-browser {
    margin-top: 2.25rem;
    padding-top: 1.5rem;
  }
  .stage-browser h3.section-heading { font-size: 19px; }
  .stage-list li {
    padding: 1rem 1.15rem;
    gap: 0.75rem;
  }
  .stage-list .stage-name { font-size: 14px; }
  .stage-list .stage-rng { font-size: 11px; }
  .stage-header {
    padding: 1rem 1.15rem;
    gap: 0.75rem;
  }
  .subphase-item {
    padding: 0.75rem 1.15rem 0.75rem 2.75rem;
  }
  .subphase-name { font-size: 13px; }
  .subphase-weeks { font-size: 10px; }

  /* === Memory cards === */
  .memory-card {
    padding: 1.25rem;
    border-radius: 14px;
  }
  .memory-card .tag { font-size: 17px; }
  .memory-card .reflection { font-size: 14px; }
  .memory-group-label { font-size: 12px; }

  /* === Comments === */
  .comment {
    padding: 0.75rem 0.85rem;
  }
  .comment-text { font-size: 13px; }
  .comment-author { font-size: 11px; }
  .comment-form .comment-name,
  .comment-form .comment-text-input {
    font-size: 14px;
  }
  .comment-form .comment-submit {
    min-height: 40px;
    padding: 0.5rem 1.1rem;
  }

  /* === Memory controls === */
  .memory-controls {
    margin-bottom: 1.5rem;
  }
  .btn-primary {
    font-size: 11px;
    padding: 0.65rem 1.1rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* === Ritual === */
  .ritual-intro {
    padding: 1.25rem 1.35rem;
    font-size: 14px;
  }
  .ritual-phase {
    padding: 1.35rem 1.25rem;
    border-radius: 14px;
  }
  .ritual-phase h4 { font-size: 19px; }
  .ritual-phase p.prompt { font-size: 14px; }
  .ritual-phase textarea {
    font-size: 14px;
    min-height: 110px;
  }
  .ritual-save {
    padding: 1.1rem 1.25rem;
  }

  /* === Modals === */
  .modal-bg {
    padding: 1.25rem 0.75rem;
  }
  .modal {
    padding: 1.75rem 1.35rem;
    border-radius: 16px;
  }
  .modal h3 { font-size: 22px; }
  .modal label { font-size: 10px; }
  .modal-close {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
  .modal input[type="text"],
  .modal input[type="date"],
  .modal textarea,
  .modal select {
    font-size: 16px;
  }

  /* === Gate inputs (prevent iOS zoom) === */
  .gate input {
    font-size: 16px;
  }
  .gate button.gate-submit {
    min-height: 48px;
  }
  .gate p {
    font-size: 14px;
  }

  /* === Leap indicator === */
  .leap-indicator {
    font-size: 12px;
    padding: 0.85rem 1rem;
  }
}

/* === Very small screens (iPhone SE etc) === */
@media (max-width: 380px) {
  .app { padding: 1rem 0.85rem 4rem; }
  .masthead-age { display: none; }
  nav.sections { gap: 0.25rem; }
  nav.sections button {
    font-size: 10px;
    padding: 0.45rem 0.6rem;
  }
  nav.sections button .nav-icon {
    width: 12px;
    height: 12px;
  }
  .view h2.title { font-size: 24px; }
  .stage-hero h3 { font-size: 20px; }
  .subphase-content h4 { font-size: 19px; }
}

/* ============================================================
   "If you want to go deeper" — books & podcasts in philosophy modal
   ============================================================ */

.reading-group {
  margin-top: 1.75rem;
}

.reading-group-label {
  font-family: 'League Spartan', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--coral);
  font-weight: 700;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line-soft);
}

.reading-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.reading-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.reading-item:last-child {
  border-bottom: none;
}

.reading-link {
  display: inline;
  font-family: 'League Spartan', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.reading-link:hover {
  color: var(--coral);
  border-bottom-color: var(--coral);
}

.reading-byline {
  display: block;
  font-size: 13px;
  color: var(--navy-muted);
  margin-top: 0.2rem;
  font-style: italic;
}

.reading-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.reading-tag {
  font-family: 'League Spartan', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.4;
}

.tag-authoritative {
  background: var(--coral-soft);
  color: var(--coral-hover);
}

.tag-attachment {
  background: var(--cyan-soft);
  color: #0E7E97;
}

.tag-gentle {
  background: #FFF1E6;
  color: #B85A1A;
}

.tag-montessori {
  background: #EBF2E5;
  color: #4A6B2A;
}

.tag-RIE {
  background: #ECE6F2;
  color: #5A3D7A;
}

.tag-unschooling {
  background: #FBEEDC;
  color: #8A5A1A;
}

/* Inline citation links — anchor research-backed claims to their source */
.cite {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--coral);
  border-bottom-style: dotted;
  transition: color 0.15s ease, border-bottom-color 0.15s ease;
}

.cite:hover {
  color: var(--coral);
  border-bottom-style: solid;
}

.cite em {
  font-style: italic;
}

/* Intention card — surfaces the most recent "what we want to hold in mind"
   from the Sunday check-in, but only in parents view and only if it's fresh
   (within the last 7 days). Sits AFTER the tips list, before the end-mark
   dots, so the intention reads like a personal note from Amanda & Thom about
   what they're holding this week — distinct from the prescriptive tips above. */
.intention-card {
  margin: 2.5rem 0 1.5rem;
  padding: 1.5rem 0 0;
  border-top: 1px dashed var(--coral);
  position: relative;
}
.intention-card .intention-label {
  font-family: 'League Spartan', sans-serif;
  font-size: 11px;
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0.85rem;
}
.intention-card .intention-label .block-icon {
  flex-shrink: 0;
  display: block;
}
.intention-card .intention-text {
  font-size: 15px;
  color: var(--navy);
  line-height: 1.75;
  margin: 0;
  white-space: pre-wrap;
  padding-left: 0.75rem;
  border-left: 2px solid var(--coral);
}

/* Ritual detail actions — mirrors .memory-card .memory-actions exactly
   for visual consistency across edit/delete buttons throughout the app. */
.ritual-detail-actions {
  display: flex;
  gap: 1.25rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-soft);
}
.ritual-detail-actions button {
  background: none;
  border: none;
  color: var(--navy-hint);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  font-family: 'League Spartan', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  transition: color 0.15s;
}
.ritual-detail-actions button:hover { color: var(--coral); }
