/* One readable theme for every learning surface. The art paper remains white. */
html[data-theme=dark]{--muted:#303f60;--muted-foreground:#c6d2e8;--background:#141c30;--foreground:#f3f5ff;--card:#223047;--card-foreground:#f3f5ff;--popover:#223047;--popover-foreground:#f3f5ff;--secondary:#33435f;--secondary-foreground:#f3f5ff;--accent:#33435f;--accent-foreground:#f3f5ff;--input:#7c8ba8;--border:#647493}
html[data-theme=light]{color-scheme:light}
html[data-theme=dark] :is(.chart-heading h2,.chart-letter,.chart-number,.chart-item strong,.lesson-word,.setup-label,.mm-question,.mm-memory .mm-card,.feedback-name,.footer-brand){color:#e7d9ff}
html[data-theme=dark] :is(.book-placeholder,.book-cover,.story-cover,.studio,.photo-story,.story-reading,.learning-panel,.complete-panel){background:#223047;color:#f3f5ff;border-color:#647493}
html[data-theme=dark] :is(.studio-controls label,.paint-tools label,.coloring-book-card h2,.coloring-book-card>span,.story-card-copy strong,.photo-story h2,.mm-prompt){color:#f3f5ff}
html[data-theme=dark] :is(.studio-status,.manager-status,.story-lesson,.mm-status){color:#a0edc5}
html[data-theme=dark] :is(.story-filters button,.story-back,.story-listen,.studio [data-slot=select-trigger],.chart-tools [data-slot=select-trigger],.studio [data-slot=tabs-list],.studio [data-slot=button][data-variant=outline]){background:#33435f;color:#f3f5ff;border-color:#7c8ba8}
html[data-theme=dark] .story-filters button.selected{background:#7655c6;color:#fff}
html[data-theme=dark] [data-slot=select-content]{background:#223047;color:#f3f5ff;border-color:#7c8ba8}
html[data-theme=dark] [data-slot=select-item][data-highlighted]{background:#465673;color:#fff}
html[data-theme=dark] .studio [data-slot=tabs-trigger][data-state=active]{background:#7655c6;color:#fff}
html[data-theme=dark] :is(.color-choice.active,.color-choice:focus-visible){outline-color:#f4e8ff}
html[data-theme=dark] :is(.story-credit,.story-page-number,.site-footer,.contact-details,.chart-heading p,.story-card-copy>span){color:#c6d2e8}
html[data-theme=dark] .studio [data-slot=slider-track]{background:#73819b}
html[data-theme=dark] .studio [data-slot=slider-range]{background:#c1a8ff}
html[data-theme=dark] .studio [data-slot=slider-thumb]{background:#f8f2ff;border-color:#a58adf}
html[data-theme=dark] .drawing-area,html[data-theme=dark] .drawing-area p{color:#273354}
@media(min-width:761px){
 body>main,main:is(.shop-page,.charts-page,.coloring-page,.stories-page,.account-page,.manager-page),header.site-header,header:has(>.brand),.site-footer,.contact-details,.friends-ribbon{width:100%;max-width:none;margin-inline:0;padding-inline:clamp(24px,3vw,64px)}
 main{min-width:0}.welcome{width:100%;padding:clamp(32px,4vw,70px);min-height:440px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 .welcome-copy{max-width:680px}.welcome .character-stage{justify-self:center;width:min(100%,620px)}
 .stories-intro{max-width:1000px}.mm-mind{max-width:none}.mm-board{max-width:1300px;margin-inline:auto}
 .activity-grid{grid-template-columns:repeat(auto-fit,minmax(250px,1fr))}.chart-item-grid{grid-template-columns:repeat(auto-fit,minmax(175px,1fr))}
 .photo-story-grid{grid-template-columns:repeat(auto-fit,minmax(290px,1fr))}
 .photo-story{max-width:1500px;margin-inline:auto}.story-reader{max-width:none}
}
.studio{border-radius:28px;border:1px solid #d9d2ee;box-shadow:0 14px 40px #42326a12}
.studio-workspace{grid-template-columns:280px minmax(0,1fr);align-items:start;gap:24px;background:linear-gradient(135deg,#f5efff,#edfaff)}
.paint-tools{padding:22px;background:#fff;border:1px solid #ded6ee;border-radius:24px;gap:16px}
.studio-tool-heading{display:flex;flex-direction:column;gap:8px}.studio-safe-badge{display:inline-flex;align-items:center;gap:6px;font-size:.8rem;font-weight:700;color:#216544}
.studio-tool-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.studio-tool-buttons button{display:flex;flex-direction:column;align-items:center;gap:7px;min-height:70px;padding:12px 5px;border:1px solid #ded6ee;border-radius:16px;background:#f6f2ff;color:#4d3879;font:inherit;font-size:.8rem;font-weight:750;cursor:pointer}
.studio-tool-buttons button.selected{background:#7652ce;color:#fff;border-color:#7652ce;box-shadow:0 3px 0 #4c3690}
.studio-history{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.paint-tools .palette{grid-template-columns:repeat(auto-fit,minmax(40px,1fr))!important;gap:10px!important}
.drawing-area{padding:clamp(14px,2vw,30px);border:1px solid #d5ddeb;background:linear-gradient(135deg,#dfeaf7,#ece5f8);border-radius:24px}
.drawing-area canvas{width:100%;max-width:1100px;margin-inline:auto;aspect-ratio:auto;min-height:0;box-shadow:0 8px 25px #3034541c;border:1px solid #dce0e7}
.drawing-area p{text-align:center;max-width:700px;margin:18px auto 0;line-height:1.6}
.studio-status{padding:13px 18px;border:1px solid #d5e8d8;background:#effbf2;border-radius:16px}
.drawing-page-gallery button.selected{border-color:#7752cc;box-shadow:0 0 0 2px #bc9eef55}
html[data-theme=dark] .studio-workspace{background:linear-gradient(135deg,#211e36,#1c2c3e)}
html[data-theme=dark] .paint-tools{background:#223047;border-color:#65728b}
html[data-theme=dark] .studio-tool-buttons button{background:#33435f;color:#f3f5ff;border-color:#6b7b99}
html[data-theme=dark] .studio-tool-buttons button.selected{background:#7652ce;color:#fff}
html[data-theme=dark] .studio-safe-badge{color:#a0edc5}
html[data-theme=dark] .studio-status{background:#203d35;color:#a0edc5;border-color:#568673}
@media(max-width:850px){.studio-workspace{grid-template-columns:minmax(0,1fr)}.paint-tools{display:flex;flex-direction:column;padding:18px}.studio-tool-heading{flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:wrap}.studio-tool-buttons{width:100%}.studio-history{width:100%}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
.story-cover img,.photo-story .story-photo{object-fit:contain;background:#e8f4ff;aspect-ratio:1672/941;width:100%;height:auto}
.story-cover{height:auto;aspect-ratio:1672/941}.photo-story-card{border-color:#d6d9ec}
.story-text{font-size:clamp(18px,1.35vw,23px);line-height:1.85;max-width:750px}
.photo-story .story-reading{padding:clamp(22px,3vw,44px)}
html[data-theme=dark] .photo-story-card{background:#2d3553;color:#f3f5ff;border-color:#667797}
html[data-theme=dark] .photo-story-card .story-card-copy strong{color:#f3f5ff}
html[data-theme=dark] .photo-story-card .story-card-copy small{color:#d6ddf4}
html[data-theme=dark] .story-lesson{background:#263c3a;color:#b9f3d2;border-color:#578571}
html[data-theme=dark] .photo-story .story-reading .story-text{color:#edf2ff}
html[data-theme=dark] :is(.header-note,.complete-copy,footer){color:#c6d2e8}
@media(min-width:761px){body>footer{width:100%;max-width:none;padding-inline:clamp(24px,3vw,64px)}}
.chart-topics>button>span:first-child>svg{width:44px;height:44px}
