:root{color-scheme:light;--ink:#172c4c;--muted:#52647b;--blue:#245db0;--blue-dark:#163f78;--line:#d7e0ec;--paper:#fff;--bg:#edf3fa;--yellow:#ffce57}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:1rem/1.65 system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif}button,input,select,textarea{font:inherit}button,a,input,select,textarea,summary{touch-action:manipulation}button{cursor:pointer}button:disabled{opacity:.48;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #c08713;outline-offset:3px}a{color:var(--blue);text-decoration:none}a:hover{text-decoration:underline}h1,h2,h3,p{margin-top:0}h1{font-size:1.55rem;line-height:1.45;margin-bottom:.6rem}h2{font-size:1.2rem;line-height:1.5}h3{font-size:1.2rem;line-height:1.55}p{margin-bottom:.8rem}button{border:1px solid var(--line);border-radius:.65rem;background:var(--paper);color:var(--ink);padding:.6rem .85rem}button:hover:not(:disabled){background:#edf3fb;border-color:#8da9cf}.quiet{border-color:transparent;background:transparent;color:var(--blue);font-size:.875rem}.primary{background:var(--blue);color:white;border-color:var(--blue);font-weight:650}.primary:hover:not(:disabled){background:var(--blue-dark);color:white}.wide{width:100%}.topbar{min-height:84px;display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1rem 2.5rem;background:white;border-bottom:1px solid var(--line)}.brand{display:flex;gap:.7rem;align-items:center;font-size:1.45rem;font-weight:750;color:var(--ink);letter-spacing:-.03em}.brand small{font-size:.875rem;font-weight:450;margin-left:.65rem;color:var(--muted);letter-spacing:0}.brand-mark{font-size:1.25rem;display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:var(--blue);color:white;border-bottom:4px solid var(--yellow)}.topbar nav{display:flex;align-items:center;gap:1rem;font-size:.875rem}.workspace{max-width:1660px;display:grid;grid-template-columns:280px minmax(340px,1fr) 250px;gap:1.5rem;padding:1.5rem 2rem;margin:auto}.lesson-panel,.reflection-panel{min-width:0;padding:.55rem .35rem}.section-label{font-size:.875rem;font-weight:650;color:var(--blue);display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:1.1rem}.section-label>span{font-size:.875rem;color:var(--muted)}.muted,.small{color:var(--muted)}.small{font-size:.875rem;line-height:1.65}.intro{font-size:.9375rem;margin-bottom:1.4rem}fieldset{border:0;margin:0;padding:0;min-width:0}label{display:block;font-size:.875rem;font-weight:650;margin:1rem 0 .4rem}input:not([type=checkbox]),select,textarea{background:white;color:var(--ink);border:1px solid #b9c8db;border-radius:.6rem;padding:.65rem .75rem;width:100%;min-width:0}textarea{resize:vertical;line-height:1.7}select{min-height:46px}.subjects{display:grid;grid-template-columns:repeat(3,1fr);gap:.45rem}.subjects button{display:flex;flex-direction:column;align-items:center;gap:.25rem;font-size:.875rem;padding:.6rem .35rem}.subjects b{font-size:1.25rem;font-weight:600;line-height:1.4}.subjects [aria-pressed=true]{border:2px solid var(--blue);background:#e1ecfc;color:var(--blue-dark)}.topic-chips{display:flex;gap:.35rem;flex-wrap:wrap;margin-top:.5rem}.topic-chips button{font-size:.875rem;padding:.25rem .5rem;border-radius:.4rem;color:var(--muted)}.material{font-size:.875rem;margin:1rem 0}.material summary,.about summary{cursor:pointer;color:var(--blue)}.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:.65rem}.two-fields label{margin-top:.5rem}#start{margin:1.2rem 0 .6rem;display:flex;justify-content:space-between;padding:.75rem 1rem}#start:disabled{display:none}#course-hint{margin:.35rem 0 1.5rem}.method-note{border-top:2px solid #c8d7eb;padding-top:1rem;font-size:.875rem}.method-note b{color:var(--blue)}.method-note p{color:var(--muted);margin:.45rem 0}.chat-panel{background:white;border:1px solid var(--line);box-shadow:0 8px 32px #17345a07;border-radius:1rem;min-width:0;display:flex;flex-direction:column;min-height:730px;max-height:calc(100dvh - 132px);overflow:hidden}.chat-heading{padding:1.35rem 1.5rem 1rem;display:flex;justify-content:space-between;gap:1rem}.chat-heading .section-label{margin:0 0 .3rem;font-size:.875rem}.chat-heading h2{margin:0;overflow-wrap:anywhere}.version{align-self:flex-start;background:#fff5d6;color:#70500a;border-radius:.35rem;font-size:.8125rem;white-space:nowrap;padding:.2rem .5rem}.steps{display:flex;flex-wrap:wrap;gap:.35rem .75rem;list-style:none;padding:.8rem 1.4rem;margin:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:#f7faff}.steps li{display:flex;align-items:center;gap:.3rem;color:var(--muted);font-size:.875rem}.steps span{display:grid;place-items:center;border:1px solid #b6c6da;border-radius:50%;width:1.4rem;height:1.4rem;font-size:.8125rem;flex-shrink:0}.steps [aria-current=step]{color:var(--blue);font-weight:700}.steps [aria-current=step] span{background:var(--blue);border-color:var(--blue);color:white}.messages{flex:1;min-height:220px;overflow-y:auto;overscroll-behavior:contain;padding:1.4rem 1.5rem;scroll-behavior:smooth}.message{margin-bottom:1.4rem;display:flex;flex-direction:column;align-items:flex-start}.speaker{font-size:.8125rem;font-weight:650;color:var(--blue);margin:0 .1rem .4rem}.bubble{max-width:95%;border:1px solid var(--line);background:#f6f9fe;padding:1rem 1.15rem;border-radius:0 1rem 1rem 1rem;overflow-wrap:anywhere;white-space:pre-wrap;line-height:1.85}.welcome .bubble{white-space:normal}.bubble p:last-child{margin-bottom:0}.user{align-items:flex-end}.user .bubble{background:#e5effe;border-color:#cdddf4;border-radius:1rem 0 1rem 1rem}.user .speaker{color:var(--muted)}.starter-note{display:flex;flex-direction:column;align-items:center;gap:.3rem;margin:3rem auto 1rem;text-align:center;color:var(--muted);font-size:.875rem}.starter-note b{font-size:1rem;color:var(--blue)}.composer-wrap{padding:.8rem 1.2rem 1rem;border-top:1px solid var(--line)}.help-actions{display:flex;gap:.4rem;flex-wrap:wrap;margin-bottom:.75rem}.help-actions button{font-size:.875rem;padding:.3rem .6rem;border-radius:2rem}.composer{display:flex;align-items:flex-end;gap:.5rem;padding:.5rem;background:#f7faff;border:1px solid #a8bfdc;border-radius:.9rem}.composer textarea{border:none;background:transparent;resize:none;max-height:180px;min-height:64px;padding:.4rem}.composer button{flex-shrink:0}.composer-footer{display:flex;justify-content:space-between;flex-wrap:wrap;gap:.25rem .6rem;color:var(--muted);font-size:.8125rem;margin-top:.55rem}.status:empty{display:none}.status{padding:.4rem 1.5rem;color:var(--blue);font-size:.875rem}.error-box{background:#fff0e8;color:#7d3014;font-size:.9375rem;margin:0 1.2rem .6rem;padding:.65rem .8rem;border-radius:.5rem}.error-box button{white-space:nowrap}.reflection-panel h2{font-size:1.25rem;margin-bottom:1.4rem}.note-card{border-top:3px solid var(--yellow);background:#fffdf6;border-radius:.4rem;padding:1rem;margin-bottom:1rem}.note-card.next{border-color:#89b8ee;background:#f8fbff}.note-label{font-size:.875rem;color:#5c5b50;font-weight:650}.note-card p{font-size:.9375rem;line-height:1.8;margin:.6rem 0 0;white-space:pre-wrap;overflow-wrap:anywhere}.remember{font-weight:450;display:flex;gap:.5rem;align-items:flex-start;font-size:.875rem;margin-top:1.6rem}.remember input{margin-top:.35rem;width:1rem;height:1rem;accent-color:var(--blue);flex-shrink:0}.about{margin-top:1.5rem;padding-top:1rem;border-top:1px solid var(--line);font-size:.875rem}.about p{margin-top:.8rem;color:var(--muted)}dialog{border:1px solid var(--line);border-radius:1rem;max-width:530px;width:calc(100% - 2rem);padding:1.5rem;color:var(--ink);box-shadow:0 20px 90px #17335c33}dialog::backdrop{background:#10274388}dialog p{color:var(--muted);font-size:.9375rem}.dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:.7rem}.dialog-heading h2{margin:0}.dialog-actions{display:flex;justify-content:flex-end;gap:.5rem;flex-wrap:wrap;margin-top:1.2rem}#settings-status{color:var(--blue);font-size:.875rem}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}[hidden]{display:none!important}
@media(min-width:1600px){.workspace{grid-template-columns:290px minmax(340px,1fr) 265px}.chat-panel{min-height:780px}}@media(max-width:1200px){.workspace{grid-template-columns:260px minmax(320px,1fr);padding:1.2rem;gap:1.2rem}.reflection-panel{grid-column:2}.chat-panel{min-height:700px}.topbar{padding:1rem 1.5rem}}@media(max-width:760px){.topbar{padding:.85rem 1rem;align-items:flex-start;flex-wrap:wrap}.brand small{display:none}.topbar nav{gap:.5rem;flex-wrap:wrap}.topbar .quiet{padding:.3rem}.workspace{display:flex;flex-direction:column;padding:.8rem;gap:.8rem}.lesson-panel{padding:.65rem}.lesson-panel h1{font-size:1.4rem}.lesson-panel .intro{margin-bottom:.5rem}.section-label{margin-bottom:.5rem}.method-note{display:none}.chat-panel{min-height:620px;max-height:none}.messages{max-height:60dvh;min-height:250px;padding:1rem}.chat-heading{padding:1rem}.steps{padding:.75rem 1rem}.composer-wrap{padding:.75rem}.composer-footer span:last-child{display:none}.bubble{max-width:100%;padding:.85rem}.reflection-panel{padding:1rem .5rem}.two-fields{grid-template-columns:1fr 1fr}.note-card{margin-bottom:.7rem}.lesson-panel.active #course-controls,.lesson-panel.active .intro,.lesson-panel.active #course-hint{display:none}.lesson-panel.active h1{display:none}.lesson-panel.active #reset{text-align:left}.starter-note{margin:1.5rem auto}.version{font-size:.8125rem}}@media(prefers-reduced-motion:reduce){html,.messages{scroll-behavior:auto}}
