:root {
  color-scheme: light;
  --ink: #17342d;
  --text: #233f36;
  --dim: #536a61;
  --paper: #f6f5ee;
  --white: #fdfdf8;
  --line: #d8ded1;
  --green: #28664e;
  --mint: #deedd7;
  --amber: #ffe6a7;
  --warm: #8d3828;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background: var(--paper);
  color: var(--text);
  font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: 4px; }
button, input, select, textarea { font: inherit; }
button, .button {
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 9px 14px;
  color: white;
  background: var(--green);
  cursor: pointer;
  font-weight: 650;
  text-decoration: none;
  line-height: 1.35;
}
button:hover, .button:hover { filter: brightness(.94); }
button:disabled { opacity: .55; cursor: not-allowed; }
button.quiet, .button.quiet { background: var(--white); border-color: var(--line); color: var(--ink); }
button.link { background: none; color: var(--green); padding: 0; text-decoration: underline; text-underline-offset: 4px; }
button.danger { color: var(--warm); }
:focus-visible { outline: 3px solid #368f6f; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
p { line-height: 1.75; }
.masthead { background: var(--white); border-bottom: 1px solid var(--line); }
.topbar { max-width: 1376px; margin: auto; display: flex; align-items: center; gap: 20px; padding: 14px 30px; }
.branding { display: flex; align-items: center; gap: 11px; text-decoration: none; line-height: 1.2; }
.branding strong { display: block; font-size: 19px; letter-spacing: .015em; }
.branding small { display: block; color: var(--dim); font-size: 11px; margin-top: 5px; }
.logo { width: 38px; height: 38px; flex: none; display: grid; align-content: center; gap: 4px; padding: 8px; background: var(--ink); border-radius: 7px; }
.logo i { height: 3px; width: 100%; border-radius: 3px; background: #d3eaca; }
.logo i:nth-child(2) { width: 75%; }
.logo i:nth-child(3) { width: 47%; }
.mode { color: var(--dim); font: 12px "Microsoft YaHei", sans-serif; padding-left: 16px; border-left: 1px solid var(--line); }
.account { margin-left: auto; }
.workspace { max-width: 1376px; margin: auto; padding: 28px 30px 44px; display: grid; grid-template-columns: 218px minmax(0,1fr); gap: 27px; min-height: calc(100vh - 141px); align-items: start; }
.sidebar { position: sticky; top: 16px; display: grid; gap: 6px; }
.nav-label { color: var(--dim); margin: 8px 0; font-size: 13px; }
.nav-item, .step-link { display: flex; width: 100%; align-items: center; text-align: left; gap: 12px; background: transparent; color: var(--ink); border-color: transparent; }
.nav-item:hover, .step-link:hover { background: var(--mint); }
.nav-item[aria-current], .step-link[aria-current] { background: var(--mint); border-color: #a6c5a7; color: var(--ink); }
.nav-item span { color: var(--dim); font: 12px "Cascadia Mono", monospace; }
.side-note { margin-top: 15px; border-top: 1px solid var(--line); padding: 15px 5px; color: var(--dim); font-size: 13px; }
.stack { min-width: 0; display: grid; gap: 18px; }
.hero { overflow: hidden; border-radius: 11px; background: var(--ink); color: #f8f8e9; position: relative; display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; padding: clamp(25px,4vw,53px); align-items: center; }
.hero h1 { font-size: clamp(30px,4vw,52px); letter-spacing: -.06em; line-height: 1.18; margin: 12px 0 16px; }
.hero p { max-width: 33em; color: #d7e4d8; }
.hero .button, .hero button { background: #d9f0be; color: var(--ink); }
.hero button.quiet { background: transparent; color: #e9f1df; border-color: #759989; }
.hero .caption { color: #c5e0b2; font-size: 13px; }
.hero-sheet { display: grid; gap: 8px; border: 1px solid #567466; background: #203e34; border-radius: 8px; padding: clamp(12px,2.3vw,28px); min-width: 0; }
.hero-sheet > span { color: #cae6b8; font-size: 13px; }
.sheet-row { display: grid; gap: 12px; grid-template-columns: 28px 1fr; align-items: baseline; padding: 10px 0; border-bottom: 1px solid #527466; }
.sheet-row:last-child { border: 0; }
.sheet-row b { font: 13px "Cascadia Mono", monospace; color: #cae6b8; }
.sheet-row span { font-weight: 600; }
.panel { padding: clamp(15px,2.5vw,27px); background: var(--white); border: 1px solid var(--line); border-radius: 9px; min-width: 0; }
.panel > h1 { font-size: clamp(23px,2.8vw,34px); line-height: 1.3; }
.panel > h2, .subhead h2 { font-size: 20px; }
.panel > p, .subhead p { margin-top: 7px; color: var(--dim); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.actions { margin-top: 19px; }
.between { justify-content: space-between; }
.muted { color: var(--dim); }
.note { padding: 12px 15px; border-left: 3px solid #bc8f47; background: #fff3d4; color: #613b13; line-height: 1.6; }
.success { border-color: #4d8e68; background: var(--mint); color: var(--ink); }
.alert { border-color: #a04432; background: #fae5db; color: #723126; }
.section-title { margin: 0 0 15px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; margin-top: 14px; }
.grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.grid.four { grid-template-columns: repeat(4,minmax(0,1fr)); }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 650; min-width: 0; align-content: start; }
.field input, .field select, .field textarea, .input {
  width: 100%; min-width: 0; padding: 8px 9px; min-height: 38px; border: 1px solid #bac9bb;
  border-radius: 4px; background: #fff; color: var(--ink); font-weight: 400;
}
.field input[readonly], .field input:disabled, .field select:disabled, .field textarea:disabled { background: #f0f2ea; color: #455d50; }
.field textarea { resize: vertical; min-height: 70px; }
.field small { font-weight: normal; color: var(--dim); overflow-wrap: anywhere; }
.field input[type=file] { font-size: 12px; }
.check { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; line-height: 1.6; }
.check input { width: 17px; height: 17px; accent-color: var(--green); margin: 3px 0 0; flex: 0 0 auto; }
.table-scroll { margin-top: 12px; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 14px; }
thead { background: #eaf0e4; }
th, td { padding: 10px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
td .field { min-width: 90px; }
th { white-space: nowrap; }
td { overflow-wrap: anywhere; }
.steps { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.step-link { font-size: 13px; gap: 7px; padding: 8px 9px; border: 1px solid var(--line); }
.step-link span { font: 11px "Cascadia Mono", monospace; color: var(--dim); }
.step-link[aria-current] { border-color: #91b894; }
.record-row { display: grid; gap: 4px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.badgemark { display: inline-flex; background: #e8eee2; color: var(--ink); padding: 4px 8px; border-radius: 4px; font-size: 12px; }
.cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.score { border: 1px solid var(--line); border-radius: 7px; padding: 13px 15px; background: #f3f6ee; display: grid; gap: 6px; }
.score strong { font: 650 31px "Cascadia Mono", monospace; color: var(--ink); }
.score small { color: var(--dim); }
.local { padding: 10px 13px; font-size: 13px; background: #ffefca; border-radius: 6px; }
.footer { display: flex; flex-wrap: wrap; gap: 16px; padding: 18px 30px; border-top: 1px solid var(--line); color: var(--dim); max-width: 1376px; margin: auto; font-size: 13px; }
dialog { width: min(620px,calc(100% - 22px)); max-height: calc(100% - 22px); border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); padding: 23px; }
dialog::backdrop { background: #132e27a6; }
dialog .qr { width: min(240px, 80%); height: auto; }
.message { position: fixed; z-index: 5; bottom: 20px; right: 20px; display: block; max-width: min(480px,calc(100% - 40px)); background: var(--ink); color: #fff; padding: 12px 15px; border-radius: 7px; box-shadow: 0 4px 15px #132e2750; }
.message[hidden] { display: none; }
.legal { max-width: min(780px,calc(100% - 28px)); margin: 24px auto; }
.legal h2 { margin-top: 19px; }
.cover { font-size: 15px; line-height: 1.7; }
.cover h1 { margin: 20px 0; text-align: center; }
.cover dt { font-weight: bold; }
.cover dd { margin: 0 0 10px; }
@media (max-width: 930px) {
  .workspace { grid-template-columns: 165px minmax(0,1fr); gap: 15px; padding-inline: 18px; }
  .hero { grid-template-columns: 1fr; }
  .hero-sheet { display: none; }
  .grid.four { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 665px) {
  .topbar { padding: 10px 14px; gap: 8px; }
  .mode, .nav-label, .side-note { display: none; }
  .workspace { grid-template-columns: minmax(0,1fr); gap: 12px; padding: 12px 12px 24px; }
  .sidebar { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .nav-item { width: auto; padding: 8px; font-size: 13px; gap: 4px; }
  .nav-item span { display: none; }
  .grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cards { gap: 6px; }
  .score { padding: 9px; }
  .score strong { font-size: 24px; }
}
@media print {
  body.print-cover .masthead, body.print-cover .sidebar, body.print-cover .footer, body.print-cover #workspace, body.print-cover .message, body.print-cover dialog .row { display: none; }
  body.print-cover dialog { position: static; display: block; border: 0; max-height: none; width: 100%; padding: 20mm; margin: 0; }
  body.print-cover dialog::backdrop { display: none; }
  body.print-cover #dialog-title { display: none; }
  body.print-cover { background: #fff; }
}
