:root {
  --ink: #12343b;
  --ink-soft: #466068;
  --paper: #f5f0e6;
  --paper-deep: #eae2d3;
  --white: #fffdf8;
  --teal: #137c78;
  --teal-light: #dcecea;
  --coral: #e36f51;
  --coral-light: #f8e4dc;
  --gold: #c79b3b;
  --line: #d7d0c3;
  --success: #237657;
  --danger: #b54836;
  --radius-lg: 24px;
  --radius-md: 15px;
  --shadow: 0 20px 55px rgba(37, 53, 50, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 3%, rgba(227, 111, 81, 0.10), transparent 22rem),
    radial-gradient(circle at 95% 14%, rgba(19, 124, 120, 0.09), transparent 26rem),
    var(--paper);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.55;
}

button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(19, 124, 120, 0.28);
  outline-offset: 2px;
}

.page-shell { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(18, 52, 59, 0.14);
}

.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark {
  width: 43px; height: 43px; display: grid; place-items: center;
  color: var(--white); background: var(--ink); border-radius: 12px;
  font-family: Georgia, serif; font-weight: 700; transform: rotate(-4deg);
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; letter-spacing: 0.04em; }
.brand small { color: var(--ink-soft); font-size: 11px; letter-spacing: 0.12em; }

.scope-badge {
  display: flex; align-items: center; gap: 8px; padding: 8px 13px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.45);
  color: var(--ink-soft); font-size: 12px; font-weight: 700;
}
.scope-badge span { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(19,124,120,.12); }

.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 56px;
  align-items: end; padding: 62px 2px 46px;
}
.eyebrow { margin: 0 0 12px; color: var(--coral); font: 700 11px/1.2 ui-monospace, SFMono-Regular, monospace; letter-spacing: .23em; }
h1 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(42px, 5vw, 67px); line-height: 1.08; letter-spacing: -.035em; font-weight: 600; }
h1 em { color: var(--teal); font-style: normal; }
.hero-copy { max-width: 680px; margin: 22px 0 0; color: var(--ink-soft); font-size: 16px; }

.score-card {
  display: grid; grid-template-columns: repeat(3, 84px); position: relative;
  padding: 18px 20px; border: 1px solid rgba(18,52,59,.14); border-radius: var(--radius-md);
  background: rgba(255,253,248,.72); box-shadow: 0 8px 30px rgba(37,53,50,.06);
}
.score-card div { text-align: center; border-right: 1px solid var(--line); }
.score-card div:nth-child(3) { border-right: 0; }
.score-card span, .score-card small { display: block; }
.score-card span { font: 600 28px/1.1 Georgia, serif; }
.score-card small { margin-top: 4px; color: var(--ink-soft); font-size: 10px; }
.text-button { position: absolute; right: 8px; top: -27px; border: 0; background: transparent; color: var(--ink-soft); font-size: 11px; }
.text-button:hover { color: var(--coral); }

.workspace {
  display: grid; grid-template-columns: 285px minmax(0, 1fr); min-height: 595px;
  overflow: hidden; background: var(--white); border: 1px solid rgba(18,52,59,.12);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}

.control-panel { padding: 30px 24px; color: #eef6f2; background: var(--ink); }
.control-block + .control-block { margin-top: 32px; }
.control-label {
  display: flex; align-items: center; gap: 9px; margin: 0 0 12px;
  color: rgba(238,246,242,.66); font-size: 11px; font-weight: 700; letter-spacing: .1em;
}
.control-label span { color: #74bcb5; font: 700 10px ui-monospace, monospace; }

.practice-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.practice-tab {
  min-height: 65px; padding: 10px 8px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px;
  color: rgba(255,255,255,.68); background: rgba(255,255,255,.045); text-align: left;
}
.practice-tab strong, .practice-tab small { display: block; }
.practice-tab strong { font-size: 12px; }
.practice-tab small { margin-top: 4px; color: rgba(255,255,255,.42); font-size: 9px; }
.practice-tab:hover { border-color: rgba(255,255,255,.3); }
.practice-tab.is-active { border-color: #87d0c8; color: white; background: rgba(19,124,120,.3); box-shadow: inset 0 0 0 1px rgba(135,208,200,.16); }
.practice-tab.is-active small { color: #9dd3cd; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(255,255,255,.06); }
.segment { min-height: 42px; border: 0; border-radius: 9px; color: rgba(255,255,255,.65); background: transparent; font-size: 12px; font-weight: 700; }
.segment.is-active { color: var(--ink); background: var(--paper); box-shadow: 0 3px 12px rgba(0,0,0,.16); }

.mode-list { display: grid; gap: 9px; }
.mode-card {
  display: grid; grid-template-columns: 34px 1fr 12px; align-items: center; gap: 10px;
  width: 100%; min-height: 66px; padding: 10px 12px; text-align: left;
  border: 1px solid rgba(255,255,255,.11); border-radius: 13px; color: rgba(255,255,255,.76); background: rgba(255,255,255,.045);
}
.mode-card:hover { border-color: rgba(255,255,255,.28); }
.mode-card.is-active { border-color: rgba(116,188,181,.75); background: rgba(19,124,120,.28); color: white; }
.mode-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; color: #9bd2cc; background: rgba(255,255,255,.08); font-size: 15px; }
.mode-card strong, .mode-card small { display: block; }
.mode-card strong { font-size: 13px; }
.mode-card small { margin-top: 2px; color: rgba(255,255,255,.50); font-size: 10px; }
.mode-card i { width: 9px; height: 9px; border: 2px solid rgba(255,255,255,.28); border-radius: 50%; }
.mode-card.is-active i { border-color: #87d0c8; background: #87d0c8; box-shadow: inset 0 0 0 2px var(--ink); }

.difficulty-control select {
  width: 100%; min-height: 43px; padding: 0 12px; color: white; border: 1px solid rgba(255,255,255,.14); border-radius: 11px; background: #1e4850;
}

.count-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.count-button {
  min-height: 39px; padding: 0 6px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px;
  color: rgba(255,255,255,.72); background: rgba(255,255,255,.05); font-size: 12px; font-weight: 800;
}
.count-button:hover { border-color: rgba(255,255,255,.32); }
.count-button.is-active { border-color: #87d0c8; color: var(--ink); background: #bfe1dc; }
.custom-count-button { grid-column: 1 / -1; }
.custom-count-wrap { margin-top: 9px; padding: 10px; border-radius: 11px; background: rgba(255,255,255,.06); }
.custom-count-wrap > label { display: block; margin-bottom: 6px; color: rgba(255,255,255,.62); font-size: 10px; }
.custom-count-wrap > div { display: grid; grid-template-columns: 1fr 54px; gap: 6px; }
.custom-count-wrap input {
  width: 100%; min-width: 0; height: 36px; padding: 0 8px; border: 1px solid rgba(255,255,255,.2); border-radius: 8px;
  color: white; background: #1e4850;
}
.custom-count-wrap input::placeholder { color: rgba(255,255,255,.35); }
.custom-count-wrap button { border: 0; border-radius: 8px; color: var(--ink); background: #bfe1dc; font-size: 11px; font-weight: 800; }
.count-error { min-height: 16px; margin: 5px 0 0; color: #ffb19e; font-size: 10px; }
.regenerate-button {
  width: 100%; min-height: 37px; margin-top: 9px; border: 1px solid rgba(255,255,255,.15); border-radius: 9px;
  color: rgba(255,255,255,.72); background: transparent; font-size: 11px; font-weight: 700;
}
.regenerate-button:hover { border-color: #87d0c8; color: white; }
.document-button {
  width: 100%; min-height: 41px; margin-top: 8px; border: 0; border-radius: 10px;
  color: var(--ink); background: #bfe1dc; font-size: 11px; font-weight: 900;
}
.document-button:hover { background: #d4ebe7; transform: translateY(-1px); }

.study-note { margin-top: 38px; padding: 16px; border-left: 3px solid var(--coral); background: rgba(255,255,255,.055); border-radius: 0 10px 10px 0; }
.study-note strong { font-size: 12px; }
.study-note p { margin: 6px 0 0; color: rgba(255,255,255,.58); font-size: 11px; line-height: 1.7; }

.question-panel { min-width: 0; padding: 32px clamp(25px, 5vw, 70px) 38px; display: flex; flex-direction: column; }
.question-topline { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.question-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.question-meta span { padding: 5px 10px; border-radius: 999px; color: var(--teal); background: var(--teal-light); font-size: 10px; font-weight: 800; }
.question-meta span:nth-child(2) { color: #a24e36; background: var(--coral-light); }
.question-meta span:nth-child(3) { color: #7d621e; background: #f2e9cd; }
.paper-progress { margin: 9px 0 0; color: var(--ink-soft); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.question-actions { display: flex; align-items: center; }
.paper-navigation { display: flex; gap: 7px; }
.paper-navigation button {
  min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px;
  color: var(--ink-soft); background: transparent; font-size: 11px; font-weight: 700;
}
.paper-navigation button:hover:not(:disabled) { border-color: var(--teal); color: var(--teal); }
.paper-navigation button:disabled { cursor: not-allowed; opacity: .35; }
.shuffle-button { min-height: 36px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink-soft); background: transparent; font-size: 11px; font-weight: 700; }
.shuffle-button:hover { border-color: var(--teal); color: var(--teal); }
.shuffle-button span { display: inline-block; margin-right: 4px; font-size: 17px; transition: transform .2s ease; }
.shuffle-button:hover span { transform: rotate(90deg); }

.question-heading { margin-top: 30px; }
.question-heading p { margin: 0; color: var(--ink-soft); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.question-heading h2 { margin: 5px 0 0; font: 600 clamp(23px, 3vw, 34px)/1.25 Georgia, "Songti SC", serif; }
.condition-line { min-height: 24px; margin-top: 7px; color: var(--ink-soft); font-size: 12px; }
.condition-line span { margin-right: 7px; color: var(--coral); font-weight: 800; }

.equation {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 17px;
  min-height: 148px; margin: 26px 0 14px; padding: 30px 20px;
  border: 1px dashed #cabfae; border-radius: 18px; background: #fbf8f1;
}
.equation-side { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; }
.term { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.formula { font: 600 21px/1.2 Georgia, "Times New Roman", serif; color: #172f34; }
.formula sub { font-size: .67em; }
.formula sup { font-size: .64em; }
.plus { color: #9b968c; font-size: 18px; }
.reaction-arrow { position: relative; padding-top: 9px; color: var(--coral); font: 500 34px/1 Georgia, serif; }
.reaction-arrow i { position: absolute; bottom: 31px; left: 50%; max-width: 120px; transform: translateX(-50%); color: var(--ink-soft); font: normal 9px/1.1 sans-serif; white-space: nowrap; }

.coefficient-input, .species-input {
  height: 39px; border: 1.5px solid #bcb5aa; border-radius: 9px; color: var(--ink); background: white; text-align: center;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.coefficient-input { width: 40px; font-size: 17px; font-weight: 800; }
.species-input { width: 100px; padding: 0 7px; font-family: Georgia, "Times New Roman", serif; font-size: 16px; }
.species-input::placeholder { font-family: "PingFang SC", sans-serif; font-size: 11px; color: #aaa399; }
.coefficient-input:hover, .species-input:hover { border-color: var(--teal); }
.coefficient-input.is-right, .species-input.is-right { border-color: var(--success); background: #eff8f3; }
.coefficient-input.is-wrong, .species-input.is-wrong { border-color: var(--danger); background: #fff1ed; }
.coefficient-input.is-warning, .species-input.is-warning { border-color: var(--gold); background: #fff8e5; }

.hint-row { min-height: 48px; display: flex; align-items: flex-start; gap: 15px; }
.hint-button { flex: 0 0 auto; padding: 7px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink-soft); background: transparent; font-size: 11px; }
.hint-button:hover { color: var(--teal); border-color: var(--teal); }
.hint { margin: 5px 0 0; color: var(--ink-soft); font-size: 12px; }

.feedback { display: grid; grid-template-columns: 38px 1fr; gap: 12px; margin: 8px 0 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #f7f5ef; }
.feedback-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-weight: 900; }
.feedback-icon::before { content: "!"; }
.feedback.is-correct { border-color: #b9d8c9; background: #eff8f3; }
.feedback.is-correct .feedback-icon { color: white; background: var(--success); }
.feedback.is-correct .feedback-icon::before { content: "✓"; }
.feedback.is-incorrect { border-color: #e7b9ac; background: #fff3ef; }
.feedback.is-incorrect .feedback-icon { color: white; background: var(--danger); }
.feedback.is-not-simplest { border-color: #e3ce8f; background: #fff8e6; }
.feedback.is-not-simplest .feedback-icon { color: white; background: var(--gold); }
.feedback.is-incomplete .feedback-icon { color: white; background: var(--ink-soft); }
.feedback strong { font-size: 13px; }
.feedback p { margin: 2px 0 0; color: var(--ink-soft); font-size: 12px; }
.standard-answer { margin-top: 10px; }
.standard-answer small { display: block; margin-bottom: 4px; color: var(--ink-soft); font-size: 9px; letter-spacing: .12em; }
.standard-answer div { font-family: Georgia, "Times New Roman", serif; font-size: 16px; }
.standard-answer span b { margin-right: 2px; color: var(--coral); }

.action-row { display: flex; gap: 10px; margin-top: auto; padding-top: 12px; }
.primary-button, .secondary-button { min-height: 48px; padding: 0 22px; border-radius: 12px; font-weight: 800; }
.primary-button { flex: 1; border: 0; color: white; background: var(--teal); box-shadow: 0 8px 20px rgba(19,124,120,.2); }
.primary-button:hover { background: #0d6b68; transform: translateY(-1px); }
.primary-button span { margin-left: 9px; color: rgba(255,255,255,.64); font-size: 10px; }
.secondary-button { border: 1px solid var(--line); color: var(--ink-soft); background: transparent; }
.secondary-button:hover { border-color: var(--ink-soft); color: var(--ink); }

.method-strip {
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 18px;
  margin: 26px 0; padding: 22px 28px; border: 1px solid rgba(18,52,59,.12); border-radius: 17px; background: rgba(255,253,248,.64);
}
.method-strip > div { display: flex; align-items: center; gap: 12px; }
.method-strip > div > span { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; color: var(--teal); background: var(--teal-light); font: 700 13px Georgia, serif; }
.method-strip p { margin: 0; }
.method-strip strong, .method-strip small { display: block; }
.method-strip strong { font-size: 12px; }
.method-strip small { color: var(--ink-soft); font-size: 10px; }
.method-strip b { color: #b8b1a5; font-weight: 400; }

footer { padding: 8px 0 30px; color: var(--ink-soft); text-align: center; font-size: 10px; letter-spacing: .05em; }

body.is-document-open { overflow: hidden; }
.document-modal {
  position: fixed; inset: 0; z-index: 100; padding: 22px;
  overflow: auto; background: rgba(9, 31, 36, .82); backdrop-filter: blur(8px);
}
.document-modal-shell { width: min(920px, 100%); margin: 0 auto; }
.document-toolbar {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 70px; padding: 12px 18px; border-radius: 14px 14px 0 0; color: white; background: #183f46; box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.document-toolbar strong, .document-toolbar small { display: block; }
.document-toolbar strong { font-size: 14px; }
.document-toolbar small { margin-top: 2px; color: rgba(255,255,255,.58); font-size: 10px; }
.document-toolbar > div:last-child { display: flex; gap: 8px; }
.document-toolbar button { min-height: 38px; padding: 0 15px; border-radius: 9px; font-size: 11px; font-weight: 800; }
.document-close { border: 1px solid rgba(255,255,255,.2); color: white; background: transparent; }
.document-download { border: 0; color: var(--ink); background: #bfe1dc; }
.document-download:disabled { cursor: wait; opacity: .72; }

.paper-document {
  width: min(210mm, 100%); min-height: 297mm; margin: 0 auto 30px; padding: 16mm 15mm;
  color: #172f34; background: white; box-shadow: 0 22px 60px rgba(0,0,0,.24);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.paper-document.is-exporting {
  width: 210mm; min-height: 297mm; margin: 0; padding: 16mm 15mm;
  box-shadow: none;
}
.pdf-export-stage {
  position: absolute; top: 0; left: 0; z-index: -1000;
  width: 210mm; overflow: visible; pointer-events: none; background: white;
}
.print-header { padding-bottom: 7mm; border-bottom: 2px solid #173a40; text-align: left; }
.print-header > p:first-child { margin: 0 0 2mm; color: #4d696e; font-size: 9pt; font-weight: 800; letter-spacing: .12em; }
.print-header h2 { margin: 0; font: 600 23pt/1.25 Georgia, "Songti SC", serif; letter-spacing: .04em; }
.print-fields { display: flex; gap: 10mm; margin-top: 7mm; font-size: 10pt; }
.print-fields span { display: inline-flex; align-items: flex-end; gap: 2mm; white-space: nowrap; }
.print-fields i { display: inline-block; width: 32mm; border-bottom: 1px solid #789096; }
.print-meta { display: flex; flex-wrap: wrap; gap: 2mm 5mm; margin-top: 5mm; padding: 3mm 4mm; border-radius: 2mm; background: #eef5f3; font-size: 8.5pt; }
.print-meta b { color: #176d69; }
.print-instruction { margin: 4mm 0 0; color: #465e63; font-size: 8.5pt; }
.print-question-list { padding-top: 4mm; }
.print-question {
  display: grid; grid-template-columns: 9mm minmax(0, 1fr); gap: 1mm;
  padding: 4.5mm 0; border-bottom: 1px solid #d8e0de; break-inside: avoid; page-break-inside: avoid;
}
.print-question-number { padding-top: .5mm; font: 700 12pt/1.2 Georgia, serif; color: #176d69; }
.print-question-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2mm; margin-bottom: 3mm; }
.print-question-title strong { font-size: 10pt; }
.print-question-title span { color: #64777b; font-size: 7.5pt; }
.print-equation { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 2.2mm; font: 600 12pt/1.75 Georgia, "Times New Roman", serif; }
.print-equation-side { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2.2mm; }
.print-term { display: inline-flex; align-items: center; gap: 1mm; white-space: nowrap; }
.print-plus { color: #6e7d80; }
.print-arrow { position: relative; display: inline-block; min-width: 15mm; color: #c55d45; text-align: center; font-size: 16pt; }
.print-arrow small { position: absolute; left: 50%; bottom: 6mm; transform: translateX(-50%); color: #5f7175; font: 6.5pt/1.1 sans-serif; white-space: nowrap; }
.print-coeff-box { display: inline-block; width: 7mm; height: 7mm; border: 1.2px solid #64777b; border-radius: 1.5mm; }
.print-species-box { display: inline-block; width: 23mm; height: 7mm; border-bottom: 1.2px solid #64777b; }
.print-equation sub { font-size: .68em; }
.print-equation sup { font-size: .64em; }
.print-footer { margin-top: 8mm; padding: 4mm 0 0; border-top: 1px solid #b9c7c4; color: #718185; text-align: center; font-size: 7.5pt; }

[hidden] { display: none !important; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 35px; }
  .score-card { width: 310px; }
  .workspace { grid-template-columns: 1fr; }
  .control-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
  .control-block + .control-block { margin-top: 0; }
  .study-note { grid-column: 1 / -1; margin-top: 0; }
  .method-strip { grid-template-columns: 1fr 1fr; }
  .method-strip > b { display: none; }
}

@media (max-width: 640px) {
  .page-shell { width: min(100% - 22px, 1240px); }
  .site-header { min-height: 76px; }
  .scope-badge { display: none; }
  .hero { padding: 40px 3px 32px; }
  h1 { font-size: 40px; }
  .hero-copy { font-size: 14px; }
  .score-card { width: 100%; grid-template-columns: repeat(3, 1fr); }
  .control-panel { grid-template-columns: 1fr; padding: 24px 18px; }
  .study-note { grid-column: auto; }
  .question-panel { padding: 24px 16px 27px; }
  .question-topline { align-items: flex-start; }
  .paper-navigation { flex-direction: column; }
  .paper-navigation button { min-height: 34px; }
  .question-heading { margin-top: 23px; }
  .equation { min-height: 180px; gap: 11px; padding: 25px 10px; }
  .equation-side { gap: 8px; }
  .formula { font-size: 18px; }
  .coefficient-input { width: 37px; height: 37px; }
  .species-input { width: 88px; height: 37px; }
  .reaction-arrow { width: 100%; text-align: center; transform: rotate(90deg); margin: -4px 0; }
  .reaction-arrow i { display: none; }
  .hint-row { display: block; }
  .hint { margin: 9px 3px; }
  .action-row { flex-direction: column; }
  .method-strip { grid-template-columns: 1fr; padding: 19px; }
  .document-modal { padding: 0; }
  .document-toolbar { border-radius: 0; align-items: flex-start; }
  .document-toolbar small { max-width: 180px; }
  .document-toolbar button { padding: 0 11px; }
  .paper-document { min-height: 0; padding: 9mm 6mm; box-shadow: none; }
  .print-header h2 { font-size: 19pt; }
  .print-fields { gap: 4mm; }
  .print-fields i { width: 18mm; }
  .print-equation { font-size: 10.5pt; }
}

@media print {
  @page { size: A4; margin: 13mm 12mm 14mm; }
  body { background: white !important; }
  .page-shell { width: 100%; margin: 0; }
  .page-shell > .site-header, .page-shell > main, .page-shell > footer { display: none !important; }
  body * { visibility: hidden !important; }
  #paper-document-modal, #paper-document-modal *, #paper-document { visibility: visible !important; }
  #paper-document-modal {
    position: static; display: block !important; padding: 0; overflow: visible;
    background: none; backdrop-filter: none;
  }
  .document-modal-shell { width: auto; margin: 0; }
  .document-toolbar { display: none !important; }
  .paper-document {
    width: auto; min-height: 0; margin: 0; padding: 0; box-shadow: none;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .print-question { break-inside: avoid; page-break-inside: avoid; }
  .print-footer { margin-top: 6mm; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
