:root{--home-art:url("assets/my-home.jpg");color-scheme:light;--ink:#222d49;--muted:#606a80;--primary:#554fc1;--line:#e0e4ee;--soft:#f2f0fc;--paper:#fff;font-family:Inter,"PingFang SC","Noto Sans CJK SC","Microsoft YaHei",-apple-system,BlinkMacSystemFont,sans-serif;color:var(--ink);background:#f7f8fc;font-size:16px}
*{box-sizing:border-box}body{margin:0;min-height:100vh}button,select,input,textarea{font:inherit}button{cursor:pointer;color:inherit;-webkit-tap-highlight-color:transparent}button:disabled{cursor:default}button:focus-visible,a:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #8278e5;outline-offset:3px}h1,h2,h3,p{margin:0}button,select{touch-action:manipulation}svg.ui-icon{display:inline-block;flex:none;vertical-align:middle;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}i[data-icon]{display:inline-flex;font-style:normal}.wrap{width:min(1200px,calc(100% - 80px));margin:auto}.topbar{height:74px;background:#fff;border-bottom:1px solid var(--line)}.top-inner,.top-actions,.brand,.star-count,.hero-meta,.hero-meta span,.lesson-badge,.progress-panel h2,.err-line span{display:flex;align-items:center}.top-inner{justify-content:space-between;height:100%}.brand{gap:12px;font-size:22px;font-weight:800;letter-spacing:.025em}.brand-mark{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:#615bc8;box-shadow:inset 0 -3px 0 #4e4bab}.brand-mark svg{width:31px;height:31px}.top-actions{gap:14px}.star-count{padding:7px 14px;gap:6px;font-size:14px;font-weight:650;border-radius:100px;color:#825217;background:#fff7df;border:1px solid #f0dfae}.star-count i{color:#e6a01a}.star-count b{font-weight:800}.gear,.icon-btn{display:grid;place-items:center;border:1px solid var(--line);background:#fff;color:#59647d;border-radius:12px;width:41px;height:41px}.gear:hover,.icon-btn:hover{background:#f3f2fa}.outer{padding:25px 0 56px}.hero{position:relative;isolation:isolate;background:#26243f;border-radius:21px;overflow:hidden;color:#fff;min-height:218px;display:flex;align-items:center;box-shadow:0 4px 12px #1221390a}.hero:before{position:absolute;content:"";inset:0;z-index:-1;background-image:linear-gradient(90deg,#26243e 0%,#26243e 13%,transparent 46%),var(--home-art);background-repeat:no-repeat;background-size:cover,auto 98%;background-position:center,right center}.hero-copy{padding:27px 38px}.lesson-badge{width:max-content;gap:7px;border:1px solid #57667e;background:#283951b3;border-radius:7px;color:#eef1ff;padding:4px 10px;font-size:13px;font-weight:600}.lesson-badge svg{width:15px;height:15px}.lesson-badge span{color:#a8b5cc}.hero h1{font-size:clamp(34px,3.5vw,50px);line-height:1.23;letter-spacing:.025em;margin:9px 0 6px -.1em;color:#fff;font-weight:800}.hero-copy>p{color:#e1e6f0;line-height:1.6;font-size:16px;letter-spacing:.05em}.hero-meta{gap:13px;color:#dce4f2;font-size:13px;margin-top:18px}.hero-meta span{gap:7px}.hero-meta svg{width:16px;height:16px;color:#bfcde1}.hero-meta>b{height:13px;width:1px;background:#657289}.workspace{display:grid;grid-template-columns:245px minmax(0,1fr);gap:24px;margin-top:24px;align-items:start}.workspace>aside{display:grid;gap:16px}.panel{border:1px solid var(--line);background:var(--paper);border-radius:16px;box-shadow:0 2px 5px #23305203}.navigation{padding:20px 13px 14px}.navigation h2{font-size:14px;font-weight:650;color:#626c80;padding-left:11px;margin-bottom:13px;letter-spacing:.07em}#mode-nav{display:grid;gap:4px}.nav-btn{display:flex;align-items:center;gap:12px;text-align:start;padding:11px 12px;width:100%;border:1px solid transparent;background:transparent;border-radius:10px;font-size:16px;font-weight:650;color:#48536b}.nav-ic{height:32px;width:32px;display:grid;place-items:center;border-radius:9px}.nav-ic svg{width:19px;height:19px}.nav-word .nav-ic{color:#5952bc;background:#ebe7fb}.nav-passage .nav-ic{color:#388981;background:#e6f6f0}.nav-mistakes .nav-ic{color:#bc792a;background:#fff1dc}.nav-recite .nav-ic{color:#587bad;background:#eaf2fc}.nav-btn:hover{background:#f7f7fc}.nav-btn[aria-current=page]{border-color:#e3ddf9;background:#f0edfc;color:#5147b1}.nav-btn[aria-current=page] .nav-ic{background:#ded8f9;color:#5147b1}.nav-indicator{margin-left:auto;display:none}.nav-indicator svg{width:15px;height:15px}.nav-btn[aria-current=page] .nav-indicator{display:inline-flex}.progress-panel{padding:20px}.progress-panel h2{gap:8px;font-size:16px}.progress-panel h2 i{color:#7973ba}.progress-label,.err-line{display:flex;align-items:center;justify-content:space-between;font-size:14px;color:#646e84}.progress-label{margin-top:20px}.progress-label b{color:#534ab4}.progress-track{height:7px;border-radius:8px;background:#eeedf5;overflow:hidden;margin-top:10px}.progress-track span{height:100%;background:#8177d5;display:block;transition:width .3s}.err-line{border-top:1px solid #eceef3;margin-top:19px;padding-top:15px}.err-line span{gap:6px}.err-line i{color:#967944}.err-line b{color:#846530;background:#fff6e5;padding:3px 8px;font-size:13px;border-radius:6px}#practice{min-width:0;outline:none;scroll-margin:12px}.exercise-card{padding:22px 24px}.panel-heading,.head-title,.activity-meta,.prompt-row,.listen-btn,.hint-row,.write-title,.pad-note,.btn,.chip,.eyebrow,.success-line,.mask-tip{display:flex;align-items:center}.panel-heading{justify-content:space-between;gap:12px}.head-title{gap:10px}.head-title h2,.write-title h2{font-size:23px;letter-spacing:.025em;line-height:1.3}.heading-icon{color:#5d54bd;display:grid;place-items:center}.heading-icon svg{width:25px;height:25px}.head-title .chip{font-size:12px;margin-left:3px}.chip,.eyebrow{width:max-content;gap:5px;font-size:13px;font-weight:650;line-height:1.4}.chip{background:#f1eefd;color:#6054af;padding:4px 8px;border-radius:6px}.btn{display:inline-flex;justify-content:center;gap:7px;text-decoration:none;border-radius:9px;background:#fff;border:1px solid #dce0eb;padding:8px 13px;min-height:38px;font-size:14px;font-weight:650}.btn:hover{background:#f5f5fb}.btn.primary,.listen-btn{border:1px solid #554ebe;background:#5751bf;color:#fff}.btn.primary:hover,.listen-btn:hover{background:#4640a7}.btn.soft{color:#574ca7;background:#f2effb;border-color:#e5dff5}.btn svg{width:17px;height:17px}.prompt-row{justify-content:space-between;gap:12px;background:linear-gradient(105deg,#f0edff,#f6f5fd);border:1px solid #e2dcf8;border-radius:12px;padding:18px 20px;margin:18px 0 14px}.sound-left{display:flex;gap:14px;align-items:center;min-width:0}.wave{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:#e2ddfb;color:#685bc6;flex:none}.wave svg{width:28px;height:28px}.sound-text{min-width:0}.sound-text small{font-size:13px;color:#685ca7;font-weight:620;display:block;margin-bottom:2px}.pinyin{font-family:Inter,-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;font-size:clamp(23px,2.4vw,32px);font-weight:680;line-height:1.24;letter-spacing:.015em;color:#383261;overflow-wrap:anywhere}.listen-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:none;padding:10px 16px;border-radius:9px;font-size:15px;font-weight:650;box-shadow:0 2px 2px #34305612}.listen-btn svg{width:18px;height:18px}.hint-row{gap:12px;align-items:baseline;padding:5px 0;line-height:1.7;font-size:16px}.hint-label{display:inline-flex;align-items:center;gap:6px;font-size:14px;letter-spacing:.025em;font-weight:650;color:#62718a;flex:none}.hint-label svg{width:16px;height:16px}.hint-row p{color:#3e4860;overflow-wrap:anywhere}.hint-row.example p{color:#515b70}.hint-blank{display:inline-block;border-bottom:1.5px solid #7b759e;color:transparent;line-height:1.05;vertical-align:baseline;min-width:2em}.write-panel{margin-top:16px;padding:22px 24px}.write-title{gap:9px}.write-title h2{font-size:21px}.write-title>svg{color:#5d54bd}.pad-note{gap:6px;color:#69738a;font-size:14px;margin:8px 0 15px;line-height:1.55}.success-line{margin-top:14px;gap:9px;flex-wrap:wrap;padding:13px 15px;background:#ecf8f2;border-radius:12px;color:#20704c;font-weight:650}.success-line button{margin-left:auto}.end-card{padding:30px;text-align:center}.end-card>i{color:#d29829}.end-card h2{margin:12px 0}.end-card p{color:var(--muted);margin:10px 0 20px}.skip{position:fixed;transform:translateY(-160%);z-index:9;background:#fff;padding:10px 18px}.skip:focus{transform:none}
dialog{margin:auto;width:min(600px,calc(100% - 24px));max-height:90dvh;background:white;border:1px solid var(--line);border-radius:18px;color:var(--ink);padding:0;box-shadow:0 18px 90px #18234440;overscroll-behavior:contain}dialog::backdrop{background:#15213c80}html:has(dialog[open]){overflow:hidden}.dialog-header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 22px;position:sticky;top:0;background:#fffffff7;border-bottom:1px solid var(--line);z-index:3}.dialog-header h2{font-size:20px}.dialog-header button{height:36px;width:36px}.dialog-header button:focus:not(:focus-visible){outline:none}#dialog-body{padding:20px 22px 24px}.field{display:block;font-weight:650;margin-bottom:8px}.field-help{color:#626d82;font-size:14px;line-height:1.65;margin:6px 0 12px}.form-block+.form-block{border-top:1px solid var(--line);margin-top:20px;padding-top:18px}.form-block textarea,.form-block select{width:100%;border:1px solid #cfd3e0;border-radius:9px;padding:10px;color:var(--ink);background:#fbfbfe;font-size:16px}.form-block textarea{line-height:1.7;resize:vertical}.form-actions{margin-top:14px;display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.form-flag{font-size:14px;color:#a2343f}.toast{position:fixed;z-index:20;left:50%;bottom:max(20px,env(safe-area-inset-bottom));transform:translate(-50%,12px);opacity:0;pointer-events:none;transition:.15s ease;background:#25314b;color:#fff;border-radius:10px;padding:10px 16px;font-size:14px;max-width:calc(100vw - 28px);width:max-content;box-shadow:0 5px 20px #0c18351a}.toast.show{opacity:1;transform:translate(-50%,0)}.red-alert{color:#ad3342;background:#fff2f2}
@media(min-width:1440px){.wrap{width:min(1240px,calc(100% - 100px))}.workspace{grid-template-columns:255px minmax(0,1fr)}}
@media(max-width:1020px){.wrap{width:calc(100% - 44px)}.workspace{grid-template-columns:200px minmax(0,1fr);gap:16px}.exercise-card,.write-panel{padding:20px}.nav-btn{gap:8px}.hero{min-height:204px}}
@media(max-width:760px){.wrap{width:calc(100% - 28px)}.topbar{height:60px}.brand{font-size:19px;gap:8px}.brand-mark{width:34px;height:34px;border-radius:10px}.brand-mark svg{width:27px;height:27px}.top-actions{gap:7px}.star-count{padding:5px 9px;font-size:13px}.gear{width:36px;height:36px;border-radius:10px}.outer{padding-top:14px}.hero{min-height:155px;border-radius:15px}.hero:before{background-size:cover,auto 92%;background-position:center,right -10px center}.hero-copy{padding:17px 20px}.hero h1{font-size:clamp(27px,5.8vw,36px);margin:7px 0 3px}.hero-copy>p{font-size:14px;letter-spacing:0}.hero-meta{margin-top:10px;font-size:12px;gap:8px}.hero-meta span{gap:4px}.hero-meta svg{width:14px;height:14px}.lesson-badge{font-size:12px;padding:3px 7px}.workspace{display:block;margin-top:13px}.workspace>aside{display:block;margin-bottom:13px}.progress-panel,.navigation h2{display:none}.navigation{padding:4px;border-radius:12px}#mode-nav{grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}.nav-btn{flex-direction:column;gap:4px;justify-content:center;padding:7px 0;font-size:13px;white-space:nowrap}.nav-ic{width:28px;height:26px;border-radius:7px}.nav-ic svg{width:17px;height:17px}.nav-btn[aria-current=page] .nav-indicator{display:none}.panel{border-radius:13px}.head-title h2{font-size:20px}.exercise-card,.write-panel{padding:16px}.write-panel{margin-top:12px}.head-title{gap:6px}.head-title .chip{margin:0;font-size:11px;padding:4px 6px}.heading-icon svg{width:21px;height:21px}.btn{padding:7px 10px}.prompt-row{padding:13px;margin:14px 0 10px}.wave{width:38px;height:38px}.wave svg{width:24px;height:24px}.sound-left{gap:9px}.listen-btn{padding:9px 11px;font-size:14px;gap:5px}.hint-row{gap:8px;line-height:1.65;font-size:15px}.hint-label{gap:3px;font-size:13px}.write-title h2{font-size:19px}#dialog-body{padding:16px 12px 20px}.dialog-header{padding:12px 15px}}
@media(max-width:500px){.hero:before{background-image:linear-gradient(90deg,#26243e 0%,#26243ef8 28%,#26243e9c 52%,transparent 77%),var(--home-art);background-size:cover,auto 81%;background-position:center,right -26px top 2px}.hero-copy{padding:15px}.hero-copy>p{font-size:13px}.hero-meta{font-size:11px}.head-title{flex-wrap:wrap;row-gap:2px}.prompt-row{gap:6px}.wave{display:none}.sound-left{padding-left:2px}.pinyin{font-size:25px}.write-panel{padding:16px 10px}.write-title,.pad-note{margin-left:4px}.hint-label svg{display:none}.top-actions .star-count svg{width:16px;height:16px}}
@media(max-width:365px){.wrap{width:calc(100% - 16px)}.exercise-card{padding:13px}.nav-btn{font-size:12px}.head-title .chip{font-size:10px}.write-panel{padding:14px 5px}.hint-row{gap:6px}.panel-heading .btn{font-size:13px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
.listen-btn[aria-busy=true]{background:#7770d2}
.pad-replay{margin-left:auto;display:inline-flex;gap:5px;align-items:center;background:#f5f4fb;border:1px solid #e2dfee;border-radius:7px;padding:5px 7px;color:#554da0;font-size:13px;min-height:30px}.jump-pad{display:none}
@media(max-width:540px){.jump-pad{display:inline-flex;font-size:13px;min-height:32px;color:#5448aa;background:#f4f1fc;border-color:#e3def2;margin-top:7px}.hero:before{background-image:linear-gradient(90deg,#26243e 0%,#26243ef2 26%,#26243eb8 47%,transparent 75%),var(--home-art);background-size:cover,auto 77%;background-position:center,right -35px center}}
@media(max-width:340px){.wrap{width:calc(100% - 12px)}.write-panel{padding:12px 3px}dialog{width:calc(100% - 4px);max-width:100%}#dialog-body{padding:12px 4px 16px}}
