/* Shared kingdom typography. Small local variable fonts also work offline. */
@font-face{font-family:Nunito;src:url('./fonts/nunito-latin-wght-normal.woff2') format('woff2');font-style:normal;font-weight:200 1000;font-display:swap}
@font-face{font-family:'Baloo 2';src:url('./fonts/baloo-2-latin-wght-normal.woff2') format('woff2');font-style:normal;font-weight:400 800;font-display:swap}
:root{--font-body:Nunito,ui-rounded,system-ui,sans-serif;--font-title:'Baloo 2',Nunito,ui-rounded,sans-serif;font-family:var(--font-body)}
body,button,input,select,textarea{font-family:var(--font-body)}
body{font-weight:600}
h1,h2,h3,h4,.brand,.realm-brand>span,.realm-location strong,.hero-status strong,.drawer-gear-info strong,.stat-panel strong,.reward-stat strong,.account-brand strong{font-family:var(--font-title);font-weight:700;letter-spacing:0;line-height:1.2}
.realm-brand>span{font-size:28px}.realm-brand small{font-family:var(--font-body)}
.realm-panel-header h2,.modal-header h2{font-size:clamp(25px,5.7vw,30px)}
.realm-panel .quest-choice h3{font-size:18px;line-height:1.25}.realm-panel .quest-choice p{font-size:12px}

/* The academy belongs to Greenhaven: fern, moss, parchment and honey. */
.study-shell{--bg:#172e26;--panel:#233f32;--panel2:#2d4b3a;--line:#658161;--muted:#c1d2b4;--text:#f4f1de;--green:#d3e9a3;--teal:#a5dbbb;--orange:#f3d399;background:radial-gradient(ellipse at 5% 0,#3d6347 0,transparent 48%),radial-gradient(ellipse at 100% 90%,#334c36 0,transparent 45%),#172e26;min-height:100dvh}
.study-shell .topbar{background:#1a332b;border-bottom:2px solid #5c7654;box-shadow:0 3px 0 #10271e33}
.study-shell .back-world{background:#304b37;border:1px solid #7f9868;border-radius:16px;color:#edf1d3;font-weight:800}
.study-shell main{max-width:1240px;padding-top:22px}
.study-shell .study-guide{padding:10px 18px 10px 8px;background:#2d4b36;border:1px solid #789065;border-bottom:4px solid #10291f;border-radius:24px;box-shadow:none;gap:12px;margin-bottom:18px}
.study-guide>div>span{color:#eed09b;letter-spacing:.08em;font-size:10px}
.study-guide p{font-family:var(--font-title);font-size:21px;font-weight:600;line-height:1.25;color:#faf2d5}
.study-guide .pip-small{width:60px;height:60px}
.study-guide .pip-body,.study-guide .pip-shadow,.study-guide .pip-eye,.study-guide .pip-leaf,.study-guide .pip-spark{animation-iteration-count:1}
.study-shell .step-pebbles{flex-wrap:wrap;gap:5px;max-width:240px}
.study-shell .step-pebbles i{background:#243d2c;border:1px solid #8ba171;border-bottom:3px solid #142c20;color:#e4e8cb;border-radius:50%;width:28px;height:28px;transform:none}
.study-shell .step-pebbles i.current{background:#efd69e;color:#3b4026;border-color:#efd69e;border-bottom-color:#b19b66;transform:translateY(-2px)}
.study-shell .step-pebbles i.done{background:#c9e29b;color:#2b482e;border-color:#91b36d}
.study-shell .study-top{gap:12px;flex-wrap:wrap;margin-bottom:20px}
.study-shell .study-top .progress{height:12px;border:2px solid #627c52;background:#203629;border-radius:20px;overflow:hidden;min-width:60px}
.study-shell .study-top .progress span{background:#cbe497;box-shadow:none;transition:width .35s ease}
.study-shell .study-top .meta{color:#cfdfbb;font-weight:800}
.study-shell #quest-xp{background:#d0e79f;color:#30452a;border-radius:20px;padding:6px 11px;font-size:12px;font-weight:900;white-space:normal}
.study-shell .study-layout{gap:22px;align-items:start}
.study-shell .panel.statement{position:relative;background:#f0e7ca;color:#344a35;border:2px solid #d6c598;border-bottom:5px solid #b3a27b;border-radius:24px;box-shadow:0 8px 0 #0a221e25;padding:24px;overflow:hidden}
.study-shell .statement:before{content:'';display:block;width:42px;height:7px;background:#94ae6e;border-radius:20px;margin-bottom:17px}
.study-shell .statement h1{font-size:clamp(28px,3vw,36px);color:#304b34;line-height:1.12;margin:16px 0}
.study-shell .statement .description{font-size:clamp(15px,1.1vw,17px);line-height:1.7;color:#3b503c}
.study-shell .statement .row{flex-wrap:wrap;gap:6px}
.study-shell .statement .tag,.study-shell .statement .badge{background:#e2dfb7;border:1px solid #b4b483;color:#465334;white-space:normal;font-weight:800}
.study-shell .statement .badge.easy{background:#d3e1ae;color:#31542f}
.study-shell .statement .badge.hard{background:#ecd2b5;color:#784332}
.study-shell .statement-details{border-top:1px dashed #b4b38b;margin-top:20px;padding-top:5px}
.study-shell .statement-details summary{color:#405d37;font-weight:900;min-height:44px;padding:12px 0;cursor:pointer}
.study-shell .statement h4{color:#425638}.study-shell .statement .constraints{color:#475840;font-size:14px;line-height:1.7;padding-left:20px}
.study-shell .statement .example{background:#e5ddbc;border:1px solid #ccc299;color:#374c38;border-radius:15px;padding:14px}
.study-shell .statement .example p,.study-shell .statement .muted{color:#58654b}
.study-shell .statement code{color:#2d4935}.study-shell .statement .example code{overflow-wrap:anywhere}
.study-shell .statement .notice,.study-shell .design-context{background:#e1dfb8;border:0;border-left:3px solid #7d9c60;border-radius:5px 14px 14px 5px;color:#465739;font-size:13px;line-height:1.6}
.study-shell .statement .fine-print{color:#566348;font-size:12px;line-height:1.6}
.study-shell .statement .source-button{color:#51623b;font-size:12px;text-decoration:underline;text-underline-offset:3px}
.study-shell .statement .design-format{color:#526b41;font-size:13px;font-weight:800}
.study-shell .language-picker{color:#485d3a}.study-shell .language-picker small{color:#667453}
.study-shell .language-picker select{background:#faf3db;border:1px solid #a8ac7d;color:#3a5035;font-weight:800;min-height:44px}

.study-shell .editor,.study-shell .design-blueprint{background:#20392d;border:2px solid #758c62;border-bottom:4px solid #10271e;border-radius:22px;box-shadow:none;overflow:hidden}
.study-shell .editor-bar{background:#354e39;border-bottom:1px solid #6c8358;border-radius:0;padding:12px 16px;color:#e9e9cd;font-weight:800;gap:10px}
.study-shell .editor-bar .muted,.study-shell .file-tab{color:#e5e6c8}
.study-shell .editor-content{background:#192e25;color:#e4eccf;padding-top:16px;padding-bottom:16px}
.study-shell .line-number{background:transparent;color:#8da582}.study-shell .code-line.new,.study-shell .code-line.new .line-number{background:#365135;color:#e6f5c5}
.study-shell .code-placeholder,.study-shell .design-placeholder{color:#b5c8a2;font-family:var(--font-body);font-style:normal}
.study-shell .design-decisions{font-size:15px;line-height:1.55;padding-left:23px;gap:12px}
.study-shell .design-decisions li::marker{color:#d1df9f}
.study-shell .step-section{position:relative;background:#294632;border:2px solid #71885c;border-bottom:5px solid #142d21;border-radius:25px;padding:23px;margin-top:18px;box-shadow:0 7px 0 #10271e26}
.study-shell .step-label{display:inline-flex;align-items:center;gap:7px;color:#e7cd91;font-size:10px;letter-spacing:.08em;font-weight:900;margin-bottom:10px}
.study-shell .step-label:before{content:'✦';font-size:14px;line-height:1;color:#e7cd91}
.study-shell .step-section h3{font-size:clamp(22px,2vw,27px);font-weight:600;line-height:1.25;color:#fff2d0;overflow-wrap:anywhere}
.study-shell .code-options{gap:11px;margin-top:20px}
.study-shell .code-option{position:relative;background:#37533b;border:1px solid #8aa16e;border-bottom:4px solid #1b3525;border-radius:18px;padding:15px 14px;gap:12px;box-shadow:none;color:#f3f1db;min-height:62px;overflow:visible;transition:transform .16s ease,background .16s ease,border-color .16s ease;animation:grove-arrive .28s ease-out both}
.study-shell .code-option:nth-child(2){animation-delay:35ms}.study-shell .code-option:nth-child(3){animation-delay:70ms}
.study-shell .code-option .option-key{background:#d8dfb1;color:#3b5130;border:1px solid #eff1cb;border-bottom:3px solid #a3b477;border-radius:12px;width:30px;height:32px;flex:0 0 30px;display:grid;place-items:center;font-family:var(--font-title);font-size:18px;font-weight:700}
.study-shell .code-option code{color:#f2f0d8;font-size:clamp(12px,1vw,14px);line-height:1.7;min-width:0;overflow-wrap:anywhere}
.study-shell .design-options .code-option>span:last-child{font-size:clamp(14px,3.6vw,16px);line-height:1.5;padding-top:3px}
.study-shell .code-option.correct{background:#49663d;border-color:#cfeb9a;border-bottom-color:#24402a;animation:grove-stamp .32s ease-out}
.study-shell .code-option.correct .option-key{background:#daf2ac;color:#2d4d2c;border-color:#c8e99c}
.study-shell .code-option.wrong{background:#644b3b;border-color:#e6b991;border-bottom-color:#423127;animation:grove-nudge .24s ease}
.study-shell .code-option.wrong .option-key{background:#f0d0af;color:#694331;border-color:#d7ad83}
.study-shell .code-option:disabled:not(.correct):not(.wrong){opacity:.58}
.study-shell .feedback{background:#36563b;border:1px solid #91ad72;border-radius:16px;color:#e8f4ce;line-height:1.6;padding:13px 15px;font-size:14px;animation:grove-arrive .25s ease-out}
.study-shell .feedback.error{background:#5b4635;border-color:#c69c73;color:#ffe0bb}
.study-shell .hint-box{background:#ede0b6;color:#4d5030;border:1px dashed #ae9758;border-radius:17px;font-size:14px;line-height:1.65;animation:grove-arrive .25s ease-out}
.study-shell .study-actions{gap:10px;margin-top:19px}
.study-shell .study-actions .btn{border-radius:15px;font-size:13px;min-height:44px;padding:10px 13px;white-space:normal}
.study-shell .btn.secondary{background:#496341;color:#f3efd2;border-color:#94ab72;box-shadow:0 3px 0 #193321}
.study-shell .btn.subtle{color:#d9e8be}.study-shell .btn.primary{background:#d4e8a4;color:#304c30;box-shadow:0 4px 0 #90a963}
.study-shell .inline-why{background:#e8dfbf;color:#3e5037;border:2px solid #c1bc8e;border-bottom:4px solid #a09a6e;border-radius:22px;padding:20px;animation:grove-arrive .28s ease-out}
.study-shell .inline-why .step-label,.study-shell .inline-why .step-label:before{color:#657245}
.study-shell .inline-why h4{font-size:22px;color:#374c32;font-weight:600;line-height:1.3}
.study-shell .why-option{background:#f6efd5;border:1px solid #b8bd93;border-bottom:3px solid #b3b88a;color:#3d5035;border-radius:15px;font-size:15px;font-weight:700;line-height:1.55;padding:14px;transition:transform .16s ease,background .16s ease}
.study-shell .why-option.correct{background:#d5e6af;border-color:#7c9b59;opacity:1}
.study-shell .why-option:disabled:not(.correct){opacity:.65}
.study-shell .keyboard-help{color:#b5c69f}.study-shell .footer-note{color:#b5c69f;border-color:#5e7654}
.study-shell .summary-card,.study-shell .design-debrief{background:#294633;border:2px solid #7e9868;border-radius:25px;color:#ecedd4;box-shadow:0 6px 0 #142b20}
.study-shell .design-flow li{background:#3b573d;border-color:#8ea778;color:#edf0d3;border-radius:13px}
.study-shell .design-flow li:before,.study-shell .design-tradeoff h4{color:#e9cf91}
.study-shell .design-followup,.study-shell .reward-stat{background:#3a563c;border-radius:18px}
.study-shell .design-followup>span{color:#e9cf91}.study-shell .design-followup small{color:#c9d5b8}
@keyframes grove-arrive{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
@keyframes grove-stamp{0%{transform:scale(.98)}60%{transform:scale(1.012)}100%{transform:scale(1)}}
@keyframes grove-nudge{30%{transform:translateX(-3px)}70%{transform:translateX(3px)}100%{transform:translateX(0)}}
@media(hover:hover){.study-shell .code-option:hover:not(:disabled){background:#456044;border-color:#d0e3a4;transform:translateY(-2px)}.study-shell .why-option:hover:not(:disabled){background:#e4e9c4;transform:translateY(-2px)}}
.study-shell .code-option:active:not(:disabled),.study-shell .why-option:active:not(:disabled){transform:translateY(2px)}
.study-shell :is(button,a,select,summary):focus-visible{outline:3px solid #f4cb7e;outline-offset:3px}
.study-shell .statement :is(button,select,summary):focus-visible,.study-shell .inline-why button:focus-visible{outline-color:#446737}
@media(max-width:760px){
 .study-shell main{padding:16px 14px 28px}.study-shell .study-guide{padding:9px 12px 9px 5px;gap:8px;border-radius:20px}.study-guide p{font-size:18px}
 .study-shell .step-pebbles{margin:0!important;max-width:none;flex-basis:100%;justify-content:flex-end}.study-shell .step-pebbles i{width:24px;height:24px;font-size:11px}
 .study-shell .panel.statement{padding:20px;border-radius:22px}.study-shell .statement h1{font-size:29px}.study-shell .statement .description{font-size:15px;line-height:1.65}
 .study-shell .study-layout{gap:16px}.study-shell .step-section{padding:18px 14px;border-radius:22px}.study-shell .code-option{padding:13px 11px;gap:10px}
 .study-shell .study-top .progress{max-width:none;flex:1}.study-shell .study-top .meta{margin-left:0}.study-shell .study-top{gap:8px}
 .study-shell .inline-why{padding:16px 12px}.study-shell .why-option{padding:12px;font-size:14px}.study-shell .design-blueprint .editor-content{max-height:180px}
 .study-shell .study-actions>.btn{flex:1 1 110px}.study-shell .study-actions>.primary{flex-basis:100%;margin-left:0!important}
 .study-shell .editor-bar{padding:11px 13px}.study-shell .design-blueprint .editor-bar>span{white-space:normal}.study-shell .design-blueprint .editor-bar>span:last-child{white-space:nowrap;flex-shrink:0}
}
/* Keep the living kingdom mounted beneath a bounded, independently scrolling window. */
.training-overlay{position:fixed;inset:0;z-index:40;display:flex;align-items:center;justify-content:center;padding:clamp(24px,4vh,48px) clamp(18px,4vw,64px);background:#10261d42}
.training-overlay .study-shell{width:100%;max-width:1320px;height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden;border:2px solid #a5bb80;border-radius:28px;box-shadow:0 16px 48px #081b2466,0 3px 0 #122c20;animation:grove-arrive .25s ease-out}
.training-overlay .topbar{position:static;flex:none;height:auto;min-height:70px;padding:12px 24px;gap:12px}
.training-heading{display:flex;align-items:center;gap:12px;min-width:0}.training-crest{display:grid;place-items:center;flex:none;width:40px;height:40px;background:#385239;border:1px solid #8aa76a;border-radius:14px;color:#e2cd94}.training-crest svg{width:22px;height:22px}
.training-overline{font-size:9px;font-weight:900;letter-spacing:.13em;color:#c2d3a4}.training-heading h2{font-size:25px;margin:0;color:#f4f1de}
.study-shell .training-close{display:flex;align-items:center;justify-content:center;gap:10px;min-width:44px;min-height:44px;padding:8px 13px;flex:none}.training-close svg{width:18px;height:18px}
.training-overlay .study-shell main{flex:1;min-height:0;width:100%;max-width:none;margin:0;padding:22px 24px 30px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#8ba471 #203c2d;scroll-padding:18px}
.training-open .realm-shell{pointer-events:none}
.training-open .realm-shell :is(.realm-top,.realm-quest,.realm-world-tools,.realm-bottom,.realm-dock,.realm-mini,.realm-location,.realm-welcome,.realm-controls,.realm-touch-controls,.realm-player,.realm-actions,.realm-travel,.kingdom-place-label,.online-label){visibility:hidden!important}
.training-open .realm-shell *{animation-play-state:paused!important}
@media(max-width:760px){
 .training-overlay{padding:max(24px,env(safe-area-inset-top)) 12px max(24px,env(safe-area-inset-bottom))}
 .training-overlay .study-shell{border-radius:22px}.training-overlay .topbar{min-height:60px;padding:8px 14px}
 .training-heading{gap:8px}.training-heading h2{font-size:23px}.training-overline{font-size:8px}.training-crest{width:34px;height:34px;border-radius:11px}
 .training-close span{display:none}.study-shell .training-close{padding:10px;border-radius:14px}
 .training-overlay .study-shell main{padding:14px 12px 24px}
 .training-overlay .study-shell .panel.statement{padding:16px}
}
@media(max-height:500px){.training-overlay{padding:12px max(18px,env(safe-area-inset-right)) 12px max(18px,env(safe-area-inset-left))}.training-overlay .topbar{min-height:52px;padding-top:4px;padding-bottom:4px}.training-overline{display:none}}
@media(prefers-reduced-motion:reduce){.training-overlay .study-shell,.study-shell *,.study-shell *:before,.study-shell *:after{animation:none!important;transition:none!important}.study-shell .code-option:hover:not(:disabled),.study-shell .why-option:hover:not(:disabled){transform:none}}
