/* Grades 4–5 only. K–3 (grade-k2) is unchanged. Scoped so v12 look stays exact. */

body.theme-g45{
  --g45-bg:#0B1220;
  --g45-panel:#141C2E;
  --g45-ink:#E8EEF8;
  --g45-muted:#9AA8C2;
  --g45-line:#2A3550;
  --g45-accent:#5B8CFF;
  --g45-teal:#1EE0C0;
  --g45-gold:#F5C518;
  --g45-mag:#FF3D8A;
  --g45-deep:#070B16;
}
body.theme-g45.mode-kid,
body.theme-g45.mode-kid.has-story{
  background:var(--story-sky,#0B1220) !important;
}

.kid-shell.grade-g45{
  color:#E8EEF8;
  font-weight:600;
}
.kid-shell.grade-g45 .kid-scroll{padding:0 16px 10px}

/* Sleeker chrome: ink bar, no yellow bubble */
.kid-shell.grade-g45 .kid-topbar{
  background:#0B1220 !important;
  border-bottom:1px solid #2A3550 !important;
  box-shadow:none;
}
.kid-shell.grade-g45 .kid-topbar .brand-name,
.kid-shell.grade-g45 .kid-topbar .brand-sub,
.kid-shell.grade-g45 .who,
.kid-shell.grade-g45 .who span span{
  color:#E8EEF8 !important;
  opacity:1;
}
.kid-shell.grade-g45 .kid-topbar .brand-sub,
.kid-shell.grade-g45 .who span span{color:#9AA8C2 !important;letter-spacing:.06em}
.kid-shell.grade-g45 .kid-topbar .brand-name{font-weight:700;letter-spacing:-.03em}
.kid-shell.grade-g45 .kid-icon-btn{
  width:42px;height:42px;border-width:2px !important;border-radius:12px;
  box-shadow:none;background:#141C2E;color:#E8EEF8;border-color:#2A3550 !important;
}
.kid-shell.grade-g45 .kid-icon-btn.grownup{background:#5B8CFF;color:#fff;border-color:#5B8CFF !important}

.kid-shell.grade-g45 .kid-hero h1{
  color:#F4F7FF;text-shadow:none;letter-spacing:-.045em;font-weight:700;
  font-size:clamp(1.7rem,7vw,2.25rem);
}
.kid-shell.grade-g45 .kid-hero .kicker{color:#1EE0C0;font-size:.7rem;letter-spacing:.12em}
.kid-shell.grade-g45 .kid-hero p{color:#E8EEF8}

/* Solid readable pills over art, less bubble */
.kid-shell.grade-g45.has-story .kid-hero p,
body.theme-g45.has-story .kid-shell.grade-g45 .kid-hero p,
body.theme-g45 .kid-shell.grade-g45 .howto,
body.theme-g45 .kid-shell.grade-g45 .pin-wrap p{
  background:rgba(11,18,32,.88);color:#E8EEF8;border:1px solid #2A3550;border-radius:8px;
}
body.theme-g45 .kid-shell.grade-g45 .kid-hero .kicker,
body.theme-g45 .kid-shell.grade-g45 .kid-lesson-wrap .kicker{
  background:#141C2E;color:#1EE0C0;border:1px solid #2A3550;
}

.kid-shell.grade-g45 .picker-card,
.kid-shell.grade-g45 .kid-subj,
.kid-shell.grade-g45 .choice,
.kid-shell.grade-g45 .key,
.kid-shell.grade-g45 .result-card,
.kid-shell.grade-g45 .kid-chapel-card,
.kid-shell.grade-g45 .kid-discuss{
  border-width:2px !important;
  border-color:#1A2236 !important;
  border-radius:14px !important;
  box-shadow:0 10px 24px rgba(0,0,0,.35) !important;
}
.kid-shell.grade-g45 .picker-card{background:#141C2E;color:#E8EEF8}
.kid-shell.grade-g45 .picker-card h2{color:#F4F7FF}
.kid-shell.grade-g45 .picker-card p{color:#9AA8C2}

.kid-shell.grade-g45 .today-card{
  background:#1A2A6A !important;
  border-width:2px !important;
  border-radius:16px !important;
  box-shadow:0 12px 28px rgba(0,0,0,.4) !important;
}
.kid-shell.grade-g45 .today-card .go,
.kid-shell.grade-g45 .cta,
.kid-shell.grade-g45 button.cta,
.kid-shell.grade-g45 .av-done,
.kid-shell.grade-g45 .av-build{
  background:#FF3D8A !important;
  color:#fff !important;
  border-width:2px !important;
  border-radius:12px !important;
  box-shadow:0 6px 16px rgba(255,61,138,.28) !important;
  min-height:48px;
  font-weight:700;
}
.kid-shell.grade-g45 .kid-btn-chapel,
.kid-shell.grade-g45 .today-card.chapel-cta,
.kid-shell.grade-g45 a.kid-btn-chapel{
  background:#F5C518 !important;
  color:#0B1220 !important;
  border-width:2px !important;
  border-radius:12px !important;
  box-shadow:0 6px 16px rgba(0,0,0,.25) !important;
}

.kid-shell.grade-g45 .kid-subj{min-height:80px;color:#0B1220}
.kid-shell.grade-g45 .kid-subj:nth-child(6n+1){background:#F5C518 !important}
.kid-shell.grade-g45 .kid-subj:nth-child(6n+2){background:#1EE0C0 !important}
.kid-shell.grade-g45 .kid-subj:nth-child(6n+3){background:#FF3D8A !important;color:#fff}
.kid-shell.grade-g45 .kid-subj:nth-child(6n+4){background:#7B2FF7 !important;color:#fff}
.kid-shell.grade-g45 .kid-subj:nth-child(6n+5){background:#FF7A00 !important;color:#fff}
.kid-shell.grade-g45 .kid-subj:nth-child(6n+6){background:#5B8CFF !important;color:#fff}
.kid-shell.grade-g45 .kid-subj .glyph{border-width:2px;border-radius:10px}

.kid-shell.grade-g45 .kid-subj:active,
.kid-shell.grade-g45 .picker-card:active,
.kid-shell.grade-g45 .choice:active,
.kid-shell.grade-g45 .cta:active,
.kid-shell.grade-g45 .dock-btn:active,
.kid-shell.grade-g45 .today-card:active{
  transform:translateY(1px) scale(.99);
  box-shadow:0 4px 12px rgba(0,0,0,.3) !important;
}

/* Dock — kid.css uses !important on Home/Chapel colors; beat it here */
.kid-shell.grade-g45 .kid-dock{
  background:#0B1220 !important;
  border:1px solid #2A3550 !important;
  border-radius:16px !important;
  box-shadow:none !important;
  padding:8px 10px calc(8px + env(safe-area-inset-bottom,0px)) !important;
  margin:8px 12px calc(10px + env(safe-area-inset-bottom,0px));
}
.kid-shell.grade-g45 .dock-btn{
  min-height:48px !important;border-radius:12px !important;border-width:2px !important;
  box-shadow:none !important;font-weight:700 !important;
  background:#141C2E !important;color:#E8EEF8 !important;border-color:#2A3550 !important;
}
.kid-shell.grade-g45 .dock-btn.on{
  background:#5B8CFF !important;color:#fff !important;border-color:#5B8CFF !important;
  box-shadow:none !important;
}
.kid-shell.grade-g45 .dock-btn.dock-chapel,
.kid-shell.grade-g45 .dock-btn[data-go="kid/chapel"],
.kid-shell.grade-g45 .dock-chapel.on{
  background:#F5C518 !important;color:#0B1220 !important;border-color:#F5C518 !important;
}
.kid-shell.grade-g45 .dock-btn.dock-home,
.kid-shell.grade-g45 .dock-btn[data-go="kid/home"]{
  background:#1EE0C0 !important;color:#0B1220 !important;border-color:#1EE0C0 !important;
}
.kid-shell.grade-g45 .dock-btn.dock-play,
.kid-shell.grade-g45 .dock-btn[data-go="kid/play"]{
  background:#7B2FF7 !important;color:#fff !important;border-color:#7B2FF7 !important;
}
.kid-shell.grade-g45 .dock-btn.dock-play.on,
.kid-shell.grade-g45 .dock-play.on{
  background:#9B5CFF !important;border-color:#9B5CFF !important;color:#fff !important;
}

/* Story chip / banner */
.kid-shell.grade-g45 .story-chip,
.kid-shell.grade-g45 .story-banner .story-chip{
  background:#0B1220 !important;color:#F4F7FF !important;
  border:2px solid #2A3550 !important;border-radius:10px;box-shadow:none !important;
  font-weight:700;font-size:.8rem;
}
.kid-shell.grade-g45 .story-chip-title,
.kid-shell.grade-g45 .story-chip-kicker{color:#F4F7FF !important}
.kid-shell.grade-g45 .story-chip-ref{color:#9AA8C2 !important;opacity:1}
.kid-shell.grade-g45 .story-banner{
  border-width:2px;border-color:#1A2236;border-radius:16px;box-shadow:0 8px 20px rgba(0,0,0,.35);
}

/* Board */
.kid-shell.grade-g45 .board-hero,
.kid-shell.grade-g45 .board-head div{
  background:#141C2E;color:#E8EEF8;border:2px solid #2A3550;box-shadow:none;border-radius:14px;
}
.kid-shell.grade-g45 .board-hero h1,
.kid-shell.grade-g45 .board-hero .board-progress,
.kid-shell.grade-g45 .board-hero .kicker{color:#E8EEF8;text-shadow:none}
.kid-shell.grade-g45 .board-hero .kicker{color:#1EE0C0}
.kid-shell.grade-g45 .board-cell{
  border-width:2px;border-radius:14px;box-shadow:0 8px 18px rgba(0,0,0,.3);
  min-height:82px;
}
.kid-shell.grade-g45 .board-cell.is-open{background:#FF3D8A !important}
.kid-shell.grade-g45 .board-cell.is-cleared{background:#F5C518 !important;color:#0B1220}
.kid-shell.grade-g45 .board-win{
  background:#141C2E;color:#E8EEF8;border:2px solid #2A3550;
  border-radius:18px;box-shadow:0 16px 32px rgba(0,0,0,.4);
}
.kid-shell.grade-g45 .board-win h1{color:#F4F7FF;text-shadow:none}
.kid-shell.grade-g45 .board-win p{color:#C5D0E6}
.kid-shell.grade-g45 .board-win .win-avatar{
  background:#0B1220;border:2px solid #2A3550;border-radius:16px;box-shadow:none;
}
.kid-shell.grade-g45 .board-play{background:#0B1220;color:#F5C518}

/* Forms, results, chapel, pin */
.kid-shell.grade-g45 .result-card{background:#141C2E;color:#E8EEF8}
.kid-shell.grade-g45 .result-card.pass{background:#F5C518;color:#0B1220}
.kid-shell.grade-g45 .result-card.fail{background:#3A1830;color:#E8EEF8}
.kid-shell.grade-g45 .choice{background:#141C2E;color:#E8EEF8}
.kid-shell.grade-g45 .choice.right{background:#F5C518;color:#0B1220}
.kid-shell.grade-g45 .speak-btn{background:#5B8CFF;border-width:2px;box-shadow:none;border-radius:12px}
.kid-shell.grade-g45 .key{background:#141C2E;color:#E8EEF8;border-radius:12px}
.kid-shell.grade-g45 .dots b.fill{background:#5B8CFF}
.kid-shell.grade-g45 .kid-chapel-card:nth-child(odd){background:#F5C518;color:#0B1220}
.kid-shell.grade-g45 .kid-chapel-card:nth-child(3n){background:#1EE0C0;color:#0B1220}
.kid-shell.grade-g45 .celebrate{color:#E8EEF8}
.kid-shell.grade-g45 .celebrate h1{text-shadow:none;color:#F4F7FF}

/* Avatar maker */
.kid-shell.grade-g45 .av-preview,
.kid-shell.grade-g45 .av-choice{
  background:#141C2E;border:2px solid #2A3550;border-radius:14px;box-shadow:none;color:#E8EEF8;
}
.kid-shell.grade-g45 .av-choice[aria-pressed="true"]{background:#5B8CFF;color:#fff;border-color:#5B8CFF}
.kid-shell.grade-g45 .av-panels h3{color:#9AA8C2;font-weight:700}
.kid-shell.grade-g45 .av-swatch{border-width:2px}
.kid-shell.grade-g45 .av-build{border-radius:12px;border-width:2px;background:#FF3D8A !important;color:#fff !important}

/* section labels */
.kid-shell.grade-g45 .section-label h2{color:#F4F7FF;text-shadow:none}
.kid-shell.grade-g45 .story-strip .story-dot{background:#141C2E;border-color:#2A3550}

.kid-shell.grade-g45 .board-win{position:relative;overflow:hidden}
.kid-shell.grade-g45 .board-win .confetti,
.kid-shell.grade-g45 .board-win .spark{z-index:0;pointer-events:none}
.kid-shell.grade-g45 .board-win .cta,
.kid-shell.grade-g45 .board-win .kid-btn-chapel,
.kid-shell.grade-g45 .board-win .win-avatar,
.kid-shell.grade-g45 .board-win h1,
.kid-shell.grade-g45 .board-win p,
.kid-shell.grade-g45 .board-win .kicker{position:relative;z-index:1}

.kid-shell.grade-g45 .kid-lesson-wrap h1,
.kid-shell.grade-g45 .kid-lesson h1{
  color:#F4F7FF;text-shadow:0 1px 2px rgba(0,0,0,.85),0 0 14px rgba(11,18,32,.7);
}

/* Full-page art is a mature landscape only; a soft veil keeps cards readable. */
body.theme-g45.mode-kid.has-story{
  background:var(--story-sky,#0B1220) !important;
}
.kid-shell.grade-g45 .kid-story-bg::after{
  content:"";
  position:absolute;inset:0;
  background:linear-gradient(180deg, rgba(11,18,32,.12) 0%, rgba(11,18,32,.28) 48%, rgba(7,11,22,.62) 100%);
  pointer-events:none;
}
.kid-shell.grade-g45 .story-banner{
  background:var(--story-sky,#0B1220);
}

/* Avatar maker: all rows reachable at phone size; no dock overlap */
@media (max-width:430px){
  .kid-shell.grade-g45 .av-hero{margin:0 0 4px}
  .kid-shell.grade-g45 .av-hero p{margin:4px 0 0;font-size:.78rem;line-height:1.3}
  .kid-shell.grade-g45 .av-hero h1{font-size:1.45rem;margin:0}
  .kid-shell.grade-g45 .av-preview{
    height:108px;margin:0 0 8px;position:sticky;top:0;z-index:4;
    background:#141C2E;
  }
  .kid-shell.grade-g45 .av-preview svg{width:80px;height:100px}
  .kid-shell.grade-g45 .av-panels section{margin:0 0 6px}
  .kid-shell.grade-g45 .av-panels h3{margin:0 0 4px;font-size:.64rem}
  .kid-shell.grade-g45 .av-row{gap:6px;padding:0 0 4px}
  .kid-shell.grade-g45 .av-row.swatches{flex-wrap:wrap;overflow:visible}
  .kid-shell.grade-g45 .av-choice{width:52px;min-height:52px;padding:4px}
  .kid-shell.grade-g45 .av-row.parts .av-choice{width:62px;min-height:70px}
  .kid-shell.grade-g45 .av-choice svg{width:40px;height:40px}
  .kid-shell.grade-g45 .av-done{margin:8px 0 16px}
}
