:root {
  --bg: #f4f5f7; --panel: #ffffff; --ink: #1c2026; --muted: #626b78; --line: #dde1e7;
  --accent: #2f6fdb; --accent-ink: #ffffff; --ok: #1f8a4c; --bad: #c6382f; --warn: #b7791f; --info: #5b6b85;
  --code: #eef1f5;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14171c; --panel: #1d2128; --ink: #e6e9ee; --muted: #9aa4b2; --line: #2e343d;
    --accent: #5b93f0; --accent-ink: #0d1117; --ok: #49b97a; --bad: #ef6b61; --warn: #e0a84a; --info: #8d9bb3;
    --code: #262b33;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 system-ui, "Microsoft YaHei", sans-serif; }
main { max-width: 980px; margin: 0 auto; padding: 20px 16px 60px; }
header.top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
header.top h1 { font-size: 20px; margin: 0; }
header.top .me { margin-left: auto; color: var(--muted); font-size: 13px; }
@media (max-width: 720px) {
  header.top:has(#docLanguage) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  header.top:has(#docLanguage) nav { grid-column: 1 / -1; }
  header.top:has(#docLanguage) .me { margin-left: 0; grid-column: 1 / -1; }
  #docLanguage { grid-column: 2; grid-row: 1; align-self: start; }
}
a { color: var(--accent); }
section { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 14px 0; }
section h2 { font-size: 16px; margin: 0 0 10px; }
.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 7px;
  padding: 8px 14px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); font-weight: 500; }
.btn:disabled { opacity: .5; cursor: default; }
pre, code { background: var(--code); border-radius: 6px; }
pre { padding: 10px; white-space: pre-wrap; word-break: break-word; margin: 8px 0; font: 13px/1.5 ui-monospace, Consolas, monospace; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 99px; border: 1px solid currentColor; }
.s-todo, .r-info { color: var(--info); } .s-verify, .r-new { color: var(--warn); } .s-pass, .r-pass { color: var(--ok); }
.s-fail, .r-fail { color: var(--bad); } .s-closed { color: var(--muted); } .s-done { color: var(--ok); }
.h-open { color: var(--info); } .h-doing, .h-verify { color: var(--warn); } .h-done { color: var(--ok); } .h-closed { color: var(--muted); }
.reportsTable th { font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
.reportsTable td { border-bottom: 1px solid var(--line); vertical-align: middle; }
.reportsTable tr.finished td { opacity: .65; }
.reportsTable .noteCell { min-width: 12em; overflow-wrap: anywhere; }
.case { border-top: 1px solid var(--line); padding: 12px 0; }
.case:first-of-type { border-top: 0; }
.case h3 { font-size: 15px; margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.note { border-left: 3px solid var(--accent); padding: 4px 10px; margin: 8px 0; }
.report { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.report .reply { border-left: 3px solid var(--ok); padding: 4px 10px; margin-top: 8px; }
.files a { margin-right: 12px; font-size: 13px; }
label { display: block; font-weight: 600; margin: 10px 0 4px; }
select, textarea, input[type=text], input[type=password], input[type=file] { width: 100%; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 8px; }
textarea { min-height: 110px; resize: vertical; }
.choices { display: flex; gap: 8px; flex-wrap: wrap; }
.choices label { font-weight: 500; margin: 0; border: 1px solid var(--line); border-radius: 7px; padding: 6px 12px; cursor: pointer; }
.choices input { margin-right: 6px; }
.builds td, .builds th { text-align: left; padding: 4px 8px 4px 0; font-size: 13px; vertical-align: top; }
.builds { border-collapse: collapse; width: 100%; }
.scroll { overflow-x: auto; }
progress { width: 100%; }
.login { max-width: 360px; margin: 12vh auto; }
.err { color: var(--bad); }
.hide { display: none !important; }
.hash, .files a, .report .muted { overflow-wrap: anywhere; word-break: break-all; }
header.top nav { font-size: 14px; }
label.inline { display: inline; margin: 0; }
fieldset.chips { display: flex; flex-wrap: wrap; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.chip { font: inherit; font-size: 14px; color: var(--ink); background: var(--panel); border: 1px solid var(--line);
  border-radius: 99px; padding: 4px 12px; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; cursor: default; }
.chip:disabled { opacity: .5; cursor: default; }
.tools { margin: 8px 0; }
.tools input[type=text], .tools select { width: auto; flex: 1 1 200px; }
.btn.small { padding: 3px 9px; font-size: 13px; }
select.small { width: auto; padding: 2px 6px; font-size: 13px; }
.pending { border: 1px dashed var(--accent); border-radius: 7px; padding: 6px 10px; }
.outline { list-style: none; padding: 0; margin: 8px 0 0; }
.outline li { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; padding: 6px 4px; border-top: 1px solid var(--line); }
.outline li .acts { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.outline .seq { min-width: 2.5em; color: var(--muted); font-variant-numeric: tabular-nums; }
.outline .loop { background: var(--code); font-weight: 600; color: var(--warn); border-radius: 6px; }
.outline .new { background: color-mix(in srgb, var(--ok) 10%, transparent); }
.outline .slot { border-top: 0; padding: 2px 4px; }
.tag { display: inline-block; font-size: 12px; padding: 0 6px; border-radius: 4px; background: var(--code); color: var(--muted); }
.tag.new { color: var(--ok); } .tag.edit { color: var(--accent); }
.bad { color: var(--bad); font-size: 13px; }
.report h3 { font-size: 15px; margin: 6px 0 0; overflow-wrap: anywhere; }
.report h3.flush { margin: 0; }
.reply { border-left: 3px solid var(--line); padding: 2px 10px; margin: 6px 0; }
.replyBox { min-height: 44px; flex: 1 1 260px; width: auto; }
.p-open { color: var(--info); } .p-accepted { color: var(--warn); } .p-done { color: var(--ok); } .p-rejected { color: var(--muted); }
dialog.digestBox { width: min(1000px, calc(100vw - 32px)); max-height: calc(100vh - 32px); border: 1px solid var(--line);
  border-radius: 10px; background: var(--panel); color: var(--ink); padding: 14px; }
dialog.digestBox::backdrop { background: rgb(0 0 0 / .45); }
dialog.digestBox .row label.inline { margin-left: auto; font-weight: 500; }
.digestText { font: 13px/1.55 ui-monospace, Consolas, "Microsoft YaHei", monospace; white-space: pre-wrap; overflow-wrap: anywhere;
  background: var(--code); border-radius: 6px; padding: 10px; }
.digestText .dead { color: var(--muted); opacity: .6; }
.digestText.hideDead .dead { display: none; }
.moveTo { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.moveTo input { width: 5.5em; padding: 2px 6px; font-size: 13px; }
.progress { height: 8px; background: var(--code); border-radius: 99px; overflow: hidden; margin: 12px 0 6px; }
.progress > div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.gap-top { margin-top: 12px; }
.pack .multi { margin-top: 10px; color: var(--warn); }
.pack .file + .file { border-top: 1px solid var(--code); padding-top: 12px; }
main.wide { max-width: 1200px; }
/* The planning pages (剧情大纲, 关卡策划, 设定集) use the whole screen: wide timelines and maps fit without scrolling. */
main.full { max-width: none; }
@media (min-width: 721px) { main.full { padding-left: 24px; padding-right: 24px; } }
.olBoard { display: grid; gap: 12px; }
.olRow { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.olLane { --tone: var(--ok); border: 1px solid var(--line); border-top: 4px solid var(--tone); border-radius: 8px; padding: 12px; min-width: 0; }
.olLane[data-tone="hazard"] { --tone: var(--warn); }
.olLane[data-tone="violet"] { --tone: #7c5cc4; }
.olName { margin: 0; font-size: 17px; }
.olNote { white-space: pre-wrap; margin: 4px 0 0; }
.olSteps { list-style: none; margin: 10px 0 0; padding: 0; }
.olStep { position: relative; padding: 0 0 14px 32px; min-width: 0; }
.olStep::before { content: ""; position: absolute; left: 10px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.olStep:last-child::before { display: none; }
.olStep[data-tone="edf"] { --tone: var(--ok); }
.olStep[data-tone="hazard"] { --tone: var(--warn); }
.olStep[data-tone="violet"] { --tone: #7c5cc4; }
.olStep[data-tone] .olCard { border-left: 3px solid var(--tone); padding-left: 8px; }
.olDot { position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: var(--panel); background: var(--tone); font-variant-numeric: tabular-nums; }
.olCard h3 { margin: 0; font-size: 15px; display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; overflow-wrap: anywhere; }
.olCard p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.olTag { font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 4px; color: var(--tone);
  background: color-mix(in srgb, var(--tone) 14%, transparent); white-space: nowrap; }
.olBoard.editing .olCard { cursor: pointer; border-radius: 6px; outline: 1px dashed var(--line); outline-offset: 3px; }
.olBoard.editing .olCard:hover, .olBoard.editing .olCard:focus-visible { outline-color: var(--accent); }
.olTools { gap: 4px; margin-top: 4px; }
.olMerge { display: grid; justify-items: center; color: var(--muted); font-size: 13px; text-align: center; }
.olMerge svg { width: min(520px, 100%); height: 40px; display: block; }
.olMerge path { stroke: var(--muted); fill: none; stroke-width: 2; }
.olMerge polygon { fill: var(--muted); }
.danger { color: var(--bad) !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .olLane[data-tone="violet"], :root:not([data-theme="light"]) .olStep[data-tone="violet"] { --tone: #a98ee8; } }
[hidden] { display: none !important; }
.bar { margin: 1em 0; }
.reviewBody { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---- shared: notices, banners, segmented buttons ---- */
.grow { flex: 1 1 auto; }
.small { font-size: 13px; }
.offscreen { position: fixed; left: -9999px; top: 0; }
kbd { font: 12px ui-monospace, Consolas, monospace; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; background: var(--panel); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-align: left; }
.toasts { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 50; width: min(560px, calc(100vw - 24px)); }
.toast { display: flex; align-items: center; gap: 10px; background: var(--ink); color: var(--bg); border-radius: 8px; padding: 8px 10px 8px 14px;
  box-shadow: 0 6px 24px rgb(0 0 0 / .25); font-size: 14px; }
.toast > span { flex: 1; overflow-wrap: anywhere; }
.toast .btn { background: var(--accent); }
.toast.warn { background: var(--warn); color: #111; }
.toastX { background: none; border: 0; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 6px; opacity: .75; }
.toastX:hover { opacity: 1; }
.banner { border: 1px solid var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--panel)); border-radius: 8px; padding: 8px 12px; margin: 10px 0; font-size: 14px; }
.banner ul { margin: 4px 0 0; padding-left: 20px; }
.banner li { margin: 2px 0; }
.banner li .btn { margin-left: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex: none; }
.seg > button { font: inherit; font-size: 14px; background: var(--panel); color: var(--ink); border: 0; padding: 5px 12px; cursor: pointer; }
.seg > button + button { border-left: 1px solid var(--line); }
.seg > button[aria-pressed="true"], .seg > button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
body.busy { cursor: progress; }

/* ---- 关卡策划 ---- */
.stTop h2 { margin: 0; }
.stHeadRow { margin-bottom: 4px; }
.tools input[type=search] { flex: 1 1 240px; width: auto; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 6px 10px; }
.chip.stat b { margin-left: 6px; font-variant-numeric: tabular-nums; }
.chip.stat[aria-pressed="true"] { cursor: pointer; }
.st-planned { --st: var(--info); } .st-writing { --st: var(--warn); } .st-testing { --st: var(--accent); } .st-done { --st: var(--ok); }
.badge.st-planned, .badge.st-writing, .badge.st-testing, .badge.st-done { color: var(--st); }
.stBarWrap { height: 8px; border-radius: 99px; background: var(--code); overflow: hidden; margin: 10px 0 4px; }
.stProgress { display: flex; height: 100%; }
.stProgress > div { background: var(--st); }
.stProgress > .st-planned { opacity: .35; }
.stList { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.stCard { --st: var(--info); background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--st); border-radius: 8px; min-width: 0; }
.stCard[data-status="writing"] { --st: var(--warn); } .stCard[data-status="testing"] { --st: var(--accent); } .stCard[data-status="done"] { --st: var(--ok); }
.stCard.open { box-shadow: 0 4px 18px rgb(0 0 0 / .08); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); border-left-color: var(--st); }
.stHead { display: flex; align-items: stretch; min-width: 0; }
.stGrip { flex: none; width: 22px; display: grid; place-items: center; color: var(--muted); cursor: grab; user-select: none; font-size: 15px; }
.stGrip.off { cursor: default; }
.stNo { flex: none; min-width: 2.4em; display: grid; place-items: center; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.stToggle { flex: 1; min-width: 0; display: grid; gap: 2px; text-align: left; background: none; border: 0; padding: 10px 12px 10px 4px; font: inherit; color: inherit; cursor: pointer; }
.stTitle { font-weight: 600; font-size: 15.5px; overflow-wrap: anywhere; }
.stMeta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 13px; color: var(--muted); }
.stMeta > span { overflow-wrap: anywhere; }
.stSum { margin: -4px 12px 10px calc(22px + 2.4em + 4px); font-size: 14px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stCard.dragging { opacity: .4; }
.stCard.dropBefore { box-shadow: 0 -3px 0 var(--accent); }
.stCard.dropAfter { box-shadow: 0 3px 0 var(--accent); }
.stEditor, .stRead { border-top: 1px solid var(--line); padding: 12px 14px 0; }
.stRead { padding-bottom: 10px; }
.stPart h4 { margin: 8px 0 2px; font-size: 13px; color: var(--muted); }
.stPart p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.stGrid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr); gap: 4px 20px; }
.stField { margin-bottom: 10px; min-width: 0; }
.stField label, .stField .lbl { display: block; font-weight: 600; font-size: 13px; color: var(--muted); margin: 0 0 4px; }
.stField textarea { min-height: 0; resize: vertical; overflow: hidden; }
.stField #f-body { min-height: 160px; }
.stField input[type=search] { flex: 1 1 160px; width: auto; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 8px; }
.stField .seg { display: flex; }
.stField .seg > button { flex: 1; padding: 6px 4px; }
.stField .seg > button[aria-checked="true"] { background: var(--st); color: var(--panel); }
.row.tight { gap: 6px; flex-wrap: nowrap; }
.row.tight select { width: auto; flex: none; }
.stField > a { display: inline-block; margin-top: 4px; }
.stBar { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0 12px; margin-top: 4px;
  background: var(--panel); border-top: 1px solid var(--line); }
.stState { font-size: 13px; }
.stPos { width: 4.5em; font: inherit; font-size: 13px; padding: 2px 6px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
.stProblem { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-radius: 7px; padding: 8px 10px; margin-bottom: 12px; font-size: 14px;
  border: 1px solid var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.stProblem.restored { border-color: var(--info); background: color-mix(in srgb, var(--info) 8%, transparent); }
.stProblem.error, .stProblem.gone { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, transparent); }
.stProblem > span:first-child { flex: 1 1 260px; }
.stEmpty { text-align: center; padding: 32px 12px; }
.stLanes { display: grid; gap: 14px; }
.stBook { font-size: 17px; margin: 10px 0 0; }
.stLane { --tone: var(--ok); margin: 0; border-top: 4px solid var(--tone); }
.stLane[data-tone="hazard"] { --tone: var(--warn); } .stLane[data-tone="violet"] { --tone: #7c5cc4; } .stLane[data-tone="none"] { --tone: var(--line); }
.stLaneName { margin: 0 0 8px; font-size: 16px; }
.stStep { border-left: 2px solid var(--line); margin: 0 0 12px 6px; padding: 2px 0 2px 14px; border-radius: 0 6px 6px 0; }
.stStep.empty .stStepHead { opacity: .8; }
.stStep.dropInto { background: color-mix(in srgb, var(--accent) 8%, transparent); border-left-color: var(--accent); }
.stStepHead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-bottom: 6px; }
.stStepN { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 50%; background: var(--tone); color: var(--panel); font-size: 11px; font-weight: 700; }
.stStep .stList:empty { display: none; }
body.dragActive .stStep { outline: 1px dashed var(--line); outline-offset: 2px; }
@media (max-width: 720px) {
  .stGrid { grid-template-columns: minmax(0, 1fr); }
  .stSum { margin-left: 12px; }
  .stBar .grow { display: none; }
  .stGrip { display: none; }
  main { padding: 12px 10px 80px; }
  section { padding: 12px; }
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stLane[data-tone="violet"] { --tone: #a98ee8; } }

/* ---- 剧情大纲 ---- */
.olTitle { margin: 0; font-size: 18px; }
.olTitleInput { flex: 1 1 260px; width: auto; font-size: 17px; font-weight: 600; }
.olActs { flex-wrap: wrap; }
.olMapBox { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.olMapTitle { margin: 0; font-size: 15px; }
.olMapScroll { overflow-x: auto; padding: 6px 0; }
.olMap { display: block; max-width: none; font: 14px system-ui, "Microsoft YaHei", sans-serif; }
.olEdge { fill: none; stroke: var(--muted); stroke-width: 1.6; }
.olArrow { fill: var(--muted); }
.olNode { --tone: var(--ok); cursor: pointer; outline: none; }
.olNode[data-tone="hazard"] { --tone: var(--warn); } .olNode[data-tone="violet"] { --tone: #7c5cc4; }
.olNode rect { fill: var(--panel); stroke: var(--line); stroke-width: 1.2; }
.olNode .olNodeBar { fill: var(--tone); stroke: none; }
.olNode:hover rect:first-of-type, .olNode:focus-visible rect:first-of-type { stroke: var(--tone); stroke-width: 2.4; }
.olNodeName { fill: var(--ink); font-weight: 700; font-size: 15px; }
.olNodeInfo { fill: var(--muted); font-size: 12.5px; }
.olWhen { font-size: 11px; padding: 0 6px; border-radius: 4px; color: var(--muted); border: 1px solid var(--line); font-weight: 400; }
/* The timeline (剧情大纲): a grid of world lines × time periods, cards dragged between cells, a side panel to edit. */
.tlWrap { overflow: auto; max-height: 80vh; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); margin-top: 8px;
  box-shadow: 0 1px 3px rgb(0 0 0 / .06); }
.tl { display: grid; position: relative; }
.tl > * { min-width: 0; }
.tlCorner, .tlHead { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.tlCorner { left: 0; z-index: 6; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--muted); border-right: 1px solid var(--line); }
.tlAxis { color: var(--accent); letter-spacing: .04em; }
.tlEraNo { flex: none; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-size: 11.5px; font-weight: 700; }
.tlEraName { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tlHead.loose .tlEraName { color: var(--muted); font-weight: 500; font-style: italic; }
input[type=text].tlEraInput { flex: 1 1 auto; min-width: 0; width: 100%; font: inherit; font-weight: 700; font-size: 14px; color: var(--ink); background: transparent;
  border: 1px solid transparent; border-radius: 8px; padding: 3px 7px; }
input[type=text].tlEraInput:hover { border-color: var(--line); }
input[type=text].tlEraInput:focus { border-color: var(--accent); background: var(--panel); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.tlEraTools { position: absolute; right: 8px; top: 50%; translate: 0 -50%; display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px;
  background: var(--panel); box-shadow: 0 2px 8px rgb(0 0 0 / .18); opacity: 0; pointer-events: none; transition: opacity .15s; }
.tlHead:hover .tlEraTools, .tlHead:focus-within .tlEraTools { opacity: 1; pointer-events: auto; }
.tlIcon { all: unset; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; }
.tlIcon:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 9%, transparent); color: var(--ink); }
.tlIcon.danger:hover:not(:disabled) { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.tlIcon:disabled { opacity: .3; cursor: default; }
.tlIcon:focus-visible { outline: 2px solid var(--accent); }
.tlIcon.big { width: 30px; height: 30px; font-size: 20px; }
.tlAddEra { all: unset; cursor: pointer; padding: 4px 10px; border-radius: 999px; border: 1px dashed var(--line); color: var(--muted); font-size: 13px; white-space: nowrap; }
.tlAddEra:hover:not(:disabled), .tlAddEra:focus-visible { color: var(--accent); border-color: var(--accent); }
.tlLane { --tone: var(--ok); position: sticky; left: 0; z-index: 3; display: flex; flex-direction: column; gap: 2px; padding: 12px 12px 12px 18px;
  background: var(--panel); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: inset 4px 0 0 var(--tone); }
.tlLane[data-tone="hazard"] { --tone: var(--warn); } .tlLane[data-tone="violet"] { --tone: #7c5cc4; }
.tlLaneName { all: unset; cursor: pointer; font-weight: 700; font-size: 14px; line-height: 1.35; color: var(--ink); overflow-wrap: anywhere; }
.tlLaneName:hover, .tlLaneName:focus-visible { color: var(--accent); }
.tlLaneInfo { font-size: 12px; color: var(--muted); }
.tlCell { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; padding: 10px; min-height: 70px;
  border-bottom: 1px solid var(--line); transition: background .15s; }
.tlCell.alt { background: color-mix(in srgb, var(--panel) 45%, transparent); }
.tlCell.over { background: color-mix(in srgb, var(--accent) 11%, transparent); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 60%, transparent); border-radius: 12px; }
.tlCard { --tone: var(--ok); position: relative; padding: 8px 10px 9px 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgb(0 0 0 / .08); cursor: pointer; transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, opacity .14s; }
.tlCard[data-tone="hazard"] { --tone: var(--warn); } .tlCard[data-tone="violet"] { --tone: #7c5cc4; }
.tlCard::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--tone); }
.tlCard:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgb(0 0 0 / .14); border-color: color-mix(in srgb, var(--tone) 50%, var(--line)); }
.tlCard:focus-visible, .tlCard.open { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
.tl.can .tlCard { cursor: grab; }
.tl.can .tlCard:active { cursor: grabbing; }
.tlCard.dragging { opacity: .35; transform: scale(.98); }
.tlCard.dropBefore { margin-top: 14px; }
.tlCard.dropBefore::after { content: ""; position: absolute; left: 4px; right: 4px; top: -10px; height: 3px; border-radius: 3px; background: var(--accent); }
.tlCardTop { display: flex; gap: 6px; align-items: center; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.tlNo { font-weight: 700; color: var(--tone); font-variant-numeric: tabular-nums; }
.tlTag { padding: 0 7px; border-radius: 999px; background: color-mix(in srgb, var(--tone) 15%, transparent); color: var(--tone); font-weight: 600; }
.tlHas { margin-left: auto; padding: 0 7px; border-radius: 999px; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); font-weight: 600; }
.tlTitle { font-weight: 650; font-size: 13.5px; line-height: 1.4; overflow-wrap: anywhere; }
.tlBody { margin-top: 3px; font-size: 12px; line-height: 1.45; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tlNew { all: unset; display: grid; place-items: center; height: 26px; border-radius: 8px; border: 1px dashed var(--line); color: var(--muted);
  cursor: pointer; font-size: 15px; opacity: 0; transition: opacity .15s, color .15s, border-color .15s; }
.tlCell:hover .tlNew, .tlNew:focus-visible { opacity: 1; }
.tlNew:hover, .tlNew:focus-visible { color: var(--accent); border-color: var(--accent); }
body.tlDragging .tlNew { display: none; }
.tlLinks { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; overflow: visible; }
.tlLink { fill: none; stroke: var(--muted); stroke-width: 1.5; opacity: .5; }
.tlLink.join { stroke: var(--accent); stroke-dasharray: 5 5; opacity: .45; }
.tlArrowHead { fill: var(--muted); }
.tlDrawer { --tone: var(--ok); position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(480px, 100vw); overflow: auto; padding: 18px 18px 40px;
  background: var(--panel); border-left: 1px solid var(--line); box-shadow: -16px 0 40px rgb(0 0 0 / .22); animation: tlIn .2s ease-out; }
.tlDrawer[data-tone="hazard"] { --tone: var(--warn); } .tlDrawer[data-tone="violet"] { --tone: #7c5cc4; }
.tlDrawer::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--tone); }
@keyframes tlIn { from { transform: translateX(32px); opacity: 0; } }
.tlDrawerHead { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.tlDrawerLane { font-weight: 700; font-size: 16px; }
.tlDrawerNo { font-size: 12.5px; color: var(--muted); }
.tlDrawer .olFormGrid { grid-template-columns: minmax(0, 1fr); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.tlLane, .tlCard, .tlDrawer)[data-tone="violet"] { --tone: #a98ee8; }
  :root:not([data-theme="light"]) .tlCard { box-shadow: 0 1px 2px rgb(0 0 0 / .35); }
}
.olPip { fill: none; stroke: var(--tone); stroke-width: 1.4; }
.olPip.on { fill: var(--tone); }
.olLane { scroll-margin-top: 12px; }
.olLane.flash, .olStep.flash { animation: olFlash 1.4s ease-out; }
@keyframes olFlash { from { background: color-mix(in srgb, var(--accent) 22%, transparent); } to { background: transparent; } }
.olLaneHead { gap: 4px; flex-wrap: nowrap; }
.olNameInput { flex: 1 1 auto; min-width: 0; font-size: 16px !important; font-weight: 700; padding: 5px 8px !important; }
.olMore { margin: 6px 0 2px; font-size: 13px; }
.olMore summary { cursor: pointer; color: var(--muted); }
.olMore .stField { margin: 8px 0; }
.olMore textarea { min-height: 0; overflow: hidden; }
.olMore .choices label { font-size: 13px; padding: 3px 9px; }
.seg .tone-edf[aria-checked="true"] { background: var(--ok); } .seg .tone-hazard[aria-checked="true"] { background: var(--warn); }
.seg .tone-violet[aria-checked="true"] { background: #7c5cc4; color: #fff; }
.olGrip { cursor: grab; color: var(--muted); margin-right: 2px; user-select: none; }
.olStep.dragging { opacity: .4; }
.olStep.dropBefore { box-shadow: 0 -3px 0 var(--accent); }
.olStep.dropAfter { box-shadow: 0 3px 0 var(--accent); }
.olSteps.dropInto { outline: 2px dashed var(--accent); outline-offset: 2px; border-radius: 6px; min-height: 40px; }
body.dragActive .olSteps { min-height: 40px; }
.olForm { border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 8px; padding: 10px; background: var(--bg); }
.olFormGrid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 0 10px; }
.olForm textarea { min-height: 0; overflow: hidden; }
.olFormBar { gap: 6px; }
.olFormBar select { width: auto; padding: 2px 6px; font-size: 13px; max-width: 12em; }
.olMissions { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 3px; font-size: 13px; }
.olMissions li { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.olMissions a { text-decoration: none; overflow-wrap: anywhere; }
.olMissions a:hover { text-decoration: underline; }
.olMNo { color: var(--muted); margin-right: 4px; font-variant-numeric: tabular-nums; }
.olMissions .badge { font-size: 11px; padding: 0 6px; }
.olWrite { font-weight: 600; }
@media (max-width: 720px) { .olFormGrid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .olNode[data-tone="violet"] { --tone: #a98ee8; } }
.olBadges { display: inline-flex; gap: 6px; align-items: center; }
.olBadges .badge { color: var(--info); }
.olBadges .badge.olMain { color: var(--warn); }
/* 设定集 (/design.html) */
.dsKind { margin: 18px 0 6px; }
.dsKindHead h3 { margin: 0; font-size: 17px; }
.dsList { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; }
.dsCard.open { grid-column: 1 / -1; }
.dsSum { margin: -4px 12px 10px 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dsCard .stToggle { padding-left: 12px; }
.dsPick { display: grid; gap: 4px; max-height: 320px; overflow: auto; padding: 6px 2px; }
.dsLane { border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px 6px; margin: 0; display: grid; gap: 2px; }
.dsLane legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0 4px; }
.dsCheck { display: flex; gap: 6px; align-items: baseline; font-size: 14px; font-weight: 400; color: var(--ink); cursor: pointer; overflow-wrap: anywhere; }
.stField details > summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.stField details select { margin: 4px 0; }
.dsLinks { margin: 0; padding-left: 18px; }
.olDesigns { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; margin: 6px 0 0; }
.olDesigns a.tag { text-decoration: none; }

/* 拍板台（/decisions）与反馈处理台（/dev），照 fushi 搬来 */
.dtop { margin: 4px 0 8px; }
.legend { margin: 0 0 10px; font-size: 14px; }
.legend summary { cursor: pointer; color: var(--muted); }
.legend ul { margin: 6px 0; padding-left: 20px; }
.dtabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 5; padding-top: 4px; }
.dtabs a { padding: 6px 12px; border-radius: 7px 7px 0 0; color: var(--muted); text-decoration: none; border: 1px solid transparent; border-bottom: 0; margin-bottom: -1px; }
.dtabs a.on { color: var(--ink); background: var(--panel); border-color: var(--line); font-weight: 600; }
.dtabs .n { font-size: 12px; color: var(--muted); }
#dlist { display: grid; gap: 12px; }
.dcard { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 9px; padding: 12px 14px; outline: none; transition: opacity .18s, transform .18s; }
.dcard.cur { box-shadow: 0 0 0 2px var(--accent); }
.dcard.leaving { opacity: 0; transform: translateX(24px); }
.dcard.fresh { animation: dfresh 1.6s ease-out; }
@keyframes dfresh { from { background: color-mix(in srgb, var(--accent) 18%, var(--panel)); } }
.dcard.busy { opacity: .6; pointer-events: none; }
.dcard.dragover { box-shadow: 0 0 0 3px var(--info); }
.dcard.closed { opacity: .8; }
.dcard.st-do, .dcard.st-choice { border-left-color: var(--ok); }
.dcard.st-skip, .dcard.st-never { border-left-color: var(--bad); }
.dcard.st-later { border-left-color: var(--muted); }
.dcard.st-explain, .dcard.st-mockup { border-left-color: var(--warn); }
.dcard.st-delegate { border-left-color: var(--info); }
.dcard h3 { margin: 6px 0; font-size: 17px; }
.dcard .body, .fbNote, .timeline .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.dhead { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.badge.rec-do { color: var(--ok); } .badge.rec-skip, .badge.rec-never { color: var(--bad); } .badge.rec-later { color: var(--muted); } .badge.rec-weigh { color: var(--info); }
.badge.stage-todo { color: var(--accent); } .badge.stage-explain { color: var(--warn); } .badge.stage-exec { color: var(--ok); } .badge.stage-later, .badge.stage-closed { color: var(--muted); }
.badge.re { background: var(--warn); color: #111; border-color: var(--warn); }
.dorig { margin: 8px 0; border: 1px dashed var(--line); border-radius: 7px; padding: 6px 10px; font-size: 14px; }
.dorig summary { cursor: pointer; color: var(--muted); }
.dorig-links { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.dfiles { margin: 8px 0; display: grid; gap: 6px; font-size: 14px; }
.dfile img { display: block; max-width: 100%; max-height: 360px; margin-top: 4px; border: 1px solid var(--line); border-radius: 6px; }
.dfile iframe { width: 100%; height: 420px; border: 1px solid var(--line); border-radius: 6px; margin-top: 4px; background: #fff; }
.dfdel { margin-left: 8px; font-size: 12px; color: var(--bad); }
.pc { display: grid; gap: 4px; margin: 8px 0; font-size: 14px; }
.pc .up { color: var(--ok); }
.dres { margin: 8px 0; padding: 6px 10px; border-radius: 7px; background: color-mix(in srgb, var(--ok) 10%, var(--panel)); }
.dverdict { margin: 6px 0; font-size: 13px; }
.msg { margin: 6px 0; padding: 6px 10px; border-radius: 7px; border: 1px solid var(--line); font-size: 14px; }
.msg.claude { background: color-mix(in srgb, var(--info) 10%, var(--panel)); }
.dform textarea { width: 100%; box-sizing: border-box; margin: 8px 0 6px; font: inherit; }
.vrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vsp { flex: 1; }
.vb { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 7px; padding: 4px 10px; font: inherit; font-size: 14px; cursor: pointer; }
.vb kbd { margin-left: 6px; font-size: 11px; opacity: .7; background: transparent; color: inherit; border-color: currentColor; }
.vb:hover { border-color: var(--accent); }
.vb.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.vb.v-do.on { background: var(--ok); border-color: var(--ok); }
.vb.v-skip.on, .vb.v-never.on { background: var(--bad); border-color: var(--bad); }
.vb.v-explain.on, .vb.v-mockup.on { background: var(--warn); border-color: var(--warn); color: #111; }
.vb.v-note, .vb.v-clear { background: transparent; color: var(--muted); }
.dupload { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.dpick { cursor: pointer; color: var(--accent); text-decoration: underline; }
.dpick input { display: none; }
.fbList { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.fbRow + .fbRow { border-top: 1px solid var(--line); }
.fbRow a { display: flex; gap: 8px; align-items: baseline; padding: 7px 10px; color: var(--ink); text-decoration: none; min-width: 0; }
.fbRow a:hover { background: var(--bg); }
.fbId { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 3.5em; }
.fbCase { font-weight: 600; white-space: nowrap; }
.fbSnip { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.fbMeta { white-space: nowrap; font-size: 13px; }
.fbNote { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.timeline { list-style: none; padding: 0 0 0 14px; margin: 0 0 12px; border-left: 2px solid var(--line); display: grid; gap: 8px; }
.tl { padding: 6px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; }
.tl-note { background: color-mix(in srgb, var(--warn) 10%, var(--panel)); }
.tl-status { background: transparent; border-style: dashed; }
.tlHead { font-size: 13px; }
.fbForm { display: grid; gap: 6px; margin: 12px 0; }
.fbForm textarea { width: 100%; box-sizing: border-box; font: inherit; }
.fbForm select { width: auto; }
@media (max-width: 640px) { .fbRow a { flex-wrap: wrap; } .fbSnip { flex-basis: 100%; white-space: normal; } }
