:root {
  --sand: #F3EEE4;
  --sand-2: #E8F0EC;
  --card: #FFFBF6;
  --card-2: #F7F1E8;
  --ink: #2C3A38;
  --ink-soft: #5C6E6A;
  --line: rgba(44, 58, 56, 0.08);
  --teal: #3A9B8F;
  --teal-2: #5BB8A8;
  --teal-deep: #2A7A70;
  --peach: #F0A07A;
  --peach-2: #F6C4A8;
  --sage: #8FBC9A;
  --lavender: #C5B4E3;
  --coral: #E07A6A;
  --sun: #E8C36A;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 8px 24px rgba(44, 58, 56, 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --font: "Nunito", "Tajawal", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; background: var(--sand-2); color: var(--ink); font-family: var(--font); }
body { overflow: hidden; }
img { max-width: 100%; display: block; }
button, input, textarea { font-family: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.screen {
  position: absolute; inset: 0;
  overflow: auto; overflow-x: hidden;
  background: var(--sand-2); color: var(--ink);
  -webkit-overflow-scrolling: touch;
}
.screen button, .screen .pebble, .caregiver-bar, .hub-tile, .pin-key {
  user-select: none; -webkit-user-select: none;
}
button:focus-visible, .pebble:focus-visible, .hub-tile:focus-visible {
  outline: 3px solid var(--teal-2);
  outline-offset: 2px;
}

/* Boot */
.screen-boot {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #E8F0EC 0%, #F3EEE4 100%);
  color: var(--ink);
}
.boot-fox { width: 148px; height: 148px; object-fit: contain; filter: drop-shadow(0 12px 24px rgba(58,155,143,.18)); }
.boot-title { font-size: 34px; letter-spacing: -0.02em; margin: 16px 0 4px; font-weight: 800; color: var(--teal-deep); }
.boot-sub { margin: 0; color: var(--ink-soft); font-size: 15px; }
.boot-dots { display: flex; gap: 8px; margin-top: 28px; }
.boot-dots span {
  width: 8px; height: 8px; border-radius: 50%; background: var(--teal);
  animation: bootPulse 1.2s var(--ease) infinite;
}
.boot-dots span:nth-child(2) { animation-delay: .15s; background: var(--peach); }
.boot-dots span:nth-child(3) { animation-delay: .3s; background: var(--sun); }
@keyframes bootPulse { 0%,100% { transform: translateY(0); opacity:.45 } 50% { transform: translateY(-5px); opacity:1 } }

/* Shared chrome */
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px 8px;
}
.icon-btn {
  width: 48px; height: 48px; border: 0; border-radius: 14px;
  background: var(--card); color: var(--ink);
  box-shadow: var(--shadow); display: grid; place-items: center;
  cursor: pointer; transition: transform 120ms ease-out;
}
.icon-btn:active { transform: scale(0.97); }
.icon-btn svg { width: 22px; height: 22px; }
.top-title { flex: 1; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; margin: 0; color: var(--ink); }
.top-sub { margin: 0; font-size: 13px; color: var(--ink-soft); }

.pebble {
  border: 0; border-radius: var(--radius);
  background: var(--card); color: var(--ink);
  box-shadow: var(--shadow);
  cursor: pointer; transition: transform 120ms ease-out, box-shadow 200ms var(--ease);
  min-height: 64px;
}
.pebble:active { transform: scale(0.97); }
.pebble.pressed { transform: scale(0.96); }

.speak-chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 16px; border: 0; border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), var(--teal-2));
  color: #F7FFFC; font-weight: 800; font-size: 15px; cursor: pointer;
  box-shadow: 0 8px 18px rgba(58,155,143,.28);
}
.speak-chip:active { transform: scale(0.97); }
.speak-chip.ghost {
  background: var(--card); color: var(--teal-deep);
  box-shadow: var(--shadow);
}

/* Onboarding */
.onboard {
  min-height: 100%;
  padding: 24px 20px 32px;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #F8DCC8 0%, #F3E6D8 32%, #E4EDE4 72%, #D4E5D8 100%);
  color: var(--ink);
}
.onboard-welcome {
  justify-content: center;
  align-items: center;
}
.onboard-mascot {
  position: relative;
  width: 200px;
  height: 196px;
  margin: 0 auto 28px;
  display: grid;
  place-items: center;
}
.onboard-mascot::before {
  content: "";
  position: absolute;
  width: 168px;
  height: 150px;
  background: var(--sage);
  opacity: 0.42;
  border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
  z-index: 0;
}
.onboard-mascot::after {
  content: "";
  position: absolute;
  width: 176px;
  height: 176px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 196, 168, 0.9) 0%, rgba(240, 160, 122, 0.4) 44%, rgba(240, 160, 122, 0) 72%);
  z-index: 0;
}
.onboard-fox {
  width: 152px;
  height: 152px;
  object-fit: contain;
  margin: 0;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 10px 18px rgba(240, 160, 122, 0.28));
}
.onboard-pebble {
  width: 100%;
  max-width: 400px;
  margin: 0 auto 28px;
  padding: 24px 22px 28px;
  background: rgba(255, 251, 246, 0.78);
  color: #3d4a4a;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 28px rgba(44, 58, 56, 0.06);
}
.onboard h1 { font-size: 28px; margin: 0 0 24px; letter-spacing: -0.02em; text-align: center; color: var(--ink); }
.onboard-pebble h1 { margin: 0 0 24px; }
.onboard .lead { text-align: center; color: #3d4a4a; font-size: 16px; line-height: 1.6; margin: 0 0 24px; }
.onboard .bilingual {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.onboard .bilingual .lead {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: #3d4a4a;
  font-weight: 500;
}
.onboard .bilingual .lead[dir="rtl"] {
  font-family: "Tajawal", sans-serif;
  font-size: 16px;
}
.disclaimer {
  background: var(--card); color: var(--ink);
  border-radius: var(--radius); padding: 16px;
  font-size: 14px; line-height: 1.65; color: var(--ink);
  border: 1px solid var(--line); margin-bottom: 16px;
}
.disclaimer strong { color: var(--teal-deep); }
.step-dots { display: flex; gap: 8px; justify-content: center; align-items: center; margin: 24px 0 0; }
.step-dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--sage); opacity: 0.55; display: block; }
.step-dots i.on { width: 20px; height: 8px; background: var(--peach); opacity: 1; }
.field-label {
  display: block; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 700; margin: 0 0 8px;
}
.text-input {
  width: 100%; min-height: 52px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-size: 18px; padding: 12px 16px;
  outline: none; transition: box-shadow 200ms var(--ease);
}
.text-input:focus { box-shadow: 0 0 0 3px rgba(58,155,143,.35); border-color: var(--teal); }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0 20px; }
.choice-grid.three { grid-template-columns: 1fr; }
.choice {
  min-height: 64px; border-radius: var(--radius); border: 2px solid transparent;
  background: var(--card); color: var(--ink); font-weight: 700; font-size: 16px;
  cursor: pointer; box-shadow: var(--shadow);
}
.choice.on { border-color: var(--teal); background: #E7F6F2; color: var(--teal-deep); }
.primary-btn {
  width: 100%; min-height: 56px; border: 0; border-radius: 16px;
  background: linear-gradient(135deg, var(--teal), var(--teal-2));
  color: #F7FFFC; font-weight: 800; font-size: 18px; cursor: pointer;
  box-shadow: 0 10px 22px rgba(58,155,143,.28);
  margin-top: auto;
}
.primary-btn:active { transform: scale(0.97); }
.onboard .primary-btn {
  width: 100%;
  max-width: 320px;
  margin-top: 0;
  margin-inline: auto;
  align-self: center;
  border-radius: 20px;
  box-shadow: 0 8px 16px rgba(58, 155, 143, 0.28);
}
.onboard .primary-btn:active {
  background: linear-gradient(135deg, var(--teal-deep), var(--teal));
}
.primary-btn:disabled { opacity: .45; cursor: default; transform: none; }
.ghost-btn {
  width: 100%; min-height: 48px; border: 0; background: transparent; color: var(--ink-soft);
  font-weight: 700; cursor: pointer; margin-top: 8px;
}

/* Home */
.home {
  min-height: 100%;
  background: linear-gradient(180deg, #DCEEE8 0%, #F3EEE4 38%, #F3EEE4 100%);
  color: var(--ink);
  padding: 8px 16px 88px;
}
.home-hero { display: flex; align-items: center; gap: 12px; padding: 8px 4px 12px; }
.home-fox { width: 92px; height: 92px; object-fit: contain; flex-shrink: 0; }
.home-hi { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin: 0; color: var(--ink); }
.home-note { margin: 4px 0 0; color: var(--ink-soft); font-size: 14px; line-height: 1.45; }
.hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hub-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; min-height: 108px; padding: 14px 8px;
  border: 0; border-radius: 20px; cursor: pointer;
  background: var(--card); color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 120ms ease-out;
}
.hub-tile:active { transform: scale(0.97); }
.hub-tile .emoji { font-size: 32px; line-height: 1; }
.hub-tile .lbl { font-size: 15px; font-weight: 800; text-align: center; letter-spacing: -0.01em; color: var(--ink); }
.hub-tile .sub { font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.hub-tile.wide { grid-column: 1 / -1; min-height: 76px; flex-direction: row; gap: 12px; }
.hub-tile.teal { background: linear-gradient(160deg, #E7F6F2, #FFFBF6); }
.hub-tile.peach { background: linear-gradient(160deg, #FDE8DC, #FFFBF6); }
.hub-tile.sun { background: linear-gradient(160deg, #F8EDC8, #FFFBF6); }
.hub-tile.lav { background: linear-gradient(160deg, #EDE6F8, #FFFBF6); }
.hub-tile.sage { background: linear-gradient(160deg, #E3F2E6, #FFFBF6); }
.hub-tile.coral { background: linear-gradient(160deg, #F8E0DC, #FFFBF6); }
.parent-nub {
  position: absolute; top: 10px; inset-inline-end: 12px;
  width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: rgba(255,251,246,.55); color: var(--ink-soft);
  font-size: 14px; cursor: pointer;
}

/* AAC */
.aac { display: flex; flex-direction: column; height: 100%; background: #EAF3EF; color: var(--ink); }
.sentence {
  margin: 0 16px 8px; min-height: 72px; padding: 8px;
  background: var(--card); color: var(--ink);
  border-radius: 16px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 8px;
}
.sentence-track {
  flex: 1; display: flex; gap: 6px; overflow-x: auto; min-height: 56px; align-items: center;
  padding: 4px;
}
.strip-chip {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 56px; height: 56px; border-radius: 12px; background: #E7F6F2; color: var(--ink);
  font-size: 11px; font-weight: 800; padding: 4px;
}
.strip-chip .se { font-size: 18px; }
.strip-empty { color: var(--ink-soft); font-size: 14px; padding-inline-start: 8px; font-weight: 600; }
.cats {
  display: flex; gap: 8px; padding: 4px 16px 10px; overflow-x: auto;
}
.cat-btn {
  flex-shrink: 0; min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px;
  background: rgba(255,251,246,.7); color: var(--ink-soft); font-weight: 800; font-size: 14px; cursor: pointer;
}
.cat-btn.on { background: var(--teal); color: #F7FFFC; }
.aac-grid {
  flex: 1; overflow: auto; padding: 0 16px 88px;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
}
.aac-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-height: 96px; padding: 8px 4px; border: 0; border-radius: 16px;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow); cursor: pointer;
}
.aac-card:active { transform: scale(0.96); }
.aac-card .ae { font-size: 28px; line-height: 1; }
.aac-card .aw { font-size: 12px; font-weight: 800; text-align: center; line-height: 1.2; color: var(--ink); }
.aac-card .aa { font-size: 11px; color: var(--ink-soft); font-weight: 700; text-align: center; }
.aac-card.want { background: #F3FBFA; }
.aac-card.need { background: #FFF6F0; }
.aac-card.feel { background: #F6F2FC; }
.aac-card.urgent { background: #FFF1EE; }
.aac-card.custom img { width: 44px; height: 44px; object-fit: cover; border-radius: 10px; }

/* Pain */
.pain { min-height: 100%; background: linear-gradient(180deg, #F8E8E4, #F3EEE4); color: var(--ink); padding-bottom: 88px; }
.pain-stage { position: relative; width: min(320px, 78vw); margin: 8px auto 12px; }
.pain-stage img { width: 100%; height: auto; user-select: none; pointer-events: none; }
.hotspot {
  position: absolute; border: 0; background: rgba(224,122,106,.0); border-radius: 50%;
  cursor: pointer;
}
.hotspot.on { background: rgba(224,122,106,.38); box-shadow: 0 0 0 4px rgba(224,122,106,.25); }
.pain-msg {
  text-align: center; font-size: 20px; font-weight: 800; margin: 8px 16px;
  min-height: 48px; color: var(--ink);
}
.pain-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px; }

/* Need */
.need { min-height: 100%; padding: 0 16px 96px; background: #EAF3EF; color: var(--ink); }
.need-hint { text-align: center; color: var(--ink-soft); font-size: 14px; margin: 0 8px 12px; line-height: 1.5; }
.need-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.need-card {
  min-height: 108px; border: 0; border-radius: 20px; background: var(--card); color: var(--ink);
  box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; font-weight: 800;
}
.need-card .ne { font-size: 32px; }
.need-card .nw { font-size: 16px; color: var(--ink); }
.need-card .na { font-size: 13px; color: var(--ink-soft); }
.need-confirm {
  background: var(--card); color: var(--ink); border-radius: 20px; padding: 24px 16px;
  text-align: center; box-shadow: var(--shadow);
}
.need-confirm .big { font-size: 56px; line-height: 1; }
.need-confirm h2 { margin: 8px 0 4px; font-size: 24px; color: var(--ink); }

/* Games shared */
.game {
  min-height: 100%; display: flex; flex-direction: column;
  color: var(--ink);
}
.scene {
  position: relative; flex: 1; min-height: 220px; overflow: hidden;
  border-bottom-left-radius: 28px; border-bottom-right-radius: 28px;
}
.scene img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tray {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding: 12px 16px 88px;
}
.tray-item {
  min-height: 84px; border: 0; border-radius: 16px; background: var(--card); color: var(--ink);
  box-shadow: var(--shadow); cursor: pointer; font-weight: 800; font-size: 13px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.tray-item img { width: 40px; height: 40px; object-fit: contain; }
.float-obj {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  width: min(46vw, 180px); height: min(46vw, 180px); object-fit: contain;
  filter: drop-shadow(0 16px 20px rgba(20,40,50,.25));
  pointer-events: none;
}
.game-prompt {
  position: absolute; left: 16px; right: 16px; bottom: 16px;
  background: rgba(255,251,246,.92); color: var(--ink);
  border-radius: 16px; padding: 12px 14px; text-align: center;
  font-weight: 800; font-size: 18px;
  box-shadow: var(--shadow);
}

/* Jump */
.jump-sky {
  background: linear-gradient(180deg, #1B3350 0%, #3D5A80 42%, #F0A07A 100%);
  color: #F7FFFC;
}
.moon {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 72px; height: 72px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #FFF6D6, #E8C36A);
  box-shadow: 0 0 40px rgba(232,195,106,.55);
}
.jumper {
  position: absolute; left: 50%; bottom: 18%;
  width: 88px; height: 88px; transform: translateX(-50%);
  object-fit: contain; filter: drop-shadow(0 10px 10px rgba(0,0,0,.25));
}
.jump-hud {
  position: absolute; top: 12px; inset-inline-start: 12px;
  background: rgba(27,51,80,.55); color: #F7FFFC;
  border-radius: 12px; padding: 8px 12px; font-weight: 800; font-size: 14px;
  max-width: 42%;
}
.jump-hud b { font-size: 20px; display: block; }
.jump-controls {
  padding: 12px 16px 88px; display: grid; gap: 10px;
  background: #1B3350; color: #F7FFFC;
}
.jump-btn {
  min-height: 72px; border: 0; border-radius: 20px;
  background: linear-gradient(135deg, var(--peach), #F6C4A8);
  color: #3A2418; font-weight: 800; font-size: 20px; cursor: pointer;
}
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-row[dir="ltr"] { direction: ltr; }
.big-choice {
  min-height: 88px; border: 0; border-radius: 20px; font-weight: 800; font-size: 22px; cursor: pointer;
}
.big-choice.again { background: #E7F6F2; color: var(--teal-deep); }
.big-choice.stop { background: #FDE8DC; color: #7A3A28; }

/* Sound */
.sound-wrap {
  background: linear-gradient(180deg, #D9E8F2, #E8F0EC);
  color: var(--ink); min-height: 100%;
  display: flex; flex-direction: column; align-items: center;
  padding: 0 16px 88px;
}
.echo-img { width: 180px; height: 180px; object-fit: contain; margin-top: 8px; }
.wave { width: 100%; height: 72px; border-radius: 14px; background: rgba(255,251,246,.7); margin: 8px 0; }
.mic-btn {
  width: 84px; height: 84px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--teal), var(--teal-2));
  color: #F7FFFC; font-size: 28px; box-shadow: 0 10px 24px rgba(58,155,143,.3);
  margin: 8px 0;
}
.mic-btn.live { background: linear-gradient(135deg, var(--coral), var(--peach)); }
.sound-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.sound-chips button {
  min-height: 48px; padding: 0 14px; border: 0; border-radius: 999px;
  background: var(--card); color: var(--ink); font-weight: 800; cursor: pointer; box-shadow: var(--shadow);
}

/* Caregiver bar */
.caregiver-bar {
  position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 40;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  padding: 6px; border-radius: 14px;
  background: rgba(44, 58, 56, 0.72); color: #F4EFE6;
  backdrop-filter: blur(12px);
}
.cg-btn {
  min-height: 40px; border: 0; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,.1); color: #F4EFE6;
  font-size: 11px; font-weight: 800; letter-spacing: 0.02em;
}
.cg-btn:active { background: rgba(255,255,255,.22); }
.cg-btn.flash { background: var(--teal); color: #F7FFFC; }

/* Break */
.break-screen {
  min-height: 100%; padding: 16px 16px 40px;
  background: linear-gradient(180deg, #E4EDE8, #F3EEE4); color: var(--ink);
}
.break-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Parent gate */
.gate {
  min-height: 100%; padding: 28px 24px;
  background: #243330; color: #E8F0EC;
  display: flex; flex-direction: column; align-items: center;
}
.gate h1 { font-size: 22px; margin: 8px 0 4px; color: #E8F0EC; }
.gate p { color: #A8BDB8; text-align: center; }
.pin-display {
  display: flex; gap: 10px; margin: 18px 0 20px;
}
.pin-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid #5BB8A8; background: transparent;
}
.pin-dot.on { background: #5BB8A8; }
.pin-pad {
  display: grid; grid-template-columns: repeat(3, 72px); gap: 12px;
  direction: ltr;
}
.pin-key {
  width: 72px; height: 64px; border: 0; border-radius: 16px;
  background: #2F4440; color: #E8F0EC; font-size: 22px; font-weight: 800; cursor: pointer;
}
.pin-key:active { transform: scale(0.97); background: #3A9B8F; color: #F7FFFC; }

/* Parent */
.parent {
  min-height: 100%; background: #1E2A28; color: #E8F0EC;
  padding: 12px 16px 96px;
}
.parent h1, .parent h2, .parent h3 { color: #E8F0EC; }
.parent p, .parent li, .parent span, .parent label { color: #C5D5D1; }
.parent-tabs {
  display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 12px;
}
.parent-tabs button {
  flex-shrink: 0; min-height: 40px; padding: 0 12px; border: 0; border-radius: 999px;
  background: #2A3B38; color: #A8BDB8; font-weight: 800; font-size: 13px; cursor: pointer;
}
.parent-tabs button.on { background: linear-gradient(135deg, var(--teal), var(--teal-2)); color: #F7FFFC; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat {
  background: #2A3B38; color: #E8F0EC; border-radius: 14px; padding: 12px;
  border: 1px solid rgba(255,255,255,.06);
}
.stat b { display: block; font-size: 24px; color: #F7FFFC; letter-spacing: -0.02em; }
.stat span { font-size: 12px; color: #A8BDB8; font-weight: 700; }
.card-p {
  background: #2A3B38; color: #E8F0EC; border-radius: 16px; padding: 14px;
  border: 1px solid rgba(255,255,255,.06); margin: 12px 0;
}
.card-p h3 { margin: 0 0 8px; font-size: 15px; letter-spacing: -0.01em; color: #F7FFFC; }
.bar-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 12px; color: #C5D5D1; }
.bar-row em { flex: 0 0 92px; font-style: normal; font-weight: 700; color: #C5D5D1; }
.bar-track { flex: 1; height: 10px; background: #1E2A28; border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--teal), var(--teal-2)); }
.bar-fill.peach { background: linear-gradient(90deg, var(--peach), var(--sun)); }
.bar-fill.lav { background: linear-gradient(90deg, #8B7BB8, var(--lavender)); }
.insight { font-size: 14px; line-height: 1.55; margin: 8px 0; color: #D5E4E0; }
.insight:before { content: ""; }
.quick-log { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-log button {
  min-height: 44px; padding: 0 12px; border: 0; border-radius: 12px;
  background: #354844; color: #E8F0EC; font-weight: 700; font-size: 13px; cursor: pointer;
}
.mission {
  background: #354844; color: #E8F0EC; border-radius: 14px; padding: 12px; margin: 8px 0;
}
.mission h4 { margin: 0 0 6px; font-size: 15px; color: #F7FFFC; }
.mission p { margin: 0 0 10px; font-size: 13px; line-height: 1.5; color: #C5D5D1; }
.mission-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.mission-actions button {
  min-height: 40px; padding: 0 10px; border: 0; border-radius: 10px;
  background: #2A3B38; color: #E8F0EC; font-weight: 700; font-size: 12px; cursor: pointer;
}
.list-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 14px; color: #E8F0EC;
}
.badge { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal-2); }
.chart-box { position: relative; height: 220px; }
.parent .text-input { background: #2A3B38; color: #E8F0EC; border-color: rgba(255,255,255,.08); }
.parent .primary-btn { margin-top: 12px; }
.warn {
  background: #3A2A28; color: #F6C4A8; border-radius: 12px; padding: 12px; font-size: 13px; line-height: 1.5;
}
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; font-size: 14px; color: #E8F0EC;
}
.toggle {
  width: 48px; height: 28px; border-radius: 99px; border: 0; background: #1E2A28; position: relative; cursor: pointer;
}
.toggle.on { background: var(--teal); }
.toggle i {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #E8F0EC; transition: transform 180ms var(--ease);
}
.toggle.on i { transform: translateX(20px); }

.toast {
  position: absolute; left: 16px; right: 16px; bottom: 64px; z-index: 50;
  background: var(--ink); color: #F3EEE4; text-align: center;
  padding: 12px 16px; border-radius: 14px; font-weight: 700; font-size: 14px;
  box-shadow: var(--shadow);
}

.play-grid { padding: 8px 16px 88px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.copy-stage {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px; text-align: center;
}
.copy-emoji { font-size: 72px; line-height: 1; }
.copy-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 16px 88px; }

.phrase-card {
  margin: 24px 16px; background: var(--card); color: var(--ink);
  border-radius: 24px; padding: 28px 16px; text-align: center; box-shadow: var(--shadow);
}
.phrase-card .line { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; min-height: 40px; color: var(--ink); }
.yesno-pic { font-size: 80px; text-align: center; margin: 12px 0; }
.yesno-q { text-align: center; font-size: 22px; font-weight: 800; margin: 0 16px 16px; color: var(--ink); }

.skel { height: 14px; border-radius: 8px; background: linear-gradient(90deg, #2A3B38, #354844, #2A3B38); background-size: 200% 100%; animation: skel 1.2s ease infinite; }
@keyframes skel { 0% { background-position: 100% 0 } 100% { background-position: -100% 0 } }

@media (min-width: 720px) {
  .hub-grid, .aac-grid, .need-grid, .play-grid { max-width: 560px; margin-inline: auto; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .parent, .home, .onboard { max-width: 720px; margin-inline: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .boot-dots span { animation: none; }
}