.wrong-notebook{min-height:100vh;background:var(--canvas);color:var(--ink);font-family:var(--font-sans)}.wrong-notebook[hidden]{display:none}.wrong-notebook *{box-sizing:border-box;letter-spacing:0}.wrong-notebook button,.wrong-notebook input,.wrong-notebook select,.wrong-notebook textarea{font:inherit}.wrong-notebook button{cursor:pointer;min-height:38px;border:1px solid #d5dfe9;border-radius:6px;background:white;color:#273847;padding:8px 12px;display:inline-flex;align-items:center;justify-content:center;gap:6px}.wrong-notebook button:hover{border-color:#0a73f4}.wrong-notebook button:disabled{opacity:.5;cursor:not-allowed}.wrong-notebook svg{width:18px;height:18px;flex-shrink:0}.wb-header{min-height:78px;display:flex;align-items:center;gap:16px;padding:14px 28px;background:#fff;border-bottom:1px solid #dde5ec}.wb-header h1{font-size:24px;margin:0;white-space:nowrap}.wb-head-actions{display:flex;gap:10px;margin-left:auto;flex-wrap:wrap;justify-content:flex-end}.wrong-notebook .wb-primary{background:#0a73f4;color:white;border-color:#0a73f4}.wb-content{max-width:1420px;margin:auto;padding:24px 32px}.wb-books{display:flex;gap:0;border-bottom:1px solid #d9e1ea;margin-bottom:22px}.wb-books button{flex:1;display:flex;flex-direction:column;border:0;border-radius:0;background:transparent;padding:16px 12px;border-bottom:3px solid transparent;min-height:82px}.wb-books strong{font-size:20px}.wb-books span{color:#697987;font-size:13px}.wb-books button[aria-pressed=true]{color:#0969da;border-bottom-color:#0a73f4;background:#e8f2ff}.wb-filters,.wb-history-filter{display:flex;flex-wrap:wrap;gap:16px;align-items:center}.wb-filters label,.wb-history-filter label{display:flex;align-items:center;gap:10px}.wb-filters select,.wb-history-filter select{padding:8px;border:1px solid #c9d4df;border-radius:5px;min-width:100px;background:white;min-height:38px}.wb-counts{display:flex;align-items:center;gap:28px;margin:20px 0}.wb-counts button{margin-left:auto}.wb-notes{display:grid;gap:20px}.wb-note{background:#fff;border:1px solid #e0e7ef;border-radius:8px;padding:22px 24px}.wb-note>header{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.wb-tag{background:#edf4ff;color:#0963c5;padding:4px 10px;border-radius:4px;white-space:nowrap;font-size:14px}.wb-source{color:#677988;font-size:14px;flex:1;overflow-wrap:anywhere}.wb-state{color:#b75b12;background:#fff2dd;padding:5px 12px;border-radius:4px;font-size:14px}.wb-state.is-mastered{color:#168247;background:#e8f7ef}.wb-check input{width:18px;height:18px;accent-color:#0a73f4}.wrong-notebook .wb-stem{display:block;text-align:left;border:0;background:transparent;width:100%;padding:18px 0;line-height:1.8;border-radius:0}.wb-question{line-height:1.9;overflow-wrap:anywhere;max-width:100%;overflow:auto}.wb-question img{max-width:100%;object-fit:contain}.wb-question-image{display:block;max-height:500px;margin:10px auto}.wb-question table{max-width:100%;border-collapse:collapse}.wb-question p{margin:8px 0}.wb-metrics{display:flex;flex-wrap:wrap;gap:12px 26px;font-size:13px;color:#6c7a86;padding:12px 0;border-top:1px dashed #e1e7ec}.wb-metrics b{color:#e46549}.wb-note>footer{border-top:1px solid #edf0f4;padding-top:16px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}.wb-note>footer>span{font-size:13px;color:#448087}.wb-note>footer>div{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap}.wb-more{display:flex!important;margin:20px auto}.wb-more[hidden]{display:none!important}.wb-empty{min-height:300px;display:flex;align-items:center;justify-content:center;flex-direction:column;color:#748391;text-align:center}.wb-empty img{width:150px;height:150px;object-fit:contain}.wb-status{position:sticky;bottom:8px;margin:12px auto;padding:12px 18px;border:1px solid #e3b36c;border-radius:6px;background:#fff4df;max-width:850px;color:#674900;z-index:4;overflow-wrap:anywhere}.wb-status button{margin-left:15px}.wb-warning{color:#81570c;background:#fff5dc;padding:12px 16px;line-height:1.7}.wb-detail{background:white;padding:28px;max-width:1120px;margin:0 auto;min-height:500px}.wb-detail-meta{display:flex;gap:12px;margin-bottom:18px;align-items:center;color:#667a8c;font-size:14px}.wb-answer{border-top:1px solid #e1e8ef;margin-top:22px;padding:18px 0;line-height:1.8;overflow-wrap:anywhere}.wb-answer h2{font-size:18px;color:#126fcb;margin:0 0 12px}.wb-answer img{max-width:100%}.wb-detail-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:20px}.wb-knowledge{display:flex;flex-wrap:wrap;gap:8px}.wb-knowledge span{font-size:13px;padding:6px 10px;background:#e9f8ee;color:#237249;border-radius:4px}.wb-redo{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(280px,1fr);min-height:650px;background:white}.wb-paper{padding:28px;border-right:1px solid #dbe3ed}.wb-input{padding:24px;display:flex;align-items:stretch;flex-direction:column;gap:20px}.wb-input h2{font-size:18px;margin:0}.wb-input textarea,.wb-ai textarea{width:100%;resize:vertical;min-height:160px;padding:14px;border:1px solid #bbcbd9;border-radius:6px;line-height:1.8}.wb-options{border:0;padding:0;display:flex;flex-direction:column;gap:14px}.wb-options legend{font-size:14px;color:#70808f;margin-bottom:12px}.wb-options label{display:flex;align-items:flex-start;gap:12px;border:1px solid #dbe4ed;padding:14px;border-radius:6px}.wb-options input{margin-top:6px;accent-color:#0a73f4}.wb-options span{overflow-wrap:anywhere}.wb-options img{max-width:100%}.wb-result.correct{color:#1d8d4e}.wb-result.incorrect{color:#d14c3c}.wb-result.pending_review{color:#ae7e1a}.wb-self-check{background:#fff4dc;padding:16px}.wb-self-check button{margin-right:12px}.wb-pre{white-space:pre-wrap;overflow-wrap:anywhere}.wb-history{display:grid;gap:12px;margin-top:20px}.wb-history>button{display:grid;text-align:left;grid-template-columns:70px 180px minmax(0,1fr);gap:20px;padding:18px;justify-content:start}.wb-history-stem{max-height:72px;overflow:hidden;line-height:1.6}.wb-history-stem img{max-height:50px}.wb-similar{border-bottom:1px solid #dbe2eb;padding:20px 0}.wb-similar h2{font-size:19px}.wb-similar details{padding:14px 0;color:#176abf}.wb-dialog{border:0;border-radius:8px;padding:24px;max-width:850px;width:calc(100% - 32px);max-height:90vh;overflow:auto;color:#243545;box-shadow:0 8px 50px #0003}.wb-dialog::backdrop{background:#0007}.wb-dialog header{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:18px}.wb-dialog h2{font-size:21px;margin:0}.wb-date-form{display:grid;gap:24px}.wb-date-form label{display:flex;align-items:center;gap:15px}.wb-date-form input{min-width:0;min-height:38px;padding:8px;border:1px solid #b8c7d6;border-radius:5px}.wb-dialog footer{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}.wb-month-nav{display:flex;justify-content:space-between;align-items:center}.wb-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px;margin-top:20px;text-align:center}.wb-calendar>span{font-size:14px}.wb-calendar button{height:58px;flex-direction:column;gap:2px;padding:4px;min-width:0;border:0}.wb-calendar small{height:14px;font-size:11px}.wb-calendar [data-heat="0"],.wb-heat-legend [data-heat="0"]{background:#f0f3f6}.wb-calendar [data-heat="1"],.wb-heat-legend [data-heat="1"]{background:#deedff}.wb-calendar [data-heat="2"],.wb-heat-legend [data-heat="2"]{background:#a9d0fd}.wb-calendar [data-heat="3"],.wb-heat-legend [data-heat="3"]{background:#6aa5ef}.wb-calendar [data-heat="4"],.wb-heat-legend [data-heat="4"]{background:#0a73f4;color:white}.wb-heat-legend{display:flex;align-items:center;justify-content:flex-end;gap:7px;font-size:12px;margin-top:16px}.wb-heat-legend span{width:16px;height:16px;border-radius:3px}.wb-ai{background:#fff;padding:28px;max-width:1000px;margin:auto}.wb-ai>.wb-question{border-bottom:1px solid #dde5ed;padding-bottom:20px;max-height:260px}.wb-conversation{min-height:150px}.wb-conversation article{border-bottom:1px solid #e3e9f0;padding:16px 0;line-height:1.8}.wb-conversation h2{font-size:16px;color:#126fcb}.wb-ai-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:14px}.wb-ai-source{font-size:12px;color:#7e8a95;text-align:center;margin-top:24px}.wb-scores{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.wb-scores>div{display:flex;flex-direction:column;align-items:center;gap:10px;padding:16px 4px;background:#edf4fc;border-radius:6px}.wb-scores strong{font-size:28px;color:#126fcb}.wb-print-preview article{border-bottom:1px solid #dce3eb;padding:20px 0}.wrong-notebook :focus-visible{outline:2px solid #0a73f4;outline-offset:3px}@media(max-width:700px){.wb-header{padding:12px;gap:10px;flex-wrap:wrap}.wb-header h1{font-size:21px}.wb-head-actions{gap:5px}.wb-head-actions button{padding:7px}.wb-content{padding:12px}.wb-books button{padding:12px 4px;min-height:85px}.wb-books strong{font-size:16px}.wb-books span{font-size:11px;line-height:1.6}.wb-filters{gap:10px;font-size:14px}.wb-filters select{min-width:80px}.wb-counts{gap:12px;font-size:13px}.wb-note{padding:16px 12px}.wb-source{flex-basis:50%;font-size:12px}.wb-note>footer>div{margin:0;width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.wb-note>footer button{font-size:13px;padding:8px 4px}.wb-metrics{gap:10px;font-size:12px}.wb-detail,.wb-ai{padding:16px}.wb-redo{grid-template-columns:minmax(0,1fr);min-height:600px}.wb-paper{border-right:0;border-bottom:1px solid #dde5ed;padding:16px}.wb-input{padding:16px}.wb-history>button{grid-template-columns:65px minmax(0,1fr);gap:12px}.wb-history-stem{grid-column:1/-1}.wb-dialog{padding:16px}.wb-calendar{gap:4px}.wb-calendar button{height:48px;min-height:38px;font-size:13px}.wb-scores{grid-template-columns:repeat(2,minmax(0,1fr))}.wb-scores strong{font-size:25px}}
.wb-counts{flex-wrap:wrap}.wb-counts>span{white-space:nowrap}.wb-counts>button:last-child{margin-left:0}.wb-stubborn{color:#8a6724}
.wb-stem-options{margin-top:12px}.wb-stem-options>div{margin:6px 0}


/* ================= 手机端：暖橙皮肤 + 阅读化错题列表（桌面端不受影响） ================= */
.wb-chips{display:none}
@media (max-width:640px){
  .wrong-notebook{
    --canvas:#F7F2E8; --ink:#3B3228;
    background:radial-gradient(620px 320px at 6% -6%,#FCE7CB 0%,rgba(252,231,203,0) 70%),#F7F2E8;
    min-height:100vh;
  }
  .wb-header{
    position:sticky; top:0; z-index:6;
    min-height:0; gap:10px; flex-wrap:nowrap;
    padding:calc(env(safe-area-inset-top) + 10px) 14px 10px;
    background:rgba(247,242,232,.93);
    backdrop-filter:blur(12px);
    border-bottom:1px solid #EFE3D0;
  }
  .wb-header h1{font-size:20px; font-weight:800; letter-spacing:-.3px; color:#3B3228}
  .wb-head-actions{gap:6px; flex-wrap:nowrap}
  .wrong-notebook .wb-head-actions button{
    width:38px; height:38px; min-height:38px; padding:0;
    border-radius:12px; border:1px solid #EFE3D0; background:#fff; color:#8A7660;
    box-shadow:0 2px 8px -6px rgba(120,88,48,.8);
  }
  .wb-content{padding:12px 14px 28px; max-width:none}

  /* 胶囊筛选条 */
  .wb-filters{display:none}
  .wb-chips{
    display:flex; gap:8px; overflow-x:auto; padding:2px 0 10px;
    scrollbar-width:none; -webkit-overflow-scrolling:touch;
  }
  .wb-chips::-webkit-scrollbar{display:none}
  .wb-chips button{
    flex:0 0 auto; min-height:34px; height:34px; padding:0 12px;
    border-radius:999px; border:1px solid #EFE3D0; background:#fff;
    color:#6B5A45; font-size:12.5px; font-weight:700; gap:4px;
    box-shadow:0 2px 8px -6px rgba(120,88,48,.85);
  }
  .wb-chips button svg{width:14px; height:14px; color:#B08A5C}
  .wb-chips button span{white-space:nowrap}

  /* 统计条 */
  .wb-counts{
    position:sticky; top:calc(env(safe-area-inset-top) + 56px); z-index:5;
    display:flex; align-items:center; gap:9px;
    margin:0 0 10px; padding:8px 10px 8px 13px;
    border-radius:14px; border:1px solid #F0E4D1; background:rgba(255,253,250,.95);
    backdrop-filter:blur(8px);
    font-size:12px; color:#8A7660; font-weight:600;
    box-shadow:0 8px 18px -18px rgba(120,88,48,.9);
  }
  .wb-counts strong{font-size:12.5px; color:#4A3E32; font-weight:800}
  .wb-counts button{
    margin-left:0; width:30px; height:30px; min-height:30px; padding:0;
    border-radius:10px; border:1px solid #EFE3D0; background:#fff; color:#8A7660;
  }
  .wb-counts button:first-of-type{margin-left:auto}

  /* 错题卡 */
  .wb-notes{gap:12px}
  .wb-note{
    padding:14px; border-radius:18px;
    border:1px solid #F0E4D1; background:#FFFDFA;
    box-shadow:0 12px 24px -22px rgba(120,88,48,.95);
  }
  .wb-note>header{gap:8px; align-items:center}
  .wb-check input{width:16px; height:16px; accent-color:#E08A2E}
  .wb-tag{background:#FFF0DA; color:#A9631A; font-size:11.5px; font-weight:800; padding:4px 9px; border-radius:8px}
  .wb-source{flex:1 1 100%; order:9; font-size:11.5px; color:#A2917B; line-height:1.45; margin-top:0}
  .wb-state{
    margin-left:auto; font-size:11px; font-weight:800;
    padding:4px 9px; border-radius:8px; background:#FDECE2; color:#C2622C;
  }
  .wb-state.is-mastered{background:#EAF6EE; color:#3F8F63}
  .wrong-notebook .wb-stem{padding:9px 0 7px; font-size:15px; line-height:1.72; color:#3B3228}
  .wb-question{line-height:1.72; overflow:visible}
  .wb-question img{max-height:240px; width:auto; border-radius:10px}
  .wb-question table{font-size:13px}
  .wb-metrics{
    display:grid; grid-template-columns:1fr 1fr; gap:6px 10px;
    padding:10px 0 0; border-top:1px dashed #F1E5D3;
    font-size:11.5px; color:#8A7660;
  }
  .wb-metrics b{color:#C2622C; font-size:13px}
  .wb-note>footer{border-top:0; padding-top:10px; gap:8px}
  .wb-note>footer>span{display:none}
  .wb-note>footer>div{width:100%; display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:0}
  .wrong-notebook .wb-note>footer button{
    min-height:42px; border-radius:13px; font-size:13.5px; font-weight:800;
    border:1px solid #F3E0C6; background:#FFF6E9; color:#B87225; padding:0 6px;
  }
  .wrong-notebook .wb-note>footer button:first-child{
    border-color:transparent;
    background:linear-gradient(135deg,#F0A44C,#E08A2E); color:#fff;
    box-shadow:0 10px 18px -12px rgba(224,138,46,.9), inset 0 1px 0 rgba(255,255,255,.42);
  }
  .wrong-notebook .wb-note>footer button:disabled{opacity:.5; box-shadow:none}

  /* 空状态 */
  .wb-empty{min-height:0; padding:34px 16px 26px; gap:6px; color:#A2917B}
  .wb-empty img{width:118px; height:118px; opacity:.92}
  .wb-empty p{margin:2px 0 0; font-size:14.5px; font-weight:700; color:#7E6E5A}
  .wb-empty-hint{display:block; font-size:12.5px; color:#B0A08A; line-height:1.6}
  .wrong-notebook .wb-empty button{
    margin-top:12px; min-height:42px; padding:0 18px; border-radius:12px;
    border:1px solid #F3E0C6; background:#FFF6E9; color:#B87225; font-weight:800;
  }
  .wrong-notebook .wb-more{margin:16px auto; border-radius:12px}

  .wb-warning{background:#FFF6E4; color:#8A6320; border-radius:12px; font-size:12.5px; line-height:1.6}
  .wb-status{left:14px; right:14px; bottom:calc(env(safe-area-inset-bottom) + 10px); border-radius:12px; font-size:13px}

  /* 底部选择器 */
  .wb-dialog{
    position:fixed; inset:auto 0 0 0; margin:0; width:100%; max-width:none;
    border-radius:22px 22px 0 0; padding:18px 16px calc(env(safe-area-inset-bottom) + 18px);
    max-height:76vh; box-shadow:0 -12px 40px rgba(59,50,40,.18);
  }
  .wb-dialog::backdrop{background:rgba(59,50,40,.42)}
  .wb-dialog header{gap:10px; margin-bottom:14px}
  .wb-dialog h2{font-size:17px; font-weight:800}
  .wrong-notebook .wb-dialog header button{
    width:34px; height:34px; min-height:34px; padding:0; border-radius:10px;
    border:1px solid #EFE3D0; background:#fff; color:#8A7660;
  }
  .wb-picker{display:grid; gap:8px}
  .wrong-notebook .wb-picker button{
    justify-content:flex-start; min-height:48px; padding:0 14px; border-radius:13px;
    border:1px solid #EFE3D0; background:#FFFDFA; color:#5C4C3A; font-size:14.5px; font-weight:700;
  }
  .wrong-notebook .wb-picker button[aria-pressed="true"]{
    border-color:#F0BE84; background:#FFF4E3; color:#A9631A;
  }

  /* 解析 / 重做等二级页统一暖色 */
  .wb-detail,.wb-ai{background:transparent; padding:0 0 22px}
  .wb-answer{border-top:1px solid #F1E5D3}
  .wb-answer h2{color:#A9631A; font-size:16px}
  .wrong-notebook .wb-detail-actions button{
    min-height:44px; border-radius:13px; border:1px solid #F3E0C6; background:#FFF6E9; color:#B87225; font-weight:800;
  }
  .wrong-notebook .wb-detail-actions .wb-primary{background:linear-gradient(135deg,#F0A44C,#E08A2E); color:#fff; border-color:transparent}
  .wb-knowledge span{background:#FFF0DA; color:#A9631A}
}

/* 手机端二次微调：题干折叠、警告收窄、统计条按钮分组 */
@media (max-width:640px){
  .wb-counts button:first-of-type{margin-left:0}
  .wb-counts .wb-counts-date{margin-left:auto}
  .wb-counts span{white-space:nowrap}
  .wrong-notebook .wb-warning{
    padding:9px 12px; margin:0 0 10px; font-size:11.5px; line-height:1.55;
    border-radius:12px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  }
  .wb-stem .wb-question{
    max-height:132px; overflow:hidden;
    -webkit-mask-image:linear-gradient(#000 72%, rgba(0,0,0,.15));
    mask-image:linear-gradient(#000 72%, rgba(0,0,0,.15));
  }
  .wb-stem .wb-question img{max-height:150px}
  .wb-note>.wb-stem::after{
    content:""; display:block;
  }
}

/* 桌面端隐藏手机专用日期按钮（桌面已有筛选行日期按钮） */
.wb-counts .wb-counts-date{display:none}
@media (max-width:640px){
  .wb-counts .wb-counts-date{display:inline-flex}
}

@media (max-width:640px){
  .wb-stem .wb-question{
    max-height:150px;
    -webkit-mask-image:linear-gradient(#000 58%, rgba(0,0,0,.08));
    mask-image:linear-gradient(#000 58%, rgba(0,0,0,.08));
  }
  .wb-metrics{margin-top:8px}
}
