:root{--theme-soft:#eaf0df;--theme-border:#dce5cc;--theme-text:#496039;--theme-highlight:#d8e9b1;--theme-on-accent:#f4f6e8;--theme-muted-accent:#d1e2d4;--theme-progress:#789954}
[data-theme=blue]{--bg:#f4f7fc;--ink:#273d52;--muted:#65758a;--green:#245b89;--dark:#19476e;--line:#dce4ef;--soft:#eaf1f9;--theme-soft:#e7effa;--theme-border:#cddced;--theme-text:#315d82;--theme-highlight:#c9dff6;--theme-on-accent:#f2f7ff;--theme-muted-accent:#dae9f8;--theme-progress:#5d87b2}
[data-theme=rose]{--bg:#fcf6f8;--ink:#4d3440;--muted:#806773;--green:#8b435f;--dark:#71334b;--line:#eadce3;--soft:#f8eaf0;--theme-soft:#f8e6ee;--theme-border:#e9cdda;--theme-text:#7d3f59;--theme-highlight:#efd0df;--theme-on-accent:#fff4f8;--theme-muted-accent:#f4dce7;--theme-progress:#b67492}
[data-theme=lilac]{--bg:#f8f6fc;--ink:#44374f;--muted:#7c6c88;--green:#6e4d8d;--dark:#563973;--line:#e5ddee;--soft:#f0eaf8;--theme-soft:#eee7f6;--theme-border:#dcd0e9;--theme-text:#654982;--theme-highlight:#ddcdec;--theme-on-accent:#fbf5ff;--theme-muted-accent:#ebdef6;--theme-progress:#9a7cb5}
[data-theme=sand]{--bg:#faf7f1;--ink:#493d2e;--muted:#7c7161;--green:#795b36;--dark:#624829;--line:#e8e0d3;--soft:#f4ecdf;--theme-soft:#f1e8d8;--theme-border:#e3d5bd;--theme-text:#74562e;--theme-highlight:#e7d6b5;--theme-on-accent:#fff8ec;--theme-muted-accent:#efe2cd;--theme-progress:#a68a5d}
body{background:var(--bg);color:var(--ink)}.topbar{background:var(--bg)}.navlink.active,.navlink:hover{background:var(--soft);color:var(--green)}.parent .navlink.active{background:var(--green);color:white}.hero h2{color:var(--theme-on-accent)}.hero-tag,.hero p,.art-caption{color:var(--theme-muted-accent)}.art-book{background:var(--theme-highlight);box-shadow:10px 13px 0 #0001,inset 8px 0 #0002;border-right-color:var(--theme-border)}.book-lines b{background:var(--green)}.art-check{background:var(--theme-soft)}.art-star{color:var(--theme-highlight)}.light-button{background:var(--theme-soft);color:var(--green)}.wallet-card,.balance-panel,.round-overview{background:var(--theme-soft);border-color:var(--theme-border)}.soft,.reward-pill{background:var(--theme-soft);color:var(--theme-text)}.round-icon{border-color:var(--theme-border)}.progress-track::-webkit-progress-value{background:var(--theme-progress)}.progress-track::-moz-progress-bar{background:var(--theme-progress)}.answer-option:has(input:checked){background:var(--soft)}.answer-option:has(input:checked) .option-letter{background:var(--theme-highlight);color:var(--green)}.sidebar .profile .avatar{background:var(--theme-soft);color:var(--green)}
/* Green remains the semantic colour for a confirmed correct answer in every theme. */
.child-switcher{display:flex;align-items:center;gap:9px;flex-direction:row;max-width:240px;font-size:11px}.child-switcher select{font-size:12px;min-height:36px;padding:7px 30px 7px 10px;background:white}.children-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.child-card{border-top:5px solid var(--green)}.child-card-header{display:flex;align-items:center;gap:12px;margin-bottom:15px}.child-card h2{font-size:21px;margin:0}.child-card .avatar{background:var(--theme-soft);color:var(--green)}.child-card p{font-size:12px;color:var(--muted)}.child-card .button-row{justify-content:space-between}.theme-choices{display:flex;flex-wrap:wrap;gap:12px;border:0;padding:0;margin:0}.theme-choices legend{font-size:12px;font-weight:650;margin-bottom:12px}.theme-choice{display:flex;flex-direction:row;align-items:center;gap:8px;font-size:12px;cursor:pointer;padding:9px 12px;border:1px solid var(--line);border-radius:9px;min-height:44px;background:white}.theme-choice:has(input:checked){border-color:var(--green);outline:1px solid var(--green)}.theme-choice input{accent-color:var(--green)}.theme-dot{width:17px;height:17px;border-radius:50%;background:var(--green);border:3px solid var(--theme-highlight)}.theme-preview{border:1px solid var(--theme-border);border-radius:12px;padding:22px;background:var(--bg);color:var(--ink);margin:20px 0}.theme-preview strong{display:block;font-size:20px}.theme-preview p{font-size:12px;color:var(--muted);margin:10px 0 15px}.theme-preview .preview-pill{display:inline-block;background:var(--green);color:white;padding:8px 12px;border-radius:7px;font-size:12px}.profile-help{font-size:11px;color:var(--muted);margin:8px 0 0}.context-name{color:var(--green);font-weight:750}.child-card .big-number{font-size:34px;margin:12px 0}.child-card .big-number span{font-size:12px}@media(max-width:800px){.child-switcher{max-width:210px}.parent .top-status{display:none}.parent .breadcrumb{max-width:40%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.parent .topbar{gap:12px}}@media(max-width:560px){.children-grid{grid-template-columns:1fr;gap:16px}.child-switcher{max-width:195px;font-size:10px}.child-switcher select{font-size:16px;min-height:38px;padding:7px 24px 7px 8px}.parent .breadcrumb{font-size:9px;max-width:29%}.theme-choice{padding:9px;font-size:11px;gap:6px}.theme-choices{gap:8px}.theme-preview{padding:18px}}
/* Exhausted attempts are a red status in every personal colour palette. */
.question-panel.attempts-exhausted{border-color:#d8a6a6}.feedback.exhausted{background:#fff0f0;border-color:#dfabab;color:#8a2929}.question-dot.exhausted{background:#fbe6e6;border-color:#c57b7b;color:#8a2929;font-weight:800}.question-dot.exhausted.current{outline-color:#a53333}.result-questions .exhausted{background:#fbe6e6;color:#8a2929}.badge.red{background:#fbe6e6;color:#8a2929}.question-top>.small{max-width:65%;text-align:right;line-height:1.7}.attempts-exhausted input:disabled{border-color:#d8aaaa;color:#763c3c;background:#fff9f9}
.question-top>.small{font-size:12px;font-weight:650}
.sync-state{font-size:10px;line-height:1.7;color:var(--muted);margin-top:12px;display:flex;align-items:flex-start;gap:6px}.sync-state::before{content:'';width:6px;height:6px;flex-shrink:0;background:#578344;border-radius:50%;margin-top:5px}.sync-state[data-state=error]::before,.sync-state[data-state=offline]::before{background:#a7792e}.sync-state[data-state=loading]::before{background:#507a9b}.sync-state[data-state=paused]::before{background:#8b948b}@media(max-width:800px){.sidebar .sync-state{position:absolute;right:20px;bottom:3px;font-size:8px;margin:0;max-width:180px}.sidebar .sync-state::before{width:4px;height:4px;margin-top:5px}.sidebar nav{padding-bottom:20px}}

.pool-question{padding:1.15rem 0;border-bottom:1px solid var(--line,#dde5e0)}.pool-question summary{cursor:pointer;font-weight:600;line-height:1.5}
.celebration{position:fixed;z-index:1000;left:50%;top:22%;transform:translateX(-50%);background:#f3fff6;color:#145c35;border:1px solid #a5d9b4;box-shadow:0 16px 60px #123b2829;border-radius:24px;padding:24px 32px;text-align:center;pointer-events:none;animation:celebration-pop .32s ease-out;max-width:calc(100vw - 32px);width:max-content}.celebration-check{display:flex;align-items:center;justify-content:center;background:#21854b;color:white;border-radius:50%;width:64px;height:64px;margin:0 auto 12px}.celebration-check svg{width:36px;height:36px}.celebration strong{display:block;font-size:1.2rem}.round-celebration{width:460px}.round-celebration h2{font-size:1.65rem;margin:12px 0}.round-celebration p{line-height:1.5;margin:12px 0}.answer-celebration{top:30%}
@keyframes celebration-pop{from{opacity:0;transform:translateX(-50%) scale(.75)}to{opacity:1;transform:translateX(-50%) scale(1)}}
@media(prefers-reduced-motion:reduce){.celebration{animation:none}}

.question-image{margin:20px 0}.image-zoom{display:flex;flex-direction:column;align-items:center;gap:10px;max-width:100%;padding:12px;border:1px solid #dce5df;border-radius:16px;background:#f8faf9;color:#385548;cursor:zoom-in}.question-image img{display:block;max-width:100%;max-height:380px;object-fit:contain;border-radius:8px}.image-zoom span{font-size:.8rem}.image-editor{padding:16px;border:1px dashed #bdcfc4;border-radius:12px}.image-editor input[type=file]{margin:8px 0}.image-editor .small{display:block}#image-viewer{border:0;border-radius:18px;padding:16px;max-width:94vw;max-height:94dvh;background:white;box-shadow:0 24px 90px #0005}#image-viewer::backdrop{background:#14251fcc}#image-viewer img{display:block;max-width:86vw;max-height:78dvh;object-fit:contain;margin-top:12px}.image-close{display:block;margin-left:auto}

.giveup-action{display:flex;flex-direction:column;gap:2px}.giveup-action small{font-size:.75rem;color:#7b4c37;max-width:220px}.giveup-action .text-button{padding-left:0;text-align:left}

#round-outcome{border:1px solid #e5cac8;border-radius:24px;padding:28px;max-width:min(480px,calc(100vw - 32px));text-align:center;color:#6b3335;background:#fff8f6;box-shadow:0 18px 70px #38272c33}#round-outcome::backdrop{background:#23212c66}#round-outcome h2{font-size:1.6rem;line-height:1.3;margin:12px 0}#round-outcome p{line-height:1.55}#round-outcome small{display:block;margin-top:18px}#round-outcome .outcome-icon{display:inline-flex;align-items:center;justify-content:center;width:58px;height:58px;border-radius:50%;background:#f2deda}#round-outcome .outcome-icon svg{width:28px;height:28px}#round-outcome.outcome-waiting{background:#f6f8ff;border-color:#d5daec;color:#3f4c70}

.delete-action{color:#a13d47}.delete-action:hover{color:#772532;background:#fff0f0}
