/* 错题本 · 书房主题 — a skin over site.css and each page's own styles (loaded last, every rule scoped under `html body`).
   Only colours, borders, type and ornaments change; structure, class names and quiz scripts are untouched. */
@import url("/study/fonts.css?v=2");
:root{
  --sf-gold:#c6a466;--sf-gold-2:#e2c78e;--sf-line:rgba(198,164,102,.22);
  --sf-head:#f2e7d0;--sf-text:#e3d8c1;--sf-body:#d8ccb3;--sf-muted:#a8987d;--sf-faint:#7a6c5a;
  --sf-zhu:#b5352a;--sf-zhu-2:#d65a48;--sf-jade:#4f9a73;--sf-jade-2:#7fd0a3;--sf-azure:#7fa9c4;
  --sf-serif:"RecSerif","Songti SC","STSong","Noto Serif CJK SC","Source Han Serif SC",serif;
  --sf-brush:"RecBrush","STKaiti","KaiTi","Kaiti SC",serif;
  --sf-panel:linear-gradient(180deg,#1c1510,#140f0b);
  --sf-dust:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .95 0 0 0 0 .85 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  --sf-orn:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='12' viewBox='0 0 240 12'%3E%3Cg fill='none' stroke='%23c6a466'%3E%3Cpath d='M0 6h104M136 6h104' stroke-opacity='.5'/%3E%3Cpath d='M120 1.5l4.5 4.5-4.5 4.5-4.5-4.5z'/%3E%3C/g%3E%3C/svg%3E");
  --sf-diamond:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Cpath d='M5 .8L9.2 5 5 9.2.8 5z' fill='none' stroke='%23c6a466'/%3E%3C/svg%3E");
  color-scheme:dark;
}

/* ── 底：漆黑 + 暖光 + 细尘；顺手把各页原有的颜色变量换成书房色 ── */
html body,html body.hub{color:var(--sf-body);background:var(--sf-dust),radial-gradient(110% 520px at 50% -60px,#2c1e14 0%,rgba(44,30,20,0) 70%) no-repeat,#0e0b09;
  --bg:#0e0b09;--panel:#17110d;--panel2:#1d1611;--line:rgba(198,164,102,.22);--text:#e3d8c1;--muted:#a8987d;
  --paper:#0e0b09;--ink:#e3d8c1;--accent:#e2c78e;--good:#7fd0a3;--bad:#ff8a78}
html body ::selection{background:rgba(181,53,42,.5);color:#fff}
html body a:focus-visible,html body button:focus-visible,html body .opt:focus-visible,html body input:focus-visible{outline:2px solid var(--sf-gold-2);outline-offset:3px}

/* ── 做题页页头 ── */
html body:not(.hub) header h1{font-family:var(--sf-serif);font-weight:700;letter-spacing:.08em;color:var(--sf-head);text-shadow:0 4px 18px rgba(0,0,0,.6)}
html body:not(.hub) header p{color:var(--sf-muted)}
html body:not(.hub) header::after{content:"";display:block;width:240px;max-width:70%;height:12px;margin:18px auto 0;background:var(--sf-orn) center/contain no-repeat}
html body .pill{background:rgba(236,226,204,.04);border-color:rgba(198,164,102,.3);color:var(--sf-body)}
html body .pill strong{color:var(--sf-gold-2)}
html body .jump-links a{color:var(--sf-gold-2)}

/* ── 导航条与提示 ── */
html body .site-nav{background:rgba(23,17,13,.94);border:1px solid rgba(198,164,102,.3);color:var(--sf-text);box-shadow:0 10px 26px rgba(0,0,0,.4)}
html body .site-nav a{color:var(--sf-gold-2)}
html body .site-nav .site-status{color:var(--sf-muted)}
html body .site-note,html body .site-wrongbook{background:var(--sf-panel);border:1px solid rgba(198,164,102,.26);color:var(--sf-body)}
html body .site-note a,html body .site-wrongbook a{color:var(--sf-gold-2)}
html body .site-wrongbook h2{font-family:var(--sf-serif);letter-spacing:.08em;color:var(--sf-head)}
html body .site-wrongbook p{color:var(--sf-muted)}
html body .site-storage-note,html body .storage-note{color:#ffb39f}
html body .site-question:target{outline-color:var(--sf-gold-2)}

/* ── 题卡：漆盒 + 金线 ── */
html body .card,html body .summary-card,html body .study-card,html body .source-card,html body .wrong-panel{position:relative;background:var(--sf-panel);border:1px solid rgba(198,164,102,.26);border-radius:8px;
  box-shadow:inset 0 1px 0 rgba(255,236,200,.04),0 16px 36px rgba(0,0,0,.5)}
html body .card::before{content:"";position:absolute;inset:5px;border:1px solid rgba(198,164,102,.1);border-radius:5px;pointer-events:none}
html body .qnum{border-radius:5px;color:#f7ecd5;background:linear-gradient(180deg,#c43b2f,#9d271e);font-family:var(--sf-serif);font-weight:700;
  box-shadow:inset 0 0 0 2px #a52c22,inset 0 0 0 3px rgba(247,236,213,.55);transform:rotate(-2deg)}
html body .qtype{border-color:rgba(198,164,102,.55);color:var(--sf-gold-2);background:rgba(198,164,102,.06)}
html body .qtext{color:#f1e7d2}
html body .material{background:rgba(236,226,204,.035);border:1px solid rgba(198,164,102,.18);color:var(--sf-body)}
html body .hint,html body .meta-line,html body .photo-caption{color:var(--sf-faint)}
html body .inline-message{color:#ff9e8c}

/* ── 选项：对是石绿，错是朱砂 ── */
html body .opt{border:1px solid rgba(198,164,102,.2);border-radius:7px;color:#ddd2bb;background:rgba(236,226,204,.035)}
html body .opt:hover{border-color:rgba(226,199,142,.6);background:rgba(226,199,142,.06)}
html body .opt .key{color:var(--sf-gold-2)}
html body .opt.selected{border-color:var(--sf-gold-2);background:rgba(226,199,142,.1);box-shadow:inset 3px 0 0 var(--sf-gold-2)}
html body .opt.correct{border-color:var(--sf-jade);background:rgba(79,154,115,.16);box-shadow:inset 3px 0 0 var(--sf-jade-2)}
html body .opt.wrong{border-color:var(--sf-zhu);background:rgba(181,53,42,.17);box-shadow:inset 3px 0 0 var(--sf-zhu-2)}
html body .opt.correct .mark{color:var(--sf-jade-2)}
html body .opt.wrong .mark{color:#ff8a78}

/* ── 按钮：主按钮朱印，次按钮金线 ── */
html body button,html body .btn{border:0;border-radius:6px;color:#f7ecd5;background:linear-gradient(180deg,#c43b2f,#9d271e);letter-spacing:.06em;
  box-shadow:inset 0 0 0 1px rgba(255,214,186,.22),0 6px 14px rgba(0,0,0,.35)}
html body button:hover,html body .btn:hover{filter:brightness(1.08);background:linear-gradient(180deg,#c43b2f,#9d271e)}
html body .btn.ghost,html body .reset,html body .clear-wrong,html body .site-nav button,html body .site-wrong-toggle,
html body .btn.ghost:hover,html body .reset:hover,html body .clear-wrong:hover,html body .site-nav button:hover{color:var(--sf-gold-2);background:rgba(236,226,204,.04);box-shadow:inset 0 0 0 1px rgba(198,164,102,.45)}

/* ── 解析：朱批 ── */
html body .answer{color:var(--sf-body);background:rgba(0,0,0,.28);border-left:3px solid var(--sf-zhu);border-radius:6px}
html body .answer b,html body .explain-list b,html body .wrong-item b{color:var(--sf-head)}
html body .res.ok,html body .answer .res.ok{color:var(--sf-jade-2)}
html body .res.no,html body .answer .res.no{color:#ff8a78}
html body .label,html body .answer .label{color:var(--sf-gold-2)}
html body .explain-block{background:rgba(236,226,204,.03);border:1px solid rgba(198,164,102,.16)}
html body .chain{background:rgba(127,169,196,.08);border-left:3px solid var(--sf-azure)}
html body .trap{background:rgba(214,90,72,.09);border-left:3px solid var(--sf-zhu-2)}
html body .mnemonic{background:rgba(226,199,142,.08);border-left:3px solid var(--sf-gold-2)}
html body .review-card{border-color:rgba(226,199,142,.5)}
html body .review-label{color:var(--sf-gold-2)}
html body .review-explanation{color:var(--sf-body)}

/* ── 表格、汇总、原图 ── */
html body .table-wrap{border-color:rgba(198,164,102,.2);border-radius:8px}
html body th,html body td{border-bottom-color:rgba(198,164,102,.14)}
html body th{color:var(--sf-gold-2);background:rgba(198,164,102,.08)}
html body td{color:var(--sf-body)}
html body .summary-card summary{color:var(--sf-head)}
html body .summary-card[open] summary{border-bottom-color:rgba(198,164,102,.2)}
html body .summary-note{color:var(--sf-muted)}
html body .study-card h2,html body .source-card h2,html body .wrong-panel h2{color:var(--sf-head);letter-spacing:.04em}
html body .study-card p,html body .source-card p,html body .wrong-panel p{color:var(--sf-muted)}
html body .source-list{color:var(--sf-body)}
html body .source-list a,html body .source-photos summary{color:var(--sf-gold-2)}
html body .source-photos{border-top-color:rgba(198,164,102,.2);color:var(--sf-muted)}
html body .wrong-empty,html body .wrong-item{background:rgba(236,226,204,.03);border-color:rgba(198,164,102,.18);color:var(--sf-body)}
html body .wrong-title{color:var(--sf-head)}
html body .question-search{background:#15100c;border-color:rgba(198,164,102,.3);color:var(--sf-text)}
html body .photo-caption a,html body .meta-line>a,html body .source-detail summary,html body .source-detail a,html body .shared-stem>b{color:var(--sf-gold-2)}
html body .source-detail{border-top-color:rgba(198,164,102,.2);color:var(--sf-muted)}
html body .shared-stem{background:rgba(127,169,196,.08);border-left-color:var(--sf-azure)}
html body .year-nav a,html body .number-links a{color:var(--sf-gold-2);border-color:rgba(198,164,102,.3);background:rgba(236,226,204,.03)}
html body .year-nav a[aria-current]{color:#f7ecd5;border-color:transparent;background:linear-gradient(180deg,#b9362b,#97261d)}
html body footer{color:var(--sf-faint)}
html body footer a{color:var(--sf-gold)}

/* ── 错题本总页 ── */
html body.hub .mast{border-bottom-color:rgba(198,164,102,.22);color:var(--sf-muted);letter-spacing:.06em}
html body.hub .mast a{color:var(--sf-gold-2)}
html body.hub .intro{padding:42px 0 26px}
html body.hub .intro h1{font:400 clamp(30px,8.6vw,64px)/1.25 var(--sf-brush);letter-spacing:.06em;color:var(--sf-head);text-shadow:0 0 1px rgba(242,231,208,.4),0 6px 26px rgba(0,0,0,.6)}
html body.hub .intro h1::after{content:"勤";display:inline-grid;place-items:center;width:1.1em;height:1.1em;margin-left:.3em;vertical-align:.12em;border-radius:5px;font-size:.5em;
  color:#f3e6cc;background:#b3271f;box-shadow:inset 0 0 0 2px #b3271f,inset 0 0 0 3.5px rgba(243,230,204,.65);transform:rotate(-5deg)}
html body.hub .intro p{color:var(--sf-muted);letter-spacing:.04em}
html body.hub .overview{gap:12px}
html body.hub .overview span{padding:12px 14px;border:1px solid rgba(198,164,102,.18);border-radius:8px;background:rgba(236,226,204,.03);color:var(--sf-muted)}
html body.hub .overview strong{font-family:var(--sf-serif);font-weight:700;color:var(--sf-head)}
html body.hub .continue{color:var(--sf-text);background:linear-gradient(180deg,#24180f,#17110c);border-color:rgba(226,199,142,.45)}
html body.hub .continue small{color:var(--sf-gold)}
html body.hub .topic-meta a{color:var(--sf-gold-2)}
html body.hub .controls label{color:var(--sf-muted)}
html body.hub .search{color:var(--sf-text);background:#15100c;border-color:rgba(198,164,102,.28)}
html body.hub .search:focus{outline:none;border-color:var(--sf-gold-2);box-shadow:0 0 0 3px rgba(226,199,142,.15)}
html body.hub .filters button{color:var(--sf-gold-2);background:rgba(236,226,204,.04);border:0;box-shadow:inset 0 0 0 1px rgba(198,164,102,.38);letter-spacing:.04em}
html body.hub .filters button[aria-pressed=true]{color:#f7ecd5;background:linear-gradient(180deg,#b9362b,#97261d);box-shadow:inset 0 0 0 1px rgba(255,214,186,.25)}
html body.hub .subject{margin-top:42px}
html body.hub .subject h2{padding:0 0 12px 22px;margin-bottom:6px;font-family:var(--sf-serif);font-size:20px;letter-spacing:.06em;color:var(--sf-head);
  border-bottom:1px solid rgba(198,164,102,.3);background:var(--sf-diamond) 2px calc(50% - 6px)/10px 10px no-repeat}
html body.hub .subject h2 span{color:var(--sf-muted);letter-spacing:0}
html body.hub .topic{margin-top:10px;padding:16px 18px;border:1px solid rgba(198,164,102,.14);border-radius:8px;
  background:linear-gradient(180deg,rgba(236,226,204,.045),rgba(236,226,204,.02));transition:border-color .2s}
html body.hub .topic:hover{border-color:rgba(226,199,142,.45)}
html body.hub .topic-title{color:#efe4cd}
html body.hub .topic-title small{color:var(--sf-gold)}
html body.hub .topic-main:hover .topic-title{color:var(--sf-gold-2)}
html body.hub .topic-meta{color:var(--sf-muted)}
html body.hub .progress-line{background:rgba(198,164,102,.14)}
html body.hub .progress-line span{background:linear-gradient(90deg,var(--sf-gold),var(--sf-gold-2))}
html body.hub .topic-actions a{border-radius:6px;color:var(--sf-gold-2);background:rgba(236,226,204,.05);box-shadow:inset 0 0 0 1px rgba(198,164,102,.4)}
html body.hub .topic-actions .wrong-link{color:#ff9e8c;background:rgba(181,53,42,.16);box-shadow:inset 0 0 0 1px rgba(214,90,72,.55)}
html body.hub footer{border-top-color:rgba(198,164,102,.22)}
html body.hub .empty{color:var(--sf-muted)}

/* ── 整理后的总页：两卷 · 板块 · 章节标签 ── */
html body.hub .filters{align-items:center}
html body.hub .filter-label{margin:0 0 0 10px;font-size:12px;letter-spacing:.2em;color:var(--sf-faint)}
html body.hub .volume{margin-top:50px}
html body.hub .volume:not(:has(.subject:not([hidden]))){display:none}
html body.hub .volume-head{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:6px 14px;padding-bottom:12px;border-bottom:1px solid rgba(198,164,102,.5)}
html body.hub .volume-head b{font:400 clamp(30px,6vw,40px)/1.2 var(--sf-brush);letter-spacing:.14em;color:var(--sf-head);text-shadow:0 4px 18px rgba(0,0,0,.6)}
html body.hub .volume-head span{font-size:13px;color:var(--sf-muted)}
html body.hub .volume .subject{margin-top:28px}
html body.hub .subject>.topic-meta{margin:10px 0 2px}
html body.hub .topic-title .ch{display:inline-block;min-width:3.4em;margin-right:10px;padding:1px 8px;border-radius:4px;vertical-align:1px;text-align:center;
  font:700 12.5px/1.6 var(--sf-serif);font-style:normal;letter-spacing:.06em;color:var(--sf-gold-2);background:rgba(198,164,102,.1);box-shadow:inset 0 0 0 1px rgba(198,164,102,.35)}

/* ── 合并后的整章页、旧页提示 ── */
html body .merge-sub{display:flex;align-items:baseline;gap:12px;margin:34px 0 16px;padding:0 0 10px 22px;font:700 19px/1.4 var(--sf-serif);letter-spacing:.06em;color:var(--sf-head);
  border-bottom:1px solid rgba(198,164,102,.28);background:var(--sf-diamond) 2px calc(50% - 5px)/10px 10px no-repeat}
html body .merge-sub small{font:400 12px/1 var(--sf-serif);letter-spacing:.04em;color:var(--sf-muted)}
html body .merge-note{border-color:rgba(226,199,142,.55);background:linear-gradient(180deg,#24180f,#17110c)}
html body .merge-note a{margin-left:8px}
html body .hint.is-warn,html body .inline-message.is-warn{color:#ff9e8c}
@media (max-width:520px){
  html body.hub .intro{padding-top:30px}
  html body.hub .topic{padding:14px}
}
@media (prefers-reduced-motion:reduce){html body.hub .topic{transition:none}}
