/* ============================================================
   高光笔记 — 设计系统
   ============================================================ */
:root{
  --paper:#F7F4ED;
  --paper-2:#F1ECE1;
  --card:#FFFFFF;
  --ink:#1B1A17;
  --ink-2:#6C6659;
  --ink-3:#9E9789;
  --line:#E5DED0;
  --line-soft:#EFE9DC;
  --brand:#D9502C;
  --brand-soft:#FBEAE3;

  --hl-yellow:#FFE066;
  --hl-green:#B9EC8E;
  --hl-pink:#FFC2D8;
  --hl-blue:#A6DCFF;

  --mk-yellow:rgba(255,224,102,.85);
  --mk-green:rgba(185,236,142,.85);
  --mk-pink:rgba(255,194,216,.88);
  --mk-blue:rgba(166,220,255,.88);

  --ring:#FFE066;

  --ok:#2F9E6E;
  --bad:#D64545;

  --px-line:var(--px-line);
  --pp-line:#111111;
  --bar-fade:rgba(247,244,237,.98);
  --bar-fade-2:rgba(247,244,237,0);

  --r-lg:22px;
  --r-md:16px;
  --r-sm:11px;
  --shadow-1:0 1px 2px rgba(27,26,23,.03);
  --shadow-2:0 22px 50px -30px rgba(27,26,23,.4);
  --ease:cubic-bezier(.2,.8,.25,1);
  --frame-offset:max(0px, calc((100dvh - 932px) / 2));
}

*,*::before,*::after{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:"PingFang SC","HarmonyOS Sans SC","Microsoft YaHei",system-ui,-apple-system,"Segoe UI",sans-serif;
  color:var(--ink);
  background:
    radial-gradient(1100px 720px at 12% -6%, #FFFCF3 0%, rgba(255,252,243,0) 62%),
    radial-gradient(900px 640px at 96% 104%, #EFE7D8 0%, rgba(239,231,216,0) 60%),
    #E7E1D4;
  display:flex; align-items:center; justify-content:center;
  -webkit-font-smoothing:antialiased;
  -webkit-tap-highlight-color:transparent;
}
body::after{
  content:""; position:fixed; inset:0; pointer-events:none; opacity:.5;
  background-image:radial-gradient(rgba(27,26,23,.055) 1px, transparent 1px);
  background-size:22px 22px;
  mask-image:radial-gradient(circle at 50% 50%, #000 0%, transparent 78%);
}

.stage{ position:relative; z-index:1; }
.app{
  position:relative;
  width:min(432px, 100vw);
  height:min(932px, 100dvh);
  background:var(--paper);
  border-radius:42px;
  border:1px solid #DDD5C6;
  box-shadow:0 40px 90px -40px rgba(27,26,23,.5), 0 2px 6px rgba(27,26,23,.08), inset 0 0 0 1px rgba(255,255,255,.6);
  display:flex; flex-direction:column;
  overflow:hidden;
}
@media (max-width:520px){
  .app{ width:100vw; height:100dvh; border-radius:0; border:0; box-shadow:none; }
  body::after{ display:none; }
}

/* ---------- 状态栏 ---------- */
.statusbar{
  height:46px; flex:none;
  display:flex; align-items:center; justify-content:space-between;
  padding:0 26px 0 30px;
  font-size:13px; font-weight:600; letter-spacing:.02em;
  color:var(--ink);
  padding-top:6px;
}
.sb-right{ display:flex; align-items:center; gap:6px; color:var(--ink); }
.battery{ width:23px; height:11px; border:1.3px solid currentColor; border-radius:3px; padding:1px; opacity:.9; display:inline-flex;}
.battery i{ display:block; width:74%; background:currentColor; border-radius:1px; }

/* ---------- 视图容器 ---------- */
.view{
  flex:1; overflow-y:auto; overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  padding-bottom:26px;
}
.view::-webkit-scrollbar{ display:none; }
.view.has-tabbar{ padding-bottom:96px; }
.view.has-toolbar{ padding-bottom:158px; }
.view.has-preview{ padding-bottom:176px; }

.screen{ padding:0 20px; }
.screen--flush{ padding:0; }

/* ---------- 通用组件 ---------- */
.btn{
  appearance:none; border:0; font:inherit; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  height:50px; padding:0 20px; border-radius:15px;
  background:var(--ink); color:#FDFBF5;
  font-size:15.5px; font-weight:600; letter-spacing:.01em;
  transition:transform .16s var(--ease), opacity .16s var(--ease), background .16s;
  text-decoration:none;
}
.btn:active{ transform:scale(.975); }
.btn--brand{ background:var(--brand); }
.btn--ghost{ background:transparent; color:var(--ink); border:1px solid var(--line); }
.btn--soft{ background:var(--paper-2); color:var(--ink); }
.btn--block{ width:100%; }
.btn--sm{ height:38px; font-size:13.5px; padding:0 14px; border-radius:11px; }
.btn[disabled]{ opacity:.42; pointer-events:none; }

.icon-btn{
  appearance:none; border:0; background:transparent; cursor:pointer;
  width:38px; height:38px; border-radius:50%;
  display:grid; place-items:center; color:var(--ink);
  transition:background .16s;
}
.icon-btn:active{ background:rgba(27,26,23,.06); }

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  box-shadow:var(--shadow-1);
}

.chip{
  appearance:none; border:1px solid transparent; font:inherit; cursor:pointer;
  height:33px; padding:0 14px; border-radius:999px;
  background:var(--paper-2); color:var(--ink-2);
  font-size:13.5px; font-weight:500;
  transition:.18s var(--ease);
  white-space:nowrap;
}
.chip.on{ background:var(--ink); color:#FCFAF4; }

.label{ font-size:12.5px; font-weight:600; color:var(--ink-3); letter-spacing:.06em; }

/* ---------- 首页 ---------- */
.home-head{
  display:flex; align-items:flex-start; justify-content:space-between;
  padding:12px 0 6px;
}
.greet{ margin:0 0 3px; font-size:13px; color:var(--ink-3); letter-spacing:.04em; }
.brandline{ display:flex; align-items:center; gap:9px; }
.brand-mark{
  width:26px; height:26px; border-radius:8px;
  background:var(--ink); color:var(--ring);
  display:grid; place-items:center; font-size:14px; font-weight:800;
  transform:rotate(-4deg);
}
.home-head h1{ margin:0; font-size:25px; font-weight:750; letter-spacing:-.01em; }
.home-head .sub{ margin:7px 0 0; font-size:12.5px; color:var(--ink-3); }

.hero{
  margin-top:16px; padding:18px 18px 16px;
  border-radius:24px;
  background:linear-gradient(150deg,#23211C 0%, #171613 60%, #211E18 100%);
  color:#F6F1E6;
  display:flex; align-items:center; gap:14px;
  box-shadow:0 22px 44px -26px rgba(23,22,19,.9);
  position:relative; overflow:hidden;
}
.hero::after{
  content:""; position:absolute; width:190px; height:190px; right:-62px; top:-92px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(255,224,102,.34),rgba(255,224,102,0) 68%);
}
.hero-main{ flex:1; min-width:0; position:relative; z-index:1; }
.hero-label{ font-size:12px; color:rgba(246,241,230,.6); letter-spacing:.08em; }
.hero-num{ display:block; font-size:34px; line-height:1.12; font-weight:750; margin:5px 0 2px; letter-spacing:-.02em; }
.hero-num em{ font-size:13px; font-style:normal; font-weight:500; color:rgba(246,241,230,.55); margin-left:6px; }
.hero-tip{ font-size:12px; color:rgba(246,241,230,.5); margin:0; }
.hero-cta{
  margin-top:13px; height:36px; padding:0 15px; border-radius:10px; border:0; cursor:pointer;
  background:#F6F1E6; color:#1B1A17; font:inherit; font-size:13.5px; font-weight:650;
  display:inline-flex; align-items:center; gap:6px;
}
.ring{
  --p:0;
  width:78px; height:78px; flex:none; position:relative; z-index:1;
  border-radius:50%;
  background:conic-gradient(var(--ring) calc(var(--p) * 1%), rgba(255,255,255,.13) 0);
  display:grid; place-items:center;
}
.ring::before{
  content:""; position:absolute; inset:7px; border-radius:50%; background:#1D1B17;
}
.ring span{ position:relative; font-size:16px; font-weight:700; letter-spacing:-.02em; }
.ring small{ display:block; font-size:9px; font-weight:500; color:rgba(246,241,230,.5); text-align:center; letter-spacing:.04em; }

/* 快捷入口：一条横向分段，不再各自成卡 */
.quick-bar{
  display:grid; grid-template-columns:repeat(3,1fr);
  margin-top:14px; background:var(--card);
  border:1px solid var(--line); border-radius:18px; overflow:hidden;
}
.quick{
  appearance:none; border:0; background:transparent; cursor:pointer; font:inherit;
  display:flex; flex-direction:column; align-items:flex-start; gap:7px;
  padding:15px 14px 14px; position:relative; text-align:left;
  transition:background .16s var(--ease);
}
.quick + .quick::before{
  content:""; position:absolute; left:0; top:14px; bottom:14px; width:1px; background:var(--line);
}
.quick:active{ background:var(--paper-2); }
.quick i{ color:var(--ink); display:block; line-height:0; }
.quick b{ font-size:12.5px; font-weight:650; }
.quick small{ font-size:10.5px; color:var(--ink-3); }

.section-head{ display:flex; align-items:baseline; justify-content:space-between; margin:26px 0 12px; }
.section-head h2{ margin:0; font-size:16.5px; font-weight:700; letter-spacing:.01em; }
.section-head span{ font-size:12px; color:var(--ink-3); }

.chips{ display:flex; gap:8px; overflow-x:auto; padding-bottom:4px; margin-bottom:12px; scrollbar-width:none; }
.chips::-webkit-scrollbar{ display:none; }
.chips--wrap{ flex-wrap:wrap; overflow:visible; }

/* 知识点列表：一个容器，行与行之间用分隔线 */
.note-list{
  background:var(--card);
  border:1px solid var(--line); border-radius:20px; overflow:hidden;
}
.note-card{
  display:flex; overflow:hidden; cursor:pointer;
  background:transparent; border:0; border-bottom:1px solid var(--line-soft);
  border-radius:0; box-shadow:none;
  transition:background .16s var(--ease);
}
.note-card:last-child{ border-bottom:0; }
.note-card:active{ background:var(--paper-2); transform:none; }
.note-stripe{ width:4px; flex:none; opacity:.9; }
.note-body{ flex:1; padding:15px 16px 14px; min-width:0; }
.note-top{ display:flex; align-items:center; gap:8px; }
.note-top h3{
  margin:0; font-size:15.5px; font-weight:650; line-height:1.4;
  flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.chev{ color:var(--ink-3); font-size:17px; }
.note-sub{
  margin:6px 0 11px; font-size:11.5px; color:var(--ink-3);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.dot{ width:3px; height:3px; border-radius:50%; background:currentColor; opacity:.5; }
.bar{ height:5px; border-radius:99px; background:var(--paper-2); overflow:hidden; }
.bar i{ display:block; height:100%; border-radius:99px; background:var(--ink); transition:width .5s var(--ease); }
.bar--warm i{ background:linear-gradient(90deg,#E9754C,#D9502C); }
.note-foot{ display:flex; justify-content:space-between; align-items:center; margin-top:8px; font-size:11px; color:var(--ink-3); }
.note-foot b{ font-weight:650; color:var(--ink-2); }

.fab{
  position:fixed; right:calc(50% - 216px + 20px); bottom:calc(var(--frame-offset) + 94px);
  width:56px; height:56px; border-radius:20px; border:0; cursor:pointer;
  background:var(--brand); color:#fff;
  display:grid; place-items:center;
  box-shadow:0 14px 26px -10px rgba(217,80,44,.75);
  transition:transform .18s var(--ease);
  z-index:20;
}
.fab:active{ transform:scale(.93) rotate(90deg); }
@media (max-width:520px){ .fab{ right:20px; bottom:88px; } }

.empty{ text-align:center; padding:40px 20px; color:var(--ink-3); }
.empty h3{ margin:14px 0 6px; font-size:15px; color:var(--ink-2); }
.empty p{ margin:0; font-size:12.5px; line-height:1.7; }

/* ---------- 底部导航 ---------- */
.tabbar{
  position:absolute; left:0; right:0; bottom:0; height:76px;
  display:flex; align-items:center; justify-content:space-around;
  padding:0 20px 12px;
  background:linear-gradient(to top, var(--bar-fade) 55%, var(--bar-fade-2));
  backdrop-filter:blur(10px);
  z-index:15;
}
.tabbar button{
  appearance:none; border:0; background:transparent; font:inherit; cursor:pointer;
  display:flex; flex-direction:column; align-items:center; gap:4px;
  font-size:10.5px; font-weight:600; color:var(--ink-3); letter-spacing:.04em;
  padding:6px 18px;
}
.tabbar button.on{ color:var(--ink); }
.tabbar .hidden{ display:none; }

/* ---------- 顶栏 ---------- */
.topbar{
  position:sticky; top:0; z-index:12;
  display:flex; align-items:center; gap:8px;
  padding:8px 14px 10px;
  background:linear-gradient(to bottom, var(--paper) 72%, var(--bar-fade-2) 100%);
  backdrop-filter:blur(6px);
}
.topbar h2{
  flex:1; margin:0; font-size:15px; font-weight:650;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  padding:0 4px;
}
.topbar .spacer{ width:38px; flex:none; }

/* ---------- 新建页 ---------- */
.page-head{ padding:14px 0 4px; }
.page-head h1{ margin:0 0 6px; font-size:24px; font-weight:750; letter-spacing:-.01em; }
.page-head p{ margin:0; font-size:13px; color:var(--ink-3); line-height:1.6; }

.option-list{
  display:block; margin-top:20px;
  background:var(--card); border:1px solid var(--line); border-radius:20px; overflow:hidden;
}
.option{
  display:flex; align-items:center; gap:13px; text-align:left; width:100%;
  padding:16px; border:0; border-bottom:1px solid var(--line-soft);
  border-radius:0; background:transparent; font:inherit; cursor:pointer;
  transition:background .16s var(--ease);
}
.option:last-child{ border-bottom:0; }
.option:active{ background:var(--paper-2); transform:none; }
.option .oi{
  width:30px; height:30px; flex:none; border-radius:0; display:grid; place-items:center;
  background:transparent; color:var(--ink);
}
.option .oi--brand{ background:transparent; color:var(--brand); }
.option b{ display:block; font-size:15px; font-weight:650; margin-bottom:3px; }
.option small{ display:block; font-size:11.5px; color:var(--ink-3); line-height:1.5; }
.option .arrow{ margin-left:auto; color:var(--ink-3); }

.tips-card{
  margin-top:20px; padding:14px 2px 0; border:0; border-top:1px solid var(--line);
  border-radius:0; background:none;
  font-size:12px; line-height:1.8; color:var(--ink-3);
}
.tips-card b{ color:var(--ink-2); }

/* ---------- OCR 页 ---------- */
.ocr-shot{
  position:relative; margin:6px 0 16px; border-radius:var(--r-lg); overflow:hidden;
  border:1px solid var(--line); background:var(--paper-2);
  aspect-ratio:4/3; display:grid; place-items:center;
}
.ocr-shot img{ width:100%; height:100%; object-fit:cover; display:block; }
.ocr-scan{
  position:absolute; left:0; right:0; height:38%;
  background:linear-gradient(to bottom, rgba(217,80,44,0), rgba(217,80,44,.28), rgba(217,80,44,0));
  animation:scan 1.7s linear infinite;
}
@keyframes scan{ 0%{ transform:translateY(-100%);} 100%{ transform:translateY(265%);} }
.ocr-status{
  display:flex; align-items:center; gap:10px; font-size:12.5px; color:var(--ink-2);
  margin:-6px 0 14px;
}
.spinner{
  width:16px; height:16px; border-radius:50%; flex:none;
  border:2px solid rgba(27,26,23,.14); border-top-color:var(--brand);
  animation:spin .8s linear infinite;
}
@keyframes spin{ to{ transform:rotate(360deg); } }

.field{ margin-bottom:15px; }
.field > label{ display:block; font-size:12px; font-weight:600; color:var(--ink-2); margin-bottom:7px; letter-spacing:.03em; }
.input, .select{
  width:100%; font:inherit; color:var(--ink);
  background:transparent; border:0; border-bottom:1px solid var(--line);
  border-radius:0; padding:10px 0; font-size:14.5px;
  outline:none; transition:border-color .18s;
}
.textarea{
  width:100%; font:inherit; color:var(--ink); font-size:14.5px;
  min-height:220px; line-height:1.85; resize:vertical;
  background:var(--card); border:1px solid var(--line); border-radius:14px;
  padding:13px 14px; outline:none;
  transition:border-color .18s, box-shadow .18s;
}
.input:focus, .select:focus{ border-bottom-color:var(--brand); }
.textarea:focus{ border-color:#C9BFA9; box-shadow:0 0 0 4px rgba(217,80,44,.06); }
.hintline{ font-size:11px; color:var(--ink-3); margin-top:6px; line-height:1.6; }

/* 文档导入 */
.doc-card{
  display:flex; align-items:center; gap:12px;
  padding:14px 15px; margin:4px 0 8px;
  background:var(--card); border:1px solid var(--line); border-radius:var(--r-md);
}
.doc-ico{
  width:44px; height:44px; border-radius:13px; flex:none;
  background:var(--paper-2); color:var(--ink-2);
  display:grid; place-items:center;
}
.doc-info{ flex:1; min-width:0; }
.doc-info b{
  display:block; font-size:13.5px; font-weight:650;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.doc-info small{ display:block; font-size:11px; color:var(--ink-3); margin-top:3px; }
.doc-state{
  flex:none; font-size:11px; font-weight:650; padding:3px 9px; border-radius:99px;
  color:var(--brand); background:var(--brand-soft);
}

.switch-row{
  display:flex; align-items:center; gap:14px; cursor:pointer;
  padding:14px 0; margin:2px 0 18px;
  background:none; border:0; border-top:1px solid var(--line); border-radius:0;
}
.switch-row > span{ flex:1; min-width:0; }
.switch-row b{ display:block; font-size:13.5px; font-weight:650; color:var(--ink); }
.switch-row small{ display:block; font-size:11px; color:var(--ink-3); line-height:1.55; margin-top:3px; }
.switch{
  appearance:none; -webkit-appearance:none; flex:none; cursor:pointer;
  width:46px; height:27px; border-radius:99px; background:var(--line);
  position:relative; transition:background .2s; margin:0;
}
.switch::after{
  content:""; position:absolute; top:3px; left:3px; width:21px; height:21px;
  border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(27,26,23,.25);
  transition:transform .2s var(--ease);
}
.switch:checked{ background:var(--brand); }
.switch:checked::after{ transform:translateX(19px); }

/* ---------- 模式标签（文字 + 圆点，不再是一个小方块） ---------- */
.mode-tag{
  display:inline-flex; align-items:center; gap:4px;
  font-size:10px; font-weight:700; letter-spacing:.06em;
  margin-right:7px; vertical-align:1px; color:var(--ink-2);
}
.mode-tag::before{ content:""; width:5px; height:5px; border-radius:50%; background:currentColor; }
.mt-passage{ color:#9A7B00; }
.mt-point{ color:#3C6B1E; }
.mt-vocab{ color:#1D5C86; }
.mt-practice{ color:#8C2D50; }

.meta-link{
  appearance:none; border:0; background:none; font:inherit; cursor:pointer; padding:0;
  font-size:11.5px; font-weight:700; letter-spacing:.02em;
}
.meta-link.mt-passage{ color:#9A7B00; }
.meta-link.mt-point{ color:#3C6B1E; }
.meta-link.mt-vocab{ color:#1D5C86; }
.meta-link.mt-practice{ color:#8C2D50; }

.mode-chips{ flex-wrap:wrap; overflow:visible; margin:0; padding:0; }
.mini-toggle{
  appearance:none; border:1px solid var(--line); background:var(--card);
  font:inherit; font-size:11px; font-weight:600; color:var(--ink-2);
  padding:4px 10px; border-radius:99px; cursor:pointer; transition:.18s var(--ease);
}
.mini-toggle.on{ background:var(--ink); color:#FCFAF4; border-color:var(--ink); }

/* ---------- 卡片（速记 / 单词） ---------- */
.study-stage{ padding:0 20px; }
.card-progress{ display:flex; align-items:center; gap:10px; margin:2px 0 14px; }
.card-progress .track{ flex:1; height:4px; border-radius:99px; background:var(--paper-2); overflow:hidden; }
.card-progress .track i{ display:block; height:100%; background:var(--brand); border-radius:99px; transition:width .35s var(--ease); }
.card-progress span{ font-size:11.5px; color:var(--ink-3); font-variant-numeric:tabular-nums; }

.study-card{
  display:flex; flex-direction:column;
  min-height:336px; padding:22px;
  border-radius:26px; border:1px solid var(--line);
  background:var(--card);
  box-shadow:var(--shadow-1);
  cursor:pointer; transition:transform .18s var(--ease);
  position:relative; overflow:hidden;
}
.study-card:active{ transform:scale(.99); }
.sc-tag{ display:flex; justify-content:space-between; font-size:10.5px; font-weight:650; letter-spacing:.08em; color:var(--ink-3); }
.sc-body{ flex:1; display:flex; flex-direction:column; justify-content:center; padding:16px 0; }
.sc-word{ font-size:37px; font-weight:750; letter-spacing:-.02em; line-height:1.25; word-break:break-word; }
.sc-pos{ font-size:12.5px; font-style:italic; color:var(--ink-3); margin-top:8px; }
.sc-hint{ font-size:11.5px; color:var(--ink-3); margin-top:18px; }
.sc-sentence{ font-size:18px; line-height:2.1; color:var(--ink); }
.sc-sentence .hole{ display:inline-block; min-width:2.4em; border-bottom:2px solid var(--brand); margin:0 3px; }
.sc-answer{ font-size:30px; font-weight:750; line-height:1.45; color:var(--brand); letter-spacing:-.01em; word-break:break-word; }
.sc-meaning{ font-size:16px; line-height:1.9; color:var(--ink); margin-top:10px; }
.sc-example{ margin-top:14px; padding-top:12px; border-top:1px dashed var(--line); font-size:12.5px; line-height:1.9; color:var(--ink-2); }
.sc-example b{ font-weight:600; color:var(--ink-3); }
.sc-foot{ font-size:11px; color:var(--ink-3); text-align:center; padding-top:4px; }
.card-actions{ display:flex; gap:9px; margin-top:14px; }
.card-actions .btn{ flex:1; }

.sc-example mark.hl{ background:rgba(255,224,102,.8); color:inherit; padding:0 2px; border-radius:3px; }
.sc-example mark.hl-green{ background:rgba(185,236,142,.85); }
.sc-example mark.hl-pink{ background:rgba(255,194,216,.9); }
.sc-example mark.hl-blue{ background:rgba(166,220,255,.9); }

.dict-ctx .pos{ font-style:italic; color:var(--ink-3); font-size:11.5px; margin-right:4px; }
.dict-in--en{ letter-spacing:.06em; }

/* ---------- 阅读 / 标记页 ---------- */
.note-meta{
  display:block;
  padding:0 20px 12px; font-size:11.5px; color:var(--ink-3); line-height:1.7;
}
.meta-row{ display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.meta-row-2{ margin-top:3px; }
.note-meta .dot{ width:3px; height:3px; }
.meta-row-2 .meta-adhd{ margin-left:auto; }
.meta-adhd{
  margin-left:auto; appearance:none; border:0; background:none; font:inherit; cursor:pointer;
  font-size:11px; font-weight:600; color:var(--ink-3);
  padding:2px 0; border-bottom:1px dashed var(--line);
}
.meta-adhd.on{ color:var(--brand); border-bottom-color:var(--brand); }

.tipbar{
  margin:0 20px 14px; padding:0; border-radius:0; background:none;
  color:var(--ink-3); font-size:11.5px; line-height:1.7;
  display:flex; gap:7px; align-items:flex-start;
}
.tipbar svg{ flex:none; margin-top:2px; color:var(--brand); opacity:.8; }

.reading{
  padding:0 20px 10px;
  font-size:16.5px; line-height:2.05; letter-spacing:.012em; color:var(--ink);
  -webkit-user-select:none; user-select:none;
}
.reading.tool-on{ touch-action:none; }
.reading .para{ margin:0 0 1.1em; white-space:pre-wrap; word-break:break-word; }
.reading .para:last-child{ margin-bottom:0; }
.reading .c{ display:inline; border-radius:2px; }
.reading .c.sel{ background:rgba(217,80,44,.22); }
.reading mark.hl{
  background:transparent; color:inherit; border-radius:3px; padding:.06em 0;
  box-decoration-break:clone; -webkit-box-decoration-break:clone;
  transition:background .2s;
}
.reading mark.hl-yellow{ background:linear-gradient(transparent 12%, var(--mk-yellow) 12%, var(--mk-yellow) 92%, transparent 92%); }
.reading mark.hl-green{ background:linear-gradient(transparent 12%, var(--mk-green) 12%, var(--mk-green) 92%, transparent 92%); }
.reading mark.hl-pink{ background:linear-gradient(transparent 12%, var(--mk-pink) 12%, var(--mk-pink) 92%, transparent 92%); }
.reading mark.hl-blue{ background:linear-gradient(transparent 12%, var(--mk-blue) 12%, var(--mk-blue) 92%, transparent 92%); }
.reading.erasing mark.hl{ outline:1.5px dashed rgba(214,69,69,.6); cursor:crosshair; }

.toolbar{
  position:fixed; left:50%; transform:translateX(-50%);
  width:min(432px, 100vw);
  bottom:var(--frame-offset); z-index:14;
  padding:12px 20px calc(16px + env(safe-area-inset-bottom));
  background:linear-gradient(to top, var(--paper) 66%, var(--bar-fade-2));
  backdrop-filter:blur(8px);
}
.tool-row{ display:flex; align-items:center; gap:10px; flex-wrap:nowrap; }
.swatch{
  width:36px; height:36px; border-radius:50%; border:0; cursor:pointer; padding:0;
  position:relative; background:transparent;
  display:grid; place-items:center;
  transition:transform .16s var(--ease);
}
.swatch i{ width:23px; height:23px; border-radius:50%; display:block; box-shadow:inset 0 0 0 1px rgba(27,26,23,.1); }
.swatch.on{ transform:translateY(-2px); }
.swatch.on::after{
  content:""; position:absolute; inset:-3px; border-radius:50%;
  border:2px solid var(--ink);
}
.tool-sep{ width:1px; height:24px; background:var(--line); margin:0 2px; }
.tool-btn{
  appearance:none; border:1px solid transparent; background:transparent; font:inherit; cursor:pointer;
  height:38px; min-width:38px; padding:0 10px; border-radius:11px;
  display:inline-flex; align-items:center; gap:6px;
  font-size:12.5px; font-weight:600; color:var(--ink-2);
}
.tool-btn.on{ background:var(--ink); color:#FCFAF4; }
.tool-btn[disabled]{ opacity:.35; }
.cta-row{ margin-top:10px; display:flex; gap:9px; }
.cta-row .btn{ flex:1; }

@media (max-width:390px){
  .toolbar{ padding-left:16px; padding-right:16px; }
  .tool-row{ gap:7px; }
  .swatch{ width:34px; height:34px; }
  .swatch i{ width:21px; height:21px; }
  .tool-btn{ padding:0 7px; font-size:12px; gap:4px; }
  .screen{ padding:0 16px; }
  .reading{ padding:0 16px 10px; font-size:16px; }
  .note-meta{ padding:0 16px 12px; }
  .tipbar, .seg, .recite-bar{ margin-left:16px; margin-right:16px; }
  .dict-list{ padding:0 16px; }
  .quiz-wrap{ padding:0 16px; }
}

/* ---------- 分段控件 ---------- */
.seg{
  display:flex; gap:4px; padding:4px; margin:0 20px 14px;
  background:var(--paper-2); border-radius:14px;
}
.seg button{
  flex:1; appearance:none; border:0; background:transparent; font:inherit; cursor:pointer;
  height:36px; border-radius:11px; font-size:13.5px; font-weight:600; color:var(--ink-2);
  transition:.18s var(--ease);
}
.seg button.on{ background:var(--card); color:var(--ink); box-shadow:0 1px 3px rgba(27,26,23,.1); }

/* ---------- 挖空背诵 ---------- */
.recite-bar{
  display:flex; align-items:center; justify-content:space-between;
  margin:0 20px 14px; font-size:11.5px; color:var(--ink-3);
}
.blank{
  appearance:none; border:0; cursor:pointer; font:inherit; color:inherit;
  background:rgba(255,224,102,.28);
  border-bottom:1.5px dashed #C9A227;
  border-radius:4px 4px 0 0; padding:.04em .28em; margin:0 .06em;
  transition:background .2s, color .2s;
  min-width:1.6em; display:inline-block; text-align:center;
}
.blank:active{ background:rgba(255,224,102,.55); }
.blank.revealed{
  background:rgba(255,224,102,.9); border-bottom-color:transparent;
  color:#4A3B00; font-weight:600;
}
.blank.revealed.hl-green{ background:rgba(185,236,142,.9); color:#274A0E; }
.blank.revealed.hl-pink{ background:rgba(255,194,216,.95); color:#67202F; }
.blank.revealed.hl-blue{ background:rgba(166,220,255,.95); color:#103A52; }
.blank .q{ opacity:.45; letter-spacing:.18em; }
.reading.recite{ line-height:2.3; }

/* ---------- 默写 ---------- */
.dict-list{ padding:0 20px; display:block; }
.dict-item{
  padding:14px 0; background:transparent;
  border:0; border-bottom:1px solid var(--line-soft); border-radius:0;
}
.dict-item:last-child{ border-bottom:0; }
.dict-ctx{ font-size:13.5px; line-height:1.9; color:var(--ink-2); margin-bottom:9px; }
.dict-ctx b{ color:var(--ink); }
.dict-in{
  width:100%; font:inherit; font-size:14.5px; padding:10px 12px;
  border:1px solid var(--line); border-radius:10px; background:var(--paper);
  outline:none; transition:.18s;
}
.dict-in:focus{ border-color:#C9BFA9; background:#fff; box-shadow:0 0 0 3px rgba(217,80,44,.06); }
.dict-res{ margin-top:9px; font-size:12px; line-height:1.9; }
.char-ok{ color:var(--ok); }
.char-bad{ color:var(--bad); text-decoration:underline wavy rgba(214,69,69,.6); text-underline-offset:3px; }
.score-line{ display:flex; align-items:center; gap:8px; margin-top:8px; font-size:11.5px; color:var(--ink-3); }
.score-badge{
  font-size:11px; font-weight:700; padding:2px 8px; border-radius:99px;
  background:var(--paper-2); color:var(--ink-2);
}
.score-badge.ok{ background:#E4F4EC; color:var(--ok); }
.score-badge.mid{ background:#FFF3D9; color:#A97A0B; }
.score-badge.bad{ background:#FBE7E7; color:var(--bad); }

/* ---------- 自测 ---------- */
.quiz-wrap{ padding:0 20px; }
.quiz-progress{ display:flex; align-items:center; gap:10px; margin:2px 0 18px; }
.quiz-progress .track{ flex:1; height:4px; border-radius:99px; background:var(--paper-2); overflow:hidden; }
.quiz-progress .track i{ display:block; height:100%; background:var(--ink); border-radius:99px; transition:width .4s var(--ease); }
.quiz-progress span{ font-size:11.5px; color:var(--ink-3); font-variant-numeric:tabular-nums; }

.q-card{
  padding:20px 18px; border-radius:24px; background:var(--card);
  border:1px solid var(--line); box-shadow:var(--shadow-1);
}
.q-type{ font-size:11px; font-weight:700; letter-spacing:.08em; color:var(--brand); margin-bottom:10px; }
.q-stem{ font-size:17px; line-height:1.95; margin:0 0 18px; color:var(--ink); }
.q-stem .slot{
  display:inline-block; min-width:2.4em; border-bottom:2px solid var(--ink);
  text-align:center; color:var(--ink-3);
}
.opt{
  display:flex; align-items:center; gap:11px; width:100%; text-align:left;
  padding:14px 2px; margin:0; border:0; border-bottom:1px solid var(--line-soft);
  border-radius:0; background:transparent; font:inherit; font-size:14.5px; color:var(--ink);
  cursor:pointer; line-height:1.5; transition:background .16s var(--ease);
}
.opt:last-child{ border-bottom:0; }
.opt:active{ background:var(--paper-2); }
.opt .k{
  width:22px; height:22px; flex:none; border-radius:50%;
  border:1px solid var(--line); background:transparent;
  display:grid; place-items:center; font-size:10.5px; font-weight:700; color:var(--ink-3);
}
.opt.on{ background:var(--paper-2); }
.opt.on .k{ background:var(--ink); border-color:var(--ink); color:#fff; }
.opt.right{ background:#F1FAF5; }
.opt.right .k{ background:var(--ok); border-color:var(--ok); color:#fff; }
.opt.wrong{ background:#FCF1F1; }
.opt.wrong .k{ background:var(--bad); border-color:var(--bad); color:#fff; }
.opt[disabled]{ pointer-events:none; }

.judge-row{ display:grid; grid-template-columns:1fr 1fr; gap:0; border-top:1px solid var(--line-soft); }
.judge-row .opt{ justify-content:center; border-bottom:0; padding:16px 8px; position:relative; }
.judge-row .opt + .opt::before{
  content:""; position:absolute; left:0; top:14px; bottom:14px; width:1px; background:var(--line-soft);
}

.q-feedback{
  margin-top:16px; padding:13px 0 0;
  border:0; border-top:1px solid var(--line); border-radius:0; background:none;
  font-size:13px; line-height:1.8; color:var(--ink-2);
}
.q-feedback b{ color:var(--ink); }
.q-feedback .verdict{ display:flex; align-items:center; gap:7px; font-weight:700; margin-bottom:5px; }
.verdict.ok{ color:var(--ok); }
.verdict.bad{ color:var(--bad); }

/* ---------- 结算 ---------- */
.result-hero{ text-align:center; padding:26px 0 10px; }
.result-score{
  width:132px; height:132px; margin:0 auto 16px; border-radius:50%;
  display:grid; place-items:center; position:relative;
  background:conic-gradient(var(--brand) calc(var(--p) * 1%), var(--paper-2) 0);
}
.result-score::before{ content:""; position:absolute; inset:9px; border-radius:50%; background:var(--paper); }
.result-score div{ position:relative; text-align:center; }
.result-score strong{ font-size:37px; font-weight:750; letter-spacing:-.03em; font-variant-numeric:tabular-nums; }
.result-score small{ display:block; font-size:11px; color:var(--ink-3); margin-top:-2px; letter-spacing:.06em; }
.result-hero h2{ margin:0 0 7px; font-size:20px; font-weight:700; }
.result-hero p{ margin:0; font-size:13px; color:var(--ink-3); line-height:1.7; }
.result-stats{
  display:flex; margin:22px 0 18px;
  background:var(--card); border:1px solid var(--line); border-radius:16px; overflow:hidden;
}
.rstat{
  flex:1; padding:14px 8px; text-align:center; background:transparent;
  border:0; border-right:1px solid var(--line-soft);
}
.rstat:last-child{ border-right:0; }
.rstat b{ display:block; font-size:20px; font-weight:700; letter-spacing:-.02em; }
.rstat small{ font-size:10.5px; color:var(--ink-3); }

.wrong-list{
  margin-top:6px; display:block;
  background:var(--card); border:1px solid var(--line); border-radius:16px; overflow:hidden;
}
.wrong-item{
  padding:13px 15px; border:0; border-bottom:1px solid var(--line-soft);
  border-radius:0; background:transparent;
  font-size:12.5px; line-height:1.8;
}
.wrong-item:last-child{ border-bottom:0; }
.wrong-item .q{ color:var(--ink-2); }
.wrong-item .a{ margin-top:5px; color:var(--ink); }
.wrong-item .a b{ color:var(--ok); }

/* ---------- 报告 ---------- */
.report-hero{
  margin-top:10px; padding:22px 20px; border-radius:26px;
  background:linear-gradient(155deg,#23211C,#171613); color:#F6F1E6;
  display:flex; align-items:center; gap:18px;
}
.report-hero .ring{ width:86px; height:86px; }
.report-hero h2{ margin:0 0 4px; font-size:17px; font-weight:700; }
.report-hero p{ margin:0; font-size:12px; line-height:1.7; color:rgba(246,241,230,.58); }
.report-nums{
  display:flex; margin-top:14px;
  background:var(--card); border:1px solid var(--line); border-radius:16px; overflow:hidden;
}
.report-nums div{
  flex:1; padding:12px 6px; text-align:center;
  border-right:1px solid var(--line-soft); background:transparent;
}
.report-nums div:last-child{ border-right:0; }
.report-nums b{ display:block; font-size:18px; font-weight:750; letter-spacing:-.02em; }
.report-nums small{ font-size:10px; color:var(--ink-3); }

.bar-item{ margin-bottom:15px; }
.bar-item .bit{ display:flex; justify-content:space-between; font-size:12.5px; margin-bottom:7px; }
.bar-item .bit span{ color:var(--ink-3); font-variant-numeric:tabular-nums; }
.bar-item b{ font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ---------- 弹层 ---------- */
.sheet-host{ position:fixed; inset:0; z-index:100; pointer-events:none; }
.sheet-mask{
  position:absolute; inset:0; background:rgba(23,22,19,.38);
  opacity:0; transition:opacity .26s var(--ease); pointer-events:auto;
  backdrop-filter:blur(2px);
}
.sheet-mask.on{ opacity:1; }
.sheet-panel{
  position:absolute; left:50%; bottom:0; width:min(432px,100vw);
  transform:translate(-50%,102%); transition:transform .32s var(--ease);
  background:var(--paper); border-radius:26px 26px 0 0;
  padding:10px 20px calc(22px + env(safe-area-inset-bottom));
  pointer-events:auto; box-shadow:0 -20px 50px -20px rgba(23,22,19,.4);
  max-height:86%; overflow-y:auto;
}
.sheet-panel.on{ transform:translate(-50%,0); }
.sheet-grip{ width:38px; height:4px; border-radius:99px; background:var(--line); margin:4px auto 14px; }
.sheet-panel h3{ margin:0 0 4px; font-size:17px; font-weight:700; }
.sheet-panel p{ margin:0 0 16px; font-size:12.5px; color:var(--ink-3); line-height:1.6; }
.sheet-actions{
  display:block; background:var(--card);
  border:1px solid var(--line); border-radius:16px; overflow:hidden;
}
.sheet-btn{
  appearance:none; border:0; font:inherit; cursor:pointer;
  display:flex; align-items:center; gap:11px; width:100%;
  padding:15px 16px; border-bottom:1px solid var(--line-soft);
  background:transparent; border-radius:0;
  font-size:14px; font-weight:600; color:var(--ink); text-align:left;
}
.sheet-btn:last-child{ border-bottom:0; }
.sheet-btn:active{ background:var(--paper-2); }
.sheet-btn.danger{ color:var(--bad); }
.sheet-cancel{ margin-top:6px; width:100%; }

/* ---------- Toast ---------- */
.toast{
  position:fixed; left:50%; top:50%; transform:translate(-50%,-50%) scale(.94);
  background:rgba(27,26,23,.92); color:#FBF8F0;
  padding:12px 18px; border-radius:14px; font-size:13px; font-weight:500;
  opacity:0; pointer-events:none; transition:.24s var(--ease); z-index:200;
  max-width:78vw; text-align:center; line-height:1.5;
  backdrop-filter:blur(8px);
}
.toast.on{ opacity:1; transform:translate(-50%,-50%) scale(1); }

/* ---------- 动效 ---------- */
.screen > *:not(.toolbar){ animation:rise .42s var(--ease) both; }
.screen > *:nth-child(2){ animation-delay:.04s; }
.screen > *:nth-child(3){ animation-delay:.08s; }
.screen > *:nth-child(4){ animation-delay:.11s; }
.screen > *:nth-child(5){ animation-delay:.14s; }
@keyframes rise{ from{ opacity:0; transform:translateY(10px); } to{ opacity:1; transform:none; } }
@media (prefers-reduced-motion:reduce){ *{ animation:none !important; transition:none !important; } }

/* ============================================================
   积分与奖励
   ============================================================ */
.coin-pill{
  display:inline-flex; align-items:center; gap:6px;
  height:34px; padding:0 13px; border-radius:99px; cursor:pointer;
  border:1px solid #EBD9A8; background:linear-gradient(160deg,#FFF7DE,#FFEFC2);
  color:#8A6A00; font:inherit; font-size:13px; font-weight:750;
  font-variant-numeric:tabular-nums;
}
.coin-pill span{ font-size:11px; opacity:.85; }
.coin-big{
  display:flex; align-items:center; gap:6px; font-size:21px; font-weight:750;
  color:#8A6A00; font-variant-numeric:tabular-nums;
}
.coin-big span{ font-size:13px; }

.reward-hero{
  margin-top:16px; padding:18px; border-radius:24px;
  background:linear-gradient(150deg,#23211C 0%, #171613 60%, #211E18 100%);
  color:#F6F1E6; display:flex; align-items:center; gap:14px;
  box-shadow:0 22px 44px -26px rgba(23,22,19,.9);
  position:relative; overflow:hidden;
}
.reward-hero::after{
  content:""; position:absolute; width:190px; height:190px; right:-70px; top:-90px; border-radius:50%;
  background:radial-gradient(circle,rgba(255,224,102,.3),rgba(255,224,102,0) 68%);
}
.rw-main{ flex:1; min-width:0; position:relative; z-index:1; }
.rw-badge{
  width:78px; height:78px; flex:none; border-radius:50%; position:relative; z-index:1;
  border:2px dashed rgba(255,224,102,.55); color:var(--ring);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  font-size:20px; font-weight:750; letter-spacing:-.02em;
}
.rw-badge small{ font-size:9px; font-weight:500; color:rgba(246,241,230,.5); letter-spacing:.08em; margin-top:1px; }

.theme-grid{
  background:var(--card); border:1px solid var(--line); border-radius:20px; overflow:hidden;
}
.theme-card{
  appearance:none; font:inherit; text-align:left; cursor:pointer;
  display:flex; align-items:center; gap:12px; width:100%;
  padding:12px 14px; border:0; border-bottom:1px solid var(--line-soft);
  border-radius:0; background:transparent; box-shadow:none;
  transition:background .16s var(--ease);
}
.theme-card:last-child{ border-bottom:0; }
.theme-card:active{ background:var(--paper-2); }
.theme-card.on{ background:var(--paper-2); box-shadow:none; }
.theme-preview{
  width:78px; height:54px; flex:none; border-radius:10px; padding:8px 10px;
  display:flex; flex-direction:column; justify-content:center; gap:3px;
  overflow:hidden; position:relative;
}
.theme-preview b{ font-size:12px; font-weight:750; letter-spacing:-.01em; }
.theme-preview i{ display:block; height:3px; width:72%; border-radius:2px; background:currentColor; opacity:.22; }
.theme-preview i + i{ width:46%; }
.tp-paper{ background:#F7F4ED; color:#1B1A17; border:1px solid #E8E2D5; }
.tp-fresh{ background:linear-gradient(150deg,#E7F7EF,#F9FDFB); color:#2E7D5F; border:1px solid #D5EDE2; }
.tp-pixel{ background:#F4F4E8; color:#151515; border:2px solid #151515; border-radius:0; box-shadow:3px 3px 0 #151515; font-family:"Courier New",ui-monospace,monospace; }
.tp-pixel i{ height:3px; border-radius:0; opacity:.9; }
.tp-pop{ background:#FFE94A; color:#111; border:2px solid #111; border-radius:6px; box-shadow:4px 4px 0 #111; }
.tp-pop i{ opacity:.45; }
.tp-glass{ background:linear-gradient(150deg,#2A3562,#452A63); color:#EAF0FF; border:1px solid rgba(255,255,255,.25); }
.tp-glass i{ background:#EAF0FF; opacity:.4; }

.theme-info{ flex:1; min-width:0; }
.theme-info b{ display:block; font-size:13.5px; font-weight:650; margin-top:0; }
.theme-info small{ display:block; font-size:10.5px; color:var(--ink-3); margin-top:2px; line-height:1.45; min-height:0; }
.theme-price{
  display:inline-flex; align-items:center; gap:3px; margin:0;
  font-size:10.5px; font-weight:700; padding:2px 8px; border-radius:99px;
  background:var(--paper-2); color:var(--ink-2); flex:none;
}
.theme-price.can{ background:#FFF3D9; color:#A97A0B; }
.theme-price.owned{ background:var(--brand-soft); color:var(--brand); }
.theme-price.on{ background:var(--ink); color:#FCFAF4; }

.theme-block{ margin-bottom:12px; }
.theme-block:last-of-type{ margin-bottom:0; }
.theme-group-head{
  display:flex; justify-content:space-between; align-items:center;
  padding:9px 15px; font-size:11px; font-weight:700; letter-spacing:.1em;
  color:var(--ink-3); background:var(--paper-2);
  border-bottom:1px solid var(--line-soft);
}
.theme-group-head small{ font-size:10px; font-weight:600; letter-spacing:.04em; }
.theme-card.previewing{ background:var(--paper-2); box-shadow:inset 3px 0 0 var(--brand); }
.theme-tip{ margin:-2px 0 10px; font-size:11.5px; color:var(--ink-3); line-height:1.65; }
.theme-head{ align-items:center; }
.scheme-seg{
  display:inline-flex; padding:3px; gap:2px; border-radius:99px;
  background:var(--paper-2); border:1px solid var(--line);
}
.scheme-seg button{
  appearance:none; border:0; background:transparent; font:inherit; cursor:pointer;
  height:26px; padding:0 12px; border-radius:99px;
  font-size:11.5px; font-weight:600; color:var(--ink-3);
}
.scheme-seg button.on{ background:var(--card); color:var(--ink); box-shadow:var(--shadow-1); }

/* 预览浮条 */
.preview-bar{
  position:absolute; left:12px; right:12px; bottom:86px; z-index:40;
  display:flex; align-items:center; gap:9px;
  padding:10px 12px; border-radius:16px;
  background:rgba(24,22,19,.94); color:#FBF8F0;
  box-shadow:0 18px 40px -18px rgba(0,0,0,.6);
  backdrop-filter:blur(14px);
  animation:rise .28s var(--ease) both;
}
.pb-info{ flex:1; min-width:0; }
.pb-info b{ display:block; font-size:12.5px; font-weight:700; }
.pb-info small{ display:block; font-size:10.5px; opacity:.66; margin-top:2px; }
.preview-bar button{
  appearance:none; border:0; font:inherit; cursor:pointer; flex:none;
  height:32px; padding:0 12px; border-radius:10px; font-size:12px; font-weight:650;
}
.pb-cancel{ background:rgba(255,255,255,.14); color:#FBF8F0; }
.pb-ok{ background:var(--ring); color:#1B1A17; }

/* 自定义面板 */
.custom-panel{
  background:var(--card); border:1px solid var(--line); border-radius:20px; overflow:hidden;
}
.cp-row{
  display:flex; align-items:center; gap:12px; padding:11px 15px;
  border-bottom:1px solid var(--line-soft);
}
.cp-row:last-child{ border-bottom:0; }
.cp-label{ width:52px; flex:none; font-size:12px; font-weight:600; color:var(--ink-3); }
.cp-row .chips{ margin:0; flex:1; padding-bottom:0; }
.cp-row .chip{ height:28px; padding:0 11px; font-size:12px; }
.hl-picks{ display:flex; gap:8px; flex:1; }
.hl-pick{
  position:relative; width:30px; height:30px; border-radius:9px; overflow:hidden;
  cursor:pointer; border:1px solid var(--line);
}
.hl-pick input{ position:absolute; inset:-10px; width:220%; height:220%; opacity:0; cursor:pointer; border:0; padding:0; }
.hl-pick i{ display:block; width:100%; height:100%; }
.cp-actions{ display:flex; gap:8px; flex:1; }
.cp-actions .btn--soft{ border:1px solid var(--line); }
.cp-sticker-list{ display:flex; flex-wrap:wrap; gap:9px; flex:1; }
.cp-sticker{
  position:relative; width:34px; height:34px; border-radius:8px;
  border:1px solid var(--line); background:var(--paper-2);
  display:grid; place-items:center;
}
.cp-sticker img{ max-width:100%; max-height:100%; display:block; }
.cp-sticker button{
  position:absolute; right:-6px; top:-6px; width:16px; height:16px; padding:0;
  border-radius:50%; border:0; background:var(--ink); color:#FBF8F0;
  font-size:11px; line-height:16px; cursor:pointer;
}
.cp-hint{
  margin:0; padding:11px 15px; font-size:11px; color:var(--ink-3);
  border-top:1px solid var(--line-soft); background:var(--paper-2); line-height:1.6;
}
.cp-hint-row{
  display:flex; align-items:center; gap:10px; padding:11px 15px;
  border-top:1px solid var(--line-soft); background:var(--paper-2);
}
.cp-hint-row p{ margin:0; flex:1; font-size:11px; color:var(--ink-3); line-height:1.55; }

/* 自定义贴纸层 */
.sticker-layer{ position:absolute; inset:0; z-index:18; pointer-events:none; overflow:hidden; }
.sticker{
  position:absolute; pointer-events:auto; cursor:grab;
  user-select:none; touch-action:none;
  filter:drop-shadow(0 6px 12px rgba(27,26,23,.18));
}
.sticker.dragging{ cursor:grabbing; filter:drop-shadow(0 14px 24px rgba(27,26,23,.3)); }

/* 新主题预览块 */
.tp-lined{
  background:repeating-linear-gradient(to bottom,#FBF9F2 0 8px,#DCE2E8 8px 9px);
  color:#3E6FA8; border:1px solid #DCE2E8;
}
.tp-grid{
  background-color:#FCFBF6; color:#55708C; border:1px solid #DFE6E0;
  background-image:linear-gradient(#DFE6E0 1px,transparent 1px),linear-gradient(90deg,#DFE6E0 1px,transparent 1px);
  background-size:8px 8px;
}
.tp-memo{ background:#FFF6D8; color:#D2622E; border:1px dashed #E3CE97; font-family:"Kaiti SC","STKaiti","KaiTi",serif; }
.tp-guofeng{ background:#F4EDDD; color:#A83A26; border:1px solid #D8C9AC; font-family:"Songti SC","SimSun",serif; }
.tp-cyber{
  background:linear-gradient(150deg,#0B0F1A,#241040);
  color:#33E1FF; border:1px solid rgba(51,225,255,.55);
  box-shadow:0 0 9px rgba(255,46,136,.35); font-family:"Courier New",ui-monospace,monospace;
}
.tp-cyber i{ background:#33E1FF; opacity:.5; }
.tp-custom{ background:linear-gradient(135deg,#FFF9EC,#F1E7FF 55%,#E4F6FF); color:#4B4356; border:1px dashed #C9BEE0; }
.tp-custom i{ background:linear-gradient(90deg,#FFE066,#B9EC8E,#FFC2D8); opacity:.95; }


.earn-list{ background:var(--card); border:1px solid var(--line); border-radius:18px; overflow:hidden; }
.earn-row{ display:flex; justify-content:space-between; align-items:center; gap:10px; padding:13px 15px; font-size:12.5px; border-bottom:1px solid var(--line); }
.earn-row:last-child{ border-bottom:0; }
.earn-row b{ font-weight:650; }
.earn-row span{ color:var(--ink-3); text-align:right; }
.log-list{
  display:block; background:var(--card);
  border:1px solid var(--line); border-radius:18px; overflow:hidden;
}
.log-row{
  display:flex; justify-content:space-between; align-items:center; gap:10px;
  padding:12px 15px; border:0; border-bottom:1px solid var(--line-soft);
  border-radius:0; background:transparent;
  font-size:12px; color:var(--ink-2);
}
.log-row:last-child{ border-bottom:0; }
.log-row b{ font-variant-numeric:tabular-nums; }
.log-row b.plus{ color:var(--ok); }
.log-row b.minus{ color:var(--brand); }
.gain-line{
  display:inline-flex; align-items:center; gap:5px;
  font-size:12px; font-weight:750; color:#8A6A00;
  background:#FFF3D9; padding:3px 9px; border-radius:99px;
}

/* 夜间通用补丁：基础组件在深色底上保持对比度（各主题可再覆盖） */
html[data-scheme="dark"] .btn{ background:#F2EDE2; color:#1B1A17; }
html[data-scheme="dark"] .btn--brand{ background:var(--brand); color:#FFFFFF; }
html[data-scheme="dark"] .btn--soft{ background:var(--paper-2); color:var(--ink); border-color:var(--line); }
html[data-scheme="dark"] .btn--ghost{ color:var(--ink); }
html[data-scheme="dark"] .chip.on{ background:var(--ink); color:var(--paper); }
html[data-scheme="dark"] .seg button.on{ background:var(--ink); color:var(--paper); }
html[data-scheme="dark"] .brand-mark{ background:var(--ink); color:var(--paper); }
html[data-scheme="dark"] .theme-price.on{ background:var(--ink); color:var(--paper); }
html[data-scheme="dark"] .scheme-seg button.on{ background:var(--ink); color:var(--paper); }
html[data-scheme="dark"] .theme-price.can{ background:rgba(255,224,102,.16); color:#F1CE72; }
html[data-scheme="dark"] .mini-toggle.on,
html[data-scheme="dark"] .tool-btn.on{ background:var(--ink); color:var(--paper); border-color:var(--ink); }
html[data-scheme="dark"] .opt.on .k{ background:var(--ink); border-color:var(--ink); color:var(--paper); }
html[data-scheme="dark"] .coin-pill{ background:rgba(255,224,102,.12); color:#F1CE72; border-color:rgba(255,224,102,.26); }
html[data-scheme="dark"] .coin-big{ color:#F1CE72; }
html[data-scheme="dark"] .gain-line{ background:rgba(255,224,102,.14); color:#F1CE72; }
html[data-scheme="dark"] .opt.right{ background:rgba(47,158,110,.16); }
html[data-scheme="dark"] .opt.wrong{ background:rgba(214,69,69,.16); }
html[data-scheme="dark"] .score-badge.ok{ background:rgba(47,158,110,.16); }
html[data-scheme="dark"] .score-badge.mid{ background:rgba(255,224,102,.16); color:#F1CE72; }
html[data-scheme="dark"] .score-badge.bad{ background:rgba(214,69,69,.16); }
html[data-scheme="dark"] .dict-in:focus{ background:var(--card); border-color:var(--line); }
html[data-scheme="dark"] .sc-example mark.hl{ background:rgba(255,224,102,.28); }
html[data-scheme="dark"] .sc-example mark.hl-green{ background:rgba(185,236,142,.24); }
html[data-scheme="dark"] .sc-example mark.hl-pink{ background:rgba(255,194,216,.24); }
html[data-scheme="dark"] .sc-example mark.hl-blue{ background:rgba(166,220,255,.24); }
html[data-scheme="dark"] .cp-sticker button{ color:var(--paper); }

/* ============================================================
   主题皮肤
   ============================================================ */

/* ---- 小清新 ---- */
html[data-theme="fresh"]{
  --paper:#F4FBF7; --paper-2:#E7F4EC; --card:#FFFFFF;
  --ink:#25352B; --ink-2:#5B7163; --ink-3:#8FA396;
  --line:#DCEBE2; --brand:#3B9D77; --brand-soft:#E3F6EC;
  --ring:#A8E6C3;
  --hl-yellow:#FBF0A8; --hl-green:#BFEBC9; --hl-pink:#FFD3E2; --hl-blue:#C4E7FF;
  --mk-yellow:rgba(251,240,168,.9); --mk-green:rgba(191,235,201,.9);
  --mk-pink:rgba(255,211,226,.9); --mk-blue:rgba(196,231,255,.9);
  --r-lg:26px; --r-md:18px;
  --bar-fade:rgba(244,251,247,.98); --bar-fade-2:rgba(244,251,247,0);
}
html[data-theme="fresh"] body{
  background:linear-gradient(160deg,#EAF7F0 0%,#F7FBF9 45%,#EAF2FF 100%);
}
html[data-theme="fresh"] body::after{ opacity:.18; }
html[data-theme="fresh"] .app{ border-color:#D8EAE0; box-shadow:0 30px 70px -42px rgba(59,157,119,.55); }
html[data-theme="fresh"] .hero,
html[data-theme="fresh"] .reward-hero,
html[data-theme="fresh"] .report-hero{ background:linear-gradient(150deg,#3B9D77,#2C7D5E); }
html[data-theme="fresh"] .ring::before{ background:#2C7D5E; }
html[data-theme="fresh"] .ring small{ color:rgba(255,255,255,.65); }
html[data-theme="fresh"] .fab{ background:#3B9D77; box-shadow:0 14px 26px -10px rgba(59,157,119,.7); }

/* ---- 像素风 ---- */
html[data-theme="pixel"]{
  --paper:#F5F5E9; --paper-2:#E6E6D2; --card:#FFFFFF;
  --ink:var(--px-line); --ink-2:#3D3D3D; --ink-3:#6E6E6E;
  --line:var(--px-line); --brand:#E24A2A; --brand-soft:#FFE0D4;
  --ring:#F2E85C;
  --hl-yellow:#F2E85C; --hl-green:#8CE78C; --hl-pink:#FFB0CE; --hl-blue:#97D9FF;
  --r-lg:0px; --r-md:0px; --r-sm:0px;
  --shadow-1:4px 4px 0 var(--px-line); --shadow-2:6px 6px 0 var(--px-line);
}
html[data-theme="pixel"] body{
  background-color:#DEDEC6;
  background-image:linear-gradient(#C9C9B0 1px, transparent 1px), linear-gradient(90deg,#C9C9B0 1px, transparent 1px);
  background-size:16px 16px;
  font-family:"Courier New",ui-monospace,monospace;
}
html[data-theme="pixel"] body::after{ display:none; }
html[data-theme="pixel"] .app{ border:3px solid var(--px-line); border-radius:0; box-shadow:10px 10px 0 var(--px-line); }
html[data-theme="pixel"] .btn{ border:3px solid var(--px-line); border-radius:0; box-shadow:4px 4px 0 var(--px-line); }
html[data-theme="pixel"] .btn:active{ transform:translate(3px,3px); box-shadow:1px 1px 0 var(--px-line); }
html[data-theme="pixel"] .btn--soft{ background:#FFFFFF; }
html[data-theme="pixel"] .quick-bar,
html[data-theme="pixel"] .note-list,
html[data-theme="pixel"] .option-list,
html[data-theme="pixel"] .theme-grid,
html[data-theme="pixel"] .log-list,
html[data-theme="pixel"] .wrong-list,
html[data-theme="pixel"] .result-stats,
html[data-theme="pixel"] .report-nums,
html[data-theme="pixel"] .course-stats,
html[data-theme="pixel"] .study-card,
html[data-theme="pixel"] .q-card,
html[data-theme="pixel"] .doc-card,
html[data-theme="pixel"] .earn-list{ border:2px solid var(--px-line); border-radius:0; box-shadow:4px 4px 0 var(--px-line); }
html[data-theme="pixel"] .note-card,
html[data-theme="pixel"] .option,
html[data-theme="pixel"] .theme-card,
html[data-theme="pixel"] .log-row,
html[data-theme="pixel"] .wrong-item,
html[data-theme="pixel"] .dict-item,
html[data-theme="pixel"] .cg-row{ border-bottom:2px solid var(--px-line); }
html[data-theme="pixel"] .quick + .quick::before{ background:var(--px-line); width:2px; }
html[data-theme="pixel"] .chip{ border:2px solid var(--px-line); border-radius:0; box-shadow:2px 2px 0 var(--px-line); background:#fff; }
html[data-theme="pixel"] .chip.on{ background:var(--px-line); color:#F5F5E9; }
html[data-theme="pixel"] .swatch{ border-radius:0; border:2px solid var(--px-line); background:#fff; }
html[data-theme="pixel"] .swatch i{ border-radius:0; }
html[data-theme="pixel"] .swatch.on::after{ border-radius:0; }
html[data-theme="pixel"] .hero,
html[data-theme="pixel"] .reward-hero{ background:var(--px-line); border-radius:0; box-shadow:5px 5px 0 #E24A2A; }
html[data-theme="pixel"] .seg{ background:#fff; border:2px solid var(--px-line); border-radius:0; }
html[data-theme="pixel"] .seg button{ border-radius:0; }
html[data-theme="pixel"] .seg button.on{ background:var(--px-line); color:#F5F5E9; box-shadow:none; }
html[data-theme="pixel"] .topbar{ background:var(--paper); }
html[data-theme="pixel"] .toolbar{ background:var(--paper); border-top:3px solid var(--px-line); }
html[data-theme="pixel"] .tabbar{ background:var(--paper); border-top:3px solid var(--px-line); }
html[data-theme="pixel"] .blank{ border-radius:0; border-bottom:3px dashed var(--px-line); }
html[data-theme="pixel"] .pill,
html[data-theme="pixel"] .mode-tag{ border-radius:0; border:2px solid var(--px-line); }
html[data-theme="pixel"] .theme-preview{ border-radius:0; }
html[data-theme="pixel"] .theme-price{ border-radius:0; border:2px solid var(--px-line); }
html[data-theme="pixel"] .sheet-panel{ border-radius:0; border-top:3px solid var(--px-line); }
html[data-theme="pixel"] .sheet-btn{ border-radius:0; border:2px solid var(--px-line); }
html[data-theme="pixel"] .toast{ border-radius:0; border:2px solid #F5F5E9; }
html[data-theme="pixel"] .fab{ border-radius:0; border:3px solid var(--px-line); box-shadow:4px 4px 0 var(--px-line); }

/* ---- 波普艺术 ---- */
html[data-theme="pop"]{
  --paper:#FFF8EA; --paper-2:#FFE9B8; --card:#FFFFFF;
  --ink:#111111; --ink-2:#3A3A3A; --ink-3:#7A7A7A;
  --line:#111111; --brand:#FF3B5C; --brand-soft:#FFE1E8;
  --ring:#FFE94A;
  --hl-yellow:#FFE94A; --hl-green:#7CF2C4; --hl-pink:#FF9EC4; --hl-blue:#6FD3FF;
  --mk-yellow:rgba(255,233,74,.9); --mk-green:rgba(124,242,196,.85);
  --mk-pink:rgba(255,158,196,.85); --mk-blue:rgba(111,211,255,.85);
  --r-lg:8px; --r-md:8px; --r-sm:5px;
  --shadow-1:5px 5px 0 var(--pp-line); --shadow-2:7px 7px 0 var(--pp-line);
}
html[data-theme="pop"] body{
  background-color:#FFF3D6;
  background-image:radial-gradient(#FFC2D8 2px, transparent 2px);
  background-size:20px 20px;
}
html[data-theme="pop"] body::after{ display:none; }
html[data-theme="pop"] .app{ border:3px solid var(--pp-line); border-radius:14px; box-shadow:12px 12px 0 rgba(17,17,17,.85); }
html[data-theme="pop"] .hero{ background:#FFE94A; color:var(--pp-line); border:3px solid var(--pp-line); border-radius:10px; box-shadow:6px 6px 0 var(--pp-line); }
html[data-theme="pop"] .hero .hero-label,
html[data-theme="pop"] .hero .hero-tip{ color:rgba(17,17,17,.6); }
html[data-theme="pop"] .hero .hero-num em{ color:rgba(17,17,17,.55); }
html[data-theme="pop"] .hero-cta{ background:var(--pp-line); color:#FFE94A; }
html[data-theme="pop"] .ring{ background:conic-gradient(var(--brand) calc(var(--p) * 1%), var(--pp-line) 0); }
html[data-theme="pop"] .ring::before{ background:#FFE94A; }
html[data-theme="pop"] .ring span{ color:var(--pp-line); }
html[data-theme="pop"] .ring small{ color:rgba(17,17,17,.55); }
html[data-theme="pop"] .btn{ border:3px solid var(--pp-line); box-shadow:4px 4px 0 var(--pp-line); }
html[data-theme="pop"] .btn:active{ transform:translate(2px,2px); box-shadow:2px 2px 0 var(--pp-line); }
html[data-theme="pop"] .quick-bar,
html[data-theme="pop"] .note-list,
html[data-theme="pop"] .option-list,
html[data-theme="pop"] .theme-grid,
html[data-theme="pop"] .log-list,
html[data-theme="pop"] .wrong-list,
html[data-theme="pop"] .result-stats,
html[data-theme="pop"] .report-nums,
html[data-theme="pop"] .course-stats,
html[data-theme="pop"] .study-card,
html[data-theme="pop"] .q-card,
html[data-theme="pop"] .doc-card,
html[data-theme="pop"] .earn-list{ border:2px solid var(--pp-line); box-shadow:5px 5px 0 var(--pp-line); }
html[data-theme="pop"] .note-card,
html[data-theme="pop"] .option,
html[data-theme="pop"] .theme-card,
html[data-theme="pop"] .log-row,
html[data-theme="pop"] .wrong-item,
html[data-theme="pop"] .dict-item,
html[data-theme="pop"] .cg-row{ border-bottom:2px solid var(--pp-line); }
html[data-theme="pop"] .quick + .quick::before{ background:var(--pp-line); width:2px; }
html[data-theme="pop"] .note-stripe{ width:8px; }
html[data-theme="pop"] .fab{ background:#FF3B5C; border:3px solid var(--pp-line); border-radius:14px; box-shadow:4px 4px 0 var(--pp-line); }
html[data-theme="pop"] .chip.on{ background:#FF3B5C; color:#fff; border:2px solid var(--pp-line); }
html[data-theme="pop"] .seg{ background:#FFE9B8; border:2px solid var(--pp-line); }
html[data-theme="pop"] .seg button.on{ background:#fff; border:2px solid var(--pp-line); box-shadow:2px 2px 0 var(--pp-line); }
html[data-theme="pop"] .toolbar{ background:var(--paper); border-top:3px solid var(--pp-line); }
html[data-theme="pop"] .tabbar{ background:var(--paper); border-top:3px solid var(--pp-line); }
html[data-theme="pop"] .reward-hero{ background:var(--pp-line); }
html[data-theme="pop"] .sheet-panel{ border-top:3px solid var(--pp-line); }
html[data-theme="pop"] .theme-price.on{ background:#FF3B5C; color:#fff; }

/* ---- 毛玻璃（夜间为默认深空，日间为浅色磨砂） ---- */
html[data-theme="glass"]{
  --paper:#0E1524;
  --paper-2:rgba(255,255,255,.08);
  --card:rgba(255,255,255,.07);
  --ink:#F2F6FF; --ink-2:#C2CDE2; --ink-3:#8B97AF;
  --line:rgba(255,255,255,.15);
  --brand:#8AA6FF; --brand-soft:rgba(138,166,255,.16);
  --ring:#8AA6FF;
  --hl-yellow:#FFE066; --hl-green:#A0ECBE; --hl-pink:#FFAACD; --hl-blue:#96D2FF;
  --mk-yellow:rgba(255,224,102,.34); --mk-green:rgba(160,236,190,.32);
  --mk-pink:rgba(255,170,205,.32); --mk-blue:rgba(150,210,255,.32);
  --shadow-1:0 10px 30px -18px rgba(0,0,0,.9); --shadow-2:0 20px 50px -22px rgba(0,0,0,.95);
  --gl-app:rgba(255,255,255,.05);
  --gl-card:rgba(255,255,255,.06);
  --gl-line:rgba(255,255,255,.14);
  --gl-soft:rgba(255,255,255,.09);
  --gl-hero-a:rgba(255,255,255,.16); --gl-hero-b:rgba(255,255,255,.04);
  --gl-bar-top:rgba(14,21,36,.95); --gl-bar-fade:rgba(14,21,36,0);
  --gl-tab-a:rgba(10,15,28,.98); --gl-tab-b:rgba(10,15,28,0);
  --gl-tool-a:rgba(10,15,28,.97); --gl-tool-b:rgba(10,15,28,.4);
  --gl-panel:rgba(20,28,46,.96);
  --gl-input:rgba(255,255,255,.06);
  --gl-btn:#E8EEFF; --gl-btn-ink:#101827;
  --gl-chip-on:#F2F6FF; --gl-chip-on-ink:#101827;
  --gl-tip:rgba(138,166,255,.15); --gl-tip-ink:#BFD0FF;
  --gl-gold:rgba(255,224,102,.16); --gl-gold-ink:#FFE066;
  --bar-fade:var(--gl-tab-a); --bar-fade-2:var(--gl-tab-b);
}
html[data-scheme="day"][data-theme="glass"]{
  --paper:#EDF2FD;
  --paper-2:rgba(24,33,58,.06);
  --card:rgba(255,255,255,.62);
  --ink:#18213A; --ink-2:#4B5776; --ink-3:#7D89A5;
  --line:rgba(24,33,58,.16);
  --brand:#5B7BFF; --brand-soft:rgba(91,123,255,.12);
  --ring:#5B7BFF;
  --mk-yellow:rgba(255,224,102,.55); --mk-green:rgba(160,236,190,.5);
  --mk-pink:rgba(255,170,205,.5); --mk-blue:rgba(150,210,255,.5);
  --shadow-1:0 10px 28px -20px rgba(24,33,58,.45); --shadow-2:0 24px 50px -24px rgba(24,33,58,.35);
  --gl-app:rgba(255,255,255,.5);
  --gl-card:rgba(255,255,255,.6);
  --gl-line:rgba(24,33,58,.12);
  --gl-soft:rgba(255,255,255,.75);
  --gl-hero-a:rgba(255,255,255,.9); --gl-hero-b:rgba(214,227,255,.55);
  --gl-bar-top:rgba(237,242,253,.95); --gl-bar-fade:rgba(237,242,253,0);
  --gl-tab-a:rgba(237,242,253,.97); --gl-tab-b:rgba(237,242,253,0);
  --gl-tool-a:rgba(237,242,253,.97); --gl-tool-b:rgba(237,242,253,.4);
  --gl-panel:rgba(247,250,255,.97);
  --gl-input:rgba(24,33,58,.05);
  --gl-btn:#1B2740; --gl-btn-ink:#F4F8FF;
  --gl-chip-on:#1B2740; --gl-chip-on-ink:#F4F8FF;
  --gl-tip:rgba(91,123,255,.12); --gl-tip-ink:#3D5BD6;
  --gl-gold:rgba(169,122,11,.12); --gl-gold-ink:#8A6A00;
}
html[data-scheme="day"][data-theme="glass"] body{
  background:
    radial-gradient(820px 620px at 12% -10%, #CFE0FF 0%, rgba(207,224,255,0) 62%),
    radial-gradient(720px 520px at 92% 108%, #E8D6FF 0%, rgba(232,214,255,0) 60%),
    #F3F6FF;
}
html[data-scheme="day"][data-theme="glass"] body::after{ opacity:.18; }
html[data-theme="glass"] body{
  background:
    radial-gradient(820px 620px at 12% -10%, #2A3A73 0%, rgba(42,58,115,0) 62%),
    radial-gradient(720px 520px at 92% 108%, #4A2A66 0%, rgba(74,42,102,0) 60%),
    #070B16;
}
html[data-theme="glass"] body::after{ opacity:.12; }
html[data-theme="glass"] .app{
  background:var(--gl-app);
  border:1px solid var(--gl-line);
  backdrop-filter:blur(24px);
  box-shadow:0 40px 90px -40px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.08);
}
html[data-theme="glass"] .quick-bar,
html[data-theme="glass"] .note-list,
html[data-theme="glass"] .option-list,
html[data-theme="glass"] .theme-grid,
html[data-theme="glass"] .log-list,
html[data-theme="glass"] .wrong-list,
html[data-theme="glass"] .result-stats,
html[data-theme="glass"] .report-nums,
html[data-theme="glass"] .course-stats,
html[data-theme="glass"] .study-card,
html[data-theme="glass"] .q-card,
html[data-theme="glass"] .doc-card,
html[data-theme="glass"] .earn-list,
html[data-theme="glass"] .custom-panel{
  background:var(--gl-card);
  border-color:var(--gl-line);
  backdrop-filter:blur(10px);
}
html[data-theme="glass"] .note-card,
html[data-theme="glass"] .option,
html[data-theme="glass"] .theme-card,
html[data-theme="glass"] .log-row,
html[data-theme="glass"] .wrong-item,
html[data-theme="glass"] .dict-item,
html[data-theme="glass"] .cg-row,
html[data-theme="glass"] .cp-row{ border-bottom-color:var(--gl-line); }
html[data-theme="glass"] .hero,
html[data-theme="glass"] .reward-hero,
html[data-theme="glass"] .report-hero{
  background:linear-gradient(150deg, var(--gl-hero-a), var(--gl-hero-b));
  border:1px solid var(--gl-line);
  box-shadow:0 20px 50px -26px rgba(0,0,0,.45);
}
html[data-scheme="day"][data-theme="glass"] .hero,
html[data-scheme="day"][data-theme="glass"] .reward-hero,
html[data-scheme="day"][data-theme="glass"] .report-hero{ color:var(--ink); }
html[data-scheme="day"][data-theme="glass"] .hero-label,
html[data-scheme="day"][data-theme="glass"] .hero-tip,
html[data-scheme="day"][data-theme="glass"] .hero-num em,
html[data-scheme="day"][data-theme="glass"] .rw-badge small{ color:var(--ink-3); }
html[data-scheme="day"][data-theme="glass"] .hero-cta{ background:#1B2740; color:#F4F8FF; }
html[data-scheme="day"][data-theme="glass"] .ring{
  background:conic-gradient(var(--ring) calc(var(--p) * 1%), rgba(24,33,58,.12) 0);
}
html[data-scheme="day"][data-theme="glass"] .ring span{ color:var(--ink); }
html[data-theme="glass"] .ring::before{ background:var(--paper); }
html[data-theme="glass"] .ring small{ color:var(--ink-3); }
html[data-theme="glass"] .toolbar{
  background:linear-gradient(to top, var(--gl-tool-a) 62%, var(--gl-tool-b));
}
html[data-theme="glass"] .tabbar{
  background:linear-gradient(to top, var(--gl-tab-a) 55%, var(--gl-tab-b));
}
html[data-theme="glass"] .topbar{
  background:linear-gradient(to bottom, var(--gl-bar-top) 70%, var(--gl-bar-fade));
}
html[data-theme="glass"] .input,
html[data-theme="glass"] .textarea,
html[data-theme="glass"] .dict-in{ background:var(--gl-input); color:var(--ink); }
html[data-theme="glass"] .input::placeholder,
html[data-theme="glass"] .textarea::placeholder{ color:var(--ink-3); }
html[data-theme="glass"] .opt{ background:var(--gl-input); color:var(--ink); }
html[data-theme="glass"] .opt .k{ background:var(--gl-soft); color:var(--ink); }
html[data-theme="glass"] .seg{ background:var(--gl-input); }
html[data-theme="glass"] .seg button.on{ background:var(--gl-soft); color:var(--ink); }
html[data-theme="glass"] .chip{ background:var(--gl-input); color:var(--ink-2); }
html[data-theme="glass"] .chip.on{ background:var(--gl-chip-on); color:var(--gl-chip-on-ink); }
html[data-theme="glass"] .btn{ background:var(--gl-btn); color:var(--gl-btn-ink); }
html[data-theme="glass"] .btn--brand{ background:var(--brand); color:#FFFFFF; }
html[data-theme="glass"] .btn--soft{ background:var(--gl-soft); color:var(--ink); border-color:var(--gl-line); }
html[data-theme="glass"] .btn--ghost{ color:var(--ink); }
html[data-theme="glass"] .sheet-panel{ background:var(--gl-panel); backdrop-filter:blur(24px); }
html[data-theme="glass"] .sheet-btn{ background:var(--gl-input); color:var(--ink); border-color:var(--gl-line); }
html[data-theme="glass"] .tipbar{ background:var(--gl-tip); color:var(--gl-tip-ink); }
html[data-theme="glass"] .tips-card{
  background:var(--gl-card); border-color:var(--gl-line); color:var(--ink-2);
}
html[data-theme="glass"] .q-feedback,
html[data-theme="glass"] .wrong-item{ background:var(--gl-card); border-color:var(--gl-line); color:var(--ink-2); }
html[data-theme="glass"] .note-stripe{ opacity:.9; }
html[data-theme="glass"] .theme-card.on{ box-shadow:inset 0 0 0 2px var(--ink); }
html[data-theme="glass"] .brand-mark{ background:var(--ink); color:var(--paper); }
html[data-theme="glass"] .theme-card.previewing{ box-shadow:inset 3px 0 0 var(--brand); }
html[data-theme="glass"] .cp-hint,
html[data-theme="glass"] .cp-hint-row,
html[data-theme="glass"] .theme-group-head{ background:var(--gl-input); border-color:var(--gl-line); }
html[data-theme="glass"] .coin-pill{ background:var(--gl-gold); color:var(--gl-gold-ink); border-color:var(--gl-line); }
html[data-theme="glass"] .gain-line{ background:var(--gl-gold); color:var(--gl-gold-ink); }
html[data-theme="glass"] .sc-example mark.hl,
html[data-theme="glass"] .sc-example mark.hl-yellow,
html[data-theme="glass"] .sc-example mark.hl-green,
html[data-theme="glass"] .sc-example mark.hl-pink,
html[data-theme="glass"] .sc-example mark.hl-blue{ background:rgba(255,224,102,.3); }

/* ---- 横线本 ---- */
html[data-theme="lined"]{
  --paper:#FBF9F2; --paper-2:#F1EDE1; --card:#FFFEFA;
  --ink:#25272B; --ink-2:#5E6470; --ink-3:#969BA5;
  --line:#DCE2E8; --line-soft:#E9EDF1;
  --brand:#3E6FA8; --brand-soft:#E8F0F8;
  --ring:#A9C9E8;
  --hl-yellow:#FFE066; --hl-green:#C4E8A8; --hl-pink:#FFC6DA; --hl-blue:#B6DFFF;
  --mk-yellow:rgba(255,224,102,.8); --mk-green:rgba(196,232,168,.85);
  --mk-pink:rgba(255,198,218,.85); --mk-blue:rgba(182,223,255,.85);
  --r-lg:12px; --r-md:10px; --r-sm:7px;
  --bar-fade:rgba(251,249,242,.98); --bar-fade-2:rgba(251,249,242,0);
}
html[data-theme="lined"] body{ background:#E9E6DC; }
html[data-theme="lined"] .app{
  background-image:repeating-linear-gradient(to bottom, transparent 0 27px, rgba(120,155,190,.18) 27px 28px);
  background-position:0 18px;
}
html[data-theme="lined"] .hero,
html[data-theme="lined"] .reward-hero,
html[data-theme="lined"] .report-hero{ background:linear-gradient(150deg,#2C3E52,#1E2B3A); }
html[data-theme="lined"] .note-list,
html[data-theme="lined"] .theme-grid,
html[data-theme="lined"] .option-list,
html[data-theme="lined"] .log-list,
html[data-theme="lined"] .earn-list,
html[data-theme="lined"] .custom-panel,
html[data-theme="lined"] .quick-bar,
html[data-theme="lined"] .course-stats,
html[data-theme="lined"] .result-stats{ background:rgba(255,255,252,.8); }
html[data-theme="lined"] .fab{ background:#3E6FA8; box-shadow:0 14px 26px -10px rgba(62,111,168,.65); }
html[data-theme="lined"] .brand-mark{ background:#3E6FA8; }

/* ---- 方格本 ---- */
html[data-theme="grid"]{
  --paper:#FCFBF6; --paper-2:#F0EFE6; --card:#FFFEFB;
  --ink:#23282C; --ink-2:#59636B; --ink-3:#929CA3;
  --line:#DDE5E2; --line-soft:#EBF0ED;
  --brand:#4C7F6A; --brand-soft:#E5F2EC;
  --ring:#A6D6C2;
  --hl-yellow:#FFE066; --hl-green:#BDEBA8; --hl-pink:#FFC6DA; --hl-blue:#B6DFFF;
  --mk-yellow:rgba(255,224,102,.8); --mk-green:rgba(189,235,168,.85);
  --mk-pink:rgba(255,198,218,.85); --mk-blue:rgba(182,223,255,.85);
  --r-lg:10px; --r-md:9px; --r-sm:5px;
  --bar-fade:rgba(252,251,246,.98); --bar-fade-2:rgba(252,251,246,0);
}
html[data-theme="grid"] body{ background:#E8E8DF; }
html[data-theme="grid"] .app{
  background-image:
    linear-gradient(rgba(120,150,140,.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,150,140,.14) 1px, transparent 1px);
  background-size:22px 22px;
}
html[data-theme="grid"] .hero,
html[data-theme="grid"] .reward-hero,
html[data-theme="grid"] .report-hero{ background:linear-gradient(150deg,#2B3B35,#1B2723); }
html[data-theme="grid"] .note-list,
html[data-theme="grid"] .theme-grid,
html[data-theme="grid"] .option-list,
html[data-theme="grid"] .log-list,
html[data-theme="grid"] .earn-list,
html[data-theme="grid"] .custom-panel,
html[data-theme="grid"] .quick-bar,
html[data-theme="grid"] .course-stats,
html[data-theme="grid"] .result-stats{ background:rgba(255,255,251,.8); }
html[data-theme="grid"] .fab{ background:#4C7F6A; box-shadow:0 14px 26px -10px rgba(76,127,106,.65); }
html[data-theme="grid"] .brand-mark{ background:#4C7F6A; }

/* ---- 手写记号本 ---- */
html[data-theme="memo"]{
  --paper:#FFF6D8; --paper-2:#F9ECC0; --card:#FFFCF0;
  --ink:#3B3222; --ink-2:#6F6350; --ink-3:#A2937A;
  --line:#E3D2A2; --line-soft:#F1E5C2;
  --brand:#D2622E; --brand-soft:#FBE7D6;
  --ring:#FFD86B;
  --hl-yellow:#FFD95C; --hl-green:#BFE39B; --hl-pink:#FFB9CE; --hl-blue:#AEDCFF;
  --mk-yellow:rgba(255,217,92,.8); --mk-green:rgba(191,227,155,.85);
  --mk-pink:rgba(255,185,206,.85); --mk-blue:rgba(174,220,255,.85);
  --r-lg:14px; --r-md:12px; --r-sm:7px;
  --bar-fade:rgba(255,246,216,.98); --bar-fade-2:rgba(255,246,216,0);
}
html[data-theme="memo"] body{ background:#F0E4C4; }
html[data-theme="memo"] .app{
  font-family:"Kaiti SC","STKaiti","KaiTi","Songti SC",serif;
  background-image:radial-gradient(rgba(150,120,60,.09) 1px, transparent 1px);
  background-size:16px 16px;
}
html[data-theme="memo"] .hero,
html[data-theme="memo"] .reward-hero,
html[data-theme="memo"] .report-hero{ background:linear-gradient(150deg,#4A3B22,#2E2415); }
html[data-theme="memo"] .note-list,
html[data-theme="memo"] .theme-grid,
html[data-theme="memo"] .option-list,
html[data-theme="memo"] .log-list,
html[data-theme="memo"] .earn-list,
html[data-theme="memo"] .custom-panel,
html[data-theme="memo"] .quick-bar,
html[data-theme="memo"] .course-stats,
html[data-theme="memo"] .result-stats{
  border-style:dashed; border-color:#E1CB92; background:rgba(255,252,240,.82);
}
html[data-theme="memo"] .note-card,
html[data-theme="memo"] .theme-card,
html[data-theme="memo"] .option,
html[data-theme="memo"] .log-row,
html[data-theme="memo"] .wrong-item,
html[data-theme="memo"] .dict-item,
html[data-theme="memo"] .cg-row{ border-bottom-style:dashed; border-bottom-color:#EDDDB4; }
html[data-theme="memo"] .fab{ background:#D2622E; box-shadow:0 14px 26px -10px rgba(210,98,46,.6); }
html[data-theme="memo"] .brand-mark{ background:#D2622E; color:#FFF6D8; }

/* ---- 古风 ---- */
html[data-theme="guofeng"]{
  --paper:#F4EDDD; --paper-2:#EADFC8; --card:#FBF6E9;
  --ink:#2B2620; --ink-2:#655A48; --ink-3:#998C75;
  --line:#DCCDB0; --line-soft:#E9DFC9;
  --brand:#A83A26; --brand-soft:#F6E3DD;
  --ring:#C9A961;
  --hl-yellow:#F2DE9B; --hl-green:#C9DBA8; --hl-pink:#EDC3BE; --hl-blue:#B9CFDA;
  --mk-yellow:rgba(242,222,155,.85); --mk-green:rgba(201,219,168,.85);
  --mk-pink:rgba(237,195,190,.85); --mk-blue:rgba(185,207,218,.85);
  --r-lg:8px; --r-md:8px; --r-sm:5px;
  --bar-fade:rgba(244,237,221,.98); --bar-fade-2:rgba(244,237,221,0);
}
html[data-theme="guofeng"] body{
  background:radial-gradient(800px 600px at 20% 0%, #FBF6E8 0%, rgba(251,246,232,0) 60%), #E3D9C2;
}
html[data-theme="guofeng"] .app{
  font-family:"Songti SC","STSong","SimSun","Noto Serif SC",serif;
  background-image:
    radial-gradient(circle at 18% 12%, rgba(60,50,35,.06), transparent 42%),
    radial-gradient(circle at 82% 88%, rgba(60,50,35,.06), transparent 46%);
  border-color:#D8C9AC;
}
html[data-theme="guofeng"] .home-head h1,
html[data-theme="guofeng"] .brandline h1{ letter-spacing:.14em; font-weight:600; }
html[data-theme="guofeng"] .brand-mark{
  background:#A83A26; color:#F6E7C8; border-radius:3px; transform:none;
  font-family:"Songti SC","SimSun",serif;
}
html[data-theme="guofeng"] .hero,
html[data-theme="guofeng"] .reward-hero,
html[data-theme="guofeng"] .report-hero{ background:linear-gradient(150deg,#3A3328,#241F18); }
html[data-theme="guofeng"] .btn{ border-radius:4px; }
html[data-theme="guofeng"] .chip{ border-radius:4px; }
html[data-theme="guofeng"] .note-list,
html[data-theme="guofeng"] .theme-grid,
html[data-theme="guofeng"] .option-list,
html[data-theme="guofeng"] .log-list,
html[data-theme="guofeng"] .earn-list,
html[data-theme="guofeng"] .custom-panel,
html[data-theme="guofeng"] .quick-bar,
html[data-theme="guofeng"] .course-stats,
html[data-theme="guofeng"] .result-stats{ border-radius:6px; }
html[data-theme="guofeng"] .fab{ background:#A83A26; box-shadow:0 14px 26px -10px rgba(168,58,38,.6); }
html[data-theme="guofeng"] .note-stripe{ opacity:.5; }

/* ---- 赛博朋克 ---- */
html[data-theme="cyber"]{
  --paper:#F1F4FF; --paper-2:#E2E8FA; --card:#FFFFFF;
  --ink:#121624; --ink-2:#4A5470; --ink-3:#8A93AD;
  --line:#C9D4F0; --line-soft:#E2E8F8;
  --brand:#FF2E88; --brand-soft:#FFE3F0;
  --ring:#33E1FF;
  --hl-yellow:#FFE94A; --hl-green:#5CF2D6; --hl-pink:#FF9ED8; --hl-blue:#6EE7FF;
  --mk-yellow:rgba(255,233,74,.42); --mk-green:rgba(92,242,214,.34);
  --mk-pink:rgba(255,158,216,.38); --mk-blue:rgba(110,231,255,.34);
  --r-lg:14px; --r-md:12px; --r-sm:8px;
  --bar-fade:rgba(241,244,255,.97); --bar-fade-2:rgba(241,244,255,0);
}
html[data-theme="cyber"] body{
  background:
    radial-gradient(700px 520px at 8% -10%, #C9F3FF 0%, rgba(201,243,255,0) 62%),
    radial-gradient(640px 480px at 96% 106%, #FFD3EA 0%, rgba(255,211,234,0) 60%),
    #E7EBF9;
}
html[data-theme="cyber"] .app{
  font-family:"JetBrains Mono","Courier New",ui-monospace,monospace;
  border-color:#B9C6EC;
  box-shadow:0 0 0 1px rgba(255,46,136,.18), 0 34px 80px -40px rgba(80,40,160,.5);
}
html[data-theme="cyber"] .hero,
html[data-theme="cyber"] .reward-hero,
html[data-theme="cyber"] .report-hero{
  background:linear-gradient(140deg,#161B33 0%,#2A1140 55%,#08222E 100%);
  border:1px solid rgba(51,225,255,.35);
  box-shadow:0 0 26px -6px rgba(51,225,255,.35), inset 0 0 40px rgba(255,46,136,.14);
}
html[data-theme="cyber"] .hero-cta{ background:#33E1FF; color:#08111C; }
html[data-theme="cyber"] .ring{ background:conic-gradient(var(--brand) calc(var(--p) * 1%), rgba(18,22,36,.12) 0); }
html[data-theme="cyber"] .ring::before{ background:#101528; }
html[data-theme="cyber"] .ring small{ color:rgba(242,246,255,.6); }
html[data-theme="cyber"] .fab{
  background:linear-gradient(140deg,#FF2E88,#8A2BFF);
  box-shadow:0 0 26px -4px rgba(255,46,136,.7);
}
html[data-theme="cyber"] .btn--brand{ background:linear-gradient(135deg,#FF2E88,#B02BFF); }
html[data-theme="cyber"] .chip.on{ background:#121624; color:#33E1FF; }
html[data-theme="cyber"] .brand-mark{ background:#121624; color:#33E1FF; box-shadow:0 0 0 1px rgba(51,225,255,.45); }

/* ---- 自定义风格（变量由 JS 写入） ---- */
html[data-theme="custom"]{
  --paper:#FBF7EE; --paper-2:#F2ECDD; --card:#FFFFFF;
  --ink:#2A2620; --ink-2:#6B6355; --ink-3:#9A9282;
  --line:#E4DACA; --line-soft:#F0E9DC;
  --brand:#C4623A; --brand-soft:#F8E9E1;
  --ring:#FFD86B;
  --hl-yellow:#FFE066; --hl-green:#B9EC8E; --hl-pink:#FFC2D8; --hl-blue:#A6DCFF;
  --mk-yellow:rgba(255,224,102,.85); --mk-green:rgba(185,236,142,.85);
  --mk-pink:rgba(255,194,216,.88); --mk-blue:rgba(166,220,255,.88);
  --bar-fade:rgba(251,247,238,.98); --bar-fade-2:rgba(251,247,238,0);
}
html[data-theme="custom"] body{
  background:radial-gradient(900px 700px at 10% -8%, #FFFDF6 0%, rgba(255,253,246,0) 60%), #E9E2D3;
}
html[data-theme="custom"] .app{
  font-family:var(--user-font, "PingFang SC","Microsoft YaHei",system-ui,sans-serif);
  font-weight:var(--user-weight, 400);
}
html[data-theme="custom"] .app b,
html[data-theme="custom"] .app strong,
html[data-theme="custom"] .app h1,
html[data-theme="custom"] .app h2,
html[data-theme="custom"] .app h3{ font-weight:var(--user-strong, 600); }
html[data-theme="custom"][data-bg="line"] .app{
  background-image:repeating-linear-gradient(to bottom, transparent 0 27px, rgba(120,150,180,.22) 27px 28px);
  background-position:0 42px;
}
html[data-theme="custom"][data-bg="grid"] .app{
  background-image:
    linear-gradient(rgba(120,150,180,.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,150,180,.18) 1px, transparent 1px);
  background-size:24px 24px;
}
html[data-theme="custom"][data-bg="paper"] .app{
  background-image:
    radial-gradient(rgba(120,100,70,.09) 1px, transparent 1px),
    radial-gradient(rgba(120,100,70,.06) 1px, transparent 1px);
  background-size:18px 18px, 26px 26px;
  background-position:0 0, 9px 13px;
}
html[data-theme="custom"][data-bg="image"] .app{
  background-image:linear-gradient(rgba(255,252,245,.88), rgba(255,252,245,.93)), var(--user-bg, none);
  background-size:cover, cover;
  background-position:center, center;
}
html[data-theme="custom"][data-bg="image"] .hero,
html[data-theme="custom"][data-bg="image"] .reward-hero,
html[data-theme="custom"][data-bg="image"] .report-hero{ background:linear-gradient(150deg,#2A2620,#1A1713); }

/* ============================================================
   夜间配色（每个风格各一套）
   ============================================================ */
html[data-scheme="dark"][data-theme="paper"]{
  --paper:#1B1915; --paper-2:#242019; --card:#232019;
  --ink:#F2ECE0; --ink-2:#BCB4A3; --ink-3:#8B8373;
  --line:#372F26; --line-soft:#2C261E;
  --brand:#E86C43; --brand-soft:#3A2419;
  --ring:#F0C75E;
  --hl-yellow:#E8C94F; --hl-green:#93CC6D; --hl-pink:#E79CBB; --hl-blue:#7DBEE4;
  --mk-yellow:rgba(232,201,79,.26); --mk-green:rgba(147,204,109,.24);
  --mk-pink:rgba(231,156,187,.24); --mk-blue:rgba(125,190,228,.24);
  --bar-fade:rgba(27,25,21,.98); --bar-fade-2:rgba(27,25,21,0);
}
html[data-scheme="dark"][data-theme="paper"] body{
  background:
    radial-gradient(900px 640px at 10% -8%, #2A2519 0%, rgba(42,37,25,0) 62%),
    #0F0D0B;
}
html[data-scheme="dark"][data-theme="paper"] body::after{
  opacity:.3; background-image:radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
}
html[data-scheme="dark"][data-theme="paper"] .app{
  border-color:#332C22;
  box-shadow:0 40px 90px -40px rgba(0,0,0,.85), inset 0 0 0 1px rgba(255,255,255,.03);
}
html[data-scheme="dark"][data-theme="paper"] .hero,
html[data-scheme="dark"][data-theme="paper"] .reward-hero,
html[data-scheme="dark"][data-theme="paper"] .report-hero{ background:linear-gradient(150deg,#2A251E,#191612); }

html[data-scheme="dark"][data-theme="fresh"]{
  --paper:#131C18; --paper-2:#1B2620; --card:#19231E;
  --ink:#E7F3EC; --ink-2:#A9C1B3; --ink-3:#7A9186;
  --line:#27372E; --line-soft:#203027;
  --brand:#5CC79A; --brand-soft:rgba(92,199,154,.14);
  --ring:#5CC79A;
  --hl-yellow:#D9D06B; --hl-green:#8FD0A5; --hl-pink:#E9A9C4; --hl-blue:#8CC4E6;
  --mk-yellow:rgba(217,208,107,.24); --mk-green:rgba(143,208,165,.24);
  --mk-pink:rgba(233,169,196,.24); --mk-blue:rgba(140,196,230,.24);
  --bar-fade:rgba(19,28,24,.98); --bar-fade-2:rgba(19,28,24,0);
}
html[data-scheme="dark"][data-theme="fresh"] body{
  background:linear-gradient(160deg,#0C1411 0%,#0A100E 55%,#0B1017 100%);
}
html[data-scheme="dark"][data-theme="fresh"] .app{
  border-color:#243329; box-shadow:0 30px 70px -42px rgba(0,0,0,.9);
}
html[data-scheme="dark"][data-theme="fresh"] .hero,
html[data-scheme="dark"][data-theme="fresh"] .reward-hero,
html[data-scheme="dark"][data-theme="fresh"] .report-hero{ background:linear-gradient(150deg,#2F7C5E,#1B4C39); }
html[data-scheme="dark"][data-theme="fresh"] .ring::before{ background:#173D2E; }

html[data-scheme="dark"][data-theme="lined"]{
  --paper:#12161C; --paper-2:#1A2029; --card:#171C24;
  --ink:#E6ECF4; --ink-2:#A7B3C4; --ink-3:#7B8797;
  --line:#2A3542; --line-soft:#212A35;
  --brand:#6FA8E8; --brand-soft:rgba(111,168,232,.16);
  --ring:#6FA8E8;
  --hl-yellow:#D9CE62; --hl-green:#8FC98F; --hl-pink:#E6A3BE; --hl-blue:#8CC2E8;
  --mk-yellow:rgba(217,206,98,.26); --mk-green:rgba(143,201,143,.24);
  --mk-pink:rgba(230,163,190,.24); --mk-blue:rgba(140,194,232,.24);
  --bar-fade:rgba(18,22,28,.98); --bar-fade-2:rgba(18,22,28,0);
}
html[data-scheme="dark"][data-theme="lined"] body{ background:#090C10; }
html[data-scheme="dark"][data-theme="lined"] .app{
  background-image:repeating-linear-gradient(to bottom, transparent 0 27px, rgba(111,168,232,.14) 27px 28px);
  background-position:0 18px; border-color:#222C38;
}
html[data-scheme="dark"][data-theme="lined"] .note-list,
html[data-scheme="dark"][data-theme="lined"] .theme-grid,
html[data-scheme="dark"][data-theme="lined"] .option-list,
html[data-scheme="dark"][data-theme="lined"] .log-list,
html[data-scheme="dark"][data-theme="lined"] .earn-list,
html[data-scheme="dark"][data-theme="lined"] .custom-panel,
html[data-scheme="dark"][data-theme="lined"] .quick-bar,
html[data-scheme="dark"][data-theme="lined"] .course-stats,
html[data-scheme="dark"][data-theme="lined"] .result-stats{ background:rgba(23,28,36,.82); }

html[data-scheme="dark"][data-theme="grid"]{
  --paper:#171A18; --paper-2:#1F2320; --card:#1B1F1C;
  --ink:#E7EEE9; --ink-2:#A8B5AC; --ink-3:#7C8A80;
  --line:#2B3730; --line-soft:#222C26;
  --brand:#5FA88F; --brand-soft:rgba(95,168,143,.16);
  --ring:#5FA88F;
  --hl-yellow:#D6CC68; --hl-green:#95CB8F; --hl-pink:#E4A6BF; --hl-blue:#8CC4E0;
  --mk-yellow:rgba(214,204,104,.26); --mk-green:rgba(149,203,143,.24);
  --mk-pink:rgba(228,166,191,.24); --mk-blue:rgba(140,196,224,.24);
  --bar-fade:rgba(23,26,24,.98); --bar-fade-2:rgba(23,26,24,0);
}
html[data-scheme="dark"][data-theme="grid"] body{ background:#0B0D0C; }
html[data-scheme="dark"][data-theme="grid"] .app{
  background-image:
    linear-gradient(rgba(95,168,143,.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95,168,143,.13) 1px, transparent 1px);
  background-size:22px 22px; border-color:#28332C;
}
html[data-scheme="dark"][data-theme="grid"] .note-list,
html[data-scheme="dark"][data-theme="grid"] .theme-grid,
html[data-scheme="dark"][data-theme="grid"] .option-list,
html[data-scheme="dark"][data-theme="grid"] .log-list,
html[data-scheme="dark"][data-theme="grid"] .earn-list,
html[data-scheme="dark"][data-theme="grid"] .custom-panel,
html[data-scheme="dark"][data-theme="grid"] .quick-bar,
html[data-scheme="dark"][data-theme="grid"] .course-stats,
html[data-scheme="dark"][data-theme="grid"] .result-stats{ background:rgba(27,31,28,.82); }

html[data-scheme="dark"][data-theme="memo"]{
  --paper:#1D1A12; --paper-2:#262218; --card:#231F15;
  --ink:#F2E8CE; --ink-2:#C0B394; --ink-3:#8E8266;
  --line:#3B3527; --line-soft:#2F2A1E;
  --brand:#E8935A; --brand-soft:rgba(232,147,90,.16);
  --ring:#F0C75E;
  --hl-yellow:#DECB63; --hl-green:#A5CC83; --hl-pink:#E7A0B7; --hl-blue:#8FC4E0;
  --mk-yellow:rgba(222,203,99,.24); --mk-green:rgba(165,204,131,.22);
  --mk-pink:rgba(231,160,183,.22); --mk-blue:rgba(143,196,224,.22);
  --bar-fade:rgba(29,26,18,.98); --bar-fade-2:rgba(29,26,18,0);
}
html[data-scheme="dark"][data-theme="memo"] body{ background:#0F0D09; }
html[data-scheme="dark"][data-theme="memo"] .app{
  background-image:radial-gradient(rgba(240,230,200,.05) 1px, transparent 1px);
  background-size:16px 16px; border-color:#332D20;
}
html[data-scheme="dark"][data-theme="memo"] .note-list,
html[data-scheme="dark"][data-theme="memo"] .theme-grid,
html[data-scheme="dark"][data-theme="memo"] .option-list,
html[data-scheme="dark"][data-theme="memo"] .log-list,
html[data-scheme="dark"][data-theme="memo"] .earn-list,
html[data-scheme="dark"][data-theme="memo"] .custom-panel,
html[data-scheme="dark"][data-theme="memo"] .quick-bar,
html[data-scheme="dark"][data-theme="memo"] .course-stats,
html[data-scheme="dark"][data-theme="memo"] .result-stats{
  background:rgba(35,31,21,.82); border-color:#3B3527;
}
html[data-scheme="dark"][data-theme="memo"] .note-card,
html[data-scheme="dark"][data-theme="memo"] .theme-card,
html[data-scheme="dark"][data-theme="memo"] .option,
html[data-scheme="dark"][data-theme="memo"] .log-row,
html[data-scheme="dark"][data-theme="memo"] .wrong-item,
html[data-scheme="dark"][data-theme="memo"] .dict-item,
html[data-scheme="dark"][data-theme="memo"] .cg-row{ border-bottom-color:var(--line-soft); }

html[data-scheme="dark"][data-theme="guofeng"]{
  --paper:#171310; --paper-2:#201A14; --card:#1D1811;
  --ink:#EFE4CC; --ink-2:#BAAC90; --ink-3:#8A7D64;
  --line:#3A3026; --line-soft:#2C251C;
  --brand:#D0573D; --brand-soft:rgba(208,87,61,.16);
  --ring:#C9A961;
  --hl-yellow:#D8C36F; --hl-green:#A9C089; --hl-pink:#DDA79F; --hl-blue:#9BB9C7;
  --mk-yellow:rgba(216,195,111,.26); --mk-green:rgba(169,192,137,.22);
  --mk-pink:rgba(221,167,159,.22); --mk-blue:rgba(155,185,199,.22);
  --bar-fade:rgba(23,19,16,.98); --bar-fade-2:rgba(23,19,16,0);
}
html[data-scheme="dark"][data-theme="guofeng"] body{
  background:radial-gradient(700px 560px at 20% 0%, #2A2318 0%, rgba(42,35,24,0) 62%), #0C0A07;
}
html[data-scheme="dark"][data-theme="guofeng"] .app{
  background-image:
    radial-gradient(circle at 18% 12%, rgba(230,215,180,.05), transparent 42%),
    radial-gradient(circle at 82% 88%, rgba(230,215,180,.05), transparent 46%);
  border-color:#332B21;
}
html[data-scheme="dark"][data-theme="guofeng"] .hero,
html[data-scheme="dark"][data-theme="guofeng"] .reward-hero,
html[data-scheme="dark"][data-theme="guofeng"] .report-hero{ background:linear-gradient(150deg,#2E281F,#181410); }

html[data-scheme="dark"][data-theme="pixel"]{
  --px-line:#E8E4CE;
  --paper:#1F1E17; --paper-2:#2A2920; --card:#26251D;
  --ink:#F3F0DE; --ink-2:#C6C2AC; --ink-3:#8E8B78;
  --line:var(--px-line); --line-soft:#3A382C;
  --brand:#FF6B4A; --brand-soft:#3A231B;
  --ring:#F2E85C;
  --hl-yellow:#F2E85C; --hl-green:#8CE78C; --hl-pink:#FFB0CE; --hl-blue:#97D9FF;
  --mk-yellow:rgba(242,232,92,.28); --mk-green:rgba(140,231,140,.24);
  --mk-pink:rgba(255,176,206,.24); --mk-blue:rgba(151,217,255,.24);
  --shadow-1:4px 4px 0 var(--px-line); --shadow-2:6px 6px 0 var(--px-line);
}
html[data-scheme="dark"][data-theme="pixel"] body{
  background-color:#141310;
  background-image:linear-gradient(#26251C 1px, transparent 1px), linear-gradient(90deg,#26251C 1px, transparent 1px);
  background-size:16px 16px;
}
html[data-scheme="dark"][data-theme="pixel"] .app{
  border-color:var(--px-line);
  box-shadow:10px 10px 0 rgba(0,0,0,.6), 0 0 0 3px var(--px-line);
}
html[data-scheme="dark"][data-theme="pixel"] .btn--soft{ background:#2E2C22; color:var(--ink); }
html[data-scheme="dark"][data-theme="pixel"] .chip{ background:#2A2920; color:var(--ink-2); }
html[data-scheme="dark"][data-theme="pixel"] .chip.on{ background:var(--px-line); color:#1F1E17; }
html[data-scheme="dark"][data-theme="pixel"] .seg{ background:#2A2920; }
html[data-scheme="dark"][data-theme="pixel"] .seg button.on{ background:var(--px-line); color:#1F1E17; }
html[data-scheme="dark"][data-theme="pixel"] .hero,
html[data-scheme="dark"][data-theme="pixel"] .reward-hero{ background:#0F0F0B; box-shadow:5px 5px 0 #FF6B4A; }
html[data-scheme="dark"][data-theme="pixel"] .theme-preview .theme-info small{ color:var(--ink-3); }

html[data-scheme="dark"][data-theme="pop"]{
  --pp-line:#F5EFE0;
  --paper:#141318; --paper-2:#211F27; --card:#1B1A21;
  --ink:#F5EFE0; --ink-2:#C3BDB0; --ink-3:#8F897D;
  --line:var(--pp-line); --line-soft:#302E38;
  --brand:#FF4D6D; --brand-soft:#3A1B24;
  --ring:#FFE94A;
  --mk-yellow:rgba(255,233,74,.28); --mk-green:rgba(124,242,196,.24);
  --mk-pink:rgba(255,158,196,.24); --mk-blue:rgba(111,211,255,.24);
  --shadow-1:5px 5px 0 var(--pp-line); --shadow-2:7px 7px 0 var(--pp-line);
}
html[data-scheme="dark"][data-theme="pop"] body{
  background-color:#0D0C10;
  background-image:radial-gradient(rgba(255,194,216,.16) 2px, transparent 2px);
  background-size:20px 20px;
}
html[data-scheme="dark"][data-theme="pop"] .app{
  border-color:var(--pp-line);
  box-shadow:12px 12px 0 rgba(0,0,0,.65), 0 0 0 3px var(--pp-line);
}
html[data-scheme="dark"][data-theme="pop"] .hero{ background:#FFE94A; color:#111; }
html[data-scheme="dark"][data-theme="pop"] .hero-cta{ background:#111; color:#FFE94A; }
html[data-scheme="dark"][data-theme="pop"] .ring{ background:conic-gradient(var(--brand) calc(var(--p) * 1%), #111 0); }
html[data-scheme="dark"][data-theme="pop"] .ring span{ color:#111; }
html[data-scheme="dark"][data-theme="pop"] .ring small{ color:rgba(17,17,17,.55); }
html[data-scheme="dark"][data-theme="pop"] .seg{ background:#211F27; border:2px solid var(--pp-line); }
html[data-scheme="dark"][data-theme="pop"] .seg button.on{ background:#F5EFE0; color:#141318; border:2px solid var(--pp-line); }
html[data-scheme="dark"][data-theme="pop"] .reward-hero{ background:#0F0E12; border:3px solid var(--pp-line); }
html[data-scheme="dark"][data-theme="pop"] .theme-price.on{ background:#FF4D6D; color:#fff; }

html[data-scheme="dark"][data-theme="cyber"]{
  --paper:#080B14; --paper-2:#111624; --card:#0E1422;
  --ink:#E8F4FF; --ink-2:#9FB2CC; --ink-3:#657891;
  --line:#22304A; --line-soft:#182238;
  --brand:#FF2E88; --brand-soft:rgba(255,46,136,.16);
  --ring:#33E1FF;
  --hl-yellow:#FFE94A; --hl-green:#5CF2D6; --hl-pink:#FF9ED8; --hl-blue:#6EE7FF;
  --mk-yellow:rgba(255,233,74,.26); --mk-green:rgba(92,242,214,.22);
  --mk-pink:rgba(255,158,216,.24); --mk-blue:rgba(110,231,255,.22);
  --bar-fade:rgba(8,11,20,.98); --bar-fade-2:rgba(8,11,20,0);
}
html[data-scheme="dark"][data-theme="cyber"] body{
  background:
    radial-gradient(760px 560px at 8% -12%, rgba(51,225,255,.18) 0%, rgba(51,225,255,0) 60%),
    radial-gradient(700px 520px at 96% 108%, rgba(255,46,136,.18) 0%, rgba(255,46,136,0) 58%),
    #03050A;
}
html[data-scheme="dark"][data-theme="cyber"] .app{
  border-color:#22304A;
  background-image:
    linear-gradient(rgba(51,225,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(51,225,255,.05) 1px, transparent 1px);
  background-size:28px 28px;
  box-shadow:0 0 0 1px rgba(51,225,255,.22), 0 40px 90px -40px rgba(0,0,0,.9);
}
html[data-scheme="dark"][data-theme="cyber"] .chip.on{ background:#33E1FF; color:#08111C; }
html[data-scheme="dark"][data-theme="cyber"] .seg{ background:#111624; }
html[data-scheme="dark"][data-theme="cyber"] .seg button.on{ background:#33E1FF; color:#08111C; }
html[data-scheme="dark"][data-theme="cyber"] .ring{ background:conic-gradient(var(--brand) calc(var(--p) * 1%), rgba(232,244,255,.14) 0); }
html[data-scheme="dark"][data-theme="cyber"] .ring span{ color:var(--ink); }

html[data-scheme="dark"][data-theme="custom"]{
  --paper:#1C1A16; --paper-2:#25221C; --card:#26231D;
  --ink:#EFE9DC; --ink-2:#B8B0A0; --ink-3:#877F70;
  --line:#37322A; --line-soft:#2C2822;
  --brand:#E07B52; --brand-soft:#3A261C;
  --ring:#F0C75E;
  --mk-yellow:rgba(255,224,102,.26); --mk-green:rgba(185,236,142,.22);
  --mk-pink:rgba(255,194,216,.22); --mk-blue:rgba(166,220,255,.22);
  --bar-fade:rgba(28,26,22,.98); --bar-fade-2:rgba(28,26,22,0);
}
html[data-scheme="dark"][data-theme="custom"] body{
  background:radial-gradient(900px 700px at 10% -8%, #2A2519 0%, rgba(42,37,25,0) 60%), #0D0B08;
}
html[data-scheme="dark"][data-theme="custom"][data-bg="line"] .app{
  background-image:repeating-linear-gradient(to bottom, transparent 0 27px, rgba(232,201,127,.16) 27px 28px);
  background-position:0 42px;
}
html[data-scheme="dark"][data-theme="custom"][data-bg="grid"] .app{
  background-image:
    linear-gradient(rgba(232,201,127,.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,201,127,.13) 1px, transparent 1px);
  background-size:24px 24px;
}
html[data-scheme="dark"][data-theme="custom"][data-bg="paper"] .app{
  background-image:
    radial-gradient(rgba(240,220,180,.07) 1px, transparent 1px),
    radial-gradient(rgba(240,220,180,.05) 1px, transparent 1px);
  background-size:18px 18px, 26px 26px;
  background-position:0 0, 9px 13px;
}
html[data-scheme="dark"][data-theme="custom"][data-bg="image"] .app{
  background-image:linear-gradient(rgba(18,16,13,.86), rgba(18,16,13,.92)), var(--user-bg, none);
  background-size:cover, cover;
  background-position:center, center;
}

/* ============================================================
   专注计时 / 涂鸦 / 专注阅读 / 课程管理
   ============================================================ */
.hidden{ display:none !important; }

/* 专注计时胶囊 */
.focus-pill{
  flex:none; height:31px; padding:0 11px; border-radius:99px; cursor:pointer;
  border:1px solid var(--line); background:var(--card); color:var(--ink-2);
  font:inherit; font-size:12px; font-weight:650; letter-spacing:.02em;
  font-variant-numeric:tabular-nums;
  display:inline-flex; align-items:center; gap:6px;
}
.focus-pill .fp-dot{ width:6px; height:6px; border-radius:50%; background:var(--ink-3); }
.focus-pill.on{ background:var(--brand-soft); border-color:transparent; color:var(--brand); }
.focus-pill.on .fp-dot{ background:var(--brand); animation:pulse 1.6s infinite; }
@keyframes pulse{ 0%,100%{ opacity:1; } 50%{ opacity:.25; } }

.focus-durs{ display:grid; grid-template-columns:repeat(3,1fr); gap:9px; }
.focus-dur{
  appearance:none; font:inherit; cursor:pointer; padding:14px 6px 12px; border-radius:16px;
  border:1px solid var(--line); background:var(--card); color:var(--ink);
  display:flex; flex-direction:column; align-items:center; gap:2px;
  transition:.16s var(--ease);
}
.focus-dur b{ font-size:22px; font-weight:750; letter-spacing:-.02em; }
.focus-dur small{ font-size:10.5px; color:var(--ink-3); }
.focus-dur.on{ border-color:var(--ink); background:var(--paper-2); }
.focus-dur:active{ transform:scale(.97); }

/* 背诵页工具行 */
.bar-actions{ display:flex; align-items:center; gap:6px; }
.btn--tight{ font-size:14px; padding:0 10px; }
.ink-hint{ font-size:11px; color:var(--ink-3); text-align:center; margin-top:9px; line-height:1.6; }
.ink-pick{ position:relative; border:1px dashed var(--line); }
.ink-pick input{
  position:absolute; inset:-4px; width:calc(100% + 8px); height:calc(100% + 8px);
  opacity:0; cursor:pointer; border:0; padding:0; margin:0;
}
.ink-pick i{ width:18px; height:18px; }
#inkToolbar .ink-actions{ margin-top:10px; gap:8px; }
#inkToolbar .ink-actions .tool-btn{
  flex:1; justify-content:center; height:36px; padding:0 4px;
  border:1px solid var(--line);
}
#inkToolbar .ink-actions .tool-btn:active{ background:var(--paper-2); }

/* 涂鸦层 */
.ink-wrap{ position:relative; }
.ink-image{
  position:absolute; left:0; top:0; width:100%; height:auto;
  pointer-events:none; z-index:2;
}
.ink-canvas{
  position:absolute; left:0; top:0; z-index:3;
  touch-action:none; cursor:crosshair; border-radius:2px;
}
.ink-dot{ background:transparent; }
.ink-dot i{ box-shadow:none; }
.ink-dot.on{ background:var(--paper-2); }

/* 专注阅读 */
.pill-adhd{ border:0; cursor:pointer; font:inherit; font-size:11.5px; font-weight:600; }
.note-meta .pill-adhd{ background:var(--paper-2); color:var(--ink-2); }
.note-meta .pill-adhd.on{ background:var(--brand-soft); color:var(--brand); }
.reading.adhd{ line-height:2.2; }
.reading.adhd .ac{ transition:color .2s, font-size .2s; }

/* 课程管理 */
.head-right{ display:flex; align-items:center; gap:10px; }
.link-btn{
  appearance:none; border:0; background:none; font:inherit;
  font-size:12px; font-weight:650; color:var(--brand); cursor:pointer; padding:2px 0;
}
.link-btn--muted{ color:var(--ink-3); font-weight:600; }
.course-stats{
  display:flex; margin-top:4px; overflow:hidden;
  background:var(--card); border:1px solid var(--line); border-radius:16px;
}
.course-stats div{
  flex:1; padding:14px 6px; text-align:center; background:transparent;
  border-right:1px solid var(--line-soft);
}
.course-stats div:last-child{ border-right:0; }
.course-stats b{ display:block; font-size:20px; font-weight:750; letter-spacing:-.02em; }
.course-stats small{ font-size:10.5px; color:var(--ink-3); }

.course-group{
  margin-top:20px; background:none; border:0; border-radius:0; box-shadow:none;
}
.cg-head{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:0 2px 9px; border-bottom:1px solid var(--line); background:none;
}
.cg-head b{ display:block; font-size:14px; font-weight:650; }
.cg-head small{ display:block; font-size:10.5px; color:var(--ink-3); margin-top:2px; }
.cg-head span{ flex:none; font-size:11px; color:var(--ink-3); font-variant-numeric:tabular-nums; }
.cg-rows{ display:flex; flex-direction:column; }
.cg-row{ display:flex; align-items:center; gap:8px; padding:12px 2px; border-bottom:1px solid var(--line-soft); }
.cg-row:last-child{ border-bottom:0; }
.cg-open{
  flex:1; min-width:0; text-align:left; border:0; background:none; font:inherit;
  cursor:pointer; padding:4px 0; color:var(--ink);
}
.cg-open b{
  display:block; font-size:13.5px; font-weight:600;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.cg-open small{ display:block; font-size:10.5px; color:var(--ink-3); margin-top:3px; }
.cg-del{
  flex:none; appearance:none; border:0; background:transparent; font:inherit;
  font-size:11.5px; font-weight:600; color:var(--ink-3); cursor:pointer;
  padding:6px 8px; border-radius:8px; transition:color .16s;
}
.cg-del:active{ color:var(--bad); background:rgba(214,69,69,.06); }

/* 新组件跟随主题 */
html[data-theme="pixel"] .course-stats{ border:2px solid var(--px-line); border-radius:0; box-shadow:4px 4px 0 var(--px-line); }
html[data-theme="pixel"] .cg-head{ border-bottom:2px solid var(--px-line); }
html[data-theme="pixel"] .focus-pill,
html[data-theme="pixel"] .focus-dur{ border-radius:0; border:2px solid var(--px-line); }
html[data-theme="pop"] .course-stats{ border:2px solid var(--pp-line); box-shadow:5px 5px 0 var(--pp-line); }
html[data-theme="pop"] .cg-head{ border-bottom:2px solid var(--pp-line); }
html[data-theme="pop"] .focus-pill{ border:2px solid var(--pp-line); }
html[data-theme="glass"] .course-stats{ background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.14); }
html[data-theme="glass"] .cg-head{ border-bottom-color:rgba(255,255,255,.14); }
html[data-theme="glass"] .focus-pill{ background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.16); color:var(--ink); }
html[data-theme="glass"] .focus-dur{ background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.14); color:var(--ink); }
html[data-theme="glass"] .focus-dur.on{ background:rgba(255,255,255,.14); border-color:var(--ink); }
html[data-theme="glass"] .note-meta .pill-adhd{ background:rgba(255,255,255,.08); color:var(--ink-2); }
html[data-theme="glass"] .note-meta .pill-adhd.on{ background:rgba(138,166,255,.2); color:#BFD0FF; }

/* ============================================================
   V2 版式 · 纸张、字形与细线
   目标：取消多层容器边框与卡片嵌套，用留白、字号与细线组织信息
   ============================================================ */
:root{
  --font-display:"Songti SC","STSong","Noto Serif SC","SimSun",serif;
  --r-lg:14px; --r-md:10px; --r-sm:7px;
}
html[data-theme="pixel"]{ --font-display:"Courier New",ui-monospace,monospace; }
html[data-theme="pop"]{ --font-display:"Arial Black","PingFang SC","Microsoft YaHei",sans-serif; }
html[data-theme="glass"]{ --font-display:"PingFang SC","Microsoft YaHei",system-ui,sans-serif; }
html[data-theme="cyber"]{ --font-display:"JetBrains Mono","Courier New",ui-monospace,monospace; }
html[data-theme="memo"]{ --font-display:"Kaiti SC","STKaiti","KaiTi",serif; }
html[data-theme="guofeng"]{ --font-display:"Songti SC","STSong","SimSun",serif; }
html[data-theme="custom"]{ --font-display:var(--user-font,"PingFang SC",sans-serif); }

/* ---------- 统一留白 ---------- */
.screen{ padding:0 24px; }
html[data-theme] .reading{ padding:0 24px 12px; font-size:17px; line-height:2.05; }
html[data-theme] .note-meta{ padding:0 24px 14px; }
html[data-theme] .tipbar{ margin:0 24px 16px; }
html[data-theme] .quiz-wrap{ padding:0 24px; }
html[data-theme] .dict-list{ padding:0 24px; }
html[data-theme] .seg{ margin-left:24px; margin-right:24px; }

/* ---------- 首页刊头 ---------- */
html[data-theme] .home-head,
.home-head{
  display:block; padding:20px 0 0;
}
.kicker{
  margin:0; font-size:10.5px; font-weight:600; letter-spacing:.18em;
  color:var(--ink-3);
}
.home-title{
  display:flex; align-items:flex-end; justify-content:space-between; gap:14px;
  margin-top:6px;
}
.brand-lockup{ display:flex; align-items:center; gap:11px; min-width:0; }
.brand-logo{ width:30px; height:30px; flex:none; color:var(--ink); display:block; }
.brand-logo svg{ width:100%; height:100%; display:block; }
.home-title h1,
html[data-theme] .home-head h1{
  margin:0; font-family:var(--font-display);
  font-size:34px; line-height:1.15; font-weight:600; letter-spacing:.01em;
}
html[data-theme] .home-intro{
  margin:10px 0 0; max-width:30ch;
  font-size:13px; line-height:1.85; color:var(--ink-2);
}
html[data-theme] .home-intro b{ color:var(--ink); font-weight:700; }

html[data-theme] .coin-pill{
  height:auto; padding:0 0 2px; border:0; border-radius:0; background:none; box-shadow:none;
  color:var(--ink-2); font-size:13px; font-weight:700; gap:4px;
  border-bottom:1px solid var(--line);
}
html[data-theme] .coin-pill span{ color:var(--ink-3); font-size:10px; }
html[data-theme] .coin-big{
  font-family:var(--font-display); font-size:27px; font-weight:600; color:var(--ink);
}
html[data-theme] .coin-big span{ color:var(--brand); font-size:12px; }

/* ---------- 今日复习：大数字版式 ---------- */
.today{
  margin-top:30px; padding:20px 0 18px;
  border-top:1px solid var(--line-soft);
  border-bottom:1px solid var(--line-soft);
}
.today-label{
  font-size:10.5px; font-weight:600; letter-spacing:.16em; color:var(--ink-3);
}
.today-main{
  display:flex; align-items:flex-end; justify-content:space-between; gap:18px;
  margin-top:4px;
}
.today-num{
  font-family:var(--font-display); font-size:76px; line-height:.86;
  font-weight:600; letter-spacing:-.04em; font-variant-numeric:tabular-nums;
}
.today-side{ padding-bottom:6px; text-align:right; }
.today-side p{
  margin:0 0 10px; font-size:11.5px; line-height:1.65; color:var(--ink-3);
  max-width:20ch; margin-left:auto;
}
.text-cta{
  appearance:none; border:0; background:none; cursor:pointer;
  display:inline-flex; align-items:center; gap:5px;
  padding:0 0 3px; font:inherit; font-size:12.5px; font-weight:650; color:var(--ink);
  border-bottom:1.5px solid var(--ink);
}
.text-cta svg{ width:14px; height:14px; }
.today-meter{
  display:flex; align-items:center; gap:11px;
  margin-top:20px; font-size:10.5px; letter-spacing:.04em; color:var(--ink-3);
}
.meter{ flex:1; height:2px; background:var(--line-soft); overflow:hidden; }
.meter i{ display:block; height:100%; background:var(--ink); transition:width .6s var(--ease); }
.today-meter b{ font-weight:700; color:var(--ink-2); font-variant-numeric:tabular-nums; }

/* ---------- 快捷入口：无框文字条 ---------- */
.quick-row{
  display:flex; align-items:stretch; margin-top:8px;
}
.quick-row .quick{
  flex:1; display:flex; align-items:center; justify-content:center; gap:8px;
  padding:14px 6px; border:0; background:none; cursor:pointer; font:inherit;
  font-size:12.5px; font-weight:600; color:var(--ink); position:relative;
}
.quick-row .quick + .quick::before{
  content:""; position:absolute; left:0; top:50%; transform:translateY(-50%);
  width:1px; height:16px; background:var(--line);
}
.quick-row .quick i{ line-height:0; color:var(--ink-3); }
.quick-row .quick b{ font-weight:600; letter-spacing:.02em; }
.quick-row .quick:active{ opacity:.55; }

/* ---------- 知识点索引 ---------- */
.index{ margin-top:30px; }
.index-head{
  display:flex; align-items:baseline; justify-content:space-between; gap:12px;
  padding-bottom:12px;
}
.index-head h2{
  margin:0; font-family:var(--font-display);
  font-size:22px; font-weight:600; letter-spacing:.01em;
}
.index-head span{ font-size:10.5px; letter-spacing:.04em; color:var(--ink-3); }
.filter-row{
  display:flex; align-items:center; gap:20px;
  padding-bottom:0; border-bottom:0;
}
.index-links{ margin-left:auto; display:flex; align-items:center; gap:14px; }
html[data-theme] .link-btn{
  font-size:11.5px; font-weight:600; padding:0 0 1px;
  border-bottom:1px solid currentColor;
}

/* 筛选/胶囊统一改成文字 tab */
html[data-theme] .chip{
  height:auto; padding:0 0 5px; border:0; border-radius:0; background:none; box-shadow:none;
  color:var(--ink-3); font-size:12.5px; font-weight:600; position:relative;
}
html[data-theme] .chip.on{
  background:none; color:var(--ink); border:0; box-shadow:none;
}
html[data-theme] .chip.on::after{
  content:""; position:absolute; left:0; right:0; bottom:-1px; height:1.5px; background:var(--ink);
}
html[data-theme] .chips{ gap:20px; padding-bottom:0; margin-bottom:16px; }

/* 知识点行 */
html[data-theme] .note-list{
  background:none; border:0; border-radius:0; box-shadow:none; overflow:visible;
}
.note-row{
  display:flex; gap:14px; padding:18px 0 15px;
  border-bottom:1px solid var(--line-soft); cursor:pointer;
  transition:opacity .16s;
}
.note-row:last-child{ border-bottom:0; }
.note-row:active{ opacity:.55; }
.note-no{
  width:22px; flex:none; padding-top:2px;
  font-family:var(--font-display); font-size:11px; color:var(--ink-3);
  font-variant-numeric:tabular-nums;
}
.note-row .note-body{ flex:1; min-width:0; }
.note-row .note-top{ display:flex; align-items:center; gap:10px; }
.note-row .note-top h3{
  margin:0; flex:1; min-width:0; font-size:15px; font-weight:650; line-height:1.45;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.note-mode{
  display:inline-flex; align-items:center; gap:5px; flex:none;
  font-size:10px; font-weight:600; letter-spacing:.06em; color:var(--ink-3);
}
.note-mode i{ width:5px; height:5px; border-radius:50%; display:block; }
html[data-theme] .note-row .note-sub{
  margin:6px 0 0; font-size:11px; color:var(--ink-3);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.note-meter{
  height:2px; background:var(--line-soft); margin-top:12px; overflow:hidden;
}
.note-meter i{ display:block; height:100%; transition:width .5s var(--ease); }
.note-row .note-foot{
  display:flex; justify-content:space-between; align-items:baseline; gap:10px;
  margin-top:7px; font-size:10.5px; color:var(--ink-3);
}
.note-row .note-foot b{ font-weight:650; color:var(--ink-2); }

/* ---------- 所有列表：去掉外框，只留细线 ---------- */
html[data-theme] .quick-bar,
html[data-theme] .option-list,
html[data-theme] .theme-grid,
html[data-theme] .log-list,
html[data-theme] .earn-list,
html[data-theme] .custom-panel,
html[data-theme] .wrong-list,
html[data-theme] .theme-block{
  background:none; border:0; border-radius:0; box-shadow:none; overflow:visible;
}
html[data-theme] .option{ padding:17px 0; border-bottom:1px solid var(--line-soft); }
html[data-theme] .option:last-child{ border-bottom:0; }
html[data-theme] .option .oi{ width:26px; height:26px; }
html[data-theme] .option b{ font-size:14.5px; }
html[data-theme] .option small{ font-size:11px; }
html[data-theme] .tips-card{
  margin-top:22px; padding:2px 0 2px 14px;
  border:0; border-left:2px solid var(--line); background:none; border-radius:0;
  font-size:11.5px; line-height:1.85; color:var(--ink-3);
}
html[data-theme] .doc-card{
  margin:0; padding:14px 0; background:none; border:0;
  border-bottom:1px solid var(--line-soft); border-radius:0;
}
html[data-theme] .study-card{
  border:0; border-radius:16px; box-shadow:none; background:var(--card);
}
html[data-theme] .q-card{
  background:none; border:0; border-radius:0; box-shadow:none; padding:0;
}

/* 分段控件：下划线 tab */
html[data-theme] .seg{
  padding:0; gap:22px; background:none; border-radius:0;
  border-bottom:1px solid var(--line-soft);
}
html[data-theme] .seg button{
  flex:0 0 auto; height:38px; padding:0; border-radius:0; background:none;
  font-size:12.5px; color:var(--ink-3); position:relative;
}
html[data-theme] .seg button.on{
  background:none; color:var(--ink); box-shadow:none; border:0;
}
html[data-theme] .seg button.on::after{
  content:""; position:absolute; left:0; right:0; bottom:-1px; height:2px; background:var(--ink);
}

/* ---------- 奖励页 ---------- */
html[data-theme] .ledger{
  margin-top:28px; padding:20px 0 18px;
  border-top:1px solid var(--line-soft); border-bottom:1px solid var(--line-soft);
}
.ledger-label{ font-size:10.5px; font-weight:600; letter-spacing:.16em; color:var(--ink-3); }
.ledger-row{
  display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin-top:2px;
}
.ledger-num{
  font-family:var(--font-display); font-size:68px; line-height:.9;
  font-weight:600; letter-spacing:-.04em; font-variant-numeric:tabular-nums;
}
.ledger-side{ text-align:right; padding-bottom:6px; }
.ledger-side span{
  display:block; font-size:10.5px; font-weight:650; letter-spacing:.08em; color:var(--ink-2);
}
.ledger-note{ margin:12px 0 0; font-size:11px; line-height:1.6; color:var(--ink-3); }

html[data-theme] .section-head{
  margin:32px 0 10px; padding-top:14px;
  border-top:1px solid var(--line-soft);
}
html[data-theme] .section-head h2{
  font-family:var(--font-display); font-size:19px; font-weight:600; letter-spacing:.01em;
}
html[data-theme] .section-head span{ font-size:10.5px; letter-spacing:.05em; }
html[data-theme] .theme-head{ border-top:0; padding-top:0; }

html[data-theme] .theme-tip{ margin:2px 0 0; font-size:11px; line-height:1.7; }
html[data-theme] .theme-group-head{
  background:none; border:0; border-bottom:1px solid var(--line-soft);
  padding:18px 0 7px; font-size:10.5px; letter-spacing:.18em;
}
html[data-theme] .theme-group-head small{ font-size:10px; letter-spacing:.06em; }
html[data-theme] .theme-block{ margin-bottom:4px; }
html[data-theme] .theme-card{
  padding:13px 0; gap:14px; background:none;
  border-bottom:1px solid var(--line-soft);
}
html[data-theme] .theme-card.on{ background:none; box-shadow:none; }
html[data-theme] .theme-card.previewing{
  background:none; box-shadow:inset 2px 0 0 var(--brand); padding-left:10px;
}
html[data-theme] .theme-preview{
  width:64px; height:44px; border-radius:8px; padding:6px 8px; gap:2px;
}
html[data-theme] .theme-preview b{ font-size:10.5px; }
html[data-theme] .theme-preview i{ height:2px; }
html[data-theme] .theme-info b{ font-size:13px; }
html[data-theme] .theme-info small{ font-size:10px; }
html[data-theme] .theme-price{
  background:none; padding:0; border-radius:0;
  font-size:10.5px; font-weight:650; color:var(--ink-3);
}
html[data-theme] .theme-price.can{ background:none; color:var(--ink-2); }
html[data-theme] .theme-price.owned{ background:none; color:var(--brand); }
html[data-theme] .theme-price.on{ background:none; color:var(--ink); font-weight:750; }

/* 日夜切换：文字 tab */
html[data-theme] .scheme-seg{
  background:none; border:0; border-radius:0; padding:0; gap:16px;
}
html[data-theme] .scheme-seg button{
  height:auto; padding:0 0 5px; border-radius:0; background:none;
  font-size:11.5px; color:var(--ink-3); position:relative;
}
html[data-theme] .scheme-seg button.on{
  background:none; color:var(--ink); box-shadow:none;
}
html[data-theme] .scheme-seg button.on::after{
  content:""; position:absolute; left:0; right:0; bottom:-1px; height:1.5px; background:var(--ink);
}

/* 自定义面板：无框两栏 */
html[data-theme] .cp-row{
  padding:12px 0; border-bottom:1px solid var(--line-soft); gap:14px;
}
html[data-theme] .cp-row:last-child{ border-bottom:0; }
html[data-theme] .cp-label{
  width:56px; font-size:10.5px; font-weight:600; letter-spacing:.08em; color:var(--ink-3);
}
html[data-theme] .cp-row .chip{ font-size:11.5px; padding-bottom:4px; }
html[data-theme] .cp-hint{
  background:none; border-top:1px solid var(--line-soft);
  padding:12px 0; font-size:10.5px;
}
html[data-theme] .cp-hint-row{
  background:none; border-top:1px solid var(--line-soft); padding:12px 0;
}
html[data-theme] .cp-hint-row p{ font-size:10.5px; }
html[data-theme] .cp-actions .btn{
  border:0; border-bottom:1px solid var(--ink); border-radius:0;
  background:none; color:var(--ink); height:auto; padding:0 0 3px;
  font-size:11.5px; font-weight:650;
}
html[data-theme] .hl-pick{ width:28px; height:28px; border-radius:6px; }
html[data-theme] .cp-sticker{ border-radius:6px; }

/* 积分说明与记录 */
html[data-theme] .earn-row,
html[data-theme] .log-row{
  padding:13px 0; border-bottom:1px solid var(--line-soft); font-size:12px;
}
html[data-theme] .earn-row b{ font-weight:600; }
html[data-theme] .log-row b{ font-weight:700; }

/* ---------- 顶栏 / 底栏 / 工具条：去渐变与模糊 ---------- */
html[data-theme] .topbar{
  background:var(--paper); backdrop-filter:none;
  border-bottom:1px solid var(--line-soft);
  padding:6px 14px 9px;
}
html[data-theme] .topbar h2{ font-size:14px; font-weight:650; letter-spacing:.01em; }
html[data-theme] .tabbar{
  background:var(--paper); backdrop-filter:none;
  border-top:1px solid var(--line-soft);
}
html[data-theme] .tabbar button{
  position:relative; font-size:10px; letter-spacing:.1em; gap:5px;
}
html[data-theme] .tabbar button.on::after{
  content:""; position:absolute; top:0; width:14px; height:2px;
  background:var(--ink); border-radius:0;
}
html[data-theme] .toolbar{
  background:var(--paper); backdrop-filter:none;
  border-top:1px solid var(--line-soft); box-shadow:none;
}
html[data-theme] .toolbar .btn{ border-radius:10px; }

/* ---------- 按钮与弹层 ---------- */
.btn{ height:47px; border-radius:12px; box-shadow:none; letter-spacing:.02em; }
html[data-theme] .btn--soft{ background:none; border:1px solid var(--line); color:var(--ink); }
html[data-theme] .sheet-panel{
  border-radius:18px 18px 0 0;
  box-shadow:0 -1px 0 var(--line-soft), 0 -34px 70px -44px rgba(0,0,0,.4);
}
html[data-theme] .sheet-grip{ width:30px; height:3px; }
html[data-theme] .sheet-actions{
  background:none; border:0; border-radius:0;
}
html[data-theme] .sheet-btn{
  background:none; border:0; border-bottom:1px solid var(--line-soft);
  border-radius:0; padding:15px 0; font-size:13.5px;
}
html[data-theme] .sheet-actions .sheet-btn:last-child{ border-bottom:0; }
html[data-theme] .sheet-cancel{ margin-top:12px; }
html[data-theme] .toast{ border-radius:11px; }
html[data-theme] .preview-bar{ border-radius:13px; }

/* ---------- 报告 / 结算 / 课程统计 ---------- */
html[data-theme] .report-hero{
  background:none; border:0; border-radius:0; box-shadow:none;
  border-top:1px solid var(--line-soft); border-bottom:1px solid var(--line-soft);
  color:var(--ink); margin-top:20px; padding:20px 0;
}
html[data-theme] .report-hero h2{
  font-family:var(--font-display); font-size:23px; font-weight:600; letter-spacing:.01em;
}
html[data-theme] .report-hero p{ color:var(--ink-3); }
html[data-theme] .report-hero .ring{ width:80px; height:80px; }
html[data-theme] .ring{
  background:conic-gradient(var(--ink) calc(var(--p) * 1%), var(--line-soft) 0);
}
html[data-theme] .ring::before{ background:var(--paper); }
html[data-theme] .ring span{
  font-family:var(--font-display); font-size:17px; font-weight:600; color:var(--ink);
}
html[data-theme] .ring small{ color:var(--ink-3); }

html[data-theme] .report-nums,
html[data-theme] .result-stats,
html[data-theme] .course-stats{
  background:none; border:0; border-radius:0; box-shadow:none; overflow:visible;
  border-top:1px solid var(--line-soft); border-bottom:1px solid var(--line-soft);
}
html[data-theme] .report-nums div,
html[data-theme] .rstat,
html[data-theme] .course-stats div{
  padding:16px 6px; border-right:1px solid var(--line-soft);
}
html[data-theme] .report-nums div:last-child,
html[data-theme] .rstat:last-child,
html[data-theme] .course-stats div:last-child{ border-right:0; }
html[data-theme] .report-nums b,
html[data-theme] .rstat b,
html[data-theme] .course-stats b{
  font-family:var(--font-display); font-size:24px; font-weight:600; letter-spacing:0;
}

html[data-theme] .result-hero{ text-align:left; padding:8px 0 18px; }
html[data-theme] .result-hero h2{
  font-family:var(--font-display); font-size:22px; font-weight:600;
}
html[data-theme] .result-score{
  width:104px; height:104px; margin:0 0 16px;
  background:conic-gradient(var(--brand) calc(var(--p) * 1%), var(--line-soft) 0);
}
html[data-theme] .result-score::before{ inset:7px; background:var(--paper); }
html[data-theme] .result-score strong{ font-family:var(--font-display); font-size:34px; font-weight:600; }

html[data-theme] .bar{ height:2px; border-radius:0; background:var(--line-soft); }
html[data-theme] .bar i{ border-radius:0; }
html[data-theme] .bar--warm i{ background:var(--ink); }
html[data-theme] .bar-item{ margin-bottom:18px; }

html[data-theme] .wrong-list{ border-top:1px solid var(--line-soft); }
html[data-theme] .wrong-item{
  background:none; border:0; border-bottom:1px solid var(--line-soft);
  border-radius:0; padding:14px 0;
}
html[data-theme] .course-group .cg-head{ border-bottom:1px solid var(--line-soft); padding-bottom:10px; }
html[data-theme] .course-group .cg-row{ border-bottom:1px solid var(--line-soft); }

/* 小屏留白 */
@media (max-width:390px){
  html[data-theme] .reading{ padding-left:18px; padding-right:18px; }
  html[data-theme] .note-meta{ padding-left:18px; padding-right:18px; }
  html[data-theme] .tipbar{ margin-left:18px; margin-right:18px; }
  html[data-theme] .quiz-wrap{ padding-left:18px; padding-right:18px; }
  html[data-theme] .dict-list{ padding-left:18px; padding-right:18px; }
  html[data-theme] .seg{ margin-left:18px; margin-right:18px; }
  .screen{ padding:0 18px; }
  .today-num{ font-size:64px; }
  .ledger-num{ font-size:58px; }
  .brand-logo{ width:26px; height:26px; }
  .brand-lockup{ gap:9px; }
  .home-title h1{ font-size:29px; }
}

/* ============================================================
   多端适配：平板与电脑
   ============================================================ */
@media (min-width: 768px){
  :root{ --frame-offset:max(0px, calc((100dvh - min(900px, 92dvh)) / 2)); }
  .app{
    width:min(720px, 92vw);
    height:min(900px, 92dvh);
    border-radius:34px;
  }
  .statusbar{ display:none; }
  .screen, .screen--flush{ width:min(100%, 720px); margin-left:auto; margin-right:auto; }
  .reading, .note-meta, .recite-bar, .quiz-wrap, .dict-list{
    max-width:640px; margin-left:auto; margin-right:auto;
  }
  html[data-theme] .tipbar,
  html[data-theme] .seg{ max-width:640px; margin-left:auto; margin-right:auto; }
  .tabbar{ justify-content:center; gap:56px; }
  .toolbar{ width:min(660px, calc(100vw - 48px)); }
  .sheet-panel{ width:min(560px, 100vw); bottom:var(--frame-offset); }
  .preview-bar{
    left:0; right:0; width:min(520px, calc(100% - 24px));
    margin-left:auto; margin-right:auto;
  }
  .home-title h1{ font-size:38px; }
  .today-num{ font-size:84px; }
  .ledger-num{ font-size:76px; }
}

@media (min-width: 1200px){
  :root{ --frame-offset:max(0px, calc((100dvh - min(860px, 88dvh)) / 2)); }
  .app{ width:min(880px, 86vw); height:min(860px, 88dvh); }
  .screen, .screen--flush{ width:min(100%, 760px); }
  .reading, .note-meta, .recite-bar, .quiz-wrap, .dict-list{ max-width:700px; }
  html[data-theme] .tipbar,
  html[data-theme] .seg{ max-width:700px; }
  .tabbar{ gap:80px; }
  .toolbar{ width:min(760px, calc(100vw - 48px)); }
}

