/* 1.3: a calm, playful learning workspace. No curriculum or score changes. */
:root{--ink:#213b3a;--muted:#5f706e;--navy:#213b3a;--teal:#146b58;--mint:#cef18b;--orange:#ffd18c;--line:#d8e1d6;--background:#fbf8ef;font-family:system-ui,-apple-system,'Noto Sans TC',sans-serif}
body{background:var(--background);line-height:1.65}button{border-radius:16px;border:1.5px solid var(--line);box-shadow:0 3px 0 #213b3a12;transition:background .14s,transform .14s,box-shadow .14s;min-height:48px}button:hover:not(:disabled){background:#edf3e4;transform:translateY(-1px)}button:active:not(:disabled){transform:translateY(2px);box-shadow:none}button:disabled{transform:none}.primary{border-color:#146b58;box-shadow:0 4px 0 #0d4f41}.primary:hover:not(:disabled){background:#105947;color:#fff}.warm{border-color:#dca656;box-shadow:0 3px 0 #d8a75f}.quiet,.skip-action{box-shadow:none}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #b65816;outline-offset:4px}h1{font-size:clamp(1.7rem,3.4vw,2.5rem);line-height:1.35;letter-spacing:-.025em}.app-header{background:#fffdf7;color:var(--ink);border-bottom:1px solid var(--line);padding:.85rem max(1.1rem,calc((100vw - 1120px)/2));gap:1rem}.wordmark{color:var(--ink)}.brand-symbol{background:#ccef88;transform:rotate(-7deg);border-radius:15px 15px 6px 15px;color:#213b3a}.nav-button{color:var(--muted);border-color:transparent;box-shadow:none;border-radius:99px;padding:.6rem 1rem}.nav-button:hover:not(:disabled){background:#edf3e4}.nav-button[aria-current]{color:#145b4b;background:#e7f1da;border-color:#c1d5aa}main{padding-top:2rem;min-height:72vh}.home-greeting{display:flex;align-items:center;justify-content:space-between;gap:1.5rem;margin-bottom:1.6rem}.home-greeting h1{margin:0}.eyebrow{font-size:.8rem;letter-spacing:.07em;margin-bottom:.7rem}.practice-count{font-size:.85rem;border:1px dashed #a4b78f;padding:.6rem .9rem;border-radius:99px;white-space:nowrap;background:#f3f5e8}.home-layout{grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr);gap:1.4rem}.task-card{border-radius:26px;border:1.5px solid #d8e1d6;box-shadow:0 7px 0 #e5e9da;padding:2rem}.home-task{align-items:flex-start;gap:.6rem;justify-content:flex-start;padding:2rem}.home-task h2{font-size:1.8rem;line-height:1.5;margin:.6rem 0 0;max-width:25rem}.home-task .home-detail{font-size:1.05rem;color:var(--muted);margin:.2rem 0 .8rem}.home-task .primary{width:100%;min-height:64px;border-radius:18px;font-size:1.2rem}.start-adventure{display:flex;justify-content:space-between;align-items:center;padding:.85rem 1.3rem}.start-adventure>span{font-size:1.7rem;line-height:1}.home-task .note{margin:.6rem 0 0;align-self:center;text-align:center}.tag{background:#eef6de;color:#365b31;border-color:#d0e2ba}.welcome-card{padding:2rem;background:#eaf0db;border:1.5px solid #d6dfbf;border-radius:26px;min-height:350px;justify-content:flex-start;color:#264438}.welcome-card h2{font-size:2rem;line-height:1.5;position:relative;z-index:1}.welcome-card p{color:#52664e;font-size:1rem;max-width:65%;position:relative;z-index:1}.coach-spark{font-size:2.4rem;color:#987537;display:block;margin-bottom:.6rem}.welcome-illustration{position:absolute;right:-12px;bottom:48px;width:200px;height:245px;object-fit:contain;margin:0}.small-road{position:relative;z-index:1;margin-top:auto;border:0;background:#fffdf3de;border-radius:14px;padding:.8rem;font-size:.8rem;gap:.3rem}.small-road b{background:#d4eaa9;width:25px;height:25px}.small-road span{gap:.3rem}.home-shortcuts{display:grid;grid-template-columns:1fr 1fr;gap:1.4rem;margin:1.6rem 0}.shortcut-card{padding:1.2rem;display:flex;align-items:center;text-align:left;gap:1rem;background:#fffdf8;border-radius:22px;min-width:0}.shortcut-card>span:last-child{margin-left:auto;font-size:1.4rem}.shortcut-card strong{display:block;font-size:1.04rem}.shortcut-card small{display:block;color:var(--muted);font-size:.85rem;font-weight:400;margin-top:.3rem}.shortcut-icon{font-size:1.7rem;font-weight:800;width:55px;height:58px;background:#ffe0b5;display:grid;place-items:center;border-radius:17px;flex-shrink:0;color:#69421d;transform:rotate(-5deg)}.map-icon{background:#dce9ff;color:#3b5d87;transform:rotate(5deg)}.home-footnote{text-align:center;color:var(--muted);font-size:.875rem}.compact-details{width:100%;font-size:.85rem}.single{max-width:800px}.step-header{padding:.2rem 0}.step-header .quiet{background:#fffdf7;border-color:#d4ddcf;flex-shrink:0}.named-phases{gap:.25rem;margin:0 0 1.8rem}.named-phases li{height:auto;background:none!important;display:flex;align-items:center;flex-direction:column;gap:.35rem;position:relative;flex:1;font-size:.85rem;color:var(--muted)}.named-phases li:before{content:'';position:absolute;top:18px;left:50%;width:calc(100% + .25rem);height:3px;background:#dde4d3;z-index:0}.named-phases li:last-child:before{display:none}.phase-number{width:38px;height:38px;background:#f7f8f0;border:2px solid #ccd6c1;border-radius:50%;display:grid;place-items:center;font-weight:750;position:relative;z-index:1;color:#627358}.named-phases li.past .phase-number{background:#dfedc4;color:#365b31;border-color:#b0cc91}.named-phases li.current{color:#175f4e;font-weight:750}.named-phases li.current .phase-number{background:#146b58;color:#fff;border-color:#146b58;box-shadow:0 0 0 5px #dfecd1}.stimulus{background:#f4f6eb;border-color:#d5dfc8;font-size:1.65rem;border-radius:20px;padding:1.4rem}.choices{gap:.9rem}.choice{background:#fffefa;border-color:#d4ddcc;min-height:84px;border-radius:18px;box-shadow:0 4px 0 #e4e7da;padding:1rem 1.2rem}.choice.selected{background:#e8f4d8;border-color:#146b58;box-shadow:0 4px 0 #b7d1a8}.choice-letter{background:#e9eedd;color:#3a5930}.choice.selected:after{content:'●';margin-left:auto;color:#146b58;font-weight:800}.choice.large-letter.selected:after{position:absolute;right:.65rem;top:.4rem;font-size:1rem}.choice.large-letter{position:relative}.feedback{background:#eff7e5;border-color:#bdd7a9;border-radius:20px;padding:1.3rem;margin-top:1.3rem}.feedback.retry{background:#fff4e3;border-color:#e0c18c}.feedback h2{font-size:1.3rem}.feedback .primary{margin:.3rem .5rem .3rem 0}.notice{background:#f0f5e8;border-color:#8ba672;line-height:1.7}.warning{background:#fff1d9;border-color:#b77a22}.reason{border-color:#a8c987;color:#425d36}.recommendation{background:#f1f7e7;border:1.5px solid #bacfa5;box-shadow:0 5px 0 #e5ecd9}.record-stat{background:#f0f4e6}.stage-label{color:#44643a}.step-copy{border-color:#adc88a}.model-answer{background:#fff1d8}.completion-symbol{display:grid;place-items:center;font-size:2.5rem;width:80px;height:80px;border-radius:27px;background:#d9edb3;color:#28623d;margin:0 0 1.6rem;transform:rotate(-6deg)}.map-toolbar{background:#fffdf7;border:1px solid var(--line);padding:1rem;border-radius:20px;margin:1.3rem 0}.map-filters{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.8rem}.map-filters button{border-radius:99px;font-size:.85rem;box-shadow:none;min-height:44px}.map-filters button[aria-pressed=true]{background:#146b58;color:#fff;border-color:#146b58}.map-result-count{font-size:.85rem;color:var(--muted);margin:.8rem 0 0}.map-section h2{display:flex;align-items:center;gap:.7rem;font-size:1.35rem}.map-section h2:before{content:'';width:14px;height:24px;border-radius:5px;background:#b7d979;transform:rotate(-12deg)}.map-section:nth-child(3n+2) h2:before{background:#f3ba75}.map-section:nth-child(3n) h2:before{background:#a3c9e2}.unit-card{border-radius:20px;background:#fffefa;gap:.6rem;padding:1.25rem;box-shadow:0 4px 0 #e3e7db}.unit-card strong{line-height:1.6}.unit-card .unit-id{font-size:.8rem;letter-spacing:.04em}.unit-card.support{border:1.5px solid #c9a66c;background:#fff9ef}.unit-path{height:5px;background:#e5eadf;border-radius:9px;overflow:hidden}.unit-path span{height:100%;display:block;background:#9abd74}.letter-link-panel{background:#f1f6e8;border-color:#c8d9b7}.letter-gallery{gap:.9rem}.letter-tile{background:#fffefa;border-radius:22px;box-shadow:0 4px 0 #e1e6d7;border-color:#d0dcc5}.letter-tile:nth-child(3n+2){background:#fff5e5}.letter-tile:nth-child(3n){background:#eef5fc}.letter-pair-inline{color:#23644e}.letter-pair figure{background:#f1f6e7;border:1px solid #d0ddc3}.writing-board{border-color:#91ad83;box-shadow:0 4px 0 #dce6d0}.letter-check-choice{border-color:#d0dcc5}.letter-header-actions button{background:#fffdf7}.dialog-body{background:#fffdf7}.confidence{background:#f7f8f1;border-radius:14px;padding:.8rem}.confidence label{padding:.35rem .2rem;min-height:40px}.confidence legend{padding:0 .3rem}.action-row{row-gap:.85rem}.source-note{line-height:1.65}.task-card>.eyebrow{color:#55723d}.lesson-menu button{background:#fffefa}.lesson-menu button:hover{background:#e9f2db}.task-card h1{font-size:clamp(1.5rem,3vw,2rem)}.home-task h2{font-size:clamp(1.5rem,3vw,1.9rem)}
@media(max-width:760px){.app-header{padding:.75rem 1rem;align-items:center}.app-header nav{max-width:none;flex-wrap:nowrap;gap:.15rem}.nav-button{font-size:.78rem;padding:.4rem .55rem;min-height:44px}.wordmark strong{font-size:.95rem}main{padding:1.2rem 1rem 2rem}.home-greeting{display:block;margin-bottom:1.2rem}.home-greeting h1{font-size:1.65rem}.practice-count{display:inline-block;margin-top:.75rem;font-size:.8rem;padding:.35rem .65rem}.home-layout{grid-template-columns:1fr;gap:1rem}.home-task{padding:1.4rem;gap:.4rem}.home-task h2{margin-top:.4rem}.home-task .home-detail{margin-bottom:.5rem}.home-task .primary{min-height:58px}.welcome-card{min-height:185px;padding:1.2rem 1.3rem}.coach-message{width:65%}.coach-spark{display:none}.welcome-card h2{font-size:1.2rem;margin-bottom:.4rem}.welcome-card h2 br,.welcome-card p br{display:none}.welcome-card p{font-size:.9rem;max-width:100%;margin-bottom:.6rem}.welcome-illustration{height:150px;width:130px;right:0;bottom:35px}.small-road{font-size:.75rem;padding:.55rem .7rem;width:100%;margin-top:1rem}.home-shortcuts{grid-template-columns:1fr;gap:.8rem;margin:1.2rem 0}.shortcut-card{padding:1rem;gap:.8rem}.shortcut-icon{width:47px;height:50px;font-size:1.4rem}.shortcut-card strong{font-size:1rem}.task-card{padding:1.4rem;border-radius:22px}.named-phases{margin-bottom:1.4rem}.named-phases li{font-size:.75rem}.phase-number{width:32px;height:32px}.named-phases li:before{top:15px}.named-phases li.current .phase-number{box-shadow:0 0 0 4px #dfecd1}.step-header .stage-label{font-size:.85rem}.choice{min-height:76px;padding:.85rem}.choices{gap:.7rem}.map-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.unit-card{padding:1rem}.map-toolbar{padding:.85rem}.home-footnote{font-size:.8rem}.large-text .app-header{flex-wrap:wrap}.large-text .app-header nav{width:100%;justify-content:space-between}.large-text .home-greeting h1{font-size:1.8rem}.large-text .named-phases{flex-wrap:wrap}.large-text .named-phases li{min-width:55px}.letter-run .task-card{padding:1.1rem}.letter-run .letter-header-actions{gap:.4rem}}
@media(max-width:430px){.app-header{flex-wrap:wrap;gap:.65rem}.wordmark br{display:none}.wordmark strong{margin-left:.3rem}.wordmark{font-size:.85rem}.brand-symbol{width:34px;height:34px;font-size:1.15rem}.app-header nav{width:100%;justify-content:space-between;border-top:1px solid #ebeee3;padding-top:.4rem}.nav-button{font-size:.82rem;flex:1;padding:.4rem .35rem}.home-task .note{font-size:.8rem}.home-greeting h1{font-size:1.55rem}.task-card{padding:1.15rem}.step-header{gap:.6rem}.step-header .quiet{padding:.45rem .7rem;font-size:.85rem}.feedback .primary,.feedback>.quiet{width:100%;margin:.4rem 0}.map-filters{gap:.35rem}.map-filters button{padding:.4rem .7rem}.letter-gallery{gap:.65rem}.letter-tile{min-height:120px}.home-shortcuts small{font-size:.8rem}.completion-symbol{width:64px;height:64px;font-size:2rem}.action-row>.primary{flex-basis:100%}.single>.action-row>.primary{flex-basis:auto}.large-text .map-grid{grid-template-columns:1fr}}
@media(max-width:360px){.map-grid,.choices{grid-template-columns:1fr}.welcome-card h2,.welcome-card p{max-width:100%}.welcome-illustration{display:block}.coach-message{width:64%}.small-road b{width:21px;height:21px}.small-road span{gap:.2rem}.named-phases li{font-size:.69rem}.shortcut-icon{width:40px;height:45px}.shortcut-card{gap:.6rem}.shortcut-card strong{font-size:.92rem}}
@media(prefers-reduced-motion:reduce){button{transition:none}button:hover:not(:disabled),button:active:not(:disabled){transform:none}}
@media print{.app-header,.home-dashboard{display:none!important}}

.model-count{font-size:.85rem;color:var(--muted);border:1px solid #d7e0cc;border-radius:99px;display:inline-block;padding:.25rem .65rem;margin-bottom:.7rem}.letter-extra{background:#f2f6e8;border:1px solid #d5e1c7;border-radius:18px;padding:.6rem 1rem;margin-top:1.5rem}.letter-extra .letter-link-panel{border:0;padding:.5rem 0;background:transparent;margin:.5rem 0}.unit-path{width:100%}

.home-greeting #view-title:focus-visible{outline:none}.feedback h2:focus-visible{outline:none}.feedback:focus-within{box-shadow:0 0 0 3px #c3dbaa}

/* 1.4: learner repair and same-device teacher review */
textarea{font:inherit;width:100%;min-height:110px;border:2px solid #a8bdd2;border-radius:14px;padding:.8rem;background:#fff;color:var(--ink);resize:vertical}textarea:focus-visible{outline:3px solid #b65816;outline-offset:3px}.repair-panel,.reflection-box,.teacher-observation{border:1px solid #cbdcb7;border-radius:22px;background:#f3f7eb;padding:1.3rem;margin-top:1.6rem}.repair-panel h2,.teacher-observation h2{font-size:1.25rem}.repair-row{padding:1rem 0;border-top:1px solid #d4dfc7;display:flex;align-items:center;justify-content:space-between;gap:1rem}.repair-row strong{display:block;font-size:1rem}.repair-row small{display:block;color:var(--muted);font-size:.8rem}.repair-row button{flex-shrink:0;font-size:.9rem}.review-toolbar{display:flex;flex-wrap:wrap;gap:.6rem;margin:1.2rem 0}.review-toolbar button[aria-pressed=true]{background:#146b58;color:#fff}.review-run,.evidence-card{background:#fffdf8;border:1px solid var(--line);border-radius:22px;padding:1.4rem;margin:1rem 0}.review-run h2{font-size:1.2rem;margin:.6rem 0}.review-run p{font-size:.9rem}.review-run .primary{min-height:48px}.evidence-card h3{font-size:1.1rem}.evidence-card dl{display:grid;grid-template-columns:7rem minmax(0,1fr);gap:.6rem;margin:1rem 0}.evidence-card dt{font-size:.85rem;color:var(--muted)}.evidence-card dd{margin:0;overflow-wrap:anywhere}.record-prompt{padding:.8rem;background:#f0f4e8;border-radius:12px}.teacher-observation label{display:block;margin:1rem 0 .35rem}.teacher-observation select{font-size:.95rem}.confirm-observation{display:flex!important;gap:.6rem;align-items:flex-start;font-size:.9rem}.confirm-observation input{min-height:24px;width:24px;height:24px;flex-shrink:0}.observation-row{padding:.7rem 0;border-top:1px solid var(--line);font-size:.9rem}.reflection-box label{display:block;font-weight:700;margin-bottom:.7rem}.reflection-box button{margin:.6rem .4rem 0 0}.reflection-box [role=status]{font-size:.85rem;margin-top:.6rem}.model-support{margin-top:1.4rem;border-top:1px solid var(--line);padding-top:1rem}.model-support p{font-size:.9rem;margin-top:.6rem}.full-source{white-space:pre-line}.chunk-reader{background:#fffdf7;border:1px solid #d9e3cc;border-radius:18px;padding:1.1rem;margin:1rem 0}.review-return{margin-top:0}.review-return .primary{width:100%}#review-model{margin-top:1.1rem}#practice-hint:empty{display:none}#review-save-status:empty{display:none}.teacher-observation .primary{margin-top:1rem}.evidence-card li{overflow-wrap:anywhere}#observation-history{margin-top:1rem}
@media(max-width:520px){.repair-row{display:block}.repair-row button{margin-top:.65rem;width:100%}.review-run,.evidence-card{padding:1.1rem}.evidence-card dl{grid-template-columns:1fr;gap:.25rem}.evidence-card dd{margin-bottom:.7rem}.teacher-observation,.repair-panel,.reflection-box{padding:1rem}.review-toolbar button{flex:1 1 140px}.teacher-observation select{font-size:.85rem}.chunk-reader{padding:.9rem}.reflection-box button{width:100%;margin-right:0}}

.review-ink{display:block;width:100%;max-width:220px;height:264px;background:#fff;border:1px solid #c9d7bd;border-radius:12px;margin:.8rem auto}.record-prompt+.stimulus{font-size:1.2rem}

/* UI 1.6: one existing learner goal, no extra task gate. */
.lesson-focus{padding:.65rem .85rem;margin:0 0 1.25rem;border-left:3px solid #77bba5;background:#f2f6e8;border-radius:0 10px 10px 0;font-size:.95rem}.reflection-box .stimulus{font-size:1.2rem}.reflection-box h2{font-size:1.25rem}.reflection-box .answer-note{overflow-wrap:anywhere}

/* UI1.7: visible local-record controls without moving the learning route. */
.records-list{display:grid;gap:.65rem;margin:1rem 0}.records-list button{text-align:left}.home-shortcuts{grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr))}#records-dialog{max-width:720px;width:calc(100% - 1.5rem);max-height:90dvh;overflow:auto}#records-dialog [hidden]{display:none}#reset-confirmation{border:2px solid #b74c40;border-radius:14px;padding:1rem;margin:1rem 0}#records-dialog button{min-height:44px}#records-dialog .dialog-body{overflow-wrap:anywhere}.start-preferences{display:grid;gap:.65rem;margin:1.25rem 0}.start-preferences label{display:flex;align-items:flex-start;gap:.6rem;padding:.8rem;border:1px solid #ddd5c5;border-radius:12px}.start-preferences input{margin-top:.3rem}.screen-pair-note{font-size:.9rem;color:#526658}@media(max-width:600px){.app-header nav{flex-wrap:wrap;gap:.15rem}.app-header .nav-button{font-size:.82rem;padding:.55rem .45rem}.app-header{align-items:flex-start}#records-dialog .action-row{display:grid}#records-dialog .action-row button{width:100%}}
