/* ============================================
   HERUPU — mood-aware study app for kids
   Fresh aesthetic: warm, rounded, friendly
   ============================================ */

:root {
  /* Warm cozy palette */
  --bg-1: #FFF4E6;     /* warm cream */
  --bg-2: #FFE8D6;
  --bg-soft: #F4F1EA;  /* muted surface (e.g. focus background-sound off) */
  --ink:  #3D3550;     /* soft deep plum */
  --ink-soft: #7A6E8C;
  --ink-faint: #6F6683;  /* darkened so real text passes WCAG AA on cream */
  --card: #FFFFFF;
  --line: #F0E6DC;

  /* Hero teal — darkened so white text passes WCAG AA (4.48:1) */
  --teal:       #1E857A;
  --teal-dark:  #15625A;
  --teal-light: #C7EDE8;
  --teal-pale:  #E8F7F4;
  --teal-brand: #2A9488;   /* lighter, only for dark-on-light display text */

  /* Warm accents */
  --coral:      #FF8A5B;
  --coral-dark: #E86E3F;
  --coral-light:#FFD9C7;
  --sun:        #FFC94D;
  --sun-dark:   #E0AB2C;
  --pink:       #FF6B9D;
  --green:      #5FD18C;
  --green-dark: #3FB06C;
  --purple:     #B388FF;

  /* mood theme (set by JS) */
  --mood: #FFC94D;
  --mood-soft: #FFEBC2;

  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 36px;
  --r-pill: 999px;

  --f-round: 'Fredoka', system-ui, sans-serif;
  --f-body:  'Nunito', system-ui, sans-serif;

  --e-out: cubic-bezier(0.16, 1, 0.3, 1);
  --e-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

/* hidden attribute must beat display:flex on .owl-stage etc. */
[hidden] { display: none !important; }

.page {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 60% at 15% 10%, #FFE0C2 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 90% 85%, #FFD6E8 0%, transparent 55%),
    linear-gradient(160deg, #FFF6EC 0%, #FDEFE4 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px 20px 40px;
  font-family: var(--f-body);
  color: var(--ink);
}

/* ---------- Top bar ---------- */
.page-bar {
  width: min(1000px, 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.page-back, .page-restart {
  font: 700 13px/1 var(--f-body);
  color: var(--ink);
  background: rgba(255,255,255,0.7);
  border: none;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}
.page-back:hover, .page-restart:hover { background: #FFFFFF; }

.page-tag {
  font: 700 12px/1 var(--f-body);
  color: var(--ink-soft);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ---------- Tablet shell ---------- */
.tablet {
  width: min(1000px, 100%);
  aspect-ratio: 16 / 10.4;
  background: #2A2433;
  border-radius: 40px;
  padding: 16px;
  box-shadow:
    0 2px 0 rgba(255,255,255,0.1) inset,
    0 50px 100px -30px rgba(61, 53, 80, 0.5);
  position: relative;
}

.tablet-cam {
  position: absolute;
  top: 50%;
  left: 26px;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #15101C;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.05);
}

.app {
  width: 100%;
  height: 100%;
  border-radius: 26px;
  overflow: hidden;
  position: relative;
  background: var(--bg-1);
}

/* ---------- Ambient background ---------- */
.app-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  transition: background 1s var(--e-out);
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.5;
  transition: background 1.2s var(--e-out);
}
.bg-blob-1 { width: 320px; height: 320px; background: var(--mood-soft); top: -80px; left: -60px; animation: float1 22s ease-in-out infinite; }
.bg-blob-2 { width: 260px; height: 260px; background: var(--coral-light); bottom: -70px; right: -50px; animation: float2 28s ease-in-out infinite; }
.bg-blob-3 { width: 200px; height: 200px; background: var(--teal-light); top: 40%; left: 60%; animation: float1 32s ease-in-out infinite reverse; opacity: 0.35; }

@keyframes float1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(30px,-24px)} }
@keyframes float2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-28px,22px)} }

/* ---------- Progress ribbon ---------- */
.ribbon {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 16px 24px 0;
  z-index: 4;
}
.ribbon-track {
  height: 8px;
  background: rgba(61,53,80,0.1);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.ribbon-fill {
  height: 100%;
  width: 0%;
  background: var(--mood);
  border-radius: var(--r-pill);
  transition: width 0.6s var(--e-spring), background 0.6s var(--e-out);
}

/* ---------- Screens ---------- */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  align-items: safe center;
  justify-content: center;
  padding: 48px 56px;
  overflow-y: auto;
  z-index: 2;
}
.screen.is-active { display: flex; }

.screen.is-entering > * { animation: screen-in 0.55s var(--e-out) backwards; }
.screen.is-leaving { animation: screen-out 0.3s var(--e-out) forwards; }

@keyframes screen-in {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes screen-out {
  to { opacity: 0; transform: translateY(-12px); }
}

/* ---------- Layout helpers ---------- */
.stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 22px;
  max-width: 460px;
  width: 100%;
}
.stack--wide { max-width: 640px; }
.stack--breathe { gap: 18px; }

.owl-stage {
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
.owl-stage--lg { animation: owl-bob 5s ease-in-out infinite; }
.owl-stage--sm { transform-origin: bottom; }

@keyframes owl-bob {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---------- Typography ---------- */
.brand {
  font: 700 56px/1 var(--f-round);
  color: var(--teal-brand);
  margin: 0;
  letter-spacing: -0.01em;
}
.brand-sub {
  font: 500 18px/1.4 var(--f-body);
  color: var(--ink-soft);
  margin: 0;
  max-width: 30ch;
}

.q-title {
  font: 600 30px/1.15 var(--f-round);
  color: var(--ink);
  margin: 0;
}
.q-sub {
  font: 500 16px/1.4 var(--f-body);
  color: var(--ink-soft);
  margin: 0;
  max-width: 34ch;
}

/* ---------- Buttons (chunky, friendly) ---------- */
.btn {
  font: 600 18px/1 var(--f-round);
  border: none;
  border-radius: var(--r-pill);
  cursor: pointer;
  padding: 16px 36px;
  background: var(--teal);
  color: #FFFFFF;
  border-bottom: 5px solid var(--teal-dark);
  transition: transform 0.08s ease-out, border-bottom-width 0.08s ease-out, background 0.2s, opacity 0.2s;
  letter-spacing: 0.01em;
}
.btn:hover:not(:disabled) { background: var(--teal-dark); }
.btn:active:not(:disabled) { transform: translateY(3px); border-bottom-width: 2px; }
.btn:disabled { opacity: 0.4; cursor: default; }

.btn--xl { font-size: 20px; padding: 18px 44px; border-radius: var(--r-pill); }

.btn--ghost-lg {
  font: 600 18px/1 var(--f-round);
  background: #FFFFFF;
  color: var(--ink);
  border: 2px solid var(--line);
  border-bottom: 5px solid var(--line);
  border-radius: var(--r-pill);
  padding: 16px 36px;
  cursor: pointer;
  transition: transform 0.08s ease-out, border-bottom-width 0.08s ease-out;
}
.btn--ghost-lg:active { transform: translateY(3px); border-bottom-width: 2px; }

/* ---------- Speech bubble ---------- */
.bubble {
  position: relative;
  background: #FFFFFF;
  border-radius: 22px;
  padding: 18px 24px;
  font: 600 19px/1.4 var(--f-round);
  color: var(--ink);
  box-shadow: 0 8px 24px -10px rgba(61,53,80,0.25);
  max-width: 32ch;
}
.bubble::after {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  border: 10px solid transparent;
  border-bottom-color: #FFFFFF;
  border-top: 0;
}
.bubble--in { animation: bubble-pop 0.5s var(--e-spring) backwards 0.15s; }
@keyframes bubble-pop {
  from { opacity: 0; transform: scale(0.8) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.bubble--mini {
  font-size: 15px;
  padding: 12px 18px;
  max-width: 28ch;
}
.bubble--mini::after { display: none; }

/* ---------- Name input ---------- */
.name-input {
  font: 600 22px/1 var(--f-round);
  color: var(--ink);
  text-align: center;
  background: #FFFFFF;
  border: 3px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 24px;
  width: 100%;
  max-width: 320px;
  outline: none;
  transition: border-color 0.25s var(--e-out), box-shadow 0.25s;
}
.name-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 5px var(--teal-pale);
}
.name-input::placeholder { color: var(--ink-faint); font-weight: 500; }

/* ---------- Moods ---------- */
.moods {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.mood {
  background: #FFFFFF;
  border: 3px solid transparent;
  border-radius: var(--r-lg);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  min-width: 92px;
  box-shadow: 0 6px 18px -10px rgba(61,53,80,0.3);
  transition: transform 0.2s var(--e-spring), border-color 0.2s, box-shadow 0.2s;
  animation: mood-in 0.5s var(--e-spring) backwards;
}
.moods .mood:nth-child(1){animation-delay:.05s}
.moods .mood:nth-child(2){animation-delay:.1s}
.moods .mood:nth-child(3){animation-delay:.15s}
.moods .mood:nth-child(4){animation-delay:.2s}
.moods .mood:nth-child(5){animation-delay:.25s}
@keyframes mood-in { from{opacity:0;transform:translateY(14px) scale(0.9)} to{opacity:1;transform:translateY(0) scale(1)} }

.mood:hover {
  transform: translateY(-6px);
  border-color: var(--m);
  box-shadow: 0 14px 28px -12px var(--m);
}
.mood.is-picked {
  border-color: var(--m);
  background: var(--m);
  transform: translateY(-6px) scale(1.05);
}
.mood.is-picked .mood-name { color: #2A2433; font-weight: 700; }

.mood-face {
  font-size: 40px;
  line-height: 1;
  transition: transform 0.25s var(--e-spring);
}
.mood:hover .mood-face { transform: scale(1.18) rotate(-4deg); }
.mood-name {
  font: 600 13px/1 var(--f-round);
  color: var(--ink);
}

/* ---------- Breathe ---------- */
.breathe-circle {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.breathe-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, var(--teal-light) 0%, transparent 70%);
  animation: breathe-scale 14s var(--e-out) infinite;
}
.breathe-orb {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--teal) 0%, var(--teal-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font: 600 17px/1.2 var(--f-round);
  text-align: center;
  box-shadow: 0 16px 40px -12px var(--teal-dark);
  animation: breathe-scale 14s var(--e-out) infinite;
}
@keyframes breathe-scale {
  0% { transform: scale(0.7); }   /* in starts */
  28% { transform: scale(1.1); }  /* hold */
  64% { transform: scale(1.1); }  /* exhale starts */
  100% { transform: scale(0.7); }
}

/* ---------- Subjects ---------- */
.subjects {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
}
.subj {
  aspect-ratio: 1 / 1.08;
  background: var(--c);
  border: none;
  border-bottom: 6px solid var(--cd);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  color: #FFFFFF;
  transition: transform 0.18s ease-out, border-bottom-width 0.1s;
  animation: mood-in 0.5s var(--e-spring) backwards;
}
.subjects .subj:nth-child(1){animation-delay:.05s}
.subjects .subj:nth-child(2){animation-delay:.12s}
.subjects .subj:nth-child(3){animation-delay:.19s}
.subjects .subj:nth-child(4){animation-delay:.26s}
.subj:hover { transform: translateY(-5px); }
.subj:active { transform: translateY(2px); border-bottom-width: 2px; }
.subj { color: var(--ct, #FFFFFF); }
.subj-emoji { font-size: 44px; line-height: 1; filter: drop-shadow(0 3px 5px rgba(0,0,0,0.18)); }
.subj-name { font: 700 18px/1 var(--f-round); color: var(--ct, #FFFFFF); }

/* ---------- Quiz ---------- */
.quiz {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.quiz-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.quiz-back {
  font: 700 12px/1 var(--f-body);
  color: var(--ink-soft);
  background: rgba(255,255,255,0.7);
  border: none;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.quiz-back:hover { background: #FFFFFF; color: var(--ink); }
.quiz-step {
  font: 700 13px/1 var(--f-body);
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: auto;
}
.quiz-hearts { display: flex; gap: 4px; }
.heart {
  font-size: 20px;
  color: var(--coral);
  transition: transform 0.3s var(--e-spring), color 0.3s;
}
.heart.is-lost { color: var(--line); transform: scale(0.8); }

.quiz-q {
  font: 600 28px/1.2 var(--f-round);
  color: var(--ink);
  margin: 0;
  text-align: center;
}
.quiz-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.opt {
  background: #FFFFFF;
  border: 3px solid var(--line);
  border-bottom: 5px solid var(--line);
  border-radius: var(--r-md);
  padding: 22px 12px;
  font: 600 22px/1 var(--f-round);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.1s ease-out, border-color 0.2s, background 0.2s;
}
.opt:hover:not(.is-done) { border-color: var(--teal); transform: translateY(-2px); }
.opt:active:not(.is-done) { transform: translateY(2px); border-bottom-width: 2px; }
.opt.is-correct {
  background: var(--green);
  border-color: var(--green-dark);
  color: #FFFFFF;
  animation: pop 0.4s var(--e-spring);
}
.opt.is-wrong {
  background: var(--coral-light);
  border-color: var(--coral);
  color: var(--coral-dark);
  animation: shake 0.4s ease;
}
@keyframes pop { 50% { transform: scale(1.08); } }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)} }

.quiz-owl {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

/* ---------- Result ---------- */
.result-stars {
  display: flex;
  gap: 10px;
}
.result-stars .star {
  font-size: 48px;
  color: var(--line);
  transform: scale(0);
}
.result-stars .star.is-on {
  color: var(--sun);
  animation: star-pop 0.5s var(--e-spring) forwards;
}
.result-stars .star:nth-child(1).is-on { animation-delay: 0.1s; }
.result-stars .star:nth-child(2).is-on { animation-delay: 0.3s; }
.result-stars .star:nth-child(3).is-on { animation-delay: 0.5s; }
@keyframes star-pop { 0%{transform:scale(0) rotate(-30deg)} 70%{transform:scale(1.3) rotate(8deg)} 100%{transform:scale(1) rotate(0)} }

/* ---------- Recap ---------- */
.recap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 380px;
}
.recap-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FFFFFF;
  border-radius: var(--r-md);
  padding: 14px 18px;
  box-shadow: 0 6px 16px -10px rgba(61,53,80,0.25);
  font: 600 15px/1.3 var(--f-round);
  color: var(--ink);
  animation: mood-in 0.5s var(--e-spring) backwards;
}
.recap-row:nth-child(1){animation-delay:.1s}
.recap-row:nth-child(2){animation-delay:.25s}
.recap-row:nth-child(3){animation-delay:.4s}
.recap-emoji { font-size: 28px; line-height: 1; }
.recap-label { color: var(--ink-soft); font-weight: 500; font-size: 13px; }
.recap-val { margin-left: auto; font-weight: 700; }

/* ---------- Page hint ---------- */
.page-hint {
  font: 600 13px/1.4 var(--f-body);
  color: var(--ink-soft);
  text-align: center;
  margin: 0;
}

/* ---------- Accessibility: focus rings ---------- */
.btn:focus-visible,
.btn--ghost-lg:focus-visible,
.mood:focus-visible,
.subj:focus-visible,
.opt:focus-visible,
.page-back:focus-visible,
.page-restart:focus-visible,
.name-input:focus-visible {
  outline: 3px solid var(--teal-brand);
  outline-offset: 3px;
}
/* Keep keyboard focus visible even on coloured cards */
.subj:focus-visible { outline-color: #2A2433; }
.mood:focus-visible { outline-offset: 4px; }

/* ---------- Accessibility: reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .bg-blob, .owl-stage--lg, .breathe-glow, .breathe-orb { animation: none !important; }
  .breathe-orb { transform: scale(1); }
  .screen.is-active { display: flex; }
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .tablet { aspect-ratio: auto; height: 600px; }
  .screen { padding: 32px 24px; }
  .subjects { grid-template-columns: repeat(2, 1fr); }
  .quiz-options { grid-template-columns: repeat(3, 1fr); }
  .brand { font-size: 40px; }
  .q-title { font-size: 24px; }
  .moods { gap: 8px; }
  .mood { min-width: 72px; padding: 12px 8px; }
  .mood-face { font-size: 32px; }
}

/* ============================================
   COMPLETE PRODUCT — new components
   ============================================ */

/* page tools */
.page-tools { display: flex; gap: 8px; align-items: center; }
.page-tool {
  font: 700 12px/1 var(--f-body);
  color: var(--ink);
  background: rgba(255,255,255,0.7);
  border: none; padding: 9px 14px; border-radius: var(--r-pill);
  cursor: pointer; transition: background 0.2s;
}
.page-tool:hover { background: #FFFFFF; }

/* read-aloud floating button */
.read-btn {
  position: absolute; top: 16px; right: 18px; z-index: 6;
  width: 44px; height: 44px; border-radius: 50%;
  background: #FFFFFF; border: 2px solid var(--line);
  font-size: 18px; cursor: pointer;
  box-shadow: 0 6px 16px -8px rgba(61,53,80,0.3);
  transition: transform 0.15s var(--e-spring);
}
.read-btn:hover { transform: scale(1.08); }
.read-btn:active { transform: scale(0.94); }

/* link button (soft text action) */
.link-btn {
  background: none; border: none; cursor: pointer;
  font: 700 15px/1 var(--f-round); color: var(--teal-dark);
  padding: 10px 16px; border-radius: var(--r-pill);
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.link-btn:hover { background: rgba(42,148,136,0.1); }

/* name chips (owl suggestions) */
.name-suggestions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.chip {
  font: 600 16px/1 var(--f-round); color: var(--ink);
  background: #FFFFFF; border: 2px solid var(--line); border-bottom: 4px solid var(--line);
  border-radius: var(--r-pill); padding: 12px 22px; cursor: pointer;
  transition: transform 0.12s var(--e-spring), border-color 0.2s, background 0.2s;
}
.chip:hover { border-color: var(--teal); transform: translateY(-2px); }
.chip:active { transform: translateY(2px); border-bottom-width: 2px; }
.chip.is-on { background: var(--teal); color: #FFFFFF; border-color: var(--teal); border-bottom-color: var(--teal-dark); }
.name-input--sm { max-width: 260px; font-size: 18px; padding: 14px 20px; }

/* coping grid */
.coping-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; width: 100%; max-width: 480px; }
.cope {
  background: var(--c); color: var(--ct); border: none; border-bottom: 6px solid var(--cd);
  border-radius: var(--r-lg); padding: 20px 16px; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  transition: transform 0.16s ease-out, border-bottom-width 0.1s;
  animation: mood-in 0.5s var(--e-spring) backwards;
}
.coping-grid .cope:nth-child(1){animation-delay:.05s}
.coping-grid .cope:nth-child(2){animation-delay:.12s}
.coping-grid .cope:nth-child(3){animation-delay:.19s}
.coping-grid .cope:nth-child(4){animation-delay:.26s}
.cope:hover { transform: translateY(-4px); }
.cope:active { transform: translateY(2px); border-bottom-width: 2px; }
.cope-emoji { font-size: 34px; line-height: 1; }
.cope-name { font: 700 18px/1 var(--f-round); }
.cope-sub { font: 600 12px/1.2 var(--f-body); opacity: 0.92; }

/* move */
.move-controls { display: flex; gap: 12px; }

/* kind thought card */
.kind-card {
  background: #FFFFFF; border-radius: var(--r-lg);
  padding: 28px 32px; font: 600 24px/1.35 var(--f-round); color: var(--ink);
  box-shadow: 0 10px 30px -14px rgba(61,53,80,0.3); max-width: 30ch; text-align: center;
  border-bottom: 5px solid var(--teal-light);
}
.kind-actions { display: flex; gap: 12px; align-items: center; }

/* worry */
.worry-done { display: flex; flex-direction: column; align-items: center; gap: 18px; }

/* hint button */
.hint-btn {
  background: var(--sun); color: #5C3D00; border: none; border-bottom: 3px solid var(--sun-dark);
  border-radius: var(--r-pill); padding: 9px 18px; font: 700 13px/1 var(--f-round); cursor: pointer;
  margin-top: 8px; transition: transform 0.1s ease-out;
}
.hint-btn:active { transform: translateY(2px); border-bottom-width: 1px; }

/* quiz progress dots */
.quiz-progress { display: flex; gap: 6px; justify-content: center; }
.qdot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); transition: all 0.3s var(--e-spring); }
.qdot.is-done { background: var(--green); }
.qdot.is-current { background: var(--ink); transform: scale(1.25); }

/* quiz helper layout */
.quiz-helper { display: flex; gap: 14px; align-items: center; justify-content: center; }
.quiz-helper-bubble {
  background: #FFFFFF; border-radius: 18px; padding: 14px 18px;
  box-shadow: 0 6px 18px -10px rgba(61,53,80,0.25); max-width: 36ch; position: relative;
}
.quiz-helper-bubble::after { content:""; position:absolute; left:-8px; top:50%; transform:translateY(-50%); border:8px solid transparent; border-right-color:#FFFFFF; border-left:0; }
.quiz-feedback { font: 600 15px/1.4 var(--f-round); color: var(--ink); margin: 0; }

/* celebrate */
.sticker-pop {
  width: 130px; height: 130px; border-radius: 36px;
  background: #FFFFFF; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 18px 44px -16px rgba(61,53,80,0.35);
  animation: sticker-bounce 0.7s var(--e-spring) backwards 0.1s;
}
.sticker-emoji { font-size: 72px; line-height: 1; animation: sticker-spin 0.7s var(--e-spring) backwards 0.2s; }
@keyframes sticker-bounce { 0%{transform:scale(0) rotate(-20deg)} 60%{transform:scale(1.15) rotate(8deg)} 100%{transform:scale(1) rotate(0)} }
@keyframes sticker-spin { from{transform:rotate(-40deg) scale(0.5)} to{transform:rotate(0) scale(1)} }

.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti-bit {
  position: absolute; top: -10%; width: 10px; height: 14px; border-radius: 2px;
  animation: confetti-fall 1.6s ease-in forwards;
}
@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(420px) rotate(360deg); opacity: 0; }
}

/* reflect */
.reflect-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; width: 100%; max-width: 480px; }
.reflect-opt {
  background: #FFFFFF; border: 2px solid var(--line); border-bottom: 4px solid var(--line);
  border-radius: var(--r-md); padding: 18px 16px; cursor: pointer;
  font: 600 15px/1.3 var(--f-round); color: var(--ink); text-align: center;
  transition: transform 0.14s var(--e-spring), border-color 0.2s, background 0.2s;
}
.reflect-opt:hover { border-color: var(--teal); transform: translateY(-3px); }
.reflect-opt.is-on { background: var(--teal); color: #FFFFFF; border-color: var(--teal); border-bottom-color: var(--teal-dark); }

/* done actions */
.done-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; }

/* sticker book */
.sticker-book { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; width: 100%; max-width: 540px; }
.sticker-slot {
  aspect-ratio: 1; border-radius: 18px; background: rgba(255,255,255,0.5);
  border: 2px dashed var(--line); display: flex; align-items: center; justify-content: center;
  font-size: 34px;
}
.sticker-slot.is-filled {
  background: #FFFFFF; border: 2px solid var(--line); border-bottom: 4px solid var(--line);
  box-shadow: 0 6px 16px -10px rgba(61,53,80,0.25);
  animation: sticker-bounce 0.5s var(--e-spring) backwards;
}

/* ============================================
   OVERLAYS (grown-up + settings sheets)
   ============================================ */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(42,35,51,0.45); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: overlay-in 0.25s ease-out;
}
@keyframes overlay-in { from{opacity:0} to{opacity:1} }
.sheet {
  background: var(--bg-1); border-radius: 28px; padding: 32px;
  width: min(460px, 100%); max-height: 86vh; overflow-y: auto; position: relative;
  box-shadow: 0 40px 80px -20px rgba(42,35,51,0.5);
  animation: sheet-in 0.35s var(--e-spring);
}
@keyframes sheet-in { from{transform:translateY(30px) scale(0.96);opacity:0} to{transform:translateY(0) scale(1);opacity:1} }
.sheet-close {
  position: absolute; top: 16px; right: 16px; width: 44px; height: 44px;
  border-radius: 50%; border: none; background: rgba(61,53,80,0.08);
  font-size: 16px; cursor: pointer; color: var(--ink);
}
.sheet-close:hover { background: rgba(61,53,80,0.16); }
.sheet-eyebrow { font: 700 12px/1 var(--f-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal-brand); }
.sheet-title { font: 600 26px/1.15 var(--f-round); color: var(--ink); margin: 8px 0 6px; }
.sheet-note { font: 500 14px/1.4 var(--f-body); color: var(--ink-soft); margin: 0 0 20px; }

.gu-section { margin-bottom: 20px; }
.gu-label { font: 700 11px/1 var(--f-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); display: block; margin-bottom: 10px; }
.gu-moodrow { display: flex; gap: 8px; }
.gu-dot { width: 30px; height: 30px; border-radius: 50%; box-shadow: 0 3px 8px -3px rgba(61,53,80,0.3); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; line-height: 1; }
.gu-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.gu-chip { font: 700 13px/1 var(--f-round); background: #FFFFFF; padding: 8px 14px; border-radius: var(--r-pill); color: var(--ink); box-shadow: 0 3px 8px -4px rgba(61,53,80,0.2); }
.gu-tip { font: 600 15px/1.45 var(--f-round); color: var(--ink); margin: 0; background: var(--teal-pale); padding: 14px 18px; border-radius: 16px; }
.gu-privacy { font: 600 12px/1.5 var(--f-body); color: var(--ink-soft); margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }

/* settings switches */
.setting-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.setting-row span { font: 500 15px/1.3 var(--f-body); color: var(--ink); }
.setting-row small { color: var(--ink-soft); font-size: 12px; }
.switch {
  appearance: none; width: 52px; height: 30px; border-radius: 999px;
  background: var(--line); position: relative; cursor: pointer; flex-shrink: 0;
  transition: background 0.25s var(--e-out);
}
.switch::after { content:""; position:absolute; top:3px; left:3px; width:24px; height:24px; border-radius:50%; background:#FFFFFF; box-shadow:0 2px 6px rgba(0,0,0,0.2); transition:left 0.25s var(--e-spring); }
.switch:checked { background: var(--teal); }
.switch:checked::after { left: 25px; }

/* ============================================
   SETTINGS-DRIVEN BODY CLASSES
   ============================================ */
/* Bigger text: zoom each screen's centered content. The screen scrolls (overflow-y:auto + safe
   center), so taller content never clips. Scales ALL text + UI proportionally — not a fragile,
   incomplete selector list that missed buttons, the planner, focus, recap, settings, etc. */
body.big-text .stack { zoom: 1.14; }
body.big-text .flow-badge, body.big-text .parent-badge { zoom: 1.14; }

/* Easy-read font: force the accessible typeface across the whole app. Most elements set their own
   font-family via the `font:` shorthand, so a single inherited rule isn't enough — override on every
   descendant. Lexend is loaded in <head> and chosen for reading proficiency. */
body.dys-font, body.dys-font * { font-family: 'Lexend', var(--f-round) !important; }
body.dys-font .q-title, body.dys-font .q-sub, body.dys-font .bubble, body.dys-font .kind-card { letter-spacing: 0.012em; }

body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}
body.reduce-motion .bg-blob, body.reduce-motion .owl-stage--lg,
body.reduce-motion .breathe-glow, body.reduce-motion .breathe-orb { animation: none !important; }

/* responsive additions */
@media (max-width: 760px) {
  .coping-grid, .reflect-grid { grid-template-columns: 1fr; }
  .sticker-book { grid-template-columns: repeat(4, 1fr); }
  .page-tools { flex-wrap: wrap; }
  .quiz-helper { flex-direction: column; }
  .quiz-helper-bubble::after { display: none; }
}

/* ============================================
   CHILD-FRIENDLY POLISH — bouncier, rounder, sparkly
   ============================================ */

/* Rounder everything */
:root {
  --r-md: 22px;
  --r-lg: 30px;
  --r-xl: 40px;
}

/* Floating decorations behind the app */
.deco { position: absolute; pointer-events: none; z-index: 1; opacity: 0.85; user-select: none; }
.deco-star { font-size: 22px; animation: twinkle 3.5s ease-in-out infinite; }
.deco-1 { top: 12%; left: 8%; animation-delay: 0s; }
.deco-2 { top: 22%; right: 10%; font-size: 16px; animation-delay: 0.8s; }
.deco-3 { bottom: 16%; left: 12%; font-size: 18px; animation-delay: 1.5s; }
.deco-4 { bottom: 24%; right: 8%; font-size: 26px; animation-delay: 2.2s; }
.deco-5 { top: 46%; left: 4%; font-size: 14px; animation-delay: 1.1s; }
@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.6; }
  50% { transform: scale(1.25) rotate(15deg); opacity: 1; }
}

/* Main CTA gets a gentle idle breathing wiggle to invite the tap */
.btn--xl { animation: cta-breathe 2.6s ease-in-out infinite; }
@keyframes cta-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}
.btn--xl:active { animation: none; }

/* Springier press on all tappables */
.btn:active:not(:disabled),
.mood:active, .cope:active, .subj:active, .reflect-opt:active, .chip:active, .opt:active:not(.is-done) {
  transform: scale(0.93) !important;
}

/* Mood faces bob happily */
.mood-face { animation: face-bob 3s ease-in-out infinite; }
.moods .mood:nth-child(2) .mood-face { animation-delay: 0.3s; }
.moods .mood:nth-child(3) .mood-face { animation-delay: 0.6s; }
.moods .mood:nth-child(4) .mood-face { animation-delay: 0.9s; }
.moods .mood:nth-child(5) .mood-face { animation-delay: 1.2s; }
.moods .mood:nth-child(6) .mood-face { animation-delay: 1.5s; }
@keyframes face-bob { 0%,100%{transform:translateY(0) rotate(0)} 50%{transform:translateY(-4px) rotate(-3deg)} }

/* Hover wiggle on cards */
.mood:hover, .cope:hover, .subj:hover { animation: card-wiggle 0.5s ease-in-out; }
@keyframes card-wiggle {
  0%,100%{ }
  25% { transform: translateY(-6px) rotate(-1.5deg); }
  75% { transform: translateY(-6px) rotate(1.5deg); }
}

/* Bigger, chunkier headings for little readers */
.brand { font-size: 64px; }
.q-title { font-size: 33px; font-weight: 700; }
.bubble { font-size: 21px; border-radius: 26px; }

/* Tap sparkle particles */
.spark {
  position: fixed; z-index: 999; pointer-events: none;
  width: 12px; height: 12px; font-size: 12px; line-height: 1;
  animation: spark-fly 0.7s ease-out forwards;
}
@keyframes spark-fly {
  0% { transform: translate(0,0) scale(0.4) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(180deg); opacity: 0; }
}

/* sound toggle in settings inherits .setting-row */

/* reduce-motion kills the playful loops too */
body.reduce-motion .btn--xl,
body.reduce-motion .mood-face,
body.reduce-motion .deco-star { animation: none !important; }

/* ============================================
   PIVOT — parent setup, homework, planner, focus
   ============================================ */

/* parent badges */
.parent-badge {
  font: 700 11px/1 var(--f-body); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--teal-dark); background: var(--teal-pale); padding: 8px 16px; border-radius: var(--r-pill);
}
.flow-badge {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 3;
  font: 700 12px/1 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 7px 16px; border-radius: var(--r-pill);
  background: var(--teal-pale); color: var(--teal-dark);
}
.flow-badge--parent { background: #ECE7F7; color: #5B4E8C; }

/* parent forms */
.form-field-stack { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 340px; text-align: left; }
.field-label { font: 700 12px/1 var(--f-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.age-row { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.age-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.age-chip {
  width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line); border-bottom: 4px solid var(--line);
  background: #FFFFFF; font: 700 17px/1 var(--f-round); color: var(--ink); cursor: pointer;
  transition: transform 0.12s var(--e-spring), border-color 0.2s, background 0.2s;
}
.age-chip:hover { border-color: var(--teal); }
.age-chip.is-on { background: var(--teal); color: #FFFFFF; border-color: var(--teal); border-bottom-color: var(--teal-dark); }

.step-row-c { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }

/* subject pick (parent) */
.subj-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; max-width: 540px; }
.subj-chip {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: #FFFFFF; border: 2.5px solid var(--line); border-radius: var(--r-md);
  padding: 14px 8px; font: 700 13px/1 var(--f-round); color: var(--ink); cursor: pointer;
  transition: transform 0.12s var(--e-spring), border-color 0.2s, box-shadow 0.2s; opacity: 0.6;
}
.subj-chip span { font-size: 26px; }
.subj-chip:hover { opacity: 1; }
.subj-chip.is-on { opacity: 1; border-color: var(--c); box-shadow: 0 6px 16px -8px var(--c); }

/* parental limits */
.limit-card { background: #FFFFFF; border-radius: var(--r-lg); padding: 20px 24px; width: 100%; max-width: 420px; box-shadow: 0 6px 18px -12px rgba(61,53,80,0.3); }
.limit-head { display: flex; justify-content: space-between; align-items: center; font: 700 15px/1 var(--f-round); color: var(--ink); margin-bottom: 14px; }
.limit-val { color: var(--teal-dark); }
.limit-slider { width: 100%; accent-color: var(--teal); height: 6px; }
.limit-ends { display: flex; justify-content: space-between; font: 600 11px/1 var(--f-body); color: var(--ink-faint); margin-top: 6px; }
.limit-toggles { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 420px; }
.limit-toggle { display: flex; justify-content: space-between; align-items: center; background: #FFFFFF; border-radius: var(--r-md); padding: 14px 18px; font: 600 14px/1.2 var(--f-round); color: var(--ink); box-shadow: 0 4px 12px -10px rgba(61,53,80,0.25); }

.handoff-privacy { font: 600 12px/1.5 var(--f-body); color: var(--ink-soft); background: var(--teal-pale); padding: 12px 18px; border-radius: 16px; max-width: 40ch; }

/* homework yes/no */
.yesno { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; }

/* homework subject pick (kid) */
.hw-subjects { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hw-subj {
  display: flex; align-items: center; gap: 8px; background: #FFFFFF;
  border: 2.5px solid var(--line); border-bottom: 5px solid var(--line); border-radius: var(--r-pill);
  padding: 14px 22px; font: 700 16px/1 var(--f-round); color: var(--ink); cursor: pointer;
  transition: transform 0.12s var(--e-spring), border-color 0.2s;
}
.hw-subj span { font-size: 22px; }
.hw-subj:hover { border-color: var(--c); }
.hw-subj.is-on { border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, #FFFFFF); }

.hw-when { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.due-chips { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.due-chip {
  background: #FFFFFF; border: 2px solid var(--line); border-bottom: 4px solid var(--line);
  border-radius: var(--r-pill); padding: 12px 22px; font: 700 15px/1 var(--f-round); color: var(--ink); cursor: pointer;
  transition: transform 0.12s var(--e-spring), border-color 0.2s, background 0.2s;
}
.due-chip:hover { border-color: var(--sun-dark); }
.due-chip.is-on { background: var(--sun); border-color: var(--sun-dark); border-bottom-color: var(--sun-dark); color: #5C3D00; }

.hw-smart { display: flex; align-items: center; gap: 12px; background: var(--teal-pale); border-radius: var(--r-md); padding: 14px 20px; font: 600 15px/1.45 var(--f-round); color: var(--ink); max-width: 44ch; }
.hw-smart-owl { font-size: 26px; }

/* plan */
.plan-list { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 540px; }
.plan-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #FFFFFF; border-radius: var(--r-md); padding: 14px 18px; box-shadow: 0 6px 16px -12px rgba(61,53,80,0.25); flex-wrap: wrap; }
.plan-task { display: flex; align-items: center; gap: 12px; }
.plan-task span:first-child { font-size: 28px; }
.plan-task strong { display: block; font: 700 16px/1.1 var(--f-round); color: var(--ink); }
.plan-task small { font: 600 12px/1 var(--f-body); color: var(--ink-soft); }
.plan-days { display: flex; gap: 6px; }
.plan-day { background: #F5F0FF; border: 2px solid transparent; border-radius: var(--r-pill); padding: 11px 16px; min-height: 44px; display: inline-flex; align-items: center; font: 700 13px/1 var(--f-round); color: var(--ink); cursor: pointer; transition: all 0.15s var(--e-out); }
.plan-day.is-suggested { border-color: var(--teal-light); background: var(--teal-pale); }
.plan-day.is-on { background: var(--teal); color: #FFFFFF; border-color: var(--teal-dark); }

/* planner week */
/* Planner stack breaks out of the default 640px so the whole real week fits on a tablet. */
[data-screen="planner"] .stack { max-width: 1060px; }
.week { display: flex; gap: 10px; width: 100%; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x proximity; justify-content: safe center; }
.day-col { flex: 0 0 auto; width: 118px; background: rgba(255,255,255,0.55); border-radius: var(--r-lg); padding: 10px; min-height: 168px; border: 2px solid transparent; scroll-snap-align: start; }
.day-col.is-today { background: #FFFFFF; border-color: var(--teal-light); box-shadow: 0 8px 20px -14px rgba(61,53,80,0.3); }
.day-col--next { background: rgba(255,255,255,0.4); border: 2px dashed var(--line); }
.day-head { font: 700 13px/1.2 var(--f-round); color: var(--ink); text-align: center; padding: 4px 0 12px; }
.day-col.is-today .day-head { color: var(--teal-dark); }
.day-date { display: block; font: 700 11px/1 var(--f-body); color: var(--ink-faint); margin-top: 4px; }
.day-col.is-today .day-date { color: var(--teal); }
.day-body { display: flex; flex-direction: column; gap: 8px; }
.day-empty { text-align: center; color: var(--ink-faint); font: 600 12px/1 var(--f-body); padding: 14px 0; opacity: 0.65; }
.task-chip {
  display: flex; align-items: center; gap: 8px; background: #FFFFFF;
  border: 2px solid var(--line); border-bottom: 4px solid var(--c, var(--line)); border-radius: var(--r-md);
  padding: 12px 12px; font: 700 14px/1 var(--f-round); color: var(--ink); cursor: pointer;
  transition: transform 0.14s var(--e-spring), box-shadow 0.2s;
}
.task-chip:hover { transform: translateY(-3px); box-shadow: 0 8px 16px -10px var(--c); }
.task-emoji { font-size: 20px; }
.task-name { flex: 1; text-align: left; }
.task-chip.is-done { opacity: 0.55; cursor: default; }
.task-check { color: var(--green-dark); font-weight: 800; }
.planner-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; }

/* focus session */
.focus-top { display: flex; align-items: center; justify-content: center; gap: 10px; }
.focus-tag { font: 700 12px/1 var(--f-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-dark); background: var(--teal-pale); padding: 8px 16px; border-radius: var(--r-pill); }
.focus-sound { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--teal-light); background: #FFFFFF; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.14s var(--e-spring), background 0.2s; }
.focus-sound:hover { transform: translateY(-2px); }
.focus-sound:not(.is-on) { opacity: 0.5; background: var(--bg-soft, #f4f1ea); border-color: var(--line); }
.focus-orb { position: relative; width: 200px; height: 200px; display: flex; align-items: center; justify-content: center; }
.focus-ring { position: absolute; inset: 0; }
.focus-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.focus-ring-bg { fill: none; stroke: var(--teal-light); stroke-width: 8; }
.focus-ring-fill { fill: none; stroke: var(--teal); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 0.12s linear; }
.focus-orb.is-break .focus-ring-fill { stroke: var(--green, #5FD18C); }
.focus-owl { position: relative; z-index: 2; }
.focus-pomo { font: 700 12px/1 var(--f-body); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-faint); }
.focus-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; }

/* grown-up hw chips */
.gu-hw { display: flex; gap: 8px; flex-wrap: wrap; }
.gu-hw .gu-chip { border: 2px solid var(--line); }

@media (max-width: 760px) {
  .subj-pick { grid-template-columns: repeat(3, 1fr); }
  .day-col { width: 108px; }
  .plan-row { justify-content: center; }
}

/* HW List (live capture) */
.hw-list { display: flex; flex-direction: column; gap: 8px; }
.hw-list-items { display: flex; flex-direction: column; gap: 8px; }
.hw-list-item {
  display: flex; justify-content: space-between; align-items: center;
  background: #FFFFFF; border: 2px solid var(--c, var(--line)); border-radius: 12px;
  padding: 12px 14px; gap: 12px;
  box-shadow: 0 4px 12px -10px rgba(61,53,80,0.2);
}
.hw-list-item-main { display: flex; align-items: center; gap: 10px; flex: 1; }
.hw-list-emoji { font-size: 22px; }
.hw-list-info { display: flex; flex-direction: column; gap: 2px; }
.hw-list-info strong { font: 700 15px/1 var(--f-round); color: var(--ink); }
.hw-list-info small { font: 600 12px/1 var(--f-body); color: var(--ink-soft); }
.hw-list-acts { display: flex; gap: 6px; }
.hw-list-btn {
  background: transparent; border: none; cursor: pointer; font-size: 16px;
  min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  opacity: 0.6; transition: opacity 0.2s;
}
.hw-list-btn:hover { opacity: 1; }

/* ============================================
   Calm "Today" hub — Foku-style warmth, Herupu tokens, no pressure mechanics
   ============================================ */
.today-hero {
  width: 100%; max-width: 480px; text-align: center; position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 22px 18px 18px; border-radius: var(--r-xl);
  background: radial-gradient(120% 90% at 50% 0%, var(--teal-light) 0%, var(--teal-pale) 58%, var(--bg-1) 100%);
}
.today-hero .recap { margin-top: 2px; }
[data-today-greet] { outline: none; }            /* programmatic focus, no stray ring */
.today-list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; width: 100%; }
.today-list:empty { display: none; }
.today-cta-sub { margin-top: -4px; }
/* Accessibility: child-facing tap targets >= 44px on the hub */
[data-screen="today"] .task-chip { min-height: 44px; }
[data-screen="today"] .link-btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
/* Planner back-link to the hub (top-left, >= 44px target) */
.planner-back { align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; }
/* worry-result buttons (was missing a rule, fell back to block stacking) */
.worry-choices { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; }
/* Fit the hub into the short landscape tablet: scroll if needed, tighten, stat cards side-by-side */
[data-screen="today"] { justify-content: flex-start; overflow-y: auto; padding-top: 26px; padding-bottom: 26px; }
[data-screen="today"] .stack--wide { gap: 14px; }
[data-screen="today"] .today-hero { padding-top: 16px; padding-bottom: 12px; gap: 10px; }
[data-screen="today"] .recap { flex-direction: row; gap: 10px; max-width: 480px; }
[data-screen="today"] .recap-row { flex: 1; animation: none; text-align: left; }
@media (max-width: 760px) {
  .today-hero { padding: 16px 14px 14px; }
  [data-screen="today"] .recap { flex-direction: column; }
}

