/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Cade's Day — wall.css
   Wall-mounted tablet, 2-4 ft viewing distance.
   One chapter at a time. Soft, warm, calm. No urgency anywhere.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

:root {
  --blue:        #1565C0;
  --blue-dark:   #0D47A1;
  --blue-soft:   #E3F2FD;
  --yellow:      #FFD600;
  --yellow-soft: #FFF8DC;
  --green:       #4CAF50;
  --dad:         #2E7D32;
  --mom:         #C2185B;
  --either:      #5E35B1;
  --sky:         #6BAED6;
  --sky-light:   #E4F2FA;
  --sky-dark:    #3A78A8;
  --sage:        #6BAF87;
  --sage-light:  #E8F5EE;
  --sage-dark:   #3D7A58;
  --bg:          #FFF9E6;
  --bg-evening:  #1A237E;
  --card:        #ffffff;
  --text:        #2C3E50;
  --muted:       #5A6C7D;
  --border:      rgba(21,101,192,0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  font-size: 22px;
  line-height: 1.45;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-user-select: none;
  user-select: none;
  touch-action: pan-y;
  overscroll-behavior: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  cursor: pointer;
  background: none;
  color: inherit;
}

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

/* ─── Loading ─── */
.loading-screen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.spinner {
  width: 72px;
  height: 72px;
  border: 6px solid var(--blue-soft);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Chapter shell ─── */
.chapter {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 32px 28px 28px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  animation: chapter-in 0.6s ease;
}
@keyframes chapter-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Suppress the chapter-in fade when rendering inside the same chapter
   (e.g. emotion-grid → decompression in welcome_home). Without this the
   sub-state swap shows an opacity-0 frame before fading back in. */
.chapter.no-anim { animation: none; }

/* ─── Morning activation greeting ─── */
.morning-greeting {
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 36px;
  text-align: center;
}
.greeting-icon {
  font-size: 128px;
  line-height: 1;
  animation: gentle-bob 4s ease-in-out infinite;
}
@keyframes gentle-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.greeting-text {
  font-size: 52px;
  font-weight: 900;
  color: var(--blue);
  letter-spacing: -1px;
  line-height: 1.1;
}
.greeting-name {
  color: var(--blue-dark);
}
.greeting-sub {
  font-size: 22px;
  font-weight: 700;
  color: var(--muted);
}
.start-btn {
  background: var(--yellow);
  color: var(--blue-dark);
  font-weight: 900;
  font-size: 28px;
  padding: 24px 56px;
  border-radius: 32px;
  box-shadow: 0 6px 0 var(--blue-dark), 0 12px 28px rgba(21,101,192,0.18);
  min-width: 280px;
  min-height: 88px;
  letter-spacing: 0.5px;
  transition: transform 0.1s, box-shadow 0.1s;
  margin-top: 8px;
}
.start-btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--blue-dark), 0 4px 10px rgba(21,101,192,0.16);
}

/* ─── Chapter header ─── */
.chapter-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}
.chapter-emoji {
  font-size: 56px;
  line-height: 1;
}
.chapter-info { flex: 1; }
.chapter-title {
  font-size: 32px;
  font-weight: 900;
  color: var(--blue);
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.chapter-subtitle {
  font-size: 18px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 4px;
}

/* ─── Chore list ─── */
.chore-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}
.chore-item {
  background: white;
  border-radius: 20px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 2px 8px rgba(21,101,192,0.06);
  min-height: 84px;
  transition: background 0.25s, transform 0.1s, box-shadow 0.25s;
  cursor: pointer;
}
.chore-item:active { transform: scale(0.98); }
.chore-item.done {
  background: var(--blue-soft);
  box-shadow: none;
}
.chore-check {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 16px;
  background: white;
  border: 4px solid var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 900;
  color: var(--blue);
  transition: all 0.25s;
}
.chore-item.done .chore-check {
  background: var(--blue);
  color: white;
}
.chore-name {
  flex: 1;
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.chore-item.done .chore-name {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 3px;
}
.chore-points {
  background: var(--yellow);
  color: var(--blue-dark);
  font-weight: 900;
  font-size: 18px;
  padding: 8px 16px;
  border-radius: 16px;
  white-space: nowrap;
}

/* ─── Hint / footer text ─── */
.chapter-hint {
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  font-size: 18px;
  margin-top: 8px;
  padding: 12px;
}

/* ─── Welcome Home: emotion check-in grid ─── */
.checkin { gap: 0; }
.checkin-head {
  text-align: center;
  margin-bottom: 24px;
}
.checkin-title {
  font-size: 30px;
  font-weight: 900;
  color: var(--blue);
  letter-spacing: -0.5px;
}
.checkin-sub {
  font-size: 18px;
  color: var(--muted);
  margin-top: 6px;
  font-weight: 600;
}
.emotion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.emotion-cell {
  background: white;
  border-radius: 24px;
  padding: 24px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-height: 140px;
  box-shadow: 0 2px 8px rgba(21,101,192,0.06);
  transition: transform 0.1s, background 0.2s;
  cursor: pointer;
}
.emotion-cell:active {
  transform: scale(0.96);
  background: var(--blue-soft);
}
.emotion-face {
  font-size: 64px;
  line-height: 1;
}
.emotion-label {
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
}

/* ─── Welcome Home: Thanks transition (2s) ─── */
.thanks-screen {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 28px;
  animation: thanks-in 0.4s ease;
}
@keyframes thanks-in {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
.thanks-heart {
  font-size: 96px;
  line-height: 1;
}
.thanks-text {
  font-size: 48px;
  font-weight: 900;
  color: var(--blue);
  letter-spacing: -1px;
}

/* ─── Welcome Home: Decompression timer ─── */
.decompression {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 40px;
}
.decomp-emoji {
  font-size: 96px;
  line-height: 1;
  animation: gentle-bob 5s ease-in-out infinite;
}
.decomp-timer {
  font-size: 128px;
  font-weight: 900;
  color: var(--blue);
  letter-spacing: -3px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.decomp-skip {
  background: white;
  color: var(--muted);
  font-weight: 800;
  font-size: 20px;
  padding: 16px 40px;
  border-radius: 24px;
  min-height: 64px;
  min-width: 200px;
  border: 2px solid var(--border);
  transition: transform 0.1s, background 0.15s;
}
.decomp-skip:active {
  transform: scale(0.96);
  background: var(--blue-soft);
  color: var(--blue);
}

/* Skip confirmation overlay (above decompression) */
.skip-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 71, 161, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 150;
  padding: 32px;
  text-align: center;
  gap: 32px;
  animation: thanks-in 0.25s ease;
}
.skip-q {
  font-size: 28px;
  font-weight: 800;
  color: white;
  max-width: 520px;
  line-height: 1.35;
}
.skip-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn-soft-light {
  background: rgba(255,255,255,0.15);
  color: white;
  font-weight: 800;
  font-size: 18px;
  padding: 18px 32px;
  border-radius: 24px;
  min-height: 64px;
  min-width: 160px;
  border: 2px solid rgba(255,255,255,0.3);
  transition: transform 0.1s, background 0.15s;
}
.btn-soft-light:active {
  transform: scale(0.96);
  background: rgba(255,255,255,0.25);
}
.btn-confirm-warm {
  background: var(--yellow);
  color: var(--blue-dark);
  font-weight: 900;
  font-size: 18px;
  padding: 18px 32px;
  border-radius: 24px;
  min-height: 64px;
  min-width: 160px;
  box-shadow: 0 4px 0 var(--blue-dark);
  transition: transform 0.1s, box-shadow 0.1s;
}
.btn-confirm-warm:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--blue-dark);
}

/* ─── Holding screens (school, daycare) ─── */
.holding-screen {
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 32px;
  text-align: center;
}
.holding-icon {
  font-size: 120px;
  line-height: 1;
  animation: gentle-bob 5s ease-in-out infinite;
}
.holding-title {
  font-size: 40px;
  font-weight: 900;
  color: var(--blue);
  letter-spacing: -0.5px;
}
.holding-sub {
  font-size: 22px;
  font-weight: 600;
  color: var(--muted);
}

/* ─── Stub chapter (placeholder for future chapters) ─── */
.stub-chapter {
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
}
.stub-emoji { font-size: 88px; line-height: 1; }
.stub-title { font-size: 32px; font-weight: 900; color: var(--blue); }
.stub-sub   { font-size: 20px; color: var(--muted); font-weight: 600; }
.stub-note  { font-size: 14px; color: var(--muted); opacity: 0.7; margin-top: 8px; }

/* ─── Day-complete screen ─── */
.day-complete {
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 28px;
  text-align: center;
}
.day-complete .icon { font-size: 128px; line-height: 1; }
.day-complete .title {
  font-size: 44px;
  font-weight: 900;
  color: var(--blue);
  letter-spacing: -1px;
}
.day-complete .sub {
  font-size: 22px;
  color: var(--muted);
  font-weight: 700;
}

/* ─── Day-complete demo recap (points + goal progress) ─── */
.day-complete-stats {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  width: 100%;
  max-width: 460px;
}
.day-complete-pts {
  font-size: 22px;
  font-weight: 800;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.day-complete-pts strong {
  background: var(--yellow);
  color: var(--blue-dark);
  font-size: 30px;
  font-weight: 900;
  padding: 4px 18px;
  border-radius: 18px;
}
.day-complete-total {
  font-size: 16px;
  color: var(--muted);
  font-weight: 700;
}
.day-complete-goals {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.day-complete-goal {
  background: white;
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: 0 2px 6px rgba(21,101,192,0.08);
}
.day-complete-goal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.day-complete-goal-icon { font-size: 20px; line-height: 1; }
.day-complete-goal-name { flex: 1; }
.day-complete-goal-pct {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.day-complete-goal-bar {
  height: 8px;
  background: rgba(21,101,192,0.12);
  border-radius: 4px;
  overflow: hidden;
}
.day-complete-goal-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 4px;
}
.day-complete-goal.ready .day-complete-goal-fill { background: var(--green); }

/* ─── Day-complete Start Over button (demo only) ─── */
.start-over-btn {
  background: var(--yellow);
  color: var(--blue-dark);
  font-weight: 900;
  font-size: 22px;
  padding: 18px 44px;
  border-radius: 28px;
  min-height: 64px;
  margin-top: 8px;
  box-shadow: 0 4px 0 var(--blue-dark), 0 8px 20px rgba(21,101,192,0.18);
  border: none;
  letter-spacing: 0.4px;
  transition: transform 0.1s, box-shadow 0.1s;
}
.start-over-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--blue-dark), 0 3px 8px rgba(21,101,192,0.16);
}
.start-over-btn[disabled] {
  opacity: 0.7;
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--blue-dark);
  cursor: default;
}

/* ─── Events strip (footer) ─── */
.events-strip {
  margin-top: auto;
  padding-top: 24px;
  border-top: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.events-strip .label {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}
.event-pill {
  background: var(--yellow-soft);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.event-pill .date {
  font-size: 13px;
  color: var(--muted);
  font-weight: 800;
  min-width: 80px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ─── Theme: evening (soft dusk) ─── */
.chapter.theme-evening {
  background: linear-gradient(180deg, var(--bg) 0%, #E8EAF6 60%, #C5CAE9 100%);
  margin: 0;
  padding-top: 36px;
}
.chapter.theme-evening .chore-item { background: white; }

/* ─── Theme: bedtime (dark, calm) ─── */
.chapter.theme-bedtime {
  background: linear-gradient(180deg, #3949AB 0%, var(--bg-evening) 100%);
  color: white;
  margin: 0;
  padding-top: 36px;
  min-height: 100vh;
}
.chapter.theme-bedtime .chapter-title    { color: white; }
.chapter.theme-bedtime .chapter-subtitle { color: rgba(255,255,255,0.78); }
.chapter.theme-bedtime .chore-item {
  background: rgba(255,255,255,0.12);
  color: white;
  box-shadow: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.chapter.theme-bedtime .chore-item.done { background: rgba(255,255,255,0.06); }
.chapter.theme-bedtime .chore-name { color: white; }
.chapter.theme-bedtime .chore-item.done .chore-name {
  color: rgba(255,255,255,0.55);
  text-decoration-color: rgba(255,255,255,0.5);
}
.chapter.theme-bedtime .chore-check {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.55);
  color: white;
}
.chapter.theme-bedtime .chore-item.done .chore-check {
  background: white;
  color: var(--blue-dark);
}
.chapter.theme-bedtime .chapter-hint { color: rgba(255,255,255,0.7); }
.chapter.theme-bedtime .events-strip { border-top-color: rgba(255,255,255,0.18); }
.chapter.theme-bedtime .events-strip .label { color: rgba(255,255,255,0.65); }
.chapter.theme-bedtime .event-pill {
  background: rgba(255,255,255,0.12);
  color: white;
}
.chapter.theme-bedtime .event-pill .date { color: rgba(255,255,255,0.7); }

/* ─── Time-nudge banner (full-screen soft prompt at transition) ─── */
.nudge-overlay {
  position: fixed;
  inset: 0;
  background: rgba(21, 101, 192, 0.92);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 180;
  padding: 32px;
  text-align: center;
  gap: 36px;
  animation: thanks-in 0.35s ease;
}
.nudge-overlay.visible { display: flex; }
.nudge-emoji {
  font-size: 112px;
  line-height: 1;
  animation: gentle-bob 4s ease-in-out infinite;
}
.nudge-text {
  font-size: 36px;
  font-weight: 900;
  color: white;
  max-width: 560px;
  line-height: 1.25;
  letter-spacing: -0.5px;
}
.nudge-btn {
  background: var(--yellow);
  color: var(--blue-dark);
  font-weight: 900;
  font-size: 26px;
  padding: 22px 56px;
  border-radius: 32px;
  min-width: 280px;
  min-height: 88px;
  box-shadow: 0 6px 0 var(--blue-dark), 0 12px 28px rgba(0,0,0,0.2);
  transition: transform 0.1s, box-shadow 0.1s;
}
.nudge-btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--blue-dark), 0 4px 10px rgba(0,0,0,0.18);
}

/* ─── Subheads + per-type styling (routine = purple, activity = sky) ─── */
.chore-list-subhead {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-top: 4px;
  padding-left: 4px;
}
.chore-list-subhead:first-child { margin-top: 0; }
.chore-item.routine .chore-check {
  border-color: var(--either);
  color: var(--either);
}
.chore-item.routine.done .chore-check {
  background: var(--either);
  border-color: var(--either);
  color: white;
}
.chore-item.activity .chore-check {
  border-color: var(--sky);
  color: var(--sky-dark);
}
.chore-item.activity .chore-points {
  background: var(--sky-light);
  color: var(--sky-dark);
}
.chore-item.activity.done {
  background: var(--sage-light);
}
.chore-item.activity.done .chore-check {
  background: var(--sage);
  border-color: var(--sage);
  color: white;
}
.chapter.theme-bedtime .chore-list-subhead { color: rgba(255,255,255,0.65); }

/* ─── Persistent points widget (top-right) ─── */
.points-widget {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
  display: none;
  align-items: center;
  gap: 6px;
  background: rgba(255, 214, 0, 0.92);
  color: var(--blue-dark);
  font-weight: 900;
  font-size: 18px;
  padding: 8px 14px;
  border-radius: 22px;
  min-height: 40px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
  opacity: 0.75;
  transition: opacity 0.25s, transform 0.2s, box-shadow 0.25s;
}
.points-widget.visible { display: inline-flex; }
.points-widget:active { transform: scale(0.96); }
.points-widget.flash {
  opacity: 1;
  transform: scale(1.18);
  box-shadow: 0 6px 22px rgba(255, 214, 0, 0.6);
}
.points-widget-amount { font-variant-numeric: tabular-nums; }
.points-widget-icon { font-size: 16px; line-height: 1; }

/* ─── Looking Ahead button (bottom-right, above demo-next) ─── */
.looking-ahead-btn {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 55;
  background: rgba(255, 255, 255, 0.85);
  color: var(--blue);
  font-size: 22px;
  padding: 0;
  width: 48px;
  height: 48px;
  border-radius: 24px;
  box-shadow: 0 3px 10px rgba(21,101,192,0.18);
  border: 2px solid var(--border);
  display: none;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, box-shadow 0.2s;
}
.looking-ahead-btn.visible { display: inline-flex; }
.looking-ahead-btn:active { transform: scale(0.94); }
/* If demo-next-btn is also showing, slide Looking Ahead up so they don't overlap. */
.demo-next-btn.visible ~ .looking-ahead-btn.visible,
.looking-ahead-btn.visible.with-demo { bottom: 72px; }

/* ─── Goals overlay ─── */
.goals-overlay,
.looking-ahead-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 71, 161, 0.82);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 130;
  padding: 24px;
  animation: thanks-in 0.25s ease;
}
.goals-overlay.visible,
.looking-ahead-overlay.visible { display: flex; }
.goals-card,
.la-card {
  background: white;
  border-radius: 28px;
  padding: 28px 24px 20px;
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.goals-card-title,
.la-card-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--blue);
  letter-spacing: -0.5px;
  text-align: center;
}
.goals-card-body,
.la-card-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.goal-row {
  background: var(--yellow-soft);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.goal-row-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.goal-icon { font-size: 28px; line-height: 1; }
.goal-name {
  flex: 1;
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
}
.goal-badge-ready {
  background: var(--green);
  color: white;
  font-weight: 900;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.goal-progress {
  height: 14px;
  background: rgba(21,101,192,0.12);
  border-radius: 8px;
  overflow: hidden;
}
.goal-progress-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 8px;
  transition: width 0.4s ease;
}
.goal-row.ready .goal-progress-fill { background: var(--green); }
.goal-progress-text {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.goals-empty,
.la-empty {
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  font-size: 17px;
  padding: 24px 16px;
}
.goals-card-close,
.la-card-close {
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-weight: 800;
  font-size: 18px;
  padding: 14px 32px;
  border-radius: 22px;
  min-height: 56px;
  border: none;
  align-self: center;
  min-width: 180px;
  transition: transform 0.1s, background 0.15s;
}
.goals-card-close:active,
.la-card-close:active {
  transform: scale(0.97);
  background: var(--blue);
  color: white;
}

/* ─── Looking Ahead overlay ─── */
.la-event {
  background: var(--yellow-soft);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.la-event-date {
  font-size: 13px;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  min-width: 90px;
}
.la-event-title {
  flex: 1;
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
}
.la-event-type {
  font-size: 18px;
  line-height: 1;
}

/* ─── Demo Mode skip (Next →) ─── */
.demo-next-btn {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 60;
  background: rgba(255, 214, 0, 0.92);
  color: var(--blue-dark);
  font-weight: 800;
  font-size: 16px;
  padding: 12px 22px;
  border-radius: 22px;
  min-height: 44px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  border: none;
  display: none;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
}
.demo-next-btn.visible { display: inline-flex; align-items: center; }
.demo-next-btn:active { transform: translateY(1px) scale(0.97); }
/* Make it look unobtrusive on the dark bedtime theme too */
.chapter.theme-bedtime ~ .demo-next-btn,
body:has(.chapter.theme-bedtime) .demo-next-btn {
  background: rgba(255, 214, 0, 0.85);
}

/* ─── Celebration overlay ─── */
.celebration-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 71, 161, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 200;
  padding: 32px;
  text-align: center;
  overflow: hidden;
}
.celebration-overlay.visible { display: flex; }
.celeb-icon {
  font-size: 144px;
  line-height: 1;
  position: relative;
  z-index: 1;
  animation: celeb-pop 0.5s ease;
}
@keyframes celeb-pop {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}
.celeb-title {
  font-size: 56px;
  font-weight: 900;
  color: var(--yellow);
  margin-top: 24px;
  letter-spacing: -1px;
  text-shadow: 0 4px 12px rgba(0,0,0,0.4);
  position: relative;
  z-index: 1;
}
.celeb-text {
  font-size: 24px;
  font-weight: 700;
  color: white;
  margin-top: 16px;
  max-width: 90%;
  position: relative;
  z-index: 1;
}
#confetti-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  top: -20px;
  width: 14px;
  height: 14px;
  opacity: 0.95;
  animation: confetti-fall 3.5s linear forwards;
}
@keyframes confetti-fall {
  0%   { transform: translateY(-20px) rotate(0); opacity: 1; }
  100% { transform: translateY(120vh) rotate(720deg); opacity: 0; }
}

/* ─── Larger screens (wall-mounted tablet often landscape) ─── */
@media (min-width: 900px) {
  html, body { font-size: 24px; }
  .greeting-text { font-size: 64px; }
  .chapter-title { font-size: 40px; }
  .chapter-emoji { font-size: 64px; }
  .chore-name    { font-size: 26px; }
  .holding-title { font-size: 48px; }
  .day-complete .title { font-size: 52px; }
}

@media (min-width: 1280px) {
  .chapter { max-width: 880px; }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  .greeting-icon, .holding-icon { animation: none; }
  .chapter { animation: none; }
  .celeb-icon { animation: none; }
}
