:root {
  --ink: #1c1917;
  --seal: #c23a3a;
  --paper: #fffdf8;
  --bg: #e6e1d8;
  --bar: #221c19;
  --muted: #5e5852;
  --line: #2a2622;
  --soft: #f3efe8;
  color-scheme: light;
}
.theme-mecha {
  --seal: #8e2433;
  --bg: #d5dbe3;
  --paper: #f4f7fb;
  --bar: #141a22;
  --soft: #eef2f6;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", "PMingLiU", serif;
  font-size: 16px;
  line-height: 1.65;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.paper {
  width: min(860px, calc(100% - 20px));
  margin: 16px auto 108px;
  background: var(--paper);
  box-shadow: 0 12px 40px rgba(40, 30, 20, 0.12);
  padding: 28px 22px 36px;
  position: relative;
}
.mast { position: relative; text-align: center; padding-top: 22px; }
.secret {
  position: absolute;
  left: 0;
  top: 0;
  font-family: "SimHei", "Heiti SC", "Noto Sans SC", sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
}
.brand {
  position: absolute;
  right: 0;
  top: 0;
  font-family: "SimHei", "Heiti SC", "Noto Sans SC", sans-serif;
  font-size: 13px;
  letter-spacing: 0.12em;
}
.kicker {
  margin: 8px 0 0;
  font-size: 15px;
  letter-spacing: 0.12em;
}
h1 {
  margin: 8px 0 0;
  font-size: clamp(28px, 6vw, 42px);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.25;
}
.volume { margin: 6px 0 0; font-size: 18px; }
.seal {
  width: 74px;
  height: 74px;
  margin: 10px auto 0;
  border: 3px solid var(--seal);
  border-radius: 50%;
  color: var(--seal);
  display: grid;
  place-items: center;
  font-family: "Kaiti SC", "KaiTi", "STKaiti", serif;
  font-size: 22px;
  transform: rotate(-12deg);
  letter-spacing: 0.08em;
  box-shadow: inset 0 0 0 1px var(--seal);
  opacity: 0.9;
}
.chain {
  margin: 12px auto 0;
  max-width: 36em;
  padding: 8px 12px;
  background: #fff4f2;
  color: var(--seal);
  font-size: 14px;
}
.theme-mecha .chain { background: #f8eef0; }
.idline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
  margin-top: 18px;
  text-align: left;
  flex-wrap: wrap;
}
.name { display: flex; align-items: center; gap: 8px; }
.name input {
  width: 9em;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
  padding: 4px 2px;
  font-size: 16px;
  outline: none;
}
.examno { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.digits { display: flex; }
.digits span {
  width: 22px;
  height: 28px;
  border: 1px solid var(--line);
  border-right: 0;
  display: grid;
  place-items: center;
  font-family: "Times New Roman", serif;
  font-size: 16px;
}
.digits span:last-child { border-right: 1px solid var(--line); }
.score {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-family: "SimHei", "Heiti SC", "Noto Sans SC", sans-serif;
}
.score th, .score td {
  border: 1px solid var(--line);
  height: 34px;
  text-align: center;
  font-weight: 500;
}
.score td.filled { color: var(--seal); font-weight: 700; font-size: 18px; }
.notes { text-align: left; margin-top: 18px; }
.notes h2, .sec h2 {
  font-size: 16px;
  margin: 0 0 8px;
  font-family: "SimHei", "Heiti SC", "Noto Sans SC", sans-serif;
}
.notes ol { margin: 0; padding-left: 1.4em; }
.notes li { margin: 4px 0; }
.sec { margin-top: 22px; text-align: left; }
.sec .rule { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.q {
  position: relative;
  margin: 0 0 16px;
  padding: 8px 8px 4px;
}
.stem { margin: 0 0 8px; font-weight: 700; }
.opt {
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 7px 6px;
}
.opt:hover { background: var(--soft); }
.opt.on { background: #fff1ef; }
.theme-mecha .opt.on { background: #f8e8eb; }
.letter {
  flex: none;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--seal);
  border-radius: 50%;
  color: var(--seal);
  display: grid;
  place-items: center;
  font-family: "Times New Roman", "SimHei", sans-serif;
  font-weight: 700;
}
.opt.on .letter { background: var(--seal); color: #fff; }
.otext { padding-top: 2px; }
.graded .opt { pointer-events: none; }
.graded .q { padding-right: 68px; }
.opt.yes .letter { box-shadow: 0 0 0 2px var(--seal); }
.opt.bad .otext { text-decoration: line-through; text-decoration-color: var(--seal); text-decoration-thickness: 2px; }
.mark {
  position: absolute;
  right: 8px;
  top: 4px;
  width: 54px;
  height: 54px;
  border: 3px solid var(--seal);
  border-radius: 50%;
  color: var(--seal);
  display: grid;
  place-items: center;
  transform: rotate(-8deg);
  font-family: "Times New Roman", serif;
  font-weight: 700;
  background: rgba(255, 253, 248, 0.72);
  pointer-events: none;
}
.mark.zero { border-radius: 0; background: transparent; }
.mark.zero::before {
  content: "";
  position: absolute;
  width: 64px;
  height: 3px;
  background: var(--seal);
  transform: rotate(-28deg);
}
.analysis {
  margin: 6px 4px 0 38px;
  padding: 8px 10px;
  background: var(--soft);
  border-left: 3px solid var(--seal);
  font-size: 14px;
  color: #3a342e;
}
.verdict {
  margin-top: 18px;
  text-align: left;
  border: 1px dashed var(--seal);
  padding: 16px 14px 12px;
  position: relative;
}
.verdict h2 { margin: 0; font-size: 15px; letter-spacing: 0.2em; text-align: center; }
.v-score {
  margin: 0;
  text-align: center;
  font-size: 72px;
  line-height: 1;
  color: var(--seal);
  font-family: "Times New Roman", "Songti SC", serif;
}
.v-title { margin: 4px 0 0; text-align: center; font-size: 22px; }
.v-desc, .v-meta { margin: 6px 0 0; text-align: center; }
.v-meta { color: var(--muted); font-size: 14px; }
.mods {
  display: grid;
  grid-template-columns: 5.2em 1fr auto;
  gap: 6px 8px;
  align-items: center;
  margin-top: 12px;
  font-size: 13px;
  font-family: "SimHei", "Heiti SC", "Noto Sans SC", sans-serif;
}
.m-bar { height: 8px; background: #e5e0d8; border-radius: 99px; overflow: hidden; }
.m-fill { display: block; height: 100%; width: 0; background: var(--seal); transition: width 0.6s ease; }
.m-fill.weak { background: #8a8178; }
.tip { margin: 10px 0 0; font-size: 14px; }
.again {
  display: block;
  margin: 12px auto 0;
  background: transparent;
  border: 1px solid var(--line);
  padding: 8px 16px;
}
.colophon {
  margin-top: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.promo {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  text-align: center;
  font-family: "SimHei", "Heiti SC", "Noto Sans SC", sans-serif;
}
.promo-kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--muted);
}
.promo-art {
  display: block;
  margin-top: 12px;
}
.promo-art img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
}
.promo-name {
  margin: 12px 0 0;
  font-size: 20px;
  letter-spacing: 0.12em;
}
.promo-desc {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.promo-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}
.promo-links a {
  display: inline-block;
  min-width: 128px;
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
}
.promo-steam { background: #171a21; }
.promo-bili { background: #fb7299; }
.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-family: "SimHei", "Heiti SC", "Noto Sans SC", sans-serif;
}
.bar-status { font-size: 14px; color: var(--muted); }
.bar-status b { color: var(--ink); }
.bar-actions { display: flex; gap: 8px; }
.bar button, .sheet button, .again {
  border-radius: 999px;
}
.ghost, .solid {
  border: 0;
  padding: 10px 16px;
  font-family: "SimHei", "Heiti SC", "Noto Sans SC", sans-serif;
}
.ghost { background: var(--soft); }
.ghost.hot { background: var(--seal); color: #fff; }
#verdictShare { display: block; margin: 14px auto 0; }
.solid { background: var(--bar); color: #fff; }
.solid.hot { background: var(--seal); }
.warn {
  border: 0;
  background: transparent;
  color: var(--seal);
  padding: 0;
  text-decoration: underline;
}
.mask, .guide {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(20, 16, 12, 0.45);
}
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  font-family: "SimHei", "Heiti SC", "Noto Sans SC", sans-serif;
  max-height: min(88vh, 760px);
  overflow: auto;
}
.sheet h3 { margin: 0 0 8px; text-align: center; font-size: 18px; }
.preview {
  margin: 0;
  padding: 10px 12px;
  background: var(--soft);
  border-radius: 8px;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-all;
}
.poster {
  display: block;
  width: min(100%, 280px);
  margin: 10px auto 0;
  border: 1px solid #ddd;
}
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.actions button, .wide {
  border: 0;
  background: var(--soft);
  padding: 12px 8px;
  border-radius: 12px;
  font-family: "SimHei", "Heiti SC", "Noto Sans SC", sans-serif;
}
.actions .wx { background: #07c160; color: #fff; }
.actions .qq { background: #12b7f5; color: #fff; }
.wide { width: 100%; margin-top: 8px; }
.fine { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.guide { background: rgba(0, 0, 0, 0.72); color: #fff; }
.guide-card {
  position: absolute;
  right: 18px;
  top: 18px;
  width: min(280px, calc(100% - 36px));
  text-align: right;
  font-family: "SimHei", "Heiti SC", "Noto Sans SC", sans-serif;
}
.arrow {
  width: 0;
  height: 0;
  margin-left: auto;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 16px solid #fff;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  z-index: 40;
  background: rgba(20, 16, 12, 0.9);
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-family: "SimHei", "Heiti SC", "Noto Sans SC", sans-serif;
  max-width: calc(100% - 32px);
}
@media (max-width: 420px) {
  h1 { font-size: 26px; letter-spacing: 0; }
  .digits span { width: 16px; height: 24px; font-size: 13px; }
  .secret, .brand { font-size: 12px; }
}
@media (min-width: 760px) {
  .paper { padding: 36px 48px 48px; margin-top: 28px; }
  .digits span { width: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .m-fill { transition: none; }
}
@media print {
  body { background: #fff; }
  .bar, .mask, .guide, .toast, .seal, .promo { display: none !important; }
  .paper { box-shadow: none; width: auto; margin: 0; }
}
