*{box-sizing:border-box} :root{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:#263e35;background:#f6f5ef;font-synthesis:none}body{margin:0}button,input,textarea{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:default;opacity:.48}[hidden]{display:none!important}main{max-width:1000px;margin:auto;padding:0 40px}header{height:102px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #dedfd5}.brand{font-size:24px;font-weight:650;letter-spacing:2px;text-decoration:none;color:inherit;display:flex;align-items:center;gap:8px}.mark{font-size:42px;font-weight:400;color:#56846f}.brand-sub{font-size:12px;font-weight:400;letter-spacing:1px;margin-left:10px;color:#788478}.pill{font-size:12px;border:1px solid #d5dbcf;padding:7px 12px;border-radius:30px;color:#667264}.mode{font-size:12px;color:#7b6840;padding:12px 0;min-height:42px}.mode.live{color:#4c7860}.hero{position:relative;padding:44px 0 50px;overflow:hidden}.eyebrow{font-size:13px;letter-spacing:2px;color:#648171;margin-bottom:22px}h1{font-size:48px;font-weight:500;line-height:1.4;letter-spacing:2px;margin:0 0 22px}.hero p{color:#778175;line-height:1.9;font-size:15px}.hero-note{display:flex;gap:20px;font-size:11px;color:#7b8677;margin-top:28px}.hero-note span:before{content:'·';margin-right:6px}.orbit{position:absolute;width:230px;height:230px;border:1px solid #cbd6c5;border-radius:50%;right:65px;top:60px;transform:rotate(-12deg);background:#e8edde}.orbit:before{content:'';position:absolute;width:230px;height:230px;border:1px solid #cbd6c5;border-radius:50%;left:35px;top:15px}.orbit span{font-family:Georgia,serif;font-size:200px;color:#8da285;position:absolute;top:-3px;left:52px}.orbit i{font-style:normal;position:absolute;bottom:34px;left:101px;letter-spacing:5px;color:#63806d}.section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}h2{font-size:18px;font-weight:550;margin:0}.section-head>span{font-size:11px;color:#929887}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.card{text-align:left;border:1px solid #dcdfd3;border-radius:16px;background:#fbfaf6;color:inherit;padding:22px 18px;position:relative;min-height:220px;transition:background .2s,border .2s}.card:hover{background:#eef2e7}.card.selected{border:2px solid #52785e;background:#edf1e4;padding:21px 17px}.card.selected:after{content:'✓';position:absolute;right:14px;top:14px;color:#426b51}.card-icon{display:flex;align-items:center;justify-content:center;font-size:30px;border-radius:50%;width:49px;height:49px;background:#e5eade;color:#75876b;margin-bottom:18px}.card:nth-child(2) .card-icon{background:#f2e9d6;color:#ab8b51}.card:nth-child(3) .card-icon{background:#e4eaf0;color:#7a92a2}.card:nth-child(4) .card-icon{background:#f0e2d9;color:#b78665}.card b{display:block;font-size:15px;margin-bottom:9px}.card small{font-size:11px;color:#8a9180}.card p{font-size:12px;line-height:1.8;color:#78816f;margin-bottom:0}.start-row{display:flex;justify-content:space-between;align-items:center;padding:27px 0 30px}.start-row p{font-size:14px;line-height:1.9}.start-row small{font-size:12px;color:#929887}.primary{background:#315b43;color:#fff;border:0;border-radius:10px;padding:15px 24px;font-size:14px}.primary span{margin-left:36px}.primary:hover:not(:disabled){background:#234b34}.note{border-top:1px solid #dce0d2;padding-top:20px;color:#8b9182;font-size:12px;line-height:1.9}.note b{font-weight:500;color:#6e7f6e}.note p{max-width:790px}footer{font-size:11px;letter-spacing:2px;color:#a1a697;padding:34px 0}footer span{padding:0 7px}#code-wrap{display:block;font-size:13px;margin-top:22px}input{border:1px solid #cbd6c5;border-radius:8px;padding:10px;margin-left:14px;background:white}button:focus-visible,a:focus-visible,textarea:focus-visible,input:focus-visible{outline:3px solid #b0c5a5;outline-offset:3px}.chat-head{display:flex;align-items:center;gap:14px;padding:18px 0}.avatar{width:48px;height:48px;border-radius:50%;background:#e5eade;display:grid;place-items:center;font-size:28px}.chat-head p{font-size:12px;color:#899180;margin:7px 0 0}.chat-head>button{margin-left:auto}.text-button{border:0;background:transparent;color:#56715b;padding:10px 6px;font-size:13px}.chat-caption{text-align:center;font-size:11px;color:#9a9f91;padding:12px;background:#ecefe4;border-radius:8px}.messages{height:clamp(260px,43vh,480px);overflow:auto;padding:25px 0;scroll-behavior:smooth}.bubble-row{display:flex;flex-direction:column;align-items:flex-start;margin-bottom:20px}.bubble-row.user{align-items:flex-end}.bubble-label{font-size:11px;color:#8e9788;margin-bottom:7px}.bubble{white-space:pre-wrap;overflow-wrap:anywhere;background:#fff;border:1px solid #e4e6dc;padding:13px 17px;border-radius:3px 15px 15px 15px;max-width:80%;font-size:15px;line-height:1.8}.user .bubble{background:#e1ead7;border:0;border-radius:15px 3px 15px 15px}.chat-actions{display:flex;justify-content:space-between;margin:6px 0}#composer{display:flex;gap:14px;border:1px solid #d5dccb;background:#fff;border-radius:14px;padding:12px;align-items:flex-end}textarea{flex:1;width:0;min-height:62px;max-height:170px;resize:vertical;border:0;background:transparent;line-height:1.8;font-size:15px;color:#344c3e;padding:5px}textarea::placeholder{color:#a4aa9e}#send{padding:12px 16px;white-space:nowrap}.under-input{display:flex;justify-content:space-between;gap:15px;font-size:10px;color:#909987;line-height:1.6}.hint-box{padding:15px 18px;background:#eeeadb;border-radius:10px;font-size:13px;color:#7b7456;line-height:1.8}.hint-box p{white-space:pre-wrap;margin:7px 0 0}.hint-box b{font-weight:550}.review-content{white-space:pre-wrap;overflow-wrap:anywhere;background:#fff;border:1px solid #e0e4d7;border-radius:16px;padding:28px;line-height:2;font-size:15px}#reflection{padding:30px 0}#reflection h1{font-size:36px}#reflection .note{margin:23px 0}#error{background:#f6e5df;color:#964f3d;padding:14px 18px;border-radius:10px;position:sticky;bottom:15px;font-size:13px;margin-top:16px}.sr-only{position:absolute;clip:rect(0,0,0,0);width:1px;height:1px;overflow:hidden}#transcript{height:auto;max-height:600px}
@media(max-width:700px){main{padding:0 22px}header{height:76px}.brand{font-size:22px}.brand-sub{font-size:10px;margin-left:2px}.pill{font-size:10px;padding:6px 8px}.hero{padding:28px 0 32px}h1{font-size:35px;letter-spacing:1px}.hero p{font-size:13px}.orbit{width:120px;height:120px;right:-25px;top:100px;opacity:.55}.orbit:before{width:120px;height:120px;left:16px;top:8px}.orbit span{font-size:110px;left:25px;top:-3px}.orbit i{font-size:12px;left:48px;bottom:16px}.hero-note{gap:11px;font-size:10px}.section-head h2{font-size:15px}.section-head>span{font-size:9px}.cards{grid-template-columns:repeat(2,1fr);gap:12px}.card{min-height:197px;padding:18px 16px}.card.selected{padding:17px 15px}.card-icon{width:41px;height:41px;font-size:25px;margin-bottom:13px}.card b{font-size:14px}.start-row{align-items:center;gap:8px}.start-row p{font-size:12px}.start-row small{font-size:10px}.primary{padding:14px 18px;font-size:13px}.primary span{margin-left:12px}.note{font-size:11px}.mode{font-size:11px;line-height:1.7}.chat-caption{font-size:10px}.bubble{max-width:90%;font-size:14px}.chat-head h2{font-size:17px}.text-button{font-size:12px}.messages{height:40vh;min-height:230px}#composer{padding:8px;gap:8px}textarea{font-size:16px}.under-input span:last-child{display:none}footer{padding-bottom:max(24px,env(safe-area-inset-bottom))}#reflection h1{font-size:29px}.review-content{padding:20px;font-size:14px}}

.grade-picker{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.grade-picker button,.role-picker button{border:1px solid #d5ddcd;background:#fbfaf6;color:#657960;border-radius:10px;padding:13px 10px;font-size:14px}
.grade-picker button[aria-pressed="true"],.role-picker button[aria-pressed="true"]{background:#315b43;color:white;border-color:#315b43}
.grade-overview{margin:18px 0 24px;padding:20px 22px;background:#eaf0e3;border-radius:12px}
.grade-overview h3{margin:0;font-weight:550;font-size:17px;line-height:1.6}
.scene-description{font-size:13px;line-height:1.9;color:#65765e;margin:8px 0}
.grade-overview small{display:block;font-size:11px;line-height:1.8;color:#788572}
.role-row{display:flex;gap:16px;align-items:center;font-size:13px;color:#65765e}
.role-picker{display:flex;gap:8px}.role-picker button{font-size:13px;padding:10px 14px}
.role-description{font-size:12px;line-height:1.8;color:#788572;margin:10px 0 22px}
.scene-count{font-size:12px;color:#788572;margin-bottom:14px}
.cards{grid-template-columns:repeat(3,minmax(0,1fr))}.card{min-height:220px}.card b{line-height:1.6}
@media(max-width:700px){.grade-picker{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.grade-picker button{font-size:13px;padding:12px 8px}.grade-overview{padding:16px;margin-top:14px}.grade-overview h3{font-size:16px}.scene-description{font-size:12px}.role-row{gap:10px;flex-wrap:wrap}.role-picker button{font-size:12px;padding:10px 12px}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.card{min-height:220px}.card small{line-height:1.7;display:block}.hero-note{flex-wrap:wrap;gap:6px 12px}}

/* Compact phone layout: only the story list, conversation or review scrolls. */
.selected-intro,.mobile-review-title{display:none}
.hint-heading,.dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}
.hint-heading .text-button{padding:4px 0;min-height:32px}
.reflection-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:20px}
dialog{border:1px solid #d5ddcd;border-radius:16px;background:#f6f5ef;color:#263e35;padding:20px;max-width:480px;width:calc(100% - 32px);max-height:80dvh;overflow:auto}
dialog::backdrop{background:#1b302866}#about-content{white-space:pre-wrap;line-height:1.9;font-size:14px}
@media(max-width:700px){
  html,body{height:100%;overflow:hidden}
  main{position:fixed;top:var(--app-top,0px);left:0;width:100%;max-width:none;height:var(--app-height,100dvh);display:flex;flex-direction:column;overflow:hidden;padding:0 14px max(8px,env(safe-area-inset-bottom))}
  header{height:44px;min-height:44px;flex-shrink:0}.brand{font-size:20px;letter-spacing:1px;gap:4px}.mark{font-size:30px}.brand-sub{font-size:10px}#about{font-size:12px;min-height:40px}
  .mode{padding:4px 0;min-height:24px;font-size:10px;line-height:16px;flex-shrink:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  footer,.hero,.grade-overview,.role-description,#home>.note,.start-row>p,.section-head>span{display:none}
  #home{display:flex;flex-direction:column;flex:1;min-height:0;gap:7px;padding-top:5px}
  .section-head{margin:0;flex-shrink:0;min-height:25px}.section-head h2{font-size:17px}
  .grade-picker{grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;flex-shrink:0}
  .grade-picker button{font-size:12px;white-space:nowrap;padding:0 2px;min-height:42px;border-radius:9px}
  .role-row{flex-wrap:nowrap;gap:10px;flex-shrink:0;font-size:12px;justify-content:space-between}.role-picker{gap:6px}.role-picker button{min-height:40px;padding:7px 12px;font-size:12px}
  .scene-count{font-size:11px;margin:1px 0 0;min-height:17px;flex-shrink:0}
  .cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(52px,auto);align-content:start;gap:6px;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:2px;scroll-padding:4px}
  .card,.card.selected{min-height:52px;padding:8px 17px 8px 10px;border-radius:10px;border-width:1px}
  .card.selected{box-shadow:inset 0 0 0 1px #52785e}.card.selected:after{top:4px;right:5px;font-size:11px}.card b{font-size:13px;line-height:18px;margin:0;font-weight:500}.card-icon,.card small,.card p{display:none}
  .selected-intro{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;line-height:18px;color:#65765e;margin:0;min-height:36px;flex-shrink:0}
  .start-row{padding:0;display:block;flex-shrink:0}.start-row .primary{width:100%;height:48px;font-size:15px}
  #code-wrap{margin:0;font-size:12px;flex-shrink:0}#code{height:38px;width:calc(100% - 85px);margin-left:10px;font-size:16px;padding:6px 10px}
  body[data-screen="practice"] .mode,body[data-screen="reflection"] .mode{display:none}
  #practice{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
  .chat-head{padding:9px 0;gap:9px;flex-shrink:0;min-height:60px}.avatar{width:34px;height:34px;flex-shrink:0;font-size:23px}.chat-head>div:nth-child(2){min-width:0;flex:1}.chat-head h2{font-size:16px}.chat-head p{font-size:11px;line-height:16px;margin:3px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-head>button{white-space:nowrap;font-size:11px;min-height:40px;padding:4px}
  .chat-caption{padding:5px;font-size:10px;flex-shrink:0;line-height:16px}
  #messages{flex:1;min-height:0;height:auto;padding:14px 0;overscroll-behavior:contain;scroll-behavior:auto}
  .bubble-row{margin-bottom:14px}.bubble{font-size:14px;padding:10px 13px;line-height:1.7}.bubble-label{margin-bottom:5px;font-size:10px}
  .hint-box{flex-shrink:0;max-height:28%;overflow:auto;padding:7px 12px;font-size:12px;line-height:1.7}.hint-box p{margin-top:2px}
  .chat-actions{flex-shrink:0;margin:3px 0;min-height:40px;align-items:center}.chat-actions button{min-height:40px;font-size:12px}
  #composer{flex-shrink:0;padding:7px;gap:7px;border-radius:12px}textarea{min-height:46px;height:54px;max-height:84px;resize:none;font-size:16px;line-height:22px;padding:4px}#send{min-height:42px;padding:10px 13px}
  .under-input{flex-shrink:0;font-size:10px;line-height:15px;margin:4px 0 0;min-height:15px}
  #reflection{display:flex;flex-direction:column;flex:1;min-height:0;padding:12px 0 0;gap:8px}
  #reflection>.eyebrow,#reflection>h1,#reflection>.note{display:none}.mobile-review-title{display:block;font-size:18px;flex-shrink:0}
  #review-meta{margin:0;font-size:11px;line-height:17px;flex-shrink:0}
  #review-content,#transcript{flex:1;min-height:0;height:auto;max-height:none;overflow:auto;margin:0;overscroll-behavior:contain}
  #review-content{padding:16px;font-size:14px;line-height:1.9;border-radius:12px}#transcript{padding:10px 0}
  .reflection-actions{margin:0;flex-shrink:0;min-height:48px}.reflection-actions button{min-height:44px}
  #error{position:absolute;left:14px;right:14px;bottom:95px;margin:0;z-index:3;max-height:35%;overflow:auto;font-size:12px;box-shadow:0 3px 18px #263e3520}
}
@media(max-width:700px) and (max-height:480px){
  body[data-screen="practice"] header{display:none}.chat-head{min-height:43px;padding:4px 0}.chat-caption{display:none}.chat-actions{min-height:36px;margin:0}.chat-actions button{min-height:36px}textarea{height:46px}.under-input{margin-top:2px}
}
.voice-toggle{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:44px;min-height:48px;border:0;border-radius:50%;background:#eaf0e3;color:#315b43;font-size:10px;padding:5px;flex-shrink:0;transition:background .2s,color .2s}
.voice-toggle[data-recording="true"]{background:#e4f1ff;color:#1477de;box-shadow:0 0 0 3px #62afff60,0 0 14px #3b95ff66}
.voice-toggle[data-recording="true"]::after{content:"";position:absolute;inset:-3px;border-radius:50%;border:2px solid #62afff;animation:voice-glow 1.6s ease-out infinite;pointer-events:none}
@keyframes voice-glow{0%{transform:scale(1);opacity:.75}100%{transform:scale(1.16);opacity:0}}
@media(prefers-reduced-motion:reduce){.voice-toggle[data-recording="true"]::after{animation:none}}
.voice-notice{font-size:12px;line-height:1.6;color:#49615d;padding:4px 3px;flex-shrink:0}.voice-notice a{margin-left:6px;color:#1765b3}
@media(max-width:700px){.voice-toggle{min-width:42px;min-height:44px;font-size:9px}#composer{gap:8px;padding:9px}#composer textarea{min-width:0}.voice-notice{font-size:11px}}

.parent-categories{display:flex;gap:5px;flex-shrink:0}.parent-categories button{flex:1;border:1px solid #d5ddcd;background:transparent;color:#52705d;border-radius:8px;padding:8px 3px;font-size:12px;min-height:36px;white-space:nowrap}.parent-categories button[aria-pressed="true"]{background:#315b43;color:white;border-color:#315b43}#parent-followup{border-top:1px solid #d7d2bb;margin-top:8px;padding-top:4px}#parent-followup summary{cursor:pointer;min-height:36px;display:list-item;padding:7px 0;font-weight:550}#parent-focus{font-size:11px;color:#60795f}#followup-content{white-space:pre-wrap}

.volunteer-controls{display:flex;align-items:center;gap:8px;flex-shrink:0;min-height:36px;font-size:12px;color:#52705d}.volunteer-controls select{flex:1;min-width:0;max-width:240px;min-height:36px;border:1px solid #d5ddcd;border-radius:8px;color:#315b43;background:#f6f5ef;padding:4px 8px;font-size:14px}.volunteer-controls button{margin-left:auto;min-height:36px;font-size:12px}#about-content{white-space:pre-wrap;line-height:1.8;overflow-wrap:anywhere}#about-content a{color:#315b43;text-decoration:underline}
