/* V28 is the supplied visual source. These rules restore its royal palette
   and tactile controls while retaining the V31 profile and game logic. */
:root{--forest:#3153b7;--ink:#253b73;--paper:#d7f2ff;--gold:#ffd450}body{background:radial-gradient(ellipse at center,#1689df,#064379 85%);color:#253b73;font-family:system-ui,Arial,sans-serif}body:before{content:'';position:fixed;inset:0;background:linear-gradient(#d1efffbf,#eef6ffe6 48%,#c6ecdbd9),url('assets/castle-land.webp') center/cover fixed!important;z-index:-1;pointer-events:none}.royal-home:before{display:none}.royal-home .profile31{display:none}.royal-home main{max-width:1680px;margin:auto;padding:12px}.royal-home .scene{position:relative;aspect-ratio:1648/928;width:100%;border:5px solid #ffdc63;border-radius:22px;overflow:hidden;box-shadow:0 15px 55px #031b48bb,0 0 0 3px #ffffff88}.royal-home .scene>img{display:block;width:100%;height:100%;object-fit:fill}.royal-home .hotspot{position:absolute;display:block;border-radius:20px;outline-offset:-5px;transition:background .12s,box-shadow .12s}.royal-home .hotspot:hover,.royal-home .hotspot:focus-visible{background:#ffffff38;box-shadow:inset 0 0 0 4px #fff9a8;outline:2px solid #fff}.royal-home .hotspot span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.royal-home .links{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin:16px 0}.royal-home .links a,.royal-home .links button,.button31,.parent-tools31 button{background:linear-gradient(#fff8b3,#ffc334);color:#502f05;border:3px solid #fff4c6;border-radius:19px;padding:13px 22px;font-weight:850;text-decoration:none;cursor:pointer;box-shadow:0 5px 0 #9b5c00}.royal-home .links a,.royal-home .links button{font-size:clamp(15px,1.4vw,21px)}.royal-home .links .royal-3d{background:linear-gradient(#d8fff7,#63d7e6);border-color:#e6ffff;color:#124d7b;box-shadow:0 5px 0 #2265a2}.royal-home footer,.royal-home .help,.royal-home .status{color:#e2f4ff;text-align:center}.royal-home .help,.royal-home .status{font-size:15px;margin:16px 0}.royal-home footer{font-size:13px;padding:10px}.royal-person{position:absolute;left:3.8%;top:1.7%;width:15.3%;height:15.2%;border:clamp(2px,.3vw,5px) solid #bceaff;border-radius:25%;background:linear-gradient(#263e8c,#152758);color:#fff7b4!important;display:flex;flex-direction:column;align-items:center;justify-content:center;text-decoration:none;box-shadow:0 4px 0 #0c1b42,0 0 0 2px #daa942;overflow:hidden;z-index:2;padding:3px}.royal-person strong{display:block;max-width:95%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:clamp(10px,1.7vw,29px);line-height:1.2}.royal-person small{font-size:clamp(9px,1.2vw,21px);font-weight:800}.royal-person em{font-style:normal;font-size:clamp(7px,.8vw,14px);color:#c1eaff}.royal-progress-panel{position:absolute;left:66.8%;top:88.1%;width:31.6%;height:9.5%;border:clamp(2px,.24vw,4px) solid #ffe991;border-radius:18px;background:linear-gradient(#37277f,#1e467f);box-shadow:0 3px 0 #835612;display:flex;align-items:center;justify-content:center;gap:5%;padding:1%;color:#fff7c6;z-index:2}.royal-progress-panel strong{font-size:clamp(9px,1.5vw,25px);white-space:nowrap}.royal-progress-panel progress{width:55%;height:20px;accent-color:#6fda38}.royal-progress-panel small{position:absolute;top:-1.3em;right:6%;font-size:clamp(7px,.85vw,14px);color:#fff9d1;text-shadow:0 2px 2px #24346f;background:#243970;padding:0 5px;border-radius:5px}.profile31{background:linear-gradient(#f0faff,#c7e9ff);border-bottom:4px solid #ffcd56;box-shadow:0 4px 12px #173b7d30;color:#243a7a}.profile31 a{color:#243a7a}.profile31 select{border:2px solid #afc8f0;border-radius:15px;color:#253b73}.profile31 #wallet31{background:linear-gradient(#fff9b3,#ffdb70);color:#744410;box-shadow:0 3px 0 #c79838}.nav31 a,.v28nav a{background:linear-gradient(#fff,#dbf1ff)!important;border:2px solid #fff!important;border-radius:17px;box-shadow:0 4px 0 #87a8ce;color:#284a8b!important;font-weight:850}.nav31 a:hover,.v28nav a:hover{background:#fff1a1!important}.glass,.panel,.card,.report-grid31 section{background:linear-gradient(145deg,#fffdf7f5,#e7f5fff5)!important;border:4px solid #fff!important;border-radius:28px!important;box-shadow:0 8px 0 #7392bb50,0 18px 35px #234c8230!important}.world{display:block!important;opacity:.15}.hero h2,.question,.brand h1{color:#3e439b!important}.tile{background-image:linear-gradient(155deg,#fffbe9,#d4edff)!important;border:4px solid #fff!important;box-shadow:0 7px 0 #648ac1!important}.tile:nth-child(3n){background-image:linear-gradient(#fff8e3,#ffd693)!important}.tile:nth-child(3n+2){background-image:linear-gradient(#fff1fb,#e3d4ff)!important}.tile strong,.tile b{color:#28417e!important}.choice,.island-choice{background:linear-gradient(#fff,#dceeff);border:4px solid white!important;box-shadow:0 6px 0 #7896bd70!important;border-radius:22px!important}.choice:nth-child(2){background:linear-gradient(#fff9e9,#ffe2a5)}.choice:nth-child(3){background:linear-gradient(#effff3,#c8f1d3)}.choice:nth-child(4){background:linear-gradient(#fff0fa,#ffd6ea)}.choice.correct{background:#baf3d1!important;border-color:#52bd87!important}.choice.wrong{background:#ffe2dc!important}.btn,.pill{border:3px solid #fff!important;background:linear-gradient(#fff,#dceeff);color:#29417a;box-shadow:0 5px 0 #89a4cb!important}.btn.primary{background:linear-gradient(#fff8ad,#ffc535)!important;color:#68400d!important;box-shadow:0 6px 0 #bb8721!important}.hero,.hero31{background:linear-gradient(110deg,#49309edb,#247ccfef)!important;border-radius:28px;border:4px solid white;box-shadow:0 9px 0 #466eb34a;color:white}.hero h1,.hero p,.hero31 h1,.hero31 p{color:white!important}.questionMascot img{border:3px solid #ffe288}.shell31>h1{color:#2f438b;text-shadow:0 2px white}.mission31 button{background:linear-gradient(#fff,#dceeff);border:3px solid #fff;box-shadow:0 4px 0 #7c9ac3;font-weight:800;color:#29417a}.mission31 button[aria-pressed=true]{background:linear-gradient(#fff6ad,#ffc73d);color:#62420c}.island-stage{border:5px solid #fff4bc;box-shadow:0 7px 0 #5d86bc,0 14px 24px #245e8c45}.island-controls{background:linear-gradient(#fffdf4,#e8f5ff);border:4px solid white}.island-pad button{background:linear-gradient(#fff,#d8efff);border-color:#91b6dd;color:#29417a}.island-label{border-color:#fff5be;color:#29417a}.feedback31,.hint31,.recommend-links31 a{background:#fff4d1;border:2px solid #fff}.shell31 footer{margin-top:30px;text-align:center;color:#345b91}.session-note31{color:#405d85}
@media(max-width:700px){.royal-home main{padding:4px}.royal-home .scene{border-width:2px;border-radius:10px}.royal-home .hotspot{border-radius:5px}.royal-home .links{gap:10px}.royal-home .links a,.royal-home .links button{flex:1 1 43%;text-align:center;font-size:14px;padding:11px 9px}.royal-home .links .royal-3d{flex-basis:90%}.royal-person{border-radius:14px;padding:1px}.royal-person em{display:none}.royal-progress-panel{border-radius:8px}.royal-progress-panel progress{height:10px}.royal-home .help,.royal-home .status{font-size:13px}.profile31{gap:8px}.report-grid31 section{padding:16px!important}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important}}

/* The same illustrated kingdom continues through every activity and state. */
body:not(.royal-home){isolation:isolate;background:#1685c7 url('assets/kingdom-continuity.png') center top/cover fixed!important;min-height:100vh}
body:not(.royal-home):before{display:none!important}
body:not(.royal-home) .world{display:none!important}
.kingdom-journey31{max-width:1200px;margin:18px auto 6px;padding:18px 24px;border:3px solid #ffdf78;border-radius:24px;background:#163c81eb;color:#fff9d5;box-shadow:0 5px 0 #805128,0 12px 24px #102e6140;display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}
.kingdom-journey31 strong{font-size:clamp(21px,3vw,30px);display:block;color:#fff1a7;text-shadow:0 2px #293564}
.kingdom-journey31 p{margin:5px 0 0;line-height:1.6;color:#e9f7ff}
.kingdom-path31{display:flex;flex-wrap:wrap;gap:9px}
.kingdom-path31 a{color:#fff9e7;background:#254b9f;border:2px solid #8bdcff;border-radius:15px;text-decoration:none;padding:9px 13px;font-weight:800;min-height:46px;display:flex;align-items:center}
.kingdom-path31 a[aria-current=page]{background:linear-gradient(#fff4a1,#ffc53f);border-color:#fff2b8;color:#593508;box-shadow:0 3px 0 #9a5b0a}
body:not(.royal-home)>.v28nav{display:none}
body:not(.royal-home) .profile31{background:linear-gradient(#204f9af7,#183b7bf7);border-color:#ffd35f;color:#fff7d3}
body:not(.royal-home) .profile31 a{color:#fff5c7}
body:not(.royal-home)>header{background:#173c7de8;color:#fff8d8;border-color:#ffd65c}
body:not(.royal-home) main{position:relative}
body:not(.royal-home) .glass,body:not(.royal-home) .panel,body:not(.royal-home) .card,body:not(.royal-home) .report-grid31 section{background:linear-gradient(135deg,#fffdf3f5,#edf8fff2)!important;border:3px solid #ffd56c!important;box-shadow:0 6px 0 #a36a2c,0 14px 28px #12377545,inset 0 0 0 3px #fff8df!important}
body:not(.royal-home) .hero{background:linear-gradient(115deg,#463499eb,#176ca4e8)!important;border-color:#ffdf78;box-shadow:0 6px 0 #a36a2c,0 14px 28px #12377545}
body:not(.royal-home) .tile{border-color:#fff0a8!important;box-shadow:0 6px 0 #956634,0 9px 18px #16457240!important}
body:not(.royal-home) .tile:nth-child(4n+1){background-image:linear-gradient(#e9ffdb,#a9e77d)!important}
body:not(.royal-home) .tile:nth-child(4n+2){background-image:linear-gradient(#ffeafa,#eeafe3)!important}
body:not(.royal-home) .tile:nth-child(4n+3){background-image:linear-gradient(#effaff,#9bdef7)!important}
body:not(.royal-home) .tile:nth-child(4n){background-image:linear-gradient(#f3eaff,#ccaff6)!important}
body:not(.royal-home) .choices button,body:not(.royal-home) .choice,body:not(.royal-home) .island-choice{border:3px solid #ffe492!important;box-shadow:0 5px 0 #a77a37!important;color:#263b70;min-height:64px}
body:not(.royal-home) .choices button.correct,body:not(.royal-home) .choice.correct{background:#bcf2cf!important;border-color:#299d68!important;box-shadow:0 5px 0 #2a8257!important}
body:not(.royal-home) .choices button.wrong,body:not(.royal-home) .choice.wrong{background:#ffe1df!important;border-color:#e9a59b!important}
body:not(.royal-home) .topbar,body:not(.royal-home) .game-heading{padding:12px;border:2px solid #ffe6a1;border-radius:20px;background:#f2faffeb}
body:not(.royal-home) .audio-tools{background:#f2faffed!important;border:2px solid #ffe19b;border-radius:18px}
body:not(.royal-home) .brand h1{color:#fff5b2!important;text-shadow:0 2px 3px #153e81!important}
body:not(.royal-home) .brand small{color:#fff!important;text-shadow:0 1px 3px #153e81}
body:not(.royal-home) .app>.top{padding:14px;border:3px solid #ffdf78;border-radius:24px;background:#173f85ed;box-shadow:0 5px 0 #946128}
body:not(.royal-home) .island-header{padding:16px 20px;margin:16px 0;background:#fff8e9f2;border:3px solid #ffe09a;border-radius:24px;box-shadow:0 5px 0 #a36a2c}
body:not(.royal-home) .island-stage{border:5px solid #ffdf78;box-shadow:0 7px 0 #a36a2c,0 16px 28px #153a7850}
body:not(.royal-home) .island-controls{border-color:#ffdc81;background:#fffaf0f5}
body:not(.royal-home) .island-feedback,body:not(.royal-home) .gentle-note,body:not(.royal-home) .session-note31{background:#fff9e9f0;border-radius:16px;padding:12px 18px;color:#294675}
body:not(.royal-home) footer,body:not(.royal-home) .footer,body:not(.royal-home) .foot{color:#fff6d6;background:#193e7cde;border-radius:16px;padding:16px;text-align:center}
body:not(.royal-home) .shell31>h1,body:not(.royal-home) #landing>h2{color:#fff5c6;text-shadow:0 2px 4px #153a78;background:#183f80dd;border-radius:16px;padding:14px 18px}
body:not(.royal-home) .mission31{padding:12px;background:#193e7ce6;border-radius:20px;border:2px solid #ffdf78}
body:not(.royal-home) .progress>div{background:linear-gradient(#b6ed64,#57b91f)}
@media(max-width:700px){body:not(.royal-home){background-position:58% top!important;background-attachment:scroll!important}.kingdom-journey31{margin:12px 10px 0;padding:14px;gap:12px}.kingdom-journey31 p{font-size:14px}.kingdom-path31{gap:7px;width:100%}.kingdom-path31 a{flex:1 1 28%;justify-content:center;padding:8px;font-size:13px}.kingdom-journey31 strong{font-size:22px}body:not(.royal-home) .panel{padding:16px}body:not(.royal-home) .island-header{padding:14px}}
/* Keep the shared journey useful without repeating large page headers. */
body:not(.royal-home)>header{display:none}
body:not(.royal-home) main#main{max-width:1140px;margin:24px auto;background:#fffaf0f5;border:3px solid #ffda79;border-radius:28px;box-shadow:0 6px 0 #a36a2c}
body:not(.royal-home) .back-button,body:not(.royal-home) .listen-button,body:not(.royal-home) .island-feedback .primary{background:linear-gradient(#fff6b3,#ffd25b);border:3px solid #fff3c4;border-radius:16px;box-shadow:0 4px 0 #a36a2c;color:#624113;font:800 16px system-ui;padding:10px 16px;min-height:46px}
body:not(.royal-home) .mission31 button[aria-pressed=true]{background:linear-gradient(#fff4a1,#ffc53f)!important;color:#593508!important;border-color:#fff2b8!important}
body:not(.royal-home) .profile31{padding-top:8px;padding-bottom:8px}
body:not(.royal-home) .app>.top .brand{display:none}
body:not(.royal-home) .app>.top{padding:8px 14px;justify-content:flex-end}
body:not(.royal-home) .heroArt16 .mapArt,body:not(.royal-home) .worldThumb{content:url('assets/kingdom-continuity.png')}
body:not(.royal-home) .hero .glass h2,body:not(.royal-home) .hero .glass p{color:#283d79!important;text-shadow:none!important}
@media(min-width:1000px){body:not(.royal-home)>main:not(.shell31):not(.app){max-width:1020px}}
@media(max-width:700px){body:not(.royal-home){background-size:auto 100vh!important;background-repeat:repeat-y!important}}

/* Musical feedback and brief stars continue the royal visual language. */
.celebration31{position:fixed;inset:0;z-index:90;pointer-events:none!important;overflow:hidden;contain:strict}
.celebration-star31{position:absolute;left:var(--start-x);top:var(--start-y);font-size:var(--star-size);color:var(--star-color);line-height:1;text-shadow:0 2px 3px #8c591066;animation:star-flight31 880ms cubic-bezier(.12,.65,.3,1) var(--delay) both;will-change:transform,opacity}
@keyframes star-flight31{0%{transform:translate(-50%,-50%) scale(.25);opacity:0}18%{opacity:1}75%{opacity:1}100%{transform:translate(calc(-50% + var(--fly-x)),calc(-50% + var(--fly-y))) rotate(var(--spin)) scale(.65);opacity:0}}
.choice.correct,.choices button.correct{animation:answer-bloom31 430ms ease-out}
@keyframes answer-bloom31{0%{transform:scale(.97)}50%{transform:scale(1.025)}100%{transform:scale(1)}}
.no-motion .celebration31{display:none}.no-motion .choice.correct,.no-motion .choices button.correct{animation:none!important}
@media(prefers-reduced-motion:reduce){.celebration31{display:none}.choice.correct,.choices button.correct{animation:none!important}}

.audio-enable31{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.audio-enable31 button{border:2px solid #fff1ae;border-radius:14px;padding:7px 13px;min-height:44px;background:linear-gradient(#fff2ad,#ffcc4c);color:#513b10;font-weight:800}.audio-enable31 span{font-size:13px;max-width:245px;line-height:1.5}@media(max-width:700px){.audio-enable31{width:100%;border-top:1px solid #ffffff55;padding-top:7px}.audio-enable31 span{flex:1;min-width:130px}}

/* Personal journeys belong to the same illustrated kingdom. */
.journey-hero31{display:flex;align-items:center;justify-content:space-between;gap:26px;padding:28px 32px;background:linear-gradient(115deg,#353384ed,#1469a3ed);border:4px solid #ffdf7b;border-radius:28px;box-shadow:0 6px 0 #99612c;color:#fff8dc}.journey-hero31 h1{font-size:clamp(28px,4vw,42px);margin:8px 0}.journey-hero31 p{line-height:1.7;margin:8px 0}.journey-hero31 img{width:150px;height:150px;object-fit:cover;border:4px solid #ffe17c;border-radius:50%;flex:none}.journey-kicker31{font-weight:800;color:#ffedab}.journey-totals31{display:flex;gap:12px;flex-wrap:wrap;margin-top:18px}.journey-totals31 span{background:#fff7d7;color:#5f4316;padding:8px 14px;border-radius:18px;font-weight:800}.journey-section31{margin:26px 0;padding:24px;border:3px solid #ffdb7a;border-radius:26px;background:#fffdf2f5;box-shadow:0 5px 0 #a57839}.journey-section31 h2{font-size:clamp(22px,3vw,28px);margin:0 0 14px;color:#304584}.journey-note31{color:#4c607f;line-height:1.8}.journey-cards31{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px}.journey-card31,.journey-station31{padding:22px;border:2px solid #d0dfee;border-radius:22px;background:linear-gradient(#f4faff,#e8f4ff);display:flex;align-items:flex-start;flex-direction:column;gap:8px;min-width:0}.journey-card31:nth-child(3n+2){background:linear-gradient(#fff2fa,#ffe3ed)}.journey-card31:nth-child(3n){background:linear-gradient(#f6ffef,#e4f5d4)}.journey-card31 h3,.journey-station31 h3{margin:4px 0;font-size:21px;color:#2d427d}.journey-card31 p,.journey-station31 p{margin:4px 0;line-height:1.7;color:#435b7e}.journey-card31 .button31,.journey-station31 .button31{margin-top:auto;font-size:16px}.journey-icon31{font-size:36px;line-height:1.4;font-weight:800;color:#6242a0}.journey-stations31{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:15px}.journey-small31{font-size:14px}.journey-station31 progress,.journey-card31 progress{width:100%;height:18px;accent-color:#56a83a}.journey-medal31{border-color:#d5a13a;background:linear-gradient(#fff9cf,#ffe49a)!important}.journey-medal31>strong{color:#795411;font-size:14px}.journey-empty31{padding:24px;border:2px dashed #b3975e;border-radius:20px;color:#695530;line-height:1.8}.journey-rest31{padding:24px;border:3px solid #ffdf7c;border-radius:24px;background:#f3fbfff0;color:#284a7d;line-height:1.8}.home-journey31{max-width:1200px;margin:20px auto;padding:22px 26px;background:#163e7ff2;color:#fff8d2;border:3px solid #ffe18a;border-radius:25px;box-shadow:0 5px 0 #8c5b29;display:flex;align-items:center;justify-content:space-between;gap:18px}.home-journey31 h2{margin:6px 0;font-size:clamp(21px,2.4vw,29px);color:#fff2ab}.home-journey31 p{margin:8px 0;line-height:1.7;color:#e8f5ff}.home-journey31 small{color:#fbd779;font-weight:800}.home-journey-actions31{display:flex;gap:10px;flex-wrap:wrap}.home-journey31 .button31{font-size:16px;text-align:center}.home-journey31 .secondary31{background:linear-gradient(#f3fcff,#b9e6fa);color:#214b80}.complete-path31{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin:22px 0}.journey-section31[hidden]{display:none}
@media(max-width:700px){.journey-hero31{padding:22px;gap:12px}.journey-hero31 img{width:80px;height:80px}.journey-hero31 h1{font-size:27px}.journey-hero31 p{font-size:15px}.journey-section31{padding:17px}.journey-cards31,.journey-stations31{grid-template-columns:1fr}.home-journey31{margin:16px 5px;padding:18px;display:block}.home-journey-actions31{margin-top:12px}.home-journey-actions31 .button31{flex:1;min-width:120px}.journey-totals31{gap:8px}.journey-totals31 span{font-size:14px}}

.journey-station31 progress,.journey-card31 progress{appearance:none;-webkit-appearance:none;border:2px solid white;border-radius:15px;overflow:hidden;background:#d7e4f5}.journey-station31 progress::-webkit-progress-bar,.journey-card31 progress::-webkit-progress-bar{background:#d7e4f5;border-radius:15px}.journey-station31 progress::-webkit-progress-value,.journey-card31 progress::-webkit-progress-value{background:linear-gradient(#a1df4f,#4c9c28);border-radius:15px}.journey-station31 progress::-moz-progress-bar,.journey-card31 progress::-moz-progress-bar{background:#63ac36;border-radius:15px}
.journey-hero31>div,.home-journey31>div{min-width:0}.journey-hero31 h1,.journey-card31 h3,.journey-station31 h3,.home-journey31 h2{overflow-wrap:anywhere}

@media(max-width:700px){.journey-hero31{padding:18px;gap:10px}.journey-hero31>div>p{display:none}.journey-hero31 h1{font-size:24px;margin:4px 0;line-height:1.35}.journey-hero31 img{width:66px;height:66px}.journey-totals31{margin-top:10px;gap:6px}.journey-totals31 span{font-size:13px;padding:6px 10px}}

.royal-home .links .royal-arcade{flex-basis:100%;background:linear-gradient(#fff0fb,#d2beff);border-color:#fff5ff;color:#473285;box-shadow:0 5px 0 #6d4aab}.arcade-invitation31{display:flex;align-items:center;gap:22px;background:linear-gradient(110deg,#443b9ceb,#1f78adf0);border:3px solid #ffe18c;border-radius:26px;padding:22px;margin:26px 0;color:#fff9dc;box-shadow:0 5px 0 #9e6e2f}.arcade-invitation31 img{object-fit:contain;flex:none}.arcade-invitation31 h2{margin:0 0 8px;color:#fff0b0;font-size:26px}.arcade-invitation31 p{line-height:1.8;margin:0}.arcade-invitation31 .button31{flex:none}@media(max-width:700px){.arcade-invitation31{gap:12px;padding:18px;flex-wrap:wrap}.arcade-invitation31 img{width:66px;height:66px}.arcade-invitation31>div{flex:1;min-width:160px}.arcade-invitation31 h2{font-size:21px}.arcade-invitation31 p{font-size:15px}.arcade-invitation31 .button31{width:100%}}
