:root {
  color-scheme: light;
  --ink: #272531; --muted: #625c69; --line: #d9d2d7; --accent: #40314e;
  --paper: #fffcf5; --base: #f5f2f0; --white: #fffefd; --lavender: #efebf5;
  --red: #8d3c32; --red-bg: #f7e7df; --green: #336054;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-size: 15px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--base); }
button, textarea, input { font: inherit; }
button, summary, label { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible, .mark-option:has(input:focus-visible) { outline: 3px solid #285e89; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 1rem; top: 0.5rem; z-index: 2; padding: .6rem 1rem; color: var(--white); background: var(--accent); transform: translateY(-200%); }
.skip:focus { transform: none; }
.frame { max-width: 1240px; margin-inline: auto; padding-inline: 36px; }
.site-head { border-bottom: 1px solid #e4dee2; background: var(--white); }
.mast { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 17px; font-weight: 750; }
.brand img { flex: none; }
.mast-note, .source-label span { color: var(--muted); font-size: 13px; }
.mast-note span { margin-inline: 5px; color: #8b778c; }
.desk-head { padding-top: 35px; padding-bottom: 23px; display: flex; justify-content: space-between; align-items: end; gap: 14px; }
.index-label { color: var(--green); font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.index-label span { width: 13px; height: 3px; background: var(--green); }
h1 { margin: 7px 0 9px; font-size: 38px; line-height: 1.16; }
.source-label { margin: 0; font-weight: 650; }
.button { min-height: 41px; border: 1px solid transparent; border-radius: 5px; padding: 7px 14px; font-size: 14px; font-weight: 650; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.button svg { width: 16px; height: 16px; }
.secondary { background: var(--white); color: var(--accent); border-color: #b9acbe; }
.secondary:hover:not(:disabled) { background: var(--lavender); }
.solid { background: var(--accent); color: white; }
.solid:hover:not(:disabled) { background: #574064; }
.button:disabled { background: #eee9ee; color: #635c69; border-color: #dcd4de; }
.draft-band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 20px; }
summary { min-height: 42px; padding: 11px 4px; cursor: pointer; font-weight: 680; color: var(--accent); }
.draft-body { padding: 4px 4px 15px; }
.draft-body label { display: block; font-weight: 650; margin-bottom: 7px; }
textarea { display: block; background: var(--white); color: var(--ink); width: 100%; border: 1px solid #a69aaa; border-radius: 4px; padding: 12px; resize: vertical; line-height: 1.7; }
textarea[aria-invalid="true"] { border: 2px solid var(--red); }
.draft-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.draft-foot p, .status { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.draft-foot button { flex: none; }
.error { color: var(--red); }
.work-grid { display: grid; grid-template-columns: minmax(0, 1.07fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.bench, .reading { min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: 7px; }
.panel-head { min-height: 59px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 0 15px; }
.panel-step { display: grid; place-items: center; min-width: 32px; height: 28px; padding: 0 3px; color: var(--white); background: var(--accent); font: 700 13px/1 ui-monospace, Consolas, monospace; border-radius: 3px; }
.panel-head h2, .delivery h2 { margin: 0; font-size: 19px; }
.counter { color: var(--muted); font-size: 13px; margin-left: auto; white-space: nowrap; }
.edge-list { list-style: none; margin: 0; padding: 0; max-height: 307px; overflow-y: auto; }
.edge-list li + li { border-top: 1px solid #e9e3e8; }
.edge { position: relative; width: 100%; min-height: 48px; padding: 8px 15px; display: grid; grid-template-columns: 24px minmax(0, 1fr) 29px auto; align-items: center; gap: 7px; border: 0; text-align: left; color: var(--ink); background: transparent; }
.edge:hover { background: #f6f3f8; }
.edge[aria-pressed="true"] { background: var(--lavender); box-shadow: inset 3px 0 var(--accent); }
.edge:focus-visible { outline-offset: -4px; }
.line-no, .paper-no, .review-no { font: 700 13px/1 ui-monospace, Consolas, monospace; color: var(--muted); }
.line-text, .review-text { overflow-wrap: anywhere; }
.line-mark { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #d8cddc; border-radius: 3px; background: var(--white); color: var(--accent); font-weight: 750; }
.line-state { font-size: 11px; color: var(--red); background: var(--red-bg); padding: 4px; border-radius: 3px; white-space: nowrap; }
.line-state:empty { display: none; }
.controls { border-top: 1px solid var(--line); background: #f8f6fa; border-radius: 0 0 7px 7px; padding: 12px 15px 13px; }
.control-head { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 9px; color: var(--accent); font-weight: 750; }
.arrows { display: flex; gap: 5px; }
.arrow { width: 37px; height: 35px; border: 1px solid #b9acbe; border-radius: 4px; background: var(--white); color: var(--accent); display: grid; place-items: center; }
.arrow:hover:not(:disabled) { background: var(--lavender); }
.arrow:disabled { color: #7c7281; border-color: #ddd5df; }
.arrow svg { width: 18px; height: 18px; }
svg path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mark-field { padding: 0; margin: 9px 0 5px; border: 0; min-width: 0; }
.marks { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; }
.mark-option { position: relative; min-width: 0; min-height: 51px; display: grid; align-content: center; justify-items: center; gap: 2px; padding: 3px 1px; border: 1px solid #cfc4d5; border-radius: 4px; color: var(--accent); background: var(--white); cursor: pointer; }
.mark-option:hover { border-color: var(--accent); }
.mark-option:has(input:checked) { background: var(--accent); border-color: var(--accent); color: white; }
.mark-symbol { font: bold 23px/1.1 "Microsoft YaHei UI", sans-serif; }
.mark-name { font-size: 11px; white-space: nowrap; }
.switches { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; }
.switches label, .confirm { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-size: 14px; cursor: pointer; }
input[type="checkbox"] { width: 17px; height: 17px; flex: none; margin: 0; accent-color: var(--accent); }
.switches label:has(input:disabled) { color: #5f5967; cursor: not-allowed; }
.paper { background: var(--paper); border-bottom: 1px solid var(--line); min-height: 243px; padding: 15px 16px 19px; }
.paper-section { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 13px; }
.paper-section + .paper-section { margin-top: 17px; }
.paper-no { padding-top: 10px; text-align: center; color: var(--red); border-right: 1px solid #d9b6ae; }
.paper p { margin: 0; font-family: "Noto Serif CJK SC", "Songti SC", SimSun, serif; font-size: 20px; line-height: 1.85; overflow-wrap: anywhere; white-space: pre-wrap; }
.read-active { color: #5f312b; background: #f4e1d5; text-decoration: underline; text-decoration-color: #a55748; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.review-panel { padding: 12px 15px 15px; }
.review-panel header { display: flex; align-items: center; gap: 9px; }
.review-panel h3 { margin: 0; font-size: 16px; }
.review-panel ul { list-style: none; padding: 0; margin: 8px 0 0; max-height: 212px; overflow-y: auto; }
.review-panel p { color: var(--muted); margin: 8px 0 0; font-size: 13px; }
.review-link { display: grid; grid-template-columns: 34px minmax(0, 1fr) 16px; align-items: center; width: 100%; min-height: 40px; padding: 6px 7px; border: 0; background: var(--red-bg); color: var(--red); text-align: left; border-radius: 4px; font-size: 14px; }
.review-link:hover { background: #f0dcd2; }
.review-link:focus-visible { outline-offset: -3px; }
.review-panel li + li { margin-top: 5px; }
.review-no, .review-arrow { color: var(--red); }
.delivery { margin-top: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 15px 0 13px; }
.delivery-head, .delivery-head > div { display: flex; align-items: center; gap: 10px; }
.delivery-head { justify-content: space-between; }
.price { color: var(--red); font: 750 18px/1 ui-monospace, Consolas, monospace; }
.delivery-body { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 15px; margin-top: 6px; }
.delivery-body > p:first-child { color: var(--muted); font-size: 13px; margin-block: 0; }
.delivery-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-left: auto; }
.status { flex-basis: 100%; }
.status:empty { height: 0; }
.status.error { color: var(--red); }
.page-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 10px; min-height: 52px; padding-block: 8px; color: var(--muted); font-size: 12px; }
@media (max-width: 860px) { .frame { padding-inline: 21px; } .work-grid { gap: 12px; } .marks { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 690px) {
  .frame { padding-inline: 15px; }
  .mast { min-height: 57px; }
  .desk-head { padding-block: 25px 17px; align-items: start; flex-wrap: wrap; }
  h1 { font-size: 32px; }
  .work-grid { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .draft-band { margin-bottom: 15px; }
  .panel-head { min-height: 54px; }
  .edge { padding-inline: 10px; }
  .paper { min-height: 0; }
  .paper p { font-size: 19px; }
  .delivery-actions { margin-left: 0; }
}
