:root {
  --red: #931f20;
  --red-dark: #681215;
  --red-soft: #b5332f;
  --ink: #15202a;
  --ink-2: #283640;
  --paper: #f5f0e7;
  --paper-2: #ece4d7;
  --white: #fffdf8;
  --gold: #c7a76a;
  --survey: #1f746b;
  --survey-dark: #164f4a;
  --survey-soft: #e7f4f0;
  --muted: #6d7478;
  --line: rgba(21, 32, 42, .14);
  --shadow: 0 24px 70px rgba(22, 28, 34, .13);
  --radius: 22px;
  --shell: min(1180px, calc(100vw - 48px));
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #f8f4ed;
  color: var(--ink);
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.quiz-shell { width: var(--shell); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.quiz-header {
  position: sticky;
  z-index: 50;
  top: 0;
  background: rgba(255, 253, 248, .94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(20, 28, 34, .07);
  backdrop-filter: blur(16px);
}
.quiz-nav { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.quiz-brand { display: flex; align-items: center; min-width: 0; gap: 14px; }
.quiz-brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  border: 1px solid var(--red);
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .1);
  font: 25px/1 "STKaiti", "KaiTi", serif;
}
.quiz-brand-text { display: flex; flex-direction: column; line-height: 1.35; }
.quiz-brand-text strong { font-size: 15px; letter-spacing: .05em; }
.quiz-brand-text small { color: var(--muted); font-size: 11px; letter-spacing: .12em; }
.quiz-nav-links { display: flex; align-items: center; gap: 10px; }
.quiz-nav-links a { padding: 9px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.quiz-nav-links a:hover { background: rgba(147, 31, 32, .08); color: var(--red); }
.quiz-nav-links .admin-link { border: 1px solid var(--line); }

.quiz-hero {
  position: relative;
  overflow: hidden;
  padding: 164px 0 92px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 25%, rgba(199, 167, 106, .18), transparent 24%),
    radial-gradient(circle at 18% 95%, rgba(147, 31, 32, .38), transparent 34%),
    linear-gradient(135deg, #10181f, #15232d 52%, #0b1116);
}
.quiz-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, #000, transparent 80%);
}
.quiz-hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: end; gap: 70px; }
.quiz-eyebrow { margin: 0 0 16px; color: #e5c98f; font-size: 12px; font-weight: 800; letter-spacing: .25em; text-transform: uppercase; }
.quiz-eyebrow::before { content: ""; display: inline-block; width: 34px; height: 1px; margin: 0 12px 4px 0; background: currentColor; }
.quiz-hero h1 { margin: 0; max-width: 760px; font: 700 clamp(44px, 6vw, 78px)/1.12 "Songti SC", "STSong", "SimSun", serif; }
.quiz-hero h1 span { color: #f0d9ad; }
.quiz-hero-lead { max-width: 680px; margin: 26px 0 0; color: rgba(255,255,255,.7); font-size: 17px; }
.quiz-hero-note { padding: 26px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); backdrop-filter: blur(12px); }
.quiz-hero-note strong { display: block; margin-bottom: 10px; color: #f0d9ad; font: 700 24px/1.25 "Songti SC", serif; }
.quiz-hero-note p { margin: 0; color: rgba(255,255,255,.66); font-size: 13px; }

.quiz-main { min-height: 60vh; padding: 78px 0 100px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.section-head h2 { margin: 4px 0 0; font: 700 clamp(34px, 4vw, 50px)/1.2 "Songti SC", serif; }
.section-head p { max-width: 500px; margin: 0; color: var(--muted); }
.section-kicker { color: var(--red); font-size: 12px; font-weight: 800; letter-spacing: .22em; }

.quiz-list { display: grid; grid-template-columns: 1fr; gap: 14px; }
.quiz-card {
  position: relative;
  min-height: 132px;
  padding: 18px 24px 18px 18px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 16px 50px rgba(22, 28, 34, .08);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.quiz-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--red); transform: scaleY(0); transition: transform .25s ease; }
.quiz-card:hover { transform: translateX(5px); border-color: rgba(147,31,32,.35); box-shadow: var(--shadow); }
.quiz-card:hover::before { transform: scaleY(1); }
.quiz-card-index { min-height: 94px; display: grid; grid-template-columns: 1fr auto; align-content: center; padding: 13px; color: #fff; background: var(--ink); }
.quiz-type { grid-column: 1 / -1; margin-bottom: 8px; color: #e5c98f; font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.quiz-card-index strong { font: 700 31px/1 Georgia, serif; }
.quiz-card-index small { align-self: end; padding-bottom: 2px; color: rgba(255,255,255,.58); font-size: 10px; }
.quiz-card-copy { min-width: 0; }
.quiz-card h3 { margin: 0 0 5px; font: 700 24px/1.3 "Songti SC", serif; }
.quiz-card p { margin: 0; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.quiz-card-meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 7px; }
.quiz-card-meta span { padding: 4px 8px; border: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.quiz-card-action { min-width: 116px; display: flex; align-items: center; justify-content: flex-end; gap: 13px; color: var(--red); font-weight: 800; }
.quiz-card-action i { font-style: normal; font-size: 22px; transition: transform .2s ease; }
.quiz-card:hover .quiz-card-action i { transform: translateX(5px); }
.quiz-card-survey { background: linear-gradient(90deg, rgba(31,116,107,.055), var(--white) 34%); border-color: rgba(31,116,107,.2); }
.quiz-card-survey::before { background: var(--survey); }
.quiz-card-survey:hover { border-color: rgba(31,116,107,.48); }
.quiz-card-survey .quiz-card-index { background: linear-gradient(145deg, var(--survey-dark), var(--survey)); }
.quiz-card-survey .quiz-type { color: #d2eee6; }
.quiz-card-survey .quiz-card-meta span { border-color: rgba(31,116,107,.22); color: var(--survey-dark); background: rgba(255,255,255,.56); }
.quiz-card-survey .quiz-card-action { color: var(--survey); }
.quiz-card-exam .quiz-card-index { background: linear-gradient(145deg, #121e28, #233744); }
.workspace-survey .workspace-head { background: linear-gradient(135deg, var(--survey-dark), var(--survey)); }
.workspace-survey .section-kicker, .workspace-survey .question-number, .workspace-survey .timer, .workspace-survey .option-key { color: var(--survey); }
.workspace-survey .progress-fill { background: linear-gradient(90deg, var(--survey-dark), #48a395); }
.workspace-survey .primary-button, .workspace-survey .result-seal { background: var(--survey); }
.workspace-survey .answer-option:has(input:checked) { border-color: var(--survey); background: rgba(31,116,107,.06); }
.workspace-survey .answer-option input { accent-color: var(--survey); }
.workspace-survey .answer-option:hover, .workspace-survey .short-answer:focus { border-color: rgba(31,116,107,.55); }
.empty-state, .loading-state { grid-column: 1 / -1; padding: 70px 30px; text-align: center; background: var(--white); border: 1px dashed var(--line); color: var(--muted); }

.workspace { margin-top: 64px; scroll-margin-top: 110px; }
.workspace-card { overflow: hidden; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); }
.workspace-head { padding: 34px 38px; display: flex; justify-content: space-between; gap: 24px; color: #fff; background: var(--ink); }
.workspace-head h1, .workspace-head h2 { margin: 5px 0 6px; font: 700 34px/1.25 "Songti SC", serif; }
.workspace-head p { margin: 0; color: rgba(255,255,255,.62); }
.workspace-close { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; cursor: pointer; }
.identity-panel { padding: 38px; }
.identity-panel h2, .identity-panel h3 { margin: 0 0 8px; font: 700 26px/1.3 "Songti SC", serif; }
.identity-panel > p { margin: 0 0 26px; color: var(--muted); }
.identity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field span { font-size: 13px; font-weight: 700; }
.field small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  outline: 0;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(147,31,32,.09); }
.identity-actions { margin-top: 28px; display: flex; align-items: center; gap: 18px; }
.primary-button, .secondary-button, .danger-button {
  min-height: 48px;
  padding: 11px 22px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
  transition: transform .2s ease, background .2s ease;
}
.primary-button { background: var(--red); color: #fff; }
.primary-button:hover { background: #aa2929; transform: translateY(-1px); }
.secondary-button { border-color: var(--line); background: transparent; color: var(--ink); }
.secondary-button:hover { border-color: var(--ink); }
.danger-button { border-color: rgba(147,31,32,.25); background: rgba(147,31,32,.06); color: var(--red); }
.button-small { min-height: 38px; padding: 7px 13px; font-size: 12px; }
.button-status { color: var(--muted); font-size: 13px; }

.runner { position: relative; }
.runner-bar {
  position: sticky;
  z-index: 10;
  top: 82px;
  padding: 16px 30px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 22px;
  background: rgba(255,253,248,.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.progress-track { height: 7px; overflow: hidden; background: var(--paper-2); border-radius: 999px; }
.progress-fill { width: 0; height: 100%; background: linear-gradient(90deg, var(--red), #c85f44); transition: width .25s ease; }
.progress-label { color: var(--muted); font-size: 12px; white-space: nowrap; }
.timer { min-width: 92px; color: var(--red); font: 700 22px/1 Georgia, serif; text-align: right; }
.timer.warning { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.question-stage { min-height: 470px; padding: 50px 9% 42px; }
.question-number { color: var(--red); font-size: 12px; font-weight: 800; letter-spacing: .2em; }
.question-title { margin: 12px 0 30px; font: 700 clamp(25px, 3vw, 36px)/1.45 "Songti SC", serif; }
.required-mark { margin-left: 8px; color: var(--red); font-family: sans-serif; }
.answer-options { display: grid; gap: 12px; }
.answer-option {
  position: relative;
  min-height: 60px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.answer-option:hover { transform: translateX(3px); border-color: rgba(147,31,32,.42); }
.answer-option:has(input:checked) { border-color: var(--red); background: rgba(147,31,32,.055); }
.answer-option input { width: 18px; height: 18px; accent-color: var(--red); }
.option-key { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--line); color: var(--red); font: 700 13px/1 Georgia, serif; }
.short-answer { width: 100%; min-height: 150px; padding: 16px; border: 1px solid var(--line); resize: vertical; outline: 0; }
.short-answer:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(147,31,32,.08); }
.question-error { min-height: 25px; margin: 17px 0 0; color: var(--red); font-size: 13px; }
.runner-actions { padding: 20px 9% 30px; display: flex; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); }
.runner-actions > div { display: flex; gap: 10px; }

.result-panel { padding: 62px 38px; text-align: center; }
.result-seal { width: 76px; height: 76px; margin: 0 auto 24px; display: grid; place-items: center; border-radius: 50%; background: var(--red); color: #fff; font: 700 34px/1 "Songti SC", serif; box-shadow: 0 0 0 12px rgba(147,31,32,.08); }
.result-panel h2, .result-panel h3 { margin: 0; font: 700 36px/1.3 "Songti SC", serif; }
.result-panel p { margin: 14px auto 0; max-width: 560px; color: var(--muted); }
.result-score { margin: 28px 0; color: var(--red); font: 700 54px/1 Georgia, serif; }
.review-panel { max-width: 820px; margin: 42px auto 30px; padding-top: 34px; border-top: 1px solid var(--line); text-align: left; }
.review-heading { margin-bottom: 18px; text-align: center; }
.review-heading h3 { margin-top: 5px; font-size: 29px; }
.review-list { display: grid; gap: 14px; }
.review-item { padding: 22px; border: 1px solid var(--line); background: #fff; }
.review-number { margin-bottom: 6px; color: var(--red); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.review-item h4 { margin: 0 0 15px; font: 700 20px/1.55 "Songti SC", serif; }
.review-item dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.review-item dl > div { padding: 12px 14px; background: var(--paper); }
.review-item dt { color: var(--muted); font-size: 11px; }
.review-item dd { margin: 3px 0 0; font-size: 13px; font-weight: 700; }
.wrong-answer { color: #9b3535; }.correct-answer { color: #147443; }
.review-explanation { margin-top: 13px; padding: 13px 14px; border-left: 3px solid var(--gold); background: rgba(199,167,106,.1); }
.review-explanation strong { color: #80632e; font-size: 12px; }
.review-explanation p { max-width: none; margin: 4px 0 0; color: var(--ink); font-size: 13px; white-space: pre-wrap; }
.certificate-result { max-width: 620px; margin: 28px auto; padding: 24px; border: 1px solid rgba(178,138,74,.45); background: linear-gradient(135deg, #fff8e9, #fffdf8); }
.certificate-result p { margin: 0 0 15px; color: #765b2f; }
.certificate-result .primary-button { display: inline-flex; align-items: center; justify-content: center; }
.result-actions { display: flex; justify-content: center; gap: 12px; }

.quiz-footer { padding: 38px 0; background: #10171d; color: #fff; }
.quiz-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.quiz-footer strong { display: block; }
.quiz-footer small { color: rgba(255,255,255,.46); }
.quiz-footer a { color: #e5c98f; font-size: 13px; }

.site-nav a[aria-current="page"]::after { width: 100%; }
.answer-body .site-header { background: rgba(12, 20, 25, .96); color: #fff; backdrop-filter: blur(14px); }
.answer-body .site-header.scrolled { background: rgba(255, 253, 248, .96); color: var(--ink); }
.answer-main { min-height: calc(100vh - 120px); padding: 140px 0 82px; background: radial-gradient(circle at 8% 12%, rgba(147,31,32,.08), transparent 28%), #f4efe7; }
.answer-main .workspace { margin-top: 0; }
.answer-back { margin-bottom: 18px; display: inline-flex; color: var(--red); font-size: 13px; font-weight: 800; }

/* 管理端 */
.admin-body { background: #f1ece4; }
.admin-hero { padding: 58px 0 48px; background: var(--ink); color: #fff; }
.admin-hero-inner { display: flex; justify-content: space-between; align-items: end; gap: 30px; }
.admin-hero h1 { margin: 6px 0 0; font: 700 46px/1.2 "Songti SC", serif; }
.admin-hero p { margin: 10px 0 0; color: rgba(255,255,255,.6); }
.admin-summary { display: flex; gap: 30px; }
.admin-summary div { min-width: 105px; }
.admin-summary strong { display: block; color: #f0d9ad; font: 700 28px/1 Georgia, serif; }
.admin-summary span { color: rgba(255,255,255,.55); font-size: 11px; }
.admin-main { padding: 42px 0 80px; }
.admin-grid { display: grid; grid-template-columns: 390px minmax(0, 1fr); align-items: start; gap: 24px; }
.admin-grid > *, .bank-grid > * { min-width: 0; }
.admin-panel { background: var(--white); border: 1px solid var(--line); box-shadow: 0 14px 45px rgba(22,28,34,.08); }
.admin-panel-head { padding: 24px 26px 20px; border-bottom: 1px solid var(--line); }
.admin-panel-head h2 { margin: 0; font: 700 26px/1.25 "Songti SC", serif; }
.admin-panel-head p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.import-form { padding: 24px 26px 28px; display: grid; gap: 16px; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.check-field { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.check-field input { width: 17px; height: 17px; accent-color: var(--red); }
.list-visibility-field { grid-column: 1 / -1; padding: 10px 12px; background: #f8f3ea; border: 1px solid #eadfce; color: #5d4937; }
.certificate-setting { padding: 13px; display: grid; grid-template-columns: minmax(0, 1fr) 150px; align-items: end; gap: 12px; border: 1px solid rgba(178,138,74,.28); background: rgba(178,138,74,.07); }
.certificate-setting .field input { min-height: 40px; }
.timer-fields { display: grid; grid-template-columns: 1.25fr .75fr; gap: 10px; }
.file-drop { padding: 18px; display: grid; gap: 6px; border: 1px dashed rgba(147,31,32,.38); background: rgba(147,31,32,.035); cursor: pointer; }
.file-drop strong { color: var(--red); font-size: 13px; }
.file-drop small { color: var(--muted); }
.file-drop input { max-width: 100%; }
.template-link { color: var(--red); font-size: 12px; font-weight: 800; }
.form-status { min-height: 24px; color: var(--muted); font-size: 12px; }
.form-status.error { color: var(--red); }
.form-status.success { color: #147443; }
.admin-list-wrap { padding: 0 26px 26px; }
.admin-toolbar { padding: 18px 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.admin-toolbar input { width: min(320px, 100%); min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); background: #fff; }
.admin-list { display: grid; gap: 12px; }
.admin-item { padding: 20px; border: 1px solid var(--line); background: #fff; }
.admin-item-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; }
.admin-item h3 { margin: 5px 0 7px; font: 700 22px/1.35 "Songti SC", serif; }
.admin-item p { margin: 0; color: var(--muted); font-size: 12px; }
.status-pill { display: inline-flex; padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.status-pill.live { color: #17663e; background: #e6f4ec; }
.status-pill.draft { color: #775d21; background: #f8efd9; }
.status-pill.unlisted { margin-left: 6px; color: #6c4d75; background: #f1e7f4; }
.admin-item-count { min-width: 88px; text-align: right; }
.admin-item-count strong { display: block; color: var(--red); font: 700 25px/1 Georgia, serif; }
.admin-item-count span { color: var(--muted); font-size: 10px; }
.admin-item-actions { margin-top: 16px; padding-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); }
.admin-item-actions button, .admin-item-actions a { min-height: 34px; padding: 6px 11px; display: inline-flex; align-items: center; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; font-size: 11px; font-weight: 700; }
.admin-item-actions button:hover, .admin-item-actions a:hover { border-color: var(--red); color: var(--red); }
.admin-item-actions .publish-action { background: var(--red); border-color: var(--red); color: #fff; }
.admin-item-actions .delete-action { color: var(--red); }
.admin-empty { padding: 50px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); }

.settings-dialog { width: min(620px, calc(100vw - 30px)); padding: 0; border: 0; background: var(--white); box-shadow: 0 28px 90px rgba(0,0,0,.28); }
.settings-dialog::backdrop { background: rgba(9,14,18,.72); backdrop-filter: blur(5px); }
.settings-dialog-head { padding: 23px 26px; display: flex; align-items: center; justify-content: space-between; color: #fff; background: var(--ink); }
.settings-dialog-head h2 { margin: 0; font: 700 26px/1.2 "Songti SC", serif; }
.dialog-close { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; cursor: pointer; }
.settings-dialog form { padding: 26px; display: grid; gap: 16px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.responses-dialog { width: min(900px, calc(100vw - 30px)); }
.responses-body { min-height: 180px; max-height: 58vh; padding: 24px 26px; overflow: auto; }
.responses-footer { padding: 16px 26px 24px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); }
.batch-status { margin-right: auto; color: var(--muted); font-size: 12px; }
.responses-table-wrap { overflow-x: auto; }
.responses-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.responses-table th, .responses-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.responses-table th { color: var(--muted); font-size: 11px; }
.responses-tip { margin: 16px 0 0; color: var(--muted); font-size: 12px; }
.qr-dialog { width: min(560px, calc(100vw - 30px)); }
.qr-dialog-body { padding: 28px 32px 8px; text-align: center; }
.qr-dialog-body > p { margin: 15px 0 20px; color: var(--muted); font-size: 13px; }
.qr-dialog-body .field { text-align: left; }
.qr-preview { width: min(280px, 72vw); aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; padding: 12px; background: #fff; border: 1px solid var(--line); }
.qr-preview svg { display: block; width: 100%; height: 100%; }
.bank-section { margin-top: 24px; background: var(--white); border: 1px solid var(--line); box-shadow: 0 14px 45px rgba(22,28,34,.08); }
.bank-section-head { display: flex; align-items: end; justify-content: space-between; }
.bank-section-head h2 { margin-top: 4px; }
.bank-grid { display: grid; grid-template-columns: 390px minmax(0, 1fr); }
.bank-import-form { padding: 25px 26px 30px; display: grid; gap: 15px; border-right: 1px solid var(--line); }
.bank-import-form h3, .bank-list-head h3 { margin: 0; font: 700 22px/1.3 "Songti SC", serif; }
.bank-list-wrap { padding: 25px 26px 30px; }
.bank-list-head { margin-bottom: 16px; display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.bank-list-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.bank-list { display: grid; gap: 11px; }
.bank-item { padding: 17px 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; border: 1px solid var(--line); background: #fff; }
.bank-item h4 { margin: 0 0 4px; font: 700 18px/1.4 "Songti SC", serif; }
.bank-item p { margin: 0; color: var(--muted); font-size: 11px; }
.bank-item-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.bank-item-actions button { min-height: 34px; padding: 6px 11px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 11px; font-weight: 700; }
.bank-item-actions button:hover { border-color: var(--red); color: var(--red); }
.bank-item-actions .create-action { border-color: var(--red); background: var(--red); color: #fff; }

.question-editor-dialog { width: min(1040px, calc(100vw - 24px)); max-height: 92vh; overflow: hidden; }
.question-editor-dialog .settings-dialog-head { align-items: flex-start; }
.question-editor-dialog .settings-dialog-head p { margin: 6px 0 0; color: rgba(255,255,255,.62); font-size: 11px; }
.question-editor-dialog form { max-height: calc(92vh - 86px); padding: 0; display: flex; flex-direction: column; gap: 0; overflow: hidden; }
.question-editor-toolbar { padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); background: #f8f4ed; }
.question-editor-toolbar strong { display: block; color: var(--ink); font-size: 14px; }
.question-editor-toolbar small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.question-editor-list { min-height: 220px; padding: 20px 24px 28px; display: grid; gap: 16px; overflow-y: auto; overscroll-behavior: contain; }
.question-editor-empty { padding: 46px 20px; border: 1px dashed var(--line); text-align: center; color: var(--muted); }
.question-edit-card { border: 1px solid var(--line); background: #fff; box-shadow: 0 8px 24px rgba(22,28,34,.045); }
.question-edit-head { padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); background: #faf8f4; }
.question-edit-index { display: flex; align-items: center; gap: 10px; }
.question-edit-index strong { min-width: 34px; color: var(--red); font: 700 18px/1 Georgia, serif; }
.question-edit-type { min-height: 34px; padding: 5px 28px 5px 9px; border: 1px solid var(--line); background: #fff; font-size: 12px; }
.question-edit-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.question-edit-actions button, .option-remove { min-height: 31px; padding: 5px 9px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; font-size: 11px; }
.question-edit-actions button:hover, .option-remove:hover { border-color: var(--red); color: var(--red); }
.question-edit-actions .question-delete { color: var(--red); }
.question-edit-body { padding: 16px; display: grid; gap: 14px; }
.question-title-field textarea { min-height: 76px; }
.question-edit-meta { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 14px; align-items: end; }
.question-required { min-height: 43px; }
.question-options { display: grid; gap: 8px; }
.question-options-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.question-options-head span { color: var(--ink); font-size: 12px; font-weight: 800; }
.question-options-head button { min-height: 30px; padding: 5px 9px; border: 1px solid var(--line); background: #fff; color: var(--red); cursor: pointer; font-size: 11px; font-weight: 700; }
.option-edit-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.option-edit-key { width: 34px; height: 36px; display: grid; place-items: center; color: #fff; background: var(--ink); font: 700 12px/1 Georgia, serif; }
.option-edit-row input { width: 100%; min-height: 36px; padding: 7px 9px; border: 1px solid var(--line); background: #fff; }
.question-answer-box { padding: 13px; border: 1px solid rgba(178,138,74,.28); background: rgba(178,138,74,.06); }
.question-answer-box > span { display: block; margin-bottom: 8px; color: #72582e; font-size: 11px; font-weight: 800; }
.question-answer-options { display: flex; flex-wrap: wrap; gap: 8px; }
.question-answer-options label { min-height: 34px; padding: 6px 10px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 12px; }
.question-answer-options input { accent-color: var(--red); }
.question-answer-box select, .question-answer-box input[type="text"] { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); background: #fff; }
.question-explanation textarea { min-height: 68px; }
.question-editor-dialog .form-status { padding: 0 24px; }
.question-editor-dialog .sticky-actions { padding: 14px 24px 18px; border-top: 1px solid var(--line); background: #fff; }

@media (max-width: 980px) {
  .quiz-hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .quiz-hero-note { max-width: 580px; }
  .admin-grid { grid-template-columns: 1fr; }
  .bank-grid { grid-template-columns: 1fr; }
  .bank-import-form { border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-grid > .admin-panel:first-child { position: static; }
}

@media (max-width: 640px) {
  :root { --shell: calc(100% - 28px); }
  .quiz-nav { min-height: 70px; }
  .quiz-brand-mark { width: 40px; height: 40px; }
  .quiz-brand-text strong { max-width: 205px; font-size: 12px; }
  .quiz-brand-text small { display: none; }
  .quiz-nav-links a:not(:last-child) { display: none; }
  .quiz-nav-links a { padding: 8px 10px; font-size: 11px; }
  .quiz-hero { padding: 130px 0 62px; }
  .quiz-hero h1 { font-size: 40px; }
  .quiz-hero-lead { font-size: 14px; }
  .quiz-main { padding: 54px 0 72px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .quiz-list { grid-template-columns: 1fr; }
  .quiz-card { min-height: 112px; padding: 12px; grid-template-columns: 68px minmax(0, 1fr) 24px; gap: 13px; }
  .quiz-card-index { min-height: 82px; padding: 10px; }
  .quiz-card-index strong { font-size: 25px; }
  .quiz-card h3 { margin-bottom: 6px; font-size: 19px; }
  .quiz-card p { display: none; }
  .quiz-card-meta { margin-top: 7px; gap: 5px; }
  .quiz-card-meta span { padding: 2px 5px; font-size: 9px; }
  .quiz-card-action { min-width: 0; }
  .quiz-card-action span { display: none; }
  .workspace { margin-top: 42px; }
  .workspace-head { padding: 25px 22px; }
  .workspace-head h1, .workspace-head h2 { font-size: 28px; }
  .identity-panel { padding: 26px 22px; }
  .identity-grid { grid-template-columns: 1fr; }
  .identity-actions { align-items: flex-start; flex-direction: column; }
  .runner-bar { top: 70px; padding: 13px 16px; grid-template-columns: 1fr auto; gap: 10px; }
  .progress-label { grid-row: 2; }
  .timer { grid-column: 2; grid-row: 1 / 3; font-size: 19px; }
  .question-stage { min-height: 440px; padding: 36px 20px 28px; }
  .question-title { font-size: 25px; }
  .answer-option { padding: 13px; }
  .runner-actions { padding: 18px 20px 24px; }
  .runner-actions > div { width: 100%; justify-content: flex-end; }
  .result-panel { padding: 48px 22px; }
  .review-item { padding: 17px; }
  .review-item dl { grid-template-columns: 1fr; }
  .result-actions { flex-direction: column; }
  .quiz-footer-inner { align-items: flex-start; flex-direction: column; }
  .answer-main { padding: 104px 0 60px; }
  .admin-hero { padding: 42px 0 36px; }
  .admin-hero-inner { align-items: flex-start; flex-direction: column; }
  .admin-hero h1 { font-size: 36px; }
  .admin-summary { width: 100%; justify-content: space-between; gap: 10px; }
  .admin-summary div { min-width: 0; }
  .admin-main { padding-top: 24px; }
  .admin-panel-head, .import-form { padding-inline: 20px; }
  .admin-panel, .admin-panel-head, .import-form, .admin-list-wrap, .bank-section, .bank-grid, .bank-import-form, .bank-list-wrap { min-width: 0; max-width: 100%; }
  .file-drop input { width: 100%; min-width: 0; }
  .admin-list-wrap { padding-inline: 18px; }
  .admin-toolbar { align-items: stretch; flex-direction: column; }
  .admin-toolbar input { width: 100%; }
  .admin-item-main { grid-template-columns: 1fr; }
  .admin-item-count { text-align: left; }
  .check-grid { grid-template-columns: 1fr; }
  .certificate-setting { grid-template-columns: 1fr; }
  .bank-import-form, .bank-list-wrap { padding-inline: 18px; }
  .bank-item { grid-template-columns: 1fr; }
  .bank-item-actions { justify-content: flex-start; }
  .settings-dialog form { padding: 20px; }
  .responses-body { padding: 18px; }
  .responses-footer { padding: 14px 18px 18px; align-items: stretch; flex-direction: column; }
  .batch-status { margin-right: 0; text-align: center; }
  .qr-dialog-body { padding: 22px 20px 6px; }
  .question-editor-dialog { width: calc(100vw - 12px); max-height: 96vh; }
  .question-editor-dialog form { max-height: calc(96vh - 82px); }
  .question-editor-toolbar { padding: 14px 16px; align-items: stretch; flex-direction: column; }
  .question-editor-list { padding: 14px 12px 22px; }
  .question-edit-head { align-items: flex-start; flex-direction: column; }
  .question-edit-actions { width: 100%; justify-content: flex-start; }
  .question-edit-meta { grid-template-columns: 1fr; }
  .option-edit-row { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .question-editor-dialog .sticky-actions { padding: 12px 16px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
