:root {
  color-scheme: light;
  --bg: #faf9f5; --panel: #ffffff; --panel-2: #f5f4ee; --text: #1f1e1d; --muted: #6f6d66; --line: #e6e3d9;
  --primary: #c96442; --primary-weak: #f6e5dc; --danger: #b3261e; --warn: #b7791f; --ok: #3f7d4e;
  --todo: #78756c; --doing: #c96442; --blocked: #b3261e; --done: #3f7d4e;
  --side: #f0eee6; --side-hover: #e5e2d7; --side-text: #3d3c38; --side-strong: #1f1e1d; --side-muted: #7b786f; --side-line: #e0ddd2;
  --brand-mark: #c96442; --user-bubble: #efece3; --mark: #f5dfb8; --toast: #2b2a27;
  --col: #f0eee6; --chip: #f0eee6; --chip-text: #5e5c56; --code: #f0eee6;
  --series-1: #c96442; --series-2: #6a8caf; --series-3: #7d9a5b; --grid: #e7e5dd; --surface-1: #fcfbf8;
  --radius: 12px; --shadow: 0 1px 2px rgba(31,30,29,.04);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #262624; --panel: #30302e; --panel-2: #2b2a27; --text: #f3f1ea; --muted: #a8a59c; --line: #3d3c38;
    --primary: #d97757; --primary-weak: #4a3027; --danger: #e5766b; --warn: #d9a441; --ok: #7fb08a;
    --todo: #a8a59c; --doing: #d97757; --blocked: #e5766b; --done: #7fb08a;
    --side: #1f1e1d; --side-hover: #30302e; --side-text: #c9c6bc; --side-strong: #f3f1ea; --side-muted: #8f8c83; --side-line: #33322f;
    --brand-mark: #d97757; --user-bubble: #3b3a36; --mark: #6b4e1f; --toast: #f3f1ea;
    --col: #2b2a27; --chip: #3a3935; --chip-text: #d3d0c6; --code: #1f1e1d;
    --series-1: #d97757; --series-2: #7fa3c7; --series-3: #93b06f; --grid: #3d3c38; --surface-1: #2b2a27;
    --shadow: 0 1px 2px rgba(0,0,0,.25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #262624; --panel: #30302e; --panel-2: #2b2a27; --text: #f3f1ea; --muted: #a8a59c; --line: #3d3c38;
  --primary: #d97757; --primary-weak: #4a3027; --danger: #e5766b; --warn: #d9a441; --ok: #7fb08a;
  --todo: #a8a59c; --doing: #d97757; --blocked: #e5766b; --done: #7fb08a;
  --side: #1f1e1d; --side-hover: #30302e; --side-text: #c9c6bc; --side-strong: #f3f1ea; --side-muted: #8f8c83; --side-line: #33322f;
  --brand-mark: #d97757; --user-bubble: #3b3a36; --mark: #6b4e1f; --toast: #f3f1ea;
  --col: #2b2a27; --chip: #3a3935; --chip-text: #d3d0c6; --code: #1f1e1d;
  --series-1: #d97757; --series-2: #7fa3c7; --series-3: #93b06f; --grid: #3d3c38; --surface-1: #2b2a27;
  --shadow: 0 1px 2px rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.55 -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; }
[v-cloak] { display: none; }
a { color: var(--primary); text-decoration: none; }
button { font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  padding: 6px 12px; border-radius: 8px; white-space: nowrap; }
button:hover { border-color: var(--muted); }
button.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
button.primary:hover { filter: brightness(1.08); }
button.danger { color: var(--danger); }
button.ghost { border-color: transparent; background: transparent; }
button.small { padding: 3px 9px; font-size: 12px; }
button:disabled { opacity: .55; cursor: default; }
input, select, textarea { font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--text); width: 100%; }
input[type=checkbox] { width: auto; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-weak); border-color: var(--primary); }
textarea { resize: vertical; min-height: 70px; }
label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
kbd { font: 11px ui-monospace, Consolas, monospace; background: var(--chip); border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 4px; padding: 0 5px; }

/* 布局 */
.layout { display: flex; min-height: 100vh; min-height: 100dvh; }
.side { width: 212px; background: var(--side); color: var(--side-text); padding: 16px 10px; flex-shrink: 0; display: flex;
  flex-direction: column; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; }
.side .brand { color: var(--side-strong); font-weight: 700; font-size: 16px; padding: 2px 10px 16px; display: flex; align-items: center; gap: 8px; }
.side .brand i { width: 26px; height: 26px; border-radius: 8px; background: var(--brand-mark); display: inline-block; }
.side .group { font-size: 11px; color: var(--side-muted); padding: 12px 10px 4px; letter-spacing: .05em; }
.side a { display: flex; justify-content: space-between; align-items: center; color: var(--side-text); padding: 8px 10px;
  border-radius: 8px; margin-bottom: 1px; }
.side a.active, .side a:hover { background: var(--side-hover); color: var(--side-strong); }
.side a.active { font-weight: 600; }
.side .me { margin-top: auto; padding: 10px; font-size: 13px; color: var(--side-muted); border-top: 1px solid var(--side-line); }
.side .me a { padding: 4px 0; display: inline; color: var(--side-muted); }
.badge { background: var(--danger); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 7px; line-height: 18px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 12px 26px; border-bottom: 1px solid var(--line);
  background: var(--panel); position: sticky; top: 0; z-index: 5; }
.topbar .search { max-width: 380px; }
.content { padding: 20px 26px 40px; }
.head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.head h1 { font-size: 22px; margin: 0 auto 0 0; }
/* 标题用衬线体（英文 Georgia；中文有衬线字体就用，没有就回到雅黑） */
.head h1, .login h1, .side .brand { font-family: Georgia, "Noto Serif SC", "Source Han Serif SC", "Songti SC", "PingFang SC", "Microsoft YaHei", serif;
  font-weight: 500; letter-spacing: .01em; }
.panel { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 16px;
  border: 1px solid var(--line); }
.panel h3 { margin: 0 0 12px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.muted { color: var(--muted); }
.small-text { font-size: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* 统计卡片 */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); cursor: pointer; }
.tile .k { font-size: 12px; color: var(--muted); }
.tile .v { font-size: 28px; font-weight: 650; line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile .s { font-size: 12px; color: var(--muted); }
.tile.alert .v { color: var(--danger); }

/* 图表 */
.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .axis text { fill: var(--muted); font-size: 11px; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.tip { position: absolute; pointer-events: none; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0,0,0,.12);
  border-radius: 8px; padding: 7px 10px; font-size: 12px; white-space: nowrap; z-index: 3; color: var(--text); }
.tip b { font-variant-numeric: tabular-nums; }
.loadrow { display: grid; grid-template-columns: 64px 1fr 64px; gap: 8px; align-items: center; padding: 4px 0; font-size: 13px; }
.stack { display: flex; height: 14px; gap: 2px; }
.stack span { display: block; height: 100%; min-width: 3px; }
.stack span:first-child { border-radius: 4px 0 0 4px; }
.stack span:last-child { border-radius: 0 4px 4px 0; }
.stack span:only-child { border-radius: 4px; }

/* 进度条 */
.bar { height: 6px; background: var(--chip); border-radius: 99px; overflow: hidden; margin: 8px 0; }
.bar i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }

/* 今日计划 */
.plan .md { max-height: 240px; overflow: auto; }
.plan.open .md { max-height: none; }
.md h1, .md h2, .md h3 { font-size: 15px; margin: 12px 0 6px; }
.md ul, .md ol { padding-left: 20px; margin: 4px 0; }
.md p { margin: 4px 0; }
.md table { margin: 6px 0; }
.md code { font-size: 12px; }

/* 看板 */
.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 14px; align-items: start; }
.col { background: var(--col); border-radius: var(--radius); padding: 10px; min-height: 160px; }
.col.over { outline: 2px dashed var(--primary); }
.col h3 { margin: 2px 4px 10px; font-size: 13px; display: flex; justify-content: space-between; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.card { background: var(--panel); border-radius: 9px; padding: 9px 11px; margin-bottom: 8px; box-shadow: var(--shadow);
  cursor: pointer; border-left: 3px solid transparent; position: relative; }
.card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.12); }
.card.p1 { border-left-color: var(--danger); }
.card.p2 { border-left-color: var(--warn); }
.card.p3 { border-left-color: var(--line); }
.card.sel { outline: 2px solid var(--primary); }
.card .t { font-weight: 500; }
.card .meta { font-size: 12px; color: var(--muted); margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card .cb { position: absolute; top: 8px; right: 8px; display: none; }
.card:hover .cb, .card.sel .cb { display: block; }
.today { color: var(--primary); }
.overdue { color: var(--danger); }
.chip { display: inline-block; font-size: 11px; padding: 0 7px; border-radius: 999px; background: var(--chip); color: var(--chip-text); line-height: 18px; }
.chip.ai { background: #f3e8ff; color: #7e22ce; }
:root[data-theme="dark"] .chip.ai { background: #3b2457; color: #d8b4fe; }
.chip.proj { border-left: 3px solid var(--pc, var(--primary)); border-radius: 4px; }
.st { font-size: 12px; padding: 1px 8px; border-radius: 999px; color: #fff; white-space: nowrap; }
.st.todo { background: var(--todo); } .st.doing { background: var(--doing); } .st.blocked { background: var(--blocked); } .st.done { background: var(--done); }
.bulkbar { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--side); color: #fff; border-radius: 12px;
  padding: 10px 14px; display: flex; gap: 8px; align-items: center; z-index: 9; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.bulkbar select, .bulkbar button { width: auto; }

/* 项目 */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pcard { border-top: 4px solid var(--pc, var(--primary)); cursor: pointer; margin: 0; }
.pcard:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.pcard .nums { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }

/* 抽屉 / 弹窗 */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 10; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(580px, 100vw); background: var(--panel); z-index: 11;
  box-shadow: -4px 0 24px rgba(0,0,0,.15); padding: 20px 22px; overflow-y: auto; }
.drawer h2 { margin: 0 0 6px; font-size: 18px; }
.modal { position: fixed; z-index: 11; top: 5vh; left: 50%; transform: translateX(-50%); width: min(960px, 94vw); max-height: 90vh;
  background: var(--panel); border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0,0,0,.25); display: flex; flex-direction: column; }
.modal .mh { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.modal .mb { padding: 14px 16px; overflow: auto; flex: 1; }
.modal iframe { width: 100%; height: 68vh; border: 0; background: #fff; border-radius: 8px; }
.modal img { max-width: 100%; display: block; margin: auto; }
.modal pre { white-space: pre-wrap; max-height: 68vh; overflow: auto; }
.logs { border-left: 2px solid var(--line); padding-left: 12px; margin-top: 8px; }
.logs div { margin-bottom: 8px; font-size: 13px; }
.logs .when { color: var(--muted); font-size: 12px; }
.sub { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.sub.done span { text-decoration: line-through; color: var(--muted); }

/* 通知 */
.bell { position: relative; }
.bell .badge { position: absolute; top: -6px; right: -8px; }
.dropdown { position: absolute; right: 0; top: 38px; width: 380px; max-height: 70vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.18); z-index: 20; }
.dropdown .item { padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.dropdown .item:hover { background: var(--panel-2); }
.dropdown .item.unread { border-left: 3px solid var(--primary); }
.dropdown .item .b { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* 动态 */
.feed div { padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.feed div:last-child { border: 0; }
.feed .when { color: var(--muted); font-size: 12px; margin-right: 6px; font-variant-numeric: tabular-nums; }

/* 表格 */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 500; }
tr.unread td:first-child { font-weight: 600; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--panel-2); }
.files-wrap { display: grid; grid-template-columns: 190px 1fr; gap: 16px; }
.cats a { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 8px; color: var(--text); }
.cats a.active, .cats a:hover { background: var(--primary-weak); color: var(--primary); }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 18px; text-align: center; color: var(--muted); }
.drop.over { border-color: var(--primary); background: var(--primary-weak); }
mark { background: var(--mark); color: inherit; padding: 0 2px; border-radius: 3px; }

/* 团队 */
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }

/* AI 助手 */
.chat { display: flex; flex-direction: column; height: calc(100vh - 150px); height: calc(100dvh - 150px); min-height: 360px; }
.chat .msgs { flex: 1; overflow-y: auto; padding: 4px 2px 10px; }
.msg { margin: 10px 0; display: flex; }
.msg .bubble { max-width: 82%; padding: 10px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.msg.user { justify-content: flex-end; }
.msg.user .bubble { background: var(--user-bubble); color: var(--text); border-color: transparent; }
.msg .acts { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.msg .acts span { display: inline-block; margin: 0 6px 3px 0; padding: 1px 7px; background: var(--chip); border-radius: 6px; }
.msg .acts span.fail { color: var(--danger); }
.chat .input { display: flex; gap: 8px; align-items: flex-end; }
.chat .input textarea { min-height: 46px; max-height: 160px; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.suggest button { font-size: 13px; border-radius: 999px; }
.fab { position: fixed; right: 22px; bottom: 22px; width: 52px; height: 52px; border-radius: 50%; border: 0; z-index: 8;
  background: var(--primary); color: #fff; font-size: 22px; box-shadow: 0 6px 20px rgba(0,0,0,.15); }

/* 登录 */
.login { max-width: 360px; margin: 12vh auto; }
.login h1 { text-align: center; font-size: 22px; }

.toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); background: var(--toast); color: var(--bg);
  padding: 9px 16px; border-radius: 8px; z-index: 50; font-size: 13px; max-width: 80vw; }
.toast.err { background: var(--danger); }
code, pre { font-family: ui-monospace, Consolas, monospace; background: var(--code); border-radius: 6px; }
code { padding: 1px 5px; } pre { padding: 10px 12px; overflow-x: auto; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: s .7s linear infinite; vertical-align: -2px; }
@keyframes s { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--muted); padding: 30px 0; }
.keys td { padding: 5px 8px; }

@media (max-width: 1100px) {
  .grid2 { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .grid3 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .side { width: auto; height: auto; position: static; flex-direction: row; flex-wrap: wrap; padding: 8px; gap: 2px; }
  .side .brand { padding: 6px 10px; width: 100%; }
  .side .group { display: none; }
  .side .me { margin: 0 0 0 auto; border: 0; padding: 8px 10px; font-size: 12px; align-self: center; }
  .side .me .who { display: none; }
  .chat { height: calc(100dvh - 210px); }
  .topbar { padding: 10px 16px; position: static; }
  .content { padding: 14px 16px 40px; }
  .board { grid-template-columns: 1fr; }
  .files-wrap { grid-template-columns: 1fr; }
  .dropdown { width: 92vw; right: -40px; }
  .msg .bubble { max-width: 94%; }
}

/* 密码库 */
.vault { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.vault-lock { text-align: center; max-width: 520px; margin: 40px auto; padding: 32px; }
.vault-list { max-height: 75vh; overflow: auto; }
.vf { font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
.vi { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; }
.vi:hover { background: var(--panel-2); }
.vi.active { background: var(--primary-weak); color: var(--primary); }
.vt { width: 100%; }
.vt th { width: 90px; text-align: left; color: var(--muted); font-weight: 500; }
.vt td { word-break: break-all; }
.vt td.act { width: 1%; white-space: nowrap; text-align: right; }
.vnotes { white-space: pre-wrap; background: var(--panel-2); border-radius: 8px; padding: 10px 12px; margin-top: 10px; font-size: 13px; }
.mono { font-family: ui-monospace, Consolas, monospace; }
@media (max-width: 760px) { .vault { grid-template-columns: 1fr; } }
.devtable td, .devtable th { white-space: nowrap; }
.keybox { background: var(--panel-2); border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.alltable td { vertical-align: top; }
.alltable td .small { margin-left: 4px; }
.vfiles { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.vfile { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 13px; gap: 8px; }
.vfile .mono { word-break: break-all; }
.small-btn { display: inline-block; margin: 0; padding: 3px 9px; font-size: 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; color: var(--text); background: var(--panel); }
.badge.warn { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 9px; font-size: 11px; background: var(--warn); color: #fff; }
.scopebox { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 4px; margin: 0; padding: 3px 9px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; color: var(--text); font-size: 13px; }
.chip input { width: auto; margin: 0; }
.chip.on { border-color: var(--primary); background: var(--primary-weak); }
.exposed { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--warn); border-radius: 8px; font-size: 13px; background: color-mix(in srgb, var(--warn) 10%, transparent); }
.warnrow td { color: var(--warn); }
pre.wrap { white-space: pre-wrap; word-break: break-all; }

/* logo */
.side .brand img { width: 26px; height: 26px; display: block; }
.login h1 { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 4px 0 18px; }
.login h1 img { width: 40px; height: 40px; }
.login-note { background: var(--primary-weak); color: var(--text); padding: 8px 12px; border-radius: 8px; font-size: 13px; margin: 0 0 6px; }
/* 文字小标签（代替原来的 emoji） */
.tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 6px; font-size: 11px; line-height: 17px;
  background: var(--chip); color: var(--chip-text); vertical-align: 1px; }
.tag.warn { background: var(--primary-weak); color: var(--primary); }
.vf { text-transform: none; color: var(--muted); font-size: 12px; }

/* iPad / 手机：Safari 在输入框字号小于 16px 时会自动放大页面，放大后就不贴合屏幕了 */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px; }
  button { min-height: 34px; }
  button.small { min-height: 30px; }
}
/* 全面屏：内容不要被圆角和底部横条挡住 */
.content { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
.side { padding-left: max(10px, env(safe-area-inset-left)); }

/* ================= 生动一点：图标、问候、卡片、动效 ================= */
:root {
  --c0b: #efede6; --c0f: #6f6d66; --c1b: #f6e3da; --c1f: #a84f33; --c2b: #e3ecdc; --c2f: #4c6a3b; --c3b: #dfe8f2; --c3f: #3c6286;
  --c4b: #ebe4f3; --c4f: #674c88; --c5b: #f3e9d4; --c5f: #87672a; --c6b: #d9eeea; --c6f: #2d6c65;
  --lift: 0 6px 20px rgba(31,30,29,.07);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --c0b: #3a3935; --c0f: #c9c6bc; --c1b: #4a3027; --c1f: #f0a585; --c2b: #2f3a29; --c2f: #a9c98f; --c3b: #273544; --c3f: #9cc0e6;
  --c4b: #362c44; --c4f: #c6addf; --c5b: #403520; --c5f: #e3c27d; --c6b: #1f3a36; --c6f: #8fd3c8; --lift: 0 6px 20px rgba(0,0,0,.35); } }
:root[data-theme="dark"] {
  --c0b: #3a3935; --c0f: #c9c6bc; --c1b: #4a3027; --c1f: #f0a585; --c2b: #2f3a29; --c2f: #a9c98f; --c3b: #273544; --c3f: #9cc0e6;
  --c4b: #362c44; --c4f: #c6addf; --c5b: #403520; --c5f: #e3c27d; --c6b: #1f3a36; --c6f: #8fd3c8; --lift: 0 6px 20px rgba(0,0,0,.35); }

.ic { width: 18px; height: 18px; flex-shrink: 0; display: block; }
button > span:has(> .ic), h3 > span:has(> .ic), .vf > span:has(> .ic), .side a > span:has(> .ic) { display: inline-flex; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .15s, border-color .15s, transform .12s, box-shadow .15s; }
button:active:not(:disabled) { transform: scale(.97); }
button .ic { width: 16px; height: 16px; }
.panel { transition: box-shadow .2s, border-color .2s; }
.panel h3 .ic { color: var(--primary); }
a { transition: color .15s; }

/* 侧栏 */
.side a { justify-content: flex-start; gap: 10px; transition: background .15s, color .15s; }
.side a .ic { opacity: .75; }
.side a.active { background: var(--panel); box-shadow: var(--shadow); }
.side a.active .ic { opacity: 1; color: var(--primary); }
.side .me .who { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--side-strong); }
.side .me .who br { display: none; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center;
  justify-content: center; font-size: 13px; font-weight: 600; }

/* 页面切换淡入 */
.content { animation: rise .32s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 页头：问候 */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 0 18px; flex-wrap: wrap; }
.hero h1 { font-family: Georgia, "Noto Serif SC", "Source Han Serif SC", "Songti SC", "PingFang SC", "Microsoft YaHei", serif;
  font-weight: 500; font-size: 30px; margin: 2px 0 6px; letter-spacing: .01em; }
.hero-date { font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.hero-sub { color: var(--muted); font-size: 13.5px; }
.hero-sub b { color: var(--primary); font-weight: 600; }
.htitle { margin-right: auto; } .htitle h1 { margin: 0; }
.searchbox { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: 0 14px; width: 320px; max-width: 100%; transition: border-color .15s, box-shadow .15s; }
.searchbox:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-weak); }
.searchbox .ic { color: var(--muted); }
.searchbox input { border: 0; background: transparent; padding: 9px 0; outline: none !important; }

/* 上传区 */
.drop { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; text-align: left; padding: 18px 22px; margin-bottom: 16px;
  background: var(--panel); border: 1.5px dashed var(--line); cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.drop:hover { border-color: var(--primary); }
.drop.over { border-color: var(--primary); background: var(--primary-weak); transform: scale(1.01); }
.drop.has { cursor: default; }
.drop-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--primary-weak); color: var(--primary); display: flex;
  align-items: center; justify-content: center; transition: transform .25s; }
.drop-ic .ic { width: 22px; height: 22px; }
.drop:hover .drop-ic { transform: translateY(-3px); }
.drop.over .drop-ic { animation: bob .8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.drop-t { color: var(--text); font-weight: 600; font-size: 15px; }
.drop-s { color: var(--muted); font-size: 13px; margin-top: 2px; }
.drop-pending { width: 100%; border-top: 1px solid var(--line); padding-top: 12px; }
.pend-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pend { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2); border-radius: 8px; padding: 4px 10px 4px 4px; font-size: 13px; }

/* 文件类型小色标 */
.kind { display: inline-flex; align-items: center; justify-content: center; font: 700 9.5px/1 "Segoe UI", -apple-system, sans-serif;
  letter-spacing: .03em; color: #fff; border-radius: 6px; min-width: 30px; height: 20px; padding: 0 4px; font-style: normal; flex-shrink: 0; }
.kind.big { width: 44px; height: 52px; border-radius: 10px; font-size: 11px; position: relative; box-shadow: inset 0 -3px 0 rgba(0,0,0,.12); }
.kind.big::after { content: ""; position: absolute; top: 0; right: 0; width: 12px; height: 12px; border-radius: 0 10px 0 6px; background: rgba(255,255,255,.35); }
.k-red { background: #c4553f; } .k-blue { background: #3f6fb0; } .k-green { background: #3d8a58; } .k-orange { background: #d0853a; }
.k-violet { background: #7a5aa8; } .k-sand { background: #a8874a; } .k-gray { background: #8a877e; } .k-teal { background: #2f8a80; }

/* 分类条 */
.catbar { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; }
.catbar::-webkit-scrollbar { display: none; }
.cat { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; padding: 6px 12px; border-radius: 999px; font-size: 13px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text); transition: all .15s; }
.cat i { width: 8px; height: 8px; border-radius: 50%; background: var(--cf, var(--muted)); }
.cat span { color: var(--muted); font-size: 12px; }
.cat:hover { border-color: var(--cf, var(--primary)); }
.cat.active { background: var(--cb, var(--primary-weak)); border-color: transparent; color: var(--cf, var(--primary)); font-weight: 600; }
.cat.active span { color: inherit; opacity: .7; }
.c0 { --cb: var(--c0b); --cf: var(--c0f); } .c1 { --cb: var(--c1b); --cf: var(--c1f); } .c2 { --cb: var(--c2b); --cf: var(--c2f); }
.c3 { --cb: var(--c3b); --cf: var(--c3f); } .c4 { --cb: var(--c4b); --cf: var(--c4f); } .c5 { --cb: var(--c5b); --cf: var(--c5f); }
.c6 { --cb: var(--c6b); --cf: var(--c6f); }
.tag.cat-tag { background: var(--cb); color: var(--cf); }

/* 文件卡片 */
.flist { display: flex; flex-direction: column; gap: 10px; }
.fcard { display: flex; gap: 14px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; transition: transform .18s, box-shadow .18s, border-color .18s; animation: rise .35s ease both; }
.fcard:nth-child(2) { animation-delay: .03s; } .fcard:nth-child(3) { animation-delay: .06s; } .fcard:nth-child(4) { animation-delay: .09s; }
.fcard:nth-child(n+5) { animation-delay: .12s; }
.fcard:hover { transform: translateY(-2px); box-shadow: var(--lift); border-color: transparent; }
.fbody { flex: 1; min-width: 0; }
.ftitle { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 15px; font-weight: 600; }
.ftitle a { color: var(--text); word-break: break-all; } .ftitle a:hover { color: var(--primary); }
.fsum { color: var(--muted); font-size: 13px; margin-top: 4px; }
.fmeta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.hash { color: var(--primary); opacity: .85; }
.factions { display: flex; align-items: center; gap: 2px; opacity: 0; transition: opacity .15s; }
.fcard:hover .factions { opacity: 1; }
@media (hover: none) { .factions { opacity: 1; } }
.small-btn { font-size: 12px; padding: 4px 9px; border-radius: 8px; }
.small-btn:hover { background: var(--primary-weak); }
.tag.shimmer { background: linear-gradient(90deg, var(--chip) 0%, var(--primary-weak) 50%, var(--chip) 100%); background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite; color: var(--primary); }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty-art { text-align: center; color: var(--muted); padding: 50px 0 30px; }
.empty-ic { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 20px; background: var(--panel-2); color: var(--primary);
  display: flex; align-items: center; justify-content: center; animation: bob 3s ease-in-out infinite; }
.empty-ic .ic { width: 28px; height: 28px; }

/* AI 助手 */
.chat { height: calc(100vh - 60px); height: calc(100dvh - 60px); }
.chat.fresh .msgs { display: flex; align-items: center; justify-content: center; }
.welcome { text-align: center; max-width: 640px; padding: 10px; }
.welcome-logo { width: 56px; height: 56px; animation: bob 3.5s ease-in-out infinite; }
.welcome h1 { font-family: Georgia, "Noto Serif SC", "Source Han Serif SC", "Songti SC", "PingFang SC", "Microsoft YaHei", serif;
  font-weight: 500; font-size: 30px; margin: 14px 0 6px; }
.welcome .suggest { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.sugg { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; text-align: left; white-space: normal;
  justify-content: stretch; align-items: start; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); border-color: transparent; }
.sugg:hover { border-color: var(--primary); background: var(--panel); box-shadow: var(--lift); transform: translateY(-1px); }
.sugg-ic { grid-row: span 2; width: 32px; height: 32px; border-radius: 10px; background: var(--primary-weak); color: var(--primary);
  display: flex; align-items: center; justify-content: center; }
.sugg b { font-size: 14px; } .sugg > span:last-child { font-size: 12px; color: var(--muted); }
.chat-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.msg { gap: 10px; align-items: flex-start; animation: rise .25s ease both; }
.msg-av { width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; margin-top: 2px; }
.msg-av.thinking { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.88); opacity: .7; } }
.msg.assistant .bubble { background: transparent; border-color: transparent; padding-left: 2px; }
.dots { display: inline-flex; gap: 5px; padding: 6px 0; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); animation: dot 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { transform: translateY(0); opacity: .35; } 40% { transform: translateY(-5px); opacity: 1; } }
.chat .input { background: var(--panel-2); border: 1px solid var(--line); border-radius: 16px; padding: 8px; transition: border-color .15s, box-shadow .15s; }
.chat .input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-weak); }
.chat .input textarea { border: 0; background: transparent; outline: none !important; resize: none; }
.send { width: 40px; height: 40px; padding: 0; border-radius: 12px; }
.send .ic { width: 18px; height: 18px; }

/* 密码库 */
.vf { display: flex; align-items: center; gap: 6px; }
.vf .ic { width: 14px; height: 14px; }
.vi { display: flex; align-items: center; gap: 10px; transition: background .15s, transform .15s; }
.vi:hover { transform: translateX(2px); }
.vi-ic { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vi-ic .ic { width: 15px; height: 15px; }
.vi-ic.big { width: 32px; height: 32px; } .vi-ic.big .ic { width: 18px; height: 18px; }
.vi-ic.server { background: var(--c3b); color: var(--c3f); } .vi-ic.globe { background: var(--c2b); color: var(--c2f); }
.vi-ic.code { background: var(--c4b); color: var(--c4f); } .vi-ic.key { background: var(--c1b); color: var(--c1f); }

@media (max-width: 860px) {
  .hero h1, .welcome h1 { font-size: 24px; }
  .searchbox { width: 100%; }
  .welcome .suggest { grid-template-columns: 1fr; }
  .chat { height: calc(100dvh - 150px); }
  .side a { gap: 6px; }
  .side .me .who { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.suggest .sugg { border-radius: 14px; font-size: 13px; }
.sugg-ic + b { align-self: end; }

/* ================= 密码库分类 ================= */
.vault { grid-template-columns: 320px 1fr; }
.vi-ic { background: var(--cb, var(--chip)); color: var(--cf, var(--muted)); }
.vi-ic.all { background: var(--primary-weak); color: var(--primary); }
.vsearch { display: flex; align-items: center; gap: 8px; background: var(--panel-2); border-radius: 10px; padding: 0 10px; margin-bottom: 10px; }
.vsearch .ic { color: var(--muted); width: 16px; height: 16px; }
.vsearch input { border: 0; background: transparent; padding: 8px 0; outline: none !important; }
.vcats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding-bottom: 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.vcat { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; color: var(--text); font-size: 13px;
  transition: background .15s, transform .12s; }
.vcat .vi-ic { width: 24px; height: 24px; border-radius: 7px; }
.vcat .vi-ic .ic { width: 14px; height: 14px; }
.vcat b { font-weight: 600; font-size: 12px; color: var(--muted); }
.vcat:hover { background: var(--panel-2); }
.vcat.active { background: var(--cb, var(--primary-weak)); color: var(--cf, var(--primary)); font-weight: 600; }
.vcat.active b { color: inherit; }
.vcat.zero { opacity: .45; }
.vcat.zero:hover, .vcat.zero.active { opacity: 1; }
.vgroups { max-height: calc(100dvh - 330px); overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.vf { display: flex; align-items: baseline; gap: 6px; margin: 14px 2px 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.vf-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cf); align-self: center; }
.vf-n { color: var(--muted); font-weight: 400; font-size: 12px; }
.vf-desc { margin-left: auto; color: var(--muted); font-weight: 400; font-size: 11px; }
.vi { padding: 6px 8px; }
.vi-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.vi-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vi-s { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vi.active .vi-s { color: inherit; opacity: .75; }
.vtitle { display: flex; flex-direction: column; line-height: 1.3; }
.vtitle .vt-cat { font-size: 11px; font-weight: 500; color: var(--muted); }
.vtitle small { font-size: 12px; font-weight: 400; color: var(--muted); }
/* 新建 / 编辑：选分类 */
.catpick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.catopt { justify-content: flex-start; gap: 8px; padding: 7px 9px; border-radius: 10px; text-align: left; white-space: normal; }
.catopt .vi-ic { width: 26px; height: 26px; }
.catopt span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.catopt small { font-size: 11px; color: var(--muted); }
.catopt.on { border-color: var(--cf); background: var(--cb); }
.catopt.on small { color: var(--cf); }
.namerow { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); overflow: hidden; }
.namerow:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-weak); }
.nameprefix { padding: 0 4px 0 10px; color: var(--muted); white-space: nowrap; font-size: 14px; }
.namerow input { border: 0; outline: none !important; padding-left: 4px; }
@media (max-width: 1100px) { .catpick { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .vgroups { max-height: none; } }

/* ================= GitHub ================= */
.gh-connect { text-align: center; max-width: 560px; margin: 40px auto; padding: 32px; }
.gh-connect .drop-ic { margin: 0 auto 10px; }
.gh-connect h2 { font-family: Georgia, "Noto Serif SC", "Source Han Serif SC", "Songti SC", "PingFang SC", "Microsoft YaHei", serif; font-weight: 500; margin: 6px 0; }
.gh-me { display: flex; align-items: center; gap: 14px; }
.gh-me h1 { margin: 0 0 4px; }
.gh-avatar { width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--panel); box-shadow: var(--lift); }
.catsep { width: 1px; background: var(--line); margin: 4px 4px; flex-shrink: 0; }
.gh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.repo { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--text); min-height: 128px; transition: transform .18s, box-shadow .18s, border-color .18s;
  animation: rise .35s ease both; }
.repo:hover { transform: translateY(-2px); box-shadow: var(--lift); border-color: transparent; }
.repo-top { display: flex; align-items: center; gap: 8px; }
.repo-top b { font-size: 15px; color: var(--primary); word-break: break-all; }
.repo-ic { display: inline-flex; color: var(--muted); } .repo-ic .ic { width: 16px; height: 16px; }
.repo-desc { color: var(--muted); font-size: 13px; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.repo-meta, .gh-stats { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.repo-meta > span, .gh-stats > span { display: inline-flex; align-items: center; gap: 4px; }
.repo-meta .ic, .gh-stats .ic { width: 14px; height: 14px; }
.ldot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.tag.pub { background: var(--c2b); color: var(--c2f); }
.gh-top { margin: -4px 0 10px; }
.gh-head h1 { font-family: Georgia, "Noto Serif SC", "Source Han Serif SC", "Songti SC", "PingFang SC", "Microsoft YaHei", serif;
  font-weight: 500; font-size: 26px; margin: 0; word-break: break-all; }
.gh-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.gh-stats { margin-top: 10px; font-size: 13px; }
.btn-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; background: var(--primary); color: #fff; }
.btn-link:hover { filter: brightness(1.08); color: #fff; }
.btn-link .ic { width: 16px; height: 16px; }
.gh-tabs { display: flex; gap: 4px; margin: 4px 0 12px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.gh-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; color: var(--muted); border-bottom: 2px solid transparent;
  margin-bottom: -1px; white-space: nowrap; }
.gh-tabs a .ic { width: 16px; height: 16px; }
.gh-tabs a b { font-size: 11px; background: var(--chip); color: var(--chip-text); border-radius: 999px; padding: 0 7px; font-weight: 600; }
.gh-tabs a:hover { color: var(--text); }
.gh-tabs a.active { color: var(--text); border-bottom-color: var(--primary); font-weight: 600; }
.gh-body { min-height: 200px; }
.gh-row { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); color: var(--text); flex-wrap: wrap; }
.gh-row:last-child { border-bottom: 0; }
a.gh-row:hover { background: var(--panel-2); }
.gh-row a { color: var(--text); } .gh-row a:hover { color: var(--primary); }
.sha { font: 12px ui-monospace, Consolas, monospace; background: var(--chip); padding: 2px 6px; border-radius: 6px; color: var(--primary); }
.branch { font: 12px ui-monospace, Consolas, monospace; background: var(--chip); padding: 2px 6px; border-radius: 6px; }
.i-open { display: inline-flex; color: var(--ok); } .i-open .ic { width: 16px; height: 16px; }
.run { font-size: 11px; padding: 1px 8px; border-radius: 999px; font-weight: 600; }
.run-ok { background: var(--c2b); color: var(--c2f); } .run-bad { background: var(--c1b); color: var(--danger); }
.run-going { background: var(--c5b); color: var(--c5f); } .run-skip { background: var(--chip); color: var(--muted); }
.gh-new { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.readme { max-width: 860px; font-size: 14px; line-height: 1.7; }
.readme h1 { font-size: 22px; } .readme h2 { font-size: 18px; } .readme img { max-width: 100%; }
.readme pre { background: var(--code); padding: 10px 12px; border-radius: 8px; overflow-x: auto; }
.spinning { display: inline-flex; animation: spin360 .9s linear infinite; }
@keyframes spin360 { to { transform: rotate(360deg); } }
@media (max-width: 860px) { .gh-grid { grid-template-columns: 1fr; } .gh-me h1 { font-size: 24px; } }
.readme pre code, .md pre code { background: none; padding: 0; border-radius: 0; font-size: 13px; }
.avatar.gh-avatar { font-size: 22px; }
.gh-avwrap { position: relative; display: inline-flex; flex-shrink: 0; }
.gh-avwrap img { position: absolute; inset: 0; opacity: 0; transition: opacity .3s; }
.gh-avwrap img.ok { opacity: 1; }
.repo-owner { color: var(--muted); font-weight: 400; }

/* GitHub 项目分组 */
.gh-group { display: flex; align-items: baseline; gap: 8px; margin: 18px 2px 10px; }
.gh-group:first-of-type { margin-top: 4px; }
.gh-group-n { font-family: Georgia, "Noto Serif SC", "Source Han Serif SC", "Songti SC", "PingFang SC", "Microsoft YaHei", serif; font-size: 18px; }
.gh-group b { font-size: 12px; color: var(--primary); background: var(--primary-weak); border-radius: 999px; padding: 0 8px; }
.viewtog { gap: 6px; } .viewtog .ic { width: 14px; height: 14px; }
.sugbox { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-weak); animation: rise .3s ease both; }
.sug-groups { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.sug-groups .tag { margin: 0; font-size: 12px; padding: 2px 8px; background: var(--primary-weak); color: var(--primary); }
.sug-rows { max-height: 420px; overflow-y: auto; border-top: 1px solid var(--line); }
.sug-row { display: grid; grid-template-columns: auto minmax(140px, 1.2fr) auto minmax(120px, 1fr) 2fr; align-items: center; gap: 10px;
  padding: 7px 4px; border-bottom: 1px solid var(--line); margin: 0; color: var(--text); font-size: 13px; cursor: pointer; }
.sug-row.off { opacity: .45; }
.sug-repo { font-weight: 600; word-break: break-all; }
.sug-arrow { color: var(--muted); }
.sug-group { padding: 4px 8px; font-size: 13px; }
.gh-grouprow { display: flex; align-items: center; gap: 8px; margin-top: 12px; max-width: 360px; }
.gh-grouprow input { padding: 5px 9px; }
@media (max-width: 860px) { .sug-row { grid-template-columns: auto 1fr auto 1fr; } .sug-why { grid-column: 2 / -1; } }
.gh-span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.steps > div { margin: 12px 0 4px; font-size: 13px; color: var(--text); }
.steps > div b { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: #fff; align-items: center; justify-content: center; font-size: 12px; margin-right: 6px; }
.steps pre { margin: 0; }


/* ============ 通用小件 ============ */
.seg { display: inline-flex; background: var(--panel-2); border-radius: 9px; padding: 2px; flex-shrink: 0; }
.seg button { border: 0; background: transparent; padding: 3px 12px; font-size: 12.5px; border-radius: 7px; color: var(--muted); }
.seg button.on { background: var(--panel); color: var(--text); box-shadow: var(--shadow); font-weight: 600; }
.icon-btn { border: 0; background: transparent; padding: 4px; width: 30px; height: 30px; border-radius: 8px; color: var(--muted); font-size: 16px; flex-shrink: 0; }
.icon-btn:hover:not(:disabled) { background: var(--panel-2); color: var(--text); }
.icon-btn.danger:hover { color: var(--danger); }
.icon-btn .ic { width: 16px; height: 16px; }
.savestate { font-size: 12px; color: var(--muted); white-space: nowrap; }
.savestate.dirty { color: var(--warn); }
.nzero { color: var(--muted); font-size: 13px; text-align: center; padding: 24px 8px; }
.caret { display: inline-flex; transition: transform .15s; color: var(--muted); }
.caret .ic { width: 12px; height: 12px; }
.caret.open { transform: rotate(90deg); }
.ai-result { border: 1px solid var(--primary); box-shadow: 0 0 0 3px var(--primary-weak); border-radius: 12px; padding: 12px 14px; margin: 10px 0;
  animation: rise .3s ease both; background: var(--panel); }
.ai-result-h { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.ai-result-h b { color: var(--primary); }
.ai-result .row { margin-top: 10px; }
.sugstep { display: flex; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); }
.sugstep.off { opacity: .45; }
.sugstep input:not([type=checkbox]) { padding: 4px 8px; font-size: 13px; }
.pprog { display: flex; align-items: center; gap: 10px; }
.pprog b { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 38px; text-align: right; }
.pbar { flex: 1; height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 999px; background: var(--primary); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.modal-bg { position: fixed; inset: 0; z-index: 20; background: rgba(20, 18, 14, .32); display: flex; justify-content: center; align-items: flex-start;
  padding: 12vh 16px 16px; animation: fadein .15s ease both; }
@keyframes fadein { from { opacity: 0; } }
.md table { border-collapse: collapse; margin: 8px 0; font-size: 14px; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 5px 10px; text-align: left; }
.md th { background: var(--panel-2); }
.md blockquote { margin: 8px 0; padding: 4px 14px; border-left: 3px solid var(--line); color: var(--muted); }
.md code { background: var(--code); padding: 1px 5px; border-radius: 5px; font-size: .9em; }
.md pre { background: var(--code); padding: 10px 12px; border-radius: 8px; overflow-x: auto; }
.md img { max-width: 100%; border-radius: 8px; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.md details { background: var(--panel-2); border-radius: 8px; padding: 6px 12px; margin: 4px 0 12px; }
.md summary { cursor: pointer; color: var(--primary); font-size: 13px; font-weight: 600; }

/* ============ 笔记：Obsidian 式 ============ */
.kb { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 14px; align-items: start; transition: grid-template-columns .2s; }
.kb.has-side:not(.side-off) { grid-template-columns: 250px minmax(0, 1fr) 250px; }
.kb.nav-off { grid-template-columns: 46px minmax(0, 1fr); }
.kb.nav-off.has-side:not(.side-off) { grid-template-columns: 46px minmax(0, 1fr) 250px; }
.kb.side-off .kb-side { display: none; }
.kb-rail { position: sticky; top: 14px; margin: 0; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-height: 200px; max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px); }
.kb-rail .icon-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.kb-rail .icon-btn.on { background: var(--primary-weak); color: var(--primary); }
.kb-rail .rail-sync.ok { color: var(--ok); } .kb-rail .rail-sync.pending { color: var(--warn); } .kb-rail .rail-sync.err { color: var(--danger); }
.kb-sidebtn.on { color: var(--primary); }
.kb > .panel { margin: 0; }
.kb-nav { position: sticky; top: 14px; max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px); display: flex; flex-direction: column; padding: 10px; }
.kb-nav-top { display: flex; gap: 6px; }
.kb-tools { display: flex; flex-direction: column; margin: 10px 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.kb-tools a { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; color: var(--text); font-size: 13px; text-decoration: none; }
.kb-tools a .ic { width: 15px; height: 15px; color: var(--muted); }
.kb-tools a:hover { background: var(--panel-2); }
.kb-tools a.on { background: var(--primary-weak); color: var(--primary); font-weight: 600; }
.kb-tools a.on .ic { color: var(--primary); }
.kb-tree { overflow-y: auto; flex: 1; min-height: 80px; margin: 0 -4px; padding: 0 4px; }
.kt { display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 6px; color: var(--text); text-decoration: none; font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }
.kt:hover { background: var(--panel-2); }
.kt.active { background: var(--primary-weak); color: var(--primary); font-weight: 600; }
.kt-dir { color: var(--muted); font-weight: 500; }
.kt-dir i { margin-left: auto; font-style: normal; font-size: 11px; opacity: .7; }
.kb-sync { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); padding: 8px 6px 2px; margin-top: 6px; border-top: 1px solid var(--line); text-decoration: none; }
.kb-sync .ic { width: 13px; height: 13px; }
.kb-sync.ok { color: var(--ok); } .kb-sync.pending { color: var(--warn); } .kb-sync.err { color: var(--danger); }
.kb-main { min-height: calc(100vh - 28px); min-height: calc(100dvh - 28px); padding: 14px 28px 28px; min-width: 0; }
.kb-banner { display: flex; flex-direction: column; gap: 8px; background: var(--primary-weak); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px; }
.kb-banner.warn { background: var(--c5b); }
.kb-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; position: sticky; top: 0; background: var(--panel); z-index: 2; padding: 4px 0 8px; }
.kb-crumb { font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ghostlink { border-color: transparent; background: transparent; text-decoration: none; }
.kb-props { border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 14px; display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: 13px; }
.kp { display: contents; }
.kp-k { color: var(--muted); }
.kp-v { min-width: 0; word-break: break-word; }
.kp-chip { display: inline-block; background: var(--panel-2); border-radius: 6px; padding: 0 7px; margin: 0 4px 2px 0; }
.kb-read { font-size: 15.5px; line-height: 1.8; max-width: 820px; }
.kb-read h1 { font-family: Georgia, "Noto Serif SC", "Source Han Serif SC", "Songti SC", "PingFang SC", "Microsoft YaHei", serif; font-size: 28px; margin: 4px 0 14px; line-height: 1.35; }
.kb-read h2 { font-size: 20px; margin: 26px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.kb-read h3 { font-size: 17px; margin: 20px 0 6px; }
.kb-read ul, .kb-read ol { padding-left: 22px; }
.kb-read li { margin: 2px 0; }
a.wl { color: var(--primary); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--primary) 35%, transparent); }
a.wl:hover { background: var(--primary-weak); border-radius: 3px; }
a.wl.missing { color: var(--muted); border-bottom: 1px dashed var(--muted); }
.kb-img { display: block; margin: 10px 0; }
.callout { border-left: 3px solid var(--c3f) !important; background: var(--c3b); border-radius: 0 8px 8px 0; color: var(--text) !important; padding: 8px 14px !important; }
.callout-t { font-weight: 700; color: var(--c3f); font-size: 14px; text-transform: capitalize; }
.callout-warning, .callout-caution, .callout-danger { border-left-color: var(--c1f) !important; background: var(--c1b); }
.callout-warning .callout-t, .callout-caution .callout-t, .callout-danger .callout-t { color: var(--c1f); }
.callout-tip, .callout-success, .callout-done { border-left-color: var(--c2f) !important; background: var(--c2b); }
.callout-tip .callout-t, .callout-success .callout-t, .callout-done .callout-t { color: var(--c2f); }
.callout-important, .callout-question { border-left-color: var(--c4f) !important; background: var(--c4b); }
.callout-important .callout-t, .callout-question .callout-t { color: var(--c4f); }
.kb-editwrap { position: relative; }
.kb-text { width: 100%; min-height: calc(100vh - 170px); border: 0; padding: 4px 0; resize: none; background: transparent;
  font: 14.5px/1.75 ui-monospace, "SF Mono", "Cascadia Code", Consolas, "Microsoft YaHei", monospace; }
.kb-text:focus { outline: 0; }
.kb-ac { position: sticky; bottom: 10px; margin-top: -10px; width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--lift); padding: 4px; z-index: 5; }
.kb-ac-h { font-size: 11px; color: var(--muted); padding: 4px 8px; }
.kb-ac a { display: flex; flex-direction: column; padding: 5px 8px; border-radius: 7px; color: var(--text); text-decoration: none; }
.kb-ac a span { font-size: 11px; color: var(--muted); }
.kb-ac a.on { background: var(--primary-weak); }
.kb-side { position: sticky; top: 14px; max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px); overflow-y: auto; padding: 12px; }
.ks-sec { margin-bottom: 16px; }
.ks-sec h4 { margin: 0 0 6px; font-size: 12px; color: var(--muted); display: flex; gap: 6px; letter-spacing: .03em; }
.ks-sec h4 span { margin-left: auto; font-weight: 400; }
.ks-h { display: block; padding: 3px 8px; border-radius: 6px; text-decoration: none; color: var(--text); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ks-h:hover { background: var(--panel-2); }
.ks-sec .hash { margin-right: 8px; display: inline-block; }
.kb-pane { max-width: 860px; }
.kb-pane h2 { font-family: Georgia, "Noto Serif SC", "Source Han Serif SC", "Songti SC", "PingFang SC", "Microsoft YaHei", serif; margin: 4px 0 6px; }
.kb-pane > p.muted { line-height: 1.7; margin: 0 0 14px; }
.kb-filepick { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; padding: 4px; }
.kb-filepick a { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 7px; color: var(--text); text-decoration: none; font-size: 13px; }
.kb-filepick a:hover { background: var(--panel-2); }
.kb-filepick a.on { background: var(--primary-weak); }
.kb-filepick a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-filepick em { font-style: normal; font-size: 12px; }
.kb-jobbox { margin-top: 6px; }
.job-steps { max-height: 220px; overflow-y: auto; font-size: 12.5px; margin: 4px 0 8px; }
.job-steps div { display: flex; gap: 8px; padding: 2px 0; color: var(--muted); animation: rise .2s ease both; }
.job-steps div span { min-width: 44px; color: var(--text); }
.job-steps div.bad span { color: var(--danger); }
.job-steps code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-changed { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-top: 8px; font-size: 13px; }
.lint-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.lint-card { background: var(--panel-2); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.lint-card b { font-size: 24px; font-family: Georgia, serif; color: var(--ok); }
.lint-card.bad b { color: var(--warn); }
.lint-card span { font-size: 12px; color: var(--muted); }
.lint-sec h3 { font-size: 14px; margin: 16px 0 6px; display: flex; gap: 8px; align-items: baseline; }
.lint-list { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.lint-list > a, .lint-list > div { padding: 3px 0; }
.lint-from { margin-right: 8px; }
.hist { display: flex; flex-direction: column; }
.hist-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.hist-row.ai .hist-m b { color: var(--primary); }
.hist-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.hist-files { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; }
.switcher { width: min(620px, 100%); padding: 8px; margin: 0; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.switcher > input { font-size: 16px; padding: 10px 12px; border: 0; background: var(--panel-2); }
.sw-list { max-height: 50vh; overflow-y: auto; margin-top: 6px; }
.sw-list a { display: flex; flex-direction: column; padding: 7px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; }
.sw-list a span, .sw-list a em { font-size: 11.5px; font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-list a.on { background: var(--primary-weak); }
.sw-list a > .ic { width: 14px; height: 14px; }

@media (max-width: 1280px) {
  .kb, .kb.has-side:not(.side-off) { grid-template-columns: 230px minmax(0, 1fr); }
  .kb.nav-off, .kb.nav-off.has-side:not(.side-off) { grid-template-columns: 46px minmax(0, 1fr); }
  .kb-side, .kb.side-off .kb-side { display: none; position: fixed; right: 12px; top: 12px; bottom: 12px; width: 290px; max-height: none; z-index: 15; box-shadow: var(--lift); }
  .kb.side-on .kb-side { display: block; animation: rise .2s ease both; }
  .kb-sidebtn.on { color: var(--muted); }
}
@media (max-width: 900px) {
  .kb, .kb.has-side:not(.side-off), .kb.nav-off, .kb.nav-off.has-side:not(.side-off) { grid-template-columns: 1fr; }
  .kb-nav { position: static; max-height: 46vh; }
  .kb-rail { position: static; flex-direction: row; min-height: 0; padding: 4px 6px; flex-wrap: wrap; }
  .kb-main { padding: 12px 14px 20px; min-height: 0; }
    .lint-cards { grid-template-columns: repeat(3, 1fr); }
  .kb-read { font-size: 15px; }
}

/* ============ 计划：Linear 式 ============ */
.ln { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 14px; align-items: start; }
.ln.detail-on { grid-template-columns: 210px minmax(0, 1fr) minmax(360px, 440px); }
.ln.nav-off { grid-template-columns: 46px minmax(0, 1fr); }
.ln.nav-off.detail-on { grid-template-columns: 46px minmax(0, 1fr) minmax(360px, 440px); }
.ln-collapse { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; opacity: .55; transition: opacity .15s; }
.ln-nav:hover .ln-collapse, .ln-collapse:focus-visible { opacity: 1; }
.ln-nav > a:first-of-type { margin-right: 28px; }
.ln > .panel { margin: 0; }
.ln-nav { position: sticky; top: 14px; padding: 8px; display: flex; flex-direction: column; gap: 1px; max-height: calc(100vh - 28px); overflow-y: auto; }
.ln-nav a { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 7px; color: var(--text); text-decoration: none; font-size: 13px; }
.ln-nav a .ic { width: 15px; height: 15px; color: var(--muted); }
.ln-nav a i { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--muted); }
.ln-nav a:hover { background: var(--panel-2); }
.ln-nav a.on { background: var(--panel-2); font-weight: 600; }
.ln-sub { font-size: 11px; color: var(--muted); padding: 12px 8px 4px; letter-spacing: .04em; }
.ln-proj { font-size: 13px; }
.pdot { width: 9px; height: 9px; border-radius: 3px; background: var(--cf, var(--muted)); flex-shrink: 0; }
.ln-keys { font-size: 11px; padding: 14px 8px 4px; line-height: 1.6; }
.ln-main { padding: 0; min-height: calc(100vh - 28px); min-width: 0; overflow: hidden; }
.ln-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; position: sticky; top: 0; background: var(--panel); z-index: 3; }
.ln-head h2 { margin: 0; font-size: 16px; }
.ln-q { width: 150px; padding: 5px 9px; font-size: 13px; }
.ln-sel { width: auto; padding: 4px 6px; font-size: 12.5px; }
.ln-date { width: auto; padding: 3px 6px; font-size: 12.5px; }
.ln-projhead { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.small-desc { font-size: 13px; color: var(--muted); max-height: 120px; overflow: auto; }
.ln-group { display: flex; align-items: center; gap: 8px; padding: 7px 16px; background: var(--panel-2); font-size: 13px; cursor: pointer; user-select: none;
  border-bottom: 1px solid var(--line); }
.ln-group i { font-style: normal; color: var(--muted); }
.ln-group .icon-btn { width: 24px; height: 24px; }
.ln-row { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 40px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13.5px; }
.ln-row:hover { background: var(--panel-2); }
.ln-row.sel { box-shadow: inset 2px 0 0 var(--primary); background: color-mix(in srgb, var(--primary-weak) 45%, transparent); }
.ln-row.open { background: var(--primary-weak); }
.ln-row.sm { height: 34px; padding: 0 6px; border-radius: 7px; border: 0; }
.ln-pr, .ln-st { display: inline-flex; border-radius: 5px; padding: 2px; flex-shrink: 0; }
.ln-pr:hover, .ln-st:hover { background: var(--line); }
.ln-id { color: var(--muted); font-size: 12px; min-width: 38px; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.ln-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ln-meta { display: flex; gap: 6px; align-items: center; flex-shrink: 0; font-size: 12px; }
.ln-label { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; line-height: 20px; color: var(--text); }
.ln-label i { width: 7px; height: 7px; border-radius: 50%; background: var(--cf, var(--muted)); }
.ln-chip { background: var(--panel-2); border-radius: 6px; padding: 0 7px; line-height: 20px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ln-due { color: var(--muted); font-variant-numeric: tabular-nums; }
.ln-due.late { color: var(--danger); font-weight: 600; }
.ln-due.today { color: var(--warn); font-weight: 600; }
.lst { flex-shrink: 0; }
.lst-backlog, .lst-todo { color: var(--muted); }
.lst-in_progress { color: #d9a441; }
.lst-in_review { color: var(--ok); }
.lst-done { color: var(--c4f); }
.lst-canceled { color: var(--muted); opacity: .7; }
.pr { color: var(--muted); flex-shrink: 0; }
.pr-urgent { color: var(--primary); }
.pr-none { opacity: .7; }
.ln-board { display: flex; gap: 12px; padding: 14px; overflow-x: auto; align-items: flex-start; min-height: 60vh; }
.ln-col { flex: 0 0 270px; background: var(--panel-2); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 120px;
  transition: box-shadow .15s; }
.ln-col.over { box-shadow: inset 0 0 0 2px var(--primary); }
.ln-colh { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 2px 4px; }
.ln-colh i { font-style: normal; color: var(--muted); }
.ln-colh .icon-btn { width: 24px; height: 24px; }
.ln-card { background: var(--panel); border-radius: 9px; padding: 9px 11px; box-shadow: var(--shadow); border: 1px solid var(--line); cursor: grab; display: flex; flex-direction: column; gap: 6px;
  transition: box-shadow .15s, transform .15s; }
.ln-card:hover { box-shadow: var(--lift); }
.ln-card:active { cursor: grabbing; }
.ln-card-top { display: flex; align-items: center; }
.ln-card-t { font-size: 13.5px; line-height: 1.45; }
.ln-card .ln-meta { flex-wrap: wrap; }
.ln-prow { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 14px; flex-wrap: wrap; }
.ln-prow:hover { background: var(--panel-2); }
.ln-prow .tag { margin: 0; }
.ln-pp { width: 160px; flex: 0 0 160px; }
.ln-newproj { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.ln-detail { position: sticky; top: 14px; max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px); overflow-y: auto; padding: 14px 18px; animation: rise .2s ease both; }
.ln-dhead { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ln-title { font-size: 19px; font-weight: 600; border-color: transparent; padding: 6px 8px; margin: 0 -8px 8px; width: calc(100% + 16px); background: transparent; }
.ln-title:hover { border-color: var(--line); }
.ln-props { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 10px 0 14px; border-bottom: 1px solid var(--line); }
.ln-props label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--muted); }
.ln-props select, .ln-props input { padding: 5px 7px; font-size: 13px; }
.ln-props.compact { grid-template-columns: repeat(3, 1fr); border: 0; padding-bottom: 0; }
.ln-sec { padding: 12px 0; border-bottom: 1px solid var(--line); }
.ln-sec:last-child { border-bottom: 0; }
.ln-sech { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.ln-sech i { font-style: normal; font-weight: 400; }
.ln-desc { font-size: 14px; line-height: 1.7; }
.ln-desc-in { font-size: 13.5px; }
.ln-addchild { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--muted); }
.ln-addchild .ic { width: 14px; height: 14px; }
.ln-addchild input { padding: 5px 8px; font-size: 13px; border-color: transparent; background: var(--panel-2); }
.ln-act { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); max-height: 260px; overflow-y: auto; }
.ln-act div { display: flex; gap: 8px; align-items: baseline; }
.ln-act i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); flex-shrink: 0; transform: translateY(-1px); }
.ln-act div:first-child i { background: var(--primary); }
.ln-menu { position: fixed; z-index: 30; margin: 0; padding: 4px; min-width: 160px; box-shadow: var(--lift); animation: fadein .1s ease both; }
.ln-menu a { display: flex; align-items: center; gap: 9px; padding: 6px 9px; border-radius: 7px; color: var(--text); text-decoration: none; font-size: 13px; }
.ln-menu a:hover { background: var(--panel-2); }
.ln-menu a.on { font-weight: 600; background: var(--primary-weak); }
.ln-form { width: min(640px, 100%); margin: 0; padding: 14px 18px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.ln-form textarea { font-size: 13.5px; }

@media (max-width: 1280px) {
  .ln.detail-on { grid-template-columns: 200px minmax(0, 1fr); }
  .ln.nav-off.detail-on { grid-template-columns: 46px minmax(0, 1fr); }
  .ln-detail { position: fixed; right: 12px; top: 12px; bottom: 12px; width: min(440px, calc(100vw - 24px)); max-height: none; z-index: 15; box-shadow: var(--lift); }
}
@media (max-width: 900px) {
  .ln, .ln.detail-on, .ln.nav-off, .ln.nav-off.detail-on { grid-template-columns: 1fr; }
  .ln-collapse { opacity: 1; }
  .ln-nav { position: static; flex-direction: row; flex-wrap: wrap; max-height: none; }
  .ln-nav a { padding: 5px 9px; }
  .ln-sub, .ln-keys, .ln-proj { display: none; }
  .ln-main { min-height: 0; }
  .ln-meta .ln-chip, .ln-meta .ln-label { display: none; }
  .ln-group { top: 0; }
  .ln-props.compact { grid-template-columns: 1fr 1fr; }
  .lint-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ============ 主导航可收起 ============ */
.side { transition: width .2s ease, padding .2s ease; }
.side .lbl { white-space: nowrap; }
.side-fold { margin-left: auto; border: 0; background: transparent; color: var(--side-muted); width: 28px; height: 28px; padding: 5px; border-radius: 7px; flex-shrink: 0; }
.side-fold:hover { background: var(--side-hover); color: var(--side-strong); }
.side-fold .ic { width: 16px; height: 16px; }
.side.mini { width: 62px; padding-left: 9px; padding-right: 9px; }
.side.mini .lbl { display: none; }
.side.mini .brand { flex-direction: column; gap: 10px; padding: 2px 0 14px; }
.side.mini .side-fold { margin: 0; }
.side.mini a { justify-content: center; padding: 9px 0; }
.side.mini .me { padding: 10px 0 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.side.mini .me .who { margin: 0; }
.side.mini .mini-theme { display: inline-flex; padding: 4px; border-radius: 7px; }
.side.mini .mini-theme:hover { background: var(--side-hover); }
@media (max-width: 860px) {
  .side-fold, .side .mini-theme { display: none; }
  .side.mini { width: auto; padding: 8px; }
  .side.mini .lbl { display: inline; }
  .side.mini a { padding: 8px 10px; }
  .side.mini .brand { flex-direction: row; padding: 6px 10px; }
  .side.mini .me { flex-direction: row; padding: 8px 10px; }
}

/* ============ 作品集 ============ */
.site-sug { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -4px 0 12px; }
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.site-card { background: var(--panel); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
  border: 1px solid transparent; transition: box-shadow .2s, transform .2s, border-color .2s; animation: rise .35s ease both; }
.site-card:hover { box-shadow: var(--lift); transform: translateY(-2px); border-color: var(--line); }
.site-cover { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--panel-2); overflow: hidden; border-bottom: 1px solid var(--line); }
.site-cover > img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; transition: transform .5s ease; }
.site-card:hover .site-cover > img { transform: scale(1.03); }
.site-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--cb, var(--panel-2)), var(--panel-2)); }
.site-ph b { font: 700 56px Georgia, "Noto Serif SC", serif; color: var(--cf, var(--muted)); opacity: .8; }
.site-ph img { width: 64px; height: 64px; object-fit: contain; border-radius: 14px; }
.site-open { position: absolute; inset: auto 12px 12px auto; display: inline-flex; align-items: center; gap: 6px; background: rgba(20, 18, 14, .72); color: #fff;
  font-size: 12.5px; padding: 6px 11px; border-radius: 999px; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; }
.site-open .ic { width: 14px; height: 14px; }
.site-card:hover .site-open { opacity: 1; transform: none; }
.site-pin { position: absolute; top: 10px; left: 10px; background: var(--primary); color: #fff; font-size: 11px; padding: 1px 8px; border-radius: 999px; }
.site-body { padding: 12px 14px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.site-t { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.site-fav { width: 18px; height: 18px; object-fit: contain; border-radius: 4px; }
.site-d { font-size: 13px; color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.site-m { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
.site-m > a:first-child { color: var(--text); text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-m > a:first-child:hover { color: var(--primary); }
.site-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--panel-2); color: var(--muted); border-radius: 6px; padding: 0 7px; line-height: 20px; text-decoration: none; }
.site-chip .ic { width: 12px; height: 12px; }
a.site-chip:hover { color: var(--primary); }
.site-f { display: flex; align-items: center; margin-top: auto; padding-top: 4px; }
.site-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.site-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.site-state.up { color: var(--ok); } .site-state.up i { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); animation: pulse 2.4s ease infinite; }
.site-state.down { color: var(--danger); } .site-state.down i { background: var(--danger); }
.site-state.wip { color: var(--warn); } .site-state.wip i { background: var(--warn); }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok) 8%, transparent); } }
.site-card.is-off .site-cover > img, .site-card.is-off .site-ph { filter: grayscale(1); opacity: .6; }
.site-form { width: min(640px, 100%); margin: 0; padding: 14px 18px; box-shadow: 0 20px 60px rgba(0,0,0,.25); max-height: 86vh; overflow-y: auto; }
.site-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin-top: 8px; }
.site-form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.site-form-grid label.wide { grid-column: 1 / -1; }
.site-cover-edit { display: flex; gap: 14px; align-items: flex-start; margin-top: 12px; }
.site-cover-prev { width: 200px; aspect-ratio: 16 / 10; border-radius: 10px; background: var(--panel-2); overflow: hidden; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.site-cover-prev img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
@media (max-width: 600px) { .site-form-grid { grid-template-columns: 1fr; } .site-cover-edit { flex-direction: column; } .site-cover-prev { width: 100%; } }
@media (hover: none) { .site-open { opacity: 1; transform: none; } }
