:root {
--bg: #f6f5f1; --card: #fff; --ink: #1d1d1b; --muted: #6b6a64; --line: #e3e1da;
--accent: #1f6f5c; --accent-ink: #fff; --warn: #9a3412; --ok: #166534; --bad: #b91c1c; --soft: #eaf3ef;
}
@media (prefers-color-scheme: dark) {
:root { --bg: #161615; --card: #20201e; --ink: #ecebe6; --muted: #a3a29b; --line: #34332f; --accent: #5fb39a; --accent-ink: #0d1f1a; --soft: #1d2b26; --ok: #4ade80; --bad: #f87171; --warn: #fb923c; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; }
main { max-width: 680px; margin: 0 auto; padding: 16px 16px 96px; }
h1 { font-size: 20px; margin: 4px 0 12px; }
h2 { font-size: 17px; margin: 0 0 8px; }
p { margin: 6px 0; }
.muted { color: var(--muted); font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 12px 0; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.bar button.link { background: none; border: 0; color: var(--accent); padding: 4px 0; font-size: 14px; min-height: 0; }
button, .btn { font: inherit; border: 0; border-radius: 10px; padding: 11px 18px; background: var(--accent); color: var(--accent-ink); cursor: pointer; min-height: 44px; }
button.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
button:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
input[type=text], input[type=password], select, textarea { font: inherit; font-size: 17px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
label.field { display: block; margin: 10px 0 4px; font-size: 14px; color: var(--muted); }
.steps { display: flex; gap: 6px; overflow-x: auto; margin: 8px 0 4px; padding-bottom: 2px; }
.steps button { flex: 0 0 auto; min-height: 36px; padding: 6px 10px; font-size: 14px; background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.steps button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.steps button.done::after { content: " ✓"; }
.stem { max-height: 40vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--card); }
.stem img { max-width: 100%; display: block; border-radius: 6px; }
.choices { display: grid; gap: 8px; margin-top: 8px; }
.choices label { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; font-size: 17px; }
.choices input { width: 20px; height: 20px; }
.fb { border-left: 4px solid var(--accent); background: var(--soft); }
.fb .when { font-size: 13px; color: var(--muted); }
.big { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.instr { font-size: 17px; }
.instr b { background: var(--soft); padding: 0 4px; border-radius: 4px; }
.err { color: var(--bad); font-size: 14px; min-height: 1.2em; }
.res { width: 100%; border-collapse: collapse; font-size: 14px; }
.res td { border-top: 1px solid var(--line); padding: 6px 4px; vertical-align: top; }
.pass { color: var(--ok); font-weight: 600; white-space: nowrap; }
.fail { color: var(--bad); font-weight: 600; white-space: nowrap; }
.skip { color: var(--muted); white-space: nowrap; }
.preview { max-width: 100%; max-height: 50vh; border-radius: 8px; display: block; margin: 8px auto; }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: var(--soft); color: var(--accent); }
[hidden] { display: none !important; }
#stemBox { height: 180px; }
.pre { white-space: pre-wrap; }
#pasteSrc b { -webkit-user-select: all; user-select: all; }
.draft { display: block; width: 100%; height: 240px; margin-top: 8px; border: 1px dashed var(--line); border-radius: 10px; background: var(--card); color: var(--ink); touch-action: none; }
