/* Four distinct appearance palettes for the illustrated learning experience. */
body.child-theme-sky{--theme-page:#eef8ff;--theme-dark:#164c73;--theme-accent:#237faf;--theme-border:#c6e0ee;--theme-highlight:#8cd5f0;--theme-hero:#daefff;--theme-soft:#dff2fc;--theme-topbar:#fafdff}
body.child-theme-blossom{--theme-page:#fff1f7;--theme-dark:#754363;--theme-accent:#aa4e83;--theme-border:#efcee0;--theme-highlight:#f2a7ca;--theme-hero:#ffe0ed;--theme-soft:#ffe1ef;--theme-topbar:#fffafd}
body.child-theme-jungle{--theme-page:#effaef;--theme-dark:#245b43;--theme-accent:#3d875b;--theme-border:#cce6cf;--theme-highlight:#a7dfa7;--theme-hero:#d9f2d9;--theme-soft:#dcf2df;--theme-topbar:#fbfffb}
body.child-theme-sunrise{--theme-page:#fff7e9;--theme-dark:#81543f;--theme-accent:#b77335;--theme-border:#eddabf;--theme-highlight:#ffd789;--theme-hero:#ffe8c4;--theme-soft:#ffebce;--theme-topbar:#fffdfa}
body.theme-customized{--paper:var(--theme-page);--purple:var(--theme-accent);--stroke:var(--theme-border);background:var(--theme-page)}
body.theme-customized .sidebar,body.theme-customized .speech-hero,body.theme-customized .studio-banner,body.theme-customized .guided-path-top{background:var(--theme-dark)}
body.theme-customized .topbar{background:var(--theme-topbar)}
body.theme-customized .brand-mark{background:var(--theme-highlight)}
body.theme-customized .brand-accent,body.theme-customized .mobile-brand span:last-child{color:var(--theme-highlight)}
body.theme-customized .btn-primary{background:var(--theme-accent);box-shadow:0 5px 0 var(--theme-dark)}
body.theme-customized .btn-primary:hover:not(:disabled){background:var(--theme-dark)}
body.theme-customized .full-hero{background:linear-gradient(120deg,var(--theme-hero),#fffdf8)}
body.theme-customized .card{border-color:var(--theme-border)}
body.theme-customized .guided-target,body.theme-customized .back-link,body.theme-customized .site-credit a{color:var(--theme-accent)}
body.theme-customized .progress span,body.theme-customized .speech-dots i{background:var(--theme-accent)}
body.theme-customized .lesson-scene{outline:4px solid var(--theme-border)}
body.theme-customized .lesson-scene-indoor{background:var(--theme-hero)}
body.theme-customized .guide-art{background:linear-gradient(145deg,var(--theme-hero),#fff5db)}
body.theme-customized .mobile-nav button.active{color:var(--theme-accent)}
/* Recolour every interactive shell surface, not just primary buttons. */
body.theme-customized .side-nav .nav.active,body.theme-customized .side-nav .nav:hover{background:var(--theme-accent);color:#fff}
body.theme-customized .side-nav .nav>.nav-icon{color:var(--theme-highlight)}
body.theme-customized .side-label,body.theme-customized .sidebar-note small,body.theme-customized .mini-progress small{color:var(--theme-soft)}
body.theme-customized .sidebar-note>span,body.theme-customized .mini-progress{background:color-mix(in srgb,var(--theme-dark) 70%,var(--theme-accent));border-color:var(--theme-accent)}
body.theme-customized .mini-progress b{color:var(--theme-highlight)}
body.theme-customized .mini-progress .track span{background:var(--theme-highlight)}
body.theme-customized .mobile-nav{background:var(--theme-topbar);border-color:var(--theme-border)}
body.theme-customized .mobile-nav button.active{background:var(--theme-soft);color:var(--theme-dark);border-radius:12px}
body.theme-customized .topbar,body.theme-customized.guided-focus .topbar,body.theme-customized.landing-mode .topbar{background:var(--theme-topbar);border-color:var(--theme-border)}
body.theme-customized .stat-chip{background:var(--theme-soft);border-color:var(--theme-border)}
body.theme-customized .stat-chip strong{color:var(--theme-accent)}
body.theme-customized .language-control select{background:#fff;color:var(--theme-dark);border-color:var(--theme-border)}
body.theme-customized .brand-mark{background:var(--theme-highlight);font-size:0;box-shadow:0 0 0 2px var(--theme-border)}
body.theme-customized .brand-mark::after{content:'✦';font-size:25px;color:var(--theme-dark)}
body.theme-customized .mobile-brand .brand-mark::after{font-size:20px}
body.theme-customized .brand-accent{color:var(--theme-highlight)}
body.theme-customized .mobile-brand,body.theme-customized.guided-focus .mobile-brand,body.theme-customized.landing-mode .mobile-brand{color:var(--theme-dark)}
body.theme-customized .mobile-brand span:last-child,body.theme-customized.landing-mode .mobile-brand>span:last-child{color:var(--theme-accent)}
body.theme-customized .btn-light,body.theme-customized .guided-mode-switch,body.theme-customized .bank-play,body.theme-customized .level-pill,body.theme-customized .speech-stage-number,body.theme-customized .game-audio{background:var(--theme-soft);color:var(--theme-dark);border-color:var(--theme-border)}
body.theme-customized .btn-light:hover:not(:disabled),body.theme-customized .guided-mode-switch:hover,body.theme-customized .bank-play:hover{background:var(--theme-hero)}
body.theme-customized .speech-filter button.active,body.theme-customized .speech-tip-panel .course-mini-list .now{background:var(--theme-accent);border-color:var(--theme-accent);color:#fff}
body.theme-customized .speech-topic-tile .unit-num,body.theme-customized .speech-stage.next,body.theme-customized .guided-invite,body.theme-customized .mission-callout,body.theme-customized .full-free-check{background:var(--theme-soft);border-color:var(--theme-border)}
body.theme-customized .guided-path-switch button.active{background:var(--theme-highlight);color:var(--theme-dark);border-color:var(--theme-highlight)}
body.theme-customized .guided-path-more button,body.theme-customized .guided-next-copy h2,body.theme-customized .guided-steps strong,body.theme-customized .guided-teach-copy h2,body.theme-customized .guided-teach-phrase strong,body.theme-customized .guided-invite strong,body.theme-customized .guide-copy .guide-repeat{color:var(--theme-dark)}
body.theme-customized .guided-next-card,body.theme-customized .guided-teach-phrase{border-color:var(--theme-border)}
body.theme-customized .guided-teach-phrase,body.theme-customized .guided-steps>div,body.theme-customized .guided-teach-phrase .guided-phrase-icon{background:var(--theme-soft)}
body.theme-customized .guided-outcome{border-color:var(--theme-accent)}
body.theme-customized .guided-outcome strong,body.theme-customized .guide-target,body.theme-customized .game-speak-target,body.theme-customized .game-sentence,body.theme-customized .mission-target,body.theme-customized .mission-goal,body.theme-customized .adult-target,body.theme-customized .adult-example strong,body.theme-customized .speech-bank-card strong{color:var(--theme-accent)}
body.theme-customized .game-sentence,body.theme-customized .adult-example,body.theme-customized .entry-game-built,body.theme-customized .entry-preview,body.theme-customized .entry-notice{background:var(--theme-soft);border-color:var(--theme-border)}
body.theme-customized .game-audio{box-shadow:0 0 0 12px var(--theme-hero)}
body.theme-customized .speech-tip-panel{background:var(--theme-soft)}
body.theme-customized .adult-hero{background:linear-gradient(125deg,var(--theme-dark),var(--theme-accent))}
body.theme-customized.landing-mode .site-credit{background:var(--theme-dark)}
body.theme-customized.landing-mode .home-nav-cta{background:var(--theme-accent);color:#fff}
body.theme-customized.landing-mode .home-nav-cta:hover{background:var(--theme-dark)}
body.theme-customized.landing-mode .home-button-primary{background:var(--theme-accent);color:#fff}
body.theme-customized.landing-mode .home-button-primary:hover{background:var(--theme-dark)}
body.theme-customized.landing-mode .home-button-outline{color:var(--theme-dark);border-color:var(--theme-border)}
body.theme-customized.landing-mode .home-button-outline:hover{background:var(--theme-soft)}
body.theme-customized.landing-mode .home-button-light,body.theme-customized.landing-mode .home-audio{background:var(--theme-highlight);color:var(--theme-dark)}
body.theme-customized.landing-mode .home-hero h1,body.theme-customized.landing-mode .home-section-head h2,body.theme-customized.landing-mode .home-hero-metrics b,body.theme-customized.landing-mode .home-track h3,body.theme-customized.landing-mode .home-feature h3{color:var(--theme-dark)}
body.theme-customized.landing-mode .home-hero,body.theme-customized.landing-mode .home-tracks,body.theme-customized.landing-mode .home-faq{background:var(--theme-page)}
body.theme-customized.landing-mode .home-intro-visual,body.theme-customized.landing-mode .home-feature>span,body.theme-customized.landing-mode .home-price-free,body.theme-customized.landing-mode .home-demo-tabs,body.theme-customized.landing-mode .home-track-adult{background:var(--theme-soft)}
body.theme-customized.landing-mode .home-route-line i:first-child,body.theme-customized.landing-mode .home-route-line i:last-child{background:var(--theme-accent)}
body.theme-customized.landing-mode .home-route-line:before{background:var(--theme-border)}
body.theme-customized.landing-mode .home-text-link,body.theme-customized.landing-mode .home-price-amount,body.theme-customized.landing-mode .home-demo-tabs button.active{color:var(--theme-dark)}
body.theme-customized.landing-mode .home-try,body.theme-customized.landing-mode .home-final,body.theme-customized.landing-mode .home-mini-game{background:var(--theme-dark)}
body.theme-customized.landing-mode .home-answers button:hover{border-color:var(--theme-accent);background:var(--theme-soft)}
body.theme-customized.landing-mode .home-mini-words button{border-color:var(--theme-border);background:var(--theme-highlight);color:var(--theme-dark)}
body.theme-customized.landing-mode .home-mini-words button:hover{background:var(--theme-soft)}
body.theme-customized.landing-mode .home-mini-words .home-mini-reset{background:transparent;color:#fff;border-color:#fff8}
body.theme-customized .pre-reader-prompt:not(.pre-reader-secondary){background:var(--theme-accent);color:#fff;box-shadow:0 5px 0 var(--theme-dark)}
body.theme-customized .pre-reader-prompt.pre-reader-secondary,body.theme-customized .pre-reader-hear{background:var(--theme-soft);color:var(--theme-dark);border-color:var(--theme-border);box-shadow:none}
body.theme-customized .pre-reader-option{background:#fff;border-color:var(--theme-border)}
body.theme-customized .pre-reader-option.selected{border-color:var(--theme-accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--theme-accent) 24%,transparent)}
body.theme-customized .pre-reader-picture,body.theme-customized .pre-reader-question h2,body.theme-customized .pre-reader-transfer h2{color:var(--theme-dark)}
body.theme-customized .pre-reader-instruction{color:var(--theme-accent)}
.settings-shortcut{width:38px;height:38px;flex:none;border:1px solid var(--stroke);border-radius:50%;background:#fff;color:var(--purple);font-size:21px;cursor:pointer}
.settings-shortcut:hover,.settings-shortcut:focus-visible{outline:2px solid var(--purple);outline-offset:2px}
@media(max-width:850px){.settings-shortcut{display:none}}
.appearance-settings{max-width:1050px;margin:auto}
.appearance-settings .page-intro{max-width:65ch}
.appearance-panel{margin:24px 0;padding:clamp(18px,3vw,28px);border-radius:22px;background:#fff}
.appearance-panel h2{font:600 clamp(22px,3vw,29px) Fredoka,'Noto Sans Khmer',sans-serif;margin:0 0 5px}
.appearance-panel>p{color:var(--muted);font-size:13px;margin:0 0 20px}
.appearance-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.appearance-option{display:block;width:100%;padding:8px;border:3px solid var(--theme-border);border-radius:19px;background:#fff;text-align:left;color:var(--ink);cursor:pointer}
.appearance-option:hover,.appearance-option:focus-visible{border-color:var(--theme-accent);outline-offset:2px}
.appearance-option[aria-pressed=true]{border-color:var(--theme-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--theme-accent) 18%,transparent)}
.appearance-sky{--theme-border:#c6e0ee;--theme-accent:#237faf;--theme-hero:#daefff;--theme-hill:#86c2dc;--theme-highlight:#ffd280}
.appearance-blossom{--theme-border:#efcee0;--theme-accent:#aa4e83;--theme-hero:#ffe0ed;--theme-hill:#e9a6c1;--theme-highlight:#ffd194}
.appearance-jungle{--theme-border:#cce6cf;--theme-accent:#3d875b;--theme-hero:#d9f2d9;--theme-hill:#91ca8f;--theme-highlight:#f9d480}
.appearance-sunrise{--theme-border:#eddabf;--theme-accent:#b77335;--theme-hero:#ffe8c4;--theme-hill:#e7bd77;--theme-highlight:#ffdb87}
.appearance-preview{position:relative;display:block;height:130px;overflow:hidden;border-radius:12px;background:var(--theme-hero)}
.appearance-sun{position:absolute;top:12px;right:18%;width:32px;height:32px;border-radius:50%;background:var(--theme-highlight)}
.appearance-hill{position:absolute;left:-5%;right:-5%;bottom:-45px;height:105px;border-radius:50% 50% 0 0;background:var(--theme-hill)}
.appearance-preview img{position:absolute;bottom:-11px;height:110px;max-width:43%;object-fit:contain;filter:drop-shadow(0 3px 3px #3445)}
.appearance-preview img:nth-of-type(1){left:18%}.appearance-preview img:nth-of-type(2){right:18%}
.appearance-label{display:flex;align-items:center;gap:9px;padding:10px 5px 3px;font-size:16px}
.appearance-label i{width:17px;height:17px;border-radius:50%;background:var(--theme-accent)}
.appearance-selected{margin-left:auto;color:var(--theme-accent);font-size:22px;opacity:0}
.appearance-option[aria-pressed=true] .appearance-selected{opacity:1}
.appearance-back{margin:0 0 20px}
@media(max-width:650px){.appearance-grid{gap:10px}.appearance-preview{height:110px}.appearance-preview img{height:95px}.appearance-label{font-size:13px}}
