:root {
  --paper: #f1f4f1;
  --paper-warm: #faf8f1;
  --sheet: #fffef9;
  --ink: #14211d;
  --muted: #61726b;
  --jade: #1f6f5e;
  --jade-deep: #154f43;
  --jade-soft: #dfece7;
  --red: #b83d32;
  --red-soft: #f6e7e3;
  --gold: #9a7a34;
  --line: rgba(20, 33, 29, 0.13);
  --shadow: 0 18px 52px rgba(28, 58, 49, 0.09);
  --display: "Fraunces", "Noto Serif SC", Georgia, serif;
  --body: "Source Serif 4", "Noto Serif SC", Georgia, serif;
}

* { box-sizing: border-box; }
html { color: var(--ink); background: var(--paper); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; font-family: var(--body); background:
  radial-gradient(circle at 92% 5%, rgba(31,111,94,.13), transparent 27rem),
  radial-gradient(circle at 2% 92%, rgba(184,61,50,.06), transparent 25rem), var(--paper); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }

.portal-return { position: fixed; right: 16px; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 9999; display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px 8px 9px; border: 1px solid rgba(21,32,28,.13); border-radius: 999px; background: rgba(255,255,255,.93); box-shadow: 0 10px 28px rgba(21,32,28,.1); color: var(--jade-deep); font: 600 13px/1.2 "Noto Serif SC",serif; text-decoration: none; backdrop-filter: blur(10px); transition: transform .18s ease, border-color .18s ease; }
.portal-return span { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; background: var(--jade); color: #fff; font-size: 12px; }
.portal-return:hover, .portal-return:focus-visible { border-color: var(--jade); outline: none; transform: translateY(-2px); }

.paper-grain { position: fixed; inset: 0; z-index: 20; pointer-events: none; opacity: .025; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.3'/%3E%3C/svg%3E"); }

.site-header, .site-footer, .app-shell { width: min(1240px, calc(100% - 40px)); margin-inline: auto; }
.site-header { display: flex; justify-content: space-between; align-items: center; padding: 24px 0 18px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img { width: 48px; height: 48px; border-radius: 10px; box-shadow: 0 8px 22px rgba(83,44,37,.13); }
.brand span { display: flex; flex-direction: column; line-height: 1.2; }
.brand strong { font-family: var(--display); font-size: 1.05rem; }
.brand small { margin-top: 4px; color: var(--muted); font-size: .64rem; letter-spacing: .14em; }
.home-link { color: var(--jade-deep); font-size: .8rem; border-bottom: 1px solid rgba(31,111,94,.28); }
.app-shell { min-height: calc(100vh - 160px); padding: 38px 0 54px; }

.eyebrow { margin: 0 0 14px; color: var(--jade); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.landing-hero { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(260px,.65fr); gap: 44px; align-items: center; padding: 30px 0 44px; }
.reading-quote-card { position: relative; overflow: hidden; max-width: 760px; padding: clamp(24px,3.4vw,42px); border: 1px solid rgba(31,111,94,.2); border-radius: 16px; background: linear-gradient(145deg,rgba(255,254,249,.97),rgba(226,239,233,.9)); box-shadow: var(--shadow); }
.reading-quote-card::after { position: absolute; right: -12px; bottom: -44px; color: rgba(31,111,94,.055); font-family: "Noto Serif SC",serif; font-size: 10rem; font-weight: 700; content: "阅"; }
.reading-quote-card > span { position: relative; z-index: 1; color: var(--red); font-size: .67rem; font-weight: 700; letter-spacing: .15em; }
.landing-hero h1 { position: relative; z-index: 1; max-width: 680px; margin: 18px 0 10px; font-family: var(--display); font-size: clamp(2rem,4.2vw,4.2rem); font-weight: 600; letter-spacing: -.045em; line-height: 1.08; }
.landing-hero h1 em { color: var(--jade); font-style: normal; }
.reading-quote-card p { position: relative; z-index: 1; margin: 0; color: var(--jade-deep); font-size: clamp(.92rem,1.35vw,1.08rem); font-style: italic; }
.hero-note { padding-left: 20px; border-left: 2px solid var(--red); color: var(--muted); line-height: 1.85; }
.hero-note strong { display: block; margin-bottom: 7px; color: var(--ink); font-family: var(--display); font-size: 1.15rem; }
.history-shortcut { display: grid; width: 100%; gap: 2px; margin-top: 20px; padding: 15px 16px; border: 1px solid rgba(31,111,94,.22); border-radius: 11px; background: rgba(255,254,249,.78); color: var(--ink); text-align: left; cursor: pointer; box-shadow: 0 9px 28px rgba(28,58,49,.06); transition: transform .18s ease,border-color .18s ease; }
.history-shortcut:hover, .history-shortcut:focus-visible { border-color: var(--jade); outline: none; transform: translateY(-2px); }
.history-shortcut span { color: var(--red); font-size: .67rem; font-weight: 700; letter-spacing: .12em; }
.history-shortcut strong { margin: 0; font-size: .94rem; }
.history-shortcut small { color: var(--jade); font-size: .72rem; }

.mode-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; margin-bottom: 42px; }
.mode-card { position: relative; display: flex; overflow: hidden; min-height: 210px; flex-direction: column; align-items: flex-start; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,254,249,.9); box-shadow: 0 12px 32px rgba(28,58,49,.055); }
.mode-card::after { position: absolute; right: -20px; bottom: -48px; color: rgba(31,111,94,.055); font-family: "Noto Serif SC",serif; font-size: 9rem; font-weight: 700; content: attr(data-mark); }
.mode-card.exam { background: linear-gradient(145deg,#1d5e51,#15473e); color: #f9fbf9; }
.mode-card.exam::after { color: rgba(255,255,255,.07); }
.mode-card h2 { margin: 8px 0 9px; font-family: var(--display); font-size: 1.9rem; }
.mode-card p { position: relative; z-index: 1; max-width: 35rem; margin: 0; color: var(--muted); line-height: 1.7; }
.mode-card.exam p { color: rgba(255,255,255,.72); }
.mode-card .btn { position: relative; z-index: 2; margin-top: 22px; }

.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin: 0 0 18px; }
.section-head h2 { margin: 0; font-family: var(--display); font-size: clamp(1.8rem,3vw,2.7rem); }
.section-head p { max-width: 32rem; margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.6; text-align: right; }
.part-grid { display: grid; grid-template-columns: repeat(7,minmax(130px,1fr)); gap: 10px; }
.part-card { display: flex; min-height: 226px; flex-direction: column; padding: 20px 17px 17px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,254,249,.86); text-align: left; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.part-card:hover, .part-card:focus-visible { transform: translateY(-4px); border-color: rgba(31,111,94,.4); box-shadow: var(--shadow); outline: none; }
.part-number { color: var(--red); font-family: var(--display); font-size: 1.9rem; line-height: 1; }
.part-card h3 { margin: 24px 0 9px; font-family: var(--display); font-size: 1.05rem; line-height: 1.25; }
.part-card p { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.55; }
.part-card small { margin-top: auto; padding-top: 16px; color: var(--jade); font-size: .68rem; font-weight: 700; letter-spacing: .05em; }

.mock-section { margin-top: 48px; scroll-margin-top: 24px; }
.mock-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap: 12px; }
.mock-card { display: flex; min-height: 245px; flex-direction: column; align-items: flex-start; padding: 23px; border: 1px solid var(--line); border-radius: 13px; background: var(--sheet); box-shadow: 0 12px 32px rgba(28,58,49,.05); font: inherit; text-align: left; cursor: pointer; transition: transform .18s ease,border-color .18s ease,box-shadow .18s ease; }
.mock-card:hover, .mock-card:focus-visible { border-color: rgba(31,111,94,.42); outline: none; box-shadow: var(--shadow); transform: translateY(-3px); }
.mock-card.onsite { background: linear-gradient(145deg,#1d5e51,#15473e); color: white; }
.mock-card.official { border-color: rgba(154,122,52,.22); background: linear-gradient(145deg,#fffef9,#fbf5e5); }
.mock-card > span { color: var(--red); font-size: .66rem; font-weight: 700; letter-spacing: .09em; }
.mock-card.onsite > span { color: rgba(255,255,255,.65); }
.mock-card h3 { margin: 24px 0 10px; font-family: var(--display); font-size: 1.35rem; }
.mock-card p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.65; }
.mock-card.onsite p { color: rgba(255,255,255,.7); }
.mock-card .btn, .mock-card b { margin-top: auto; padding-top: 18px; }
.mock-card b { color: var(--gold); font-size: .77rem; }

.official-box { display: grid; grid-template-columns: .7fr 1.3fr; gap: 28px; margin-top: 46px; padding: 30px; border: 1px solid rgba(154,122,52,.22); border-radius: 15px; background: linear-gradient(135deg,#fbf7e9,#fffef9); }
.official-box h2 { margin: 6px 0 8px; font-family: var(--display); font-size: 1.7rem; }
.official-box p { margin: 0; color: var(--muted); line-height: 1.7; }
.resource-list { display: grid; gap: 9px; }
.resource-link { display: flex; justify-content: space-between; gap: 16px; padding: 13px 15px; border: 1px solid rgba(154,122,52,.2); border-radius: 9px; background: rgba(255,255,255,.65); font-size: .86rem; }
.resource-link span { color: var(--gold); }

.btn { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px; padding: 10px 17px; border: 1px solid transparent; border-radius: 9px; background: var(--jade); color: white; font-weight: 700; cursor: pointer; transition: transform .17s ease, background .17s ease; }
.btn:hover { transform: translateY(-1px); background: var(--jade-deep); }
.btn.secondary { border-color: var(--line); background: white; color: var(--jade-deep); }
.btn.danger { background: var(--red); }
.btn:disabled { cursor: not-allowed; opacity: .45; transform: none; }

.study-header { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 24px; }
.study-header h1 { margin: 5px 0 0; font-family: var(--display); font-size: clamp(2rem,4vw,3.5rem); line-height: 1; }
.back-btn { border: 0; background: transparent; color: var(--jade); cursor: pointer; padding: 8px 0; font-weight: 700; }
.study-actions { display: flex; gap: 10px; }
.part-overview { display: grid; grid-template-columns: .8fr 1.2fr; gap: 18px; }
.info-card, .strategy-card { padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--sheet); box-shadow: 0 12px 36px rgba(28,58,49,.05); }
.info-card dl { display: grid; grid-template-columns: auto 1fr; gap: 13px 24px; margin: 26px 0 0; }
.info-card dt { color: var(--muted); font-size: .77rem; }
.info-card dd { margin: 0; font-weight: 600; }
.strategy-card h2 { margin: 0 0 18px; font-family: var(--display); }
.strategy-card ol { margin: 0; padding-left: 1.25rem; color: var(--muted); line-height: 1.8; }
.strategy-card li + li { margin-top: 9px; }
.official-practice { display: grid; grid-template-columns: 1.05fr .95fr; gap: 24px; align-items: center; margin-top: 18px; padding: 24px 28px; border: 1px solid rgba(154,122,52,.22); border-radius: 14px; background: linear-gradient(135deg,#fbf7e9,#fffef9); }
.official-practice h2 { margin: 5px 0 7px; font-family: var(--display); }
.official-practice p { margin: 0; color: var(--muted); line-height: 1.65; }
.official-practice-links { display: grid; gap: 9px; }
.official-practice-links a, .official-practice-links button { padding: 12px 14px; border: 1px solid rgba(154,122,52,.22); border-radius: 8px; background: rgba(255,255,255,.68); color: var(--gold); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }

.official-setup { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(280px,.75fr); gap: 24px; align-items: stretch; }
.official-setup-copy, .official-setup-guide { padding: clamp(28px,4vw,50px); border: 1px solid var(--line); border-radius: 17px; background: var(--sheet); box-shadow: var(--shadow); }
.official-setup-copy h1 { margin: 7px 0 16px; font-family: var(--display); font-size: clamp(2.5rem,5vw,4.8rem); line-height: 1; }
.official-setup-copy > p { max-width: 46rem; color: var(--muted); line-height: 1.75; }
.privacy-note { margin: 22px 0 14px; padding: 14px 16px; border-left: 3px solid var(--gold); background: #fbf6e8; color: var(--muted); }
.privacy-note strong { color: var(--ink); }
.pdf-picker { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 12px 19px; border-radius: 9px; background: var(--jade); color: white; font-weight: 700; cursor: pointer; }
.pdf-picker input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.official-download { display: block; width: fit-content; margin-top: 15px; color: var(--gold); border-bottom: 1px solid rgba(154,122,52,.35); }
.setup-status { min-height: 1.6em; color: var(--red) !important; }
.official-setup-guide { display: flex; flex-direction: column; justify-content: center; background: linear-gradient(145deg,#1d5e51,#15473e); color: white; }
.official-setup-guide > span { color: rgba(255,255,255,.6); font-size: .72rem; font-weight: 700; letter-spacing: .12em; }
.official-setup-guide ol { margin: 28px 0 0; padding-left: 1.3rem; line-height: 1.9; }
.official-setup-guide li + li { margin-top: 10px; }
.official-part-tabs { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 8px; margin-bottom: 14px; }
.official-part-tabs button { display: grid; gap: 2px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,254,249,.88); color: var(--muted); cursor: pointer; }
.official-part-tabs button.active { border-color: var(--jade); background: var(--jade); color: white; }
.official-part-tabs span { font-family: var(--display); font-weight: 700; }
.official-part-tabs small { overflow: hidden; font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.official-exam-layout { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(360px,.75fr); gap: 16px; align-items: start; }
.official-pdf-panel, .official-answer-panel { border: 1px solid var(--line); border-radius: 14px; background: var(--sheet); box-shadow: 0 12px 36px rgba(28,58,49,.05); }
.official-pdf-panel { position: sticky; top: 82px; overflow: hidden; }
.official-panel-head { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.official-panel-head h2 { margin: 0; font-family: var(--display); font-size: 1.25rem; }
.official-panel-head .eyebrow { margin-bottom: 4px; }
.official-panel-head > a, .official-panel-head > span { color: var(--gold); font-size: .72rem; font-weight: 700; white-space: nowrap; }
.official-pdf-frame { display: block; width: 100%; height: calc(100vh - 220px); min-height: 620px; border: 0; background: #e8ebe9; }
.official-answer-panel { padding-bottom: 18px; }
.answer-instruction { margin: 17px 20px; color: var(--muted); font-size: .79rem; line-height: 1.6; }
.official-answer-grid { display: grid; gap: 9px; padding: 0 20px; }
.official-answer-card { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.official-answer-card > strong { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--jade-soft); color: var(--jade-deep); font-family: var(--display); }
.official-choice-row { display: flex; flex-wrap: wrap; gap: 7px; }
.official-choice-row label { cursor: pointer; }
.official-choice-row input { position: absolute; opacity: 0; pointer-events: none; }
.official-choice-row span { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 7px; color: var(--jade-deep); font-weight: 700; transition: background .15s ease,color .15s ease,border-color .15s ease; }
.official-choice-row input:checked + span { border-color: var(--jade); background: var(--jade); color: white; }
.official-choice-row input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.official-exam-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 18px 20px 0; }

.quiz-topbar { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin: -18px 0 22px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(250,248,241,.94); backdrop-filter: blur(14px); box-shadow: 0 8px 26px rgba(28,58,49,.06); }
.quiz-topbar .back-btn { justify-self: start; }
.quiz-title { font-family: var(--display); font-weight: 600; text-align: center; }
.quiz-status { justify-self: end; color: var(--muted); font-variant-numeric: tabular-nums; }
.timer { color: var(--red); font-weight: 700; }
.quiz-layout { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(340px,.9fr); gap: 18px; align-items: start; }
.passage, .question-panel { border: 1px solid var(--line); border-radius: 14px; background: var(--sheet); box-shadow: 0 12px 36px rgba(28,58,49,.05); }
.passage { position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow: auto; padding: clamp(24px,3vw,38px); }
.passage h2 { margin: 0 0 22px; font-family: var(--display); font-size: 1.85rem; }
.passage-copy { color: #26352f; font-size: 1.01rem; line-height: 1.86; white-space: pre-line; }
.passage-copy p { margin: 0 0 1.15em; }
.gap { display: inline-grid; min-width: 42px; height: 28px; place-items: center; margin: 0 3px; border-bottom: 2px solid var(--red); color: var(--red); font-size: .78rem; font-weight: 700; }
.stem { margin-left: 7px; color: var(--red); font-size: .76rem; font-weight: 700; }
.source-block { margin: 0 0 16px; padding: 16px 18px; border-left: 3px solid var(--jade); background: var(--jade-soft); }
.source-block strong { display: block; margin-bottom: 7px; color: var(--jade-deep); }
.question-panel { padding: 20px; }
.question-card { padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.question-card + .question-card { margin-top: 12px; }
.question-card h3 { margin: 0 0 14px; font-size: .96rem; line-height: 1.55; }
.q-number { display: inline-grid; width: 28px; height: 28px; place-items: center; margin-right: 9px; border-radius: 50%; background: var(--jade-soft); color: var(--jade-deep); font-family: var(--display); }
.options { display: grid; gap: 8px; }
.option { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.option:hover { border-color: rgba(31,111,94,.42); background: #f7fbf9; }
.option input { width: 17px; height: 17px; accent-color: var(--jade); }
.option-letter { color: var(--jade); font-weight: 700; }
.text-answer { width: 100%; padding: 11px 12px; border: 1px solid rgba(20,33,29,.22); border-radius: 8px; background: #fffefb; outline: none; }
.text-answer:focus { border-color: var(--jade); box-shadow: 0 0 0 3px rgba(31,111,94,.11); }
.keyword { display: inline-block; margin: 9px 0; padding: 4px 9px; border-radius: 6px; background: var(--red-soft); color: var(--red); font-weight: 700; letter-spacing: .05em; }
.quiz-submit { display: flex; justify-content: flex-end; gap: 12px; margin-top: 18px; }

.result-hero { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; padding: 30px; border-radius: 16px; background: var(--jade-deep); color: white; }
.score-ring { display: grid; width: 128px; height: 128px; place-items: center; border: 2px solid rgba(255,255,255,.38); border-radius: 50%; font-family: var(--display); font-size: 2.2rem; }
.score-ring small { display: block; margin-top: -30px; font-size: .65rem; letter-spacing: .1em; }
.result-hero h1 { margin: 0 0 8px; font-family: var(--display); font-size: 2.2rem; }
.result-hero p { margin: 0; color: rgba(255,255,255,.72); }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 24px; }
.review-list { display: grid; gap: 12px; }
.review-card { padding: 20px; border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 11px; background: var(--sheet); }
.review-card.correct { border-left-color: var(--jade); }
.review-card h3 { margin: 0 0 10px; font-size: .98rem; }
.answer-line { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: .84rem; }
.answer-line strong { color: var(--ink); }
.explanation { margin: 13px 0 0; padding-top: 13px; border-top: 1px solid var(--line); color: #46564f; line-height: 1.7; }
.empty-review { padding: 34px; border: 1px dashed rgba(31,111,94,.35); border-radius: 12px; color: var(--jade-deep); text-align: center; }
.history-header { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: end; margin-bottom: 28px; padding: 10px 0 26px; border-bottom: 1px solid var(--line); }
.history-header h1, .history-detail-hero h1 { margin: 5px 0 8px; font-family: var(--display); font-size: clamp(2.4rem,5vw,4.6rem); line-height: 1; }
.history-header p, .history-detail-hero p { margin: 0; color: var(--muted); line-height: 1.65; }
.history-summary { display: flex; gap: 10px; }
.history-summary span { display: grid; min-width: 118px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--sheet); color: var(--muted); font-size: .72rem; }
.history-summary strong { color: var(--jade-deep); font-family: var(--display); font-size: 1.65rem; line-height: 1.1; }
.history-list { display: grid; gap: 10px; }
.history-record { display: grid; grid-template-columns: 170px minmax(0,1fr) 90px 30px; gap: 18px; align-items: center; width: 100%; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,254,249,.9); color: var(--ink); text-align: left; cursor: pointer; transition: transform .17s ease,border-color .17s ease,box-shadow .17s ease; }
.history-record:hover, .history-record:focus-visible { border-color: rgba(31,111,94,.4); outline: none; box-shadow: var(--shadow); transform: translateY(-2px); }
.history-date { color: var(--muted); font-size: .76rem; }
.history-name, .history-score { display: grid; gap: 3px; }
.history-name strong { font-family: var(--display); font-size: 1.08rem; }
.history-name small, .history-score small { color: var(--muted); font-size: .7rem; }
.history-score { text-align: right; }
.history-score strong { color: var(--jade-deep); font-family: var(--display); font-size: 1.25rem; }
.history-arrow { color: var(--red); font-size: 1.2rem; text-align: right; }
.empty-history { padding: 54px 24px; border: 1px dashed rgba(31,111,94,.3); border-radius: 15px; background: rgba(255,254,249,.64); text-align: center; }
.empty-history > span { display: grid; width: 62px; height: 62px; place-items: center; margin: 0 auto 16px; border-radius: 50%; background: var(--jade-soft); color: var(--jade-deep); font-family: var(--display); font-size: 1.5rem; }
.empty-history h2 { margin: 0 0 8px; font-family: var(--display); }
.empty-history p { margin: 0 0 20px; color: var(--muted); }
.history-detail-hero { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; padding: 30px; border-radius: 16px; background: linear-gradient(145deg,#fffef9,#e2eee9); box-shadow: var(--shadow); }
.history-detail-score { display: grid; width: 132px; height: 132px; place-items: center; border: 2px solid rgba(31,111,94,.25); border-radius: 50%; color: var(--jade-deep); }
.history-detail-score strong { font-family: var(--display); font-size: 2rem; }
.history-detail-score span { margin-top: -34px; color: var(--muted); font-size: .72rem; letter-spacing: .08em; }
.site-footer { display: flex; justify-content: space-between; gap: 22px; padding: 20px 0 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: .72rem; }

@media (max-width: 1040px) {
  .part-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .mock-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .quiz-layout { grid-template-columns: 1fr; }
  .passage { position: relative; top: 0; max-height: none; }
  .official-exam-layout { grid-template-columns: 1fr; }
  .official-pdf-panel { position: relative; top: 0; }
  .official-pdf-frame { height: 70vh; min-height: 520px; }
}
@media (max-width: 760px) {
  .site-header, .site-footer, .app-shell { width: min(100% - 28px,1240px); }
  .landing-hero, .mode-grid, .official-box, .part-overview, .official-practice, .history-header, .history-detail-hero, .official-setup { grid-template-columns: 1fr; }
  .landing-hero { gap: 24px; padding-top: 18px; }
  .landing-hero h1 { font-size: clamp(2rem,9vw,3.5rem); }
  .part-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .part-card { min-height: 205px; }
  .section-head, .site-footer { align-items: flex-start; flex-direction: column; }
  .section-head p { text-align: left; }
  .study-header { align-items: flex-start; flex-direction: column; }
  .quiz-topbar { grid-template-columns: 1fr auto; }
  .quiz-title { display: none; }
  .result-hero { grid-template-columns: 1fr; text-align: center; }
  .score-ring { margin: auto; }
  .history-summary { flex-wrap: wrap; }
  .history-record { grid-template-columns: 1fr 80px 24px; }
  .history-date { grid-column: 1 / -1; }
  .history-detail-score { margin: auto; }
  .official-part-tabs { display: flex; overflow-x: auto; padding-bottom: 5px; }
  .official-part-tabs button { min-width: 96px; }
}
@media (max-width: 470px) {
  .portal-return { right: 12px; }
  .home-link { font-size: .72rem; }
  .brand small { display: none; }
  .part-grid { grid-template-columns: 1fr; }
  .mock-grid { grid-template-columns: 1fr; }
  .part-card { min-height: 170px; }
  .quiz-layout { display: block; }
  .passage { margin-bottom: 14px; padding: 22px 18px; }
  .question-panel { padding: 12px; }
  .quiz-submit { flex-direction: column; }
  .quiz-submit .btn { width: 100%; }
  .history-summary { display: grid; grid-template-columns: 1fr 1fr; }
  .history-summary span { min-width: 0; }
  .history-record { grid-template-columns: 1fr auto; gap: 10px; }
  .history-date { grid-column: 1 / -1; }
  .history-arrow { display: none; }
  .official-pdf-frame { height: 62vh; min-height: 430px; }
  .official-panel-head { align-items: flex-start; flex-direction: column; }
  .official-exam-actions { flex-direction: column; }
  .official-exam-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
