/* The supplied paper-study reference, reduced to its pages, spine and folios.
 * Scoped to practice so the existing workspace keeps its visual language. */
.practice-book,.book-directory{
  --book-paper:#faf8f2;
  --book-notes:#f5f2e9;
  --book-ink:#30302b;
  --book-muted:#74736b;
  --book-line:#d9d6cc;
  --book-accent:#a64e36;
  --book-good:#526652;
  --book-hover:#eeece3;
  --book-serif:"Songti SC","STSong","Noto Serif CJK SC","SimSun",serif;
  color:var(--book-ink);
}
body.practice-mode .content:has(.practice-book){max-width:1160px;width:calc(100% - 80px);margin:14px auto 40px}
.book-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 2px 18px;color:var(--book-muted);font-size:13px;line-height:22px}
.book-heading>span:first-child{overflow-wrap:anywhere}
.book-position{flex:none;font-size:17px;color:var(--book-ink);letter-spacing:.04em}
.book-position>span{font-size:12px;color:var(--book-muted)}
.book-spread{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));background:var(--book-paper);border:1px solid var(--book-line);box-shadow:0 3px 0 -1px var(--book-paper),0 4px 0 -1px var(--book-line),0 14px 32px -24px #40382c60;perspective:1800px;isolation:isolate}
.book-spread::after{content:"";position:absolute;top:0;bottom:0;left:50%;width:22px;transform:translateX(-50%);background:linear-gradient(90deg,transparent,#62573e08 32%,#62573e19 49%,#ffffff42 53%,transparent);pointer-events:none;z-index:3}
.book-paper{min-width:0;min-height:568px;display:flex;flex-direction:column;padding:25px 38px 22px;background:var(--book-paper);overflow-wrap:anywhere}
.book-notes{background:var(--book-notes);border-left:1px solid var(--book-line)}
.book-running-head{min-height:40px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:13px;border-bottom:1px solid var(--book-line);color:var(--book-muted);font-size:11px;line-height:19px}
.book-question .book-running-head>span:last-child{flex:none}
.book-favorite{display:flex;align-items:center;justify-content:center;gap:6px;min-height:30px;margin:-5px -5px -5px 0;padding:5px;font-size:11px;color:var(--book-muted);white-space:nowrap}
.book-favorite .icon{width:14px;height:14px}
.book-favorite:hover,.book-favorite.saved{color:var(--book-accent)}
.book-favorite.saved .icon{fill:var(--book-accent);fill-opacity:.1}
.book-question-body{flex:1}
.practice-book .question-title{font-family:var(--book-serif);font-size:23px;font-weight:500;line-height:1.8;letter-spacing:0;color:var(--book-ink);margin:29px 0 25px;max-width:none;white-space:pre-wrap}
.practice-book .question-title:focus,.book-notes-title:focus{outline:none}
.practice-book img{max-width:100%;height:auto;display:block;margin:14px 0;border-radius:0}
.practice-book .options{display:flex;flex-direction:column;gap:0;margin:0;border-top:1px solid var(--book-line)}
.practice-book .options .option{display:grid;grid-template-columns:23px minmax(0,1fr) 17px;align-items:start;gap:12px;min-height:57px;width:100%;margin:0;padding:14px 10px;border:0;border-bottom:1px solid var(--book-line);border-radius:0;background:transparent;text-align:left;box-shadow:none;transition:background 120ms}
.practice-book .option .letter{display:block;width:auto;height:auto;padding:0;font:16px/27px Georgia,serif;color:var(--book-muted);background:none;border:0;border-radius:0}
.practice-book .option .option-text{font-size:15px;line-height:27px;color:var(--book-ink);white-space:pre-wrap}
.practice-book .choice-indicator{width:13px;height:13px;align-self:start;margin-top:7px;border:1px solid var(--book-line);border-radius:50%;background:none;opacity:0}
.practice-book .choice-indicator::after{display:none}
.practice-book .option:hover:not(:disabled){background:var(--book-hover);transform:none}
.practice-book .option:hover .choice-indicator{opacity:1}
.practice-book .option.selected{background:var(--book-hover);box-shadow:inset 2px 0 0 var(--book-accent)}
.practice-book .option.selected .choice-indicator{opacity:1;border-color:var(--book-accent);background:var(--book-accent);box-shadow:inset 0 0 0 3px var(--book-paper)}
.practice-book .option.correct{background:#5266520b;box-shadow:inset 2px 0 0 var(--book-good)}
.practice-book .option.incorrect{background:#a64e360b;box-shadow:inset 2px 0 0 var(--book-accent)}
.practice-book .option:disabled{opacity:1;cursor:default}
.practice-book .answer-icon{width:16px;height:16px;align-self:start;margin-top:5px;color:var(--book-good)}
.practice-book .incorrect .answer-icon{color:var(--book-accent)}
.practice-book .question-actions{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:16px;margin:27px 0 0;padding:0;border:0}
.practice-book .question-actions .button{min-height:44px;height:auto;min-width:144px;padding:12px 16px;margin-left:auto;font-size:13px;line-height:20px;justify-content:space-between;border-radius:2px;box-shadow:none;background:var(--book-ink);color:var(--book-paper);gap:18px}
.practice-book .question-actions .button:hover:not(:disabled){background:var(--book-accent);transform:none}
.practice-book .question-actions .button:disabled{opacity:.35}
.practice-book .keyboard-note,.practice-book .keyboard-note kbd{font-size:11px;line-height:20px;color:var(--book-muted)}
.practice-book .keyboard-note{margin:0}
.practice-book .keyboard-note kbd{padding:0;border:0;background:none}
.practice-book .shortcut-separator{margin:0 7px}
.book-folio{display:flex;justify-content:space-between;align-items:center;gap:12px;border-top:1px solid var(--book-line);margin-top:35px;padding-top:13px;font-size:10px;line-height:18px;color:var(--book-muted)}
.book-folio>.num{font:13px/18px Georgia,serif;color:var(--book-ink)}
.book-notes-body{flex:1;padding-top:26px}
.book-notes-title{font-family:var(--book-serif);font-weight:500;font-size:26px;line-height:1.5;margin:0 0 23px;color:var(--book-ink)}
.book-quiet{flex:1;padding-top:74px}
.book-section-label{display:block;font-size:11px;line-height:20px;font-weight:400;letter-spacing:.04em;color:var(--book-muted);margin:0 0 12px}
.book-quiet h2{font-family:var(--book-serif);font-size:31px;line-height:1.65;font-weight:400;margin:19px 0 21px;color:var(--book-ink)}
.book-quiet p{font-size:12px;line-height:23px;color:var(--book-muted);margin:0;max-width:250px}
.book-quiet-rule{display:block;width:32px;height:1px;background:var(--book-accent);margin-top:31px}
.book-analysis-part+.book-analysis-part{margin-top:27px;padding-top:22px;border-top:1px solid var(--book-line)}
.book-result{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:12px;line-height:22px;color:var(--book-good);margin:0 0 15px}
.book-result>.icon{width:15px;height:15px}
.book-result.wrong{color:var(--book-accent)}
.book-result>span{flex-basis:100%;color:var(--book-muted);font-size:12px}
.book-result b{font-family:Georgia,serif;color:var(--book-ink);font-size:16px;margin-left:5px}
.book-explanation{font-size:14px;line-height:2;color:var(--book-ink)}
.book-takeaway{margin-top:26px;padding:18px 0 0;border-top:1px solid var(--book-line)}
.book-takeaway .book-section-label{color:var(--book-accent);margin-bottom:9px}
.book-takeaway>div{font:17px/1.9 var(--book-serif);white-space:pre-wrap}
.book-subquestion{margin-top:26px}
.book-subprompt{font-size:15px;line-height:1.9;white-space:pre-wrap;margin-bottom:12px}
.practice-book .answer-area{font-family:inherit;font-size:14px;line-height:1.9;color:var(--book-ink);background:transparent;border:1px solid var(--book-line);border-radius:2px;padding:13px;min-height:140px;width:100%;resize:vertical}
.practice-book .answer-area.essay{min-height:290px}
.practice-book .answer-area:disabled{color:var(--book-muted);opacity:1}
.practice-book .answer-area::placeholder{color:var(--book-muted);font-size:12px}
.practice-book .req-list{font-size:14px;line-height:1.9;color:var(--book-ink);margin:0 0 22px;padding-left:20px}
.practice-book .points-list{margin:12px 0 0;padding-left:20px;line-height:1.9}
.practice-book .mark-row{display:flex;flex-wrap:wrap;gap:8px;margin:17px 0 0}
.practice-book .mark-btn{display:flex;align-items:center;gap:5px;min-height:38px;padding:7px 11px;border:1px solid var(--book-line);border-radius:2px;background:transparent;color:var(--book-muted);font-size:12px}
.practice-book .mark-btn>.icon{width:13px;height:13px}
.practice-book .mark-btn.active-yes{border-color:var(--book-good);color:var(--book-good);background:#5266520b}
.practice-book .mark-btn.active-no{border-color:var(--book-accent);color:var(--book-accent);background:#a64e360b}
.book-controls{padding:23px 2px 0}
.book-progress{display:flex;align-items:center;gap:20px;color:var(--book-muted);font-size:11px;line-height:20px}
.book-progress>span:first-child{flex:none}
.book-progress b{font-weight:400;color:var(--book-ink);margin-left:4px}
.book-progress-line{flex:1;height:1px;background:var(--book-line)}
.book-progress-line i{display:block;height:2px;background:var(--book-accent)}
.book-progress>button{display:flex;align-items:center;gap:7px;padding:8px 0 8px 8px;font-size:11px;color:var(--book-muted);min-height:36px}
.book-progress>button>.icon{width:14px;height:14px}
.book-pagination{display:grid;grid-template-columns:100px minmax(0,1fr) 100px;align-items:center;gap:12px;margin-top:14px}
.book-pagination>button{display:flex;align-items:center;gap:10px;min-height:44px;padding:8px 0;font-size:12px;line-height:20px;color:var(--book-ink)}
.book-pagination>button>.icon{width:18px;height:18px}
.book-pagination .book-prev>.icon{transform:rotate(180deg)}
.book-pagination .book-next{justify-content:flex-end;color:var(--book-accent)}
.book-pagination>button:disabled{opacity:.3;cursor:default}
.book-pages{display:flex;justify-content:center;align-items:center;gap:5px}
.book-page-link{position:relative;display:grid;place-items:center;min-width:32px;height:42px;padding:0 3px;color:var(--book-muted);font-size:12px}
.book-page-link.current{background:var(--book-accent);color:var(--book-paper)}
.book-page-link:not(.current):hover{background:var(--book-paper);color:var(--book-ink)}
.book-answer-dot{position:absolute;bottom:1px;left:50%;transform:translateX(-50%);color:var(--book-good)}
.book-answer-dot>.icon{width:9px;height:9px}
.is-wrong .book-answer-dot{color:var(--book-accent)}
.current .book-answer-dot{color:var(--book-paper)}
.book-ellipsis{width:18px;text-align:center;color:var(--book-muted);font-size:12px}
.practice-book button:focus-visible,.book-directory button:focus-visible,.practice-book textarea:focus-visible{outline:2px solid var(--book-accent);outline-offset:3px}
.book-directory{width:650px;max-width:calc(100vw - 32px);background:var(--book-paper)}
.book-directory-caption{font-size:12px;line-height:22px;color:var(--book-muted);margin:0 0 20px}
.book-directory-grid{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:8px;max-height:50vh;overflow:auto;padding:4px}
.book-directory-entry{position:relative;display:grid;place-items:center;height:44px;font-size:12px;border:1px solid var(--book-line);color:var(--book-muted)}
.book-directory-entry.current{border-color:var(--book-accent);color:var(--book-accent);background:var(--book-hover)}
.book-directory-legend{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--book-muted);margin:20px 0 0}
.book-directory-legend>.icon{width:12px;height:12px;color:var(--book-good)}
.book-directory-legend>.icon:nth-of-type(2){color:var(--book-accent);margin-left:12px}
/* Only these inert, clipped copies rotate; real content never clips. */
.book-turn-mask{position:absolute;inset:-6px;overflow:hidden;pointer-events:none;z-index:5}
.book-turn-surface{position:absolute;inset:6px;perspective:8000px;isolation:isolate}
.book-leaf{position:absolute;top:0;bottom:0;width:50%;z-index:5;transform-style:preserve-3d;pointer-events:none;will-change:transform}
.book-leaf.forward{left:50%;transform-origin:left center}
.book-leaf.backward{left:0;transform-origin:right center}
.book-leaf-face{position:absolute;inset:0;overflow:hidden;backface-visibility:hidden;background:var(--book-paper);box-shadow:0 0 22px #40382c18}
.book-leaf-back{transform:rotateY(180deg)}
.book-leaf-face::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,transparent 45%,#62573e12)}
.book-leaf-face>.book-paper,.book-resting>.book-paper{height:100%;min-height:100%;border-left:0}
.book-resting{position:absolute;top:0;bottom:0;width:50%;overflow:hidden;z-index:4;pointer-events:none}
.book-resting.left{left:0}.book-resting.right{right:0}
.reading-night .practice-book,.reading-night .book-directory{--book-paper:#2e2d2a;--book-notes:#292824;--book-ink:#e1dfd7;--book-muted:#b2afa4;--book-line:#4b4941;--book-accent:#d09a7e;--book-good:#b0bda2;--book-hover:#38362f}
.reading-night .practice-book .question-actions .button{color:var(--book-paper)}
@media(max-width:1100px) and (min-width:900px){.book-paper{padding-left:28px;padding-right:28px}.practice-book .question-title{font-size:21px}.practice-book .keyboard-note{display:none}.book-running-head{gap:10px}}
@media(max-width:899px){
  body.practice-mode .content:has(.practice-book){width:calc(100% - 48px);max-width:660px;margin-top:12px}
  .book-spread{grid-template-columns:1fr;perspective:none}
  .book-spread::after{display:none}
  .book-paper{min-height:0;padding:24px 32px 22px}
  .book-notes{border-left:0;border-top:1px solid var(--book-line)}
  .book-notes .book-running-head{min-height:32px;margin-bottom:16px}
  .book-question .book-folio{display:none}
  .book-quiet{padding:8px 0 3px}
  .book-quiet>.book-section-label,.book-quiet h2,.book-quiet-rule{display:none}
  .book-quiet p{max-width:none}
  .book-notes:has(.book-quiet) .book-folio{display:none}
  .book-notes-body{padding-top:0}
  .book-notes-title{font-size:24px;margin-bottom:18px}
  .book-folio{margin-top:26px}
  .book-leaf,.book-resting{display:none}
}
@media(max-width:600px){
  body.practice-mode .content:has(.practice-book){width:calc(100% - 28px);margin-bottom:28px}
  .book-heading{padding-bottom:13px;font-size:11px;gap:12px}
  .book-paper{padding:20px 22px}
  .book-running-head{font-size:10px;gap:9px}
  .practice-book .question-title{font-size:21px;line-height:1.85;margin:24px 0}
  .practice-book .options .option{padding:14px 5px;gap:10px;grid-template-columns:19px minmax(0,1fr) 14px}
  .practice-book .option .option-text{font-size:15px;line-height:27px}
  .practice-book .keyboard-note{display:none}
  .book-controls{padding-top:16px}
  .book-progress{gap:12px}
  .book-pagination{grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}
  .book-pages{grid-column:1/-1;grid-row:1;gap:3px}
  .book-page-link{min-width:30px;height:40px}
  .book-pagination .book-prev{grid-row:2}
  .book-pagination .book-next{grid-row:2}
  .book-directory-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
  .book-favorite{min-height:34px}
}
@media(hover:none){.practice-book .option:hover:not(:disabled){background:transparent}.practice-book .option.selected:hover{background:var(--book-hover)}}
@media(prefers-reduced-motion:reduce){.book-leaf,.book-resting{display:none}.practice-book *{animation:none!important;transition:none!important}}
