/* V3 working draft: retain ROYAL logo; cheerful activity colors. */
:root{--dark:#153d5e;--purple:#17628d;--gold:#ffd34b;--cream:#f5fcff;--line:#cfe8f4;--night:#173b54}
body,.workbook-page{background:linear-gradient(135deg,#e0f5ff,#fff6df,#e8fae7)!important;color:#173b54}
.app,main,.workbook-page main{background:#f7fcff!important}
.top,main>header{background:linear-gradient(120deg,#1764a1,#1687bc)!important;border-bottom-color:#ffd34b!important;color:#fff!important}
.top b,main>header b,main>header strong{color:#fff6bc!important}
.title,h1,h2,h3,.tasklabel,.score,.wordcard b,.group b,.letter-pill,.big,.under{color:#155785!important}
.panel,.card,.royal-child-panel{background:white!important;border-color:#cce6f1!important;box-shadow:0 3px 9px #266a9812}
.royal-child-panel,.royal-child-more summary,.royal-nav-button,.royal-child-tile small,.tag,.sub,.muted,.book,.hint,.footer,footer,.writing-hint{color:#36576c!important}
.btn,.btn.purple,.primary,main button:not(.choice):not(.tile):not(.menu-btn):not(.word):not(.sound):not(.secondary){background:#176fa7;color:#fff;border-color:#115987;box-shadow:0 3px 0 #115987}
.btn.secondary,.smallbtn,.back,.secondary,.royal-nav-button,.royal-child-nav{background:#e7f6ff!important;color:#155785!important;border-color:#aedbf0!important;box-shadow:0 2px 0 #b6d9ea}
.royal-child-tile,.menu-btn,.tile,.group,.letter-pill,.letters button,.wordcard,.choice:not(.correct):not(.wrong){background:var(--tile-bg,#e5f6ff)!important;color:#173b54!important;border-color:var(--tile-border,#83c9ed)!important;box-shadow:0 3px 0 var(--tile-border,#83c9ed)!important}
.royal-child-tile:nth-child(6n+1),.menu-btn:nth-child(6n+1),.tile:nth-child(6n+1),.group:nth-child(6n+1),.letters button:nth-child(6n+1){--tile-bg:#ffe6e5;--tile-border:#ff8b89}
.royal-child-tile:nth-child(6n+2),.menu-btn:nth-child(6n+2),.tile:nth-child(6n+2),.group:nth-child(6n+2),.letters button:nth-child(6n+2){--tile-bg:#e0f4ff;--tile-border:#69bce8}
.royal-child-tile:nth-child(6n+3),.menu-btn:nth-child(6n+3),.tile:nth-child(6n+3),.group:nth-child(6n+3),.letters button:nth-child(6n+3){--tile-bg:#e4f8df;--tile-border:#83ca72}
.royal-child-tile:nth-child(6n+4),.menu-btn:nth-child(6n+4),.tile:nth-child(6n+4),.group:nth-child(6n+4),.letters button:nth-child(6n+4){--tile-bg:#fff5bf;--tile-border:#eccb53}
.royal-child-tile:nth-child(6n+5),.menu-btn:nth-child(6n+5),.tile:nth-child(6n+5),.group:nth-child(6n+5),.letters button:nth-child(6n+5){--tile-bg:#ffebd5;--tile-border:#f5ae66}
.royal-child-tile:nth-child(6n+6),.menu-btn:nth-child(6n+6),.tile:nth-child(6n+6),.group:nth-child(6n+6),.letters button:nth-child(6n+6){--tile-bg:#ffe8f5;--tile-border:#eaa0c7}
.group.selected,.letters .selected,.smallbtn.current{outline:3px solid #176fa7;outline-offset:1px}
.progress{background:#dbeefa}.progress div,.progress span{background:linear-gradient(90deg,#1fa769,#71ce58)}
.workbook-card,.resume-panel,.profile-bar,.parent-summary{background:#fff4d4!important;border-color:#e8c25e!important;color:#173b54!important}
.workbook-actions a.workbook-order{background:#147c4f;color:white}
.word,.tag,.focusline,.stats span,.achievement,.profile-tile,.parent-stat,details,.note{background:#eaf7ff;color:#155785;border-color:#c6e4f4}
.achievement.unlocked,.profile-tile.selected{background:#fff3bf;border-color:#e8c25e}
.royal-sfx-toggle{display:block;margin:8px auto;min-height:42px;border:1px solid #aedbf0;border-radius:12px;background:#e7f6ff!important;color:#155785!important;padding:8px 14px;font-weight:bold;cursor:pointer}

.royal-head-nav{display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end}.royal-head-nav .back{min-height:44px;font-size:12px;padding:5px 8px}.royal-watch-controls{background:#fff9db!important;border-color:#ebd36f!important}.royal-watch-controls p,.royal-watch-buttons button{color:#17628d!important}.royal-watch-buttons button:first-child{background:#176fa7!important;color:white!important}.royal-watch-track{background:#d5f0fa!important}.royal-watch-track span{background:#42b86a!important}.writing-result .reward-stars{white-space:nowrap}.royal-head-nav .back:last-child{background:#fff4ca!important}.choice{min-height:65px}.tasklabel{font-size:1.2rem;font-weight:800}.reward small{display:block}.royal-child-tile{min-height:112px}