/* ---------------------------------------------------------------
   创新解题工作台 · 视觉系统
   纸白 + 墨黑 + 松绿；克制的层级、稳定的间距、可打印
---------------------------------------------------------------- */

:root {
  --paper: #f5f3ed;
  --paper-2: #edeae1;
  --card: #fffdfa;
  --ink: #1a1916;
  --ink-2: #3c3933;
  --muted: #5f5a4e;
  --faint: #726d5d;
  --line: #e3ddd0;
  --line-2: #cfc7b6;
  --accent: #14614f;
  --accent-2: #0c4738;
  --accent-soft: #e7f0eb;
  --amber: #a2651a;
  --amber-soft: #f7eddb;
  --danger: #96382b;
  --danger-soft: #f7e8e4;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(26, 25, 22, .045), 0 10px 30px -22px rgba(26, 25, 22, .45);
  --shadow-lift: 0 2px 4px rgba(26, 25, 22, .05), 0 18px 40px -26px rgba(26, 25, 22, .5);
  --ring: 0 0 0 3px rgba(20, 97, 79, .12);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Consolas, monospace;
  --sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Source Han Sans SC", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  padding-top: 64px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: #cfe3d9; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:focus-visible, .rail-step:focus-visible, .toast-act:focus-visible { outline: none; box-shadow: var(--ring), var(--shadow); }

/* 只读文字不显示插入光标（点击正文时不再闪），输入控件保留 */
html { caret-color: transparent; }
input, textarea, select, [contenteditable="true"] { caret-color: auto; }

button, input, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.018em; }

/* 细滚动条，避免侧栏出现粗重的系统滚动条 */
.rail, .aside, .modal-box, .guide-body { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.rail::-webkit-scrollbar, .aside::-webkit-scrollbar, .modal-box::-webkit-scrollbar { width: 8px; }
.rail::-webkit-scrollbar-thumb, .aside::-webkit-scrollbar-thumb, .modal-box::-webkit-scrollbar-thumb {
  background: var(--line-2); border-radius: 8px; border: 2px solid transparent; background-clip: content-box;
}

/* ---------------- 顶栏 ---------------- */

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; gap: 16px;
  height: 64px; padding: 0 22px;
  background: rgba(245, 243, 237, .9);
  backdrop-filter: blur(12px) saturate(1.25);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; color: var(--ink); text-decoration: none; flex: none; }
.brand-text { display: flex; flex-direction: column; gap: 1px; line-height: 1.15; }
.brand-text strong { font-size: 16px; letter-spacing: .015em; }
.brand-text em { font-style: normal; font-size: 8.5px; color: var(--faint); letter-spacing: .16em; font-family: var(--mono); }

.project-name {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px;
  padding-left: 28px;
}
.pn-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
  color: var(--faint); white-space: nowrap; flex: none;
}
.project-name input {
  width: 100%; max-width: 520px; height: 28px;
  padding: 0 2px; border: none; border-bottom: 1px solid transparent; border-radius: 0;
  background: transparent; font-size: 14px; font-weight: 500; color: var(--ink);
  text-overflow: ellipsis; transition: border-color .15s;
}
.project-name input::placeholder { color: var(--faint); font-weight: 400; }
.project-name input:hover { border-bottom-color: var(--line-2); }
.project-name input:focus { outline: none; border-bottom-color: var(--accent); }

.topbar-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.save-state {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--muted); margin-right: 4px; white-space: nowrap;
}
.save-state i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .7;
  transition: opacity .3s;
}
.save-state.saving i { opacity: .25; }
.save-state.error i { background: var(--danger); opacity: 1; }

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 9px; border: 1px solid transparent;
  padding: 8px 14px; font-size: 13px; font-weight: 500; height: 36px;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .08s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn.sm { padding: 5px 11px; font-size: 12.5px; height: 30px; }
.btn.solid { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(12, 71, 56, .25); }
.btn.solid:hover { background: var(--accent-2); box-shadow: 0 2px 8px -2px rgba(12, 71, 56, .45); }
.btn.ghost { background: transparent; border-color: var(--line-2); color: var(--ink-2); }
.btn.ghost:hover { background: #fff; border-color: var(--ink-2); }
.btn.quiet { background: transparent; color: var(--muted); padding: 5px 8px; height: auto; }
.btn.quiet:hover { color: var(--ink); background: #ebe7dc; }
.btn.icon { width: 30px; height: 30px; padding: 0; border-radius: 50%; }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .38; cursor: not-allowed; transform: none; }

/* ---------------- 布局 ---------------- */

.shell {
  display: flex; align-items: flex-start;
  min-height: calc(100vh - 64px);
}

.rail {
  width: 232px; flex: none;
  position: sticky; top: 64px; height: calc(100vh - 64px);
  padding: 22px 12px 22px 14px; overflow-y: auto;
  border-right: 1px solid var(--line);
}

.main {
  flex: 1; min-width: 0;
  padding: 38px 48px 150px;
  max-width: 940px;
  outline: none;
}

.aside {
  width: 320px; flex: none;
  position: sticky; top: 64px; height: calc(100vh - 64px);
  padding: 22px 18px; overflow-y: auto;
  border-left: 1px solid var(--line);
}

/* ---------------- 左侧导航 ---------------- */

.rail-title {
  font-size: 10px; letter-spacing: .18em; color: var(--faint);
  padding: 0 10px 10px; text-transform: uppercase;
}

.rail-step {
  display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 9px;
  width: 100%; height: 42px; text-align: left; padding: 0 10px; margin-bottom: 2px;
  border: none; background: transparent; border-radius: 9px;
  cursor: pointer; color: var(--ink-2); position: relative;
  transition: background .15s, color .15s, box-shadow .15s;
}
.rail-step:hover { background: #ece8dd; }
.rail-step .no {
  font-family: var(--mono); font-size: 10px; color: var(--faint);
  letter-spacing: .02em; font-variant-numeric: tabular-nums;
}
.rail-step .zh { font-size: 13.5px; font-weight: 500; letter-spacing: .01em; }
.rail-step .cnt {
  font-family: var(--mono); font-size: 10px; color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.rail-step.done .cnt { color: var(--accent); }
.rail-step.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.rail-step.active::before {
  content: ""; position: absolute; left: -14px; top: 12px; bottom: 12px; width: 2px;
  background: var(--accent); border-radius: 2px;
}
.rail-step.active .no { color: var(--accent); }

.rail-overview {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 10px; margin-bottom: 14px; border-radius: 8px;
  border: 1px dashed var(--line-2); background: transparent;
  font-size: 12.5px; color: var(--muted); cursor: pointer;
}
.rail-overview:hover { border-color: var(--accent); color: var(--accent); }
.rail-overview.active { border-style: solid; background: var(--card); color: var(--ink); }

.rail-foot {
  margin-top: 18px; padding: 12px 10px 0;
  border-top: 1px solid var(--line);
}
.rail-progress-label {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--muted); margin-bottom: 6px;
}
.rail-progress { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.rail-progress i { display: block; height: 100%; background: var(--accent); transition: width .3s; }

.rail-hint { font-size: 11px; color: var(--faint); line-height: 1.55; margin-top: 12px; }

.rail-credit {
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 10.5px; line-height: 1.9; color: var(--faint); letter-spacing: .02em;
}
.rail-credit div:first-child { color: var(--muted); font-family: var(--mono); font-size: 10px; }

.rail-credit-compact { display: none; }

/* ---------------- 步骤页头 ---------------- */

.step-head { margin-bottom: 22px; position: relative; padding-right: 168px; }
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 14px;
}
.eyebrow .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 21px; height: 21px; border-radius: 6px;
  background: var(--accent); color: #fff; font-size: 9.5px; letter-spacing: 0;
}
.eyebrow .sep { width: 16px; height: 1px; background: var(--line-2); }

.step-head h1 { font-size: 28px; line-height: 1.22; margin-bottom: 9px; letter-spacing: -.025em; }
.step-head .lede { font-size: 15px; color: var(--ink-2); max-width: 620px; margin: 0 0 13px; line-height: 1.75; }
.step-head .single {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--accent-2);
  background: var(--accent-soft); border-radius: 7px; padding: 5px 11px;
}
.step-head .single::before { content: "◦"; font-size: 16px; line-height: 1; }

.step-meta {
  position: absolute; right: 0; top: 4px;
  display: grid; gap: 12px; justify-items: end; text-align: right;
}
.step-meta .m-k { font-size: 9.5px; letter-spacing: .16em; color: var(--faint); font-family: var(--mono); }
.step-meta .m-v { font-size: 13px; color: var(--ink-2); font-weight: 500; margin-top: 1px; }

/* ---------------- 卡片 ---------------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  margin-bottom: 14px;
}
.card-head h2 { font-size: 14.5px; letter-spacing: -.01em; }
.card-head h2 .h2-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 6px;
  background: var(--paper-2); color: var(--ink-2);
  font-family: var(--mono); font-size: 11.5px; font-weight: 400;
  margin-right: 9px; letter-spacing: 0; vertical-align: 1px;
}
.card-meta { font-size: 11.5px; color: var(--muted); font-family: var(--mono); white-space: nowrap; }
.card-sub { font-size: 12.5px; color: var(--muted); margin: -6px 0 16px; max-width: 620px; line-height: 1.65; }
.card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; padding-top: 13px; border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--muted);
}

/* ---------------- 表单 ---------------- */

.field { margin-bottom: 13px; }
.field > label {
  display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 6px; letter-spacing: .03em;
}
.field > label b { color: var(--ink-2); font-weight: 500; }

.input, .textarea, .select {
  width: 100%; padding: 9px 12px;
  background: #fbf9f4; border: 1px solid var(--line);
  border-radius: 9px; font-size: 13.5px; line-height: 1.6;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input { height: 38px; }
.input:hover, .textarea:hover, .select:hover { border-color: var(--line-2); }
.input:focus, .textarea:focus, .select:focus {
  outline: none; background: #fff; border-color: var(--accent);
  box-shadow: var(--ring);
}
.textarea { resize: vertical; min-height: 82px; }
.select { height: 38px; appearance: none; padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.hint { font-size: 11.5px; color: var(--faint); margin-top: 5px; }
.counter { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.counter.ok { color: var(--accent); }

/* ---------------- 雷达（八面） ---------------- */

.lens-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lens {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
  background: #fdfbf6; transition: border-color .15s, background .15s;
}
.lens:focus-within { border-color: var(--accent); background: #fff; }
.lens.filled { background: #fff; }
.lens-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.lens-name { font-size: 13px; font-weight: 500; }
.lens-en { font-family: var(--mono); font-size: 9px; color: var(--faint); letter-spacing: .1em; }
.lens textarea {
  width: 100%; border: none; background: transparent; resize: none;
  font-size: 12.5px; line-height: 1.62; color: var(--ink-2); min-height: 42px; padding: 2px 0 0;
}
.lens textarea:focus { outline: none; }
.lens textarea::placeholder { color: #b6afa0; }

.input::placeholder, .textarea::placeholder { color: #b6afa0; }

.empty-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 16px; border: 1px dashed var(--line-2); border-radius: 10px;
  background: #fbf9f4; font-size: 12.5px; color: var(--muted); line-height: 1.6;
}

/* ---------------- 机会 / 列表行 ---------------- */

.opp-list { display: flex; flex-direction: column; gap: 8px; }
.opp {
  display: grid; grid-template-columns: 16px 1fr auto; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px;
  background: #fdfbf6; cursor: pointer; transition: border-color .15s, background .15s;
}
.opp:hover { border-color: var(--line-2); }
.opp.sel { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(20, 98, 80, .07); }
.opp .radio {
  width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-2);
}
.opp.sel .radio { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 0 40%, transparent 42%); }
.opp-text { font-size: 13.5px; }
.opp-text input {
  width: 100%; border: none; background: transparent; font-size: 13.5px; padding: 2px 0;
}
.opp-text input:focus { outline: none; }
.opp-tags { display: flex; align-items: center; gap: 6px; }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; padding: 2px 7px; border-radius: 4px;
  background: var(--paper-2); color: var(--muted); white-space: nowrap;
}
.tag.gap { background: var(--danger-soft); color: var(--danger); }
.tag.edge { background: var(--accent-soft); color: var(--accent-2); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }

/* ---------------- 评分 ---------------- */

.scale { display: flex; align-items: center; gap: 10px; }
.scale input[type=range] {
  -webkit-appearance: none; appearance: none; flex: 1; height: 3px;
  background: var(--line); border-radius: 3px; outline: none;
}
.scale input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--accent); cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.scale output {
  font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--accent);
  width: 22px; text-align: right;
}
.scale.warn output { color: var(--amber); }

.health-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ---------------- 目标句 ---------------- */

.goal-sentence {
  font-size: 16px; line-height: 1.9; color: var(--ink);
  background: var(--accent-soft); border-radius: 10px; padding: 16px 18px;
  margin: 4px 0 16px;
}
.goal-sentence .slot { color: var(--accent-2); font-weight: 600; border-bottom: 1px dashed rgba(20,98,80,.4); }
.goal-sentence .slot.empty { color: var(--faint); font-weight: 400; }

/* ---------------- 需求陈述 ---------------- */

.statement {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.statement .quote {
  grid-column: 1 / -1; font-size: 14.5px; line-height: 1.85;
  padding: 14px 16px; background: #fbf9f4; border-left: 2px solid var(--accent);
  border-radius: 0 8px 8px 0; color: var(--ink-2);
}

.warn-box {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--amber-soft); border: 1px solid #e8d3b2; color: #6d4610;
  border-radius: 9px; padding: 11px 13px; font-size: 12.5px; margin-top: 10px;
}
.warn-box b { font-weight: 600; }

/* ---------------- 相关人 ---------------- */

.people { display: flex; flex-direction: column; gap: 8px; }
.person {
  display: grid; grid-template-columns: 1.1fr 74px 74px 1.4fr 26px 28px;
  gap: 8px; align-items: center;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fdfbf6;
}
.person.sel { border-color: var(--accent); background: #fff; }
.person .input, .person .select { padding: 6px 8px; font-size: 12.5px; background: #fff; }
.person .star {
  width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; color: var(--faint); font-size: 13px; line-height: 1;
}
.person.sel .star { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.person .del { opacity: 0; }
.person:hover .del { opacity: 1; }

/* ---------------- 借用卡 ---------------- */

.deck-tabs { display: flex; gap: 4px; padding: 3px; background: var(--paper-2); border-radius: 9px; margin-bottom: 14px; }
.deck-tab {
  flex: 1; padding: 7px 10px; border: none; background: transparent; border-radius: 7px;
  font-size: 12.5px; color: var(--muted); cursor: pointer; text-align: center;
}
.deck-tab.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.deck-tab small { display: block; font-size: 9.5px; color: var(--faint); font-family: var(--mono); letter-spacing: .08em; }

.draw-area {
  display: flex; align-items: center; gap: 16px;
  padding: 16px; border: 1px dashed var(--line-2); border-radius: 10px;
  background: #fbf9f4; min-height: 96px;
}
.draw-card {
  flex: 1; font-size: 19px; font-weight: 600; letter-spacing: .01em;
}
.draw-card small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; margin-top: 4px; letter-spacing: 0; }
.draw-card .q { font-size: 12px; color: var(--accent-2); font-weight: 400; margin-top: 8px; }

.borrow-list { display: flex; flex-direction: column; gap: 10px; }
.borrow {
  border: 1px solid var(--line); border-radius: 10px; background: #fdfbf6; padding: 12px 14px;
}
.borrow-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.borrow-head .tag { flex: none; }
.borrow-input {
  flex: 1; padding: 7px 9px; font-size: 13.5px; font-weight: 500;
  background: transparent; border-color: transparent;
}
.borrow-input:hover { background: #fff; border-color: var(--line); }
.borrow-input:focus { background: #fff; }
.borrow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.borrow .field { margin-bottom: 0; }

/* ---------------- 迁移 ---------- */

.transfer-row {
  display: grid; grid-template-columns: 1.1fr 1.6fr 84px 26px; gap: 8px; align-items: center;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fdfbf6; margin-bottom: 8px;
}
.transfer-row .input { padding: 6px 8px; font-size: 12.5px; background: #fff; }
.check {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted);
  cursor: pointer; white-space: nowrap;
}
.check input { accent-color: var(--accent); width: 14px; height: 14px; }

.lever-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lever { border-left: 2px solid var(--line-2); padding-left: 12px; }
.lever:focus-within { border-color: var(--accent); }
.lever-name { font-size: 12.5px; font-weight: 600; margin-bottom: 2px; }
.lever-q { font-size: 11.5px; color: var(--muted); margin-bottom: 6px; line-height: 1.55; }

/* ---------------- 矩阵 ---------------- */

.matrix-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px 2px; }
.matrix { width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.matrix th, .matrix td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.matrix th { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: .02em; white-space: nowrap; }
.matrix th.num, .matrix td.num { text-align: center; white-space: nowrap; }
.matrix td.idea { max-width: 300px; line-height: 1.5; }
.matrix td.idea { font-weight: 500; }
.matrix tr.chosen td { background: var(--accent-soft); }
.matrix tr.backup td { background: #f7f4ea; }
.score-btn {
  width: 21px; height: 21px; border-radius: 5px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-family: var(--mono); font-size: 10.5px; color: var(--faint);
  margin-right: 1px; padding: 0;
}
.score-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.score-btn:hover { border-color: var(--accent); color: var(--accent); }
.score-btn.on:hover { color: #fff; }

.quad {
  position: relative; aspect-ratio: 2.1 / 1; border: 1px solid var(--line);
  border-radius: 10px; background:
    linear-gradient(to right, transparent calc(50% - .5px), var(--line) calc(50% - .5px), var(--line) calc(50% + .5px), transparent calc(50% + .5px)),
    linear-gradient(to bottom, transparent calc(50% - .5px), var(--line) calc(50% - .5px), var(--line) calc(50% + .5px), transparent calc(50% + .5px)),
    #fbf9f4;
  margin: 4px 0 6px;
}
.quad span.label {
  position: absolute; font-size: 10px; color: var(--faint); letter-spacing: .08em;
}
.quad .q1 { left: 12px; top: 10px; }
.quad .q2 { right: 12px; top: 10px; }
.quad .q3 { left: 12px; bottom: 10px; }
.quad .q4 { right: 12px; bottom: 10px; }
.quad-axes {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--faint); letter-spacing: .06em; margin: 0 0 8px;
}
.dot {
  position: absolute; transform: translate(-50%, 50%);
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1.5px solid var(--accent); color: var(--accent);
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.dot.chosen { background: var(--accent); color: #fff; }
.dot.backup { border-style: dashed; }

/* ---------------- 计划 ---------------- */

.tasks { display: flex; flex-direction: column; gap: 6px; }
.task {
  display: grid; grid-template-columns: 1.5fr 92px 110px 110px 1fr 26px;
  gap: 6px; align-items: center;
  padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fdfbf6;
}
.task .input { padding: 5px 7px; font-size: 12px; background: #fff; }
.task .input[type=date] { padding: 4px 5px; font-family: var(--mono); font-size: 10.5px; }

.gantt { margin-top: 14px; }
.gantt-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: center; height: 24px; font-size: 11.5px; }
.gantt-label { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gantt-track { position: relative; height: 12px; background: #f0ecdf; border-radius: 6px; }
.gantt-bar { position: absolute; top: 0; height: 12px; border-radius: 6px; background: var(--accent); opacity: .78; }
.gantt-bar.ms { background: var(--amber); opacity: 1; }
.gantt-axis { display: grid; grid-template-columns: 150px 1fr; gap: 10px; font-family: var(--mono); font-size: 9.5px; color: var(--faint); margin-top: 6px; }

/* ---------------- 右侧判定 ---------------- */

.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--muted); margin-bottom: 12px; letter-spacing: .02em;
}
.panel-head b { color: var(--ink); font-size: 12.5px; font-weight: 600; }
.panel-head .score {
  font-family: var(--mono); font-size: 11px; color: var(--accent-2);
  background: var(--accent-soft); padding: 2px 7px; border-radius: 5px;
}

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 9px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.checklist li:last-child { border-bottom: none; }
.checklist .box {
  width: 16px; height: 16px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-2);
  margin-top: 2px; position: relative; transition: all .2s;
}
.checklist li.ok .box { background: var(--accent); border-color: var(--accent); }
.checklist li.ok .box::after {
  content: ""; position: absolute; left: 4.5px; top: 1px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
}
.checklist .txt { font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.checklist li.ok .txt { color: var(--ink); }
.checklist .meta { display: block; font-size: 11px; color: var(--faint); margin-top: 2px; }
.checklist .meta.fix {
  color: #7c5212; background: var(--amber-soft); border-radius: 6px;
  padding: 5px 8px; margin-top: 6px; line-height: 1.55;
}

.panel .next {
  margin-top: 16px; width: 100%;
}

.checksum {
  display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px;
  color: var(--muted); margin-bottom: 10px;
}
.checksum .bar { flex: 1; height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.checksum .bar i { display: block; height: 100%; background: var(--accent); }

.error-list { margin: 0; padding: 0 0 0 16px; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.error-list li { margin-bottom: 3px; }

/* ---------------- 总览 ---------------- */

.overview-hero {
  display: grid; grid-template-columns: 1fr 264px; gap: 16px; align-items: stretch; margin-bottom: 16px;
}
.overview-hero > .panel { display: flex; flex-direction: column; }
.overview-hero > .panel .card-foot { margin-top: auto; justify-content: flex-end; gap: 8px; }
.hero-card {
  background:
    radial-gradient(120% 140% at 88% 0%, rgba(255,255,255,.14), transparent 55%),
    var(--accent);
  color: #eef5f1; border-radius: var(--radius);
  padding: 26px 28px; position: relative; overflow: hidden;
  box-shadow: 0 12px 30px -24px rgba(12, 71, 56, .8);
}
.hero-card h2 { font-size: 20px; color: #fff; margin-bottom: 7px; letter-spacing: -.02em; }
.hero-card p { margin: 0; font-size: 12.5px; color: rgba(255,255,255,.74); max-width: 430px; line-height: 1.7; }
.hero-card .big {
  font-family: var(--mono); font-size: 50px; line-height: 1; color: #fff;
  margin: 20px 0 2px; letter-spacing: -.04em; font-variant-numeric: tabular-nums;
}
.hero-card .big small { font-size: 11.5px; color: rgba(255,255,255,.62); letter-spacing: .06em; margin-left: 8px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 0; margin-top: 18px; font-size: 11px; color: rgba(255,255,255,.62); }
.hero-meta > div { padding-right: 18px; margin-right: 18px; border-right: 1px solid rgba(255,255,255,.14); white-space: nowrap; }
.hero-meta > div:last-child { padding-right: 0; margin-right: 0; border-right: none; }
.hero-meta b { display: block; color: #fff; font-size: 15px; font-family: var(--mono); font-weight: 500; margin-bottom: 1px; }

.step-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.page-credit {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 10.5px; color: var(--faint); letter-spacing: .02em;
}
.step-card {
  text-align: left; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); padding: 17px 19px; cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.step-card:hover { border-color: var(--line-2); transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.step-card .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.step-card .no { font-family: var(--mono); font-size: 9.5px; color: var(--faint); letter-spacing: .12em; }
.step-card h3 { font-size: 14.5px; margin-bottom: 6px; }
.step-card p { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.62; min-height: 36px; }
.step-card .status { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-family: var(--mono); color: var(--muted); margin-top: 11px; }
.step-card .status i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.step-card.done .status i { background: var(--accent); }

/* ---------------- 新手引导 ---------------- */

.guide {
  margin: -4px 0 18px; border: 1px solid #e6dfcc; border-left: 3px solid var(--accent);
  background: linear-gradient(180deg, #fcfaf3, #faf7ee);
  border-radius: 0 12px 12px 0; overflow: hidden;
}
.guide summary {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; cursor: pointer; list-style: none; user-select: none;
}
.guide summary::-webkit-details-marker { display: none; }
.g-badge {
  font-size: 10px; letter-spacing: .06em; color: #7a5512; background: #f2e3bd;
  padding: 2px 8px; border-radius: 4px; white-space: nowrap; font-weight: 500;
}
.guide summary b { font-size: 13px; font-weight: 600; color: var(--ink); }
.g-hint { font-size: 11.5px; color: var(--muted); margin-left: auto; }
.g-caret {
  width: 7px; height: 7px; flex: none;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg) translateY(-2px); transition: transform .2s;
}
.guide[open] .g-caret { transform: rotate(225deg) translateY(-2px); }
.guide-body {
  display: grid; grid-template-columns: 1.05fr .95fr 1fr; gap: 22px;
  padding: 4px 18px 18px; border-top: 1px dashed #e8dfc9;
}
.g-k { font-size: 10px; letter-spacing: .14em; color: var(--faint); margin: 12px 0 7px; }
.g-col p { margin: 0; font-size: 12.5px; line-height: 1.72; color: var(--ink-2); }
.g-theory {
  margin-top: 9px; font-size: 11.5px; line-height: 1.68; color: var(--muted);
  background: #fff; border: 1px solid #ece5d3; border-radius: 8px; padding: 9px 11px;
}
.g-theory b { color: var(--accent); font-weight: 600; margin-right: 6px; }
.g-how { margin: 12px 0 0; padding-left: 16px; font-size: 12.3px; line-height: 1.68; color: var(--ink-2); }
.g-how li { margin-bottom: 6px; }
.g-ex {
  margin-top: 12px; font-size: 12.3px; line-height: 1.78; color: var(--ink-2);
  background: #fff; border: 1px solid #ece5d3; border-radius: 8px; padding: 10px 12px;
}
.g-note { font-size: 10.5px; color: var(--faint); margin-top: 7px; line-height: 1.55; }

/* ---------------- 第一次使用 ---------------- */

.onboard {
  display: grid; grid-template-columns: 1fr 216px; gap: 22px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.onboard h3 { font-size: 16px; margin: 9px 0 14px; letter-spacing: -.01em; }
.onboard-steps { margin: 0; padding-left: 18px; display: grid; gap: 10px; }
.onboard-steps li { font-size: 12.5px; }
.onboard-steps li b { display: block; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.onboard-steps li span { color: var(--muted); line-height: 1.6; }
.onboard-side { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.onboard-side .btn { width: 100%; }

/* ---------------- 提示 / 模态 ---------------- */

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 12px);
  background: var(--ink); color: #fff; font-size: 12.5px;
  padding: 9px 16px; border-radius: 8px; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 90;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

.modal {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(27,26,23,.34); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal[hidden] { display: none; }
.modal-box {
  background: var(--card); border-radius: 14px; width: min(760px, 100%);
  max-height: 84vh; overflow-y: auto; padding: 28px 32px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.5);
}
.modal-box h2 { font-size: 20px; margin-bottom: 4px; }
.modal-box .sub { color: var(--muted); font-size: 12.5px; margin-bottom: 20px; }
.modal-box h3 { font-size: 13.5px; margin: 18px 0 8px; }
.modal-box p, .modal-box li { font-size: 12.8px; color: var(--ink-2); line-height: 1.75; }
.modal-box ul { padding-left: 18px; margin: 6px 0; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }

/* ---------------- 讲师台 ---------------- */

.stage {
  position: fixed; inset: 0; z-index: 100;
  background: #141311; color: #f2efe7;
  display: grid; grid-template-columns: 300px 1fr 330px;
  font-family: var(--sans);
}
.stage-col { padding: 26px 26px; overflow-y: auto; border-right: 1px solid rgba(255,255,255,.08); }
.stage-col:last-child { border-right: none; border-left: 1px solid rgba(255,255,255,.08); }
.stage-brand {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; color: rgba(255,255,255,.4);
  margin-bottom: 22px;
}
.stage-step {
  display: flex; align-items: baseline; gap: 10px; width: 100%; text-align: left;
  padding: 10px 12px; border: none; background: transparent; border-radius: 8px;
  color: rgba(255,255,255,.55); cursor: pointer; font-size: 14px;
}
.stage-step:hover { background: rgba(255,255,255,.05); }
.stage-step.on { background: rgba(20,98,80,.35); color: #fff; }
.stage-step .no { font-family: var(--mono); font-size: 10px; color: rgba(255,255,255,.35); }
.stage-step .t { margin-left: auto; font-family: var(--mono); font-size: 10px; color: rgba(255,255,255,.3); }
.stage-center { display: flex; flex-direction: column; }
.stage-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; color: #7fb3a1; margin-bottom: 10px; }
.stage-title { font-size: 40px; line-height: 1.15; color: #fff; margin-bottom: 8px; letter-spacing: -.02em; }
.stage-def { font-size: 16px; color: rgba(255,255,255,.66); max-width: 560px; line-height: 1.7; }
.stage-timer {
  font-family: var(--mono); font-size: 78px; line-height: 1; letter-spacing: -.04em;
  color: #fff; margin: 26px 0 4px; font-variant-numeric: tabular-nums;
}
.stage-timer.over { color: #e08a6a; }
.stage-timer-label { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; color: rgba(255,255,255,.35); }
.stage-actions { display: flex; gap: 8px; margin: 14px 0 24px; }
.stage-btn {
  border: 1px solid rgba(255,255,255,.18); background: transparent; color: #e9e5db;
  border-radius: 8px; padding: 8px 16px; font-size: 13px; cursor: pointer;
}
.stage-btn:hover { background: rgba(255,255,255,.08); }
.stage-btn.primary { background: #146250; border-color: #146250; color: #fff; }
.stage-list { list-style: none; padding: 0; margin: 0; }
.stage-list li { padding: 7px 0 7px 22px; position: relative; font-size: 14px; color: rgba(255,255,255,.78); }
.stage-list li::before { content: "→"; position: absolute; left: 0; color: #7fb3a1; }
.stage-section-label { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; color: rgba(255,255,255,.3); margin: 22px 0 8px; }
.stage-card {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; padding: 16px 18px; margin-bottom: 12px;
}
.stage-card .k { font-size: 11px; color: rgba(255,255,255,.4); margin-bottom: 6px; }
.stage-card .v { font-size: 15px; color: #fff; line-height: 1.6; }
.stage-draw {
  min-height: 116px; display: flex; flex-direction: column; justify-content: center;
  background: rgba(20,98,80,.18); border: 1px dashed rgba(127,179,161,.4);
  border-radius: 12px; padding: 16px; margin-bottom: 12px;
}
.stage-draw .word { font-size: 28px; font-weight: 600; color: #fff; letter-spacing: .02em; }
.stage-draw .q { font-size: 12px; color: rgba(255,255,255,.5); margin-top: 6px; }
.stage-decks { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.stage-deck { border: 1px solid rgba(255,255,255,.14); background: transparent; color: rgba(255,255,255,.6);
  border-radius: 20px; padding: 4px 12px; font-size: 11.5px; cursor: pointer; }
.stage-deck.on { background: #146250; border-color: #146250; color: #fff; }
.stage-name { font-size: 30px; font-weight: 600; color: #fff; min-height: 44px; }
.stage textarea {
  width: 100%; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
  color: #f2efe7; border-radius: 8px; padding: 8px 10px; font-size: 12px; resize: vertical; min-height: 64px;
}
.stage textarea:focus { outline: none; border-color: #7fb3a1; }

/* ---------------- 打印 / 一页纸 ---------------- */

.sheet-wrap { display: none; }

#sheet.preview {
  display: block; position: fixed; inset: 0; z-index: 95;
  background: #e9e6de; overflow: auto; padding: 22px 16px 60px;
}
.sheet-bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 8px;
  width: 210mm; max-width: 100%; margin: 0 auto 14px;
  padding: 8px 10px; background: rgba(255,253,250,.94);
  border: 1px solid var(--line); border-radius: 10px;
  backdrop-filter: blur(6px);
}
.sheet-bar-hint { margin-right: auto; font-size: 11px; color: var(--muted); }
#sheet.preview .sheet {
  width: 210mm; max-width: 100%; margin: 0 auto;
  background: #fff; padding: 12mm 13mm; box-sizing: border-box;
  box-shadow: 0 12px 40px rgba(26,25,22,.18);
}
.sheet-note { margin-top: 6px; font-size: 7.8px; color: #8a8578; }

.toast-act {
  margin-left: 12px; border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.12); color: #fff;
  border-radius: 6px; padding: 3px 9px; font-size: 11.5px; cursor: pointer;
}
.toast-act:hover { background: rgba(255,255,255,.2); }

@media print {
  @page { size: A4; margin: 12mm 13mm; }
  html, body { background: #fff !important; }
  body { padding-top: 0 !important; }
  body > *:not(.sheet-wrap) { display: none !important; }
  .sheet-wrap { display: block !important; }
  #sheet.preview { position: static; inset: auto; background: #fff; padding: 0; overflow: visible; }
  .sheet-bar { display: none !important; }
  #sheet.preview .sheet { width: 184mm; padding: 0; box-shadow: none; }
  .sheet { font-family: var(--sans); color: #111; }
}

.sheet { width: 184mm; margin: 0 auto; color: #111; font-size: 10px; line-height: 1.5; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #111; padding-bottom: 10px; margin-bottom: 12px; }
.sheet-head h1 { font-size: 21px; line-height: 1.25; }
.sheet-head .kicker { font-family: var(--mono); font-size: 8.5px; letter-spacing: .18em; color: #666; margin-bottom: 4px; }
.sheet-head .meta { font-size: 9px; color: #555; text-align: right; line-height: 1.7; }
.sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; align-items: start; }
.sheet-span { grid-column: 1 / -1; }
.sheet-sec { margin-bottom: 4px; break-inside: avoid; }
.sheet-sec h2 { font-size: 10.5px; letter-spacing: .06em; color: #146250; border-bottom: 1px solid #d8d2c4; padding-bottom: 2px; margin-bottom: 5px; }
.sheet-sec h2 span { font-family: var(--mono); font-size: 8px; color: #999; margin-right: 5px; }
.sheet-sec p, .sheet-sec li { font-size: 9.8px; line-height: 1.55; margin: 0 0 2px; }
.sheet-sec ul { margin: 0; padding-left: 13px; }
.sheet-kv { display: grid; grid-template-columns: 58px 1fr; gap: 2px 8px; font-size: 9.8px; line-height: 1.55; }
.sheet-kv dt { color: #777; }
.sheet-kv dd { margin: 0; }
.sheet-table { width: 100%; border-collapse: collapse; font-size: 8.8px; }
.sheet-table th, .sheet-table td { border-bottom: 1px solid #e2ddd1; padding: 2px 4px; text-align: left; line-height: 1.35; }
.sheet-table th { color: #666; font-weight: 500; }
.sheet-score { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; }
.sheet-score .n { font-family: var(--mono); font-size: 30px; font-weight: 600; color: #146250; line-height: 1; }
.sheet-score .l { font-size: 8.5px; color: #666; }
.sheet-foot { margin-top: 12px; border-top: 1px solid #ddd; padding-top: 6px; display: flex; justify-content: space-between; font-size: 7.8px; color: #999; }
.sheet-strip { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; padding-top: 7px; border-top: 1px dashed #e4dfd3; }
.sheet-strip .item { font-size: 8.6px; color: #aaa; letter-spacing: .02em; }
.sheet-strip .item b { font-family: var(--mono); font-size: 8px; color: #bbb; margin-right: 3px; font-weight: 400; }
.sheet-strip .item.on { color: #146250; }
.sheet-strip .item.on b { color: #146250; }

/* ---------------- 响应式 ---------------- */

@media (max-width: 1320px) {
  .brand-text em { display: none; }
  .overview-hero { grid-template-columns: 1fr; }
}

@media (max-width: 1200px) {
  .step-cards { grid-template-columns: 1fr; }
}

@media (max-width: 1240px) {
  .main { padding: 32px 32px 120px; }
  .aside { width: 292px; }
  .guide-body { grid-template-columns: 1fr 1fr; gap: 18px; }
  .guide-body .g-col:last-child { grid-column: 1 / -1; }
}

@media (max-width: 1080px) {
  .shell { flex-direction: column; align-items: stretch; }
  .rail {
    position: static; width: 100%; height: auto; display: flex; gap: 4px;
    overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line);
    padding: 10px 14px;
  }
  .rail-title, .rail-foot, .rail-overview { display: none; }
  .rail-credit-compact {
    display: block; margin-left: auto; align-self: center; flex: none;
    padding: 0 4px 0 10px; font-size: 10px; color: var(--faint);
    font-family: var(--mono); white-space: nowrap; letter-spacing: .02em;
  }
  .rail-step { width: auto; flex: none; height: auto; grid-template-columns: auto auto; gap: 6px; padding: 7px 11px; }
  .rail-step .cnt { display: none; }
  .rail-step.active::before { display: none; }
  .aside {
    position: static; width: 100%; height: auto; border-left: none;
    border-bottom: 1px solid var(--line); padding: 14px 18px; order: 3;
  }
  .main { order: 2; width: 100%; padding: 26px 20px 100px; max-width: none; }
  .step-cards, .lens-grid, .lever-grid, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .overview-hero { grid-template-columns: 1fr; }
  .step-head { padding-right: 0; }
  .step-meta { display: none; }
  .guide-body { grid-template-columns: 1fr; gap: 4px; }
  .guide-body .g-col:last-child { grid-column: auto; }
  .guide .g-hint { display: none; }
  .onboard { grid-template-columns: 1fr; gap: 16px; }
  .person { grid-template-columns: 1fr 1fr; }
  .transfer-row { grid-template-columns: 1fr; }
  .task { grid-template-columns: 1fr 1fr; }
  .stage { grid-template-columns: 1fr; }
  .stage-col:first-child, .stage-col:last-child { display: none; }
}

@media (max-width: 560px) {
  .topbar { padding: 0 14px; gap: 10px; }
  .save-state, #btnSample, #btnImport, #btnExport, #btnPresent, .pn-label { display: none; }
  .project-name { padding-left: 12px; }
  .project-name input { font-size: 13px; }
}
