:root {
  color-scheme: light;
  --ink: #182a24;
  --muted: #52675d;
  --line: #d8e2da;
  --paper: #fff;
  --canvas: #f4f7f1;
  --accent: #1d6045;
  --accent-quiet: #e5f0e8;
  --warning: #86531f;
  --warning-quiet: #fcf3e4;
  --danger: #9c3228;
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  line-height: 1.5;
}

*, *::before, *::after { box-sizing: border-box; }
body { background: var(--canvas); color: var(--ink); margin: 0; }
a { color: var(--accent); text-underline-offset: .18em; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { outline-offset: 4px; }
header { background: #13382c; color: white; }
header a { color: #edfaf1; }
.bar, main { max-width: 1160px; margin-inline: auto; width: calc(100% - 48px); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding-block: 10px; }
.brand { color: white; font-weight: 700; font-size: 1.08rem; text-decoration: none; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
nav a { font-size: .9rem; text-decoration: none; }
nav a:hover, nav a:focus-visible { text-decoration: underline; }
.chip { display: inline-block; padding: 3px 9px; border-radius: 6px; background: var(--accent-quiet); color: var(--accent); font-size: .8rem; font-weight: 650; white-space: nowrap; }
.chip.warning { background: var(--warning-quiet); color: var(--warning); }
main { padding-block: 32px 48px; }
main.player { max-width: 850px; }
h1, h2, h3, p { margin-block: 0; }
h1 { font-size: clamp(1.65rem, 4vw, 2.25rem); line-height: 1.25; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
.heading { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.muted { color: var(--muted); }
.heading p, .section-head p, .field-help { margin-top: 6px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.panel, .metrics > div { min-width: 0; overflow-wrap: anywhere; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.stack { display: grid; gap: 16px; }
.section-head { margin-bottom: 14px; }
.metrics { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 0; }
.metrics dt { color: var(--muted); font-size: .85rem; }
.metrics dd { margin: 3px 0 0; font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.notice { color: var(--accent); background: var(--accent-quiet); border: 1px solid #cce0d0; padding: 11px 14px; border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.notice.warning { background: var(--warning-quiet); border-color: #eadabd; color: var(--warning); }
.notice.error { background: #fff1ef; border-color: #f0d0cc; color: var(--danger); }
form { margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
.form-grid .wide { grid-column: 1 / -1; }
label { display: grid; gap: 5px; min-width: 0; font-size: .9rem; font-weight: 600; }
input, select, textarea { width: 100%; min-width: 0; color: var(--ink); background: white; border: 1px solid #adbeb3; border-radius: 7px; padding: 9px 10px; }
button { min-height: 42px; color: white; background: var(--accent); border: 1px solid var(--accent); border-radius: 7px; padding: 8px 13px; font-weight: 650; cursor: pointer; }
button:hover { background: #154a35; }
button.secondary, .button-link { color: var(--accent); background: white; border-color: #aac6b4; }
button.secondary:hover, .button-link:hover { background: var(--accent-quiet); }
.button-link { display: inline-block; min-height: 42px; padding: 9px 13px; border: 1px solid #aac6b4; border-radius: 7px; text-decoration: none; font-weight: 650; }
button:disabled { color: var(--muted); background: #ecefea; border-color: var(--line); cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.field-help { font-size: .82rem; color: var(--muted); font-weight: 400; }
input[type="checkbox"] { width: 1.05rem; height: 1.05rem; }
.check { display: flex; align-items: center; gap: 8px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; text-align: left; }
th, td { padding: 10px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); background: #f7f9f6; white-space: nowrap; }
td.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
.inline-data { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; }
.inline-data dt { color: var(--muted); }
.inline-data dd { margin: 0; overflow-wrap: anywhere; }
code, .ref { font-family: "Cascadia Mono", Consolas, ui-monospace, monospace; overflow-wrap: anywhere; font-size: .9em; }
details { margin-block: 4px; }
summary { color: var(--accent); cursor: pointer; }
details > div { padding-top: 8px; }
ol.steps { padding-inline-start: 1.3rem; margin-block: 10px 0; }
ol.steps li + li { margin-top: 5px; }
@media (max-width: 700px) {
  .bar, main { width: calc(100% - 28px); }
  .grid { grid-template-columns: 1fr; }
  main { padding-block: 22px 32px; }
  .panel { padding: 14px; }
}
@media (max-width: 430px) {
  .form-grid { grid-template-columns: 1fr; }
  .bar { gap: 8px; }
  nav { gap: 10px; }
}
