/* writer · visual system */
:root {
  --bg: #0a0c11;
  --bg-soft: #0e1117;
  --panel: #11151d;
  --panel-2: #151a24;
  --panel-3: #1a202b;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #e9e6df;
  --text-2: #b9b6ae;
  --muted: #838a99;
  --muted-2: #5d6472;
  --reader-scale: 1;
  --accent: #e7b96a;
  --accent-2: #f3d59f;
  --accent-dim: rgba(231, 185, 106, 0.1);
  --teal: #6fd3c7;
  --rose: #e39aa8;
  --blue: #8fa8ff;
  --green: #9ecf8f;
  --danger: #ef7a6d;
  --serif: "Georgia", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --sans: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", "Consolas", monospace;
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(1100px 620px at 82% -12%, rgba(231, 185, 106, 0.07), transparent 62%),
    radial-gradient(900px 600px at 4% 108%, rgba(111, 211, 199, 0.05), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
::selection { background: rgba(231, 185, 106, 0.28); }
.sprite { display: none; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

/* scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.18); background-clip: padding-box; }

.app { display: grid; grid-template-columns: 282px minmax(0, 1fr); height: 100vh; }

/* ---------------- sidebar ---------------- */
.sidebar {
  display: flex; flex-direction: column; min-height: 0;
  padding: 26px 18px 16px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 21, 29, 0.92), rgba(10, 12, 17, 0.96));
  position: relative; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 13px; padding: 0 8px 24px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 13px; position: relative;
  background: linear-gradient(140deg, #f2d09a, #d3a158);
  color: #17120a; font-family: var(--serif); font-size: 25px; font-style: normal; font-weight: 600;
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(231, 185, 106, 0.18);
}
.brand-dot { position: absolute; right: 8px; bottom: 7px; width: 4px; height: 4px; border-radius: 50%; background: #2a2418; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-size: 24px; letter-spacing: 0.2px; font-family: var(--serif); }
.brand-text small { font-size: 10px; letter-spacing: 2.3px; color: var(--muted); margin-top: 5px; text-transform: uppercase; }

.project-card {
  position: relative; width: 100%; text-align: left;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px;
  display: flex; flex-direction: column; gap: 4px; transition: 0.2s;
}
.project-card:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.05); }
.project-kicker { font-size: 8.5px; letter-spacing: 2px; color: var(--muted-2); text-transform: uppercase; }
.project-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 18px; }
.project-meta { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-edit { position: absolute; right: 10px; top: 12px; color: var(--muted-2); opacity: 0; transition: 0.2s; }
.project-edit .icon { width: 13px; height: 13px; }
.project-card:hover .project-edit { opacity: 1; }

.nav { margin-top: 20px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; }
.nav-label { font-size: 10px; letter-spacing: 2.4px; color: var(--muted-2); text-transform: uppercase; margin: 19px 12px 8px; }
.nav-label:first-child { margin-top: 0; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 11px 12px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); font-size: 14px; text-align: left;
  transition: 0.18s;
}
.nav-item .icon { width: 18px; height: 18px; opacity: 0.9; }
.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, 0.035); }
.nav-item.is-active { color: var(--text); background: var(--accent-dim); }
.nav-item.is-active::before { content: ""; position: absolute; left: -18px; top: 10px; bottom: 10px; width: 2px; background: var(--accent); border-radius: 2px; }
.nav-item.is-active .icon { color: var(--accent); }
.nav-badge { margin-left: auto; font-style: normal; font-size: 9px; color: var(--muted); background: rgba(255, 255, 255, 0.05); border-radius: 99px; min-width: 18px; text-align: center; padding: 2px 5px; }
.nav-badge:empty { display: none; }
.nav-more { margin: 4px 0 0; }
.nav-more-summary { list-style: none; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 9px; color: var(--muted); font-size: 11.5px; cursor: pointer; }
.nav-more-summary::-webkit-details-marker { display: none; }
.nav-more-summary:hover { color: var(--text); background: rgba(255,255,255,.03); }
.nav-more-summary .icon { width: 16px; height: 16px; opacity: .85; }
.nav-more-caret { margin-left: auto; width: 11px !important; height: 11px !important; transition: transform .18s; }
.nav-more[open] .nav-more-caret { transform: rotate(90deg); }
.nav-more-list { display: flex; flex-direction: column; gap: 1px; padding-left: 8px; margin-left: 10px; border-left: 1px solid var(--line); }
.nav-more-list .nav-item { font-size: 11px; padding: 7px 9px; color: var(--muted-2); }
.nav-more-list .nav-item .icon { width: 14px; height: 14px; }
.nav-more-list .nav-item.is-active { color: var(--text); background: var(--accent-dim); }
.nav-more-list .nav-item.is-active::before { left: -19px; top: 7px; bottom: 7px; }

.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.reader-font-control { align-items: center; gap: 7px; padding: 8px 9px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.018); }
.reader-font-control > span { flex: 1; color: var(--muted-2); font-size: 10px; }
.reader-font-control button { min-width: 30px; height: 28px; border: 1px solid var(--line-strong); border-radius: 5px; background: rgba(255,255,255,.03); color: var(--text-2); font-size: 11px; cursor: pointer; }
.reader-font-control button:active { background: var(--accent-dim); color: var(--accent); }
.reader-font-control b { min-width: 30px; color: var(--accent); font-size: 10px; font-weight: 500; text-align: center; }
.engine-pill { display: flex; align-items: center; gap: 8px; padding: 9px 11px; font-size: 12px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 9px; margin-bottom: 9px; }
.engine-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.engine-pill.is-live .dot { background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.foot-item { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 9px 10px; color: var(--muted-2); font-size: 12.5px; border-radius: 8px; text-align: left; }
.foot-item:hover { color: var(--text); background: rgba(255, 255, 255, 0.03); }
.foot-item .icon { width: 16px; height: 16px; }
.sidebar-account { margin-bottom: 7px; }
.account-card { display: flex; align-items: center; gap: 9px; padding: 10px 9px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, 0.018); }
.account-avatar { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(231, 185, 106, 0.22); background: linear-gradient(145deg, rgba(231, 185, 106, 0.18), rgba(111, 211, 199, 0.06)); color: var(--accent); font-family: var(--serif); font-size: 13px; }
.account-info { min-width: 0; flex: 1; }
.account-info b { display: block; font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.account-info small { display: block; margin-top: 2px; font-size: 9px; color: var(--muted-2); }
.account-action { flex: 0 0 auto; padding: 3px 2px; border: 0; background: transparent; color: var(--muted-2); font-size: 10px; cursor: pointer; }
.account-action:hover { color: var(--danger); }
.account-login { width: 100%; display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px dashed var(--line-strong); border-radius: 9px; background: transparent; color: var(--muted); font-size: 9.5px; text-align: left; cursor: pointer; }
.account-login:hover { color: var(--accent); border-color: rgba(231, 185, 106, 0.35); background: var(--accent-dim); }
.account-login .icon { width: 12px; height: 12px; }

/* ---------------- main / topbar ---------------- */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.topbar {
  height: 84px; flex: 0 0 84px; padding: 0 36px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 12, 17, 0.55); backdrop-filter: blur(16px);
  position: relative; z-index: 4;
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-title { min-width: 0; }
.mobile-menu-btn { display: none; }
.sidebar-scrim { display: none; position: fixed; inset: 0; z-index: 80; background: rgba(3, 5, 8, .62); backdrop-filter: blur(2px); }
.reader-font-control { display: none; }
.drawer-close { display: none; }
.page-kicker { font-size: 9.5px; letter-spacing: 2.5px; color: var(--accent); text-transform: uppercase; font-weight: 600; }
.topbar-row { display: flex; align-items: baseline; gap: 13px; margin-top: 4px; }
.topbar h1 { margin: 0; font-size: 24px; font-family: var(--serif); font-weight: 600; letter-spacing: 0.3px; }
.topbar-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.data-pill, .model-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 99px; background: rgba(255, 255, 255, 0.025);
  color: var(--muted); font-size: 10px; white-space: nowrap;
}
.data-pill .icon { width: 13px; height: 13px; }
.model-pill { cursor: pointer; }
.model-pill .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(231, 185, 106, 0.5); }
.model-pill.is-live .dot { background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.model-switcher { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 99px; background: rgba(255,255,255,0.025); max-width: 220px; }
.model-switcher .dot { width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(231,185,106,.5); }
.model-switcher.is-live .dot { background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.model-switcher select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 9px; max-width: 178px; cursor: pointer; outline: none; padding-right: 2px; }
.model-switcher::after { content: "⌄"; color: var(--muted-2); font-size: 8px; margin-left: -3px; }
.model-switcher select option { background: #151a21; color: var(--text); }
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--muted); transition: 0.18s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.04); }
.icon-btn .icon { width: 15px; height: 15px; }

.taskbar {
  flex: 0 0 48px; height: 48px; display: flex; align-items: center; gap: 10px;
  padding: 0 24px; border-bottom: 1px solid var(--line);
  background: rgba(12, 15, 21, 0.72); position: relative; z-index: 3;
}
.task-tabs { display: flex; align-items: center; gap: 4px; overflow-x: auto; min-width: 0; flex: 1; scrollbar-width: none; }
.task-tabs::-webkit-scrollbar { display: none; }
.task-tab {
  display: flex; align-items: center; gap: 8px; height: 37px; padding: 0 7px 0 11px;
  border: 1px solid transparent; border-radius: 7px; color: var(--muted);
  min-width: 138px; max-width: 225px; flex: 0 0 auto; cursor: pointer; transition: 0.18s;
}
.task-tab:hover { background: rgba(255, 255, 255, 0.03); color: var(--text-2); }
.task-tab.is-active { background: rgba(231, 185, 106, 0.06); border-color: rgba(231, 185, 106, 0.22); color: var(--text); }
.task-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--muted-2); flex: 0 0 auto; }
.task-dot.scan { background: var(--accent); box-shadow: 0 0 6px rgba(231, 185, 106, 0.45); }
.task-dot.idea { background: var(--teal); }
.task-dot.outline { background: var(--blue); }
.task-dot.writing { background: var(--green); box-shadow: 0 0 6px rgba(158, 207, 143, 0.4); }
.task-dot.repair { background: var(--danger); box-shadow: 0 0 7px rgba(239, 122, 109, 0.55); }
.task-tab-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; line-height: 1.1; }
.task-tab-text b { font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-tab-text small { font-size: 9px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-tab.is-active .task-tab-text b { color: var(--accent-2); }
.task-close { width: 15px; height: 15px; flex: 0 0 auto; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted-2); border-radius: 3px; opacity: 0; }
.task-close .icon { width: 9px; height: 9px; }
.task-tab:hover .task-close, .task-tab.is-active .task-close { opacity: 1; }
.task-close:hover { color: var(--danger); background: rgba(239, 122, 109, 0.12); }
.taskbar-right { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.task-count { font-size: 9.5px; color: var(--muted-2); white-space: nowrap; }
.new-task-btn { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 11px; border: 1px dashed var(--line-strong); border-radius: 6px; background: transparent; color: var(--muted); font-size: 10.5px; }
.new-task-btn:hover { color: var(--accent); border-color: rgba(231, 185, 106, 0.4); background: var(--accent-dim); }
.new-task-btn .icon { width: 11px; height: 11px; }

.view { flex: 1 1 auto; min-height: 0; overflow: hidden; position: relative; }

/* ---------------- global bits ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font-size: 12.5px; font-weight: 500; transition: 0.18s; white-space: nowrap;
}
.btn .icon { width: 15px; height: 15px; }
.btn-primary { background: linear-gradient(135deg, #f1cf96, #d8a452); color: #181207; box-shadow: 0 6px 20px rgba(216, 164, 82, 0.16); }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-ghost { background: rgba(255, 255, 255, 0.025); border-color: var(--line); color: #cbc8c0; }
.btn-ghost:hover { border-color: var(--line-strong); color: var(--text); background: rgba(255, 255, 255, 0.045); }
.btn-danger { background: rgba(239, 122, 109, 0.14); border-color: rgba(239, 122, 109, 0.4); color: var(--danger); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 11.5px; border-radius: 8px; }
.btn-xs { height: 27px; padding: 0 9px; font-size: 10.5px; border-radius: 7px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn .icon { opacity: 0.85; }
.link-btn { border: 0; background: none; padding: 0; color: var(--muted); font-size: 11px; display: inline-flex; align-items: center; gap: 4px; }
.link-btn:hover { color: var(--text); }
.link-btn.accent { color: var(--accent); }
.link-btn.accent:hover { color: var(--accent-2); }
.link-btn .icon { width: 12px; height: 12px; }
.tag { display: inline-flex; align-items: center; height: 21px; padding: 0 7px; border-radius: 5px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: var(--text-2); font-size: 9.5px; white-space: nowrap; }
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; }
.muted { color: var(--muted) !important; }
.strong { font-weight: 600; color: var(--text); }
.mini-label { display: block; font-size: 8.5px; letter-spacing: 1.8px; color: var(--muted-2); text-transform: uppercase; margin-bottom: 7px; }
.dot-gold { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); flex: 0 0 auto; }
.panel { background: linear-gradient(180deg, rgba(21, 26, 36, 0.9), rgba(16, 20, 28, 0.9)); border: 1px solid var(--line); border-radius: var(--radius); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { height: 30px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 11.5px; transition: 0.18s; }
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #181207; font-weight: 600; }
.chip:disabled { opacity: 0.5; cursor: not-allowed; }
.page { height: 100%; overflow-y: auto; padding: 30px 34px 70px; max-width: 1520px; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 22px; }
.page-head h1 { margin: 6px 0 7px; font-family: var(--serif); font-size: 30px; font-weight: 600; letter-spacing: 0.4px; }
.page-head p { margin: 0; font-size: 12px; line-height: 1.7; color: var(--muted); max-width: 640px; }
.page-head-actions { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, 0.018); margin: 18px 0 22px; }
.stat-strip > div { padding: 15px 18px; border-right: 1px solid var(--line); display: flex; align-items: baseline; gap: 8px; }
.stat-strip > div:last-child { border-right: 0; }
.stat-strip b { font-family: var(--serif); font-size: 23px; font-weight: 600; color: var(--text); }
.stat-strip span { font-size: 10px; color: var(--muted); }

/* ---------------- chat ---------------- */
.chat-view { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 282px; }
.chat-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.chat-new-message { position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%); z-index: 4; border: 1px solid rgba(231,185,106,.28); background: #1d2330; color: var(--accent); border-radius: 999px; padding: 7px 13px; font-size: 10px; display: inline-flex; align-items: center; gap: 5px; box-shadow: 0 8px 22px rgba(0,0,0,.28); }
.chat-new-message:hover { background: #242c3b; }
.pipeline {
  flex: 0 0 auto; display: flex; align-items: center; gap: 0;
  padding: 14px 30px 13px; border-bottom: 1px solid var(--line);
  background: rgba(10, 12, 17, 0.45); overflow-x: auto;
}
.step { position: relative; display: flex; align-items: center; gap: 8px; flex: 1 1 0; min-width: 104px; padding: 0 16px 0 0; border: 0; background: none; color: var(--muted); text-align: left; }
.step:last-child { flex: 0 0 auto; padding-right: 0; }
.step-num { width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 9px; color: var(--muted); flex: 0 0 auto; transition: 0.2s; }
.step-num .icon { width: 12px; height: 12px; color: var(--accent); }
.step-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.step-text b { font-size: 11.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.step-text small { font-size: 9px; color: var(--muted-2); white-space: nowrap; }
.step-line { position: absolute; right: 4px; top: 12px; width: 9px; height: 1px; background: var(--line-strong); }
.step.done .step-num { border-color: rgba(231, 185, 106, 0.35); background: var(--accent-dim); }
.step.done .step-text b { color: var(--text-2); }
.step.current .step-num { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 3px rgba(231, 185, 106, 0.07); }
.step.current .step-text b { color: var(--accent); }
.step:hover .step-text b { color: var(--text); }

.chat-scroll { flex: 1 1 auto; overflow-y: auto; min-height: 0; scroll-behavior: auto; overflow-anchor: none; }
.chat-stream { max-width: 820px; margin: 0 auto; padding: 30px 28px 18px; }

.msg { display: flex; gap: 12px; margin-bottom: 24px; }
.msg-user { justify-content: flex-end; }
.msg-user .msg-body { max-width: 74%; background: linear-gradient(160deg, rgba(231, 185, 106, 0.1), rgba(231, 185, 106, 0.045)); border: 1px solid rgba(231, 185, 106, 0.18); border-radius: 15px 15px 4px 15px; padding: 11px 15px; }
.msg-user .msg-text { font-size: 13.5px; line-height: 1.75; color: var(--text); }
.msg-user .msg-meta { justify-content: flex-end; margin: 6px 0 0; font-size: 9px; }
.msg-assistant .msg-body { min-width: 0; flex: 1; }
.avatar { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; background: linear-gradient(145deg, #1d2431, #12161e); border: 1px solid var(--line-strong); color: var(--accent); font-family: var(--serif); font-style: italic; font-size: 17px; display: grid; place-items: center; margin-top: 1px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2); }
.msg-meta { display: flex; align-items: center; gap: 5px; font-size: 9px; letter-spacing: 0.6px; color: var(--muted-2); margin-bottom: 8px; }
.msg-meta b { color: var(--muted); font-weight: 500; letter-spacing: 1px; text-transform: uppercase; }
.msg-text { font-size: 13.5px; line-height: 1.85; color: #d9d6cf; }
.msg-text p { margin: 0 0 9px; }
.msg-text p:last-child { margin-bottom: 0; }
.msg-text h2, .msg-text h3, .msg-text h4 { font-family: var(--serif); color: var(--text); margin: 18px 0 8px; font-weight: 600; }
.msg-text h2 { font-size: 20px; } .msg-text h3 { font-size: 16px; } .msg-text h4 { font-size: 14px; }
.msg-text strong { color: var(--text); font-weight: 600; }
.msg-text code { font-family: var(--mono); font-size: 11px; background: rgba(255, 255, 255, 0.06); padding: 2px 5px; border-radius: 4px; }
.msg-text ul, .msg-text ol { margin: 6px 0 10px; padding-left: 18px; }
.msg-text li { margin: 4px 0; }
.msg-text blockquote { margin: 10px 0; padding: 8px 12px; border-left: 2px solid var(--accent); background: var(--accent-dim); color: var(--text-2); border-radius: 0 6px 6px 0; }

.is-typing { align-items: center; }
.typing { display: flex; align-items: center; gap: 5px; height: 30px; }
.typing span { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
.typing em { font-style: normal; font-size: 10px; color: var(--muted); margin-left: 6px; letter-spacing: 0.5px; }

.welcome-msg { display: block; margin-bottom: 8px; }
.welcome { padding: 14px 0 8px; }
.welcome-kicker { display: flex; align-items: center; gap: 9px; color: var(--accent); font-size: 9px; letter-spacing: 2.6px; text-transform: uppercase; }
.spark-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.welcome h1 { font-family: var(--serif); font-size: 46px; line-height: 1.16; font-weight: 600; margin: 18px 0 14px; letter-spacing: 0.5px; }
.welcome h1 em { font-style: italic; color: var(--accent); }
.welcome-sub { font-size: 13px; line-height: 1.9; color: var(--text-2); max-width: 620px; margin: 0 0 26px; }
.flow { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 24px; }
.flow-step { background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line); border-radius: 10px; padding: 11px 10px; display: flex; flex-direction: column; gap: 3px; }
.flow-step span { font-size: 9px; color: var(--accent); font-family: var(--serif); }
.flow-step b { font-size: 11.5px; font-weight: 600; }
.flow-step small { font-size: 8.5px; color: var(--muted); line-height: 1.5; }
.flow-step.done { border-color: rgba(231, 185, 106, 0.24); background: rgba(231, 185, 106, 0.045); }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.try-line { font-size: 11.5px; color: var(--muted); display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.try-chip { border: 0; background: none; padding: 0 0 2px; color: var(--accent); font-size: 11.5px; border-bottom: 1px dashed rgba(231, 185, 106, 0.45); text-align: left; }
.try-chip:hover { color: var(--accent-2); }
.welcome-foot { margin: 22px 0 0; font-size: 9px; color: var(--muted-2); letter-spacing: 0.4px; }
.welcome-new { max-width: 760px; padding: 8px 0 4px; }
.welcome-new h1 { font-size: 42px; margin: 16px 0 10px; }
.welcome-new .welcome-sub { font-size: 13px; max-width: 560px; margin-bottom: 18px; }
.start-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; }
.start-card { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-height: 152px; padding: 13px 13px 11px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.018); color: var(--text-2); text-align: left; transition: .18s; }
.start-card:hover { border-color: var(--line-strong); background: rgba(255,255,255,.04); transform: translateY(-1px); }
.start-card.primary { border-color: rgba(231,185,106,.28); background: linear-gradient(150deg, rgba(231,185,106,.1), rgba(231,185,106,.025)); }
.start-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: rgba(231,185,106,.09); color: var(--accent); margin-bottom: 3px; }
.start-icon .icon { width: 14px; height: 14px; }
.start-card b { font-family: var(--serif); font-size: 18px; font-weight: 500; color: var(--text); }
.start-card small { color: var(--muted); font-size: 11px; line-height: 1.6; }
.start-card em { margin-top: auto; padding-top: 8px; color: var(--accent); font-size: 10.5px; font-style: normal; display: inline-flex; align-items: center; gap: 4px; }
.start-card em .icon { width: 11px; height: 11px; }
.start-steps { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 15px; color: var(--muted); font-size: 10.5px; }
.start-steps span { display: inline-flex; align-items: center; gap: 5px; }
.start-steps i { width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--accent); font-style: normal; font-size: 8px; }
.welcome-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.welcome-bottom .try-chip { font-size: 11px; }
.welcome-bottom .link-btn { font-size: 10px; }
.guide-modal { max-height: 64vh; }
.guide-steps { display: flex; flex-direction: column; gap: 7px; }
.guide-step { display: flex; gap: 12px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.015); }
.guide-step > i { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-dim); color: var(--accent); font-family: var(--serif); font-style: normal; font-size: 13px; }
.guide-step b { display: block; margin: 1px 0 4px; font-size: 14px; font-weight: 500; }
.guide-step p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.guide-terms { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 14px 0 0; }
.guide-terms b { width: 100%; font-size: 10px; color: var(--muted-2); font-weight: 400; margin-bottom: 3px; }
.guide-terms span { border: 1px solid var(--line); border-radius: 5px; padding: 5px 7px; color: var(--muted); font-size: 9.5px; }

/* blocks */
.block { margin-top: 16px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(180deg, rgba(22, 27, 37, 0.78), rgba(16, 20, 28, 0.82)); padding: 18px 19px; }
.block:first-child { margin-top: 10px; }
.skill-collapsed { padding: 0; overflow: hidden; }
.skill-collapsed > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; }
.skill-collapsed > summary::-webkit-details-marker { display: none; }
.skill-collapsed > summary b { display: block; margin-top: 3px; font-family: var(--serif); font-size: 13px; font-weight: 500; }
.skill-collapsed > summary .block-time { display: flex; align-items: center; gap: 3px; }
.skill-collapsed > summary .icon { width: 10px; height: 10px; }
.skill-collapsed[open] > summary .icon { transform: rotate(180deg); }
.skill-collapsed .result-text { padding: 0 14px 14px; }
.chat-start-compact { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; margin: 0 0 14px; border: 1px solid rgba(231,185,106,.22); border-radius: 9px; background: var(--accent-dim); }
.chat-start-compact h2 { margin: 4px 0 3px; font-family: var(--serif); font-size: 18px; font-weight: 500; }
.chat-start-compact p { margin: 0; color: var(--muted); font-size: 9.5px; line-height: 1.55; }
.chat-start-compact > div:last-child { display: flex; gap: 6px; flex-shrink: 0; }
@media (max-width: 620px) {
  .chat-start-compact { flex-direction: column; align-items: flex-start; }
}
.chat-history { margin: 0 0 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 0; }
.chat-history > summary { list-style: none; cursor: pointer; color: var(--muted-2); font-size: 8.5px; padding: 3px 0; }
.chat-history > summary::-webkit-details-marker { display: none; }
.chat-history > summary::before { content: "＋ "; color: var(--accent); }
.chat-history[open] > summary::before { content: "− "; }
.chat-history .msg { margin-top: 9px; }
.msg-long { border-left: 1px solid var(--line); padding-left: 10px; }
.msg-long > summary { list-style: none; cursor: pointer; color: var(--muted); font-size: 9px; line-height: 1.6; }
.msg-long > summary::-webkit-details-marker { display: none; }
.msg-long > summary::after { content: " 展开全文"; color: var(--accent); }
.msg-long[open] > summary::after { content: ""; }
.msg-long > .msg-text { margin-top: 8px; }
.block-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 13px; }
.block-head h3 { margin: 4px 0 0; font-size: 16px; font-family: var(--serif); font-weight: 600; letter-spacing: 0.2px; }
.block-kicker { font-size: 8px; letter-spacing: 2px; color: var(--accent); text-transform: uppercase; }
.block-time { font-size: 9px; color: var(--muted-2); white-space: nowrap; margin-top: 4px; }
.outline-rev-badge { display: inline-block; margin-left: 7px; padding: 2px 6px; border: 1px solid rgba(231,185,106,.35); border-radius: 999px; color: var(--accent); font-style: normal; font-size: 8px; letter-spacing: .5px; vertical-align: middle; }
.block-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mini-stats > div { background: rgba(10, 13, 19, 0.55); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.mini-stats b { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.mini-stats small { font-size: 8.5px; color: var(--muted); }
.scan-insight { display: flex; gap: 10px; align-items: flex-start; background: var(--accent-dim); border-radius: 8px; padding: 10px 12px; margin-top: 12px; }
.scan-insight p { margin: 0; font-size: 11.5px; line-height: 1.7; color: var(--text-2); }
.source-counts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.source-counts span { border: 1px solid var(--line); border-radius: 5px; padding: 5px 7px; color: var(--muted); font-size: 8.5px; }
.source-counts span.ok { color: var(--teal); border-color: rgba(111,211,199,.22); }
.source-counts span.warn { color: #c7b286; border-color: rgba(231,185,106,.2); }
.source-counts b { font-family: var(--serif); font-size: 11px; font-weight: 500; }
.real-work-detail { max-width: 800px; padding: 22px; }
.real-work-lead { color: var(--text-2); font-family: var(--serif); font-size: 14px; line-height: 1.8; white-space: pre-wrap; margin: 0 0 16px; }
.real-work-detail .btn { margin-top: 12px; }
.scan-compact { padding: 0; overflow: hidden; }
.scan-compact summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; }
.scan-compact summary::-webkit-details-marker { display: none; }
.scan-compact-kicker { color: var(--accent); font-size: 7.5px; letter-spacing: 1.1px; flex: 0 0 auto; }
.scan-compact summary b { font-family: var(--serif); font-size: 13px; font-weight: 500; }
.scan-compact summary small { color: var(--muted); font-size: 8.5px; }
.scan-compact-caret { margin-left: auto; color: var(--muted-2); font-size: 8.5px; display: flex; align-items: center; gap: 3px; }
.scan-compact-caret .icon { width: 11px; height: 11px; transition: transform .18s; }
.scan-compact[open] .scan-compact-caret .icon { transform: rotate(180deg); }
.scan-compact-body { padding: 0 14px 14px; }

/* idea cards */
.idea-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.idea-card { border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, 0.018); padding: 15px; display: flex; flex-direction: column; gap: 10px; transition: 0.2s; position: relative; }
.idea-card:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.028); transform: translateY(-1px); }
.idea-card.is-selected { border-color: rgba(231, 185, 106, 0.42); background: rgba(231, 185, 106, 0.04); }
.idea-head { display: flex; align-items: center; gap: 10px; }
.idea-title-wrap { min-width: 0; }
.idea-title-wrap h4 { margin: 0 0 3px; font-family: var(--serif); font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idea-mother { font-size: 8.5px; color: var(--muted); letter-spacing: 0.3px; }
.selected-mark { position: absolute; right: 10px; top: 10px; font-size: 8px; color: var(--accent); border: 1px solid rgba(231, 185, 106, 0.3); padding: 2px 6px; border-radius: 99px; background: rgba(231, 185, 106, 0.06); }
.idea-card .logline { margin: 0; font-size: 11.5px; line-height: 1.7; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.idea-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.idea-stats { display: flex; flex-direction: column; gap: 4px; }
.idea-stats span { display: flex; align-items: center; gap: 7px; }
.idea-stats i { display: block; height: 3px; width: 72px; background: rgba(255, 255, 255, 0.07); border-radius: 99px; position: relative; overflow: hidden; }
.idea-stats i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); background: var(--accent); border-radius: 99px; }
.idea-stats span:nth-child(2) i::after { background: var(--teal); }
.idea-stats span:nth-child(3) i::after { background: var(--blue); }
.idea-stats small { font-size: 8.5px; color: var(--muted); }
.idea-foot { border-top: 1px solid var(--line); padding-top: 9px; margin-top: auto; }
.idea-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.idea-card.is-compact .idea-title-wrap h4 { font-size: 14px; }
.score-ring { --ring: var(--accent); width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%; background: conic-gradient(var(--ring) calc(var(--v) * 1%), rgba(255, 255, 255, 0.075) 0); display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; line-height: 1; }
.score-ring::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #12161e; }
.score-ring b { position: relative; font-family: var(--serif); font-size: 13px; font-weight: 600; }
.score-ring small { position: relative; font-size: 6.5px; color: var(--muted); margin-top: 2px; letter-spacing: 0.5px; }
.score-ring.is-gold { --ring: var(--accent); }
.score-ring.is-teal { --ring: var(--teal); }
.score-ring.is-plain { --ring: #8b91a0; }

/* options */
.option-list { display: grid; gap: 11px; }
.options-intro { margin: -2px 0 13px; font-size: 11.5px; line-height: 1.7; color: var(--muted); }
.option-card { border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, 0.017); padding: 15px; transition: 0.2s; }
.option-card:hover { border-color: var(--line-strong); }
.option-card.is-selected { border-color: rgba(231, 185, 106, 0.45); background: rgba(231, 185, 106, 0.035); box-shadow: 0 0 0 1px rgba(231, 185, 106, 0.1) inset; }
.option-head { display: flex; align-items: center; gap: 9px; }
.option-key { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px; background: var(--accent-dim); border: 1px solid rgba(231, 185, 106, 0.25); color: var(--accent); font-family: var(--serif); font-size: 13px; display: grid; place-items: center; }
.option-title { min-width: 0; }
.option-title h4 { margin: 0; font-size: 13px; font-weight: 600; }
.option-title span { font-size: 8.5px; color: var(--muted); }
.option-tag { font-size: 8px; color: var(--teal); background: rgba(111, 211, 199, 0.08); border: 1px solid rgba(111, 211, 199, 0.2); padding: 2px 6px; border-radius: 99px; }
.option-match { margin-left: auto; font-family: var(--serif); font-size: 12px; color: var(--accent); white-space: nowrap; }
.option-logline { margin: 11px 0; font-size: 12px; line-height: 1.7; color: var(--text); }
.option-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.option-pair small { display: block; font-size: 8.5px; color: var(--muted-2); letter-spacing: 0.8px; margin-bottom: 3px; }
.option-pair p { margin: 0; font-size: 10.5px; line-height: 1.65; color: var(--text-2); }
.option-beats { margin: 10px 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.option-beats li { font-size: 10.5px; line-height: 1.65; color: var(--text-2); }
.option-beats li::marker { color: var(--accent); font-family: var(--serif); }
.option-risk { font-size: 9.5px; line-height: 1.6; color: #c9a6a0; background: rgba(239, 122, 109, 0.055); border: 1px solid rgba(239, 122, 109, 0.12); border-radius: 7px; padding: 7px 9px; }
.option-risk span { color: var(--danger); margin-right: 6px; font-size: 8px; letter-spacing: 1px; }
.option-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; flex-wrap: wrap; }
.option-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.option-tags em { font-style: normal; font-size: 8px; color: var(--muted); }
.option-actions { display: flex; gap: 6px; }
.options-hint { font-size: 9.5px; color: var(--muted-2); margin: 12px 0 0; line-height: 1.6; }
.options-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.options-foot-row .options-hint { margin: 0; }
.options-foot-row .btn { flex: 0 0 auto; }
.options-actions { display: flex; align-items: center; gap: 8px; flex: none; }

/* outline / draft */
.outline-logline { font-size: 12px; line-height: 1.7; color: var(--text-2); margin: 0 0 14px; padding-left: 10px; border-left: 2px solid rgba(231, 185, 106, 0.4); }
.outline-grid { display: grid; grid-template-columns: 1.1fr 1fr 1.1fr; gap: 14px; margin-bottom: 13px; }
.outline-grid section { background: rgba(0, 0, 0, 0.14); border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; }
.bullet { font-size: 10.5px; line-height: 1.65; color: var(--text-2); margin: 0 0 5px; }
.bullet b { color: var(--text); font-weight: 600; margin-right: 4px; }
.volume-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.volume-card { border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px; background: rgba(255, 255, 255, 0.018); }
.volume-card span { font-size: 8px; color: var(--accent); letter-spacing: 0.8px; }
.volume-card h4 { margin: 3px 0 4px; font-size: 11.5px; font-weight: 600; }
.volume-card p { margin: 0; font-size: 9.5px; line-height: 1.55; color: var(--muted); }
.outline-details { border-top: 1px solid var(--line); padding: 9px 0 3px; }
.outline-details summary { list-style: none; cursor: pointer; font-size: 10.5px; color: var(--text-2); display: flex; align-items: center; justify-content: space-between; padding: 4px 0; }
.outline-details summary::-webkit-details-marker { display: none; }
.outline-details summary::after { content: "+"; color: var(--muted); font-size: 13px; }
.outline-details[open] summary::after { content: "−"; }
.outline-details summary span { color: var(--muted-2); font-size: 9px; margin-left: auto; margin-right: 12px; }
.outline-chapters { padding: 8px 0 6px; display: flex; flex-direction: column; gap: 8px; }
.outline-chapter { display: grid; grid-template-columns: 22px 1fr; gap: 9px; }
.outline-chapter .num { font-family: var(--serif); font-size: 10px; color: var(--accent); padding-top: 1px; }
.outline-chapter b { font-size: 11px; font-weight: 600; margin-right: 7px; }
.outline-chapter em { font-style: normal; font-size: 8px; color: var(--teal); background: rgba(111, 211, 199, 0.08); padding: 1px 5px; border-radius: 4px; }
.outline-chapter p { margin: 3px 0; font-size: 10px; line-height: 1.6; color: var(--text-2); }
.outline-chapter small { font-size: 9px; color: var(--muted); }
.foreshadow-list { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; }
.foreshadow-list div { display: grid; grid-template-columns: 1fr 52px; gap: 8px; font-size: 9.5px; color: var(--text-2); }
.foreshadow-list em { font-style: normal; color: var(--accent); font-size: 9px; }
.foreshadow-list small { grid-column: 1 / -1; color: var(--muted); font-size: 9px; }
.draft-basis { font-size: 9.5px; line-height: 1.65; color: var(--muted); border-left: 2px solid rgba(231, 185, 106, 0.34); padding: 2px 0 2px 10px; margin: 0 0 11px; }
.draft-basis span { display: inline-block; font-size: 7.5px; letter-spacing: 1.2px; color: var(--accent); margin-right: 8px; text-transform: uppercase; }
.draft-body { font-family: var(--serif); font-size: 14.5px; line-height: 2.05; color: #ddd8cf; background: rgba(0, 0, 0, 0.14); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.draft-body p { margin: 0 0 1em; }
.draft-body p:last-child { margin-bottom: 0; }

.draft-note { font-size: 8.5px; color: var(--muted-2); margin: 10px 0 0; }
.outline-brief { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.outline-brief span { border: 1px solid var(--line); border-radius: 5px; padding: 4px 7px; color: var(--muted); font-size: 8px; }
.outline-brief b { color: var(--accent); font-weight: 500; margin-right: 2px; }
.outline-compact .outline-details { margin-top: 4px; }
.outline-full summary { color: var(--text-2); }
.outline-full[open] summary { margin-bottom: 10px; }
.outline-full .outline-grid { margin-top: 8px; }
.draft-excerpt { margin: 8px 0 9px; font-family: var(--serif); font-size: 12px; line-height: 1.85; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.draft-compact-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.draft-compact-meta > span:not(.continuity-badge) { color: var(--muted-2); font-size: 8px; line-height: 1.5; }
.draft-compact .block-actions { margin-top: 0; }
.skill-task-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.prompt-snippet { font-size: 9.5px; line-height: 1.7; color: var(--muted); background: rgba(0, 0, 0, 0.16); border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; }
.skill-task-note { font-size: 9px; color: var(--muted-2); margin: 10px 0 0; }
.result-text { font-size: 12px; line-height: 1.85; color: var(--text-2); max-height: 420px; overflow-y: auto; padding-right: 6px; }
.result-text h3 { font-family: var(--serif); font-size: 14px; color: var(--text); margin: 14px 0 6px; }
.result-text p { margin: 0 0 8px; }
.note-block { margin-top: 12px; border-left: 2px solid var(--line-strong); padding-left: 12px; font-size: 11px; color: var(--muted); }
.next-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }

/* context panel */
.context-panel { border-left: 1px solid var(--line); padding: 24px 20px 26px; overflow-y: auto; background: rgba(13, 16, 22, 0.42); }
.ctx-progress { display: flex; align-items: center; gap: 13px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.progress-ring { --p: 0; width: 62px; height: 62px; flex: 0 0 62px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), rgba(255, 255, 255, 0.07) 0); display: grid; place-items: center; position: relative; }
.progress-ring::before { content: ""; position: absolute; inset: 4px; background: #0d1016; border-radius: 50%; }
.progress-ring > div { position: relative; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.progress-ring b { font-family: var(--serif); font-size: 15px; font-weight: 600; }
.progress-ring small { font-size: 7px; color: var(--muted); margin-top: 3px; }
.ctx-kicker { font-size: 7.5px; letter-spacing: 2px; color: var(--muted-2); text-transform: uppercase; display: block; margin-bottom: 6px; }
.ctx-progress h3 { margin: 0 0 4px; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.ctx-progress p { margin: 0; font-size: 9.5px; color: var(--muted); }
.ctx-section { padding: 17px 0; border-bottom: 1px solid var(--line); }
.ctx-idea h4 { margin: 0 0 5px; font-family: var(--serif); font-size: 13px; font-weight: 600; }
.ctx-idea p { margin: 0 0 7px; font-size: 10px; line-height: 1.6; color: var(--muted); }
.ctx-empty { margin: 0; font-size: 10px; line-height: 1.65; color: var(--muted-2); }
.ctx-option { display: flex; gap: 9px; align-items: flex-start; }
.option-key.small { width: 23px; height: 23px; flex: 0 0 23px; font-size: 11px; border-radius: 6px; }
.ctx-option b { font-size: 11px; font-weight: 600; }
.ctx-option p { margin: 3px 0 0; font-size: 9.5px; line-height: 1.55; color: var(--muted); }
.ctx-scan { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ctx-scan > div { background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line); border-radius: 7px; padding: 7px 8px; display: flex; flex-direction: column; gap: 2px; }
.ctx-scan b { font-family: var(--serif); font-size: 14px; }
.ctx-scan small { font-size: 7.5px; color: var(--muted); }
.ctx-scan-note { margin: 8px 0 0; font-size: 8.5px; color: var(--muted-2); }
.ctx-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.ctx-quick button { border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 9.5px; padding: 7px 6px; border-radius: 6px; text-align: left; }
.ctx-quick button:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.03); }
.ctx-foot { margin: 18px 0 0; font-size: 8px; line-height: 1.7; color: var(--muted-2); }

/* clean project rail */
.context-clean { padding: 22px 18px; display: flex; flex-direction: column; gap: 14px; }
.ctx-project { padding: 2px 2px 14px; border-bottom: 1px solid var(--line); }
.ctx-project-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted-2); font-size: 7.5px; letter-spacing: 1.6px; margin-bottom: 7px; }
.ctx-project-top em { font-style: normal; letter-spacing: 0; color: var(--muted); }
.ctx-project h3 { margin: 0 0 3px; font-family: var(--serif); font-size: 15px; font-weight: 500; line-height: 1.35; }
.ctx-project p { margin: 0; color: var(--muted); font-size: 9px; }
.ctx-progress-track { height: 3px; margin-top: 12px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: hidden; }
.ctx-progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--teal)); }
.ctx-clean-block { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.ctx-clean-block h4 { margin: 0 0 4px; font-family: var(--serif); font-size: 12.5px; font-weight: 500; line-height: 1.4; }
.ctx-clean-block p { margin: 0 0 7px; color: var(--muted); font-size: 9px; line-height: 1.6; }
.ctx-clean-block .ctx-empty { margin: 0; }
.ctx-clean-block .ctx-option { gap: 8px; }
.ctx-guard-card { display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px 9px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.018); color: var(--muted); text-align: left; }
.ctx-guard-card:hover { border-color: var(--line-strong); background: rgba(255,255,255,.035); }
.ctx-guard-card > span:nth-child(2) { flex: 1; min-width: 0; }
.ctx-guard-card b { display: block; color: var(--text-2); font-size: 9.5px; font-weight: 500; }
.ctx-guard-card small { display: block; margin-top: 2px; font-size: 7.5px; color: var(--muted); }
.ctx-guard-card .icon { width: 12px; height: 12px; color: var(--muted-2); }
.ctx-guard-score { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--accent); font-family: var(--serif); font-size: 10px; }
.ctx-guard-score.pass { color: var(--teal); border-color: rgba(111,211,199,.3); }
.ctx-guard-score.danger { color: var(--danger); border-color: rgba(239,122,109,.3); }
.ctx-next { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.ctx-next b { display: block; margin: 2px 0 4px; color: var(--text); font-family: var(--serif); font-size: 13px; font-weight: 500; }
.ctx-next p { margin: 0 0 9px; color: var(--muted); font-size: 8.5px; line-height: 1.5; }
.ctx-next .btn { width: 100%; justify-content: center; }

/* composer */
.composer-wrap { flex: 0 0 auto; padding: 8px 28px 18px; background: linear-gradient(180deg, rgba(10, 12, 17, 0), rgba(10, 12, 17, 0.94) 30%); }
.composer-resume { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 780px; margin: 0 auto 7px; padding: 7px 10px; border: 1px solid rgba(231,185,106,.2); border-radius: 7px; background: rgba(231,185,106,.05); color: var(--muted); font-size: 8.5px; }
.composer-resume .link-btn { flex: none; color: var(--accent); }
.composer { max-width: 820px; margin: 0 auto; background: #12161e; border: 1px solid var(--line-strong); border-radius: 16px; padding: 8px 10px 8px 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.26); transition: border-color 0.2s; }
.composer:focus-within { border-color: rgba(231, 185, 106, 0.38); }
.composer-advanced { min-width: 0; }
.composer-mobile-toggle { display: none; }
.composer-context { display: flex; flex-wrap: wrap; gap: 5px; padding: 5px 0 3px; }
.composer-skills { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; padding: 2px 0 4px; }
.composer-skills-label { color: var(--muted-2); font-size: 8px; letter-spacing: 1px; margin-right: 2px; }
.composer-skill-item { display: inline-flex; align-items: center; gap: 1px; }
.composer-skill-chip { border: 1px solid rgba(111, 211, 199, 0.22); border-radius: 4px; background: rgba(111, 211, 199, 0.045); color: var(--text-2); padding: 2px 5px; display: inline-flex; align-items: center; gap: 3px; font: inherit; font-size: 9px !important; line-height: 1.4; white-space: nowrap; }
.composer-skill-remove { border: 0; background: transparent; color: var(--muted-2); padding: 0 2px; font: inherit; font-size: 10px !important; line-height: 1; }
.composer-skill-remove:hover { color: var(--danger); }
.composer-skill-chip i { color: var(--teal); font-style: normal; font-size: 9px !important; }
.composer-skill-chip:hover { border-color: rgba(111, 211, 199, 0.5); color: var(--teal); }
.composer-skill-add { border: 1px dashed var(--line); border-radius: 4px; background: transparent; color: var(--muted-2); padding: 2px 5px; font: inherit; font-size: 9px !important; line-height: 1.4; }
.composer-skill-add:hover { color: var(--accent); border-color: rgba(231, 185, 106, 0.4); }
.composer-skill-run-all { border: 1px solid rgba(231, 185, 106, 0.24); border-radius: 4px; background: var(--accent-dim); color: var(--accent); padding: 2px 5px; font: inherit; font-size: 9px !important; line-height: 1.4; }
.composer-skill-run-all:hover { border-color: rgba(231, 185, 106, 0.55); }
.composer-next-chapter { margin-left: auto; border: 1px solid rgba(231, 185, 106, 0.42); border-radius: 4px; background: rgba(231, 185, 106, 0.1); color: var(--accent); padding: 2px 7px; display: inline-flex; align-items: center; gap: 3px; font: inherit; font-size: 9px !important; line-height: 1.4; white-space: nowrap; }
.composer-next-chapter .icon { width: 10px; height: 10px; }
.composer-next-chapter:hover { border-color: var(--accent); background: rgba(231, 185, 106, 0.18); }
.ctx-chip { font-size: 9px; color: var(--text-2); background: var(--accent-dim); border: 1px solid rgba(231, 185, 106, 0.17); border-radius: 5px; padding: 3px 7px; white-space: nowrap; }
.ctx-chip i { font-style: normal; color: var(--accent); margin-right: 5px; font-size: 8px; }
#composerInput { width: 100%; min-height: 40px; max-height: 160px; resize: none; background: transparent; border: 0; outline: none; color: var(--text); font-size: 13.5px; line-height: 1.75; padding: 9px 0 6px; font-family: var(--sans); }
#composerInput::placeholder { color: #5b6270; }
.composer-bar { display: flex; align-items: center; gap: 10px; }
.composer-tools { display: flex; gap: 2px; }
.composer-tools button { border: 0; background: none; color: var(--muted); font-size: 9.5px; display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border-radius: 6px; }
.composer-tools button:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.composer-tools .icon { width: 12px; height: 12px; }
.composer-hint { margin-left: auto; margin-right: 6px; font-size: 8.5px; color: var(--muted-2); white-space: nowrap; }
.send-btn { width: 38px; height: 38px; border: 0; border-radius: 11px; background: var(--accent); color: #17120a; display: grid; place-items: center; flex: 0 0 auto; transition: 0.18s; box-shadow: 0 5px 16px rgba(231, 185, 106, 0.2); }
.send-btn:hover { background: var(--accent-2); transform: translateY(-1px); }
.send-btn .icon { width: 16px; height: 16px; }
.composer-foot { max-width: 820px; margin: 8px auto 0; text-align: center; font-size: 8px; color: var(--muted-2); letter-spacing: 0.2px; }

/* ---------------- scan ---------------- */
.scan-config { padding: 17px 19px; margin-bottom: 16px; }
.config-block { margin-bottom: 14px; }
.config-label { font-size: 8.5px; color: var(--muted-2); text-transform: uppercase; letter-spacing: 1.5px; display: block; margin-bottom: 8px; }
.config-grid { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 8.5px; color: var(--muted-2); letter-spacing: 1.2px; text-transform: uppercase; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: rgba(0, 0, 0, 0.18); color: var(--text); font-size: 11px; padding: 8px 10px; outline: none; transition: border-color 0.18s; }
select { color-scheme: dark; }
select option { background: #151a22; color: #e7e4dc; }
.field textarea { resize: vertical; min-height: 40px; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(231, 185, 106, 0.4); }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
.scan-btn { height: 37px; }
.terminal { background: #05070a; border-color: #1b2633; border-radius: 13px; overflow: hidden; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3); }
.terminal-bar { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: #0a0f15; border-bottom: 1px solid #18222e; font-family: var(--mono); font-size: 9.5px; color: #6e8294; }
.term-dots { display: flex; gap: 4px; }
.term-dots i { width: 6px; height: 6px; border-radius: 50%; background: #2a3846; }
.term-dots i:first-child { background: #8d5348; }
.term-dots i:nth-child(2) { background: #8a7745; }
.term-dots i:nth-child(3) { background: #3e6e56; }
.term-path { color: #46586a; margin-left: auto; }
.term-status { color: #6a7f91; letter-spacing: 1px; font-size: 8px; }
.term-status.live { color: var(--teal); animation: pulse 1.4s infinite; }
.terminal-body { height: 224px; overflow-y: auto; padding: 14px 16px; font-family: var(--mono); font-size: 10.5px; line-height: 1.85; color: #8fa5b5; }
.log-line { display: grid; grid-template-columns: 56px 13px 1fr; gap: 7px; align-items: baseline; animation: rise 0.22s ease both; }
.log-time { color: #3c4b59; font-size: 9px; }
.log-prefix { color: #5e7386; }
.log-line.cmd { color: #d8bc86; }
.log-line.cmd .log-prefix { color: var(--accent); }
.log-line.ok { color: #7ad6a0; }
.log-line.ok .log-prefix { color: #7ad6a0; }
.log-line.warn { color: #e0a85f; }
.log-line.warn .log-prefix { color: #e0a85f; }
.log-line.dim { color: #4c5d6c; }
.cursor { display: inline-block; width: 5px; height: 11px; background: #6b8497; margin-left: 4px; animation: blink 1s steps(1) infinite; vertical-align: -1px; }
.terminal-progress { height: 2px; background: #101a24; }
.terminal-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #8a6a37, var(--accent)); transition: width 0.3s; box-shadow: 0 0 10px rgba(231, 185, 106, 0.5); }
.results-head { display: flex; justify-content: space-between; align-items: flex-end; margin: 26px 0 14px; }
.results-head h2 { margin: 4px 0 0; font-family: var(--serif); font-size: 21px; font-weight: 600; }
.results-actions { display: flex; align-items: center; gap: 12px; }
.result-time { font-size: 9px; color: var(--muted-2); }
.relaxed-note { font-size: 10px; color: #c8a26a; background: rgba(231, 185, 106, 0.06); border: 1px solid rgba(231, 185, 106, 0.14); border-radius: 7px; padding: 8px 11px; margin: 0 0 12px; }
.data-note { font-size: 8.5px; line-height: 1.6; color: var(--muted-2); margin: -4px 0 13px; }
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.work-card { display: flex; gap: 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, 0.018); padding: 15px; transition: 0.2s; }
.work-card:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.028); }
.work-rank { display: flex; flex-direction: column; align-items: center; gap: 5px; padding-top: 1px; width: 34px; flex: 0 0 34px; }
.work-rank span { font-family: var(--serif); font-size: 12px; color: var(--muted); }
.work-rank i { display: block; width: 2px; flex: 1; min-height: 36px; border-radius: 2px; opacity: 0.55; }
.work-body { min-width: 0; flex: 1; }
.work-meta { display: flex; align-items: center; gap: 6px; font-size: 8.5px; color: var(--muted); letter-spacing: 0.3px; }
.platform-dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.work-score { margin-left: auto; font-family: var(--serif); font-size: 10px; color: var(--accent); border: 1px solid rgba(231, 185, 106, 0.2); border-radius: 99px; padding: 1px 6px; }
.work-body h3 { margin: 5px 0 5px; font-family: var(--serif); font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-synopsis { margin: 0 0 8px; font-size: 10px; line-height: 1.65; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.work-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.work-metrics { display: flex; gap: 12px; font-size: 8px; color: var(--muted-2); }
.work-metrics b { font-family: var(--serif); font-size: 10px; color: var(--text-2); margin-right: 2px; }
.work-actions { display: flex; align-items: flex-end; }

/* ---------------- analysis ---------------- */
.analysis-layout { display: grid; grid-template-columns: 238px minmax(0, 1fr); gap: 16px; align-items: start; }
.work-list { border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.016); padding: 6px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; max-height: calc(100vh - 190px); overflow-y: auto; }
.work-list-item { display: flex; align-items: center; gap: 8px; padding: 8px; border: 0; background: none; border-radius: 8px; text-align: left; color: var(--muted); }
.work-list-item:hover { background: rgba(255, 255, 255, 0.03); }
.work-list-item.active { background: var(--accent-dim); color: var(--text); }
.wl-rank { font-family: var(--serif); font-size: 10px; color: var(--muted-2); width: 18px; }
.work-list-item.active .wl-rank { color: var(--accent); }
.wl-main { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 2px; }
.wl-main b { font-size: 10.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-main small { font-size: 8px; color: var(--muted-2); }
.wl-score { font-family: var(--serif); font-size: 9px; color: var(--muted); }
.analysis-detail { border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(180deg, rgba(21, 26, 36, 0.7), rgba(15, 19, 26, 0.7)); padding: 24px; min-width: 0; }
.detail-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.platform-badge { display: inline-block; font-size: 8.5px; letter-spacing: 1px; color: var(--c, var(--accent)); border: 1px solid currentColor; border-radius: 99px; padding: 3px 8px; opacity: 0.9; }
.detail-title h2 { margin: 9px 0 5px; font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: 0.3px; }
.detail-title p { margin: 0 0 9px; font-size: 10px; color: var(--muted); }
.detail-score { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.detail-heat { display: flex; flex-direction: column; gap: 1px; text-align: right; }
.detail-heat b { font-family: var(--serif); font-size: 20px; }
.detail-heat small { font-size: 8px; color: var(--muted); }
.detail-synopsis { font-size: 11.5px; line-height: 1.8; color: var(--text-2); margin: 15px 0 18px; padding: 11px 13px; background: rgba(0, 0, 0, 0.14); border-left: 2px solid rgba(231, 185, 106, 0.38); border-radius: 0 7px 7px 0; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 22px; }
.metric-grid > div { border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; background: rgba(255, 255, 255, 0.018); display: flex; flex-direction: column; gap: 3px; }
.metric-grid span { font-size: 8.5px; color: var(--muted); }
.metric-grid b { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.metric-grid i { display: block; height: 2px; background: rgba(255, 255, 255, 0.07); border-radius: 99px; overflow: hidden; margin-top: 3px; }
.metric-grid em { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.analysis-section { border-top: 1px solid var(--line); padding: 18px 0 4px; }
.section-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.section-head h3 { margin: 0; font-family: var(--serif); font-size: 17px; font-weight: 600; }
.section-note { margin-left: auto; font-size: 9px; color: var(--muted-2); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inset { border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; background: rgba(255, 255, 255, 0.016); }
.inset p { margin: 0 0 8px; font-size: 10.5px; line-height: 1.7; color: var(--text-2); }
.inset .big-inset { font-family: var(--serif); font-size: 16px; color: var(--text); margin-bottom: 10px; }
.score-line { display: flex; align-items: center; gap: 8px; margin: 9px 0; font-size: 9px; color: var(--muted); }
.score-line i { flex: 1; height: 3px; background: rgba(255, 255, 255, 0.07); border-radius: 99px; overflow: hidden; }
.score-line em { display: block; height: 100%; background: var(--accent); }
.score-line b { font-family: var(--serif); font-size: 11px; color: var(--accent); }
.hook-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hook-list li { display: flex; gap: 7px; font-size: 10px; line-height: 1.6; color: var(--text-2); }
.hook-list li span { font-family: var(--serif); color: var(--accent); font-size: 9px; flex: 0 0 auto; }
.line-chart { width: 100%; height: 166px; display: block; margin: 4px 0 12px; }
.chart-grid { stroke: rgba(255, 255, 255, 0.05); stroke-width: 1; stroke-dasharray: 3 5; }
.chart-label { fill: #626a79; font-size: 9px; text-anchor: middle; font-family: var(--sans); }
.chapter-head { display: grid; grid-template-columns: 30px 1fr 38px; gap: 8px; font-size: 8px; letter-spacing: 1.4px; color: var(--muted-2); text-transform: uppercase; padding: 0 4px 7px; border-bottom: 1px solid var(--line); }
.chapter-list { display: flex; flex-direction: column; }
.chapter-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 38px; gap: 8px; padding: 10px 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.chapter-row:last-child { border-bottom: 0; }
.ch-num { font-family: var(--serif); font-size: 11px; color: var(--muted-2); padding-top: 1px; }
.ch-main { min-width: 0; }
.ch-title { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ch-title b { font-size: 11.5px; font-weight: 600; }
.ch-title em { font-style: normal; font-size: 8px; color: var(--teal); background: rgba(111, 211, 199, 0.08); padding: 1px 5px; border-radius: 4px; }
.hook-badge { font-style: normal; font-size: 7.5px; color: var(--accent); background: var(--accent-dim); padding: 1px 5px; border-radius: 4px; }
.ch-main p { margin: 4px 0 6px; font-size: 9.5px; line-height: 1.6; color: var(--muted); }
.tension-bar { display: flex; align-items: center; gap: 6px; height: 3px; }
.tension-bar i { display: block; height: 3px; border-radius: 99px; max-width: calc(100% - 26px); }
.tension-bar span { font-size: 7.5px; color: var(--muted-2); }
.ch-pace { font-size: 8px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; height: 18px; display: inline-flex; align-items: center; justify-content: center; align-self: start; }
.ch-pace.fast { color: var(--accent); border-color: rgba(231, 185, 106, 0.22); }
.ch-pace.slow { color: var(--blue); border-color: rgba(143, 168, 255, 0.2); }
.insight-list { display: flex; flex-direction: column; gap: 7px; }
.insight-list p { margin: 0; font-size: 10.5px; line-height: 1.7; color: var(--text-2); display: flex; gap: 8px; }
.insight-list b { font-family: var(--serif); color: var(--accent); font-weight: 400; font-size: 9px; padding-top: 2px; }
.reuse-card { margin-top: 18px; border: 1px solid rgba(231, 185, 106, 0.18); background: linear-gradient(140deg, rgba(231, 185, 106, 0.06), rgba(231, 185, 106, 0.015)); border-radius: 12px; padding: 16px 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.reuse-card h3 { margin: 4px 0 5px; font-family: var(--serif); font-size: 16px; font-weight: 600; }
.reuse-card p { margin: 0; font-size: 9.5px; color: var(--muted); line-height: 1.6; max-width: 560px; }
.reuse-slots { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.reuse-slots span { font-size: 8.5px; color: var(--accent); background: rgba(231, 185, 106, 0.07); border: 1px solid rgba(231, 185, 106, 0.16); border-radius: 5px; padding: 2px 7px; }

/* ---------------- market ---------------- */
.market-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 12px; }
.market-panel { padding: 18px 19px; min-width: 0; }
.market-panel.wide { grid-column: 1 / -1; }
.panel-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head h3 { margin: 0; font-family: var(--serif); font-size: 17px; font-weight: 600; }
.panel-note { margin-left: auto; font-size: 8.5px; color: var(--muted-2); }
.genre-row { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; margin-bottom: 11px; }
.genre-row:last-child { margin-bottom: 0; }
.genre-name b { display: block; font-size: 11px; font-weight: 600; }
.genre-name small { font-size: 8px; color: var(--muted-2); }
.genre-bar { height: 23px; background: rgba(255, 255, 255, 0.035); border-radius: 5px; position: relative; overflow: hidden; }
.genre-bar i { display: block; height: 100%; background: linear-gradient(90deg, rgba(231, 185, 106, 0.22), rgba(231, 185, 106, 0.55)); border-radius: 5px; }
.genre-bar em { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 8.5px; color: var(--text-2); }
.donut-wrap { display: flex; align-items: center; gap: 22px; padding: 6px 0 4px; }
.donut { width: 118px; height: 118px; flex: 0 0 118px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.donut::before { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: #12161e; }
.donut-hole { position: relative; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.donut-hole b { font-family: var(--serif); font-size: 20px; }
.donut-hole small { font-size: 7px; color: var(--muted); margin-top: 3px; }
.legend { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.legend span { display: flex; align-items: center; gap: 6px; font-size: 9px; color: var(--muted); }
.legend i { width: 6px; height: 6px; border-radius: 2px; flex: 0 0 auto; }
.legend b { margin-left: auto; color: var(--text-2); font-family: var(--serif); font-size: 10px; }
.bar-row { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.bar-name { width: 74px; flex: 0 0 74px; font-size: 9.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { flex: 1; height: 4px; background: rgba(255, 255, 255, 0.06); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; }
.bar-val { font-family: var(--serif); font-size: 10px; color: var(--muted); width: 16px; text-align: right; }
.pace-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pace-row { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.016); border-bottom: 1px solid var(--line); }
.pace-row:last-of-type { border-bottom: 1px solid var(--line); }
.pace-index { font-family: var(--serif); font-size: 9px; color: var(--accent); }
.pace-row div { display: flex; flex-direction: column; gap: 1px; }
.pace-row b { font-size: 10.5px; font-weight: 600; }
.pace-row small { font-size: 8px; color: var(--muted-2); }
.panel-divider { height: 1px; background: var(--line); margin: 12px 0; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-cloud span { font-size: 8.5px; color: var(--muted); background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); border-radius: 5px; padding: 3px 6px; }
.tag-cloud b { color: var(--accent); margin-left: 4px; font-weight: 400; }
.opportunity-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.opp-card { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.018); border-radius: 10px; padding: 12px; position: relative; }
.opp-index { font-family: var(--serif); font-size: 8px; color: var(--muted-2); }
.opp-score { position: absolute; right: 11px; top: 10px; font-family: var(--serif); font-size: 20px; color: var(--accent); }
.opp-card h4 { margin: 8px 0 5px; font-size: 11.5px; font-weight: 600; }
.opp-card p { margin: 0 0 9px; font-size: 8.5px; line-height: 1.6; color: var(--muted); min-height: 40px; }
.opp-bar { height: 2px; background: rgba(255, 255, 255, 0.06); border-radius: 99px; overflow: hidden; }
.opp-bar i { display: block; height: 100%; background: var(--accent); }
.conclusion-list { display: flex; flex-direction: column; gap: 8px; }
.conclusion-list > div { display: flex; gap: 10px; align-items: flex-start; }
.conclusion-list span { font-family: var(--serif); font-size: 10px; color: var(--accent); padding-top: 2px; }
.conclusion-list p { margin: 0; font-size: 10.5px; line-height: 1.7; color: var(--text-2); }
.risk-list { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 11px; }
.risk-list p { margin: 0 0 5px; font-size: 9.5px; line-height: 1.65; color: #b4a29e; display: flex; gap: 8px; }
.risk-list b { font-size: 8px; color: var(--danger); border: 1px solid rgba(239, 122, 109, 0.2); border-radius: 3px; padding: 1px 4px; height: fit-content; margin-top: 1px; letter-spacing: 1px; }
.sample-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.sample-chip { border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 9px; padding: 5px 9px; border-radius: 6px; }
.sample-chip:hover { color: var(--text); border-color: var(--line-strong); }

/* ---------------- ideas ---------------- */
.mother-section { margin-bottom: 24px; }
.mother-strip { display: flex; gap: 9px; overflow-x: auto; padding: 2px 0 8px; }
.mother-card { flex: 0 0 244px; text-align: left; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.018); border-radius: 11px; padding: 13px; color: var(--text); transition: 0.2s; }
.mother-card:hover { border-color: rgba(231, 185, 106, 0.3); background: rgba(231, 185, 106, 0.035); }
.mother-tag { font-size: 7.5px; color: var(--accent); letter-spacing: 1px; }
.mother-card b { display: block; margin: 6px 0 5px; font-family: var(--serif); font-size: 13px; font-weight: 600; }
.mother-card p { margin: 0 0 9px; font-size: 9px; line-height: 1.55; color: var(--muted); }
.mother-card em { font-style: normal; font-size: 8px; color: var(--muted-2); }
.idea-scan-panel { border: 1px solid rgba(111, 211, 199, 0.16); border-radius: 12px; background: rgba(111, 211, 199, 0.025); padding: 13px 14px; margin-bottom: 16px; }
.idea-scan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.idea-scan-card { border: 1px solid var(--line); border-radius: 8px; background: rgba(0,0,0,.12); padding: 9px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.idea-scan-card > div { display: flex; justify-content: space-between; gap: 6px; color: var(--muted-2); }
.idea-scan-card > div span { color: var(--teal); }
.idea-scan-card > div em { font-style: normal; }
.idea-scan-card b { color: var(--text-2); font-family: var(--serif); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idea-scan-card p { color: var(--muted); margin: 0; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.idea-scan-card .btn { margin-top: auto; align-self: flex-start; }
.idea-scan-empty { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); }
.idea-scan-empty p { margin: 0; }
.ideas-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 14px; flex-wrap: wrap; }
.ideas-toolbar-right { display: flex; align-items: center; gap: 12px; }
.idea-coverage { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.idea-coverage span { border: 1px solid var(--line); border-radius: 5px; padding: 3px 7px; color: var(--muted); font-size: 8.5px; }
.idea-coverage b { color: var(--muted-2); font-family: var(--mono); font-weight: 400; }
.idea-coverage span.done { border-color: rgba(111, 211, 199, .28); color: var(--teal); }
.idea-coverage span.done b { color: var(--teal); }
.idea-fill-status { display: flex; align-items: center; gap: 7px; margin: -6px 0 14px; color: var(--accent); font-size: 9px; }
.idea-fill-status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(231,185,106,.5); animation: idea-pulse 1.3s infinite; }
@keyframes idea-pulse { 70% { box-shadow: 0 0 0 6px rgba(231,185,106,0); } 100% { box-shadow: 0 0 0 0 rgba(231,185,106,0); } }
.toolbar-count { font-size: 9px; color: var(--muted-2); }
.ideas-page .idea-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------------- continuation ---------------- */
.import-novel-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 22px; margin-bottom: 16px; border-color: rgba(111, 211, 199, .28); background: linear-gradient(120deg, rgba(111,211,199,.06), rgba(231,185,106,.04)); }
.import-novel-copy { min-width: 0; }
.import-novel-copy h3 { font-family: var(--serif); font-size: 18px; margin: 5px 0 7px; color: var(--text); }
.import-novel-copy p { margin: 0; max-width: 760px; color: var(--text-2); font-size: 10.5px; line-height: 1.75; }
.import-novel-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; flex: none; }
.import-novel-actions small { max-width: 190px; color: var(--muted); font-size: 8px; line-height: 1.5; text-align: right; }
.import-file-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.import-file-row input[type="file"] { display: none; }
.import-file-row span { color: var(--muted); font-size: 8.5px; line-height: 1.5; }
.import-empty-note { display: flex; align-items: center; gap: 10px; border: 1px dashed var(--line); border-radius: 8px; padding: 12px 14px; color: var(--muted); font-size: 9.5px; }
.import-empty-note p { margin: 0; flex: 1; line-height: 1.6; }
.import-empty-note .icon { color: var(--teal); }
@media (max-width: 780px) { .import-novel-panel { align-items: flex-start; flex-direction: column; } .import-novel-actions { align-items: flex-start; } .import-novel-actions small { text-align: left; } }
.canon-intro { display: flex; gap: 10px; align-items: flex-start; border: 1px solid rgba(231, 185, 106, 0.16); background: var(--accent-dim); border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; }
.canon-intro p { margin: 0; font-size: 10.5px; line-height: 1.7; color: var(--text-2); }
.canon-analysis-status { color: var(--muted); }
.canon-analysis-status.ok { color: var(--teal); }
.canon-analysis-error { display: grid; gap: 3px; margin: 8px 0; padding: 8px 9px; border: 1px solid rgba(231,185,106,.18); border-radius: 6px; background: rgba(231,185,106,.04); }
.canon-analysis-error b { color: var(--accent); font-size: 8px; }
.canon-analysis-error span { color: var(--text-2); font-size: 8.5px; line-height: 1.5; }
.canon-analysis-error small { color: var(--muted); font-size: 8px; }
.canon-extra { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 9px; }
.canon-extra b { display: block; color: var(--muted); font-size: 8px; letter-spacing: .06em; margin-bottom: 4px; }
.canon-extra p, .canon-extra li { color: var(--text-2); font-size: 9px; line-height: 1.7; margin: 0; }
.canon-extra ul { margin: 0; padding-left: 14px; }
.canon-work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.canon-work-card { border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.018); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.canon-work-card:hover { border-color: rgba(231, 185, 106, 0.28); background: rgba(255, 255, 255, 0.03); }
.canon-work-top { display: flex; align-items: center; gap: 6px; font-size: 8.5px; color: var(--muted); }
.canon-work-score { margin-left: auto; font-family: var(--serif); color: var(--accent); font-size: 10px; }
.canon-work-card h3 { margin: 2px 0 0; font-family: var(--serif); font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.canon-work-card > p { margin: 0 0 4px; font-size: 9.5px; line-height: 1.65; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 47px; }
.canon-work-card .btn { align-self: flex-start; margin-top: auto; }

.continue-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 14px; align-items: start; }
.canon-panel { padding: 18px; position: sticky; top: 0; max-height: calc(100vh - 210px); overflow-y: auto; }
.canon-head h2 { margin: 5px 0 4px; font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.3; }
.canon-head > p { margin: 0 0 8px; font-size: 9px; color: var(--muted); }
.canon-synopsis { font-size: 10px; line-height: 1.7; color: var(--text-2); border-left: 2px solid rgba(231, 185, 106, 0.3); padding-left: 9px; margin: 12px 0; }
.canon-lock { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.canon-lock span { display: inline-flex; align-items: center; gap: 5px; font-size: 9px; color: var(--teal); letter-spacing: 0.5px; }
.canon-lock .icon { width: 11px; height: 11px; }
.canon-lock small { font-size: 8px; color: var(--muted-2); text-align: left; line-height: 1.6; }
.canon-facts { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.canon-fact span { display: block; font-size: 7.5px; letter-spacing: 1.2px; color: var(--accent); margin-bottom: 2px; }
.canon-fact p { margin: 0; font-size: 9px; line-height: 1.6; color: var(--text-2); }
.canon-details { border-top: 1px solid var(--line); padding-top: 8px; }
.canon-details summary { list-style: none; cursor: pointer; font-size: 9.5px; color: var(--text-2); display: flex; align-items: center; justify-content: space-between; padding: 4px 0; }
.canon-details summary::-webkit-details-marker { display: none; }
.canon-details summary::after { content: "+"; color: var(--muted); }
.canon-details[open] summary::after { content: "−"; }
.canon-details summary span { margin-left: auto; margin-right: 10px; font-size: 8px; color: var(--muted-2); }
.canon-original-list { display: flex; flex-direction: column; gap: 7px; padding: 7px 0; max-height: 240px; overflow-y: auto; }
.canon-original-list > div { display: grid; grid-template-columns: 18px 1fr; gap: 6px; }
.canon-original-list > div > span { font-family: var(--serif); font-size: 8px; color: var(--muted-2); padding-top: 1px; }
.canon-original-list b { font-size: 9.5px; font-weight: 500; }
.canon-original-list em { font-style: normal; font-size: 7px; color: var(--teal); margin-left: 5px; }
.canon-original-list p { margin: 2px 0 0; font-size: 8.5px; line-height: 1.5; color: var(--muted); }
.canon-lasthook { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 9px; }
.canon-lasthook p { margin: 0; font-size: 8.5px; line-height: 1.6; color: var(--muted); }
.canon-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }

.continue-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.continue-progress { display: grid; grid-template-columns: repeat(3, 1fr) 1.5fr; gap: 12px; align-items: center; padding: 12px 15px; }
.continue-progress > div:not(.progress-mini) { display: flex; flex-direction: column; gap: 2px; }
.continue-progress b { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.continue-progress small { font-size: 8px; color: var(--muted); }
.progress-mini { height: 3px; background: rgba(255, 255, 255, 0.06); border-radius: 99px; overflow: hidden; }
.progress-mini i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--teal)); border-radius: 99px; }
.directions-panel { padding: 17px 18px; }
.direction-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.direction-card { border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, 0.016); padding: 13px; cursor: pointer; transition: 0.18s; min-width: 0; }
.direction-card:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.028); }
.direction-card.is-selected { border-color: rgba(231, 185, 106, 0.44); background: rgba(231, 185, 106, 0.04); box-shadow: 0 0 0 1px rgba(231, 185, 106, 0.08) inset; }
.direction-head { display: flex; align-items: center; gap: 8px; }
.direction-head h4 { margin: 0; font-size: 11.5px; font-weight: 600; }
.direction-head span:not(.option-key) { display: block; font-size: 7.5px; color: var(--muted); margin-top: 1px; }
.direction-head em { margin-left: auto; font-style: normal; font-family: var(--serif); font-size: 10px; color: var(--accent); }
.direction-logline { margin: 10px 0 7px; font-size: 9.5px; line-height: 1.65; color: var(--text-2); }
.direction-beats { margin: 0 0 8px; padding-left: 14px; display: flex; flex-direction: column; gap: 3px; }
.direction-beats li { font-size: 8.5px; line-height: 1.55; color: var(--muted); }
.direction-beats li::marker { color: var(--accent); }
.direction-risk { font-size: 8px; line-height: 1.55; color: #bca19d; background: rgba(239, 122, 109, 0.045); border: 1px solid rgba(239, 122, 109, 0.1); border-radius: 5px; padding: 5px 7px; }
.direction-risk span { color: var(--danger); margin-right: 4px; font-size: 7px; }
.direction-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 9px; border-top: 1px solid var(--line); padding-top: 7px; }
.direction-foot > span { font-size: 7.5px; color: var(--muted-2); }
.direction-foot .link-btn { font-size: 8.5px; }
.direction-foot .link-btn .icon { width: 10px; height: 10px; }
.continue-write-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 11px; }
.continue-write-row p { margin: 0; font-size: 8.5px; line-height: 1.6; color: var(--muted-2); max-width: 480px; }
.continue-loading { display: flex; align-items: center; gap: 12px; padding: 18px; }
.continue-loading p { margin: 0; font-size: 10px; color: var(--muted); }
.typing-dots { display: flex; gap: 4px; }
.typing-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite; }
.typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.typing-dots i:nth-child(3) { animation-delay: 0.3s; }

.repair-panel { border-color: rgba(239, 122, 109, 0.3); background: linear-gradient(180deg, rgba(62, 28, 28, 0.24), rgba(24, 18, 22, 0.7)); padding: 17px 18px; }
.repair-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.repair-head h3 { margin: 4px 0 4px; font-family: var(--serif); font-size: 17px; color: #f0c0b9; }
.repair-head p { margin: 0; font-size: 9px; line-height: 1.6; color: #c39d98; }
.repair-warning { font-size: 7.5px; color: var(--danger); border: 1px solid rgba(239, 122, 109, 0.25); background: rgba(239, 122, 109, 0.06); border-radius: 99px; padding: 4px 8px; white-space: nowrap; }
.repair-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.repair-card { border: 1px solid rgba(239, 122, 109, 0.16); background: rgba(255, 255, 255, 0.018); border-radius: 9px; padding: 12px; }
.repair-card-head { display: flex; align-items: center; gap: 7px; }
.repair-card-head h4 { margin: 0; font-size: 10.5px; font-weight: 600; }
.repair-card-head span:not(.option-key) { font-size: 7.5px; color: var(--muted); }
.repair-card-head em { margin-left: auto; font-style: normal; font-family: var(--serif); font-size: 10px; color: var(--accent); }
.repair-card > p { margin: 9px 0 6px; font-size: 9px; line-height: 1.6; color: var(--text-2); }
.repair-card > ul { margin: 0 0 7px; padding-left: 13px; }
.repair-card > ul li { font-size: 8px; line-height: 1.5; color: var(--muted); }
.repair-card > ul li::marker { color: var(--danger); }
.repair-risk { font-size: 7.5px; line-height: 1.5; color: var(--muted-2); margin-bottom: 8px; }
.repair-card .btn { width: 100%; }
.repair-note { margin: 10px 0 0; font-size: 8px; color: var(--muted-2); }
.pending-continue-note { display: flex; align-items: center; gap: 6px; font-size: 9px; color: var(--muted); background: rgba(255, 255, 255, 0.025); border: 1px dashed var(--line); border-radius: 7px; padding: 9px 11px; }
.pending-continue-note .icon { width: 12px; height: 12px; color: var(--accent); }
.chapter-history { margin-top: 2px; }
.continue-chapter-list { display: flex; flex-direction: column; gap: 6px; }
.continue-chapter-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto auto; gap: 7px; align-items: center; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, 0.016); padding: 9px 11px; }
.continue-chapter-row:hover { border-color: var(--line-strong); }
.continue-chapter-row .ch-num { font-family: var(--serif); font-size: 10px; color: var(--accent); }
.continue-chapter-main { min-width: 0; }
.continue-chapter-main > div { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.continue-chapter-main b { font-size: 10.5px; font-weight: 600; }
.continue-chapter-main small { font-size: 7.5px; color: var(--muted-2); }
.continue-chapter-main p { margin: 3px 0 0; font-size: 8.5px; line-height: 1.5; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chapter-engine, .chapter-revised { font-size: 7px; color: var(--muted-2); border: 1px solid var(--line); border-radius: 3px; padding: 1px 4px; }
.chapter-revised { color: var(--teal); border-color: rgba(111, 211, 199, 0.2); }
.continuity-badge { font-size: 7.5px; border-radius: 99px; padding: 3px 7px; white-space: nowrap; border: 1px solid transparent; }
.continuity-badge.ok { color: var(--teal); background: rgba(111, 211, 199, 0.07); border-color: rgba(111, 211, 199, 0.18); }
.continuity-badge.bad { color: var(--danger); background: rgba(239, 122, 109, 0.07); border-color: rgba(239, 122, 109, 0.2); }
.continue-empty { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 34px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.continue-empty .empty-icon { width: 38px; height: 38px; margin-bottom: 10px; }
.continue-empty h3 { margin: 0 0 5px; font-family: var(--serif); font-size: 15px; }
.continue-empty p { margin: 0; font-size: 9px; line-height: 1.7; color: var(--muted); max-width: 380px; }

.chapter-block .chapter-chat-preview { margin: 0 0 10px; font-family: var(--serif); font-size: 11.5px; line-height: 1.8; color: var(--text-2); }
.chapter-chat-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.chapter-chat-meta em { font-style: normal; font-size: 8px; color: var(--muted); }
.chapter-modal-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.continuity-flag { font-size: 8px; color: #c29c96; border: 1px solid rgba(239, 122, 109, 0.14); background: rgba(239, 122, 109, 0.05); border-radius: 4px; padding: 2px 6px; }
.chapter-modal-basis { font-size: 9px; line-height: 1.6; color: var(--muted); border-left: 2px solid rgba(231, 185, 106, 0.3); padding-left: 9px; margin-bottom: 10px; }
.chapter-modal-basis span { color: var(--accent); font-size: 7.5px; letter-spacing: 1px; margin-right: 7px; }
.reuse-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }

/* ---------------- story guard ---------------- */
.guard-layout { display: grid; grid-template-columns: 336px minmax(0, 1fr); gap: 14px; align-items: start; }
.guard-side { min-width: 0; }
.guard-bible { padding: 17px 18px; position: sticky; top: 0; max-height: calc(100vh - 210px); overflow-y: auto; }
.guard-lock-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 7.5px; color: var(--teal); }
.guard-lock-tag .icon { width: 10px; height: 10px; }
.guard-stale { display: flex; align-items: flex-start; gap: 6px; margin: 10px 0; padding: 8px; border: 1px solid rgba(231, 185, 106, 0.2); border-radius: 6px; background: var(--accent-dim); color: #c7b286; font-size: 8.5px; line-height: 1.55; }
.guard-stale .icon { width: 12px; height: 12px; flex: 0 0 12px; }
.bible-core { margin: 5px 0 12px; padding-left: 9px; border-left: 2px solid var(--accent); color: var(--text-2); font-family: var(--serif); font-size: 11px; line-height: 1.75; }
.bible-fact { border-top: 1px solid var(--line); padding: 9px 0; }
.bible-fact > span { display: block; color: var(--accent); font-size: 7.5px; letter-spacing: 1.1px; margin-bottom: 3px; }
.bible-fact b { display: block; font-size: 10px; font-weight: 500; margin-bottom: 2px; }
.bible-fact p { margin: 2px 0 0; font-size: 8.5px; line-height: 1.6; color: var(--muted); }
.bible-cast { border-top: 1px solid var(--line); padding-top: 9px; }
.bible-cast > div { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.bible-cast b { font-size: 9px; font-weight: 500; }
.bible-cast em { font-style: normal; font-size: 7px; color: var(--muted-2); }
.bible-cast p { flex: 1 1 100%; margin: 0 0 0 0; font-size: 8px; line-height: 1.5; color: var(--muted); }
.bible-details { border-top: 1px solid var(--line); padding: 8px 0; }
.bible-details summary { cursor: pointer; list-style: none; font-size: 9px; color: var(--text-2); }
.bible-details summary::-webkit-details-marker { display: none; }
.bible-details summary::after { content: "+"; float: right; color: var(--muted); }
.bible-details[open] summary::after { content: "−"; }
.bible-details summary span { margin-left: 6px; color: var(--muted-2); font-size: 7px; }
.bible-details p { margin: 5px 0 0; font-size: 8px; line-height: 1.6; color: var(--muted); }
.bible-details p b { color: var(--text-2); font-weight: 500; }
.bible-rules { border-top: 1px solid var(--line); padding-top: 9px; }
.bible-rules p { margin: 4px 0; font-size: 8px; line-height: 1.55; color: var(--muted); }
.bible-rules p::before { content: "· "; color: var(--accent); }
.bible-foot { margin: 10px 0 0; color: var(--muted-2); font-size: 7.5px; }
.guard-empty-note { padding: 22px 4px 8px; text-align: center; }
.guard-empty-note .icon { width: 25px; height: 25px; color: var(--accent); margin-bottom: 8px; }
.guard-empty-note h3 { margin: 0 0 5px; font-family: var(--serif); font-size: 15px; font-weight: 500; }
.guard-empty-note p { margin: 0 0 12px; color: var(--muted); font-size: 8.5px; line-height: 1.65; }
.guard-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.guard-score { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px 20px; }
.guard-ring { width: 92px; height: 92px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--score) * 1%), rgba(255,255,255,0.06) 0); display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; flex: 0 0 92px; }
.guard-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #151a21; }
.guard-ring span, .guard-ring small { position: relative; z-index: 1; }
.guard-ring span { font-family: var(--serif); font-size: 25px; line-height: 1; }
.guard-ring small { margin-top: 3px; font-size: 7px; color: var(--muted-2); }
.guard-score.pass .guard-ring { background: conic-gradient(var(--teal) calc(var(--score) * 1%), rgba(255,255,255,0.06) 0); }
.guard-score.warn .guard-ring { background: conic-gradient(var(--accent) calc(var(--score) * 1%), rgba(255,255,255,0.06) 0); }
.guard-score.danger .guard-ring { background: conic-gradient(var(--danger) calc(var(--score) * 1%), rgba(255,255,255,0.06) 0); }
.guard-score-copy h3 { margin: 4px 0 5px; font-family: var(--serif); font-size: 18px; font-weight: 500; }
.guard-score-copy p { margin: 0; font-size: 9px; line-height: 1.6; color: var(--muted); }
.guard-metrics { display: grid; grid-template-columns: repeat(4, auto); gap: 14px; }
.guard-metrics > div { display: flex; flex-direction: column; gap: 2px; min-width: 46px; }
.guard-metrics b { font-family: var(--serif); font-size: 17px; font-weight: 500; }
.guard-metrics small { font-size: 7px; color: var(--muted-2); }
.guard-loading { display: flex; align-items: center; gap: 10px; padding: 13px 16px; }
.guard-loading p { margin: 0; color: var(--muted); font-size: 9px; }
.guard-issues { padding: 16px 18px; }
.guard-issue-list { display: flex; flex-direction: column; gap: 7px; margin-top: 9px; }
.guard-issue { border: 1px solid var(--line); border-radius: 7px; padding: 9px 11px; background: rgba(255,255,255,0.015); }
.guard-issue.danger { border-color: rgba(239, 122, 109, 0.22); background: rgba(239, 122, 109, 0.035); }
.guard-issue.warn { border-color: rgba(231, 185, 106, 0.18); background: rgba(231, 185, 106, 0.025); }
.guard-issue b { font-size: 9.5px; font-weight: 500; }
.guard-issue.danger b { color: #e1a9a2; }
.guard-issue p { margin: 3px 0; font-size: 8.5px; line-height: 1.55; color: var(--muted); }
.guard-issue em { display: block; font-style: normal; font-size: 8px; line-height: 1.5; color: var(--text-2); }
.guard-pass { display: flex; align-items: center; gap: 10px; margin-top: 9px; padding: 12px; border: 1px solid rgba(111, 211, 199, 0.15); border-radius: 7px; background: rgba(111, 211, 199, 0.035); }
.guard-pass > span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: rgba(111, 211, 199, 0.1); color: var(--teal); }
.guard-pass .icon { width: 15px; height: 15px; }
.guard-pass b { font-size: 9.5px; font-weight: 500; }
.guard-pass p { margin: 2px 0 0; font-size: 8px; color: var(--muted); }
.guard-pace { padding: 16px 18px; }
.pace-chart { height: 150px; display: flex; align-items: flex-end; gap: 7px; margin-top: 10px; padding: 0 2px 0; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; }
.pace-bar { flex: 1 0 24px; height: 100%; position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 24px; }
.pace-bar i { width: 100%; max-width: 30px; min-height: 8px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, rgba(231,185,106,.75), rgba(231,185,106,.18)); }
.pace-bar.fast i { background: linear-gradient(180deg, rgba(111,211,199,.78), rgba(111,211,199,.16)); }
.pace-bar.slow i { background: linear-gradient(180deg, rgba(239,122,109,.65), rgba(239,122,109,.12)); }
.pace-tension { position: absolute; top: 0; font-size: 7px; color: var(--muted-2); }
.pace-bar em { margin-top: 4px; font-style: normal; font-size: 7px; color: var(--muted-2); }
.pace-bar small { position: absolute; top: 10px; color: var(--accent); font-size: 7px; }
.guard-chapters { padding: 16px 18px; }
/* continuation masthead */
.continue-head { position: relative; align-items: flex-end; flex-wrap: wrap; gap: 12px 26px; margin-bottom: 18px; padding: 4px 0 15px; border-bottom: 1px solid var(--line); }
.continue-head::before { content: ""; position: absolute; left: -20px; top: 8px; width: 2px; height: 54px; background: linear-gradient(var(--accent), transparent); opacity: .8; }
.continue-head-copy { min-width: 0; }
.continue-head .page-kicker { color: var(--accent); font-size: 11px; letter-spacing: 3.8px; }
.continue-head h1 { margin: 8px 0 10px; font-family: var(--serif); font-size: 52px; line-height: 1.06; font-weight: 500; letter-spacing: 1.4px; color: #f2eadc; }
.continue-head p { margin: 0; max-width: 720px; color: #b4a998; font-size: 13px; line-height: 1.75; }
.continue-head-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.continue-head-meta > span { display: inline-flex; align-items: baseline; gap: 5px; min-height: 28px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 10px; background: rgba(255,255,255,.018); }
.continue-head-meta b { color: var(--text); font-family: var(--serif); font-size: 16px; font-weight: 500; }
.continue-head-actions .btn { font-size: 10px; }
.continue-head-meta .continue-meta-ok { color: var(--teal); border-color: rgba(111,211,199,.2); background: rgba(111,211,199,.05); }
.continue-head-meta .continue-meta-wait { color: var(--accent); border-color: rgba(231,185,106,.22); background: var(--accent-dim); }
.continue-head-actions { flex: 1 1 100%; max-width: 100%; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 900px) { .continue-head { align-items: flex-start; } .continue-head h1 { font-size: 36px; } .continue-head-actions { max-width: none; } }
/* continuation outline */
.continue-outline-empty { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 18px; }
.continue-outline-empty h3 { margin: 4px 0; font-family: var(--serif); font-size: 16px; font-weight: 500; }
.continue-outline-empty p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.65; }
.continue-outline { padding: 16px 18px; }
.continue-outline .panel-head { align-items: flex-start; }
.continue-outline .panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.continue-outline-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.continue-outline-list { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.continue-outline-row { display: grid; grid-template-columns: 26px minmax(0,1fr) auto; gap: 8px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.014); }
.continue-outline-row > span { color: var(--muted-2); font-size: 8px; padding-top: 3px; }
.continue-outline-row b { color: var(--text-2); font-family: var(--serif); font-size: 11px; font-weight: 500; }
.continue-outline-row p { margin: 4px 0 0; color: var(--muted); font-size: 8.5px; line-height: 1.65; }
.continue-outline-row small { display: block; margin-top: 4px; color: var(--muted-2); font-size: 8px; }
.continue-outline-row > em { color: var(--muted-2); font-style: normal; font-size: 7.5px; white-space: nowrap; padding-top: 2px; }
.continue-outline-row.is-next { border-color: rgba(231,185,106,.3); background: var(--accent-dim); }
.continue-outline-foot { margin: 10px 0 0; color: var(--muted-2); font-size: 8px; line-height: 1.6; }
.outline-edit-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.outline-edit-row { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 7px; }
.outline-edit-row > span { color: var(--accent); font-size: 9px; padding-top: 7px; }
.outline-edit-row > div { display: flex; flex-direction: column; gap: 5px; }
.outline-edit-row input, .outline-edit-row textarea { width: 100%; box-sizing: border-box; background: #0e1219; border: 1px solid var(--line); border-radius: 5px; color: var(--text-2); padding: 6px 8px; font: inherit; font-size: 10px; }
.outline-edit-row textarea { resize: vertical; line-height: 1.65; }
@media (max-width: 760px) { .continue-outline-empty { flex-direction: column; align-items: flex-start; } }
/* bookshelf */
.shelf-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 4px 0 14px; }
.shelf-stats > div { display: flex; align-items: baseline; gap: 5px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.018); }
.shelf-stats span { margin-right: auto; color: var(--muted-2); font-size: 8px; }
.shelf-stats b { color: var(--text); font-family: var(--serif); font-size: 20px; font-weight: 500; }
.shelf-stats em { color: var(--muted-2); font-style: normal; font-size: 8px; }
.shelf-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.shelf-toolbar > span { color: var(--muted-2); font-size: 8px; }
.shelf-grid { display: grid !important; width: 100%; grid-template-columns: minmax(0, 1fr) !important; gap: 12px; align-items: stretch; }
.shelf-card { display: grid; grid-template-columns: 96px minmax(0,1fr); gap: 13px; width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); cursor: pointer; transition: border-color .18s, transform .18s; }
.shelf-card-body { min-width: 0; overflow: hidden; }
.shelf-card:hover { border-color: rgba(231,185,106,.32); transform: translateY(-1px); }
.shelf-card.is-current { border-color: rgba(231,185,106,.3); background: linear-gradient(135deg, rgba(231,185,106,.045), transparent 60%), var(--panel); }
.shelf-cover { min-height: 142px; border-radius: 7px; padding: 10px 9px; display: flex; flex-direction: column; justify-content: flex-end; gap: 5px; background: linear-gradient(150deg, hsl(var(--cover-hue) 33% 29%), hsl(calc(var(--cover-hue) + 28) 38% 14%)); border: 1px solid rgba(255,255,255,.08); box-shadow: inset 8px 0 18px rgba(0,0,0,.18); overflow: hidden; }
.shelf-cover > span { color: #f1eadc; font-family: var(--serif); font-size: 22px; font-weight: 500; letter-spacing: 1px; }
.shelf-cover > em { color: rgba(255,255,255,.72); font-style: normal; font-size: 8px; }
.shelf-cover > small { color: rgba(255,255,255,.48); font-size: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shelf-card-body { min-width: 0; display: flex; flex-direction: column; }
.shelf-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 7px; }
.shelf-card-head h3 { margin: 0; font-family: var(--serif); font-size: 15px; font-weight: 500; line-height: 1.4; }
.shelf-current { flex: none; color: var(--teal); border: 1px solid rgba(111,211,199,.24); border-radius: 4px; padding: 2px 5px; font-size: 7px; }
.shelf-card-body > p { margin: 6px 0 10px; color: var(--muted); font-size: 9px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shelf-progress { margin-top: auto; }
.shelf-progress > div { display: flex; justify-content: space-between; color: var(--muted-2); font-size: 8px; }
.shelf-progress > div b { color: var(--accent); font-weight: 500; }
.shelf-progress > i { display: block; height: 3px; margin-top: 5px; background: rgba(255,255,255,.07); border-radius: 99px; overflow: hidden; }
.shelf-progress > i em { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.shelf-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 7px 0 9px; color: var(--muted-2); font-size: 7.5px; }
.shelf-actions { display: flex; gap: 5px; flex-wrap: wrap; }
@media (max-width: 760px) { .shelf-stats { grid-template-columns: repeat(2, 1fr); } .shelf-card { grid-template-columns: 76px minmax(0,1fr); } .shelf-cover { min-height: 122px; } }
/* manuscript studio */
.manuscript-page { max-width: 1320px; margin: 0 auto; }
.ms-workspace-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 2px 0 14px; }
.ms-chapter-picker { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ms-chapter-picker select { background: #12161e; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--text-2); font-size: 10px; padding: 7px 10px; max-width: 300px; }
.ms-chapter-picker > span { color: var(--muted-2); font-size: 8.5px; white-space: nowrap; }
.ms-top-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ms-tabs { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.ms-tab { border: 0; background: none; color: var(--muted); padding: 8px 10px 9px; font-size: 9px; border-bottom: 1px solid transparent; cursor: pointer; }
.ms-tab em { color: var(--muted-2); font-style: normal; margin-left: 3px; }
.ms-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.ms-inspector { padding: 15px 16px; }
.ms-inspector-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-2); font-family: var(--serif); font-size: 13px; }
.ms-inspector-head small { color: var(--muted-2); font-family: var(--sans); font-size: 8px; }
.ms-doc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.ms-doc-head h2 { margin: 5px 0 0; font-family: var(--serif); font-size: 22px; font-weight: 500; }
.ms-doc-hint { color: var(--muted-2); font-size: 8px; white-space: nowrap; padding-top: 5px; }
.ms-tip { margin: 11px 0 0; color: var(--muted-2); font-size: 8.5px; line-height: 1.65; }
.ms-active-issue { margin: 10px 0 7px; padding: 9px 10px; border: 1px solid rgba(231,185,106,.28); border-radius: 6px; background: var(--accent-dim); }
.ms-active-issue span { display: block; color: var(--accent); font-size: 7.5px; letter-spacing: 1px; }
.ms-active-issue b { display: block; margin-top: 3px; color: var(--text); font-family: var(--serif); font-size: 12px; font-weight: 500; }
.ms-active-issue p { margin: 4px 0 0; color: var(--muted); font-size: 8px; line-height: 1.55; }
.ms-manual-issue { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.ms-manual-issue summary { color: var(--muted-2); font-size: 8px; cursor: pointer; }
.ms-manual-issue textarea { margin-top: 7px; min-height: 60px; }
.ms-manual-issue .btn { margin-top: 6px; }
.ms-issue-tools { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
.ms-tab-empty { padding: 16px 0 8px; color: var(--muted-2); font-size: 9px; line-height: 1.7; }
.ms-tab-empty p { margin: 0 0 10px; }
.manuscript-layout { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 18px; align-items: start; }
.manuscript-layout.focus-layout { grid-template-columns: minmax(0, 1fr); }
.ms-paper { padding: 20px 24px 28px; min-width: 0; }
.ms-paper-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); padding-bottom: 13px; }
.ms-paper-head h2 { margin: 5px 0 0; font-family: var(--serif); font-size: 23px; font-weight: 500; }
.ms-paper-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.ms-chapter-nav { display: flex; align-items: center; gap: 12px; padding: 11px 0 4px; }
.ms-chapter-nav select { background: #12161e; border: 1px solid var(--line); border-radius: 6px; color: var(--text-2); font-size: 9px; padding: 6px 8px; max-width: 230px; }
.ms-chapter-nav span { color: var(--muted-2); font-size: 8.5px; }
.ms-body { max-width: 760px; margin: 0 auto; padding: 20px 0 10px; }
.ms-para { margin: 0 0 2px; padding: 8px 11px; border: 1px solid transparent; border-radius: 6px; color: var(--text); font-family: var(--serif); font-size: 15px; line-height: 2.03; white-space: pre-wrap; cursor: text; transition: background .15s, border-color .15s; }
.ms-para:hover { background: rgba(255,255,255,.025); }
.ms-para.is-selected { background: rgba(231,185,106,.065); border-color: rgba(231,185,106,.24); }
.ms-para.has-issue { border-left: 2px solid rgba(231,185,106,.5); }
.ms-side { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 10px; }
.ms-panel { padding: 14px 15px; }
.ms-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ms-panel-head b { font-family: var(--serif); font-size: 14px; font-weight: 500; }
.ms-panel-head em { color: var(--accent); font-style: normal; font-size: 9px; }
.ms-selected-label { margin: 10px 0 7px; color: var(--accent); font-size: 8.5px; }
.ms-selected-text { max-height: 112px; overflow: auto; margin-bottom: 10px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 6px; background: rgba(0,0,0,.16); color: var(--muted); font-family: var(--serif); font-size: 11px; line-height: 1.8; }
.ms-panel textarea { width: 100%; box-sizing: border-box; min-height: 86px; resize: vertical; background: #0e1219; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--text-2); padding: 9px 10px; font-family: inherit; font-size: 10px; line-height: 1.7; outline: none; }
.ms-panel textarea:focus { border-color: rgba(231,185,106,.35); }
.ms-actions { display: flex; gap: 7px; align-items: center; margin-top: 9px; flex-wrap: wrap; }
.ms-issue-list { display: flex; flex-direction: column; gap: 6px; margin-top: 9px; max-height: 230px; overflow: auto; }
.ms-issue { display: block; width: 100%; height: auto; min-height: 54px; flex: 0 0 auto; text-align: left; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.018); padding: 8px 9px; color: var(--text-2); cursor: pointer; line-height: 1.5; white-space: normal; }
.ms-issue b { display: block; color: var(--accent); font-family: var(--serif); font-size: 11px; font-weight: 500; line-height: 1.4; }
.ms-issue span { display: block; margin-top: 4px; color: var(--muted); font-size: 8.5px; line-height: 1.6; white-space: normal; }
.ms-issue:hover { border-color: rgba(231,185,106,.3); }
.ms-empty { margin: 9px 0 0; color: var(--muted-2); font-size: 9px; line-height: 1.7; }
.ms-version-list { display: flex; flex-direction: column; gap: 5px; margin-top: 9px; }
.ms-version-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ms-version-row span { color: var(--muted); font-size: 8px; }
.ms-version-row small { color: var(--muted-2); font-size: 8px; grid-column: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-version-row .link-btn { grid-column: 2; grid-row: 1 / span 2; }
.ms-version-preview { margin-top: 9px; padding: 9px; border: 1px solid var(--line); border-radius: 6px; background: rgba(0,0,0,.15); }
.ms-version-preview p { max-height: 180px; overflow: auto; margin: 0 0 8px; color: var(--muted); font-family: var(--serif); font-size: 10px; line-height: 1.8; white-space: pre-wrap; }
.ms-version-preview > div { display: flex; gap: 7px; }
.ms-inline-issue { background: rgba(231,185,106,.16); color: #e7c78d; border-bottom: 1px dashed rgba(231,185,106,.7); padding: 0 1px; cursor: help; }
.ms-rewrite-preview { padding: 10px 11px; border: 1px solid var(--line); border-radius: 7px; background: rgba(0,0,0,.16); margin-bottom: 10px; }
.ms-rewrite-preview span { display: block; margin-bottom: 5px; color: var(--muted-2); font-size: 8px; letter-spacing: .5px; }
.ms-rewrite-preview p { max-height: 130px; overflow: auto; margin: 0; color: var(--text-2); font-family: var(--serif); font-size: 12px; line-height: 1.85; white-space: pre-wrap; }
.ms-rewrite-quote, .ms-rewrite-issue { margin: 0 0 10px; padding: 8px 10px; border-left: 2px solid rgba(231,185,106,.65); background: rgba(231,185,106,.055); color: var(--text-2); font-size: 10px; line-height: 1.7; }
.ms-rewrite-quote span, .ms-rewrite-issue span { display: block; margin-bottom: 3px; color: var(--accent); font-size: 8px; letter-spacing: .5px; }
.ms-rewrite-prompt { width: 100%; min-height: 130px; resize: vertical; margin-top: 7px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: rgba(0,0,0,.18); font: inherit; font-size: 12px; line-height: 1.8; }
.ms-rewrite-prompt:focus { outline: none; border-color: rgba(231,185,106,.55); }
.ms-rewrite-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.ms-full-editor { width: 100%; min-height: min(58vh, 560px); resize: vertical; box-sizing: border-box; padding: 14px 15px; border: 1px solid var(--line); border-radius: 8px; background: rgba(0,0,0,.16); color: var(--text); font-family: var(--serif); font-size: 14px; line-height: 1.95; }
.ms-full-editor:focus { outline: none; border-color: rgba(231,185,106,.55); }
.ms-chat-scroll { max-height: min(48vh, 460px); }
.ms-chat-log { margin-top: 11px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(0,0,0,.15); max-height: 230px; overflow-y: auto; }
.ms-chat-empty { padding: 12px 10px; color: var(--muted-2); font-size: 10px; line-height: 1.8; }
.ms-chat-msg { display: flex; gap: 7px; align-items: flex-start; margin: 0 0 8px; }
.ms-chat-msg > span { flex: 0 0 auto; color: var(--accent); font-size: 8px; padding-top: 3px; }
.ms-chat-msg p { margin: 0; color: var(--text-2); font-size: 10.5px; line-height: 1.7; white-space: pre-wrap; }
.ms-chat-msg.is-user { flex-direction: row-reverse; }
.ms-chat-msg.is-user > span { color: var(--muted-2); }
.ms-chat-msg.is-user p { color: var(--text); background: rgba(231,185,106,.08); border: 1px solid rgba(231,185,106,.16); border-radius: 8px; padding: 6px 8px; }
.ms-chat-proposal { margin-top: 11px; border: 1px solid rgba(231,185,106,.28); border-radius: 8px; padding: 9px 10px; background: rgba(231,185,106,.04); }
.ms-chat-proposal-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ms-chat-proposal-head b { color: var(--accent); font-size: 10px; font-weight: 500; }
.ms-chat-proposal-head span { color: var(--muted-2); font-size: 8px; }
.ms-chat-proposal .ms-diff-row { padding: 4px 0; }
.ms-chat-proposal-actions { display: flex; gap: 6px; margin-top: 6px; }
.ms-chat-compose { flex: 0 0 auto; display: flex; gap: 8px; align-items: flex-end; padding: 11px 24px; border-top: 1px solid var(--line); background: rgba(0,0,0,.12); }
.ms-chat-compose textarea { flex: 1; min-height: 42px; max-height: 110px; resize: vertical; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; background: rgba(0,0,0,.18); color: var(--text); font: inherit; font-size: 11px; line-height: 1.6; }
.ms-chat-compose textarea:focus { outline: none; border-color: rgba(231,185,106,.55); }
.ms-chat-hint { margin-right: auto; color: var(--muted-2); font-size: 8px; line-height: 1.5; }
.ms-issue-skill { display: inline-block; margin-left: 5px; padding: 1px 5px; border-radius: 999px; background: rgba(231,185,106,.09); color: var(--accent); font-style: normal; font-size: 7px; font-weight: 400; vertical-align: 1px; }
.ms-skill-note { margin: 8px 0 0; color: var(--muted-2); font-size: 8px; line-height: 1.6; }
.ms-skill-check { margin-top: 11px; padding-top: 9px; border-top: 1px solid var(--line); }
.ms-skill-check > span { color: var(--muted-2); font-size: 8px; letter-spacing: .5px; }
.ms-skill-check > div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.ms-skill-check em { padding: 2px 6px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-style: normal; font-size: 8px; }
.ms-skill-check em.has-issue { border-color: rgba(231,185,106,.4); color: var(--accent); background: rgba(231,185,106,.06); }
.ms-skill-check p { margin: 6px 0 0; color: var(--muted-2); font-size: 9px; line-height: 1.6; }
.ms-selection-quote { margin: 8px 0; padding: 8px 9px; border-left: 2px solid var(--accent); background: rgba(231,185,106,.06); color: var(--text-2); font-size: 9px; line-height: 1.6; }
.ms-selection-quote span { display: block; margin-bottom: 3px; color: var(--accent); font-size: 8px; letter-spacing: .5px; }
.ms-selection-quote .link-btn { display: block; margin-top: 5px; font-size: 8px; }
.ms-diff { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 11px; }
.ms-diff-head { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.ms-diff-head b { color: var(--accent); font-family: var(--serif); font-size: 12px; font-weight: 500; }
.ms-diff-head span { color: var(--muted-2); font-size: 8px; }
.ms-diff-row { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 7px; padding: 6px 0; }
.ms-diff-row > span { color: var(--muted-2); font-size: 8px; padding-top: 3px; }
.ms-diff-row p { margin: 0; color: var(--text-2); font-family: var(--serif); font-size: 10.5px; line-height: 1.85; }
.ms-diff-row mark.old { background: rgba(255,120,120,.14); color: #e3a5a5; text-decoration: line-through; }
.ms-diff-row mark.new { background: rgba(111,211,199,.14); color: #9bd8cf; }
.ms-diff-actions { display: flex; gap: 7px; margin-top: 8px; }
.manuscript-layout.focus-layout .ms-body { max-width: 860px; }
@media (max-width: 980px) {
  .manuscript-layout { grid-template-columns: minmax(0,1fr); }
  .ms-side { position: static; }
  .ms-paper { padding: 15px 14px 22px; }
  .ms-para { font-size: 14px; line-height: 1.95; }
}
.archive-skills { margin-top: 14px; padding: 16px 18px; }
.archive-skill-list { display: flex; flex-direction: column; gap: 7px; margin-top: 9px; }
.archive-skill-item { border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.018); overflow: hidden; }
.archive-skill-item summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 11px; cursor: pointer; list-style: none; }
.archive-skill-item summary::-webkit-details-marker { display: none; }
.archive-skill-item summary > div { min-width: 0; }
.archive-skill-item summary b { display: block; font-family: var(--serif); font-size: 11px; font-weight: 500; }
.archive-skill-item summary p { margin: 4px 0 0; color: var(--muted-2); font-size: 8px; line-height: 1.5; }
.archive-skill-item summary > span { color: var(--accent); font-size: 8px; white-space: nowrap; }
.archive-skill-item .result-text { max-height: 420px; overflow: auto; padding: 11px 12px 14px; border-top: 1px solid var(--line); }
.guard-chapter-list { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.guard-chapter { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.guard-chapter:last-child { border-bottom: 0; }
.guard-chapter .ch-num { font-family: var(--serif); font-size: 9px; color: var(--muted-2); }
.guard-chapter-main { min-width: 0; }
.guard-chapter-main > div { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.guard-chapter-main b { font-size: 10px; font-weight: 500; }
.guard-chapter-main em { font-style: normal; color: var(--teal); font-size: 7.5px; }
.guard-chapter-main p { margin: 2px 0; color: var(--muted); font-size: 8px; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guard-chapter-main small { display: block; color: var(--muted-2); font-size: 7.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guard-chapter.written .ch-num { color: var(--accent); }
.guard-chapter-actions { display: flex; align-items: center; gap: 4px; }

/* compact guard */
.guard-head { align-items: center; padding-bottom: 14px; }
.guard-head p { margin: 0; font-size: 10px; color: var(--muted); }
.guard-overview { display: grid; grid-template-columns: 1.12fr 1fr; gap: 12px; align-items: stretch; }
.guard-overview .guard-score { grid-template-columns: 74px minmax(0, 1fr); gap: 12px; padding: 15px 16px; align-content: center; }
.guard-overview .guard-ring { width: 72px; height: 72px; flex: 0 0 72px; }
.guard-overview .guard-ring span { font-size: 22px; }
.guard-overview .guard-score-copy h3 { font-size: 16px; }
.guard-overview .guard-score-copy p { font-size: 8.5px; }
.guard-overview .guard-metrics { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 3px; padding-top: 9px; border-top: 1px solid var(--line); }
.guard-overview .guard-metrics > div { min-width: 0; }
.guard-overview .guard-metrics b { font-size: 14px; }
.guard-overview .guard-metrics small { font-size: 7px; }
.guard-overview .guard-issues { padding: 14px 15px; }
.guard-overview .panel-head { margin-bottom: 5px; }
.guard-overview .panel-head h3 { font-size: 13px; }
.guard-overview .guard-pass { margin-top: 2px; padding: 8px; }
.guard-alert { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; margin-top: 5px; background: rgba(255,255,255,.015); }
.guard-alert.danger { border-color: rgba(239,122,109,.2); background: rgba(239,122,109,.03); }
.guard-alert.warn { border-color: rgba(231,185,106,.16); }
.guard-alert summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.guard-alert summary::-webkit-details-marker { display: none; }
.guard-alert summary b { font-size: 9px; font-weight: 500; flex: 1; min-width: 0; }
.guard-alert summary em { font-style: normal; color: var(--muted-2); font-size: 7px; }
.guard-alert .alert-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: 0 0 5px; }
.guard-alert.danger .alert-dot { background: var(--danger); }
.guard-alert p { margin: 6px 0 0; color: var(--muted); font-size: 8px; line-height: 1.55; }
.guard-alert .guard-fix { color: var(--text-2); }
.guard-pass.compact { padding: 8px 9px; gap: 8px; }
.guard-pass.compact b { font-size: 9px; }
.guard-pass.compact p { font-size: 7.5px; }
.bible-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 4px 0 9px; }
.bible-quick > div { border: 1px solid var(--line); border-radius: 6px; padding: 6px 7px; min-width: 0; }
.bible-quick span { display: block; color: var(--muted-2); font-size: 7px; margin-bottom: 2px; }
.bible-quick b { display: block; font-size: 9px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bible-goal { margin: 0 0 8px; color: var(--muted); font-size: 8px; line-height: 1.55; }
.bible-goal span { color: var(--accent); }
.bible-expand { border-top: 1px solid var(--line); padding-top: 7px; }
.bible-expand summary { list-style: none; cursor: pointer; color: var(--text-2); font-size: 9px; }
.bible-expand summary::-webkit-details-marker { display: none; }
.bible-expand summary::after { content: "+"; float: right; color: var(--muted-2); }
.bible-expand[open] summary::after { content: "−"; }
.bible-expand p { margin: 6px 0 0; color: var(--muted); font-size: 8px; line-height: 1.6; }
.bible-expand p b { color: var(--text-2); font-weight: 500; }
.vol-pace-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 7px; margin-top: 5px; }
.vol-pace { border: 1px solid var(--line); border-radius: 7px; padding: 8px 9px; background: rgba(255,255,255,.015); }
.vol-pace-top { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.vol-pace-top b { font-size: 9px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vol-pace-top span { color: var(--muted-2); font-size: 7px; white-space: nowrap; }
.vol-meter { height: 4px; border-radius: 99px; background: rgba(255,255,255,.06); margin: 7px 0 5px; overflow: hidden; }
.vol-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--teal)); }
.vol-pace small { color: var(--muted); font-size: 7.5px; }
.manuscript-progress { height: 4px; border-radius: 99px; background: rgba(255,255,255,.06); margin: 2px 0 9px; overflow: hidden; }
.manuscript-progress i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.written-list { display: flex; flex-direction: column; gap: 2px; }
.written-row { display: grid; grid-template-columns: 25px minmax(0,1fr) auto 44px auto; gap: 7px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); }
.written-row:last-child { border-bottom: 0; }
.written-row .row-num { color: var(--muted-2); font-family: var(--serif); font-size: 8px; }
.written-row > b { min-width: 0; font-size: 9.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.written-row > small { color: var(--muted-2); font-size: 7.5px; text-align: right; }
.row-actions { display: flex; align-items: center; gap: 5px; justify-content: flex-end; }
.row-actions .link-btn { font-size: 8px; white-space: nowrap; }
.next-chapter-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 8px; padding: 8px 9px; border: 1px solid rgba(231,185,106,.18); border-radius: 7px; background: var(--accent-dim); }
.next-chapter-row > span { color: var(--accent); font-size: 7px; letter-spacing: 1px; }
.next-chapter-row b { font-size: 9.5px; font-weight: 500; }
.next-chapter-row em { color: var(--muted); font-style: normal; font-size: 7.5px; }
.next-chapter-row .btn { margin-left: auto; }
.all-written { margin: 10px 0 0; color: var(--muted); font-size: 8.5px; line-height: 1.6; }
.chapter-plan-all { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 7px; }
.chapter-plan-all summary { list-style: none; cursor: pointer; color: var(--muted); font-size: 8.5px; display: flex; justify-content: space-between; }
.chapter-plan-all summary::-webkit-details-marker { display: none; }
.chapter-plan-all summary span { color: var(--muted-2); font-size: 7.5px; }
.plan-compact-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; margin-top: 7px; }
.plan-compact-list > div { display: grid; grid-template-columns: 20px minmax(0,1fr) auto 24px; gap: 5px; align-items: center; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.035); }
.plan-compact-list span { color: var(--muted-2); font-family: var(--serif); font-size: 7px; }
.plan-compact-list b { min-width: 0; font-size: 8px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-compact-list em { color: var(--muted-2); font-style: normal; font-size: 7px; white-space: nowrap; }
.plan-compact-list small { color: var(--muted-2); font-size: 6.5px; text-align: right; }
.plan-compact-list > div.done b { color: var(--text-2); }
.plan-compact-list > div.done small { color: var(--teal); }

/* readable sizing for the compact guard */
.guard-page .guard-bible .panel-head h3 { font-size: 17px; }
.guard-page .bible-core { font-size: 12.5px; line-height: 1.72; margin-bottom: 12px; }
.guard-page .bible-quick > div { padding: 8px 9px; }
.guard-page .bible-quick span { font-size: 8.5px; margin-bottom: 3px; }
.guard-page .bible-quick b { font-size: 11px; }
.guard-page .bible-goal { font-size: 9.5px; line-height: 1.65; margin-bottom: 10px; }
.guard-page .bible-expand summary { font-size: 10.5px; }
.guard-page .bible-expand p { font-size: 9.5px; line-height: 1.65; }
.guard-page .guard-lock-tag { font-size: 8.5px; }
.guard-page .guard-score-copy h3 { font-size: 18px; }
.guard-page .guard-score-copy p { font-size: 9.5px; }
.guard-page .guard-overview .guard-ring span { font-size: 26px; }
.guard-page .guard-overview .guard-ring small { font-size: 8px; }
.guard-page .guard-overview .guard-metrics b { font-size: 16px; }
.guard-page .guard-overview .guard-metrics small { font-size: 8px; }
.guard-page .guard-overview .panel-head h3 { font-size: 15px; }
.guard-page .guard-overview .panel-note { font-size: 8.5px; }
.guard-page .guard-alert { padding: 8px 9px; margin-top: 7px; }
.guard-page .guard-alert summary b { font-size: 11px; }
.guard-page .guard-alert summary em { font-size: 8px; }
.guard-page .guard-alert p { font-size: 9.5px; line-height: 1.6; }
.guard-page .guard-pass.compact b { font-size: 11px; }
.guard-page .guard-pass.compact p { font-size: 9px; }
.guard-page .guard-pace .panel-head h3,
.guard-page .guard-chapters .panel-head h3 { font-size: 17px; }
.guard-page .guard-pace .panel-note,
.guard-page .guard-chapters .panel-note { font-size: 9px; }
.guard-page .vol-pace { padding: 10px 11px; }
.guard-page .vol-pace-top b { font-size: 11px; }
.guard-page .vol-pace-top span { font-size: 8.5px; }
.guard-page .vol-pace small { font-size: 9px; }
.guard-page .vol-meter { height: 5px; margin: 9px 0 7px; }
.guard-page .written-row { padding: 7px 0; grid-template-columns: 26px minmax(0,1fr) auto 48px auto; }
.guard-page .written-row .row-num { font-size: 9.5px; }
.guard-page .written-row > b { font-size: 11.5px; }
.guard-page .written-row > small { font-size: 9px; }
.guard-page .row-actions .link-btn { font-size: 9.5px; }
.guard-page .next-chapter-row { padding: 10px 11px; gap: 9px; }
.guard-page .next-chapter-row > span { font-size: 8.5px; }
.guard-page .next-chapter-row b { font-size: 11.5px; }
.guard-page .next-chapter-row em { font-size: 9px; }
.guard-page .chapter-plan-all { padding-top: 9px; margin-top: 11px; }
.guard-page .chapter-plan-all summary { font-size: 14pt; }
.guard-page .chapter-plan-all summary span { font-size: 14pt; }
/* 章节计划区：WPS 小五（9pt）；其余界面：WPS 四号（14pt）。 */
.guard-page .plan-compact-list { grid-template-columns: 1fr 1fr; gap: 2px 16px; margin-top: 9px; }
.guard-page .plan-compact-list > div { grid-template-columns: 22px minmax(0,1fr) auto 26px; padding: 5px 0; gap: 6px; font-size: 9pt; line-height: 1.45; }
.guard-page .plan-compact-list span { font-size: 9pt; padding-top: 1px; }
.guard-page .plan-compact-list b { font-size: 9pt; line-height: 1.4; }
.guard-page .plan-compact-list em { font-size: 9pt; line-height: 1.4; }
.guard-page .plan-compact-list small { font-size: 9pt; line-height: 1.4; }
.guard-page .continuity-badge { font-size: 7.5px; }
.guard-page .page-head-actions .btn-sm { font-size: 10.5px; height: 31px; }
.story-stage-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin: -4px 0 16px; }
.story-stage { position: relative; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.018); padding: 8px 10px; display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.story-stage > span { color: var(--muted-2); font-family: var(--mono); font-size: 8px; }
.story-stage b { color: var(--muted); font-family: var(--serif); font-size: 12px; font-weight: 500; }
.story-stage small { margin-left: auto; color: var(--muted-2); font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.story-stage.done { border-color: rgba(111, 211, 199, .18); }
.story-stage.done b { color: var(--teal); }
.story-stage.current { border-color: rgba(231, 185, 106, .48); background: rgba(231, 185, 106, .06); }
.story-stage.current b { color: var(--accent); }
@media (max-width: 760px) { .story-stage-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.guard-page .page-head-actions .btn-xs { font-size: 9.5px; }
.guard-page .guard-stale { font-size: 9px; }
.memory-mini { margin: 9px 0 4px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.015); }
.memory-mini span { display: block; color: var(--teal); font-size: 8px; margin-bottom: 3px; }
.memory-mini p { margin: 0 0 4px; color: var(--muted); font-size: 8.5px; line-height: 1.5; }
.memory-mini .link-btn { font-size: 8px; }

/* archive / style / chapter review */
.archive-modal { max-height: 74vh; }
.archive-state { padding: 12px 14px; border: 1px solid rgba(231,185,106,.22); border-radius: 9px; background: var(--accent-dim); }
.archive-kicker { display: block; color: var(--accent); font-size: 8px; letter-spacing: 1.4px; margin-bottom: 5px; }
.archive-state > p { margin: 0 0 10px; color: var(--text-2); font-family: var(--serif); font-size: 13px; line-height: 1.65; }
.archive-stats { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 8.5px; }
.archive-stats b { color: var(--text); font-size: 12px; font-family: var(--serif); margin: 0 2px; }
.archive-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 13px; }
.archive-section { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; min-width: 0; }
.archive-grid .archive-section { border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; margin-top: 0; }
.archive-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 7px; }
.archive-head > span { font-size: 11px; font-weight: 500; color: var(--text-2); }
.archive-head > small { color: var(--muted-2); font-size: 8.5px; }
.archive-row { display: flex; align-items: center; gap: 6px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.035); }
.archive-row:last-child { border-bottom: 0; }
.archive-row b { flex: 1; font-size: 10.5px; font-weight: 500; }
.archive-row small { color: var(--muted-2); font-size: 8.5px; }
.archive-status { font-size: 8px; padding: 2px 5px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted-2); }
.archive-status.on { color: var(--teal); border-color: rgba(111,211,199,.22); }
.archive-thread { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.035); flex-wrap: wrap; }
.archive-thread:last-child { border-bottom: 0; }
.archive-thread > div { flex: 1; min-width: 0; }
.archive-thread b { display: block; font-size: 10px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.archive-thread small { color: var(--muted-2); font-size: 8.5px; }
.thread-status { font-size: 8px; padding: 2px 5px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted-2); white-space: nowrap; }
.thread-status.due { color: var(--accent); border-color: rgba(231,185,106,.25); }
.thread-status.done { color: var(--teal); border-color: rgba(111,211,199,.25); }
.archive-thread .link-btn { font-size: 8.5px; }
.archive-summary { display: grid; grid-template-columns: 26px 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.035); }
.archive-summary:last-child { border-bottom: 0; }
.archive-summary > span { font-family: var(--serif); font-size: 10px; color: var(--accent); }
.archive-summary b { display: block; font-size: 10px; font-weight: 500; margin-bottom: 2px; }
.archive-summary p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.archive-style-section .style-brief b { font-size: 11px; font-weight: 500; }
.archive-style-section .style-brief p { margin: 4px 0 7px; color: var(--muted); font-size: 9.5px; line-height: 1.65; }
.style-traits { display: flex; flex-wrap: wrap; gap: 5px; }
.style-traits span { border: 1px solid var(--line); border-radius: 5px; padding: 3px 6px; color: var(--muted); font-size: 8.5px; }
.archive-empty { margin: 0; color: var(--muted-2); font-size: 9.5px; line-height: 1.6; }
.archive-structure { border-top: 1px solid var(--line); margin-top: 13px; padding-top: 10px; }
.archive-structure summary { list-style: none; cursor: pointer; color: var(--text-2); font-size: 11px; display: flex; justify-content: space-between; }
.archive-structure summary::-webkit-details-marker { display: none; }
.archive-structure summary span { color: var(--muted-2); font-size: 8px; }
.structure-block { margin-top: 9px; }
.structure-block > span { display: block; color: var(--accent); font-size: 7.5px; letter-spacing: 1px; margin-bottom: 4px; }
.structure-block > p { margin: 0; color: var(--muted); font-size: 8.5px; line-height: 1.55; }
.structure-volume { border: 1px solid var(--line); border-radius: 6px; padding: 7px 8px; margin-top: 5px; }
.structure-volume > div { display: flex; justify-content: space-between; gap: 8px; }
.structure-volume b { font-size: 9px; font-weight: 500; }
.structure-volume span { color: var(--muted-2); font-size: 7.5px; }
.structure-volume p { margin: 3px 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.structure-volume small { color: var(--muted-2); font-size: 7.5px; line-height: 1.5; }
.structure-chapters { display: flex; flex-wrap: wrap; gap: 4px; }
.structure-chapters span { border: 1px solid var(--line); border-radius: 4px; padding: 3px 5px; color: var(--muted); font-size: 7.5px; }
.style-modal { max-height: 72vh; }
.style-modal textarea { min-height: 110px; font-family: var(--serif); line-height: 1.7; }
.style-modal .style-traits { margin: 8px 0 10px; }
.chapter-review { margin: 0 0 10px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.015); padding: 7px 9px; }
.chapter-review summary { list-style: none; cursor: pointer; color: var(--text-2); font-size: 9px; display: flex; justify-content: space-between; }
.chapter-review summary::-webkit-details-marker { display: none; }
.chapter-review summary::after { content: "+"; color: var(--muted-2); }
.chapter-review[open] summary::after { content: "−"; }
.review-dims { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin-top: 8px; }
.review-dims > div { display: grid; grid-template-columns: 1fr auto; gap: 2px 6px; align-items: center; }
.review-dims span { color: var(--muted); font-size: 8px; }
.review-dims b { font-family: var(--serif); font-size: 10px; font-weight: 500; }
.review-dims i { grid-column: 1 / -1; display: block; height: 3px; border-radius: 99px; background: var(--accent); opacity: .72; }
.review-dims small { grid-column: 1 / -1; color: var(--muted-2); font-size: 7.5px; line-height: 1.45; }
.review-flags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.review-flag { border: 1px solid var(--line); border-radius: 5px; padding: 4px 6px; color: var(--muted); font-size: 7.5px; line-height: 1.45; }
.review-flag b { color: var(--accent); font-weight: 500; }
.review-flag.danger { border-color: rgba(239,122,109,.25); color: #d8a49e; }
.review-ok { margin: 8px 0 0; color: var(--teal); font-size: 8.5px; }
@media (max-width: 720px) {
  .archive-grid { grid-template-columns: 1fr; }
  .review-dims { grid-template-columns: 1fr; }
}
.ctx-guard { display: flex; align-items: center; gap: 7px; }
.ctx-guard-score { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); font-family: var(--serif); font-size: 10px; color: var(--accent); flex: 0 0 27px; }
.ctx-guard-score.pass { color: var(--teal); border-color: rgba(111,211,199,.25); }
.ctx-guard-score.danger { color: var(--danger); border-color: rgba(239,122,109,.3); }
.ctx-guard > div { min-width: 0; flex: 1; }
.ctx-guard b { display: block; font-size: 9px; font-weight: 500; }
.ctx-guard p { margin: 2px 0 0; color: var(--muted); font-size: 7.5px; line-height: 1.4; }
.ctx-guard .link-btn { font-size: 8px; }

/* ---------------- common skills ---------------- */
.common-skills { padding: 16px 18px; margin-bottom: 14px; }
.panel-note-row { display: flex; align-items: center; gap: 12px; }
.panel-note-row .link-btn { border: 1px solid rgba(231, 185, 106, .3); border-radius: 5px; padding: 3px 8px; font-size: 8px; white-space: nowrap; }
.panel-note-row .link-btn:disabled { opacity: .55; border-color: var(--line); }
.common-skill-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-top: 9px; }
.common-skill { display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 7px 8px; align-items: start; padding: 9px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,0.015); cursor: pointer; min-width: 0; }
.common-skill:hover { border-color: rgba(231,185,106,.3); background: rgba(255,255,255,0.03); }
.common-skill .skill-glyph { width: 25px; height: 25px; font-size: 10px; }
.common-skill > div { min-width: 0; }
.common-skill b { display: block; font-size: 9.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.common-skill p { margin: 2px 0 0; color: var(--muted); font-size: 7.5px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.common-skill .link-btn { font-size: 7.5px; white-space: nowrap; }
.common-skill-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; padding-top: 5px; border-top: 1px solid var(--line); }
.common-skill-actions .link-btn { border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; line-height: 1.5; }
.common-skill-actions .link-btn:hover { border-color: rgba(231, 185, 106, .35); }
.common-skill-actions .link-btn + .link-btn { color: var(--accent); border-color: rgba(231, 185, 106, .28); }
.common-skill-actions .is-added { color: var(--teal); opacity: .8; }
.common-skill-actions .is-added:disabled { cursor: default; }
.common-skill-actions .link-btn:disabled { opacity: .5; }

/* ---------------- skills ---------------- */
.skill-count { font-family: var(--serif); font-size: 13px; color: var(--muted); }
.skills-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.search-box { display: flex; align-items: center; gap: 8px; height: 34px; min-width: 300px; border: 1px solid var(--line); border-radius: 8px; padding: 0 11px; background: rgba(0, 0, 0, 0.14); }
.search-box .icon { width: 13px; height: 13px; color: var(--muted-2); }
.search-box input { border: 0; background: transparent; outline: none; font-size: 11px; width: 100%; color: var(--text); }
.search-box input::placeholder { color: var(--muted-2); }
.skill-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.skill-card { border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.018); padding: 16px; display: flex; flex-direction: column; min-height: 172px; transition: 0.2s; }
.skill-card:hover { border-color: rgba(231, 185, 106, 0.26); background: rgba(255, 255, 255, 0.03); transform: translateY(-1px); }
.skill-card.is-hidden { display: none; }
.skill-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.skill-glyph { width: 32px; height: 32px; border-radius: 8px; background: var(--accent-dim); border: 1px solid rgba(231, 185, 106, 0.16); color: var(--accent); font-family: var(--serif); font-size: 15px; display: grid; place-items: center; }
.skill-cat { font-size: 7.5px; letter-spacing: 1.2px; color: var(--muted-2); text-transform: uppercase; }
.skill-added { display: inline-block; margin-left: 6px; padding: 2px 5px; border: 1px solid rgba(111,211,199,.28); border-radius: 4px; color: var(--teal); font-size: 7px; font-weight: 400; letter-spacing: 0; text-transform: none; vertical-align: middle; }
.skill-card.is-added-card { border-color: rgba(111,211,199,.2); }
.skill-card h3 { margin: 0 0 5px; font-family: var(--serif); font-size: 15px; font-weight: 600; }
.skill-card p { margin: 0 0 12px; font-size: 9.5px; line-height: 1.65; color: var(--muted); }
.skill-source-tag { align-self: flex-start; margin: 0 0 8px; border: 1px solid rgba(111, 211, 199, 0.18); border-radius: 4px; padding: 1px 5px; color: var(--teal); font-size: 8px; line-height: 1.5; }
.skill-origin-line { margin: -6px 0 14px; font-size: 9.5px; line-height: 1.7; color: var(--muted); }
.skill-origin-line a { color: var(--teal); text-decoration: none; }
.skill-origin-line a:hover { text-decoration: underline; }
.skill-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding-top: 9px; }
.skill-foot span { font-size: 8px; color: var(--muted-2); }
.skills-note { margin: 18px 0 0; font-size: 9px; color: var(--muted-2); text-align: center; }

/* ---------------- modal ---------------- */
.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(3, 5, 8, 0.74); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 26px; animation: fade 0.18s ease both; }
.modal { width: min(720px, 94vw); max-height: 88vh; background: #11151d; border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55); display: flex; flex-direction: column; overflow: hidden; animation: modalIn 0.22s ease both; }
.modal-wide { width: min(880px, 94vw); }
.modal-head { padding: 21px 24px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; flex: 0 0 auto; }
.modal-head h2 { margin: 5px 0 4px; font-family: var(--serif); font-size: 22px; font-weight: 600; }
.modal-head p { margin: 0; font-size: 10.5px; line-height: 1.6; color: var(--muted); }
.modal-scroll { overflow-y: auto; padding: 18px 24px 20px; }
.modal-actions { flex: 0 0 auto; padding: 14px 24px; border-top: 1px solid var(--line); background: #0e1219; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.modal-section { margin-bottom: 17px; }
.modal-section:last-child { margin-bottom: 0; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 17px; }
.modal-grid section { border: 1px solid var(--line); border-radius: 9px; padding: 12px 13px; background: rgba(255, 255, 255, 0.016); }
.modal-grid p { margin: 0 0 8px; font-size: 10.5px; line-height: 1.65; color: var(--text-2); }
.modal-form { padding: 18px 24px; overflow-y: auto; }
.knowledge-count { align-self: flex-end; padding-bottom: 9px; color: var(--muted-2); font-size: 9px; white-space: nowrap; }
.knowledge-actions { display: flex; gap: 8px; margin: 8px 0 10px; }
.knowledge-list { padding: 0 24px 20px; max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; }
.knowledge-item { border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.018); padding: 9px 11px; }
.knowledge-item > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.knowledge-item b { color: var(--text-2); font-family: var(--serif); }
.knowledge-item small { color: var(--muted-2); }
.knowledge-item p { margin: 5px 0 6px; color: var(--muted); line-height: 1.6; }
.knowledge-item-foot { display: flex; justify-content: space-between; align-items: center; color: var(--muted-2); font-size: 8.5px; }
.knowledge-empty { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 18px; color: var(--muted); text-align: center; }
.knowledge-empty .icon { width: 20px; height: 20px; color: var(--muted-2); }
.settings-section { border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 16px; }
.settings-section:last-child { border-bottom: 0; margin-bottom: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-note { font-size: 9px; line-height: 1.7; color: var(--muted-2); margin: 9px 0 0; }
.form-note code { font-family: var(--mono); font-size: 8.5px; color: var(--muted); word-break: break-all; }
.server-model-card { display: flex; gap: 10px; align-items: flex-start; border: 1px dashed var(--line-strong); border-radius: 9px; padding: 11px 12px; background: rgba(255, 255, 255, 0.018); margin-bottom: 10px; }
.server-model-card.is-ready { border-style: solid; border-color: rgba(111, 211, 199, 0.26); background: rgba(111, 211, 199, 0.035); }
.server-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); flex: 0 0 auto; margin-top: 4px; }
.server-model-card.is-ready .server-dot { background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.server-model-card b { font-size: 10.5px; font-weight: 600; }
.server-model-card p { margin: 4px 0 0; font-size: 8.5px; line-height: 1.6; color: var(--muted); }
.check-row { display: flex; align-items: center; gap: 7px; font-size: 10px; color: var(--text-2); cursor: pointer; margin: 7px 0 10px; }
.check-row input { width: 13px; height: 13px; accent-color: var(--accent); }
.check-row.is-disabled { opacity: 0.55; cursor: not-allowed; }
.api-test-row { display: flex; align-items: center; gap: 10px; margin-top: 11px; }
.api-status { font-size: 9px; color: var(--muted); }
.api-status.ok, .api-status.is-ok { color: var(--green); }
.api-status.error, .api-status.is-error { color: var(--danger); }
.api-status.is-testing { color: var(--accent); }
.model-library-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; background: rgba(255,255,255,.018); }
.model-library-summary > div { min-width: 0; }
.model-library-kicker { display: block; color: var(--accent); font-size: 7.5px; letter-spacing: 1px; margin-bottom: 3px; }
.model-library-summary b { display: block; font-size: 10.5px; font-weight: 500; }
.model-library-summary p { margin: 3px 0 0; color: var(--muted); font-size: 8.5px; }
.model-library-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.model-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.015); color: var(--muted); font-size: 8px; }
.model-chip:hover { border-color: var(--line-strong); color: var(--text-2); }
.model-chip.active { border-color: rgba(111,211,199,.28); color: var(--teal); }
.model-chip em { font-style: normal; color: var(--muted-2); font-size: 7.5px; }
.custom-model-library { max-height: 72vh; }
.model-library-section { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.model-library-section:last-child { border-bottom: 0; margin-bottom: 0; }
.model-library-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 9px; }
.model-library-section-head h3 { margin: 3px 0 0; font-family: var(--serif); font-size: 16px; font-weight: 500; }
.custom-model-list { display: flex; flex-direction: column; gap: 6px; }
.custom-model-card { display: flex; justify-content: space-between; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: rgba(255,255,255,.015); }
.custom-model-card.is-active { border-color: rgba(111,211,199,.25); background: rgba(111,211,199,.035); }
.custom-model-card-main { min-width: 0; cursor: pointer; border-radius: 6px; }
.custom-model-card-main:hover b { color: var(--accent); }
.custom-model-card-main:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
.custom-model-card-main > div { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.model-edit-hint { display: block; margin-top: 3px; color: var(--muted-2); font-size: 7.5px; opacity: 0; transition: opacity .15s; }
.custom-model-card-main:hover .model-edit-hint { opacity: 1; }
.custom-model-card-main b { font-size: 10px; font-weight: 500; }
.custom-model-card-main p { margin: 3px 0; color: var(--muted); font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.custom-model-card-main small { color: var(--muted-2); font-size: 7.5px; }
.model-active-tag, .model-test-tag { font-size: 7px; padding: 2px 5px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted-2); }
.model-active-tag { color: var(--teal); border-color: rgba(111,211,199,.25); }
.model-test-tag.ok { color: var(--green); border-color: rgba(111,211,199,.2); }
.custom-model-card-actions { display: flex; align-items: center; gap: 3px; flex: 0 0 auto; }
.custom-model-card-actions .btn { white-space: nowrap; }
.model-delete { width: 28px; height: 28px; border-color: transparent; color: var(--muted-2); }
.model-delete:hover { color: var(--danger); border-color: rgba(239,122,109,.25); }
.custom-model-empty { margin: 0; padding: 15px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 9px; line-height: 1.6; text-align: center; }
.model-editor .form-row { margin-bottom: 0; }
.model-editor .field { margin-bottom: 9px; }
.custom-model-card-main p, .custom-model-card-main small { max-width: 100%; }
@media (max-width: 720px) {
  .model-library-summary { align-items: flex-start; flex-direction: column; }
  .custom-model-card { align-items: flex-start; flex-direction: column; }
  .custom-model-card-actions { flex-wrap: wrap; }
  .custom-model-card-main p { white-space: normal; word-break: break-all; }
}
.data-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.data-row > div { border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; display: flex; flex-direction: column; gap: 2px; }
.data-row b { font-family: var(--serif); font-size: 17px; }
.data-row small { font-size: 8px; color: var(--muted); }
.data-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.cloud-backup-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 12px; border: 1px solid rgba(111,211,199,.22); border-radius: 8px; background: rgba(111,211,199,.045); }
.cloud-backup-card b { display: block; font-family: var(--serif); font-size: 12px; font-weight: 500; color: var(--text); }
.cloud-backup-card p { margin: 4px 0 0; color: var(--muted); font-size: 8.5px; line-height: 1.55; }
.cloud-backup-actions { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.cloud-backup-section .form-note { margin-top: 7px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.idea-modal-hero { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
.idea-modal-hero > div:first-child { display: flex; align-items: center; gap: 15px; flex: 0 0 auto; }
.idea-modal-hero > p { margin: 0; font-size: 12px; line-height: 1.8; color: var(--text-2); }
.idea-score-bars { display: flex; flex-direction: column; gap: 3px; }
.idea-score-bars span { font-size: 8px; color: var(--muted); }
.idea-score-bars i { width: 86px; height: 2px; background: rgba(255, 255, 255, 0.07); border-radius: 99px; overflow: hidden; display: block; }
.idea-score-bars em { display: block; height: 100%; background: var(--accent); }
.gold-card { border: 1px solid rgba(231, 185, 106, 0.16); background: rgba(231, 185, 106, 0.035); border-radius: 9px; padding: 12px 13px; }
.gold-card b { display: block; font-family: var(--serif); font-size: 14px; color: var(--accent); margin-bottom: 7px; }
.gold-card p { margin: 0 0 5px; font-size: 10px; line-height: 1.65; color: var(--text-2); }
.gold-card p:last-child { margin-bottom: 0; }
.gold-card span { display: inline-block; min-width: 30px; font-size: 8px; color: var(--accent); margin-right: 7px; }
.act-list { display: flex; flex-direction: column; gap: 8px; }
.act-list > div { display: flex; gap: 9px; }
.act-list > div > span { font-family: var(--serif); font-size: 9px; color: var(--accent); padding-top: 2px; }
.act-list b { font-size: 10.5px; font-weight: 600; }
.act-list p { margin: 3px 0 0; font-size: 9.5px; line-height: 1.65; color: var(--muted); }
.risk-text { color: #c6a29c !important; font-size: 10px !important; line-height: 1.7 !important; background: rgba(239, 122, 109, 0.055); border: 1px solid rgba(239, 122, 109, 0.1); border-radius: 6px; padding: 8px 10px; margin: 0 !important; }
.big-formula { font-family: var(--serif); font-size: 15px; line-height: 1.8; color: var(--accent-2); border-left: 2px solid var(--accent); padding-left: 12px; margin: 0 0 14px; }
.example-text { font-size: 10.5px; line-height: 1.8; color: var(--muted); }
.skill-desc { font-size: 11.5px; line-height: 1.8; color: var(--text-2); margin: 0 0 16px; }
.prompt-box { font-family: var(--mono); font-size: 9.5px; line-height: 1.8; color: #9fb0bf; background: #080b10; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; white-space: pre-wrap; word-break: break-word; margin: 0; max-height: 240px; overflow-y: auto; }
.about-text p { font-size: 11px; line-height: 1.9; color: var(--text-2); margin: 0 0 12px; }
.about-text b { color: var(--text); }
.about-text .risk-text { font-size: 9.5px !important; }

/* ---------------- empty / toast ---------------- */
.empty-state { border: 1px dashed var(--line-strong); border-radius: 14px; padding: 64px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: 18px; }
.empty-icon { width: 48px; height: 48px; border-radius: 13px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); background: rgba(255, 255, 255, 0.02); margin-bottom: 14px; }
.empty-icon .icon { width: 20px; height: 20px; }
.empty-state h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 18px; font-weight: 600; }
.empty-state p { margin: 0 0 16px; font-size: 10.5px; line-height: 1.7; color: var(--muted); max-width: 420px; }
.empty-actions { display: flex; gap: 8px; }
.toast-root { position: fixed; right: 24px; bottom: 24px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #151b24; border: 1px solid var(--line-strong); border-left: 2px solid var(--green); border-radius: 9px; font-size: 11px; color: var(--text-2); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); animation: toastIn 0.25s ease both; max-width: 380px; }
.toast.error { border-left-color: var(--danger); }
.toast .icon { width: 13px; height: 13px; color: var(--green); }
.toast.error .icon { color: var(--danger); }
.toast.out { animation: toastOut 0.28s ease both; }

/* ---------------- animations ---------------- */
@keyframes rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(0.99); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

/* ---------------- responsive ---------------- */
@media (max-width: 1420px) {
  .chat-view { grid-template-columns: minmax(0, 1fr); }
  .context-panel { display: none; }
}
@media (max-width: 1180px) {
  .app { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar { padding: 20px 10px 12px; align-items: center; }
  .brand { padding: 0 0 18px; }
  .brand-text, .project-kicker, .project-meta, .project-edit, .nav-label, .nav-item span, .nav-badge, .engine-pill span, .foot-item { display: none; }
  .project-card { padding: 9px; width: 48px; height: 44px; align-items: center; justify-content: center; }
  .project-name { font-size: 9px; padding: 0; white-space: normal; text-align: center; line-height: 1.2; max-height: 28px; overflow: hidden; }
  .nav { align-items: center; width: 100%; }
  .nav-more { width: 100%; }
  .nav-more-summary { justify-content: center; padding: 11px 0; }
  .nav-more-summary span, .nav-more-caret { display: none; }
  .nav-more-list { border-left: 0; margin-left: 0; padding-left: 0; }
  .nav-item { justify-content: center; padding: 11px 0; }
  .nav-item.is-active::before { left: -10px; }
  .nav-item .icon { width: 17px; height: 17px; }
  .sidebar-foot { width: 100%; display: flex; flex-direction: column; align-items: center; }
  .engine-pill { justify-content: center; padding: 8px; width: 38px; height: 30px; }
  .foot-item { justify-content: center; width: 38px; height: 32px; padding: 0; }
  .skills-page .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-grid { grid-template-columns: 1fr; }
  .market-grid { grid-template-columns: 1fr; }
  .market-panel.wide { grid-column: auto; }
  .opportunity-grid { grid-template-columns: repeat(2, 1fr); }
  .analysis-layout { grid-template-columns: 200px minmax(0, 1fr); }
  .continue-layout { grid-template-columns: 1fr; }
  .canon-panel { position: static; max-height: none; }
  .canon-work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .direction-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .repair-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guard-layout { grid-template-columns: 1fr; }
  .guard-bible { position: static; max-height: none; }
  .guard-overview { grid-template-columns: 1fr; }
  .common-skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { padding: 0 24px; }
  .taskbar { padding: 0 16px; }
  .task-count { display: none; }
  .task-tab { min-width: 100px; max-width: 155px; }
  .chat-stream { padding: 28px 24px 18px; }
  .composer-wrap { padding: 8px 24px 16px; }
  .pipeline { padding: 13px 24px; }
  .page { padding: 24px 24px 60px; }
}
@media (max-width: 900px) {
  .topbar-sub, .data-pill { display: none; }
  .welcome h1 { font-size: 36px; }
  .welcome-new h1 { font-size: 34px; }
  .start-grid { grid-template-columns: 1fr; }
  .start-card { min-height: 0; }
  .flow { grid-template-columns: repeat(3, 1fr); }
  .analysis-layout { grid-template-columns: 1fr; }
  .work-list { position: static; max-height: 230px; }
  .pace-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col, .outline-grid { grid-template-columns: 1fr; }
  .volume-row { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .continue-progress { grid-template-columns: repeat(2, 1fr); }
  .continue-progress .progress-mini { display: none; }
  .direction-grid, .repair-grid { grid-template-columns: 1fr; }
  .plan-compact-list { grid-template-columns: 1fr; }
  .written-row { grid-template-columns: 25px minmax(0, 1fr) auto; }
  .written-row > small { grid-column: 2; text-align: left; }
  .written-row .row-actions { grid-column: 3; grid-row: 1 / span 2; }
  .guard-score { grid-template-columns: 84px minmax(0, 1fr); }
  .guard-metrics { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
  .guard-ring { width: 80px; height: 80px; flex-basis: 80px; }
  .common-skill-grid { grid-template-columns: 1fr; }
  .continue-chapter-row { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .continue-chapter-row .btn { grid-column: 2 / -1; justify-self: start; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-strip > div:nth-child(2) { border-right: 0; }
  .stat-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .config-grid { grid-template-columns: 1fr 1fr; }
  .scan-btn { grid-column: 1 / -1; }
  .idea-grid, .ideas-page .idea-grid { grid-template-columns: 1fr; }
  .idea-scan-grid { grid-template-columns: 1fr; }
  .skills-page .skill-grid { grid-template-columns: 1fr; }
  .option-pair { grid-template-columns: 1fr; }
  .reuse-card { flex-direction: column; align-items: flex-start; }
  .modal-backdrop { padding: 12px; }
  .modal, .modal-wide { width: 100%; max-height: 94vh; }
  .form-row, .modal-grid { grid-template-columns: 1fr; }
  .data-row { grid-template-columns: repeat(2, 1fr); }
  .skill-task-grid { grid-template-columns: 1fr; }
  .step { min-width: 72px; padding-right: 10px; }
  .step-text small { display: none; }
  .step-line { display: none; }
  .pipeline { gap: 4px; }
  .composer-hint { display: none; }
  .page-head { flex-direction: column; gap: 12px; }
  .genre-row { grid-template-columns: 110px 1fr; }
}
@media (max-width: 640px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { height: 64px; flex-basis: 64px; padding: 0 16px; }
  .topbar-actions .icon-btn { display: none; }
  .taskbar { flex-basis: 36px; height: 36px; padding: 0 12px; }
  .task-tab { min-width: 92px; max-width: 136px; height: 27px; }
  .task-tab-text small { display: none; }
  .new-task-btn { padding: 0 7px; }
  .new-task-btn .icon { width: 10px; height: 10px; }
  .model-pill { height: 28px; font-size: 9px; }
  .chat-stream { padding: 20px 16px 12px; }
  .composer-wrap { padding: 8px 12px 12px; }
  .composer-foot { display: none; }
  .pipeline { padding: 10px 16px; }
  .step-text b { font-size: 10px; }
  .page { padding: 18px 16px 50px; }
  .canon-work-grid { grid-template-columns: 1fr; }
  .continue-write-row { flex-direction: column; align-items: flex-start; }
  .continue-write-row .btn { width: 100%; }
  .continue-chapter-row { grid-template-columns: 24px minmax(0, 1fr); }
  .continue-chapter-row .continuity-badge { grid-column: 2; justify-self: start; }
  .continue-chapter-row .btn { grid-column: 2; }
  .welcome h1 { font-size: 32px; }
  .flow { grid-template-columns: 1fr 1fr; }
  .msg-user .msg-body { max-width: 88%; }
  .block { padding: 14px; }
  .block-head h3 { font-size: 14px; }
  .mini-stats { grid-template-columns: repeat(2, 1fr); }
  .idea-modal-hero { flex-direction: column; }
  .option-head { flex-wrap: wrap; }
  .option-match { margin-left: 0; }
  .pace-grid { grid-template-columns: 1fr; }
  .agent, .avatar { display: none; }
  .msg-assistant { gap: 0; }
}

/* ---------------- mobile shell ---------------- */
@media (max-width: 640px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    display: flex; align-items: stretch;
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 90;
    width: min(86vw, 320px); min-height: 0; padding: 24px 18px 16px;
    border-right: 1px solid var(--line-strong);
    box-shadow: 24px 0 60px rgba(0,0,0,.45);
    transform: translateX(-104%); transition: transform .22s ease;
    overflow-y: auto;
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-scrim.is-open { display: block; }
  .sidebar .brand { position: relative; padding: 0 6px 22px; align-items: center; }
  .sidebar .brand-text { display: flex; }
  .drawer-close { display: grid; place-items: center; position: absolute; right: 0; top: -4px; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.025); color: var(--muted); }
  .drawer-close .icon { width: 15px; height: 15px; }
  .sidebar .nav { align-items: stretch; width: 100%; }
  .sidebar .nav-label { display: block; margin: 18px 8px 7px; font-size: 9px; }
  .sidebar .nav-item { justify-content: flex-start; padding: 11px 12px; }
  .sidebar .nav-item span { display: inline; }
  .sidebar .nav-badge { display: inline-block; }
  .sidebar .nav-item .icon { width: 18px; height: 18px; }
  .sidebar .nav-item.is-active::before { left: -18px; }
  .sidebar .sidebar-foot { width: 100%; align-items: stretch; }
  .sidebar .engine-pill { width: 100%; height: auto; justify-content: flex-start; padding: 9px 10px; }
  .sidebar .engine-pill span { display: inline; }
  .sidebar .foot-item { display: flex; justify-content: flex-start; width: 100%; height: auto; padding: 9px 10px; }
  .reader-font-control { display: flex; }
  .mobile-menu-btn { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.025); color: var(--text-2); }
  .mobile-menu-btn .icon { width: 17px; height: 17px; }
  .topbar { height: 60px; flex-basis: 60px; padding: 0 12px; gap: 8px; }
  .topbar-left { gap: 8px; min-width: 0; flex: 1; }
  .topbar h1 { font-size: 20px; }
  .topbar-row { gap: 7px; }
  .topbar .page-kicker { font-size: 8px; letter-spacing: 1.9px; }
  .topbar-sub { display: none; }
  .topbar .model-switcher { display: none; }
  .topbar-actions { gap: 4px; }
  .topbar-actions .icon-btn { display: grid; place-items: center; width: 32px; height: 32px; }
  .taskbar { height: 42px; flex-basis: 42px; padding: 0 10px; gap: 7px; }
  .task-tab { min-width: 110px; max-width: 160px; height: 31px; padding: 0 6px 0 9px; }
  .task-tab-text { gap: 0; }
  .task-tab-text b { font-size: 10.5px; }
  .task-tab-text small { display: none; }
  .new-task-btn { height: 30px; padding: 0 8px; font-size: 9.5px; }
  .task-count { display: none; }
  .chat-stream { padding: 16px 14px 16px; }
  .msg { gap: 8px; margin-bottom: 18px; }
  .welcome-msg { margin-bottom: 0; }
  .welcome-new { max-width: none; padding: 2px 0 12px; }
  .welcome-kicker { font-size: 9px; letter-spacing: 2px; gap: 7px; }
  .welcome-new h1 { font-size: 30px; line-height: 1.2; margin: 11px 0 8px; }
  .welcome-new .welcome-sub { font-size: 11.5px; line-height: 1.7; margin-bottom: 15px; }
  .welcome-new .start-grid { display: flex; flex-direction: column; gap: 7px; margin: 0 0 12px; }
  .welcome-new .start-card { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; gap: 2px 10px; min-height: 0; padding: 10px 11px; border-radius: 9px; }
  .welcome-new .start-card .start-icon { grid-row: 1 / span 2; width: 32px; height: 32px; margin: 0; }
  .welcome-new .start-card .start-icon .icon { width: 15px; height: 15px; }
  .welcome-new .start-card b { grid-column: 2; font-size: 13.5px; line-height: 1.3; }
  .welcome-new .start-card small { grid-column: 2; font-size: 9.5px; line-height: 1.45; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .welcome-new .start-card em { grid-column: 3; grid-row: 1 / span 2; align-self: center; margin: 0; padding: 0; font-size: 9px; white-space: nowrap; }
  .welcome-new .start-card em .icon { display: none; }
  .welcome-new .start-steps { display: none; }
  .welcome-new .welcome-bottom { margin-top: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
  .welcome-new .welcome-bottom .try-chip { font-size: 9.5px; line-height: 1.5; }
  .welcome-new .welcome-bottom .link-btn { font-size: 9px; }
  .msg-meta { margin-bottom: 6px; font-size: 8.5px; }
  .msg-text { font-size: calc(13px * var(--reader-scale)); line-height: 1.8; }
  .msg-user .msg-text { font-size: calc(13px * var(--reader-scale)); }
  .block { padding: 13px; }
  .composer-wrap { padding: 6px 10px calc(8px + env(safe-area-inset-bottom)); }
  .composer { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px; padding: 5px 6px 5px 10px; border-radius: 13px; }
  .composer textarea { flex: 1 1 120px; min-width: 0; width: auto; min-height: 24px; max-height: 94px; padding: 7px 2px; font-size: 16px; line-height: 1.45; }
  .composer-advanced { order: -1; flex: 0 0 100%; width: 100%; display: none; max-height: 34vh; overflow-y: auto; padding-bottom: 7px; margin-bottom: 3px; border-bottom: 1px solid var(--line); }
  .composer.is-advanced-open .composer-advanced { display: block; }
  .composer-mobile-toggle { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.025); color: var(--muted); font-size: 10px; white-space: nowrap; }
  .composer-mobile-toggle:active { color: var(--accent); border-color: rgba(231,185,106,.35); }
  .composer-tools, .composer-hint, .composer-foot { display: none; }
  .composer-bar { flex: 0 0 auto; gap: 5px; width: auto; }
  .send-btn { width: 36px; height: 36px; border-radius: 9px; }
  .composer-skill-chip, .composer-skill-add, .composer-skill-run-all, .composer-next-chapter { font-size: 10px !important; padding: 4px 7px; }
  .composer-skills-label { display: none; }
  .page { padding: 16px 12px 64px; }
  .page-head { gap: 9px; margin-bottom: 13px; }
  .page-head h1 { font-size: 24px; margin: 3px 0 4px; }
  .page-head p { font-size: 11px; line-height: 1.6; }
  .page-head-actions { width: 100%; flex-wrap: wrap; gap: 6px; }
  .page-kicker { font-size: 8.5px; letter-spacing: 2.1px; }
  .btn { font-size: 11px; padding: 8px 12px; }
  .btn-sm, .btn-xs { font-size: 10.5px; padding: 7px 10px; }
  .continue-head { gap: 9px; padding-bottom: 12px; }
  .continue-head h1 { font-size: 28px; }
  .continue-head .page-kicker { font-size: 9px; letter-spacing: 2.6px; }
  .continue-head p { font-size: 11.5px; }
  .import-novel-panel { align-items: flex-start; flex-direction: column; gap: 11px; padding: 14px; margin-bottom: 12px; }
  .import-novel-copy h3 { font-size: 15px; margin: 3px 0 5px; line-height: 1.45; }
  .import-novel-copy p { font-size: 10.5px; line-height: 1.65; }
  .import-novel-actions { align-items: flex-start; gap: 5px; }
  .import-novel-actions .btn { width: 100%; justify-content: center; }
  .import-novel-actions small { max-width: none; text-align: left; font-size: 8.5px; line-height: 1.5; }
  .canon-intro { padding: 10px 11px; margin-bottom: 12px; }
  .canon-intro p { font-size: 10px; line-height: 1.65; }
  .continue-picker .page-head-actions { display: none; }
  .section-head h3 { font-size: 16px; }
  .continue-head-meta { gap: 6px; margin-top: 10px; }
  .continue-head-meta > span { min-height: 25px; padding: 4px 7px; font-size: 8.5px; }
  .continue-head-meta b { font-size: 13px; }
  .continue-head-actions { width: 100%; justify-content: flex-start; gap: 6px; }
  .continue-head-actions .btn { font-size: 9.5px; padding: 7px 9px; }
  .continue-outline-empty { flex-direction: column; align-items: flex-start; }
  .continue-outline-actions { width: 100%; }
  .continue-outline-actions .btn { flex: 1 1 auto; }
  .shelf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 3px 0 10px; }
  .shelf-stats > div { display: block; padding: 9px 10px; }
  .shelf-stats span { display: block; margin: 0 0 4px; font-size: 8px; }
  .shelf-stats b { display: inline; font-size: 18px; line-height: 1.1; }
  .shelf-stats em { font-size: 8px; }
  .shelf-toolbar { align-items: stretch; flex-direction: column; gap: 6px; margin-bottom: 9px; }
  .shelf-toolbar .chips { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 4px; width: 100%; scrollbar-width: none; }
  .shelf-toolbar .chips::-webkit-scrollbar { display: none; }
  .shelf-toolbar .chip { flex: 0 0 auto; }
  .shelf-toolbar > span { display: none; }
  .shelf-card { grid-template-columns: 78px minmax(0,1fr); }
  .modal { max-height: calc(100vh - 24px); }
  .modal-actions { flex-wrap: wrap; }
  .reader-font-control button { height: 30px; }
  .ms-para { font-size: calc(15px * var(--reader-scale)); line-height: 1.95; }
  .draft-body { font-size: calc(14.5px * var(--reader-scale)); }
  .canon-synopsis { font-size: calc(11px * var(--reader-scale)); }
  .canon-fact p, .canon-extra p, .canon-extra li { font-size: calc(9.5px * var(--reader-scale)); line-height: 1.75; }
  .continue-outline-row p { font-size: calc(9px * var(--reader-scale)); }
  .continue-outline-row small { font-size: calc(8.5px * var(--reader-scale)); }
  .msg-body, .msg-body p { font-size: calc(13.5px * var(--reader-scale)); line-height: 1.8; }
  .ms-workspace-top { flex-direction: column; align-items: stretch; gap: 8px; margin-bottom: 10px; }
  .ms-chapter-picker { flex-wrap: wrap; gap: 6px; }
  .ms-chapter-picker select { flex: 1 1 200px; max-width: 100%; }
  .ms-top-actions { justify-content: flex-start; flex-wrap: wrap; gap: 5px; }
  .ms-paper { padding: 14px 12px 20px; }
  .ms-doc-head { gap: 8px; padding-bottom: 9px; }
  .ms-doc-head h2 { font-size: 20px; }
  .ms-doc-hint { display: none; }
  .ms-tabs { overflow-x: auto; }
  .ms-tab { flex: 0 0 auto; padding: 7px 9px 8px; }
  .ms-para { font-size: calc(15px * var(--reader-scale)); line-height: 1.9; padding: 7px 8px; }
  .ms-paper .ms-selected-text { max-height: 100px; overflow-y: auto; }
  .shelf-stats > div { padding: 10px 11px; }
  .shelf-stats b { font-size: 18px; }
  .shelf-card { padding: 10px; gap: 10px; }
  .shelf-card-head h3 { font-size: 14px; }
  .shelf-actions .btn { font-size: 9.5px; padding: 6px 8px; }
  .shelf-cover { min-height: 102px; padding: 8px; }
  .shelf-cover > span { font-size: 18px; }
  .shelf-cover > em { font-size: 7.5px; }
  .shelf-cover > small { font-size: 7px; }
  .shelf-card-body > p { -webkit-line-clamp: 2; font-size: 9px; }
  .shelf-progress { margin-top: 4px; }
  /* skills */
  .common-skills { padding: 12px 11px; margin-bottom: 10px; }
  .common-skills .panel-head { gap: 7px; }
  .common-skills .panel-head h3 { font-size: 15px; }
  .panel-note-row { gap: 7px; flex-wrap: wrap; }
  .panel-note-row .panel-note { display: none; }
  .panel-note-row .link-btn { font-size: 8.5px; padding: 4px 7px; }
  .common-skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
  .common-skill { grid-template-columns: 22px minmax(0, 1fr); gap: 5px 6px; padding: 7px 8px; }
  .common-skill .skill-glyph { width: 22px; height: 22px; font-size: 9px; }
  .common-skill b { font-size: 9.5px; }
  .common-skill p { font-size: 7.5px; line-height: 1.35; }
  .common-skill-actions { gap: 4px; padding-top: 4px; }
  .common-skill-actions .link-btn { font-size: 8px; padding: 3px 5px; }
  .skills-toolbar { gap: 7px; margin-bottom: 11px; }
  .search-box { min-width: 0; width: 100%; height: 36px; }
  .skills-page .skill-grid { gap: 7px; }
  .skill-card { padding: 12px; min-height: 0; border-radius: 9px; }
  .skill-top { margin-bottom: 7px; }
  .skill-card h3 { font-size: 14px; }
  .skill-card p { font-size: 9.5px; line-height: 1.55; margin-bottom: 9px; }
  .skill-foot { padding-top: 7px; }
  .skill-count { font-size: 12px; }
  /* skill detail modal */
  .modal { width: 100%; max-height: calc(100dvh - 20px); border-radius: 14px; }
  .modal-head { padding: 15px 16px 12px; }
  .modal-head h2 { font-size: 19px; margin: 4px 0 3px; }
  .modal-head p { font-size: 9.5px; }
  .modal-scroll { padding: 14px 16px 16px; }
  .modal-actions { padding: 11px 16px calc(11px + env(safe-area-inset-bottom)); gap: 6px; }
  .modal-actions .btn { flex: 1 1 auto; justify-content: center; font-size: 10.5px; padding: 9px 10px; }
  .skill-desc { font-size: 11px; line-height: 1.7; margin-bottom: 12px; }
  .modal-section { margin-bottom: 13px; }
  .bullet { font-size: 10.5px; line-height: 1.6; }
  .prompt-box { font-size: 9.5px; line-height: 1.7; padding: 10px 11px; max-height: 200px; }
  .skill-origin-line { font-size: 9px; line-height: 1.6; margin-bottom: 11px; }
  /* toolbox */
  .toolbox-hero-simple { padding: 16px 14px 14px; border-radius: 10px; }
  .toolbox-hero-simple h1 { font-size: 26px; margin: 4px 0 6px; }
  .toolbox-hero-simple > p { font-size: 11px; line-height: 1.65; margin-bottom: 12px; }
  .tool-intent-bar { flex-direction: column; gap: 6px; }
  .tool-intent-bar input { width: 100%; height: 40px; font-size: 14px; padding: 0 11px; }
  .tool-intent-bar .btn { width: 100%; height: 38px; justify-content: center; font-size: 11px; }
  .intent-chips { gap: 5px; margin-top: 8px; }
  .intent-chips button { font-size: 9px; padding: 5px 8px; }
  .next-step-card { grid-template-columns: 28px minmax(0, 1fr); gap: 8px 10px; padding: 12px; margin: 10px 0; }
  .next-step-mark { width: 28px; height: 28px; }
  .next-step-mark .icon { width: 12px; height: 12px; }
  .next-step-copy span { font-size: 7.5px; }
  .next-step-copy h2 { font-size: 16px; margin: 3px 0 2px; }
  .next-step-copy p { font-size: 9.5px; line-height: 1.5; }
  .next-step-action { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; width: 100%; padding-top: 8px; border-top: 1px solid rgba(231,185,106,.16); }
  .next-step-action small { font-size: 8px; }
  .next-step-action .btn { font-size: 10px; padding: 7px 10px; }
  .intent-grid-simple { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .intent-card-simple { min-height: 0; padding: 10px; border-radius: 8px; }
  .intent-icon { width: 24px; height: 24px; margin-bottom: 6px; }
  .intent-icon .icon { width: 12px; height: 12px; }
  .intent-card-simple b { font-size: 13px; }
  .intent-card-simple p { font-size: 8.5px; line-height: 1.45; margin: 3px 0 7px; }
  .intent-card-simple em { font-size: 8px; }
  .toolbox-status-line, .toolbox-note { display: none; }
  .cloud-backup-card { align-items: stretch; flex-direction: column; gap: 9px; }
  .cloud-backup-actions { justify-content: stretch; }
  .cloud-backup-actions .btn { flex: 1 1 auto; }
}
body.nav-open { overflow: hidden; }
/* ---------------- 创作工具箱 ---------------- */
.toolbox-page { max-width: 1200px; }
.toolbox-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 16px 0 22px; }
.toolbox-stats > div { padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.toolbox-stats span { display: block; color: var(--muted); font-size: 9px; margin-bottom: 5px; }
.toolbox-stats b { display: block; color: var(--text); font-family: var(--serif); font-size: 19px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toolbox-stats em { font-family: var(--sans); font-size: 8px; font-style: normal; color: var(--muted); margin-left: 2px; }
.toolbox-group { margin-bottom: 22px; }
.toolbox-group-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 7px; margin-bottom: 9px; }
.toolbox-group-head span { color: var(--text-2); font-size: 10px; letter-spacing: 1px; }
.toolbox-group-head small { color: var(--muted-2); font-size: 8px; }
.toolbox-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.tool-card { display: flex; flex-direction: column; gap: 7px; min-height: 130px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--text); text-align: left; cursor: pointer; transition: border-color .18s, background .18s, transform .18s; }
.tool-card:hover { border-color: rgba(231,185,106,.38); background: rgba(231,185,106,.035); transform: translateY(-1px); }
.tool-icon { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid rgba(231,185,106,.22); border-radius: 7px; color: var(--accent); }
.tool-icon .icon { width: 14px; height: 14px; }
.tool-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.tool-card-top b { font-family: var(--serif); font-size: 14px; font-weight: 500; line-height: 1.35; }
.tool-card-top em { color: var(--accent); font-size: 7px; font-style: normal; letter-spacing: 1px; border: 1px solid rgba(231,185,106,.2); border-radius: 4px; padding: 2px 4px; }
.tool-card-desc { color: var(--muted); font-size: 9.5px; line-height: 1.55; flex: 1; }
.tool-card-foot { color: var(--muted-2); font-size: 8px; display: flex; align-items: center; gap: 4px; }
.tool-card-foot .icon { width: 10px; height: 10px; }
.toolbox-note { color: var(--muted-2); font-size: 8.5px; line-height: 1.6; margin: 10px 0 0; }

/* tool modals */
.tool-modal { max-height: 74vh; }
.tool-meta { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8.5px; line-height: 1.5; margin: 0 0 10px; }
.tool-meta .icon { width: 12px; height: 12px; color: var(--teal); flex: 0 0 12px; }
.tool-options { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 10px; flex-wrap: wrap; }
.field.compact { margin: 0; min-width: 140px; }
.field.compact select { height: 30px; font-size: 9px; padding: 0 8px; }
.tool-hint { color: var(--muted-2); font-size: 8px; line-height: 1.5; }
.tool-output { min-height: 58px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; background: rgba(0,0,0,.12); margin-top: 10px; }
.tool-placeholder { color: var(--muted-2); font-size: 9px; }
.tool-loading { color: var(--accent); font-size: 9px; }
.tool-ai-note { color: var(--teal); font-size: 8px; margin-bottom: 7px; }
.tool-prose { color: var(--text-2); font-family: var(--serif); font-size: 12px; line-height: 1.8; }
.tool-beats { margin: 4px 0 0; padding-left: 18px; color: var(--text-2); font-size: 10px; line-height: 1.75; }
.tool-beats li { margin-bottom: 5px; }
.tool-note { color: var(--muted-2); font-size: 8.5px; line-height: 1.6; margin: 9px 0 0; }
.tool-empty { padding: 24px 18px; border: 1px dashed var(--line); border-radius: 8px; text-align: center; color: var(--muted); }
.tool-empty .icon { width: 26px; height: 26px; color: var(--accent); margin-bottom: 5px; }
.tool-empty h3 { font-family: var(--serif); color: var(--text); font-size: 15px; margin: 3px 0 5px; }
.tool-empty p { font-size: 9px; margin: 0 0 10px; }
.tool-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-bottom: 12px; }
.tool-stats-row > div { padding: 8px 9px; border: 1px solid var(--line); border-radius: 6px; }
.tool-stats-row span { display: block; color: var(--muted-2); font-size: 7.5px; margin-bottom: 3px; }
.tool-stats-row b { display: block; font-size: 10px; font-weight: 500; }
.tool-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tool-book-strip { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); margin-bottom: 10px; }
.tool-book-strip b { display: block; font-family: var(--serif); font-size: 14px; font-weight: 500; }
.tool-book-strip span { display: block; color: var(--muted); font-size: 8.5px; margin-top: 3px; }
.tool-book-strip em { color: var(--accent); font-size: 8.5px; font-style: normal; white-space: nowrap; }
.tool-chapter-list { border-top: 1px solid var(--line); }
.tool-chapter-row { display: grid; grid-template-columns: 25px minmax(0,1fr) auto auto; align-items: center; gap: 7px; padding: 7px 2px; border-bottom: 1px solid var(--line); }
.tool-chapter-row > span { color: var(--accent); font-family: var(--serif); font-size: 9px; }
.tool-chapter-row b { font-size: 9.5px; font-weight: 500; }
.tool-chapter-row small { color: var(--muted-2); font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-chapter-row.done { opacity: .7; }
.tool-outline-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 11px; }
.tool-outline-card { padding: 9px; border: 1px solid var(--line); border-radius: 7px; }
.tool-outline-card span { color: var(--muted-2); font-size: 7.5px; }
.tool-outline-card b { display: block; font-family: var(--serif); font-size: 12px; font-weight: 500; margin: 2px 0 4px; }
.tool-outline-card p { color: var(--muted); font-size: 8.5px; line-height: 1.5; margin: 0; }
.tool-plan-list { border-top: 1px solid var(--line); }
.tool-plan-list > div { display: grid; grid-template-columns: 25px 1fr auto; gap: 7px; padding: 6px 2px; border-bottom: 1px solid var(--line); align-items: baseline; }
.tool-plan-list span { color: var(--accent); font-family: var(--serif); font-size: 9px; }
.tool-plan-list b { font-size: 9.5px; font-weight: 500; }
.tool-plan-list small { color: var(--muted-2); font-size: 8px; }

/* prompt / idea / competitor / genre */
.prompt-toolbar { margin-bottom: 7px; }
.prompt-library { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.prompt-item { border: 1px solid var(--line); border-radius: 7px; padding: 9px 10px; background: var(--panel); }
.prompt-item > div:first-child { display: flex; align-items: baseline; gap: 6px; }
.prompt-item > div:first-child span { color: var(--accent); font-size: 7.5px; border: 1px solid rgba(231,185,106,.2); border-radius: 4px; padding: 1px 4px; }
.prompt-item b { font-size: 10px; font-weight: 500; }
.prompt-item p { color: var(--muted); font-size: 8.5px; line-height: 1.55; margin: 5px 0 6px; }
.prompt-actions { display: flex; gap: 10px; }
.idea-library { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.idea-lib-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; background: var(--panel); }
.idea-lib-top { display: flex; justify-content: space-between; align-items: center; }
.idea-lib-top span { color: var(--muted); font-size: 7.5px; }
.idea-lib-top em { color: var(--accent); font-family: var(--serif); font-size: 11px; font-style: normal; }
.idea-lib-card h3 { font-family: var(--serif); font-size: 14px; font-weight: 500; margin: 4px 0; }
.idea-lib-card p { color: var(--muted); font-size: 8.5px; line-height: 1.55; min-height: 34px; }
.idea-lib-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 5px; }
.idea-lib-foot small { color: var(--muted-2); font-size: 7.5px; }
.competitor-table { border-top: 1px solid var(--line); }
.competitor-head, .competitor-row { display: grid; grid-template-columns: 1.25fr 1.4fr 55px 90px; gap: 8px; align-items: center; padding: 7px 2px; border-bottom: 1px solid var(--line); }
.competitor-head { color: var(--muted-2); font-size: 7.5px; }
.competitor-row b { display: block; font-size: 9.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.competitor-row small { color: var(--muted-2); font-size: 7.5px; }
.competitor-row p { margin: 0; color: var(--muted); font-size: 8.5px; line-height: 1.5; }
.competitor-row em { color: var(--accent); font-family: var(--serif); font-size: 10px; font-style: normal; }
.competitor-row > span { color: var(--muted-2); font-size: 8px; }
.genre-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.genre-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; background: var(--panel); }
.genre-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.genre-top b { font-family: var(--serif); font-size: 14px; font-weight: 500; }
.genre-top em { color: var(--accent); font-family: var(--serif); font-size: 12px; font-style: normal; }
.heat-bar { height: 4px; border-radius: 99px; background: rgba(255,255,255,.06); margin: 6px 0; overflow: hidden; }
.heat-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.genre-card p { color: var(--muted); font-size: 8.5px; line-height: 1.5; margin: 0 0 6px; }
.genre-meta { display: flex; gap: 8px; color: var(--muted-2); font-size: 7.5px; margin-bottom: 4px; }
.genre-card small { display: block; color: var(--muted-2); font-size: 7.5px; line-height: 1.5; min-height: 28px; }
.genre-card .link-btn { margin-top: 5px; font-size: 8px; }

/* self check / deai / adapt / batch / diagnosis / dashboard */
.selfcheck-top { display: flex; gap: 13px; align-items: center; padding: 10px 12px; border: 1px solid rgba(231,185,106,.2); border-radius: 8px; background: var(--accent-dim); margin-bottom: 10px; }
.selfcheck-top p { margin: 0 0 6px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.selfcheck-score { width: 66px; height: 66px; flex: 0 0 66px; border: 1px solid var(--accent); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.selfcheck-score b { color: var(--accent); font-family: var(--serif); font-size: 22px; font-weight: 500; line-height: 1; }
.selfcheck-score span { color: var(--muted); font-size: 7.5px; margin-top: 2px; }
.selfcheck-cat { margin-top: 10px; }
.selfcheck-cat-head { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-bottom: 4px; }
.selfcheck-cat-head span { color: var(--text-2); font-size: 9.5px; }
.selfcheck-cat-head small { color: var(--muted-2); font-size: 7.5px; }
.selfcheck-item { width: 100%; display: flex; align-items: flex-start; gap: 6px; text-align: left; padding: 5px 2px; border: 0; border-bottom: 1px solid rgba(255,255,255,.03); background: transparent; color: var(--muted); font-family: var(--sans); font-size: 8.5px; line-height: 1.55; cursor: pointer; }
.selfcheck-item:hover { color: var(--text); }
.selfcheck-box { width: 13px; height: 13px; flex: 0 0 13px; border: 1px solid var(--line); border-radius: 3px; display: grid; place-items: center; margin-top: 1px; }
.selfcheck-box .icon { width: 9px; height: 9px; color: var(--accent); }
.selfcheck-item.done { color: var(--text-2); }
.selfcheck-item.done .selfcheck-box { border-color: var(--accent); background: rgba(231,185,106,.1); }
.selfcheck-item b { color: var(--muted-2); font-family: var(--serif); font-size: 8px; font-weight: 400; flex: 0 0 18px; }
.selfcheck-item > span:nth-of-type(2) { flex: 1; }
.selfcheck-item em { color: var(--teal); font-size: 7px; font-style: normal; white-space: nowrap; }
.selfcheck-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.draft-block.is-editing { border-color: rgba(231, 185, 106, 0.42); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2); }
.draft-edit-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 6px; }
.draft-edit-label span { color: var(--accent); }
.draft-edit-label em { color: var(--muted-2); font-style: normal; }
#draftRevisePrompt { width: 100%; min-height: 112px; resize: vertical; background: rgba(0, 0, 0, 0.2); border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); font-family: var(--sans); line-height: 1.7; padding: 10px 12px; outline: none; }
#draftRevisePrompt:focus { border-color: rgba(231, 185, 106, 0.55); }
.draft-revise-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin: 7px 0; }
.draft-revise-suggestions button { border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--muted); padding: 3px 7px; font: inherit; }
.draft-revise-suggestions button:hover { color: var(--accent); border-color: rgba(231, 185, 106, 0.35); }
.draft-edit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.draft-edit-note { margin: 7px 0 0; color: var(--muted-2); line-height: 1.5; }
#draftEditText { width: 100%; min-height: 340px; resize: vertical; background: rgba(0, 0, 0, 0.2); border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); font-family: var(--serif); line-height: 1.85; padding: 12px 13px; outline: none; }
#draftEditText:focus { border-color: rgba(231, 185, 106, 0.55); }
.draft-auto-skills { margin-top: 9px; padding-top: 8px; border-top: 1px solid rgba(231, 185, 106, 0.16); }
.draft-auto-skills > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; color: var(--accent); }
.draft-auto-skills > summary::-webkit-details-marker { display: none; }
.draft-auto-skills > summary em { color: var(--muted); font-style: normal; }
.draft-auto-skills-body { margin-top: 7px; }
.skill-result-wrap { padding-bottom: 8px; }
.skill-result-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.skill-decision { margin-right: auto; color: var(--muted); font-size: 9px; }
.auto-skill-result { margin-top: 5px; border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; }
.auto-skill-result > summary { cursor: pointer; color: var(--text-2); list-style: none; }
.auto-skill-result > summary::-webkit-details-marker { display: none; }
.auto-skill-result .result-text { margin-top: 6px; }
.draft-signing { margin-top: 11px; padding-top: 9px; border-top: 1px solid rgba(111, 211, 199, 0.18); }
.draft-signing summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; color: var(--teal); list-style: none; }
.draft-signing summary::-webkit-details-marker { display: none; }
.draft-signing summary b { font-family: var(--serif); font-weight: 500; }
.draft-signing summary em { color: var(--muted); font-style: normal; }
.draft-signing-body { margin-top: 9px; }
.draft-signing-advice { margin: 0 0 8px; color: var(--text-2); line-height: 1.65; }
.signing-block { border-color: rgba(111, 211, 199, 0.2); }
.signing-top { display: flex; align-items: center; gap: 14px; margin: 10px 0 12px; }
.signing-score { width: 74px; height: 74px; flex: 0 0 74px; border: 1px solid rgba(111, 211, 199, 0.42); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(111, 211, 199, 0.045); }
.signing-score b { color: var(--teal); font-family: var(--serif); font-size: 24px; font-weight: 500; line-height: 1; }
.signing-score span { color: var(--muted); margin-top: 3px; }
.signing-summary { min-width: 0; }
.signing-summary p { margin: 0 0 7px; color: var(--text-2); line-height: 1.65; }
.signing-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.signing-chips span { border: 1px solid var(--line); border-radius: 5px; padding: 3px 7px; color: var(--muted); }
.signing-platforms { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 10px; color: var(--muted); }
.signing-platforms b { color: var(--text-2); font-weight: 500; }
.signing-platforms span { color: var(--accent); border: 1px solid var(--line); border-radius: 5px; padding: 3px 7px; }
.signing-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.015); }
.signing-two small { color: var(--muted-2); display: block; margin-bottom: 3px; }
.signing-two p { margin: 0; color: var(--text-2); line-height: 1.55; }
.signing-details { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.signing-details summary { cursor: pointer; color: var(--accent); list-style: none; }
.signing-details summary::-webkit-details-marker { display: none; }
.signing-details summary::after { content: " 展开"; color: var(--muted); }
.signing-details[open] summary::after { content: ""; }
.signing-strengths { margin: 9px 0 4px; padding: 8px 10px; border-left: 2px solid rgba(111,211,199,.35); background: rgba(111,211,199,.035); }
.signing-strengths b { color: var(--teal); font-weight: 500; }
.signing-strengths ul { margin: 5px 0 0; padding-left: 18px; color: var(--text-2); line-height: 1.6; }
.signing-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; margin-top: 8px; }
.signing-list section { min-width: 0; margin-bottom: 7px; }
.signing-list h4 { margin: 0 0 3px; color: var(--text-2); font-weight: 500; border-bottom: 1px solid var(--line); padding-bottom: 3px; }
.signing-item { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; gap: 5px; align-items: start; padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,.025); color: var(--muted); }
.signing-item > span { color: var(--muted-2); font-family: var(--serif); }
.signing-item p { margin: 0; line-height: 1.5; }
.signing-item em { font-style: normal; white-space: nowrap; color: var(--muted-2); }
.signing-item.checked em { color: var(--teal); }
.signing-item.auto em { color: var(--accent); }
.signing-foot { margin: 8px 0 0; color: var(--muted-2); }
.deai-score { display: inline-flex; align-items: baseline; gap: 6px; margin-bottom: 8px; }
.deai-score b { color: var(--teal); font-family: var(--serif); font-size: 28px; font-weight: 500; }
.deai-score.bad b { color: var(--danger); }
.deai-score span { color: var(--muted); font-size: 8px; }
.deai-flags { display: grid; gap: 5px; }
.deai-flag { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: var(--panel); }
.deai-flag b { display: block; color: var(--accent); font-size: 9px; font-weight: 500; margin-bottom: 2px; }
.deai-flag span { display: block; color: var(--muted); font-size: 8.5px; line-height: 1.5; }
.deai-flag small { display: block; color: var(--muted-2); font-size: 7.5px; margin-top: 2px; }
.deai-flag.danger { border-color: rgba(239,122,109,.25); }
.adapt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.adapt-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; background: var(--panel); }
.adapt-top { display: flex; justify-content: space-between; align-items: center; }
.adapt-top b { color: var(--text-2); font-size: 9px; font-weight: 500; }
.adapt-card h3 { font-family: var(--serif); font-size: 14px; font-weight: 500; margin: 4px 0; }
.adapt-card p { color: var(--muted); font-size: 8.5px; line-height: 1.55; margin: 0 0 6px; }
.adapt-card > div:not(.adapt-top) { display: grid; grid-template-columns: 30px 1fr; gap: 4px; color: var(--muted-2); font-size: 7.5px; line-height: 1.5; margin-top: 4px; }
.adapt-card > div:not(.adapt-top) span { color: var(--accent); }
.batch-list { margin: 0; padding-left: 20px; color: var(--text-2); font-size: 10px; line-height: 1.85; }
.diagnosis-head { display: flex; align-items: center; gap: 15px; padding: 12px 13px; border: 1px solid rgba(231,185,106,.22); border-radius: 9px; background: var(--accent-dim); margin-bottom: 12px; }
.diagnosis-score { width: 76px; height: 76px; flex: 0 0 76px; border: 1px solid var(--accent); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.diagnosis-score b { color: var(--accent); font-family: var(--serif); font-size: 26px; font-weight: 500; line-height: 1; }
.diagnosis-score span { color: var(--muted); font-size: 7.5px; margin-top: 3px; }
.diagnosis-head h2 { margin: 0 0 4px; font-family: var(--serif); font-size: 17px; font-weight: 500; }
.diagnosis-head p { margin: 0; color: var(--muted); font-size: 8.5px; line-height: 1.5; }
.diagnosis-section { border-top: 1px solid var(--line); padding-top: 9px; margin-top: 9px; }
.diagnosis-section h3 { font-family: var(--serif); font-size: 13px; font-weight: 500; margin: 0 0 6px; }
.diagnosis-section ul, .diagnosis-section ol { margin: 0; padding-left: 20px; color: var(--text-2); font-size: 9px; line-height: 1.75; }
.diagnosis-risks li { color: #c9a39e; }
.dashboard-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 12px; }
.dashboard-cards > div { padding: 10px 11px; border: 1px solid var(--line); border-radius: 7px; }
.dashboard-cards span { display: block; color: var(--muted-2); font-size: 7.5px; margin-bottom: 3px; }
.dashboard-cards b { display: block; color: var(--text); font-family: var(--serif); font-size: 18px; font-weight: 500; }
.dashboard-bars { display: grid; gap: 9px; }
.dashboard-bar { display: grid; grid-template-columns: 1fr 38px; gap: 5px 10px; align-items: center; }
.dashboard-bar > div:first-child { display: flex; justify-content: space-between; gap: 8px; }
.dashboard-bar span { color: var(--text-2); font-size: 9px; }
.dashboard-bar small { color: var(--muted-2); font-size: 7.5px; }
.bar-track { grid-column: 1; height: 5px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: hidden; }
.bar-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--accent)); border-radius: inherit; }
.dashboard-bar > b { grid-column: 2; grid-row: 1 / span 2; color: var(--accent); font-family: var(--serif); font-size: 16px; font-weight: 500; text-align: right; }
.dashboard-note { margin-top: 12px; padding-top: 9px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 8.5px; line-height: 1.55; }

/* 新手友好的工具箱首屏 */
.toolbox-simple { max-width: 1120px; }
.toolbox-hero-simple { padding: 28px 30px 24px; border: 1px solid var(--line); border-radius: 12px; background: radial-gradient(700px 300px at 15% 0%, rgba(231,185,106,.08), transparent 70%), var(--panel); }
.toolbox-hero-simple h1 { margin: 5px 0 7px; font-family: var(--serif); font-size: 34px; font-weight: 500; letter-spacing: -.03em; }
.toolbox-hero-simple > p { margin: 0 0 17px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.tool-intent-bar { display: flex; gap: 8px; align-items: stretch; }
.tool-intent-bar input { flex: 1; height: 44px; border: 1px solid rgba(231,185,106,.3); border-radius: 8px; background: rgba(0,0,0,.18); color: var(--text); padding: 0 13px; font: 11px var(--sans); outline: none; }
.tool-intent-bar input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(231,185,106,.07); }
.tool-intent-bar .btn { height: 44px; white-space: nowrap; }
.intent-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.intent-chips button { border: 1px solid var(--line); border-radius: 99px; background: transparent; color: var(--muted); font: 9px var(--sans); padding: 5px 9px; cursor: pointer; }
.intent-chips button:hover { color: var(--accent); border-color: rgba(231,185,106,.35); }
.next-step-card { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 13px; align-items: center; padding: 16px 18px; margin: 13px 0; border: 1px solid rgba(231,185,106,.25); border-radius: 10px; background: var(--accent-dim); }
.next-step-mark { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(231,185,106,.35); border-radius: 50%; color: var(--accent); }
.next-step-mark .icon { width: 14px; height: 14px; }
.next-step-copy span { color: var(--accent); font-size: 8px; letter-spacing: 1.2px; }
.next-step-copy h2 { margin: 3px 0 3px; font-family: var(--serif); font-size: 19px; font-weight: 500; }
.next-step-copy p { margin: 0; color: var(--muted); font-size: 9.5px; line-height: 1.55; }
.next-step-action { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.next-step-action small { color: var(--muted-2); font-size: 8px; }
.intent-grid-simple { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.intent-card-simple { display: flex; flex-direction: column; align-items: flex-start; min-height: 132px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--text); text-align: left; cursor: pointer; transition: border-color .18s, transform .18s, background .18s; }
.intent-card-simple:hover { border-color: rgba(231,185,106,.35); background: rgba(231,185,106,.035); transform: translateY(-1px); }
.intent-icon { width: 27px; height: 27px; display: grid; place-items: center; color: var(--accent); border: 1px solid rgba(231,185,106,.22); border-radius: 7px; margin-bottom: 8px; }
.intent-icon .icon { width: 14px; height: 14px; }
.intent-card-simple b { font-family: var(--serif); font-size: 15px; font-weight: 500; }
.intent-card-simple p { color: var(--muted); font-size: 9px; line-height: 1.55; margin: 4px 0 8px; flex: 1; }
.intent-card-simple em { color: var(--accent); font-size: 8px; font-style: normal; display: flex; align-items: center; gap: 3px; }
.intent-card-simple em .icon { width: 10px; height: 10px; }
.toolbox-extra-link { margin: 10px 0 0; }
.toolbox-extra-link .link-btn { font-size: 8.5px; }
.toolbox-status-line { display: flex; flex-wrap: wrap; gap: 15px; margin: 15px 0 6px; color: var(--muted-2); font-size: 8.5px; }
.toolbox-status-line b { color: var(--text-2); font-weight: 500; }
.tool-catalog { margin-top: 13px; border-top: 1px solid var(--line); padding-top: 11px; }
.tool-catalog summary { list-style: none; display: flex; align-items: baseline; gap: 9px; cursor: pointer; color: var(--text-2); font-size: 11px; }
.tool-catalog summary::-webkit-details-marker { display: none; }
.tool-catalog summary small { color: var(--muted-2); font-size: 8.5px; }
.tool-catalog summary i { margin-left: auto; color: var(--accent); font-style: normal; font-size: 8.5px; }
.tool-catalog-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 9px; }
.tool-chip { display: grid; grid-template-columns: 20px minmax(0,1fr) auto; gap: 5px; align-items: center; padding: 7px 8px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--text-2); text-align: left; cursor: pointer; }
.tool-chip:hover { border-color: rgba(231,185,106,.3); background: rgba(231,185,106,.03); }
.tool-chip > span { color: var(--accent); display: grid; place-items: center; }
.tool-chip .icon { width: 12px; height: 12px; }
.tool-chip b { font-size: 8.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-chip small { color: var(--muted-2); font-size: 7px; }
.tool-catalog-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 9px; flex-wrap: wrap; }
.tool-catalog-foot span { color: var(--muted-2); font-size: 8px; }
.toolbox-simple .toolbox-note { margin-top: 12px; }
@media (max-width: 900px) {
  .intent-grid-simple { grid-template-columns: 1fr 1fr; }
  .tool-catalog-grid { grid-template-columns: 1fr 1fr; }
  .next-step-card { grid-template-columns: 30px 1fr; }
  .next-step-action { grid-column: 2; flex-direction: row; align-items: center; }
}
@media (max-width: 620px) {
  .toolbox-hero-simple { padding: 20px 16px; }
  .toolbox-hero-simple h1 { font-size: 28px; }
  .tool-intent-bar { flex-direction: column; }
  .intent-grid-simple { grid-template-columns: 1fr; }
  .intent-card-simple { min-height: 105px; }
  .tool-catalog-grid { grid-template-columns: 1fr; }
  .next-step-card { grid-template-columns: 1fr; }
  .next-step-action { grid-column: 1; align-items: flex-start; }
}
@media (max-width: 900px) {
  .toolbox-grid { grid-template-columns: 1fr 1fr; }
  .toolbox-stats { grid-template-columns: repeat(3, 1fr); }
  .prompt-library, .idea-library, .genre-grid, .adapt-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .toolbox-grid { grid-template-columns: 1fr; }
  .toolbox-stats { grid-template-columns: 1fr 1fr; }
  .tool-form-grid, .tool-stats-row { grid-template-columns: 1fr; }
  .archive-grid { grid-template-columns: 1fr; }
  .competitor-head, .competitor-row { grid-template-columns: 1fr 1fr; }
  .competitor-head span:nth-child(3), .competitor-row em, .competitor-head span:nth-child(4), .competitor-row > span { display: none; }
  .diagnosis-head { align-items: flex-start; }
  .dashboard-cards { grid-template-columns: 1fr 1fr; }
}

/* mobile toolbox final overrides */
@media (max-width: 640px) {
  .toolbox-hero-simple { padding: 16px 14px 14px; border-radius: 10px; }
  .toolbox-hero-simple h1 { font-size: 26px; margin: 4px 0 6px; }
  .toolbox-hero-simple > p { font-size: 11px; line-height: 1.65; margin-bottom: 12px; }
  .tool-intent-bar { flex-direction: column; gap: 6px; }
  .tool-intent-bar input { width: 100%; height: 40px; font-size: 14px; padding: 0 11px; }
  .tool-intent-bar .btn { width: 100%; height: 38px; justify-content: center; font-size: 11px; }
  .intent-chips { gap: 5px; margin-top: 8px; }
  .intent-chips button { font-size: 9px; padding: 5px 8px; }
  .next-step-card { grid-template-columns: 28px minmax(0, 1fr); gap: 8px 10px; padding: 12px; margin: 10px 0; }
  .next-step-mark { width: 28px; height: 28px; }
  .next-step-mark .icon { width: 12px; height: 12px; }
  .next-step-copy span { font-size: 7.5px; }
  .next-step-copy h2 { font-size: 16px; margin: 3px 0 2px; }
  .next-step-copy p { font-size: 9.5px; line-height: 1.5; }
  .next-step-action { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; width: 100%; padding-top: 8px; border-top: 1px solid rgba(231,185,106,.16); }
  .next-step-action small { font-size: 8px; }
  .next-step-action .btn { font-size: 10px; padding: 7px 10px; }
  .intent-grid-simple { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .intent-card-simple { min-height: 0; padding: 10px; border-radius: 8px; }
  .intent-icon { width: 24px; height: 24px; margin-bottom: 6px; }
  .intent-icon .icon { width: 12px; height: 12px; }
  .intent-card-simple b { font-size: 13px; }
  .intent-card-simple p { font-size: 8.5px; line-height: 1.45; margin: 3px 0 7px; }
  .intent-card-simple em { font-size: 8px; }
  .toolbox-status-line, .toolbox-note { display: none; }
  .cloud-backup-card { align-items: stretch; flex-direction: column; gap: 9px; }
  .cloud-backup-actions { justify-content: stretch; }
  .cloud-backup-actions .btn { flex: 1 1 auto; }
}

