/* Wonder Garden — Home Layout, Interactive Sub-Rooms & Caregiver Tools */

.home-world { padding-top: 6px; }

.welcome {
  display: grid; grid-template-columns: 1.35fr 1fr; align-items: center;
  min-height: 300px; padding: 36px 42px;
  border-radius: 30px; border: 1px solid #dce4cd;
  background: linear-gradient(115deg, #edf0df, #e4ebd9);
  box-shadow: 0 9px 0 #e4e9d870;
  position: relative; overflow: hidden; isolation: isolate;
}
.welcome::after {
  content: ""; position: absolute; left: 30%; right: -20%;
  height: 170px; bottom: -135px; background: #c5d3b5;
  border-radius: 50%; z-index: -1;
}
.eyebrow {
  display: block; font-size: 11px; letter-spacing: 1.8px; font-weight: 600; color: #6c7a5a;
}
.welcome h2 {
  font-size: clamp(36px, 5vw, 60px); font-weight: 500;
  line-height: 1.08; letter-spacing: -1.8px; margin: 14px 0 18px; color: #2d4c3e;
}
.welcome p {
  font-size: 16px; line-height: 1.65; margin: 0 0 20px; max-width: 34ch; color: #4c6656;
}
.welcome-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.welcome-tags span {
  padding: 8px 14px; background: #fafcf1; border: 1px solid #dae0ce;
  border-radius: 20px; font-size: 13px; font-weight: 500;
}

.pip-garden {
  height: 255px; position: relative;
  background: radial-gradient(ellipse at 50% 106%, #b9cea0 0 49%, transparent 49.5%);
  border-radius: 45%;
}
.pip-garden::after {
  content: "🌸"; position: absolute; right: 4px; bottom: 8px;
  font-size: 42px; transform: rotate(12deg);
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Autism Emoji', sans-serif;
}
.pip-garden .buddywrap {
  position: absolute; inset: 30px 0 0;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; margin: 0;
}
.pip-garden .buddy {
  height: 142px; width: 142px; background: #fff9e7;
  border: 8px solid #fffdf5; border-radius: 50%;
  box-shadow: 0 10px 0 #b0c190, 0 22px 28px #4d6a3d20;
  transition: transform 220ms ease;
}
.pip-garden .buddy:hover { transform: translateY(-5px) rotate(-3deg); }
.pip-garden .buddyface { width: 116px; height: 116px; display: block; }
.pip-garden .buddyface svg { width: 100%; height: 100%; }
.pip-garden .buddysay {
  font-size: 14px; padding: 8px 16px; background: #fff; border-radius: 20px;
}
.garden-sun {
  position: absolute; right: 22px; top: 2px; font-size: 44px;
  transform: rotate(12deg); filter: drop-shadow(2px 4px 0 #bfaa6740);
}
.garden-flower {
  position: absolute; bottom: 4px; left: 22px; font-size: 50px;
  transform: rotate(-15deg); filter: drop-shadow(2px 4px 0 #a0b47d50);
}

/* ---------- Hero Adventure Grid ---------- */
.adventure-grid {
  display: grid; grid-template-columns: 1.65fr 1fr; gap: 20px; margin: 24px 0 26px;
}
.path-feature, .room-feature {
  position: relative; border-radius: 26px; text-align: left; overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.path-feature {
  border: 1px solid #496c50;
  background: linear-gradient(120deg, #3b624a, #517559);
  box-shadow: 0 6px 0 #2c4c3a18;
  color: #fff; padding: 26px 28px;
  display: flex; flex-direction: column; align-items: flex-start;
}
.path-feature .eyebrow { color: #c7dbc0; }
.feature-title { display: block; font-size: 27px; margin: 10px 0 7px; line-height: 1.15; font-weight: 600; }
.feature-copy { font-size: 14px; color: #e1ebdb; max-width: 76%; line-height: 1.45; }
.feature-art { position: absolute; right: 20px; top: 44px; font-size: 72px; opacity: 0.88; }
.path-meter {
  height: 8px; background: #ffffff30; border-radius: 8px; width: 82%; margin-top: 22px; overflow: hidden;
}
.path-meter > span { display: block; background: #efd495; height: 100%; border-radius: 8px; transition: width 300ms ease; }
.feature-bottom {
  display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 12px; margin-top: 16px; font-size: 13px;
}
.feature-cta {
  background: #f6d994; color: #394b35; border-radius: 14px; padding: 10px 20px; font-size: 16px; font-weight: 600;
}
.room-feature {
  background: linear-gradient(120deg, #f2e1cf, #f6eadd);
  border: 1px solid #e8d6c1; box-shadow: 0 6px 0 #c6ad8f18;
  padding: 24px 26px; display: flex; flex-direction: column; align-items: flex-start; color: #5c4738;
}
.room-art { font-size: 58px; position: absolute; right: 20px; top: 20px; }
.room-feature .feature-title { margin-top: 32px; max-width: 68%; }
.room-feature > span:not(.room-art):not(.feature-title) { font-size: 14px; }
.room-feature strong { font-size: 14px; margin-top: 18px; font-weight: 600; }
.path-feature:hover, .room-feature:hover {
  transform: translateY(-3px);
  outline: 2px solid #617b4c; outline-offset: 3px;
}

/* ---------- Featured Wonder Invites ---------- */
.new-adventures {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0 0 28px;
}
.new-adventure {
  display: flex; align-items: center; gap: 16px; min-height: 136px; padding: 22px;
  text-align: left; border: 1px solid #dfd8ea; border-radius: 24px;
  background: #eee8f5; box-shadow: 0 6px 0 #d3c9df25;
  transition: transform 180ms ease;
}
.new-adventure:hover { transform: translateY(-3px); }
.new-icon {
  display: grid; place-items: center; width: 64px; min-width: 64px; height: 64px;
  border-radius: 20px; background: #ffffff85; font-size: 38px;
  transform: rotate(-6deg); box-shadow: 4px 5px 0 #9d87ad14;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Autism Emoji', sans-serif;
}
.new-adventure > span:last-child { display: flex; flex-direction: column; gap: 6px; }
.new-adventure small { font-size: 10px; letter-spacing: 0.08em; font-weight: 600; color: #786888; }
.new-adventure strong { font-size: 20px; font-weight: 600; line-height: 1.2; color: #5b4568; }
.new-adventure > span:last-child > span { font-size: 13px; line-height: 1.45; color: #756782; }

.pattern-invite { background: #f3eddc; border-color: #e8dfc7; }
.pattern-invite strong { color: #635733; }
.pattern-invite small, .pattern-invite > span:last-child > span { color: #7c7152; }

.nature-invite { background: #e3f0ec; border-color: #cde2dc; }
.nature-invite strong { color: #2f5b4f; }
.nature-invite small, .nature-invite > span:last-child > span { color: #4f766b; }

.recent-play {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; gap: 12px; text-align: left; padding: 16px 22px;
  border: 1px solid var(--line); border-radius: 18px; background: #fff;
  margin-bottom: 26px; font-size: 15px; box-shadow: 0 4px 12px #263e3708;
}
.recent-play strong { color: #3f6d54; font-weight: 600; }

/* ---------- Activity Grid & Filter Tabs ---------- */
.explore-heading {
  display: flex; justify-content: space-between; align-items: flex-end; margin: 32px 0 18px;
}
.explore-heading h2 { font-size: 30px; font-weight: 500; letter-spacing: -0.8px; margin: 6px 0 0; }
.tiny-note { font-size: 14px; color: #6e7b67; }

.activity-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.activity-tab {
  background: #fff; border: 1px solid var(--line); border-radius: 30px;
  padding: 10px 18px; font-size: 14px; font-weight: 500; min-height: 44px;
  transition: background-color 140ms ease, color 140ms ease;
}
.activity-tab[aria-pressed="true"] {
  background: #365b46; color: #fff; border-color: #365b46;
}

.activity-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
}
.activity-card {
  position: relative; border: 1px solid var(--line); border-radius: 24px;
  background: #fff; box-shadow: 0 5px 0 #dde3d030;
  transition: transform 180ms ease, box-shadow 180ms ease; overflow: hidden;
}
.activity-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 9px 0 #dde3d045, 0 14px 24px #344b3612;
}
.activity-open {
  padding: 24px; text-align: left; width: 100%; min-height: 204px;
  display: flex; align-items: flex-start; flex-direction: column;
}
.activity-icon {
  height: 64px; width: 64px; border-radius: 18px;
  display: grid; place-items: center; background: #eaf0e2;
  font-size: 35px; margin-bottom: 16px;
  transform: rotate(-4deg); box-shadow: 3px 4px 0 #b7c9a830;
}
.tone-create .activity-icon { background: #f5e3d9; box-shadow: 3px 4px 0 #e3c2ab40; }
.tone-play .activity-icon { background: #e6eaf6; box-shadow: 3px 4px 0 #bdc8dd40; }
.tone-care .activity-icon { background: #fbefd1; box-shadow: 3px 4px 0 #e4d19a40; }
.activity-name { font-size: 22px; line-height: 1.2; color: #344d3f; font-weight: 600; }
.activity-copy { font-size: 13px; line-height: 1.5; color: var(--ink-soft); margin-top: 6px; max-width: 22ch; }
.activity-arrow { position: absolute; right: 18px; bottom: 18px; color: #607557; font-size: 18px; }
.favorite-toggle {
  position: absolute; right: 8px; top: 8px; min-width: 44px; min-height: 44px;
  font-size: 24px; color: #64755d; border-radius: 50%;
}
.favorite-toggle[aria-pressed="true"] { color: #bd5e60; }
.empty-favorites { grid-column: 1 / -1; padding: 36px; text-align: center; background: #fff; border-radius: 20px; font-size: 16px; }

.gentle-banner {
  display: flex; align-items: center; gap: 20px; margin: 32px 0 8px;
  background: #efece2; border: 1px solid #e2dfd3; border-radius: 24px; padding: 22px 26px;
}
.gentle-banner > span { font-size: 42px; }
.gentle-banner h3 { margin: 0 0 4px; font-size: 20px; }
.gentle-banner p { margin: 0; font-size: 14px; color: var(--ink-soft); }
.gentle-banner button {
  margin-left: auto; background: #fff; border: 1px solid var(--line);
  border-radius: 30px; padding: 12px 20px; white-space: nowrap; font-size: 15px; font-weight: 600;
}

.caregiver-entry {
  display: block; padding: 16px 22px; margin: 24px auto 0;
  border: 1px dashed #b2bfa6; border-radius: 18px;
  font-size: 14px; color: #56694f; min-height: 48px; line-height: 1.5;
}
.caregiver-entry:hover { background: #f2f5eb; }

/* ---------- Sub-Mode Pill Bar (inside rooms) ---------- */
.mode-bar {
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
}
.mode-pill {
  padding: 10px 18px; min-height: 46px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 15px; font-weight: 600; color: var(--ink);
  box-shadow: 0 3px 8px #263e3708;
  transition: background-color 140ms ease, color 140ms ease, transform 120ms ease;
}
.mode-pill:hover { transform: translateY(-1px); }
.mode-pill[aria-pressed="true"] {
  background: var(--accent-2); color: #fff; border-color: var(--accent-2);
}

/* ---------- ABC Word Cards & Letter Tracing ---------- */
.abc-words {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px;
}
.abc-word-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 18px;
  background: var(--pressed); border: 1px solid var(--line);
  font-size: 18px; font-weight: 600;
}
.trace-wrap {
  display: grid; justify-items: center; gap: 12px;
}
.trace-canvas {
  width: min(100%, 340px); height: auto; aspect-ratio: 1;
  background: #fffdf8; border: 2px solid var(--line); border-radius: 26px;
  touch-action: none; box-shadow: var(--shadow); cursor: crosshair;
}

/* ---------- Color Mixing Lab ---------- */
.mixer-box {
  display: grid; gap: 16px; justify-items: center;
  padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow);
}
.mixer-pots {
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
}
.mixer-slot {
  width: 82px; height: 82px; border-radius: 50%;
  border: 3px dashed var(--line); display: grid; place-items: center;
  font-size: 28px; font-weight: 600; background: var(--paper);
  transition: transform 200ms ease, background-color 200ms ease;
}
.mixer-result {
  width: 104px; height: 104px; border-radius: 50%;
  border: 4px solid #fff; box-shadow: 0 6px 18px #263e3722, 0 0 0 2px var(--line);
  display: grid; place-items: center; font-size: 40px;
}

/* ---------- Shape Tangram Builder ---------- */
.tangram-box {
  display: grid; gap: 16px; justify-items: center;
  padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 28px;
}
.tangram-scene {
  width: min(100%, 340px); aspect-ratio: 1;
  background: #f5f8ef; border: 2px solid var(--line); border-radius: 24px;
  display: grid; place-items: center; padding: 16px;
}
.tangram-scene svg { width: 100%; height: 100%; }

/* ---------- Feelings Coping Cards ---------- */
.coping-box {
  display: grid; gap: 10px; width: 100%; max-width: 680px; margin-top: 8px;
}
.coping-title { font-size: 15px; font-weight: 600; color: var(--ink-soft); margin: 0; }
.coping-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px;
}
.coping-card {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: #f5f8ef; border: 1px solid var(--line);
  border-radius: 18px; font-size: 16px; font-weight: 500; text-align: left;
  transition: transform 120ms ease, background-color 120ms ease;
}
.coping-card:hover { background: var(--pressed); transform: translateY(-2px); }
.coping-card span:first-child { font-size: 28px; }

/* ---------- Story Garden & Story Shelf ---------- */
.room-kicker {
  font-size: 11px; letter-spacing: 0.14em; font-weight: 600; color: #6e7c5f;
  text-align: center; margin: 4px 0 8px;
}
.story-garden h2, .pattern-garden h2, .caregiver-panel h2, .nature-garden h2 {
  text-align: center; font-size: clamp(28px, 4vw, 40px); font-weight: 500;
  letter-spacing: -0.8px; margin: 0 0 8px;
}
.story-progress {
  text-align: center; color: #8c72a6; font-size: 22px; letter-spacing: 8px; margin: 12px 0;
}
.story-stage {
  text-align: center; padding: 28px 24px;
  background: #f5f0fa; border-radius: 26px; border: 1px solid #e2d7ec;
}
.story-picture {
  font-size: clamp(64px, 15vw, 88px); line-height: 1.3; margin: 4px 0 16px;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Autism Emoji', sans-serif;
}
.story-stage h3 { font-size: 25px; font-weight: 500; line-height: 1.4; margin: 0; }
.story-options {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 16px 0;
}
.story-choice {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  min-height: 146px; padding: 14px; background: #fff; border: 1px solid #ded5e6;
  border-radius: 22px; gap: 12px; box-shadow: 0 5px 0 #d6cae525;
  transition: transform 140ms ease, background-color 140ms ease;
}
.story-choice > span {
  font-size: 52px; line-height: 1.15;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Autism Emoji', sans-serif;
}
.story-choice strong { font-size: 17px; font-weight: 500; text-align: center; }
.story-choice:hover { background: #f7f1fd; border-color: #ac92c1; transform: translateY(-2px); }
.story-actions {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 14px 0 4px;
}
.story-actions .song { min-height: 52px; font-size: 17px; padding: 12px 22px; }
.finished-story {
  max-width: 640px; margin: 18px auto 6px !important;
  font-size: 21px; line-height: 1.75; color: #594a66; font-weight: 400;
}
.story-complete { font-size: clamp(48px, 12vw, 68px); letter-spacing: 8px; }
.story-shelf {
  display: grid; gap: 12px; margin-top: 16px;
}
.saved-story-card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 16px 20px; background: #fff; border: 1px solid #e2d7ec; border-radius: 20px;
}

/* ---------- Pattern Garden ---------- */
.pattern-levels { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.pattern-sequence {
  display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;
  background: #eef1e4; border: 1px solid #dbe3cf; padding: 28px 18px; border-radius: 25px;
}
.pattern-piece {
  display: grid; place-items: center; min-width: 74px; height: 88px; padding: 0 8px;
  font-size: 52px; background: #fffef8; border-radius: 18px;
  box-shadow: 0 5px 0 #c9d3b735;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Autism Emoji', sans-serif;
}
.pattern-piece.missing {
  font-family: Fredoka, system-ui, sans-serif;
  color: #6b7b55; background: #e1e8d5; border: 2px dashed #93a67b;
}
.pattern-prompt { text-align: center; font-size: 23px; margin: 14px 0 6px; font-weight: 600; }
.pattern-options { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.pattern-choice {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; min-width: 122px; min-height: 132px; padding: 14px;
  border: 1px solid #d8e1ce; background: #fff; border-radius: 22px;
  box-shadow: 0 5px 0 #dce3d540;
  transition: transform 140ms ease, background-color 140ms ease;
}
.pattern-choice > span {
  font-size: 48px; line-height: 1.15;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Autism Emoji', sans-serif;
}
.pattern-choice small { font-size: 16px; font-weight: 500; }
.pattern-choice:hover { background: #f4f8e9; border-color: #8fa873; transform: translateY(-2px); }
.pattern-feedback {
  text-align: center; color: #4d623b; font-size: 18px; line-height: 1.6;
  max-width: 640px; margin: 12px auto; min-height: 48px;
}
.pattern-next { display: block; margin: 0 auto; min-height: 52px; font-size: 17px; padding: 12px 24px; }

/* ---------- Nature & Weather Room ---------- */
.weather-window {
  position: relative; overflow: hidden;
  min-height: 270px; padding: 28px; border-radius: 28px; border: 2px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, #bfe6ff 0%, #e7f5d8 70%, #b7d396 70%, #9fc079 100%);
  transition: background 400ms ease; text-align: center;
}
.weather-window.sky-rain {
  background: linear-gradient(180deg, #8aa5b8 0%, #b8cad6 70%, #8fb077 70%, #75995e 100%);
}
.weather-window.sky-snow {
  background: linear-gradient(180deg, #cfe0ec 0%, #eef5f9 70%, #ffffff 70%, #dce7ef 100%);
}
.weather-window.sky-wind {
  background: linear-gradient(180deg, #b5dfee 0%, #dfeff5 70%, #b3cf8e 70%, #96b86e 100%);
}
.weather-window.sky-rainbow {
  background:
    radial-gradient(circle at 50% 72%, transparent 38%, #9b6dd645 39% 42%, #4d96ff45 42% 45%, #5cb86b45 45% 48%, #f3d34a55 48% 51%, #f08a2e50 51% 54%, #e15b5b50 54% 57%, transparent 58%),
    linear-gradient(180deg, #c2e9ff 0%, #eef9e3 70%, #b5d491 70%, #99be72 100%);
}
.weather-window.sky-night {
  background: linear-gradient(180deg, #1d2944 0%, #31446b 70%, #385244 70%, #293e33 100%);
  color: #fff;
}
.plant-spot {
  display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; align-items: flex-end;
  margin-top: 18px; z-index: 2;
}
.plant-pot {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 18px; background: #ffffffd8; color: var(--ink);
  border-radius: 22px; border: 2px solid #fff; min-width: 110px;
  box-shadow: 0 6px 16px #00000015;
}
.plant-pot .plant-stage { font-size: 52px; line-height: 1.1; }
.plant-pot small { font-size: 13px; font-weight: 600; color: var(--ink-soft); }

/* ---------- Caregiver Panel ---------- */
.caregiver-panel { max-width: 920px; margin: auto; }
.caregiver-intro {
  font-size: 15px; line-height: 1.75; color: #5c6e54;
  max-width: 650px; text-align: center; margin: 8px auto 24px;
}
.caregiver-summary {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px;
}
.caregiver-summary > div {
  border: 1px solid #dbe3ce; border-radius: 20px; background: #f4f5eb;
  display: flex; align-items: center; flex-direction: column; padding: 20px 14px; gap: 8px; text-align: center;
}
.caregiver-summary > div > span { font-size: 32px; }
.caregiver-summary strong { font-size: 26px; font-weight: 600; }
.caregiver-summary small { font-size: 13px; color: #617355; }
.caregiver-section { border-top: 1px solid #dce4d1; padding: 26px 0; }
.caregiver-section h3 { font-size: 24px; font-weight: 500; letter-spacing: -0.4px; margin: 0 0 10px; }
.caregiver-section p { font-size: 15px; line-height: 1.7; color: #5b6b53; max-width: 660px; margin: 0 0 14px; }
.caregiver-preferences { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.caregiver-panel .song { font-size: 15px; min-height: 50px; padding: 12px 20px; }

.custom-word-form {
  display: grid; grid-template-columns: 92px 1fr 1.4fr; gap: 16px; margin: 20px 0 16px; align-items: end;
}
.custom-word-form label { font-size: 13px; font-weight: 500; line-height: 1.6; min-width: 0; }
.custom-word-form input, .custom-word-form select {
  width: 100%; margin-top: 6px; background: #f7f8f1; border: 1px solid #cbd7be;
  border-radius: 12px; padding: 12px; min-height: 48px; font: inherit; font-size: 16px; color: #2f4628;
}
.custom-word-form select { font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Autism Emoji', sans-serif; }
.custom-word-form input:focus, .custom-word-form select:focus {
  outline: 3px solid #678558; outline-offset: 2px;
}
.custom-word-form button { grid-column: 2 / -1; justify-self: end; }
.custom-word-row {
  display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid #e0e7d6;
}
.custom-word-row > span { font-size: 30px; min-width: 40px; text-align: center; }
.custom-word-row > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.custom-word-row strong { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.custom-word-row small { font-size: 14px; color: #67775c; overflow-wrap: anywhere; }
.custom-word-row button {
  margin-left: auto; background: #edf0e5; border: 1px solid #d5dfc7;
  border-radius: 12px; min-height: 44px; padding: 10px 16px; font-size: 13px; font-weight: 500; flex-shrink: 0;
}
.caregiver-message { font-size: 15px; font-weight: 500; color: #3f662e; min-height: 24px; line-height: 1.6; }

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 900px) {
  .activity-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .new-adventures { grid-template-columns: 1fr; }
  .welcome { padding: 28px; }
  .adventure-grid { grid-template-columns: 1.35fr 1fr; }
  .story-options { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .top { padding: 18px 16px 10px; }
  .status { font-size: 14px; padding: 8px 14px; max-width: 100%; }
  .page { padding-left: 16px; padding-right: 16px; }
  .welcome { grid-template-columns: 1fr; padding: 24px 20px; gap: 16px; text-align: center; }
  .welcome p { margin-left: auto; margin-right: auto; }
  .welcome-tags { justify-content: center; }
  .pip-garden { height: 195px; }
  .pip-garden .buddy { width: 112px; height: 112px; }
  .pip-garden .buddyface { width: 92px; height: 92px; }
  .adventure-grid { grid-template-columns: 1fr; gap: 14px; }
  .activity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .activity-open { min-height: 188px; padding: 18px 16px; }
  .activity-name { font-size: 20px; }
  .activity-copy { font-size: 12px; }
  .caregiver-summary { grid-template-columns: 1fr; }
  .custom-word-form { grid-template-columns: 80px 1fr; }
  .custom-word-form label:nth-child(3) { grid-column: 1 / -1; }
  .custom-word-form button { grid-column: 1 / -1; width: 100%; }
  .gentle-banner { flex-wrap: wrap; padding: 18px; }
  .gentle-banner button { margin-left: 0; width: 100%; text-align: center; }
}

body.calm .welcome, body.calm .new-adventure, body.calm .story-stage, body.calm .pattern-sequence, body.calm .room-feature, body.calm .gentle-banner {
  background: #eae9e3; box-shadow: none;
}
body.calm .path-feature { background: #535f54; box-shadow: none; }
body.calm .activity-card, body.calm .story-choice, body.calm .pattern-piece { box-shadow: none; }
body.calm .activity-card:hover, body.calm .pip-garden .buddy:hover { transform: none; }
body.calm .activity-icon { box-shadow: none; transform: none; background: #e4e3dd; }
body.calm .pip-garden { background: #dce1d0; }
body.calm .pip-garden .buddy { box-shadow: 0 5px 0 #c6ccba; }


/* ---------- Autism-Friendly Sensory & Visual Supports (5yo Engagement Upgrade) ---------- */

/* Finger-tap sparkle feedback */
.tap-sparkle {
  position: fixed; pointer-events: none; z-index: 110;
  font-size: 26px; line-height: 1;
  transform: translate(-50%, -50%);
  animation: sparkle-rise 650ms ease-out forwards;
}
@keyframes sparkle-rise {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.6); }
  100% { opacity: 0; transform: translate(-50%, -125%) scale(1.35); }
}

/* Home Instant Play Strip: Mini Pop-It + Pip Hats */
.instant-play-strip {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px;
  margin: 18px 0 24px;
}
.mini-popit-card, .pip-hat-card {
  background: #fff; border: 2px solid var(--line); border-radius: 26px;
  padding: 18px 22px; box-shadow: 0 7px 0 #dce3d570;
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
}
.mini-popit-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.mini-popit-head strong { font-size: 19px; color: var(--ink); }
.mini-popit-row {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px;
}
.pop-bubble {
  aspect-ratio: 1; min-height: 46px; border-radius: 50%;
  background: var(--bcol, #ff6b6b);
  border: 4px solid #ffffffb5;
  box-shadow: inset 0 -6px 0 #00000022, 0 5px 0 #00000018;
  display: grid; place-items: center; font-size: 20px; color: #fff;
  transition: transform 110ms ease, box-shadow 110ms ease, filter 110ms ease;
}
.pop-bubble:hover { transform: scale(1.06); }
.pop-bubble.popped {
  transform: scale(0.86) translateY(3px);
  box-shadow: inset 0 6px 8px #00000040, 0 1px 0 #00000010;
  filter: brightness(0.84) saturate(0.85);
}

.pip-hat-row {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.hat-btn {
  min-width: 50px; min-height: 50px; padding: 6px 10px;
  border-radius: 16px; background: var(--paper); border: 2px solid var(--line);
  font-size: 26px; display: grid; place-items: center;
  box-shadow: 0 4px 0 #dce3d570;
  transition: transform 120ms ease;
}
.hat-btn[aria-pressed="true"] {
  background: #fff4d1; border-color: #e8b04b; transform: translateY(-2px);
}
.buddy-hat {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  font-size: 42px; line-height: 1; pointer-events: none; z-index: 3;
  filter: drop-shadow(0 3px 2px #00000018);
}

/* Giant Pop-It Board in Sensory Room */
.popit-board {
  display: grid; gap: 12px; max-width: 540px; margin: 0 auto; width: 100%;
  padding: 24px; background: #fff; border: 4px solid #d5dfd0; border-radius: 34px;
  box-shadow: 0 10px 0 #c6d3bc70;
}
.popit-grid-row {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px;
  padding: 8px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--rowcol) 22%, #fff);
}
.popit-grid-row .pop-bubble {
  min-height: 58px;
}

/* Spinning Gears & Pinwheels */
.gears-stage {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px; padding: 24px; background: var(--card); border: 2px solid var(--line); border-radius: 28px;
}
.gear-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 170px; padding: 18px; background: var(--paper);
  border: 2px solid var(--line); border-radius: 24px;
}
.gear-wheel {
  font-size: 76px; line-height: 1; display: inline-block;
  transition: transform 0.6s cubic-bezier(.2,.8,.3,1);
}

/* Starlight Fireworks Canvas */
.fireworks-canvas {
  width: 100%; height: auto; aspect-ratio: 16 / 10; display: block;
  background: linear-gradient(180deg, #161f38 0%, #26355c 100%);
  border-radius: 26px; border: 3px solid #3c4f7c; touch-action: none; cursor: pointer;
}

/* Line-It-Up Shelf (Autism Lining & Sorting Joy) */
.lineup-shelf {
  min-height: 130px; padding: 20px 18px 14px;
  background: linear-gradient(180deg, #f6f9f0 0 74%, #d8c39e 74% 86%, #b89b6c 86% 100%);
  border: 2px solid var(--line); border-radius: 26px;
  display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; justify-content: flex-start;
}
.lineup-item {
  display: flex; flex-direction: column; align-items: center;
  font-size: 46px; line-height: 1; padding: 4px 6px;
  background: #ffffffba; border-radius: 14px;
}
.lineup-item small {
  font-size: 13px; font-weight: 700; color: var(--ink); margin-top: 2px;
}

/* Train Builder & Track */
.train-track-wrap {
  position: relative; overflow-x: auto; padding: 28px 18px 22px;
  background: linear-gradient(180deg, #d7f0fb 0 65%, #b7d694 65% 84%, #826952 84% 100%);
  border: 2px solid var(--line); border-radius: 28px; min-height: 190px;
  display: flex; align-items: flex-end;
}
.train-consist {
  display: flex; align-items: flex-end; gap: 6px;
  transition: transform 1.4s cubic-bezier(.42,0,.58,1);
}
.train-consist.chugging {
  transform: translateX(260px);
}
.train-car {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 78px; height: 84px; padding: 8px 10px;
  background: var(--carcol, #e15b5b); color: #fff;
  border: 3px solid #fff; border-radius: 18px 18px 10px 10px;
  box-shadow: 0 6px 0 #263e3740; position: relative;
  font-size: 32px; font-weight: 700;
}
.train-car small { font-size: 12px; color: #fff; opacity: 0.95; }

/* First–Then Board & Visual Countdown Timer */
.first-then-board {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 24px; background: var(--card); border: 3px solid var(--accent-2); border-radius: 28px;
  box-shadow: var(--shadow);
}
.ft-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 190px; padding: 20px; border-radius: 24px;
  background: #f4f8ee; border: 2px dashed #8ca67a; text-align: center;
}
.ft-card.then-card { background: #fff7df; border-color: #e2b44c; }
.ft-badge {
  padding: 4px 14px; border-radius: 999px; background: var(--accent-2); color: #fff;
  font-size: 14px; font-weight: 700; letter-spacing: 0.08em;
}
.ft-card.then-card .ft-badge { background: #d48c1c; }
.ft-emoji { font-size: 68px; line-height: 1.05; }
.ft-label { font-size: 22px; font-weight: 600; }
.ft-arrow { font-size: 40px; color: var(--accent-2); font-weight: 700; }

.visual-timer-box {
  display: grid; gap: 16px; justify-items: center; text-align: center;
  padding: 26px; background: var(--card); border: 2px solid var(--line); border-radius: 28px;
}
.timer-bar-outer {
  width: 100%; max-width: 520px; height: 36px; border-radius: 999px;
  background: #e9eee2; border: 2px solid var(--line); overflow: hidden; padding: 4px;
}
.timer-bar-inner {
  height: 100%; width: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #5cb86b, #f3d34a, #f08a2e, #e15b5b);
  transition: width 0.95s linear;
}
.timer-readout { font-size: clamp(38px, 8vw, 56px); font-weight: 700; color: var(--accent-2); }

/* Extra tactile activity cards */
.activity-card {
  border-width: 2px;
  box-shadow: 0 7px 0 #d5dfd0;
}
.activity-icon {
  width: 72px; height: 72px; font-size: 40px;
}

@media (max-width: 720px) {
  .instant-play-strip { grid-template-columns: 1fr; }
  .mini-popit-row { grid-template-columns: repeat(4, 1fr); }
  .first-then-board { grid-template-columns: 1fr; }
  .ft-arrow { transform: rotate(90deg); }
  .popit-grid-row { gap: 8px; padding: 6px 8px; }
  .popit-grid-row .pop-bubble { min-height: 46px; }
}

/* ---------- Sign Language, SLP Speech Lab, Boowa Sorter/Mazes, Little Town & Orisinal Meadow ---------- */
.sign-card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px;
}
.sign-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 16px 12px; min-height: 150px; background: var(--card);
  border: 2px solid var(--line); border-radius: 22px; box-shadow: 0 5px 0 #dce3d570;
  text-align: center; transition: transform 140ms ease, border-color 140ms ease;
}
.sign-card:hover { transform: translateY(-3px); border-color: var(--accent-2); }
.sign-card .sign-hands { font-size: 46px; line-height: 1.05; }
.sign-card strong { font-size: 18px; color: var(--ink); }
.sign-card small { font-size: 12px; color: var(--ink-soft); line-height: 1.35; }

.mouth-cue-box {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: 999px; background: #fff5ea;
  border: 2px solid #f0cfb0; font-size: 16px; font-weight: 600; color: #7c4322;
}
.syllable-drums {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 10px 0;
}
.syl-beat {
  min-width: 96px; min-height: 86px; padding: 12px 16px;
  border-radius: 22px; background: #fff8e6; border: 3px solid #e6c26e;
  box-shadow: 0 6px 0 #d9b25955; display: grid; place-items: center;
  font-size: 22px; font-weight: 700; color: #5c4212;
  transition: transform 120ms ease, background-color 120ms ease;
}
.syl-beat.hit {
  background: #ffe08a; transform: scale(1.08) translateY(-3px); border-color: #c98a14;
}

/* Hide & Seek Spots */
.hideseek-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px;
}
.hideseek-spot {
  min-height: 155px; padding: 18px; border-radius: 26px;
  background: linear-gradient(180deg, #f3f8ec, #e4efe0);
  border: 3px solid #c8d9be; box-shadow: 0 6px 0 #b8ccb055;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  font-size: 56px; transition: transform 150ms ease;
}
.hideseek-spot:hover { transform: scale(1.03); }
.hideseek-spot small { font-size: 15px; font-weight: 600; color: var(--ink); }
.hideseek-spot.found { background: #fff9db; border-color: #e6b84c; }

/* Sorting Baskets */
.sorter-baskets {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 8px;
}
.sort-basket {
  min-height: 180px; padding: 20px; border-radius: 28px;
  background: var(--card); border: 3px dashed var(--accent-2);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 10px;
  box-shadow: var(--shadow); transition: transform 140ms ease, background-color 140ms ease;
}
.sort-basket:hover { transform: translateY(-2px); background: #f4f8ee; }
.sort-basket-title { font-size: 22px; font-weight: 700; }
.sort-basket-items { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; min-height: 48px; font-size: 34px; }

/* Stepping-Stone Maze */
.maze-board {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
  max-width: 520px; margin: 0 auto; width: 100%;
  padding: 20px; background: #edf5e6; border: 3px solid #c7d8b9; border-radius: 28px;
}
.maze-cell {
  aspect-ratio: 1; min-height: 58px; border-radius: 18px;
  background: #ffffff; border: 2px solid #d5e2c8;
  display: grid; place-items: center; font-size: 30px;
  transition: transform 120ms ease, background-color 120ms ease;
}
.maze-cell.path-cell { background: #fff8dc; border-color: #e2c56b; }
.maze-cell.visited { background: #cdebc5; border-color: #5ea854; transform: scale(1.04); }
.maze-cell.wall { background: #dce6d3; opacity: 0.75; }

/* Little Town & Craft Kitchen */
.town-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px;
}
.town-building {
  padding: 20px; min-height: 175px; border-radius: 26px;
  background: var(--card); border: 2px solid var(--line); box-shadow: 0 6px 0 #dce3d575;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  text-align: center; transition: transform 150ms ease;
}
.town-building:hover { transform: translateY(-3px); }
.town-building .town-icon { font-size: 56px; line-height: 1.05; }
.town-building strong { font-size: 19px; color: var(--ink); }
.town-building small { font-size: 13px; color: var(--ink-soft); }

.craft-plate {
  width: clamp(230px, 52vw, 310px); height: clamp(230px, 52vw, 310px);
  margin: 0 auto; border-radius: 50%; position: relative;
  display: grid; place-items: center;
  border: 10px solid #fff; box-shadow: 0 10px 28px #263e371a, 0 0 0 3px var(--line);
  transition: background 220ms ease;
}
.craft-topping {
  position: absolute; font-size: 36px; transform: translate(-50%, -50%);
  pointer-events: none; filter: drop-shadow(0 2px 3px #0000001f);
}

/* Orisinal Calm Meadow Canvas */
.meadow-canvas {
  width: 100%; max-width: 780px; height: auto; aspect-ratio: 16 / 10;
  margin: 0 auto; display: block;
  border-radius: 30px; border: 3px solid #d8e2dc;
  background: linear-gradient(180deg, #e8f1f5 0%, #f7ede2 65%, #d8e8d4 100%);
  box-shadow: 0 10px 28px #263e3712; touch-action: none; cursor: pointer;
}

/* Caregiver Milestone Checklist */
.milestone-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.milestone-list { display: grid; gap: 8px; margin-top: 10px; }
.milestone-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  font-size: 15px; cursor: pointer; text-align: left;
}
.milestone-item[aria-checked="true"] {
  background: #e9f3e6; border-color: #7ea874;
}
.milestone-check {
  width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--accent-2);
  display: grid; place-items: center; font-weight: 700; background: #fff; flex: none;
}
.milestone-item[aria-checked="true"] .milestone-check {
  background: var(--accent-2); color: #fff;
}
@media (max-width: 720px) {
  .sorter-baskets { grid-template-columns: 1fr; }
}
