:root{font:16px 'DM Sans',system-ui,sans-serif;color:#182945;background:#eff3f9;--muted:#52627b;--line:#dbe3ef;--navy:#203a62;--white:#ffffff}
*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer;border:0;border-radius:12px;padding:.65rem 1rem;background:var(--navy);color:white;font-weight:700}button:hover{filter:brightness(.91)}button:disabled{opacity:.5;cursor:default}:focus-visible{outline:3px solid #527bb5;outline-offset:3px}
header{background:var(--white);border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;padding:.9rem max(5vw,calc((100vw - 1100px)/2));gap:1rem}.brand{font-weight:850;font-size:1.23rem;white-space:nowrap}.brand span{display:inline-grid;place-items:center;width:36px;height:36px;background:#dce8f9;border-radius:10px;margin-right:.35rem}
main{width:min(1100px,90%);margin:auto}.intro{padding:2.55rem 0 1.8rem}h1,h2,h3,p{margin:0}h1{font-family:Georgia,serif;font-size:clamp(2.5rem,6vw,4.15rem);font-weight:500;letter-spacing:-.06em;line-height:1.05}.intro p{margin-top:.6rem;color:var(--muted)}.layout{display:grid;grid-template-columns:minmax(235px,310px) minmax(0,1fr);gap:1.25rem;align-items:start}.card{border:1px solid var(--line);border-radius:22px;background:var(--white);overflow:hidden;box-shadow:0 4px 12px #203a621b}
.scene{height:205px;position:relative;background:radial-gradient(ellipse at 50% 75%,#f1f6ce,#e6efdb 75%);overflow:hidden}.shadow{position:absolute;width:134px;height:19px;border-radius:50%;background:#829a5835;left:50%;bottom:27px;transform:translateX(-50%)}.plant{width:132px;height:145px;position:absolute;bottom:35px;left:50%;transform:translateX(-50%)}.face{position:absolute;bottom:0;left:4px;width:124px;height:91px;background:radial-gradient(circle at 35% 24%,#cbe888,#9ac960 68%,#78aa51);border-radius:52% 52% 43% 43%;border:2px solid #69924a;box-shadow:inset 0 -7px 0 #62934b29}.stem{position:absolute;left:63px;top:29px;width:6px;height:38px;background:#568c45;border-radius:5px;transform:rotate(-6deg)}.leaf{position:absolute;top:21px;width:47px;height:24px;background:#83b95d;border:2px solid #69984b;border-radius:8% 90% 6% 90%;left:20px;transform:rotate(9deg)}.leaf.right{left:65px;top:9px;background:#a5ce68;transform:scaleX(-1) rotate(16deg)}.eye,.cheek,.mouth{position:absolute;top:38px}.eye{width:8px;height:12px;border-radius:50%;background:#29452f}.first{left:32px}.second{right:32px}.cheek{width:13px;height:6px;background:#eaa68b;border-radius:50%;top:52px}.c1{left:19px}.c2{right:19px}.mouth{width:13px;height:8px;border:solid #29452f;border-width:0 0 2px;border-radius:50%;left:53px;top:48px}.spark{position:absolute;color:#698e54;font-style:normal}.one{left:15%;top:30%;font-size:23px}.two{right:16%;top:20%;font-size:29px}.three{right:12%;bottom:26%;font-size:14px}
.stats,.notes{padding:1.15rem 1.25rem}.stats h2{font-family:Georgia,serif;font-size:1.65rem}.stats p,.roomhead p,small,footer{color:var(--muted);font-size:.85rem}.progress-label{display:flex;justify-content:space-between;margin:1.25rem 0 .42rem;font-size:.87rem;font-weight:650}progress{appearance:none;width:100%;height:10px;border:none;border-radius:10px;overflow:hidden;background:#e1e9f5}progress::-webkit-progress-bar{background:#e1e9f5}progress::-webkit-progress-value{background:#416a9e;border-radius:10px}progress::-moz-progress-bar{background:#416a9e}.notes{border-top:1px solid var(--line)}.notes h3{font-size:.95rem;margin-bottom:.6rem}select{width:100%;border:1px solid var(--line);border-radius:9px;padding:.48rem;background:#f2f6fc;color:inherit}.notes button{margin-top:.5rem}
.roomhead{display:flex;gap:.7rem;align-items:center;padding:1rem 1.2rem;border-bottom:1px solid var(--line)}.roomhead h2{font-size:1.1rem}.roomhead p{overflow-wrap:anywhere}.bubble-icon{width:37px;height:37px;display:grid;place-items:center;background:#dce8f9;border-radius:10px;color:var(--navy);flex:none}#chat{height:340px;overflow:auto;padding:1.15rem;display:flex;flex-direction:column;gap:.75rem}.message{width:fit-content;max-width:90%;background:#e8effa;border-radius:4px 15px 15px;padding:.65rem .85rem;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}.message b{display:block;font-size:.78rem;margin-bottom:.2em;color:var(--navy)}.message.you{align-self:flex-end;background:#f3ecdf;border-radius:15px 4px 15px 15px}
#reply{border-top:1px solid var(--line);padding:.9rem 1.15rem 1rem}.actions{display:flex;align-items:center;gap:.45rem;margin-top:.45rem}#send{margin-left:auto}.subtle{background:transparent;color:var(--navy);padding:.45rem .55rem}.subtle:hover{background:#e8effa}textarea,input:not([type=file]){display:block;width:100%;padding:.7rem;border:1px solid #c6d3e5;border-radius:10px;color:inherit;background:#fbfcff}textarea{resize:vertical}
footer{margin:1rem 0 2rem;text-align:center}dialog{color:inherit;background:var(--white);border:1px solid var(--line);padding:1.25rem;border-radius:19px;width:min(550px,92vw)}dialog::backdrop{background:#14233eaa}.dialog-head{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:.6rem}.dialog-head h2{overflow-wrap:anywhere}.close{font-size:1.35rem}dialog label{display:block;font-weight:700;margin:.65rem 0 .3rem}dialog small{display:block;margin-top:.25rem}#error{color:#9d3d2b;margin:.55rem 0}pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:65vh;overflow:auto;font:inherit}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(max-width:650px){.layout{grid-template-columns:1fr}.intro{padding:1.7rem 0 1.25rem}.learner{display:grid;grid-template-columns:1fr 1.35fr}.scene{height:auto;min-height:160px}.plant{transform:translateX(-50%) scale(.7);transform-origin:bottom;bottom:24px}.shadow{width:92px;bottom:17px}.notes{grid-column:1/-1}#chat{height:300px}}
[hidden]{display:none!important}.welcome{padding:clamp(1.2rem,4vw,2.35rem);max-width:730px}.welcome h2{font:1.85rem Georgia,serif}.welcome p{max-width:54ch;margin:.55rem 0 1.1rem;color:var(--muted);line-height:1.6}.prompt-tools{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.25rem 1.15rem;border-bottom:1px solid var(--line);font-size:.84rem;color:var(--muted)}#question-type{font-weight:700}#voice-status:not(:empty){font-size:.84rem;color:var(--muted);margin-top:.5rem}#review{border-top:1px solid var(--line);padding:1rem 1.15rem;background:#f0f5fc}#review p{margin-top:.5rem;white-space:pre-wrap;overflow-wrap:anywhere}#review .actions{justify-content:space-between}.actions{flex-wrap:wrap}

.welcome-layout{grid-template-columns:minmax(0,1fr) minmax(0,340px);align-items:stretch}
.welcome-layout .welcome{max-width:none;display:flex;flex-direction:column;align-items:flex-start;justify-content:center}
.profile-fields{padding:1rem 1.25rem 1.25rem}
.profile-fields h2{font:1.4rem Georgia,serif;margin-bottom:.65rem}
.profile-fields label{display:block;font-size:.87rem;font-weight:700;margin:.55rem 0 .3rem}
.profile-options{display:grid;grid-template-columns:1fr 1fr;gap:.65rem}
.profile-options>div{min-width:0}
.profile-done{margin-top:.7rem;font-size:1rem}
#profile-editor .profile-fields{padding:0}
#profile-editor .profile-fields h2{display:none}
.customize-button{margin:0 1rem .75rem}
.sprout-name{overflow-wrap:anywhere}
.scene[data-palette="peach"]{background:#f9e9d9;--body-light:#ffe7b8;--body-mid:#f6b47f;--body-dark:#d88a61;--leaf:#d18963;--leaf-light:#f1ab75;--outline:#a8614c}
.scene[data-palette="blue"]{background:#e3f1f8;--body-light:#cdefff;--body-mid:#90c9ec;--body-dark:#6a9eca;--leaf:#72acc9;--leaf-light:#a2d1ef;--outline:#4e83a7}
.scene .face{background:radial-gradient(circle at 35% 24%,var(--body-light,#cbe888),var(--body-mid,#9ac960) 68%,var(--body-dark,#78aa51));border-color:var(--outline,#69924a)}
.scene .leaf{background:var(--leaf,#83b95d);border-color:var(--outline,#69984b)}
.scene .leaf.right{background:var(--leaf-light,#a5ce68)}
.scene .stem{background:var(--outline,#568c45)}
.scene .accessory{position:absolute;font-style:normal;line-height:1;z-index:1}
@media(max-width:650px){.welcome-layout{grid-template-columns:1fr}.customization .scene{min-height:155px}.customize-button{grid-column:1/-1;justify-self:start}}

.scene[data-palette="red"]{background:#f8e4e2;--body-light:#ffaba4;--body-mid:#e66e68;--body-dark:#af444d;--leaf:#ab4852;--leaf-light:#db6b65;--outline:#88363d}
.scene[data-palette="orange"]{background:#fae9d9;--body-light:#ffcc98;--body-mid:#f4954b;--body-dark:#cd632d;--leaf:#b66332;--leaf-light:#ef914d;--outline:#8d472b}
.scene[data-palette="yellow"]{background:#f8f2d7;--body-light:#fff0a4;--body-mid:#e8c94f;--body-dark:#b58e31;--leaf:#a59a3c;--leaf-light:#d9c756;--outline:#8e742e}
.scene[data-palette="indigo"]{background:#e8e9f8;--body-light:#b6bdf8;--body-mid:#7784d7;--body-dark:#535da8;--leaf:#5860a0;--leaf-light:#8991d6;--outline:#414a88}
.scene[data-palette="violet"]{background:#eee3f7;--body-light:#e6b6fb;--body-mid:#ab76d7;--body-dark:#7949ac;--leaf:#8d60b4;--leaf-light:#c995e6;--outline:#6e428e}
.scene[data-palette="pink"]{background:#f8e5ef;--body-light:#ffd1e8;--body-mid:#ed9dbf;--body-dark:#c96598;--leaf:#b7638d;--leaf-light:#e68bb3;--outline:#9d5278}
.scene[data-palette="brown"]{background:#f0e9df;--body-light:#d7ad89;--body-mid:#ab7a56;--body-dark:#79543e;--leaf:#816c44;--leaf-light:#b69b66;--outline:#644531}
.scene[data-palette="black"]{background:#e7e9ea;--body-light:#696e79;--body-mid:#383d46;--body-dark:#22262d;--leaf:#404954;--leaf-light:#697580;--outline:#222831;--feature:#fff4dc}
.scene[data-palette="white"]{background:#e9eeef;--body-light:#fff;--body-mid:#f4f6f4;--body-dark:#d7e0df;--leaf:#c6d1cf;--leaf-light:#eef4ef;--outline:#879692}
.scene .eye{background:var(--feature,#29452f)}
.scene .mouth{color:var(--feature,#29452f);border-color:currentColor}
.scene[data-expression="grin"] .mouth{width:23px;height:13px;left:49px;top:50px;background:linear-gradient(#fff 0 30%,currentColor 31%);border:2px solid;border-radius:4px 4px 12px 12px}
.scene[data-expression="curious"] .first{height:15px;top:34px}
.scene[data-expression="curious"] .mouth{left:57px;transform:rotate(-16deg)}
.scene[data-expression="surprised"] .mouth{width:13px;height:13px;left:53px;top:52px;background:currentColor;border-radius:50%}
.scene[data-expression="calm"] .eye,.scene[data-expression="wink"] .second{height:7px;width:14px;top:41px;background:none;border:solid var(--feature,#29452f);border-width:2px 0 0;border-radius:60%}
.scene[data-expression="calm"] .mouth{width:9px;left:55px}
.scene .accessory{pointer-events:none}
.scene .accessory[data-style="hat"]{top:-29px;left:36px;width:54px;height:35px;transform:scale(1.24);border:2px solid #14171e;border-radius:7px 7px 2px 2px;background:linear-gradient(105deg,#222733,#4a5263 30%,#242832 58%,#171b24);box-shadow:inset 0 2px #ffffff32}
.scene .accessory[data-style="hat"]::before{content:"";position:absolute;inset:auto -1px 0;height:9px;background:linear-gradient(#922e42,#551829);border-top:1px solid #bf5b6b}
.scene .accessory[data-style="hat"]::after{content:"";position:absolute;width:75px;height:11px;left:-12px;bottom:-7px;border-radius:50%;background:linear-gradient(#4d5464,#181d27);border:1px solid #14171e}
.scene .accessory[data-style="flower"]{top:-5px;right:13px;transform:scale(1.4);width:13px;height:13px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff1a2,#d89431);box-shadow:0 -8px 0 2px #ffe0ee,8px -3px 0 2px #fbbbd8,5px 7px 0 2px #ec8ab5,-5px 7px 0 2px #f6a3c8,-8px -3px 0 2px #ffd1e7}
.scene .accessory[data-style="star"]{top:-9px;right:8px;width:36px;height:36px;background:linear-gradient(125deg,#ffffc9,#efbd51 48%,#a56824);clip-path:polygon(50% 0,64% 32%,100% 38%,73% 63%,79% 98%,50% 80%,19% 98%,26% 63%,0 38%,36% 32%)}
.scene .accessory[data-style="monocle"]{top:24px;right:18px;width:36px;height:36px;border:3px solid #a66729;border-top-color:#ffde85;border-left-color:#ebbd5c;border-radius:50%;background:linear-gradient(130deg,#e8f6ff85,transparent 40%,#b8dfed35);box-shadow:0 1px 2px #33241377}
.scene .accessory[data-style="monocle"]::after{content:"";position:absolute;top:29px;left:25px;width:16px;height:31px;border:2px dotted #ac732f;border-width:0 2px 2px 0;border-radius:0 0 13px 0;transform:rotate(-14deg)}
.scene .accessory[data-style="bow"]{bottom:-7px;left:53px;transform:scale(1.14);width:15px;height:16px;border-radius:4px;background:linear-gradient(110deg,#ba4253,#641829);box-shadow:inset 0 1px #ff8195;isolation:isolate}
.scene .accessory[data-style="bow"]::before,.scene .accessory[data-style="bow"]::after{content:"";position:absolute;z-index:-1;top:-7px;width:31px;height:30px;border-radius:6px;background:linear-gradient(145deg,#ed6176,#983047 48%,#62182b);clip-path:polygon(0 0,100% 35%,100% 65%,0 100%)}
.scene .accessory[data-style="bow"]::before{right:10px}
.scene .accessory[data-style="bow"]::after{left:10px;transform:scaleX(-1)}
#profile-editor #preview{margin-bottom:.7rem;border-radius:12px;overflow:hidden}
.scene[data-palette="navy"]{background:#e0eaf3;--body-light:#617fa8;--body-mid:#2b456c;--body-dark:#152a4c;--leaf:#314e77;--leaf-light:#607fa6;--outline:#172d50;--feature:#fff5dc}
.scene[data-palette="grey"]{background:#e8edee;--body-light:#e0e4e7;--body-mid:#a6afb7;--body-dark:#75838d;--leaf:#778892;--leaf-light:#b3bec5;--outline:#596873}
.scene .accessory[data-style="glasses"]{top:39px;left:11px;width:98px;height:8px;border-radius:5px;background:linear-gradient(#435152,#18252b)}
.scene .accessory[data-style="glasses"]::before,.scene .accessory[data-style="glasses"]::after{content:"";position:absolute;top:-14px;width:39px;height:33px;border:4px solid #263238;border-top-color:#566068;border-radius:9px 9px 14px 14px;background:linear-gradient(140deg,#e0f5ff88,transparent 52%,#b5dfef4a)}
.scene .accessory[data-style="glasses"]::before{left:0}
.scene .accessory[data-style="glasses"]::after{right:0}
.scene .accessory[data-style="crown"]{top:-32px;left:18px;width:85px;height:47px;background:linear-gradient(135deg,#f4ba4f,#fff39a 30%,#d1892b 65%,#f1c963);clip-path:polygon(0 10%,23% 43%,50% 0,77% 43%,100% 10%,89% 95%,11% 95%)}
.scene .accessory[data-style="crown"]::before{content:"";position:absolute;top:23px;left:35px;width:15px;height:16px;transform:rotate(45deg);border:2px solid #ffed9e;background:linear-gradient(135deg,#ff8b9e,#971a43 70%)}
.scene .accessory[data-style="crown"]::after{content:"";position:absolute;bottom:2px;width:100%;height:6px;background:linear-gradient(#fff3a7,#a86b1c)}
.scene .accessory[data-style="knight"]{top:-38px;left:19px;width:83px;height:57px;border:2px solid #263746;border-radius:52% 52% 13% 13%;background:linear-gradient(105deg,#66798a,#d9e4ea 31%,#95a9b8 51%,#465969);box-shadow:inset 0 3px #f7fbff9c}
.scene .accessory[data-style="knight"]::before{content:"";position:absolute;top:25px;left:10px;width:59px;height:23px;border:2px solid #374854;border-radius:5px 5px 14px 14px;background:repeating-linear-gradient(90deg,#aebdc7 0 6px,#354553 6px 9px)}
.scene .accessory[data-style="knight"]::after{content:"";position:absolute;top:-11px;left:32px;width:32px;height:12px;border-radius:65% 85% 4px 7px;background:linear-gradient(#e66966,#92293b);transform:rotate(15deg)}
.scene .accessory[data-style="headphones"]{top:-10px;left:-13px;width:146px;height:77px;border:8px solid #222a3d;border-top-color:#536584;border-bottom:0;border-radius:54% 54% 8px 8px;box-shadow:inset 0 3px #8c9bbd}
.scene .accessory[data-style="headphones"]::before,.scene .accessory[data-style="headphones"]::after{content:"";position:absolute;bottom:-3px;width:23px;height:39px;border:2px solid #171d2e;border-radius:12px;background:linear-gradient(100deg,#8390ae,#425272 45%,#282f46)}
.scene .accessory[data-style="headphones"]::before{left:-10px}.scene .accessory[data-style="headphones"]::after{right:-10px}
.scene .accessory-one[data-region="pin"]{translate:-74px 0}
.scene .accessory-one[data-region="head"]{translate:-42px -3px;rotate:-13deg}
.scene .accessory-two[data-region="head"]{translate:42px -3px;rotate:13deg}
.scene .accessory-one[data-region="eyes"]{translate:-18px -15px;rotate:-8deg}
.scene .accessory-two[data-region="eyes"]{translate:18px 14px;rotate:8deg}
.scene .accessory-one[data-region="neck"]{translate:-40px 0}
.scene .accessory-two[data-region="neck"]{translate:40px 0}
.scene .accessory:is([data-style="hat"],[data-style="crown"])[data-region="head"]{rotate:none}
.welcome-upload{margin-top:.65rem;padding-top:1.25rem;border-top:1px solid var(--line);width:100%}
#import-status:not(:empty){margin:.65rem 0;color:var(--muted);font-size:.87rem}
#viewer:has(#original-preview:not([hidden])){width:min(1040px,94vw)}
#original-preview{display:block;width:100%;height:72vh;border:1px solid var(--line);margin-top:.7rem;border-radius:10px}
#original-file{color:var(--navy);font-weight:700}
#original-status:not(:empty){margin-top:.65rem}
.prompt-tools{flex-wrap:wrap}
#focus-options{margin:1rem 0;max-height:45vh;overflow:auto}
#focus-options label{display:flex;align-items:flex-start;gap:.65rem;margin:0;padding:.45rem .25rem}
#focus-options input{flex:none;width:1rem;margin:.23rem 0 0}

h1{font-size:clamp(1.9rem,4vw,2.85rem)}
main:has(#workspace:not([hidden])){width:min(1440px,95%)}
main:has(#workspace:not([hidden])) .intro{padding:1.1rem 0 .85rem}
#workspace #chat{height:clamp(350px,55svh,760px)}
@media(min-width:651px){
  #workspace{grid-template-columns:clamp(210px,21vw,258px) minmax(0,1fr);gap:1rem}
}
@media(max-width:650px){
  #workspace #chat{height:clamp(330px,54svh,620px)}
}
.lesson-tracker{display:flex;align-items:center;justify-content:space-between;gap:.7rem 1.25rem;flex-wrap:wrap;padding:.75rem 1.15rem;background:#f3f7fc;border-bottom:1px solid var(--line)}
#lesson-steps{display:flex;align-items:center;gap:clamp(.4rem,2vw,1.3rem);padding:0;margin:0;list-style:none}
#lesson-steps li{display:flex;align-items:center;gap:.36rem;font-weight:700;font-size:.86rem;color:var(--muted);white-space:nowrap}
#lesson-steps li[data-step="current"]{color:var(--navy)}
.step-icon{display:grid;place-items:center;width:1.45rem;height:1.45rem;border-radius:50%;border:1px solid #bccce1;background:#fff}
#lesson-steps [data-step="current"] .step-icon{color:#fff;background:var(--navy);border-color:var(--navy)}
#lesson-steps [data-step="done"] .step-icon{color:var(--navy);background:#d9e8fa;border-color:#d9e8fa}
.room-progress{display:flex;align-items:center;gap:.55rem}
#room-progress-text{font-size:.8rem;color:var(--muted);white-space:nowrap}
#room-progress{width:clamp(64px,12vw,120px);height:6px}

#expand-room{margin-left:auto;white-space:nowrap;font-size:.85rem;background:#edf3fb;padding:.5rem .7rem}
#expand-room:hover{background:#dfebfb}
.room #chat{background:#f8fafd}
.room .message{max-width:min(88%,72ch);padding:.82rem 1rem;border:1px solid #deebf9;border-radius:17px 17px 17px 5px;background:#eef4fd}
.room .message.you{background:#fff;border-color:#e3e6ec;border-radius:17px 17px 5px 17px}
.room .message b{margin-bottom:.25rem}
.room #reply{padding:.75rem 1rem .85rem;background:#fff}
.room #answer{border-color:#d4e1f0;border-radius:16px;background:#f8fafd;line-height:1.5;min-height:3.4rem;padding:.72rem .9rem}
.room #answer:focus-visible{outline:2px solid #718fbb;outline-offset:1px}
.room #send{border-radius:999px;padding:.55rem 1rem}

#room-view{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:#eff3f9;overflow:auto}
#room-view #workspace{grid-template-columns:clamp(168px,18vw,245px) minmax(0,1fr);gap:0;min-height:100%;margin:0;align-items:start}
#room-view .learner{position:sticky;top:1rem;align-self:start;margin:1rem;box-shadow:0 8px 24px #203a6220}
#room-view .room{display:flex;flex-direction:column;height:100dvh;min-height:min(520px,100dvh);border:0;border-radius:0;box-shadow:none}
#room-view #chat{flex:1;height:auto;min-height:100px}
#room-view #reply{flex:none}
@media(max-width:650px){
  #room-view #workspace{position:relative;display:block}
  #room-view .learner{position:absolute;top:4px;left:4px;margin:0;width:62px;height:55px;display:block;z-index:1;border-radius:13px;pointer-events:none}
  #room-view .learner .scene{height:55px;min-height:0}
  #room-view .learner .plant{transform:translateX(-50%) scale(.29);bottom:5px}
  #room-view .learner .shadow,#room-view .learner .spark,#room-view .learner .stats,#room-view .learner .notes,#room-view .learner .customize-button{display:none}
  #room-view .roomhead{padding:.65rem .5rem .65rem 4.4rem;min-height:64px}
  #room-view .roomhead .bubble-icon{display:none}
  #room-view .room #reply{padding:.55rem .65rem}
  #room-view .room .message{max-width:94%}
}
body:has(#room-view[open]){overflow:hidden}
.thinking{width:fit-content;padding:.35rem .8rem;color:var(--muted);font-size:.85rem;font-style:italic}

.lesson-heading{display:none}
body:has(main #workspace:not([hidden])){display:flex;flex-direction:column;height:100dvh;overflow:hidden}
body:has(main #workspace:not([hidden])) header{flex:none;padding:.65rem max(2.5vw,calc((100vw - 1440px)/2))}
body:has(main #workspace:not([hidden])) header .brand,
main:has(#workspace:not([hidden])) :is(.intro,footer){display:none}
body:has(main #workspace:not([hidden])) .lesson-heading{display:block;min-width:0;font-size:clamp(1.4rem,3vw,2rem);letter-spacing:-.035em;overflow-wrap:anywhere}
body:has(main #workspace:not([hidden])) header #open{flex:none}
main:has(#workspace:not([hidden])){display:flex;flex:1;min-height:0;padding:.65rem 0}
main > #workspace:not([hidden]){width:100%;min-height:0;align-items:stretch}
main > #workspace .learner{align-self:start;max-height:100%;overflow:auto;overscroll-behavior:contain}
#workspace .room{display:flex;flex-direction:column;min-height:0;min-width:0}
#workspace .room > :not(#chat):not(#review){flex:none}
#workspace #chat{flex:1 1 auto;height:auto;min-height:0;overscroll-behavior:contain}
#workspace #review{flex:none;padding:.5rem 1.15rem}
#review summary{cursor:pointer;font-weight:700;padding:.3rem 0}
#review .review-notes{max-height:min(19dvh,12rem);overflow:auto;overscroll-behavior:contain}
#review .actions{margin-top:.4rem}
#workspace #answer{max-height:22dvh}
#learner-scene .leaf{scale:var(--leaf-growth,.70);transform-origin:bottom right;transition:scale .65s ease}
#learner-scene .leaf.right{transform-origin:bottom left}
@media(prefers-reduced-motion:reduce){#learner-scene .leaf{transition:none}}

#room-view{overflow:hidden}
#room-view #workspace{display:block;position:relative;height:100%;min-height:0}
#room-view .room{height:100%;min-height:0}
#room-view .learner{position:absolute;top:.55rem;left:1rem;width:68px;height:54px;display:block;z-index:1;margin:0;border:0;border-radius:15px;pointer-events:none;box-shadow:0 5px 14px #203a6220}
#room-view .learner .scene{height:54px;min-height:0}
#room-view .learner .plant{transform:translateX(-50%) scale(.29);transform-origin:bottom;bottom:4px}
#room-view .learner :is(.shadow,.spark,.stats,.notes,.customize-button){display:none}
#room-view .roomhead{padding:.65rem 1rem .65rem 6rem;min-height:72px}
#room-view .roomhead .bubble-icon{display:none}
#room-view .room-progress{gap:.4rem}
#room-view #room-progress{width:clamp(48px,9vw,92px)}
@media(max-width:650px){
  main:has(#workspace:not([hidden])){padding:.35rem 0}
  main > #workspace:not([hidden]){grid-template-rows:auto minmax(0,1fr);gap:.35rem}
  main > #workspace .learner{grid-template-columns:76px 1fr;max-height:24dvh;align-self:stretch}
  main > #workspace .learner .scene{min-height:72px}
  main > #workspace .learner .plant{transform:translateX(-50%) scale(.33);bottom:6px}
  main > #workspace .learner :is(.shadow,.spark){display:none}
  main > #workspace .stats{padding:.4rem .65rem}
  main > #workspace .progress-label{margin:.3rem 0 .15rem}
  main > #workspace .notes{padding:.3rem .55rem}
  #room-view .learner{left:.55rem;width:59px}
  #room-view .roomhead{padding-left:4.85rem}
}
@media(max-height:520px){
  #workspace .lesson-tracker,#workspace .prompt-tools,#workspace .roomhead{padding-block:.35rem}
  #workspace #reply{padding-block:.4rem}
  main > #workspace .learner{max-height:20dvh}
  #room-view .roomhead{padding-left:6rem}
}
.header-actions{display:flex;align-items:center;gap:.3rem;flex:none}
#library-dialog{width:min(680px,94vw);max-height:88dvh;overflow:auto}
.library-section{border-top:1px solid var(--line);padding:.85rem 0}
.library-help{font-size:.87rem;color:var(--muted);margin:.3rem 0;line-height:1.5}
.library-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.35rem .55rem;margin:.6rem 0 .85rem}
.library-form label,.library-form input,.library-form select{grid-column:1/-1}
.library-form button{grid-column:1;justify-self:start}
.library-row{display:flex;align-items:center;flex-wrap:wrap;gap:.3rem;padding:.3rem 0 .3rem calc(var(--depth,0) * .8rem);border-top:1px solid var(--line)}
.library-row button:first-child{text-align:left;overflow-wrap:anywhere}
.library-row select{width:auto;max-width:min(12rem,100%)}
.library-row button:last-child{margin-left:auto}
.library-folder strong{color:var(--navy)}
#source-scope label{display:flex;align-items:flex-start;gap:.55rem;font-size:.9rem}
#source-scope input{flex:none;width:1rem;margin:.15rem 0 0}
#library-status:not(:empty){color:#9d3d2b}
@media(max-width:420px){.header-actions button{padding:.55rem .6rem;font-size:.78rem}}
#library-dialog{width:min(1050px,96vw);max-height:92dvh;padding:clamp(1rem,2.6vw,2rem)}
.library-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(220px,1fr);align-items:start;gap:.75rem 1.5rem}
.library-profile{grid-column:1/-1}
.library-lessons,.library-sources{min-width:0}
.library-profile summary,.library-folder summary{cursor:pointer;font-weight:750;color:var(--navy);overflow-wrap:anywhere}
.library-folder{border:1px solid var(--line);border-radius:10px;background:#f8fafd;margin:.45rem 0;padding:.45rem .6rem}
.library-folder .library-folder{margin-left:.55rem;background:white}
.library-folder summary{padding:.3rem .2rem}
.folder-actions{border:0;padding:.15rem 0}
.folder-actions button{font-size:.8rem}
@media(max-width:685px){.library-layout{grid-template-columns:minmax(0,1fr);gap:.4rem}}
#learner-scene.is-confused .eye.first{top:34px;height:12px;width:8px;border:0;background:var(--feature,#29452f)}
#learner-scene.is-confused .eye.second{top:39px;height:10px;width:8px;border:0;background:var(--feature,#29452f)}
#learner-scene.is-confused .mouth{top:52px;left:54px;width:13px;height:7px;background:none;border-width:2px 0 0;border-radius:50%;transform:rotate(-12deg)}
#teachback-actions{margin:0;padding:.6rem 1rem;border-top:1px solid var(--line);justify-content:flex-end;background:#f3f7fc}
@media(max-width:390px){#lesson-steps{flex-wrap:wrap}}

#current-focus{min-width:0;overflow-wrap:anywhere}
#focus-all{margin-top:.65rem}

#learner-scene.is-understood .eye{height:7px;width:14px;background:none;border:solid var(--feature,#29452f);border-width:2px 0 0;border-radius:55% 55% 0 0}
#learner-scene.is-understood .mouth{left:49px;top:49px;width:22px;height:13px;background:linear-gradient(#fff 0 30%,currentColor 31%);border:2px solid;border-radius:4px 4px 12px 12px;transform:none}
#learner-scene.is-speaking .mouth{left:53px;top:49px;width:14px;height:10px;background:currentColor;border:0;border-radius:50%;transform:none;animation:sprout-talk .38s ease-in-out infinite alternate}
@keyframes sprout-talk{from{scale:1 .45}to{scale:1 1.2}}
@media(prefers-reduced-motion:reduce){#learner-scene.is-speaking .mouth{animation:none}}

#sprout-voice{width:auto;max-width:min(13rem,100%);font:inherit}
