:root {
  --ink:#173c30; --muted:#607168; --green:#2f684f; --green-dark:#204c3b;
  --cream:#fffaf0; --line:rgba(31,76,59,.16); --soft:#f1f5ec;
  --red:#a8372a; --red-soft:#fff0ed; --blue-soft:#eaf4f5;
  --shadow:0 18px 50px rgba(24,57,45,.12);
}
*{box-sizing:border-box} html{scroll-behavior:smooth} body{margin:0;background:#fffdf8;color:var(--ink);font-family:"Noto Sans TC","Microsoft JhengHei",system-ui,sans-serif;line-height:1.65} button,a{font:inherit} button{cursor:pointer} img{display:block;max-width:100%}
.bio-header{position:sticky;top:0;z-index:30;display:flex;align-items:center;justify-content:space-between;gap:1rem;min-height:74px;padding:.7rem clamp(1rem,4vw,3.5rem);background:rgba(255,253,248,.96);border-bottom:1px solid var(--line);backdrop-filter:blur(14px)}
.brand{display:flex;align-items:center;gap:.75rem;color:inherit;text-decoration:none}.brand-mark{display:grid;place-items:center;width:44px;height:44px;border-radius:50% 50% 50% 12%;background:var(--green);color:#fff;font-weight:900;font-size:1.35rem}.brand strong,.brand small{display:block}.brand strong{font-size:1.25rem}.brand small{font-size:.78rem;color:var(--muted)}.home-link{color:var(--green-dark);font-weight:800;text-decoration:none;padding:.5rem .9rem;border:1px solid var(--line);border-radius:999px;background:#fff}
main{width:min(1560px,100%);margin:0 auto;padding:0 clamp(1rem,3vw,2.6rem) 5rem}.intro{display:grid;grid-template-columns:1.4fr .6fr;gap:2rem;align-items:end;padding:clamp(2.6rem,7vw,5.5rem) 0 2.5rem}.eyebrow{margin:0 0 .35rem;color:var(--green);font-size:.86rem;font-weight:900;letter-spacing:.12em}.intro h1,.section-title h2,.workspace-head h2,.result-card h2{margin:.15rem 0;font-family:"Noto Serif TC","PMingLiU",serif;line-height:1.18}.intro h1{font-size:clamp(2.6rem,5vw,5.2rem)}.intro>div>p:last-child{max-width:850px;color:#42554b;font-size:1.06rem}.intro-note{padding:1.3rem 1.5rem;border-radius:20px;background:var(--ink);color:#fff;box-shadow:var(--shadow)}.intro-note strong,.intro-note span{display:block}.intro-note span{margin-top:.35rem;color:rgba(255,255,255,.76)}
.exam-picker{padding:1.5rem 0 3.2rem}.section-title h2{font-size:clamp(2rem,3.6vw,3.25rem)}.exam-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem;margin-top:1.4rem}.exam-card{display:flex;flex-direction:column;min-height:245px;padding:1.5rem;border:1px solid var(--line);border-radius:22px;background:linear-gradient(145deg,#edf4e8,#dcebd2);box-shadow:var(--shadow)}.exam-card:nth-child(2){background:linear-gradient(145deg,#eaf4f5,#d4eaeb)}.exam-card:nth-child(3){background:linear-gradient(145deg,#f5edf8,#e6d9ee)}.exam-card .exam-year{font-size:.84rem;font-weight:900;color:var(--green)}.exam-card h3{margin:.45rem 0 .6rem;font-size:1.35rem;line-height:1.35}.exam-card p{margin:0;color:#52635b}.exam-card button{margin-top:auto;min-height:48px;border:0;border-radius:12px;background:var(--ink);color:#fff;font-weight:900}.exam-card button:hover{background:#a64b24}
.workspace{scroll-margin-top:90px}.workspace-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.3rem 1.5rem;border:1px solid var(--line);border-radius:20px;background:#fff;box-shadow:var(--shadow)}.workspace-head h2{font-size:clamp(1.7rem,3vw,2.7rem)}.muted{margin:.35rem 0 0;color:var(--muted)}.workspace-actions{display:flex;gap:.7rem;flex-wrap:wrap}.primary,.secondary{min-height:46px;padding:.65rem 1.1rem;border-radius:12px;font-weight:900}.primary{border:0;background:var(--green);color:#fff}.primary:hover{background:var(--green-dark)}.secondary{border:1px solid var(--line);background:#fff;color:var(--ink)}
.study-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(330px,420px);gap:1.2rem;align-items:start;margin-top:1.2rem}.paper-panel,.answer-panel{border:1px solid var(--line);border-radius:20px;background:#fff;box-shadow:var(--shadow);overflow:hidden}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.15rem;border-bottom:1px solid var(--line)}.panel-head h3{margin:0;font-size:1.3rem}.page-controls,.zoom-controls,.explanation-toolbar{display:flex;align-items:center;justify-content:center;gap:.55rem}.page-controls button,.zoom-controls button,.explanation-toolbar button{min-height:40px;padding:.45rem .75rem;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);font-weight:800}.page-controls span{min-width:72px;text-align:center;font-weight:900}.zoom-controls{justify-content:flex-end;padding:.6rem 1rem;background:#f7f8f2;border-bottom:1px solid var(--line)}.paper-scroll{overflow:auto;max-height:calc(100vh - 220px);padding:1rem;background:#eef0ea}.paper-scroll img{width:100%;max-width:none;margin:0 auto;background:white;box-shadow:0 7px 26px rgba(0,0,0,.09);transition:width .15s ease}.paper-tip{margin:0;padding:.8rem 1rem;color:var(--muted);font-size:.86rem;background:#fff}
.answer-panel{position:sticky;top:88px;max-height:calc(100vh - 105px);overflow:auto}.sticky-head{position:sticky;top:0;z-index:4;background:#fff}.progress-pill{white-space:nowrap;padding:.25rem .65rem;border-radius:999px;background:var(--soft);font-size:.82rem;font-weight:900}.answer-note{margin:0;padding:.85rem 1rem;color:#52635b;background:#f7f8f2;border-bottom:1px solid var(--line);font-size:.9rem}.answer-list{display:grid;gap:.62rem;padding:.85rem}.answer-item{border:1px solid var(--line);border-radius:13px;padding:.7rem;background:#fff}.answer-item.correct{border-color:#63a272;background:#edf8ef}.answer-item.wrong{border-color:#d87968;background:var(--red-soft)}.answer-item.unanswered-after{border-color:#d4a14e;background:#fff7e8}.answer-row{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.q-label{font-weight:900}.answer-state{font-size:.78rem;color:var(--muted)}.option-group{display:flex;gap:.35rem;flex-wrap:wrap;margin-top:.55rem}.option-button{display:grid;place-items:center;min-width:38px;height:38px;padding:0 .55rem;border:1px solid #b6c2bc;border-radius:9px;background:#fff;font-weight:900;color:#29483d}.option-button.selected{background:var(--green);border-color:var(--green);color:#fff}.option-button.correct-key{outline:3px solid #5d9c6c;outline-offset:2px}.option-button.user-wrong{background:#c34d3d;border-color:#c34d3d;color:#fff}.correct-text{margin:.55rem 0 0;color:#2d6943;font-size:.84rem;font-weight:800}
.result-section{margin-top:1.5rem}.result-card{display:flex;align-items:center;justify-content:space-between;gap:2rem;padding:1.5rem;border:1px solid var(--line);border-radius:20px;background:linear-gradient(145deg,#f4f8ef,#e7f0dd);box-shadow:var(--shadow)}.score-ring{display:grid;place-items:center;align-content:center;width:120px;height:120px;flex:0 0 auto;border-radius:50%;background:#fff;border:10px solid #cfe0c2;box-shadow:inset 0 0 0 1px var(--line)}.score-ring strong{font-size:1.8rem;line-height:1}.score-ring span{font-size:.75rem;color:var(--muted);margin-top:.3rem}.wrong-box{margin-top:1rem;padding:1.15rem;border:1px solid var(--line);border-radius:18px;background:#fff}.wrong-box h3{margin:.1rem 0 .6rem}.wrong-chips{display:flex;flex-wrap:wrap;gap:.45rem}.wrong-chip{border:0;border-radius:999px;background:#fde7e2;color:#8f2f24;padding:.38rem .7rem;font-weight:900}.all-correct{color:#24673c;font-weight:900}
.explanation-section{margin-top:2rem;padding-top:1rem;border-top:1px solid var(--line)}.explanation-title-row{display:flex;align-items:end;justify-content:space-between;gap:1rem}.explanation-viewer{margin-top:1rem;border:1px solid var(--line);border-radius:20px;background:#fff;overflow:hidden;box-shadow:var(--shadow)}.explanation-toolbar{padding:.8rem;background:#f7f8f2;border-bottom:1px solid var(--line)}.explanation-toolbar span{min-width:90px;text-align:center;font-weight:900}.explanation-image-wrap{overflow:auto;max-height:80vh;padding:1rem;background:#eef0ea}.explanation-image-wrap img{width:min(1500px,100%);max-width:none;margin:auto;background:#fff;box-shadow:0 8px 30px rgba(0,0,0,.09)}
footer{display:flex;justify-content:space-between;gap:1rem;padding:2rem clamp(1rem,4vw,3.5rem);border-top:1px solid var(--line);background:#f4f5ec;color:var(--muted);font-size:.88rem}footer p{margin:0}
:focus-visible{outline:3px solid #e59b32;outline-offset:3px}
@media(max-width:1050px){.intro{grid-template-columns:1fr}.exam-cards{grid-template-columns:1fr}.study-layout{grid-template-columns:1fr}.answer-panel{position:relative;top:auto;max-height:none}.paper-scroll{max-height:none}.workspace-head{align-items:flex-start;flex-direction:column}.answer-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){main{padding-inline:.75rem}.bio-header{padding-inline:.75rem}.brand small{display:none}.home-link{font-size:.88rem}.intro{padding-top:2.4rem}.intro h1{font-size:2.55rem}.exam-card{min-height:220px}.workspace-head{padding:1rem}.workspace-actions{width:100%}.workspace-actions button{flex:1}.panel-head{padding:.8rem}.zoom-controls{justify-content:center}.paper-scroll{padding:.5rem}.answer-list{grid-template-columns:1fr}.result-card{align-items:flex-start}.score-ring{width:96px;height:96px;border-width:8px}.score-ring strong{font-size:1.4rem}.explanation-title-row{align-items:flex-start;flex-direction:column}.explanation-title-row button{width:100%}footer{flex-direction:column}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important}}

.source-notice {
  margin-top: .65rem;
  padding: .65rem .75rem;
  border-radius: 10px;
  background: rgba(126, 76, 25, .10);
  color: #6e441f;
  font-size: .9rem;
  line-height: 1.55;
}

/* v3：逐題立即訂正模式 */
.study-progress{height:10px;margin:1rem 0 0;border-radius:999px;background:#e6ece7;overflow:hidden}.study-progress span{display:block;width:0;height:100%;background:var(--green);transition:width .25s ease}.page-note{margin:.2rem 0 0;color:var(--muted);font-size:.84rem}.current-question-card{padding:1rem}.question-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.question-card-head h2{margin:.2rem 0 0;font-family:"Noto Serif TC","PMingLiU",serif;font-size:2rem}.question-kind{display:inline-block;padding:.2rem .55rem;border-radius:999px;background:var(--blue-soft);color:#356168;font-size:.78rem;font-weight:900}.question-step{padding:.38rem .65rem;border-radius:999px;background:var(--soft);font-size:.85rem;white-space:nowrap}.question-instruction{margin:.75rem 0;color:#52635b}.current-options{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.55rem;margin:.9rem 0}.current-options .option-button{height:52px;font-size:1.08rem}.confirm-current{width:100%;margin-top:.4rem}.instant-feedback{display:flex;align-items:center;gap:.9rem;margin-top:1rem;padding:1rem;border-radius:16px;border:1px solid}.instant-feedback.pass{background:#edf8ef;border-color:#70ad7d;color:#215f36}.instant-feedback.fail{background:var(--red-soft);border-color:#dc887b;color:#8e3025}.feedback-mark{display:grid;place-items:center;min-width:76px;min-height:58px;padding:.45rem .65rem;border-radius:12px;background:#fff;font-size:1.3rem;font-weight:1000;box-shadow:0 6px 18px rgba(0,0,0,.06)}.instant-feedback strong{font-size:1.1rem}.instant-feedback p{margin:.2rem 0 0;font-weight:800}.instant-explanation{margin-top:1rem;border:1px solid #e0b0a7;border-radius:16px;overflow:hidden;background:#fff}.instant-exp-head{padding:1rem;background:#fff6f3;border-bottom:1px solid #efd0c9}.instant-exp-head h3{margin:.15rem 0;font-size:1.15rem}.instant-exp-scroll{overflow:auto;max-height:56vh;padding:.65rem;background:#eceee9}.instant-exp-scroll img{width:100%;max-width:none;margin:auto;background:#fff;box-shadow:0 8px 25px rgba(0,0,0,.08)}.question-nav-actions{display:flex;gap:.65rem;margin-top:1rem}.question-nav-actions button{flex:1}.next-question{min-height:50px}.answer-panel{overflow:auto}.all-correct{margin:0}.wrong-box .muted{margin-top:.2rem}
@media(max-width:650px){.current-options{grid-template-columns:repeat(5,1fr);gap:.35rem}.current-options .option-button{min-width:0;height:48px;padding:0}.question-card-head h2{font-size:1.7rem}.instant-feedback{align-items:flex-start}.feedback-mark{min-width:68px}.question-nav-actions{flex-direction:column}.instant-exp-scroll{max-height:50vh}}

/* v4：每題只顯示該題解析，避免洩漏其他題答案 */
.single-exp-only{margin:.7rem 0 0;padding:.55rem .7rem;border-radius:10px;background:#fff;border:1px solid #efd0c9;color:#8e3025;font-size:.86rem;font-weight:900}.instant-exp-scroll{background:#f3f2ee}.instant-exp-scroll img{display:block;width:100%;height:auto}.instant-exp-head{position:sticky;top:0;z-index:2}
