:root{
  --bg:#F4F6F4; --card:#fff; --ink:#17211D; --ink2:#3B4A44; --mute:#7A877F;
  --line:#EFF3F0; --green:#1F3B33; --g2:#3E7A5E; --amber:#C08A3E; --red:#B4553E;
  --tint:#F7F9F7; --warm:#FBF7EF; --shadow:0 6px 22px rgba(23,33,29,.06);
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body{
  background:#E9EDEA;color:var(--ink);
  font-family:"PingFang SC","Microsoft YaHei",-apple-system,BlinkMacSystemFont,"Helvetica Neue",sans-serif;
  -webkit-font-smoothing:antialiased;font-size:15px;line-height:1.6;
}
button{font:inherit;color:inherit;border:0;background:none;cursor:pointer}
input,textarea,select{font:inherit;color:inherit}
a{color:inherit}
.app{max-width:520px;margin:0 auto;min-height:100vh;background:var(--bg);display:flex;flex-direction:column;position:relative;overflow-x:hidden}
.hd{position:sticky;top:0;z-index:20;background:rgba(244,246,244,.94);backdrop-filter:blur(8px);
    display:flex;align-items:center;gap:10px;padding:14px 18px 10px}
.hd .back{width:30px;height:30px;border-radius:15px;background:#fff;box-shadow:var(--shadow);
          display:flex;align-items:center;justify-content:center;font-size:15px;color:var(--ink2);flex:none}
.hd .tt{font-size:19px;font-weight:700;letter-spacing:.2px}
.hd .dd{margin-left:auto;font-size:12px;color:var(--mute);flex:none}
.main{flex:1;padding:6px 18px calc(112px + env(safe-area-inset-bottom))}
.tab{position:fixed;bottom:0;left:0;right:0;z-index:30;background:#fff;border-top:1px solid var(--line);
     display:flex;padding:8px 0 calc(8px + env(safe-area-inset-bottom));max-width:520px;margin:0 auto;
     box-shadow:0 -6px 18px rgba(23,33,29,.04)}
.tab a{flex:1;text-align:center;font-size:11px;color:#9AA69F;text-decoration:none;display:block;padding:2px 0 4px}
.tab a i{display:block;height:18px;line-height:0;margin:0 auto 4px;opacity:.5}
.tab a.on{color:var(--green);font-weight:700}
.tab a.on i{opacity:1}
.card{background:var(--card);border-radius:20px;padding:16px 18px;box-shadow:var(--shadow);margin-bottom:12px}
.card.tight{padding:13px 15px}
.card.flat{box-shadow:none;background:var(--tint)}
.tag{font-size:11px;color:#8A968F;letter-spacing:1.6px;margin-bottom:8px}
.eyebrow{font-size:11px;color:#8A968F;letter-spacing:2px}
.big{font-size:46px;font-weight:700;letter-spacing:-1.5px;line-height:1.1;margin-top:2px}
.big .u{font-size:13px;font-weight:400;color:var(--mute);margin-left:8px;letter-spacing:0}
.sub{font-size:13px;color:#6E7B75;margin-top:6px}
.t1{font-size:17px;font-weight:700;line-height:1.45}
.t2{font-size:12px;color:var(--mute);margin-top:6px;line-height:1.65}
.mini{font-size:11px;color:var(--mute);line-height:1.7}
.btn{width:100%;height:50px;border-radius:15px;background:var(--green);color:#fff;display:flex;
     align-items:center;justify-content:center;font-size:15.5px;font-weight:600;margin-top:12px}
.btn.ghost{background:#fff;color:#20362F;border:1px solid #D9E1DC;font-weight:500}
.btn.small{height:42px;font-size:14px;margin-top:0}
.btn:disabled{opacity:.45}
.btnrow{display:flex;gap:10px}
.btnrow .btn{margin-top:0}
.tip{font-size:11.5px;color:#96A29B;text-align:center;margin-top:10px;line-height:1.65}
.rowline{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid var(--line);font-size:14px;color:var(--ink2);width:100%;text-align:left}
.rowline:last-child{border-bottom:0}
.rowline.dim{color:#A9B4AD}
.rt{margin-left:auto;font-size:11.5px;color:#9AA69F;flex:none}
.dot{width:6px;height:6px;border-radius:3px;flex:none}
.chip{display:inline-flex;align-items:center;gap:6px;font-size:12px;padding:6px 12px;border-radius:9px;background:var(--tint);color:#3B4A44}
.chip.g{background:#F1F6F2;color:var(--g2)}
.chip.a{background:#FBF5EA;color:var(--amber)}
.chip.r{background:#FAF0ED;color:var(--red)}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.quote{border-left:3px solid #B9C6BF;padding:2px 0 2px 12px;font-family:"Kaiti SC",KaiTi,STKaiti,serif;
       font-size:14px;line-height:1.9;color:#2C3A34;margin:10px 0}
.story{font-family:"Kaiti SC",KaiTi,STKaiti,serif;font-size:15px;line-height:2.05;color:#2C3A34}
.msg{background:#E8EDE9;border-radius:14px;padding:12px 14px;font-size:12px;line-height:1.8;color:#4C5C55}
textarea{width:100%;min-height:110px;border:1px solid #DDE5DF;border-radius:14px;padding:12px;
         background:#fff;resize:vertical;line-height:1.7;outline:none}
textarea:focus,input:focus{border-color:#9FB0A6}
.sheet{background:#fff;border-radius:16px;padding:22px 20px;box-shadow:var(--shadow)}
.sheet h4{margin:0 0 4px;font-size:20px;letter-spacing:1px}
.sheet .meta{font-size:11.5px;color:var(--mute);margin-bottom:14px}
.chk{width:20px;height:20px;border:1.5px solid #9FB0A6;border-radius:5px;flex:none;display:flex;
     align-items:center;justify-content:center;font-size:12px;color:#fff}
.chk.on{background:var(--g2);border-color:var(--g2)}
.letter{width:100%;aspect-ratio:1/1.1;border-radius:11px;background:#fff;display:flex;align-items:center;
        justify-content:center;font-size:18px;font-family:Georgia,serif;color:#2C3A34;box-shadow:0 2px 6px rgba(23,33,29,.07)}
.slot{width:100%;aspect-ratio:1/1.2;border-radius:11px;border:1.5px dashed #C6D2CB;display:flex;
      align-items:center;justify-content:center;font-size:20px;font-family:Georgia,serif;color:#fff}
.slot.on{background:var(--green);border-color:var(--green)}
.keys{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.play{width:44px;height:44px;border-radius:22px;background:var(--green);color:#fff;display:flex;
      align-items:center;justify-content:center;font-size:12px;flex:none}
.bars{flex:1;display:flex;align-items:flex-end;gap:3px;height:26px}
.bars i{display:block;width:3px;background:var(--g2);border-radius:2px}
.bar{height:6px;background:#E7EDE9;border-radius:3px;overflow:hidden}
.bar>div{height:6px;background:var(--green);border-radius:3px}
.kp{flex:1;min-height:46px;border-radius:10px;padding:8px 5px 8px 9px;position:relative;overflow:hidden;
    font-size:10px;line-height:1.4;color:#3B4A44;display:flex;align-items:center;text-align:left}
.kp:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--c)}
.kp.g{--c:#3E7A5E;background:#F1F6F2}.kp.a{--c:#C08A3E;background:#FBF5EA}
.kp.r{--c:#B4553E;background:#FAF0ED}.kp.n{--c:#C6D2CB;background:#F4F6F4;color:#A9B4AD}
.toast{position:fixed;left:50%;bottom:calc(96px + env(safe-area-inset-bottom));transform:translate(-50%,10px);background:rgba(31,59,51,.94);
       color:#fff;font-size:13px;padding:10px 18px;border-radius:12px;opacity:0;transition:.24s;z-index:99;pointer-events:none;max-width:80%}
.toast.show{opacity:1;transform:translate(-50%,0)}
.hl-g{border-bottom:2px solid #3E7A5E;padding-bottom:1px}
.hl-o{border-bottom:2px solid #C08A3E;padding-bottom:1px}
.note{font-size:10.5px;line-height:1.7;padding-left:8px;margin:4px 0 10px;border-left:2px solid}
.note.g{color:#3E7A5E;border-color:#3E7A5E}
.note.o{color:#B07A2E;border-color:#C08A3E}
.unc{background:#FBF3D6;border-radius:4px;padding:0 3px;border-bottom:1px dashed #D9B24A}
.loading{display:flex;align-items:center;justify-content:center;height:60vh;color:#96A29B;font-size:13px}

/* 断网提示：一直在，不来回弹 toast */
.netbar{position:fixed;top:0;left:0;right:0;z-index:90;background:#8C4A38;color:#fff;font-size:12px;
        text-align:center;padding:7px 12px;line-height:1.5;max-width:520px;margin:0 auto;display:none}
.netbar.on{display:block}

/* 登录与注册 */
.auth{padding:0 24px 40px;justify-content:center;min-height:100vh}
.auth .brand{text-align:left;margin:0 0 26px}
.auth .mark{width:54px;height:54px;border-radius:16px;background:var(--green);color:#fff;
            display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:700;
            letter-spacing:1px;margin-bottom:16px}
.auth h1{font-size:26px;margin:0;letter-spacing:1px}
.auth .slogan{font-size:13px;color:#6E7B75;margin-top:8px;line-height:1.7}
.field{margin-bottom:12px}
.field label{display:block;font-size:12px;color:#7A877F;margin:0 0 6px 2px;letter-spacing:.5px}
.field input,.field select{width:100%;height:50px;border:1px solid #DDE5DF;border-radius:14px;
                           padding:0 14px;background:#fff;outline:none;font-size:15px}
.field input::placeholder{color:#B4BEB8}
.switch{text-align:center;font-size:13px;color:#6E7B75;margin-top:16px}
.switch b{color:var(--green);font-weight:600}
.err{background:#FAF0ED;color:#9C4A36;font-size:12.5px;padding:10px 12px;border-radius:11px;margin-bottom:12px;line-height:1.6}
.rule{font-size:11px;color:#A9B4AD;margin-top:8px;line-height:1.7}
.auth-foot{position:absolute;bottom:20px;left:0;right:0;text-align:center;font-size:11px;color:#AEB8B2}

@media(min-width:820px){
  body{background:#E4E9E5;font-size:16px}
  .app{max-width:640px;box-shadow:0 10px 40px rgba(23,33,29,.12);min-height:100vh}
  .tab{max-width:640px}
  .main{padding:8px 24px 100px}
  .big{font-size:56px}
  .card{padding:18px 20px}
  .tgrid{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:stretch}
  .tgrid .card{margin:0!important}
  .auth h1{font-size:30px}
}
@media print{
  @page{size:A4;margin:14mm}
  body{background:#fff;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .app{max-width:none;display:block;box-shadow:none}
  .hd,.tab,.no-print,.sheet-mask,.sheet-pop,.tip{display:none!important}
  .main{padding:0}
  .sheet{box-shadow:none;border-radius:0;padding:0;border:0}
  .chk{border:1px solid #8A968F!important;background:#fff!important;color:#3F4B45!important}
  .card{break-inside:avoid}
}

/* 协议勾选 */
.agree{display:flex;gap:8px;align-items:flex-start;font-size:11.5px;color:#7A877F;line-height:1.7;margin:4px 0 10px}
.agree input{margin-top:2px;width:15px;height:15px;accent-color:#1F3D33;flex:none}
.agree a{color:#3E7A5E;text-decoration:none;border-bottom:1px solid #CFDBD4}
.agree span{flex:1}

/* 改作业的浮层 */
.sheet-mask{position:fixed;inset:0;background:rgba(20,30,26,.42);z-index:60}
.sheet-pop{position:fixed;left:0;right:0;bottom:0;z-index:61;background:#fff;border-radius:20px 20px 0 0;
  padding:20px 18px calc(20px + env(safe-area-inset-bottom));box-shadow:0 -10px 30px rgba(23,33,29,.16);
  max-width:640px;margin:0 auto}
.sheet-pop h4{margin:0 0 10px;font-size:17px}