:root{--cream:#fff1db;--ink:#3d2c2d;--muted:#775a50;--accent:#9146b5;--bright:#ce7aed;--gold:#edbc78;--edge:#a8663c;--wood:#754b36;--paper:linear-gradient(135deg,#fff6e6,#ffe5cc);font-family:'Trebuchet MS',system-ui,sans-serif;color:var(--ink);line-height:1.45;font-size:16px}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:#18382e}body[data-style=boy]{--accent:#137a9a;--bright:#61cde4;--wood:#3c5b4d}button,input,select,textarea{font:inherit}button{cursor:pointer;touch-action:manipulation}button,a,input,select,textarea{outline-offset:4px}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #fff;box-shadow:0 0 0 6px #136681}button:disabled{opacity:.55;cursor:wait}[hidden]{display:none!important}button{border:2px solid #e6b98b;border-radius:16px;background:linear-gradient(#a36a4d,#69432f);color:#fff9e8;box-shadow:0 3px 0 #412e29,inset 0 1px 3px #ffffff70;padding:10px 17px;font-weight:700;min-height:44px}button:hover:not(:disabled){filter:brightness(1.08)}button.primary,button.active,button[aria-pressed=true]{background:linear-gradient(var(--bright),var(--accent) 62%);border-color:#efd1fb;box-shadow:0 3px 0 #442b53,inset 0 1px 3px #fff9}button.secondary{background:#ffefd9;color:#67432e;border-color:#d9b091;box-shadow:0 2px 0 #b58362}button.small{padding:7px 11px;font-size:.85rem;min-height:40px}.woodland{position:fixed;inset:0;z-index:-2;background-image:linear-gradient(#0f251755,#0f251733),url('assets/woodlands.webp');background-repeat:no-repeat;background-size:100% 100%,200% 100%;background-position:center,left center}body[data-style=boy] .woodland{background-position:center,right center}.topbar{max-width:1640px;margin:auto;display:flex;align-items:center;gap:18px;padding:16px 24px 12px;color:#fff6dd;text-shadow:0 2px 3px #1c251d}.brand{font:bold 29px/1.05 Georgia,serif;display:flex;align-items:center;gap:8px;color:inherit;text-decoration:none;white-space:nowrap}.brand small{font-size:18px;display:block;letter-spacing:.025em}.tree{font-size:48px;filter:drop-shadow(0 0 5px #ffe8af)}#nav{display:flex;gap:7px;flex:1;justify-content:center;flex-wrap:wrap}#nav button{font-size:.9rem;padding:9px 14px;border-radius:22px}#nav button.active{color:white}.account-tools{display:flex;align-items:center;gap:8px}.points{background:#553925;border:2px solid #d7a675;border-radius:24px;padding:9px 14px;white-space:nowrap;font-size:19px;box-shadow:inset 0 0 0 2px #362b23}.round{border-radius:50%;width:46px;padding:0;font-size:26px}.account-strip{max-width:1560px;margin:0 auto;padding:4px 22px 12px;color:#fff6e7;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:14px}.account-strip select{min-height:40px;padding:6px 12px;margin-left:8px;max-width:230px}.account-strip a{color:#fff1cf}#workspace{max-width:1580px;margin:auto;padding:0 20px 35px}.page-heading{font:700 clamp(24px,3vw,34px) Georgia,serif;background:linear-gradient(#ffdaa0,#df9a56);border:3px solid #9f6039;border-radius:12px;color:#392313;width:fit-content;min-width:245px;text-align:center;padding:9px 35px;margin:5px auto 20px;box-shadow:0 5px 0 #65412c,inset 0 0 0 2px #fce1ac}.creator{display:grid;grid-template-columns:minmax(245px,1fr) minmax(280px,1.2fr) minmax(290px,1.1fr);gap:18px;align-items:start}.panel{border:3px solid #bb8657;box-shadow:0 5px 0 #5c4031,0 12px 25px #10291d55,inset 0 0 0 3px #fff8e999;background:var(--paper);border-radius:26px;padding:20px}.panel h2{font:700 23px Georgia,serif;margin:0 0 14px}.panel h3{font-size:17px;margin:16px 0 10px}.panel p{margin:.5em 0 1em}.muted,.help{color:var(--muted);font-size:.88rem}.sectionline{border-top:2px solid #ddb38c;margin-top:16px;padding-top:15px}.row{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.split{justify-content:space-between}.toggle{display:flex;border-radius:25px;background:#efd8be;margin-bottom:18px;padding:4px;gap:5px}.toggle button{flex:1;box-shadow:none;border-radius:20px;border-color:transparent;background:transparent;color:#674432}.toggle button[aria-pressed=true]{color:white;background:linear-gradient(var(--bright),var(--accent))}.hair-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.hair-card{overflow:hidden;background:#ffecd9;color:var(--ink);border:2px solid #e9b995;border-radius:16px;padding:3px 4px 8px;box-shadow:none;position:relative;min-width:0;font-size:12px}.hair-card[aria-pressed=true],.outfit-card[aria-pressed=true]{background:#f8e5f8;color:var(--ink);outline:2px solid var(--accent);border-color:var(--accent);box-shadow:none}.hair-card[aria-pressed=true]:after,.outfit-card[aria-pressed=true]:after{content:'✓';position:absolute;right:4px;top:5px;width:24px;height:24px;border-radius:50%;background:var(--accent);color:#fff;display:grid;place-items:center}.head-thumb{height:78px;overflow:hidden;display:grid;justify-content:center}.head-thumb canvas{width:130px;height:208px;margin-top:-4px;transform:scale(1.16);transform-origin:center 15%}.stage{min-height:620px;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-end}.stage:after{content:'';position:absolute;bottom:47px;width:80%;height:30px;background:#30252140;filter:blur(12px);border-radius:50%;z-index:-1}.avatar-main{width:100%;max-height:600px;object-fit:contain;filter:drop-shadow(0 6px 4px #1b271d55)}.stage-label{padding:6px 18px;max-width:95%;text-align:center;color:#fff7e7;text-shadow:0 2px 4px #102d22;font-weight:bold;font-size:18px;overflow-wrap:anywhere}.pet-stage{position:absolute;bottom:50px;right:-15px;width:45%;max-width:200px;filter:drop-shadow(0 4px 4px #20382677)}.pet-stage.second{left:-15px;right:auto;width:39%;max-width:170px}.swatches{display:flex;gap:7px;flex-wrap:wrap}.swatch{width:40px;height:40px;min-height:40px;padding:0;border:3px solid #fff9e9;outline:1px solid #d4a17b;border-radius:50%;box-shadow:0 2px 3px #55392e55;position:relative}.swatch[aria-pressed=true]{background:var(--swatch);outline:3px solid var(--accent);border-color:#fff;box-shadow:none}.swatch[aria-pressed=true]:after{content:'✓';position:absolute;right:-5px;top:-6px;background:var(--accent);color:white;border-radius:50%;width:19px;height:19px;font-size:13px}.outfits{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.outfit-card{background:#ffebd4;box-shadow:none;border-color:#ddb293;padding:0 4px 7px;position:relative;color:var(--ink);font-size:12px}.outfit-card canvas{width:100%;height:122px;object-fit:contain}.field{display:block;font-weight:700;margin:12px 0 5px}input,select,textarea{border:2px solid #d6ab88;border-radius:12px;background:#fffaf0;color:var(--ink);padding:10px 12px;max-width:100%;min-height:44px}input,textarea{width:100%}textarea{min-height:85px;resize:vertical}.save-bar{display:grid;gap:10px;margin-top:15px}.save-bar .primary{font-size:20px}.tiny-status{min-height:20px;font-size:12px;color:#685043}.companion-peek{display:flex;align-items:center;gap:8px}.companion-peek canvas{width:76px;height:76px;object-fit:contain}.companion-peek button{margin-left:auto}.wide{max-width:1580px;margin:auto}.filters{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}.card-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px}.item-card{padding:15px;border-radius:22px;display:flex;flex-direction:column;align-items:stretch;text-align:center}.item-card h3{margin:9px 0 5px;font-size:18px}.item-card p{margin:0 0 10px}.item-card button{margin-top:auto}.item-art{height:160px;display:grid;place-items:center;overflow:hidden;background:#ffffff40;border-radius:16px}.item-art canvas{height:160px;width:100%;max-width:100%;object-fit:contain}.tag{font-size:12px;display:inline-block;background:#e9d6f1;color:#5a366a;border-radius:14px;padding:3px 9px;margin:3px}.tag.success{background:#d9ead4;color:#315839}.cost{font-weight:bold;color:#5c7140}.collection-top{display:grid;grid-template-columns:330px 1fr;gap:20px}.collection-top .stage{min-height:500px}.empty{padding:32px;text-align:center}.notice{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);z-index:50;max-width:min(650px,92vw);border:2px solid #cfa36a;background:#fff3df;color:#3f302c;padding:14px 24px;border-radius:15px;box-shadow:0 5px 20px #0005;font-weight:bold}.notice.error{background:#ffeadb;border-color:#b96849}.busy{pointer-events:none;opacity:.75}dialog{border:3px solid #b98250;border-radius:24px;background:var(--paper);color:var(--ink);width:min(560px,94vw);max-height:92vh;box-shadow:0 15px 65px #0007;padding:24px}dialog::backdrop{background:#102a27aa;backdrop-filter:blur(5px)}dialog h2{font:700 28px Georgia,serif;padding-right:25px;margin:0 0 14px}dialog .close{float:right;border-radius:50%;width:36px;height:36px;min-height:36px;padding:0;font-size:25px}dialog .primary{width:100%;margin-top:18px}dialog .row button{flex:1}dialog .form-error{color:#8a352c;font-weight:bold;font-size:14px;margin-top:12px}.skip{position:absolute;left:10px;top:-100px;background:white;padding:12px;z-index:100}.skip:focus{top:10px}.learn-frame{width:100%;height:min(1350px,145vh);min-height:1000px;border:0;border-radius:18px;background:#f6faf6}.learning-header{display:flex;gap:10px;justify-content:space-between;align-items:center;margin-bottom:14px;color:#fff8e8;text-shadow:0 2px 3px #123}.progress-row{padding:14px 0;border-bottom:1px solid #dabc9c;display:flex;justify-content:space-between;align-items:center;gap:10px}.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:13px;margin-bottom:20px}.metric{text-align:center}.metric strong{display:block;font:700 38px Georgia,serif;color:var(--accent)}.review-task{border:2px solid #d7b38f;border-radius:15px;padding:14px;margin:15px 0;background:#fff9ed}.review-task blockquote{margin:10px 0;padding:12px;background:#efe4d9;border-radius:8px;white-space:pre-wrap;overflow-wrap:anywhere}.review-task details{font-size:14px}.review-task select{width:100%}.review-task input[type=checkbox]{width:auto;min-height:0}.checkline{display:flex;align-items:flex-start;gap:8px}.login-welcome{text-align:center}.warning{background:#fff1ce;border-left:4px solid #b98238;padding:12px;border-radius:8px;font-size:14px}.profile-choice{display:grid;gap:10px}.profile-choice button{display:flex;align-items:center;gap:10px;text-align:left}.backlink{color:white}.app-error{background:#fff0df;padding:20px;border-radius:18px;color:#6d302c}.draft-warning{color:#8b421e}.pet-equipment{margin-top:10px}.pet-equipment select{width:100%}
@media(min-width:1450px){.creator{grid-template-columns:360px minmax(380px,1fr) 430px}.hair-grid{grid-template-columns:repeat(2,1fr)}.head-thumb{height:91px}.stage{min-height:680px}.avatar-main{max-height:660px}.outfit-card canvas{height:145px}}
@media(max-width:1100px){.brand{font-size:23px}.brand small{font-size:15px}.topbar{flex-wrap:wrap}#nav{order:3;flex-basis:100%}.account-tools{margin-left:auto}.creator{grid-template-columns:minmax(240px,1fr) minmax(280px,1.1fr)}.creator>.choices-panel{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:0 22px}.creator>.choices-panel>.save-section{grid-column:1/-1}.card-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.stage{min-height:590px}.avatar-main{max-height:590px}}
@media(max-width:700px){.topbar{padding:12px;gap:8px}.brand{font-size:21px}.brand small{font-size:13px}.tree{font-size:38px}#nav{justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;padding:4px 0 7px}#nav button{white-space:nowrap;padding:8px 12px}.points{font-size:16px;padding:7px 10px}.account-strip{padding:4px 12px 10px;font-size:12px;flex-wrap:wrap;align-items:stretch}.account-strip>div:first-child{flex:1 1 100%}.account-strip>.row{width:100%}.account-strip>.row button{flex:1}.account-strip select{max-width:160px;margin-left:0}#workspace{padding:0 10px 22px}.page-heading{font-size:26px;margin-bottom:15px}.creator{display:flex;flex-direction:column;gap:15px}.creator>.stage{order:0;width:100%;min-height:390px;max-height:450px}.creator>.hair-panel{order:1;width:100%}.creator>.choices-panel{order:2;width:100%;display:block}.stage .avatar-main{max-height:420px;width:300px}.stage .pet-stage{width:135px;right:calc(50% - 180px);bottom:30px}.stage .pet-stage.second{left:calc(50% - 180px);width:115px}.stage-label{font-size:16px}.hair-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}.hair-card{font-size:10px;padding:2px 1px 5px;border-radius:11px}.head-thumb{height:63px}.head-thumb canvas{width:100px;height:160px;transform:scale(1.1)}.panel{padding:16px;border-radius:21px}.panel h2{font-size:22px}.swatch{width:38px;height:38px;min-height:38px}.outfit-card canvas{height:165px}.card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.item-art{height:150px}.item-art canvas{height:150px}.item-card{padding:10px}.item-card h3{font-size:16px}.item-card button{font-size:13px;padding:9px 5px}.collection-top{display:block}.collection-top>.stage{display:none}.metrics{gap:7px}.metric{padding:14px 7px}.metric strong{font-size:31px}.metric span{font-size:12px}.learn-frame{height:min(1500px,180vh);min-height:1200px}.learning-header{font-size:13px}.woodland{background-size:100% 100%,auto 100vh}body[data-style=boy] .woodland{background-position:center,right center}}
@media(prefers-reduced-motion:no-preference){button{transition:filter .15s,background .2s}.pet-stage{animation:breathe 5s ease-in-out infinite}.pet-stage.second{animation-delay:2s}@keyframes breathe{50%{transform:translateY(-3px)}}}
.checkline input[type=checkbox]{width:20px;min-height:24px;flex:0 0 20px;margin:0 4px 0 0}

/* Keep the learning toolbar inside narrow screens. */
@media(max-width:700px){.learning-header{flex-wrap:wrap}.learning-header>span{min-width:0}}

/* Full-page Year 6 learning workspace */
body.learning-focus{overflow:hidden}
body.learning-focus .woodland,
body.learning-focus>.topbar,
body.learning-focus>#account-strip{display:none!important}
body.learning-focus #workspace{position:fixed;inset:0;z-index:1000;width:100vw;height:100dvh;max-width:none;margin:0;padding:58px 0 0;overflow:hidden}
body.learning-focus #workspace>.page-heading,
body.learning-focus #workspace>.learning-header{display:none!important}
body.learning-focus .learn-frame{position:fixed;top:58px;left:0;width:100vw;height:calc(100dvh - 58px);min-height:0;max-width:none;border:0;border-radius:0}
.learning-exit{display:none}
body.learning-focus .learning-exit{display:flex;position:fixed;top:7px;left:12px;z-index:1003;align-items:center;justify-content:center;min-height:44px;padding:8px 16px;border:1px solid #bbc9b8;border-radius:12px;background:#edf3e9;color:#253d33;font-weight:700;box-shadow:0 2px 6px #0002}
body.learning-focus .learning-exit:hover{background:#e2ecdc}
body.learning-focus .learning-exit:focus-visible{outline:3px solid #355d85;outline-offset:3px}
