:root{--bg:#f5f4f0;--paper:#fffefb;--ink:#3c3833;--muted:#81776b;--wine:#75434b;--line:#e1dcd3}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.6 Arial,"PingFang SC","Microsoft YaHei",sans-serif}button,input,textarea,select{font:inherit}button{cursor:pointer;border:0;background:none;border-radius:6px;padding:9px 13px;font-size:14px;color:inherit}button:hover{background:#eee7e2}button:disabled{cursor:wait;opacity:.55}button:focus-visible,a:focus-visible{outline:2px solid var(--wine);outline-offset:3px}a{color:inherit;text-decoration:none}a:hover{text-decoration:underline}.primary{background:var(--wine);color:#fff;padding:10px 17px}.primary:hover{background:#62343d}.outline{border:1px solid #c9bfb4;background:var(--paper)}[hidden]{display:none!important}.topbar{background:#fbfaf7;border-bottom:1px solid var(--line);min-height:87px;padding:18px 3.2%;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;align-items:center;gap:13px;font:600 20px/1.3 Georgia,"Songti SC",serif;letter-spacing:1px}.brand-icon{display:grid;place-items:center;background:var(--wine);color:white;width:42px;height:44px;border-radius:8px;font:28px Georgia}.brand small{display:block;font:10px Arial;letter-spacing:2.7px;margin-top:7px;color:var(--muted)}nav{display:flex;align-items:center;gap:8px;font-size:14px}nav>a{margin-right:8px}#recordCount{background:#eae4db;padding:2px 5px;border-radius:4px;margin-left:4px;font-size:12px}main{max-width:1680px;margin:auto;padding:31px 3.2% 0}.heading-row{display:flex;justify-content:space-between;align-items:center;gap:22px;margin-bottom:23px}.eyebrow{font-size:12px;color:#956875;letter-spacing:2px;margin:0 0 9px}h1{font:500 27px/1.4 Georgia,"Songti SC",serif;margin:0;overflow-wrap:anywhere}#subtitle{font-size:14px;color:var(--muted);margin:9px 0 0}.session-controls{display:flex;gap:10px;align-items:center}.timer{margin-right:12px;min-width:156px}.timer span{display:block;font-size:12px;color:var(--muted);text-align:center}.timer strong{font:500 29px/1.6 ui-monospace,Consolas,monospace;letter-spacing:2px;color:#594b3e;font-variant-numeric:tabular-nums}#clock.urgent{color:#a43345}.connection{display:flex;align-items:center;gap:8px;font-size:12px;color:#796e60;margin-bottom:16px;flex-wrap:wrap}.connection>span{margin-right:auto}.connection>span:before{content:' ';display:inline-block;width:6px;height:6px;background:#98a289;border-radius:50%;margin-right:8px}.connection button{padding:3px 9px;font-size:12px}.notice{padding:13px 16px;margin-bottom:16px;background:#fff2dd;border:1px solid #e7ceb0;border-radius:6px;font-size:14px}.error{background:#fff0e9;color:#873b37}.workspace{display:grid;grid-template-columns:1fr 1fr;gap:20px;height:calc(100dvh - 304px);min-height:560px;max-height:1100px}.reading-pane,.answer-pane{display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--paper);border:1px solid #ded8ce;border-radius:9px;overflow:hidden}.pane-heading{height:58px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:0 23px;border-bottom:1px solid var(--line);background:#faf9f5}.pane-heading b{font-size:15px;font-weight:500}.pane-heading>span{font-size:12px;color:var(--muted)}.tag{background:#eee9e2;padding:3px 8px;border-radius:4px}.tabs{display:flex;gap:25px;height:51px;padding:0 23px;border-bottom:1px solid #ece7de;flex-shrink:0}.tabs button{border-radius:0;padding:0 2px;color:var(--muted)}.tabs button[aria-selected=true]{border-bottom:2px solid var(--wine);color:var(--wine)}.paper{padding:32px 34px 40px;overflow-y:auto;flex:1;min-height:0;scrollbar-width:thin}.paper-kicker{font-size:10px;color:#9a826c;letter-spacing:2.5px}.paper h2{font:500 25px/1.4 Georgia,"Songti SC",serif;color:#574535;margin:14px 0 21px}.intro{color:#817466;font-size:16px;line-height:2}.steps{list-style:decimal-leading-zero;margin:30px 0;padding-left:27px}.steps li{padding-left:12px;margin:0 0 23px;color:#a79076;font-size:14px}.steps b{font-size:15px;color:#64564b;font-weight:500}.steps span{display:block;margin-top:5px;color:#8b7e70;font-size:13px}.quiet{font-size:12px;color:#8e8274;line-height:1.8}.prose{white-space:pre-wrap;overflow-wrap:anywhere;font-size:17px;line-height:2;color:#514b44}.editor-toolbar{height:51px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:0 24px;border-bottom:1px solid #ece7de;color:var(--muted);font-size:12px}.editor-toolbar button{font-size:13px;padding:5px 8px}.editor-wrap{flex:1;min-height:230px;position:relative}#answer{width:100%;height:100%;min-height:230px;display:block;resize:none;border:0;outline:0;padding:26px 28px;background:transparent;font-size:17px;line-height:2;color:#454139;scrollbar-width:thin}#answer::placeholder{color:#a49a8d}#answer:focus{box-shadow:inset 0 0 0 2px #75434b25}.editor-footer{padding:13px 23px;border-top:1px solid #ece7de;display:flex;justify-content:space-between;font-size:12px;color:#887b6b}.editor-footer b{font-size:14px;font-weight:500}.pause-overlay{position:absolute;inset:0;background:#fffefbf5;display:flex;flex-direction:column;justify-content:center;align-items:center}.pause-overlay h2{font-size:20px;font-weight:400;margin:0;color:#705d4b}.pause-overlay p{font-size:14px;color:var(--muted);margin:12px 0 23px}.review-box{background:#faf8f2;border-top:1px solid var(--line);padding:18px 23px}.review-box label{font-size:14px}.review-box textarea{display:block;margin-top:9px;width:100%;height:110px;resize:vertical;padding:10px;font-size:15px;border:1px solid #d9d0c4;border-radius:5px;background:var(--paper)}footer{padding:20px 0;display:flex;justify-content:space-between;gap:15px;color:#918879;font-size:12px}dialog{border:1px solid #d5cbbd;border-radius:12px;padding:29px;width:min(520px,calc(100vw - 30px));max-height:90dvh;overflow:auto;color:var(--ink);background:var(--paper);box-shadow:0 18px 80px #31231d33}dialog.wide{width:min(740px,calc(100vw - 30px))}dialog::backdrop{background:#261c1d66;backdrop-filter:blur(2px)}dialog h2{font-size:22px;font-weight:500;margin:0 0 10px}dialog p{font-size:14px;color:var(--muted);margin:10px 0 20px}.close{position:absolute;right:12px;top:9px;font-size:22px;padding:1px 9px;color:#928577}dialog label{display:block;font-size:14px;margin:17px 0;color:#695b4b}dialog small{font-size:12px;color:#998b7a;margin-left:5px}dialog input,dialog textarea,dialog select{display:block;width:100%;margin-top:7px;border:1px solid #d9d0c4;border-radius:5px;padding:10px 12px;line-height:1.6;background:#fffefb;color:var(--ink);font-size:15px}dialog textarea{resize:vertical}dialog input:focus,dialog textarea:focus,dialog select:focus,.review-box textarea:focus{outline:2px solid #ad82884a;border-color:#ad8288}.form-grid{display:grid;grid-template-columns:2fr 1fr 1fr;gap:13px}.dialog-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:21px}.dialog-actions>span{font-size:12px;color:var(--muted)}.form-error{color:#a33843!important;font-size:14px!important;white-space:pre-wrap}.history-item{display:flex;align-items:center;border-bottom:1px solid var(--line);gap:10px;padding:8px 0}.history-item>button:first-child{text-align:left;flex:1;min-width:0;padding:14px 8px}.history-item b{display:block;font-size:16px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.history-item small{font-size:12px;display:block;color:var(--muted);margin:6px 0 0}.history-item>button:last-child{font-size:12px;color:var(--wine)}@media(max-width:1000px){nav{gap:3px}nav a{display:none}.topbar{padding:16px 22px}.paper{padding:27px 24px}.workspace{gap:13px}.pane-heading{padding:0 18px}.session-controls{flex-wrap:wrap;justify-content:end}.timer{margin:0}h1{font-size:24px}}@media(max-width:700px){.topbar{padding:16px;flex-wrap:wrap;gap:14px}.brand{font-size:18px}.brand-icon{width:36px;height:39px}nav{width:100%;justify-content:space-between}nav button{font-size:12px;padding:7px 8px}main{padding:23px 16px 0}.heading-row{flex-direction:column;align-items:start;gap:18px}.session-controls{width:100%;justify-content:start}.timer{margin-right:auto}.timer span{text-align:left}.timer strong{font-size:25px}.workspace{display:flex;flex-direction:column;height:auto;max-height:none;gap:16px}.reading-pane{height:430px}.answer-pane{min-height:490px}.editor-wrap{height:340px;flex:auto}#answer{min-height:340px}footer{flex-direction:column;gap:5px}.form-grid{grid-template-columns:1fr 1fr}.form-grid label:first-child{grid-column:1/-1}.paper h2{font-size:23px}.steps{margin:25px 0}.steps li{margin-bottom:19px}.connection{gap:7px}.connection>span{width:100%;margin-bottom:3px}dialog{padding:25px 20px}.dialog-actions>span{max-width:140px}}


.scan-content{white-space:normal}.scan-caption{font-size:14px;line-height:1.6;color:var(--muted);margin:0 0 12px}.scan-frame{overflow-x:auto;margin:0 0 18px;background:white;border:1px solid var(--line);border-radius:4px}.scan-frame img{display:block;width:100%;height:auto}.scan-frame.zoomed img{width:1000px;max-width:none}.scan-zoom{font-size:14px;color:var(--wine);padding:6px 0;margin-bottom:4px}.paper:has(.scan-content){padding:18px 16px}.history-item b{white-space:normal}

/* Review notes keep their Markdown source; only the preview is formatted. */
.review-box{flex:0 1 45%;min-height:0;overflow-y:auto;scrollbar-width:thin}
.notes-hint{font-size:12px;color:var(--muted);margin:5px 0 8px;line-height:1.7}
.review-box textarea{min-height:110px;line-height:1.7}
.notes-preview-box{margin-top:16px;padding-top:12px;border-top:1px solid var(--line)}
.notes-preview-label{font-size:12px;color:var(--muted);margin-bottom:8px}
.notes-preview{font-size:15px;line-height:1.8;overflow-wrap:anywhere}
.notes-preview p{margin:0 0 .7em;white-space:pre-wrap}
.notes-preview h1,.notes-preview h2,.notes-preview h3,.notes-preview h4,.notes-preview h5,.notes-preview h6{font-family:inherit;font-weight:600;line-height:1.5;color:var(--ink);letter-spacing:normal;margin:1em 0 .45em}
.notes-preview h1{font-size:22px}.notes-preview h2{font-size:20px}.notes-preview h3{font-size:18px}.notes-preview h4,.notes-preview h5,.notes-preview h6{font-size:16px}
.notes-preview strong{font-weight:700;color:var(--wine)}
.notes-preview ul,.notes-preview ol{margin:.4em 0 .8em;padding-left:1.6em}
.notes-preview li{margin:.25em 0}.notes-preview>:first-child{margin-top:0}.notes-preview>:last-child{margin-bottom:0}
@media(max-width:700px){.review-box{flex:none;max-height:none;overflow:visible}}

#newerAttempt button{margin:6px 0 0 10px}


/* Compact desktop practice surface; review remains below both panes. */
.topbar{min-height:68px;padding:12px 3%}main{padding-top:20px}.heading-row{margin-bottom:14px}h1{font-size:23px}.workspace{height:calc(100dvh - 255px);min-height:480px}.paper{padding:24px 28px}.connection,.connection button,.pane-heading>span,.editor-toolbar,.editor-footer{font-size:14px}.session-controls{flex-wrap:wrap;justify-content:flex-end;flex-shrink:0}.timer{min-width:126px;margin-right:0}.timer strong{font-size:24px}.review-box{margin-top:20px;border:1px solid var(--line);border-radius:8px;padding:20px 24px}.review-heading{display:flex;align-items:center;justify-content:space-between;gap:15px}.review-heading h2{font-size:20px;margin:0}.review-heading>div{display:flex;align-items:center;gap:16px}.review-check{display:flex;align-items:center;gap:8px}.review-check input{width:18px;height:18px}.review-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:14px}.review-box textarea{min-height:200px;font-size:16px;line-height:1.7}.catalog-filters{display:grid;grid-template-columns:1fr 1fr 1.3fr;gap:12px}#aiPacket{width:100%;height:48vh;resize:vertical;font:15px/1.7 monospace;padding:16px;border:1px solid var(--line)}.notes-preview{overflow-wrap:anywhere}.history-item small{line-height:1.6}#historyList details{padding:0 12px 10px}#historyList summary{font-size:14px;cursor:pointer}.quiet,.notes-hint{font-size:14px}
@media(max-width:1050px){.heading-row{align-items:flex-start;flex-direction:column}.session-controls{justify-content:flex-start}.workspace{height:65vh}}
@media(max-width:760px){.workspace{height:auto}.review-grid,.catalog-filters{grid-template-columns:1fr}.review-heading{align-items:flex-start;flex-direction:column}.topbar{flex-wrap:wrap}nav{flex-wrap:wrap}.paper{max-height:65vh}.answer-pane{min-height:480px}}


.paper-years{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:20px 0}.paper-year{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:8px;padding:18px;border:1px solid var(--line);border-radius:8px;background:var(--paper,#fff)}.paper-year strong{font-size:22px;color:var(--wine)}.paper-year span{font-size:14px;line-height:1.7}.paper-year small{color:var(--muted)}.paper-outline{white-space:normal}.paper-outline p{white-space:pre-wrap;margin:0 0 1em}.paper-outline h2{font-size:22px;color:var(--wine);margin:1.8em 0 .6em}.paper-outline h3{font-size:18px;margin:1.3em 0 .5em}.paper-outline ul{padding-left:1.3em}.paper-outline li{margin:.5em 0}.paper-outline strong{color:var(--wine)}@media(max-width:650px){.paper-years{grid-template-columns:1fr}}

.paper-notice,.paper-meta{font-size:.86rem;line-height:1.75;color:var(--muted,#786e66)}
.paper-missing{padding:12px 15px;border:1px solid #c78b50;border-radius:8px;background:#fff8e9;color:#785127}
.paper-section{margin:24px 0;border-top:1px solid #ddd1bf;padding-top:18px}
.paper-section>summary{font-size:1.15rem;font-weight:700;cursor:pointer;line-height:1.6}
.paper-section h3{font-size:1rem;line-height:1.7;margin-top:24px}
.paper-scan{background:white;border:1px solid #e4dfd7;border-radius:4px;overflow:auto}
.paper-scan img{display:block;width:100%;height:auto;max-width:100%}
.paper-scan.zoomed img{width:1400px;max-width:none}
.paper-jump{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:16px 0}
.paper-jump select{max-width:100%;padding:8px;font:inherit}

.paper-material{white-space:pre-wrap;line-height:1.95;overflow-wrap:anywhere}.paper-section{margin:0;padding:0;border:0}.paper-section h2{margin-top:0}.paper-question{line-height:1.9;overflow-wrap:anywhere}
.paper-navigation{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:18px 0}.paper-navigation span{color:var(--wine);text-align:center;font-size:15px}.paper-navigation button{min-width:105px}.legacy-answer{margin:18px 0;padding:16px;border:1px solid var(--line);border-radius:8px}.legacy-answer pre{white-space:pre-wrap;font:inherit;line-height:1.8;overflow-wrap:anywhere}
@media(max-width:700px){.paper-navigation{position:sticky;bottom:0;background:var(--paper,#fffaf5);padding:12px 4px;z-index:2;border-top:1px solid var(--line)}.paper-navigation button{min-width:80px;padding:10px}.paper-navigation span{font-size:13px}}

.year-questions{display:grid;gap:10px;margin:20px 0}.year-question{display:flex;flex-direction:column;gap:6px;text-align:left;border:1px solid var(--line);padding:16px;border-radius:8px}.year-question strong{color:var(--wine);font-size:17px}.year-question small{color:var(--muted);font-size:14px}.question-flow{padding:12px 0 22px}.question-flow>div{display:flex;justify-content:space-between;gap:12px}.question-flow p{color:var(--wine)}.single-question .review-grid{grid-template-columns:1fr}.single-question .review-box{overflow:visible;max-height:none}

.mock-subjects{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}.mock-subjects button{font-size:14px}.mock-subjects button[aria-pressed=true]{background:var(--wine);color:#fff;border-color:var(--wine)}#mockList .year-question span{font-size:14px;color:var(--muted)}#mockList details{padding:0 12px 10px}#mockList summary{cursor:pointer;font-size:14px}.mock-page{max-width:1100px;margin:auto;padding-bottom:36px}.mock-page h1{font-size:30px}.mock-page .paper-years{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}.mock-page .paper-year{text-decoration:none;color:var(--ink)}.mock-page .paper-year:hover{border-color:var(--wine);background:#f7f1ed}.mock-page .paper-year small{font-size:14px}.mock-page .mock-note{font-size:16px;line-height:1.8;color:var(--muted)}.mock-page .mock-count{font:500 36px/1.2 Georgia,serif;color:var(--wine)}@media(max-width:700px){.mock-page .paper-years{grid-template-columns:1fr}.mock-page h1{font-size:26px}}

.mock-topic .topbar nav a{display:inline-flex;font-size:14px}
/* Keep timer, 重新作答 and other session controls on the right at narrow widths too. */
@media(max-width:1050px){.heading-row{align-items:stretch}.session-controls{width:100%;justify-content:flex-end}.timer{margin-right:0}.timer span{text-align:right}}
