/* =====================================================================
   Saul's Sunday School — styles
   Design rules that come straight from the spec (§13):
   · nothing punitive: no red X, no error-red anywhere on child screens
   · huge tap targets (min 56px), few choices per screen
   · younger tiers: round, bright, cartoonish. Older tiers: storybook,
     serif headings, calmer palette — no kiddy graphics for a 12-year-old
   · Urdu = RTL, so all layout uses logical properties
   ===================================================================== */
:root {
  --bg: #fdf6e9;
  --surface: #fffdf8;
  --surface-2: #fbf3e4;
  --ink: #3a352e;
  --ink-soft: #7a7267;
  --line: #ece2d0;
  --brand: #f2a13b;
  --brand-2: #577590;
  --good: #7bbf5a;
  --warm: #e6a0c8;
  --radius: 22px;
  --radius-s: 14px;
  --shadow: 0 2px 0 rgba(58, 53, 46, .07), 0 10px 26px rgba(58, 53, 46, .07);
  --tap: 56px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-read: "Sora", "Nunito", system-ui, sans-serif;
  --urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Nafees Web Naskh", "Segoe UI", system-ui, serif;
  --maxw: 760px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); color: var(--ink); background: var(--bg);
  min-height: 100dvh; line-height: 1.45; overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
html[dir="rtl"] body { font-family: var(--urdu); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { color: var(--brand-2); }
h1, h2, h3, h4 { margin: 0 0 .3em; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(24px, 6vw, 34px); }
h2 { font-size: clamp(19px, 4.6vw, 25px); }
h3 { font-size: clamp(16px, 3.8vw, 19px); }
p { margin: 0 0 .8em; }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 3px; border-radius: 8px; }

/* ---------- skins per tier ---------- */
body[data-skin="young"] { --radius: 30px; --tap: 64px; --brand: #f9a03f; --bg: #fff4e2; }
body[data-skin="young"] h1, body[data-skin="young"] h2 { font-size: clamp(26px, 8vw, 40px); font-weight: 900; }
body[data-skin="mid"]   { --radius: 22px; --brand: #e08a3c; --bg: #fbf6ec; }
body[data-skin="old"]   { --radius: 14px; --tap: 52px; --brand: #b9762a; --brand-2: #2f5d7c; --bg: #f7f3ea; --surface: #fffdf9;
                          --font: "Inter", system-ui, sans-serif; }
body[data-skin="old"] h1, body[data-skin="old"] h2, body[data-skin="old"] .para { font-family: "EB Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif; font-weight: 600; letter-spacing: 0; }
body[data-skin="old"] .btn { border-radius: 10px; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-rows: auto 1fr auto; min-height: 100dvh; }
.screen { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 14px 16px calc(96px + env(safe-area-inset-bottom)); }
body[data-route="onboard"] .screen { padding-bottom: 24px; }

.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  padding: calc(8px + env(safe-area-inset-top)) 14px 10px;
  background: linear-gradient(180deg, var(--brand), color-mix(in srgb, var(--brand) 80%, #fff 0%));
  color: #2f2717; box-shadow: 0 6px 18px rgba(58, 53, 46, .12);
}
body[data-skin="old"] .topbar { background: #2f3b45; color: #f3ece0; }
body[data-skin="old"] .topbar .top-sub { color: #c9d4dc; }
body[data-skin="old"] .topbar .top-name { color: #fff; }
.top-mid { flex: 1; min-width: 0; }
.top-name { font-weight: 900; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-sub { font-size: 12.5px; opacity: .82; font-weight: 600; }
.top-right { display: flex; align-items: center; gap: 8px; }
.logo-btn { background: none; border: 0; padding: 2px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; }
.logo-btn:active { transform: scale(.94); }
.art-logo { width: 40px; height: 40px; }
.avatar-btn { width: 46px; height: 46px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .35); overflow: hidden; display: grid; place-items: center; padding: 0; }
.avatar-btn .art { width: 40px; height: 40px; }
.ring-wrap { width: 40px; height: 40px; }
.art-ring { width: 40px; height: 40px; }
.streak-chip { display: inline-flex; align-items: center; gap: 4px; background: rgba(255, 255, 255, .5); border-radius: 999px; padding: 4px 9px; font-weight: 900; font-size: 13px; }
.flame { width: 15px; height: 15px; }

/* ---------- bottom nav ---------- */
.botnav {
  position: sticky; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  gap: 2px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(58, 53, 46, .07);
}
.nav-item { min-height: var(--tap); border: 0; background: none; border-radius: 16px; display: grid; justify-items: center; align-content: center; gap: 2px; color: var(--ink-soft); font-size: 11px; font-weight: 800; transition: background .15s, transform .1s; }
.nav-item .ico { width: 26px; height: 26px; }
.nav-item.on { background: color-mix(in srgb, var(--brand) 22%, #fff); color: var(--ink); }
.nav-item:active { transform: translateY(1px) scale(.97); }
.ico { width: 22px; height: 22px; display: block; }

/* ---------- buttons ---------- */
.btn {
  min-height: 52px; padding: 10px 18px; border-radius: 999px; border: 2px solid transparent;
  background: var(--surface-2); color: var(--ink); font-weight: 800; display: inline-flex; align-items: center;
  gap: 8px; justify-content: center; box-shadow: var(--shadow); transition: transform .08s, filter .15s;
}
.btn:active { transform: translateY(2px) scale(.99); }
.btn.primary { background: var(--brand); color: #33270f; border-color: color-mix(in srgb, var(--brand) 70%, #000 6%); }
body[data-skin="old"] .btn.primary { background: #2f5d7c; color: #f6efe1; border-color: #24475f; }
.btn.ghost { background: var(--surface); border-color: var(--line); box-shadow: none; }
.btn.big { min-height: var(--tap); font-size: 19px; padding: 14px 26px; }
/* .tiny is the most compact control we allow anywhere: still a 44px target.
   Spec §13 — little fingers, and the app is used on a knee in a living room. */
.btn.tiny { min-height: 44px; padding: 6px 14px; font-size: 13px; border-radius: 999px; box-shadow: none; }
.btn.round { width: 46px; min-height: 46px; padding: 0; border-radius: 50%; }
.btn.pill { border-radius: 999px; box-shadow: none; background: var(--surface); border-color: var(--line); font-size: 14px; min-height: 44px; padding: 8px 14px; }
.btn.linkbtn { background: none; border: 0; box-shadow: none; color: var(--brand-2); text-decoration: underline; font-weight: 700; min-height: 40px; }
.btn.dangerish { color: #9a5b52; border-color: #ecd7d3; }
.btn.off { opacity: .45; }
.btn.on { background: color-mix(in srgb, var(--brand) 30%, #fff); border-color: var(--brand); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.wrap { flex-wrap: wrap; }
.center { text-align: center; }
.muted-note { color: var(--ink-soft); font-size: 13.5px; margin: .35em 0; }
.empty { color: var(--ink-soft); font-style: italic; padding: 18px 6px; }
.empty.big { text-align: center; padding: 40px 10px; font-size: 17px; }
.kbd-hint { font-size: 12px; color: var(--ink-soft); }

/* ---------- onboarding ---------- */
.onboard { max-width: 620px; margin: 0 auto; padding: 26px 18px 40px; min-height: 100dvh; display: flex; flex-direction: column; }
.ob-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 22px; }
.ob-dots .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.ob-dots .dot.on { background: var(--brand); width: 26px; border-radius: 6px; }
.ob-dots .dot.past { background: var(--good); }
.ob-body { flex: 1; }
.ob-hero { text-align: center; padding-top: 6dvh; }
.ob-hero .art-logo { width: 120px; height: 120px; margin: 0 auto 12px; display: block; }
.ob-hero .art { width: 150px; height: 150px; margin: 0 auto; display: block; }
.ob-q { margin-block: 8px 6px; }
.ob-hint { color: var(--ink-soft); margin-bottom: 18px; }
.ob-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }
.big-input {
  width: 100%; min-height: 64px; font-size: 24px; font-weight: 800; padding: 12px 18px;
  border-radius: var(--radius-s); border: 2px solid var(--line); background: var(--surface); color: var(--ink);
}
.big-input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 26%, transparent); }
.age-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 12px; }
.age-chip { min-height: 72px; border-radius: var(--radius-s); border: 2px solid var(--line); background: var(--surface); font-size: 26px; font-weight: 900; }
.age-chip.on { background: var(--brand); border-color: color-mix(in srgb, var(--brand) 60%, #000 8%); transform: translateY(-2px); }
.tier-note { text-align: center; font-weight: 800; background: var(--surface-2); border-radius: 999px; padding: 8px; }
.pq-count { font-size: 12px; font-weight: 800; color: var(--ink-soft); letter-spacing: .08em; }
.pq-text { font-size: clamp(20px, 5vw, 26px); font-weight: 800; margin: 6px 0 16px; }
.pq-opts { display: grid; gap: 10px; }
.pq-opt { min-height: 60px; text-align: start; padding: 12px 18px; font-size: 18px; font-weight: 700; border-radius: var(--radius-s); border: 2px solid var(--line); background: var(--surface); }
.pq-opt.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 18%, #fff); }
.tier-cards { display: grid; gap: 12px; }
.tier-card { display: grid; grid-template-columns: 62px 1fr; grid-template-rows: auto auto; gap: 4px 12px; align-items: center; text-align: start; padding: 14px; border-radius: var(--radius); border: 2px solid var(--line); background: var(--surface); position: relative; }
.tier-card .art { grid-row: span 2; width: 62px; height: 62px; }
.tier-card b { font-size: 19px; }
.tier-card span { color: var(--ink-soft); font-size: 13.5px; }
.tier-card.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, #fff); box-shadow: var(--shadow); }
.rec-tag { position: absolute; inset-inline-end: 14px; top: 12px; color: var(--good); font-weight: 900; font-style: normal; }
.comp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.comp-card { padding: 12px 8px; border-radius: var(--radius-s); border: 2px solid var(--line); background: var(--surface); display: grid; justify-items: center; gap: 6px; }
.comp-card .art { width: 72px; height: 72px; }
.comp-card b { font-size: 13px; }
.comp-card.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 16%, #fff); }
.pet-preview { text-align: center; }
.pet-preview .art { width: 170px; height: 170px; }

/* ---------- child home ---------- */
.hero { display: flex; align-items: center; gap: 14px; background: var(--surface); border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow); border: 2px solid var(--line); }
.hero-comp { width: 92px; height: 92px; flex: none; }
.hero-comp .art { width: 92px; height: 92px; }
.hi { font-size: clamp(22px, 6vw, 30px); font-weight: 900; }
.hi-sub { color: var(--ink-soft); font-weight: 700; font-size: 13.5px; }
.next-steps { display: grid; gap: 12px; margin: 16px 0; }
.step { display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 12px 16px; border-radius: var(--radius); border: 2px solid var(--line); background: var(--surface); text-align: start; box-shadow: var(--shadow); }
.step-ico { font-size: 26px; }
.step-art { width: 56px; height: 56px; flex: none; }
.step-art .art { width: 56px; height: 56px; }
.step-txt { flex: 1; display: grid; }
.step-txt em { font-style: normal; font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-2); }
.step-txt b { font-size: 19px; line-height: 1.2; }
.step-txt i { font-style: normal; color: var(--ink-soft); font-size: 13px; }
.big-step { background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--brand) 12%, #fff)); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.step-go { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; color: #3a2a10; }
.strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.strip-btn { border: 2px solid var(--line); background: var(--surface); border-radius: var(--radius-s); padding: 10px 6px; display: grid; justify-items: center; gap: 2px; box-shadow: var(--shadow); }
.strip-btn b { font-size: 22px; }
.strip-btn span { font-size: 11.5px; color: var(--ink-soft); font-weight: 800; }
.verse-card { width: 100%; text-align: start; border: 0; border-radius: var(--radius); padding: 16px; background: linear-gradient(160deg, #2f5d7c, #577590); color: #f3f7fa; display: grid; gap: 6px; box-shadow: var(--shadow); }
.verse-card .vc-k { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .8; font-weight: 900; }
.verse-card .vc-text { font-size: 18px; font-weight: 700; font-family: "EB Garamond", Georgia, serif; }
.verse-card .vc-ref { font-size: 12.5px; opacity: .85; font-weight: 800; }
.brand-card { margin-top: 16px; border-radius: var(--radius); background: var(--surface-2); border: 2px dashed var(--line); padding: 12px 14px; }
.brand-card-center { text-align: center; display: grid; justify-items: center; gap: 8px; padding: 18px 16px 16px; }
.brand-card-center .bc-logo { display: grid; place-items: center; }
.brand-card-center .art-logo { width: 64px; height: 64px; margin: 0 auto; display: block; }
.brand-card-center .bc-copy { display: grid; gap: 2px; justify-items: center; }
.brand-card-center .bc-copy b { display: block; font-size: 17px; }
.brand-card-center .bc-copy span { font-size: 13px; color: var(--ink-soft); max-width: 28ch; }
.brand-card-center .bc-links { justify-content: center; }
.bc-top { display: flex; align-items: center; gap: 10px; }
.bc-top .art-logo { width: 40px; height: 40px; }
.bc-top b { display: block; }
.bc-top span { font-size: 12.5px; color: var(--ink-soft); }
.bc-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.bc-link { font-size: 13px; font-weight: 800; text-decoration: none; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--brand-2); }

/* onboarding — 3-step, centered */
.ob-hero.compact { padding-top: 2dvh; }
.ob-brand { font-weight: 900; letter-spacing: .04em; color: var(--brand-2); margin: 0 0 8px; font-size: 14px; }
.ob-q.center, .ob-hint.center { text-align: center; }
.onboard .big-input { text-align: center; }
.onboard .comp-grid { margin-top: 8px; }

/* story theatre — tier L picture-book slides */
.story-theatre {
  position: relative;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  background: linear-gradient(180deg, #fff7e8, #ffe4b8);
  border: 3px solid color-mix(in srgb, var(--brand) 55%, var(--line));
  box-shadow: var(--shadow);
  margin: 4px 0 12px;
}
.story-slide { padding: 8px 8px 0; }
.art-story-scene {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  max-height: min(58vw, 360px);
  display: block;
  margin: 0 auto;
  animation: scene-in .45s ease-out;
}
@keyframes scene-in {
  from { opacity: .35; transform: scale(.96); }
  to { opacity: 1; transform: scale(1); }
}
.listen-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 10px;
  background: color-mix(in srgb, #fff 70%, var(--brand) 10%);
  border-top: 2px dashed color-mix(in srgb, var(--brand) 35%, var(--line));
}
.listen-child { width: 56px; height: 56px; flex: none; }
.listen-child .art { width: 56px; height: 56px; }
.listen-bubble {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  border: 2px solid var(--line);
}
.listen-bubble b { font-weight: 900; line-height: 1.2; }
.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.eq i {
  display: block; width: 4px; border-radius: 2px; background: var(--brand-2);
  animation: eq 1s ease-in-out infinite;
  height: 8px;
}
.eq i:nth-child(1) { animation-delay: 0s; height: 10px; }
.eq i:nth-child(2) { animation-delay: .15s; height: 16px; }
.eq i:nth-child(3) { animation-delay: .3s; height: 12px; }
.eq i:nth-child(4) { animation-delay: .45s; height: 18px; }
@keyframes eq {
  0%, 100% { transform: scaleY(.45); opacity: .7; }
  50% { transform: scaleY(1); opacity: 1; }
}
.pages-young .para {
  font-size: clamp(20px, 5.6vw, 26px);
  line-height: 1.45;
  text-align: center;
  padding: 14px 12px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 2px solid var(--line);
  box-shadow: var(--shadow);
}
body[data-tier="L"] .read-bar { top: 56px; }
body[data-tier="L"] .story-theatre { margin-top: 2px; }

/* ---------- narration language toggle (all tiers) ---------- */
.voice-toggle {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  margin: 4px 0 2px; padding: 8px 10px;
  background: color-mix(in srgb, var(--surface) 88%, var(--brand) 12%);
  border: 2px solid var(--line); border-radius: 999px;
}
.vt-label {
  font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand-2); padding-inline: 6px;
}
.vt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vt-chip {
  border: 2px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 6px 12px; min-height: 40px; display: inline-flex; align-items: center; gap: 6px;
  font-weight: 800; box-shadow: var(--shadow);
}
.vt-chip b { font-size: 12px; letter-spacing: .04em; color: var(--brand-2); }
.vt-chip i { font-style: normal; font-size: 14px; }
.vt-chip.on {
  background: color-mix(in srgb, var(--brand) 28%, #fff);
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  transform: translateY(-1px);
}
.voice-hint {
  margin: 2px 4px 10px; font-size: 12.5px; color: var(--ink-soft); font-weight: 600;
}
.read-bar .big-listen {
  min-height: 48px;
  padding: 10px 18px;
  font-size: 16px;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--brand) 55%, #8a5a10);
}
.read-bar .big-listen:active { transform: translateY(2px); box-shadow: none; }

/* softer cartoon motion */
.story-theatre.soft-motion,
.story-banner.soft-motion {
  border-radius: calc(var(--radius) + 8px);
  border-width: 2px;
  background: linear-gradient(165deg, #fff9ee 0%, #ffe8c2 48%, #ffd9a8 100%);
  box-shadow: 0 10px 28px rgba(90, 60, 20, .08);
}
.art-story-scene.soft-cartoon {
  filter: saturate(1.05) contrast(0.98);
  animation: scene-soft-in .7s cubic-bezier(.22,.7,.3,1);
}
@keyframes scene-soft-in {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.story-banner {
  max-width: 420px; margin: 0 auto 12px; border-radius: var(--radius);
  overflow: hidden; border: 2px solid var(--line);
}
.story-banner .art-story-scene {
  width: 100%; height: auto; aspect-ratio: 1/1; max-height: 220px; display: block; margin: 0 auto;
}
.listen-child.bob { animation: soft-bob 3.4s ease-in-out infinite; }
@keyframes soft-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.eq.soft i { animation-duration: 1.35s; }
.pages-young .para, .pages[dir="rtl"] .para {
  line-height: 1.55;
}
.pages[dir="rtl"] .para, .pages-young[dir="rtl"] .para { text-align: center; font-size: clamp(18px, 5vw, 24px); }

@media (prefers-reduced-motion: reduce) {
  .art-story-scene, .listen-child.bob, .eq i, .motion-bob, .motion-sway {
    animation: none !important;
  }
  .art-story-scene.soft-cartoon { animation: none; }
}



/* ---------- page heads / path ---------- */
.page-head { margin-bottom: 14px; }
.page-head p { color: var(--ink-soft); margin: 0; font-weight: 600; }
.page-head.dens { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.bar { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 10px 0 4px; border: 1px solid var(--line); }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--good), #a9d97f); border-radius: 999px; transition: width .5s; }
.framing { font-weight: 800 !important; color: var(--ink) !important; }
.path-list { display: grid; gap: 10px; }
.path-item { display: grid; grid-template-columns: 34px 52px 1fr; gap: 12px; align-items: center; text-align: start; padding: 10px 12px; border-radius: var(--radius-s); border: 2px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.pi-num { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 900; font-size: 14px; }
.path-item.done .pi-num { background: color-mix(in srgb, var(--good) 35%, #fff); }
.path-item.now { border-color: var(--brand); background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--brand) 10%, #fff)); }
.pi-art { width: 52px; height: 52px; }
.pi-art .art { width: 52px; height: 52px; }
.pi-txt { display: grid; gap: 2px; min-width: 0; }
.pi-txt b { font-size: 17px; }
.pi-txt i { font-style: normal; color: var(--ink-soft); font-size: 13px; }
.pi-txt em { font-style: normal; font-size: 11.5px; color: var(--brand-2); font-weight: 800; }
.pi-badge { font-size: 11.5px; font-weight: 900; background: color-mix(in srgb, var(--good) 25%, #fff); border-radius: 999px; padding: 4px 8px; }

/* ---------- library ---------- */
.search { width: 100%; min-height: 52px; border-radius: 999px; border: 2px solid var(--line); padding: 8px 18px; background: var(--surface); }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); font-weight: 800; }
.tab.on { background: var(--brand); border-color: color-mix(in srgb, var(--brand) 60%, #000 8%); color: #33270f; }
.tabs.second .tab.on { background: var(--brand-2); color: #f2f7fa; border-color: var(--brand-2); }
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 6px; }
.u-card { border: 2px solid var(--line); background: var(--surface); border-radius: var(--radius-s); padding: 12px; display: grid; gap: 6px; justify-items: start; text-align: start; box-shadow: var(--shadow); }
.uc-art { width: 62px; height: 62px; }
.uc-art .art { width: 62px; height: 62px; }
.u-card b { font-size: 16px; line-height: 1.25; }
.u-card i { font-style: normal; font-size: 12.5px; color: var(--ink-soft); }
.u-card.done { background: color-mix(in srgb, var(--good) 10%, #fff); }
.uc-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tag { font-style: normal; font-size: 11px; font-weight: 900; background: var(--surface-2); padding: 3px 8px; border-radius: 999px; color: var(--ink-soft); }
.tag.ok { background: color-mix(in srgb, var(--good) 30%, #fff); color: #33521f; }
.tag.nine { background: #efe6f7; color: #4f3b63; }
.era { margin-top: 22px; }
.era-head { display: flex; align-items: baseline; gap: 10px; border-bottom: 2px solid var(--line); padding-bottom: 6px; margin-bottom: 10px; }
.era-head b { font-size: 19px; }
.era-head span { color: var(--ink-soft); font-size: 13px; }
.track-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.track-card { border: 2px solid var(--line); border-top: 6px solid var(--tc, var(--brand)); border-radius: var(--radius-s); padding: 12px; background: var(--surface); display: grid; gap: 4px; text-align: start; box-shadow: var(--shadow); }
.track-card .art { width: 46px; height: 46px; }
.track-card b { font-size: 16px; }
.track-card span { font-size: 12.5px; color: var(--ink-soft); }
.track-card em { font-style: normal; font-size: 12px; font-weight: 900; color: var(--brand-2); }
.otnt > div { margin-bottom: 18px; }
.otnt h3 { border-bottom: 2px solid var(--line); padding-bottom: 4px; }

/* ---------- player ---------- */
.unit-top { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin-bottom: 10px; }
.unit-title { display: grid; }
.unit-title b { font-size: 19px; line-height: 1.2; }
.unit-title span { font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.cover { text-align: center; padding: 10px 0 20px; }
.cover .art-motif { width: 130px; height: 130px; margin: 0 auto; display: block; }
.cover .sum { font-size: 16.5px; color: var(--ink-soft); max-width: 46ch; margin-inline: auto; }
.cover-quote { font-family: "EB Garamond", Georgia, serif; font-size: 19px; background: var(--surface); border-radius: var(--radius-s); padding: 14px; border: 2px solid var(--line); }
.cover-quote span { display: block; font-size: 12px; color: var(--ink-soft); font-family: var(--font); font-weight: 800; }
.cover-btns { display: grid; gap: 10px; justify-items: center; margin-top: 14px; }
.hard-note { text-align: start; background: #fff7ec; border: 1px dashed #e3c998; border-radius: var(--radius-s); padding: 10px 12px; font-size: 13.5px; margin-top: 14px; }
.hard-note b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #8a6a2e; }
.read-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; position: sticky; top: 62px; z-index: 12; background: var(--bg); padding: 6px 0; }
.tog { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 800; background: var(--surface); border: 1px solid var(--line); padding: 7px 12px; border-radius: 999px; }
.tog input { width: 20px; height: 20px; accent-color: var(--brand); }
.pages { display: grid; gap: 14px; margin: 8px 0 12px; }
.para {
  font-family: var(--font-read); font-size: clamp(19px, 5.4vw, 26px); line-height: 1.75;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 0;
}
body[data-tier="L"] .para { font-size: clamp(23px, 7.2vw, 34px); line-height: 1.9; letter-spacing: .01em; }
body[data-tier="M"] .para { font-size: clamp(20px, 5vw, 24px); }
body[data-skin="old"] .para { background: #fffdf8; border-color: #e6ddcd; }
.para .w { border-radius: 5px; padding: 0 1px; transition: background .12s, color .12s; }
.para .w.lit { background: color-mix(in srgb, var(--brand) 42%, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 42%, #fff); }
.scripture { border-inline-start: 4px solid var(--brand-2); background: var(--surface-2); padding: 12px 14px; border-radius: 0 var(--radius-s) var(--radius-s) 0; margin: 10px 0; }
html[dir="rtl"] .scripture { border-radius: var(--radius-s) 0 0 var(--radius-s); border-inline-start-width: 4px; }
.scripture b { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-2); }
.scripture p { font-family: "EB Garamond", Georgia, serif; font-size: 17.5px; margin: 6px 0 0; }
.scripture span { font-family: var(--font); font-size: 12px; color: var(--ink-soft); font-weight: 800; }
.page-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 12px 0; }
.page-no { font-weight: 900; color: var(--ink-soft); font-size: 13px; }
.teach { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px; }
.teach ul { margin: 0; padding-inline-start: 22px; display: grid; gap: 10px; font-size: 17px; }
.prayer-end { text-align: center; padding: 10px 0; }
.prayer-end .art { width: 96px; height: 96px; margin: 0 auto; display: block; }
.pray-text { font-family: "EB Garamond", Georgia, serif; font-size: 20px; line-height: 1.7; background: var(--surface); border-radius: var(--radius); padding: 18px; border: 2px solid var(--line); }
.blocked { text-align: center; padding: 40px 10px; }

/* ---------- quiz ---------- */
.quiz { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.q-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 900; color: var(--ink-soft); letter-spacing: .06em; text-transform: uppercase; }
.q-text { margin: 6px 0 14px; }
.opts { display: grid; gap: 10px; }
.opts-big { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.opts-big .opt { min-height: 92px; font-size: 19px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 58px; padding: 12px 16px; text-align: start; border-radius: var(--radius-s); border: 2px solid var(--line); background: var(--surface-2); font-size: 16.5px; font-weight: 700; }
.opt.sel { border-color: var(--brand-2); background: color-mix(in srgb, var(--brand-2) 12%, #fff); }
.opt.ok { border-color: var(--good); background: color-mix(in srgb, var(--good) 22%, #fff); animation: pop .35s ease; }
.opt-yes { font-weight: 900; color: #33521f; }
@keyframes pop { 0% { transform: scale(.98) } 60% { transform: scale(1.03) } 100% { transform: scale(1) } }
.feedback { margin-top: 14px; padding: 12px 16px; border-radius: var(--radius-s); font-weight: 800; font-size: 17px; }
.feedback.right { background: color-mix(in srgb, var(--good) 24%, #fff); }
.feedback.nudge { background: color-mix(in srgb, var(--warm) 30%, #fff); }
.feedback.reveal { background: var(--surface-2); }
.q-actions, .q-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.match-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.match-col { display: grid; gap: 10px; align-content: start; }
.mtile { min-height: 54px; border-radius: var(--radius-s); border: 2px solid var(--line); background: var(--surface-2); font-weight: 800; padding: 8px 10px; font-size: 15px; }
.mtile.sel { border-color: var(--brand-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-2) 18%, transparent); }
.mtile.linked { border-color: var(--lc, var(--good)); background: color-mix(in srgb, var(--lc, var(--good)) 22%, #fff); }
.order-picked { display: grid; gap: 8px; padding: 10px; border: 2px dashed var(--line); border-radius: var(--radius-s); min-height: 70px; margin-bottom: 10px; }
.order-picked .ph, .b-items .ph { color: var(--ink-soft); font-size: 13px; font-style: italic; }
.otile { min-height: 52px; border-radius: var(--radius-s); border: 2px solid var(--line); background: var(--surface); font-weight: 700; padding: 8px 14px; text-align: start; box-shadow: var(--shadow); }
.otile.done { background: color-mix(in srgb, var(--brand) 16%, #fff); border-color: var(--brand); }
.order-pool { display: flex; flex-wrap: wrap; gap: 8px; }
.sort-buckets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bucket { border: 2px dashed var(--line); border-radius: var(--radius-s); padding: 10px; min-height: 120px; background: var(--surface-2); display: grid; gap: 8px; align-content: start; }
.bucket b { font-size: 14px; }
.b-items { display: grid; gap: 6px; }
.sitem { border-radius: 10px; padding: 8px 10px; background: var(--surface); border: 2px solid var(--line); font-size: 14px; font-weight: 700; display: block; width: 100%; text-align: start; }
.sitem.ok { border-color: var(--good); background: color-mix(in srgb, var(--good) 20%, #fff); }
.sitem.soft { border-color: var(--warm); background: color-mix(in srgb, var(--warm) 22%, #fff); }
.sitem.pick { cursor: grab; }
.sitem.sel { outline: 3px solid var(--brand-2); }
.sort-pool { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.sort-pool .sitem { width: auto; }
.blank .blank-q { font-size: 18px; font-weight: 800; }
.type-in { width: 100%; min-height: 60px; font-size: 21px; font-weight: 700; padding: 10px 16px; border-radius: var(--radius-s); border: 2px solid var(--line); background: var(--surface-2); }
.blank .hint { color: var(--ink-soft); font-size: 13.5px; }
.quiz-end { text-align: center; padding: 10px 0; }
.quiz-end .art { width: 110px; height: 110px; margin: 0 auto 8px; display: block; }
.qe-score { font-weight: 900; font-size: 18px; background: var(--surface-2); border-radius: 999px; display: inline-block; padding: 6px 16px; }
.qe-btns { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }

/* ---------- reward ---------- */
.reward { display: grid; gap: 14px; justify-items: center; text-align: center; }
.rw-card { background: linear-gradient(180deg, #fff8e6, #fff); border: 2px solid var(--brand); border-radius: var(--radius); padding: 20px; width: 100%; box-shadow: var(--shadow); animation: rise .45s ease; }
@keyframes rise { from { transform: translateY(14px) scale(.98); opacity: 0 } }
.rw-card .art-motif { width: 120px; height: 120px; margin: 0 auto; display: block; }
.rw-xp { font-size: 26px; font-weight: 900; color: #a06a12; }
.rw-sticker, .rw-level { font-weight: 900; background: color-mix(in srgb, var(--good) 24%, #fff); border-radius: 999px; padding: 6px 14px; display: inline-block; margin-top: 6px; }
.rw-level { background: color-mix(in srgb, var(--warm) 34%, #fff); }
.rw-score { margin-top: 10px; font-weight: 800; }
.rw-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.family-links { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.family-links a { display: block; padding: 10px 14px; min-height: var(--tap); border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: inherit; text-decoration: none; }
.family-links a:hover { border-color: var(--brand-2); }
.family-links b { display: block; font-size: 14.5px; }
.family-links span { display: block; font-size: 11.5px; color: var(--ink-soft); overflow-wrap: anywhere; }
.pod-link { display: block; text-align: center; font-weight: 800; font-size: 14px; color: var(--brand-2); background: var(--surface); border: 1px solid var(--line); padding: 10px 14px; border-radius: 999px; text-decoration: none; }

/* ---------- companion / garden ---------- */
.comp-page { text-align: center; }
.comp-stage { width: 200px; height: 200px; margin: 0 auto; }
.comp-stage .art { width: 200px; height: 200px; }
.comp-sub { color: var(--ink-soft); font-weight: 800; }
.grow-bar { height: 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; max-width: 340px; margin: 10px auto; }
.grow-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #ffd08a); }
.stages { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }
.stage-pill { font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.stage-pill.on { background: color-mix(in srgb, var(--brand) 26%, #fff); border-color: var(--brand); }
.say-bubble { margin: 14px auto; max-width: 420px; background: var(--surface); border: 2px solid var(--line); border-radius: 22px 22px 22px 6px; padding: 14px 16px; font-size: 18px; font-weight: 700; }
html[dir="rtl"] .say-bubble { border-radius: 22px 22px 6px 22px; }
.comp-choose { margin-top: 22px; text-align: start; }
.garden { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 14px; border-radius: var(--radius); background: linear-gradient(180deg, #cfe8f5 0%, #e8f0dd 46%, #a9c98d 46%, #93bb7c 100%); border: 2px solid var(--line); }
.gslot { aspect-ratio: 1; border-radius: 12px; border: 2px dashed rgba(58, 53, 46, .28); background: rgba(255, 255, 255, .32); display: grid; place-items: center; }
.gslot.filled { border-style: solid; border-color: rgba(58, 53, 46, .12); background: rgba(255, 255, 255, .62); }
.gslot .art { width: 78%; height: 78%; }
.gs-plus { font-size: 22px; color: rgba(58, 53, 46, .4); font-weight: 900; }
.sh { margin: 20px 0 8px; }
.sticker-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.stk { border-radius: var(--radius-s); border: 2px solid var(--line); background: var(--surface); padding: 8px 4px; display: grid; justify-items: center; gap: 4px; }
.stk .art { width: 48px; height: 48px; }
.stk b { font-size: 10.5px; text-align: center; line-height: 1.15; }
.stk.sel { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 25%, transparent); }
.stk.placed { opacity: .55; }

/* ---------- prayer ---------- */
.pray-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; }
.pmode { border-radius: var(--radius-s); border: 2px solid var(--line); background: var(--surface); padding: 10px 6px; display: grid; justify-items: center; gap: 4px; }
.pmode .art { width: 44px; height: 44px; }
.pmode b { font-size: 12px; }
.prompt-card { margin-top: 14px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px; }
.pray-words { font-size: 21px; font-weight: 700; line-height: 1.9; margin: 10px 0; }
.pray-words .w { border-radius: 5px; padding: 0 2px; opacity: .28; }
.pray-words .w.lit { opacity: 1; background: color-mix(in srgb, var(--warm) 40%, #fff); }
.add-pray { display: flex; gap: 10px; margin: 16px 0; align-items: stretch; }
.add-pray .big-input { font-size: 18px; min-height: 56px; }
.pray-list { display: grid; gap: 10px; }
.pray-item { position: relative; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-s); padding: 14px 16px; }
.pray-item.answered { background: color-mix(in srgb, var(--good) 12%, #fff); border-color: color-mix(in srgb, var(--good) 50%, var(--line)); }
.pray-item p { font-size: 17px; margin: 0 0 8px; }
.pray-x { position: absolute; inset-inline-end: 6px; top: 4px; border: 0; background: none; font-size: 20px; color: var(--ink-soft); width: 34px; height: 34px; }

/* ---------- memory verses ---------- */
.flash { background: linear-gradient(170deg, #fff, var(--surface-2)); border: 2px solid var(--brand); border-radius: var(--radius); padding: 22px 18px; text-align: center; box-shadow: var(--shadow); }
.fl-top { display: flex; justify-content: space-between; font-size: 12px; font-weight: 900; color: var(--ink-soft); }
.fl-boxes { display: flex; gap: 5px; justify-content: center; margin: 10px 0; }
.fl-boxes i { width: 12px; height: 12px; border-radius: 4px; background: var(--line); }
.fl-boxes i.on { background: var(--brand); }
.fl-text { font-family: "EB Garamond", Georgia, serif; font-size: clamp(20px, 5.2vw, 27px); line-height: 1.6; margin: 10px 0 18px; }
.verse-list { display: grid; gap: 8px; }
.vrow { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; text-align: start; padding: 10px 12px; border-radius: var(--radius-s); border: 2px solid var(--line); background: var(--surface); }
.vrow .vr-art { width: 30px; height: 30px; }
.vrow .vr-art .art { width: 30px; height: 30px; }
.vrow b { font-size: 14px; }
.vrow i { font-style: normal; font-size: 13px; color: var(--ink-soft); }
.vrow em { font-size: 11px; font-weight: 900; font-style: normal; color: var(--brand-2); }
.vrow.due { border-color: var(--brand); }
.vrow.learned { background: color-mix(in srgb, var(--good) 10%, #fff); }

/* ---------- leaderboards ---------- */
.you-banner { background: var(--brand); color: #33270f; font-weight: 900; border-radius: 999px; padding: 8px 14px; display: inline-block; margin-bottom: 10px; }
.lb { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lbrow { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 10px; align-items: center; background: var(--surface); border: 2px solid var(--line); border-radius: 999px; padding: 8px 14px; }
.lbrow.you { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, #fff); }
.lb-rank { font-weight: 900; color: var(--ink-soft); }
.lb-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-name .sim { font-size: 10px; background: var(--surface-2); border-radius: 4px; padding: 1px 4px; font-style: normal; color: var(--ink-soft); }
.lb-xp { font-size: 13px; color: var(--ink-soft); font-weight: 800; }
.lb-gain { font-size: 12px; color: #3d7a2b; font-weight: 900; }
.react-btn { flex: none; }
.react-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0; }
.react-pick { border-radius: var(--radius-s); border: 2px solid var(--line); background: var(--surface); padding: 10px; display: grid; justify-items: center; gap: 4px; color: var(--brand-2); }
.react-pick .art { width: 34px; height: 34px; }
.react-pick b { font-size: 10.5px; color: var(--ink); text-transform: capitalize; }
.gbox { margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 14px; }
.gbox h3 { margin-bottom: 8px; }
.code-in { min-height: 52px; width: 150px; font-size: 22px; font-weight: 900; letter-spacing: .22em; text-transform: uppercase; text-align: center; border-radius: var(--radius-s); border: 2px dashed var(--line); background: var(--surface-2); }
.grow-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.grow-row code { background: var(--surface-2); padding: 3px 8px; border-radius: 6px; font-weight: 900; }

/* ---------- groups / teacher ---------- */
.org-card { border: 2px solid var(--line); border-radius: var(--radius-s); padding: 14px; display: grid; gap: 8px; background: var(--surface); }
.org-card.status-approved { border-color: color-mix(in srgb, var(--good) 50%, var(--line)); background: color-mix(in srgb, var(--good) 8%, #fff); }
.org-card.status-pending { border-color: #e6c98a; background: #fffaee; }
.kv { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding: 5px 0; font-size: 14px; }
.kv b { font-weight: 800; }
.tbox { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 14px; background: var(--surface); }
.tbox h4 { margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft); }
.assign-grid, .att { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 7px 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface-2); font-weight: 800; font-size: 14px; }
.chip.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 22%, #fff); }

/* ---------- parent ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 12px 0; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px; display: grid; justify-items: center; gap: 2px; box-shadow: var(--shadow); }
.pv { font-size: 24px; font-weight: 900; }
.pl { font-size: 11.5px; color: var(--ink-soft); font-weight: 800; text-align: center; }
.pa { width: 84px; height: 84px; }
.pa .art { width: 84px; height: 84px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
section { margin: 18px 0; }
.chart { width: 100%; height: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); }
.weak { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.weak li { display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; }
.weak span { color: var(--ink-soft); font-size: 13px; }
table.log { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius-s); overflow: hidden; font-size: 13px; }
.log th, .log td { text-align: start; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.log th { background: var(--surface-2); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.kids { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.kid { min-height: 38px; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); font-weight: 800; font-size: 13px; }
.kid.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 20%, #fff); }
.child-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.child-card { border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 14px 10px; display: grid; justify-items: center; gap: 4px; text-align: center; }
.child-card .art { width: 76px; height: 76px; }
.child-card.on { border-color: var(--brand); box-shadow: var(--shadow); }
.child-card.add { border-style: dashed; align-content: center; min-height: 140px; font-weight: 900; }
.child-card span { font-size: 12px; color: var(--ink-soft); }
.sld { display: grid; gap: 4px; font-size: 13px; font-weight: 800; }
select { min-height: 46px; border-radius: var(--radius-s); border: 2px solid var(--line); background: var(--surface); padding: 6px 12px; max-width: 100%; }
input[type="range"] { accent-color: var(--brand); width: 100%; }
input[type="time"] { min-height: 46px; border-radius: var(--radius-s); border: 2px solid var(--line); background: var(--surface); padding: 6px 10px; }

/* ---------- printables ---------- */
.unit-pick { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.sheet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.sheet { border: 2px solid var(--line); border-radius: var(--radius-s); background: #fff; padding: 10px; display: grid; gap: 8px; justify-items: center; }
.sheet .art-colouring { width: 100%; }
.sheet b { font-size: 12.5px; }
.sheet-lines { display: grid; gap: 6px; width: 100%; font-size: 11.5px; color: var(--ink-soft); }
.sheet-lines .sl { border-bottom: 1px dashed var(--line); padding-bottom: 3px; }

/* ---------- more hub ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.tile { border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 16px 10px; display: grid; justify-items: center; gap: 8px; box-shadow: var(--shadow); }
.tile-art { width: 60px; height: 60px; }
.tile-art .art { width: 60px; height: 60px; }
.tile b { font-size: 15px; }

/* ---------- modal & toast ---------- */
.modal-wrap { position: fixed; inset: 0; background: rgba(43, 38, 34, .5); display: grid; place-items: center; padding: 18px; z-index: 90; }
.modal { background: var(--bg); border-radius: var(--radius); padding: 18px; width: min(520px, 100%); max-height: 88dvh; overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.toast { position: fixed; inset-inline: 0; bottom: calc(96px + env(safe-area-inset-bottom)); margin-inline: auto; width: max-content; max-width: 88vw; background: #33302b; color: #fdf6e9; padding: 12px 18px; border-radius: 999px; font-weight: 800; opacity: 0; transform: translateY(14px); transition: .25s; z-index: 99; pointer-events: none; }
.toast.on { opacity: 1; transform: none; }

/* ---------- art ---------- */
.art { display: block; }
.art-motif, .art-comp { width: 100%; height: 100%; }

/* ---------- wide screens ---------- */
@media (min-width: 760px) {
  :root { --maxw: 880px; }
  .screen { padding-block: 22px 40px; }
  .botnav { position: sticky; }
}
@media (min-width: 1080px) {
  :root { --maxw: 1000px; }
  .next-steps { grid-template-columns: 1fr; }
  .hero { padding: 18px 22px; }
  .hero-comp, .hero-comp .art { width: 116px; height: 116px; }
}
@media (max-width: 360px) {
  .nav-lbl { display: none; }
  .unit-grid { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .para .w { transition: none; }
}
@media (prefers-contrast: more) {
  :root { --line: #b9ab96; --ink-soft: #4b453d; }
}

/* ---------- printing the app itself ---------- */
@media print {
  .topbar, .botnav, .read-bar, .page-nav, .q-actions, .q-foot, .btn { display: none !important; }
  body { background: #fff; }
  .screen { max-width: none; padding: 0; }
  .para { border: none; font-size: 14pt; }
}
.onboard .ob-note{margin:14px auto 0;max-width:40ch;text-align:center;font-size:13px;color:var(--muted,#6a6355)}

/* ---------- settings profile editor ---------- */
.prof-edit, .prof-edit-mini {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.prof-edit .field { display: grid; gap: 8px; margin: 12px 0; }
.prof-edit .field > span {
  font-size: 12px; font-weight: 900; letter-spacing: .06em;
  text-transform: uppercase; color: var(--brand-2);
}
.prof-edit .age-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.prof-edit .comp-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 520px) {
  .prof-edit .comp-grid { grid-template-columns: repeat(3, 1fr); }
  .prof-edit .age-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- install banner (Android / PWA) ---------- */
.seo-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.install-banner {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 80; display: grid; grid-template-columns: auto 1fr auto; gap: 10px 12px;
  align-items: center; padding: 12px 14px; padding-top: 16px;
  background: linear-gradient(135deg, #fff8ee, #ffe2b0 55%, #f2a13b);
  border: 2px solid #d4a05a;
  border-radius: 22px;
  box-shadow: 0 12px 36px rgba(60, 35, 5, .22);
  animation: install-in .45s cubic-bezier(.22,.7,.3,1);
}
@keyframes install-in {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.install-banner .ib-icon {
  width: 52px; height: 52px; border-radius: 14px; overflow: hidden;
  border: 2px solid rgba(255,255,255,.7); background: #fff; flex: none;
}
.install-banner .ib-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.install-banner .ib-txt { min-width: 0; }
.install-banner .ib-txt b { display: block; font-size: 15px; line-height: 1.2; color: #3a2a10; }
.install-banner .ib-txt span { display: block; font-size: 12.5px; color: #5a4630; font-weight: 600; margin-top: 2px; }
.install-banner .ib-badge {
  display: inline-block; margin-top: 4px; font-size: 10.5px; font-weight: 900;
  letter-spacing: .04em; text-transform: uppercase; background: rgba(255,255,255,.65);
  border-radius: 999px; padding: 2px 8px; color: #6b4a1e; font-style: normal;
}
.install-banner .ib-actions { display: grid; gap: 6px; justify-items: stretch; }
.install-banner .ib-actions .btn { min-height: 40px; padding: 8px 12px; font-size: 13px; white-space: nowrap; text-align: center; text-decoration: none; }
.install-banner .ib-x {
  position: absolute; top: 6px; right: 8px; width: 28px; height: 28px; border: 0;
  background: rgba(255,255,255,.55); border-radius: 50%; font-weight: 900; color: #5a4630;
}
body.has-botnav .install-banner { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
.install-card {
  margin: 14px 0 8px; padding: 14px; border-radius: var(--radius);
  background: linear-gradient(160deg, #fff7e8, #ffe0a8);
  border: 2px dashed color-mix(in srgb, var(--brand) 50%, var(--line));
  display: grid; gap: 10px; justify-items: center; text-align: center;
}
.install-card b { font-size: 16px; }
.install-card .row { justify-content: center; }
@media (max-width: 420px) {
  .install-banner { grid-template-columns: auto 1fr; }
  .install-banner .ib-actions { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .install-banner { animation: none; }
}

/* ============================================================
   DASHBOARD / SETTINGS — stop text merging & tighten grown-up UI
   ============================================================ */
body[data-route="parent"] .screen,
body[data-route="settings"] .screen,
body[data-route="more"] .screen,
body[data-route="print"] .screen,
body[data-route="groups"] .screen,
body[data-route="leader"] .screen {
  padding-inline: 14px;
  padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px));
}
body[data-route="parent"] .page-head.dens,
body[data-route="settings"] .page-head {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}
body[data-route="parent"] .page-head h1,
body[data-route="settings"] .page-head h1 {
  line-height: 1.15;
  word-break: break-word;
}
body[data-route="parent"] section,
body[data-route="settings"] section {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px 16px;
  margin: 12px 0;
  box-shadow: var(--shadow);
  overflow: hidden;
}
body[data-route="parent"] section > h3,
body[data-route="settings"] section > h3 {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  letter-spacing: .02em;
  line-height: 1.25;
}
body[data-route="settings"] .prof-edit {
  margin-top: 4px;
}
body[data-route="settings"] .prof-edit h3 {
  margin-bottom: 6px;
}
body[data-route="settings"] .row.wrap,
body[data-route="parent"] .row.wrap {
  gap: 8px;
  align-items: stretch;
}
body[data-route="settings"] .chip,
body[data-route="parent"] .chip {
  flex: 0 1 auto;
  max-width: 100%;
  white-space: normal;
  line-height: 1.25;
  text-align: center;
  padding: 8px 12px;
  min-height: 42px;
}
body[data-route="settings"] .tog {
  width: 100%;
  justify-content: flex-start;
  margin: 6px 0;
  white-space: normal;
  line-height: 1.3;
}
body[data-route="settings"] .sld {
  width: 100%;
  min-width: 0;
}
body[data-route="settings"] select,
body[data-route="settings"] input[type="time"],
body[data-route="settings"] input[type="range"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
body[data-route="settings"] .muted-note,
body[data-route="parent"] .muted-note {
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: anywhere;
}
body[data-route="parent"] .cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 560px) {
  body[data-route="parent"] .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
body[data-route="parent"] .pcard {
  min-width: 0;
  padding: 12px 8px;
  gap: 4px;
  align-content: start;
}
body[data-route="parent"] .pcard .pv {
  font-size: clamp(18px, 5vw, 24px);
  line-height: 1.1;
  word-break: break-word;
  text-align: center;
}
body[data-route="parent"] .pcard .pl {
  font-size: 11px;
  line-height: 1.25;
  max-width: 14ch;
  word-break: break-word;
}
body[data-route="parent"] .pcard .pa {
  width: min(72px, 100%);
  height: auto;
  aspect-ratio: 1;
}
body[data-route="parent"] .pcard .pa .art {
  width: 100%;
  height: 100%;
}
body[data-route="parent"] .grid2 {
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 720px) {
  body[data-route="parent"] .grid2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
body[data-route="parent"] .grid2 section {
  margin: 0;
  min-width: 0;
}
body[data-route="parent"] .chart {
  max-width: 100%;
  height: auto;
  display: block;
}
body[data-route="parent"] .weak li {
  flex-wrap: wrap;
  gap: 8px;
}
body[data-route="parent"] .weak b {
  flex: 1 1 120px;
  min-width: 0;
  word-break: break-word;
}
body[data-route="parent"] .weak span {
  flex: 1 1 100%;
  line-height: 1.3;
}
body[data-route="parent"] table.log {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 12px;
}
body[data-route="parent"] .log th,
body[data-route="parent"] .log td {
  white-space: nowrap;
  vertical-align: top;
  line-height: 1.3;
}
body[data-route="parent"] .log td:nth-child(2) {
  white-space: normal;
  min-width: 120px;
  max-width: 180px;
  word-break: break-word;
}
body[data-route="parent"] .kids {
  gap: 8px;
}
body[data-route="parent"] .kid {
  max-width: 100%;
  white-space: normal;
  line-height: 1.25;
}
body[data-route="settings"] .age-chip {
  min-height: 56px;
  font-size: 20px;
  line-height: 1;
}
body[data-route="settings"] .comp-grid {
  gap: 8px;
}
body[data-route="settings"] .comp-card {
  min-width: 0;
  padding: 8px 4px;
}
body[data-route="settings"] .comp-card b {
  font-size: 11px;
  line-height: 1.2;
  word-break: break-word;
  text-align: center;
}
body[data-route="settings"] .big-input {
  font-size: 18px;
  min-height: 52px;
}

/* ============================================================
   AGE-TIER LAYOUT SKINS — young / mid / old feel different
   ============================================================ */
body[data-skin="young"] .screen { padding-top: 10px; }
body[data-skin="young"] .step {
  border-radius: 26px;
  border-width: 3px;
  background: linear-gradient(180deg, #fff, #fff6e8);
}
body[data-skin="young"] .step-txt b { font-size: clamp(18px, 5vw, 22px); }
body[data-skin="young"] .hero {
  border-radius: 28px;
  background: linear-gradient(135deg, #ffe7b8, #ffd18a 50%, #ffc36e);
  border: 3px solid #f0b45a;
}
body[data-skin="young"] .botnav .nav-item { border-radius: 20px; }
body[data-skin="young"] .verse-card {
  border-radius: 24px;
  border-width: 3px;
  background: linear-gradient(160deg, #fff9ef, #ffe8c4);
}
body[data-skin="young"] .brand-card { border-radius: 24px; }
body[data-skin="young"] .u-card,
body[data-skin="young"] .tile,
body[data-skin="young"] .path-item {
  border-radius: 22px;
  border-width: 3px;
}
body[data-skin="young"] .path-item {
  gap: 12px;
  padding: 14px 12px;
}
body[data-skin="young"] .pi-num {
  width: 36px; height: 36px; font-size: 15px;
  background: color-mix(in srgb, var(--brand) 35%, #fff);
}

body[data-skin="mid"] .hero {
  background: linear-gradient(120deg, #fff7ea, #f3e2c4);
  border: 2px solid var(--line);
}
body[data-skin="mid"] .step {
  border-radius: 18px;
}
body[data-skin="mid"] .path-item {
  border-radius: 16px;
}
body[data-skin="mid"] .verse-card {
  border-left: 5px solid var(--brand-2);
}

body[data-skin="old"] .screen { padding-top: 12px; }
body[data-skin="old"] .hero {
  background: #f3efe6;
  border: 1px solid #d9d0c0;
  border-radius: 12px;
  box-shadow: none;
}
body[data-skin="old"] .hero-txt .hi {
  font-family: "EB Garamond", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0;
}
body[data-skin="old"] .step {
  border-radius: 10px;
  border-color: #d9d0c0;
  box-shadow: none;
  background: #fffcf6;
}
body[data-skin="old"] .step-txt em {
  letter-spacing: .12em;
  color: #6a5b45;
}
body[data-skin="old"] .verse-card {
  border-radius: 8px;
  border: 1px solid #d9d0c0;
  background: #fffcf6;
}
body[data-skin="old"] .verse-card .vc-text {
  font-size: 20px;
  line-height: 1.45;
}
body[data-skin="old"] .path-item {
  border-radius: 10px;
  border-color: #d9d0c0;
  background: #fffcf6;
}
body[data-skin="old"] .botnav {
  border-top-color: #d0c6b4;
  background: #f7f3ea;
}
body[data-skin="old"] .u-card,
body[data-skin="old"] .tile {
  border-radius: 10px;
  box-shadow: none;
}
body[data-skin="old"] section {
  border-radius: 10px;
}

/* Tier badge on home */
.tier-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--brand) 22%, #fff);
  border: 1px solid color-mix(in srgb, var(--brand) 40%, var(--line));
  color: var(--ink);
}
body[data-skin="old"] .tier-pill {
  background: #e8e0d2;
  border-color: #cfc4b0;
  letter-spacing: .08em;
}

/* ============================================================
   MORE MOTION — stories, path, home (respects reduced-motion)
   ============================================================ */
.step {
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.step:active { transform: scale(.985); }
.path-item {
  transition: transform .14s ease, background .2s ease;
}
.path-item:active { transform: translateY(1px); }
.u-card, .tile, .stk, .pmode {
  transition: transform .14s ease, box-shadow .2s ease;
}
.u-card:active, .tile:active { transform: scale(.97); }

.hero-comp .art {
  animation: soft-float 4.5s ease-in-out infinite;
}
@keyframes soft-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.story-theatre .story-slide {
  animation: slide-pop .55s cubic-bezier(.22,.7,.3,1);
}
@keyframes slide-pop {
  from { opacity: .35; transform: scale(.96) translateY(8px); }
  to { opacity: 1; transform: none; }
}

.pages .para {
  animation: para-in .4s ease both;
}
.pages .para:nth-child(1) { animation-delay: .02s; }
.pages .para:nth-child(2) { animation-delay: .08s; }
.pages .para:nth-child(3) { animation-delay: .14s; }
@keyframes para-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.reward .rw-card {
  animation: rise .5s ease, soft-glow 2.4s ease-in-out infinite alternate;
}
@keyframes soft-glow {
  from { box-shadow: var(--shadow); }
  to { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 25%, transparent), var(--shadow); }
}

.opt.ok { animation: pop .4s ease, sparkle .9s ease; }
@keyframes sparkle {
  0% { filter: brightness(1); }
  40% { filter: brightness(1.08); }
  100% { filter: brightness(1); }
}

.motion-sway {
  animation: sway 5s ease-in-out infinite;
  transform-origin: 50% 100%;
}
@keyframes sway {
  0%, 100% { transform: rotate(-1.4deg); }
  50% { transform: rotate(1.4deg); }
}

body[data-skin="young"] .eq.soft i {
  animation-duration: 1.1s;
}
body[data-skin="old"] .hero-comp .art,
body[data-skin="old"] .listen-child.bob {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-comp .art,
  .story-theatre .story-slide,
  .pages .para,
  .reward .rw-card,
  .motion-sway,
  .step, .path-item, .u-card, .tile {
    animation: none !important;
    transition: none !important;
  }
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
}
.table-scroll table.log { display: table; width: 100%; margin: 0; border: 0; }

/* Saul’s Podship family identity: retain tier-specific geometry and child targets. */
:root, body[data-skin="young"], body[data-skin="mid"], body[data-skin="old"] {
  --bg: #F8F4E3; --surface: #FDFBF7; --surface-2: #f1e8d8;
  --ink: #1A0812; --ink-soft: #69515b; --line: #d7c6b6;
  --brand: #D4AF37; --brand-2: #4A152C;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --font-read: "Inter", "Segoe UI", system-ui, sans-serif;
}
h1, h2, h3, h4 { font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif; }
.topbar, body[data-skin="old"] .topbar {
  background: linear-gradient(120deg, #4A152C, #1A0812); color: #FDFBF7;
  border-bottom: 2px solid #D4AF37;
}
.top-name, body[data-skin="old"] .topbar .top-name { color: #FDFBF7; }
.top-sub, body[data-skin="old"] .topbar .top-sub { color: #E8C96A; opacity: 1; }
.btn.primary, body[data-skin="old"] .btn.primary { background: #4A152C; color: #FDFBF7; border-color: #4A152C; }
.btn.primary:hover { background: #1A0812; }
.streak-chip { background: #1A0812; color: #E8C96A; }
:focus-visible { outline-color: #4A152C; }
.skip-link { position: fixed; inset-block-start: -100px; inset-inline-start: 12px; z-index: 100; padding: 12px 18px; background: #FDFBF7; color: #4A152C; }
.skip-link:focus { inset-block-start: 12px; }
.product-info { max-width: 1100px; margin: 0 auto; padding: 64px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; line-height: 1.7; }
.product-info h2 { color: #4A152C; font-size: clamp(24px, 3vw, 34px); }
.product-info a { text-underline-offset: 4px; }
.eyebrow { color: #69515b; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; }
.school-faq details { border-bottom: 1px solid #d7c6b6; }
.school-faq summary { cursor: pointer; padding: 16px 0; min-height: 52px; font-weight: 650; color: #4A152C; }
.school-faq details p { padding: 0 0 16px; }
.privacy-notes { grid-column: 1 / -1; padding: 28px; border: 1px solid #d7c6b6; border-radius: 16px; background: #FDFBF7; }
.podship-footer { background: #1A0812; color: #F8F4E3; border-top: 3px solid #D4AF37; padding: 48px 24px 24px; line-height: 1.65; }
.footer-grid { max-width: 1150px; margin: auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.podship-footer a { color: #E8C96A; text-decoration: none; overflow-wrap: anywhere; }
.podship-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.podship-footer a:focus-visible { outline-color: #E8C96A; }
.podship-footer nav a { display: block; padding: 10px 0; min-height: 44px; font-size: 14px; }
.podship-footer h2 { font-size: 19px; color: #FDFBF7; margin-bottom: 12px; }
.footer-wordmark { display: inline-block; font-family: Georgia, serif; font-size: 30px; line-height: 1.3; }
.footer-wordmark span { display: block; font-family: var(--font); font-size: 10px; text-transform: uppercase; letter-spacing: .16em; margin: 12px 0 20px; }
.footer-brand p, .podship-footer nav p { font-size: 14px; }
.footer-bottom { max-width: 1150px; margin: 32px auto 0; padding-top: 24px; border-top: 1px solid #705135; font-size: 13px; }
.noscript-note { padding: 24px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } .product-info { grid-template-columns: 1fr; gap: 32px; padding: 40px 20px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } .privacy-notes { padding: 20px; } .podship-footer { padding-inline: 20px; } }
@media print { .product-info, .podship-footer, .skip-link { display: none; } }

/* Public entry page — editorial, welcoming, and separate from child onboarding. */
[hidden] { display: none !important; }
#landing { background: #FDFBF7; color: #1A0812; }
.landing-nav { max-width: 1240px; padding: 24px 40px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid #e6ddcc; }
.school-wordmark { display: flex; gap: 12px; align-items: center; color: #4A152C; text-decoration: none; font: 19px/1.15 Georgia, serif; }
.school-wordmark strong { display: block; font-weight: 600; }
.school-seal { display: grid; place-items: center; width: 43px; height: 48px; border: 1px solid #bc9c4b; border-radius: 24px 24px 8px 8px; font-size: 28px; }
.landing-nav nav { display: flex; gap: 30px; align-items: center; }
.landing-nav nav > a { font-size: 14px; font-weight: 600; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.landing-cta { display: inline-flex; justify-content: center; align-items: center; gap: 32px; min-height: 58px; padding: 16px 28px; background: #4A152C; border: 1px solid #4A152C; border-radius: 8px; color: #FDFBF7; font-weight: 650; text-decoration: none; box-shadow: 0 5px 15px #4a152c12; transition: background .15s; }
.landing-cta:hover { background: #1A0812; color: #E8C96A; }
.landing-nav .nav-cta { padding: 12px 20px; gap: 22px; min-height: 46px; }
.landing-hero { max-width: 1240px; margin: auto; padding: 76px 40px 88px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 60px; }
.landing-kicker { color: #79612e; font-size: 11px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; margin-bottom: 24px; }
.landing-kicker span { margin-inline-end: 8px; }
#landing .hero-copy h1 { color: #4A152C; font-size: clamp(44px, 5.3vw, 70px); line-height: 1.08; font-weight: 500; letter-spacing: -.045em; margin-bottom: 24px; }
#landing .hero-copy h1 em { font-weight: 500; color: #8c6926; }
.hero-description { max-width: 440px; font-size: 16px; line-height: 1.85; color: #69515b; }
.hero-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.hero-secondary { color: #4A152C; font-size: 14px; text-decoration: none; padding-block: 14px; }
.hero-secondary span { margin-inline-start: 8px; }
.hero-reassurance { font-size: 11px; margin-top: 20px; color: #69515b; }
.hero-reassurance span { padding-inline: 8px; color: #997c40; }
.hero-art { position: relative; padding: 12px 0 24px; }
.storybook-frame { background: #F8F4E3; border: 1px solid #e4d9bd; border-radius: 190px 190px 18px 18px; padding: 42px 0 22px; text-align: center; }
.art-caption { font: italic 15px Georgia, serif; color: #7c663e; padding: 0 32px; margin-top: 14px; }
.storybook-art { width: 100%; height: auto; display: block; }
.art-label { font-size: 10px; letter-spacing: .035em; color: #695c45; padding: 0 16px; }
.art-label span { color: #997c40; margin-inline-end: 6px; }
.hero-stamp { position: absolute; right: -16px; bottom: 0; background: #FDFBF7; border: 1px solid #d7c6a2; border-radius: 8px; padding: 15px 22px; box-shadow: 0 8px 25px #4a152c09; font-size: 10px; line-height: 1.8; color: #79612e; transform: rotate(-5deg); }
.hero-stamp strong { color: #4A152C; font: 16px Georgia, serif; }
.landing-discover { background: #f4efdf; border-block: 1px solid #e5dcca; padding: 64px max(24px, calc((100% - 1160px)/2)); }
.discover-heading { text-align: center; }
.discover-heading .landing-kicker { margin-bottom: 12px; }
.discover-heading h2 { color: #4A152C; font-size: clamp(30px, 3vw, 40px); font-weight: 500; letter-spacing: -.025em; }
.discover-heading > p:last-child { color: #69515b; font-size: 14px; margin-top: 14px; }
.discovery-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.discovery-cards article { background: #FDFBF7; border: 1px solid #e1d5bf; border-radius: 12px; padding: 28px; }
.feature-symbol { color: #947330; font-size: 12px; letter-spacing: .08em; }
.discovery-cards h3 { font-size: 24px; font-weight: 500; color: #4A152C; margin-top: 28px; }
.discovery-cards p { font-size: 14px; line-height: 1.8; color: #69515b; margin-bottom: 0; }
.age-paths { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin-top: 32px; font-size: 12px; color: #69515b; }
.age-paths b { color: #4A152C; margin-inline-end: 8px; }
.age-paths a { padding-block: 14px; font-weight: 650; text-underline-offset: 5px; }
body.showing-landing #install-banner-root { display: none; }
@media (max-width: 900px) { .landing-hero { gap: 32px; padding: 52px 28px 64px; } .landing-nav { padding-inline: 28px; } #landing .hero-copy h1 { font-size: 50px; } .hero-reassurance { line-height: 1.8; } .hero-stamp { right: 0; } .discovery-cards article { padding: 22px; } }
@media (max-width: 680px) { .landing-nav { padding: 18px 20px; gap: 12px; } .school-wordmark { font-size: 16px; gap: 8px; } .school-seal { width: 34px; height: 40px; font-size: 22px; } .landing-nav nav { gap: 12px; } .landing-nav nav > a:not(.nav-cta) { display: none; } .landing-nav .nav-cta { gap: 12px; padding: 10px 14px; font-size: 12px; } .landing-hero { grid-template-columns: 1fr; padding: 44px 24px 48px; gap: 32px; } #landing .hero-copy h1 { font-size: clamp(42px, 10vw, 60px); } .hero-description { font-size: 15px; } .landing-kicker { font-size: 10px; } .hero-art { max-width: 440px; width: 100%; margin: auto; } .storybook-frame { padding-top: 24px; } .discovery-cards { grid-template-columns: 1fr; } .discovery-cards h3 { margin-top: 16px; } .landing-discover { padding: 44px 24px; } .age-paths { display: grid; grid-template-columns: 1fr; gap: 16px; } .hero-actions { gap: 18px; } }
@media print { #landing { display: none; } }

/* =====================================================================
   The Saul's Podship domain family — public pages
   Homepage strip, /apps/ directory, /about/ page and the footer block.
   Same palette as the entry page: cream paper, plum ink, gold rule.
   ===================================================================== */
.landing-family { border-top: 1px solid #e5dcca; padding: 64px max(24px, calc((100% - 1160px)/2)); background: #FDFBF7; }
.family-heading { max-width: 720px; }
.family-heading .landing-kicker { margin-bottom: 12px; }
.family-heading h2 { color: #4A152C; font-size: clamp(26px, 3.4vw, 40px); font-weight: 500; letter-spacing: -.03em; line-height: 1.18; margin-bottom: 16px; }
.family-heading p:not(.landing-kicker) { color: #69515b; font-size: 15px; line-height: 1.85; max-width: 620px; }
.family-heading strong { color: #4A152C; font-weight: 650; }
.family-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); gap: 18px; margin-top: 36px; }
.family-card { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px 20px; background: #fffdf7; border: 1px solid #e1d5bf; border-radius: 12px; color: #4A152C; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; overflow-wrap: anywhere; }
.family-card:hover, .family-card:focus-visible { border-color: #bc9c4b; box-shadow: 0 10px 24px #4a152c0f; transform: translateY(-2px); }
.family-card .family-host { font: 11px/1.5 ui-monospace, "SFMono-Regular", Consolas, monospace; color: #8c6926; letter-spacing: .01em; }
.family-card b { font: 21px/1.25 Georgia, serif; font-weight: 500; }
.family-card .family-role { font-size: 12px; font-weight: 650; color: #69515b; letter-spacing: .02em; }
.family-card .family-blurb { font-size: 13px; line-height: 1.75; color: #69515b; }
.family-card .family-go { margin-top: auto; padding-top: 12px; font-size: 12px; font-weight: 650; color: #4A152C; }
.family-flag { align-self: flex-start; margin-bottom: 4px; padding: 3px 10px; border-radius: 99px; background: #4A152C; color: #F8F4E3; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.family-card.is-current { border-color: #bc9c4b; background: #fbf5e7; }
.family-more { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 28px; font-size: 14px; }
.family-more a { color: #4A152C; font-weight: 650; text-decoration: none; padding-block: 12px; }
.family-more a span { margin-inline-start: 6px; }
.family-list { margin: 12px 0 16px; padding-inline-start: 18px; font-size: 14px; line-height: 1.9; }
.family-list li { margin-bottom: 4px; }
.family-list a { color: #4A152C; font-weight: 650; }
.family-list .host-role { color: #69515b; }
.footer-family { max-width: 1150px; margin: 32px auto 0; padding-top: 24px; border-top: 1px solid #705135; }
.footer-family h2 { font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: #E8C96A; margin-bottom: 10px; }
.footer-family ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2px 24px; }
.footer-family a { display: block; padding: 8px 0; font-size: 14px; }
.footer-family a span { display: block; font: 11px/1.5 ui-monospace, "SFMono-Regular", Consolas, monospace; color: #cbb98a; }

/* ---------- /apps/ and /about/ ---------- */
.pub-doc { background: #FDFBF7; color: #1A0812; min-height: 100dvh; }
.pub-doc .landing-nav a { color: #4A152C; }
.pub-main { max-width: 1160px; margin: auto; padding: 0 40px 72px; }
.pub-hero { padding: 60px 0 44px; border-bottom: 1px solid #e6ddcc; }
.pub-hero h1 { color: #4A152C; font-size: clamp(32px, 4.4vw, 56px); font-weight: 500; letter-spacing: -.04em; line-height: 1.1; margin-bottom: 20px; max-width: 900px; }
.pub-hero h1 em { font-style: normal; color: #8c6926; }
.pub-hero .pub-lede { max-width: 700px; font-size: 16px; line-height: 1.85; color: #69515b; }
.pub-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #79612e; }
.pub-meta span { border: 1px solid #d7c6a2; border-radius: 99px; padding: 6px 14px; }
.pub-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.pub-jump a { font: 12px/1.4 ui-monospace, "SFMono-Regular", Consolas, monospace; color: #4A152C; text-decoration: none; border: 1px solid #e1d5bf; background: #fffdf7; border-radius: 8px; padding: 9px 13px; }
.pub-jump a:hover, .pub-jump a:focus-visible { border-color: #bc9c4b; }
.pub-section { padding: 48px 0; border-bottom: 1px solid #e6ddcc; }
.pub-section:last-of-type { border-bottom: 0; }
.pub-section > h2 { color: #4A152C; font-size: clamp(24px, 3vw, 34px); font-weight: 500; letter-spacing: -.02em; margin-bottom: 14px; }
.pub-section p, .pub-section li { font-size: 15px; line-height: 1.85; color: #69515b; }
.pub-section p { max-width: 760px; }
.pub-section b, .pub-section strong { color: #4A152C; }
.app-directory { display: grid; gap: 20px; padding: 40px 0 8px; }
.app-entry { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 32px; padding: 30px 32px; background: #fffdf7; border: 1px solid #e1d5bf; border-radius: 14px; scroll-margin-top: 24px; }
.app-entry.is-current { background: #fbf5e7; border-color: #bc9c4b; }
.app-index { font: 11px/1 Georgia, serif; letter-spacing: .18em; color: #bc9c4b; margin-bottom: 10px; }
.app-entry h2 { color: #4A152C; font-size: clamp(22px, 2.6vw, 30px); font-weight: 500; letter-spacing: -.02em; margin-bottom: 8px; }
.app-flag { display: inline-block; vertical-align: middle; margin-inline-start: 10px; padding: 3px 10px; border-radius: 99px; background: #4A152C; color: #F8F4E3; font: 700 10px/1.6 var(--font); letter-spacing: .12em; text-transform: uppercase; }
.app-host { margin-bottom: 10px; font: 12px/1.6 ui-monospace, "SFMono-Regular", Consolas, monospace; overflow-wrap: anywhere; }
.app-host a { color: #8c6926; }
.app-role { font-size: 13px; font-weight: 650; color: #69515b; letter-spacing: .02em; margin: 0; }
.app-entry-body p { font-size: 15px; line-height: 1.85; color: #69515b; }
.app-inside { margin: 14px 0; padding-inline-start: 20px; }
.app-inside li { font-size: 14px; line-height: 1.8; color: #69515b; }
.app-for { font-size: 13px; }
.app-for b { color: #4A152C; }
.app-cta { margin: 16px 0 0; }
.app-cta a { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 20px; border: 1px solid #4A152C; border-radius: 8px; background: #4A152C; color: #FDFBF7; font-size: 13px; font-weight: 650; text-decoration: none; }
.app-cta a:hover, .app-cta a:focus-visible { background: #1A0812; color: #E8C96A; }
.pub-note { margin-top: 36px; padding: 26px 28px; border: 1px solid #d7c6b6; border-radius: 14px; background: #FDFBF7; }
.pub-note h2 { color: #4A152C; font-size: 20px; margin-bottom: 10px; }
.pub-note p, .pub-note li { font-size: 14px; line-height: 1.8; color: #69515b; }
.pub-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-top: 24px; padding: 0; list-style: none; }
.pub-facts li { border: 1px solid #e1d5bf; border-radius: 12px; padding: 16px 18px; background: #fffdf7; }
.pub-facts b { display: block; font: 26px/1.2 Georgia, serif; color: #4A152C; margin-bottom: 4px; }
.pub-facts span { font-size: 12px; line-height: 1.6; color: #69515b; }
.family-table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 14px; }
.family-table th, .family-table td { text-align: start; padding: 12px 14px; border-bottom: 1px solid #e1d5bf; vertical-align: top; }
.family-table th { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #79612e; }
.family-table td a { color: #8c6926; font: 12px/1.6 ui-monospace, "SFMono-Regular", Consolas, monospace; overflow-wrap: anywhere; }
.family-host-inline { font: 12px/1.6 ui-monospace, "SFMono-Regular", Consolas, monospace; color: #79612e; overflow-wrap: anywhere; }
.family-table td b { display: block; color: #4A152C; font: 500 17px/1.3 Georgia, serif; margin-bottom: 4px; }
@media (max-width: 900px) {
  .family-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landing-nav nav { gap: 18px; }
  .app-entry { grid-template-columns: 1fr; gap: 18px; padding: 24px; }
  .pub-main { padding-inline: 24px; }
  .pub-hero { padding-top: 44px; }
  .family-table { font-size: 13px; }
}
@media (max-width: 620px) {
  .landing-family { padding: 44px 24px; }
  .family-grid { grid-template-columns: 1fr; }
  .pub-main { padding-inline: 20px; }
  .pub-hero h1 { font-size: 34px; }
  .family-table, .family-table thead { display: block; }
  .family-table thead { display: none; }
  .family-table tr { display: block; padding: 14px 0; border-bottom: 1px solid #e1d5bf; }
  .family-table td { display: block; border: 0; padding: 2px 0; }
  .footer-family ul { grid-template-columns: 1fr; }
}
