/* ============================================================
   自媒体创作工作台 · 设计系统
   ============================================================ */

:root {
  --bg: #0a0d12;
  --bg-soft: #0e131a;
  --card: #131a23;
  --card-2: #182130;
  --line: #202a38;
  --line-soft: #1a222e;
  --text: #e8eef5;
  --text-2: #b7c3d2;
  --muted: #8795a8;
  --accent: #ff5a3c;
  --accent-2: #ff8a3c;
  --accent-soft: rgba(255, 90, 60, .1);
  --ok: #35d07f;
  --warn: #f2b544;
  --danger: #ff5c5c;
  --info: #5aa9ff;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

html[data-theme="light"] {
  --bg: #f4f5f7;
  --bg-soft: #eceef2;
  --card: #ffffff;
  --card-2: #f7f8fa;
  --line: #e2e5ea;
  --line-soft: #edeff3;
  --text: #1a2029;
  --text-2: #4a5566;
  --muted: #7b8798;
  --accent-soft: rgba(255, 90, 60, .08);
  --shadow: 0 8px 24px rgba(17, 24, 39, .08);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #2b3646; border-radius: 8px; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #c8ced8; }
::-webkit-scrollbar-track { background: transparent; }

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }

.hidden { display: none !important; }
.mobile-only { display: none; }

/* ---------------------------------------------------------- 布局 */

.app { display: flex; height: 100vh; overflow: hidden; }

.side {
  width: 228px;
  flex: 0 0 228px;
  background: var(--bg-soft);
  border-right: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  transition: width .18s ease, flex-basis .18s ease;
  z-index: 30;
}

.side.collapsed { width: 70px; flex-basis: 70px; }
.side.collapsed .side-title,
.side.collapsed .nav-group,
.side.collapsed .nav-item span,
.side.collapsed .nav-item em,
.side.collapsed .model-state em { display: none; }
.side.collapsed .nav-item { justify-content: center; }
.side.collapsed .side-head { justify-content: center; }
.side.collapsed .side-collapse { display: none; }

.side-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 14px;
}

.logo-mark {
  width: 34px; height: 34px;
  flex: 0 0 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--accent), #c9361c);
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -.5px;
  box-shadow: 0 4px 14px rgba(255, 90, 60, .3);
}

.side-title { flex: 1; min-width: 0; }
.side-title strong { display: block; font-size: 14.5px; letter-spacing: .3px; }
.side-title small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.side-collapse {
  border: 0; background: transparent; color: var(--muted);
  font-size: 13px; padding: 4px;
}

.nav { flex: 1; overflow-y: auto; padding: 4px 10px 10px; }

.nav-group {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1.5px;
  padding: 14px 10px 6px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 13.5px;
  cursor: pointer;
  transition: background .15s, color .15s;
  position: relative;
}
.nav-item i { font-style: normal; width: 18px; text-align: center; color: var(--muted); font-size: 13px; }
.nav-item span { flex: 1; }
.nav-item:hover { background: var(--card); color: var(--text); }
.nav-item.active {
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: inset 2px 0 0 var(--accent);
}
.nav-item.active i { color: var(--accent); }

.nav-item .badge {
  font-style: normal;
  font-size: 10.5px;
  min-width: 18px;
  text-align: center;
  padding: 1px 6px;
  border-radius: 20px;
  background: var(--card-2);
  color: var(--muted);
}
.nav-item .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  display: none;
}
.nav-item .dot.on { display: block; }

.side-foot { padding: 8px 10px 14px; border-top: 1px solid var(--line-soft); }

.model-state {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 11px 4px; font-size: 11.5px; color: var(--muted);
}
.model-state em { font-style: normal; }
.model-state .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted);
}
.model-state.on .pulse { background: var(--ok); box-shadow: 0 0 0 3px rgba(53, 208, 127, .12); }
.model-state.on em { color: var(--ok); }
.model-state.off .pulse { background: var(--danger); }
.model-state.off em { color: var(--danger); }

/* ---------------------------------------------------------- 主区 */

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 64px;
  flex: 0 0 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
}

.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.crumb h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: .2px; }
.crumb span { display: block; font-size: 11.5px; color: var(--muted); margin-top: -1px; }

.today-date { color: var(--muted); font-size: 12px; white-space: nowrap; }

.view { flex: 1; overflow-y: auto; padding: 22px 24px 70px; }

/* ---------------------------------------------------------- 通用组件 */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: transform .12s, background .15s, border-color .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #d93d22);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 90, 60, .22);
}
.btn-primary:hover { box-shadow: 0 6px 18px rgba(255, 90, 60, .3); }

.btn-ghost { background: transparent; border-color: var(--line); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }

.btn-soft { background: var(--card-2); border-color: var(--line); color: var(--text-2); }
.btn-soft:hover { color: var(--text); border-color: var(--line); }

.btn-danger { background: transparent; border-color: rgba(255, 92, 92, .35); color: var(--danger); }

.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }

.icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 28px; padding: 0 11px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text-2);
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.on {
  background: var(--accent-soft);
  border-color: rgba(255, 90, 60, .45);
  color: var(--accent);
}
.chip .src-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

.badge {
  display: inline-flex; align-items: center;
  height: 20px; padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  background: var(--card-2);
  color: var(--muted);
}
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.ok { background: rgba(53, 208, 127, .12); color: var(--ok); }
.badge.warn { background: rgba(242, 181, 68, .14); color: var(--warn); }
.badge.info { background: rgba(90, 169, 255, .12); color: var(--info); }

.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.card.tight { padding: 14px 16px; }
.card.hover:hover { border-color: var(--line); transform: translateY(-1px); transition: .15s; }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.section-head h3 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: .2px; }
.section-head .sub { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 8px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.split { display: grid; grid-template-columns: 360px 1fr; gap: 18px; align-items: start; }
.split-wide { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }

.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------------------------------------------------------- 表单 */

.field { display: block; margin-bottom: 14px; }
.field > span {
  display: block; font-size: 12px; color: var(--muted);
  margin-bottom: 6px; letter-spacing: .3px;
}
.field > span b { color: var(--accent); font-weight: 500; margin-left: 3px; }

input[type="text"], input[type="password"], input[type="number"], textarea, select {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder, textarea::placeholder { color: #5d6b7d; }
textarea { min-height: 96px; resize: vertical; line-height: 1.7; }

.seg {
  display: inline-flex;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
}
.seg button {
  border: 0; background: transparent; color: var(--muted);
  padding: 5px 14px; border-radius: 7px; font-size: 12.5px;
}
.seg button.on { background: var(--card-2); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
html[data-theme="light"] .seg button.on { background: #fff; }

/* ---------------------------------------------------------- 首页热点 */

.page-hero {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 18px;
}
.page-hero h1 { margin: 0 0 4px; font-size: 26px; line-height: 1.2; letter-spacing: -.5px; font-weight: 750; }
.page-hero p { margin: 0; color: var(--muted); font-size: 13px; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: 12px; padding: 13px 15px;
}
.stat small { display: block; color: var(--muted); font-size: 11.5px; letter-spacing: .4px; }
.stat strong { font-size: 22px; font-weight: 700; letter-spacing: -.5px; }
.stat strong em { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 3px; }

.hot-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  margin-bottom: 14px;
  position: sticky; top: -22px; z-index: 6;
  backdrop-filter: blur(10px);
}
.hot-search { flex: 1; min-width: 160px; max-width: 300px; }
.hot-search input { height: 32px; padding: 0 12px; }

.hot-list { display: flex; flex-direction: column; gap: 6px; }

.hot-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--card);
  border: 1px solid transparent;
  border-radius: 11px;
  transition: .15s;
}
.hot-row:hover { border-color: var(--line); background: var(--card-2); }
.hot-rank {
  font-size: 13px; font-weight: 700; color: var(--muted);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.hot-row:nth-child(1) .hot-rank,
.hot-row:nth-child(2) .hot-rank,
.hot-row:nth-child(3) .hot-rank { color: var(--accent); }

.hot-main { min-width: 0; }
.hot-title {
  font-size: 14px; font-weight: 520; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hot-meta { display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: 11px; color: var(--muted); }
.hot-actions { display: flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.hot-row:hover .hot-actions { opacity: 1; }

.src-tag {
  font-size: 10.5px; padding: 1px 7px; border-radius: 5px;
  border: 1px solid currentColor; opacity: .9;
}

/* ---------------------------------------------------------- 点评 */

.review-shell { display: flex; flex-direction: column; gap: 16px; }

.review-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.review-head {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--card-2), transparent);
}
.review-no {
  flex: 0 0 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
}
.review-head h4 { margin: 0; font-size: 15.5px; line-height: 1.4; }
.review-head .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.review-body { padding: 4px 22px 20px; }
.review-foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 20px;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-soft);
}

.style-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 6px;
  font-size: 11px;
  background: rgba(90, 169, 255, .1);
  color: var(--info);
}

/* ---------------------------------------------------------- Markdown 渲染 */

.md { font-size: 14.2px; line-height: 1.85; color: var(--text); word-break: break-word; }
.md h2 {
  font-size: 18px; margin: 26px 0 10px; font-weight: 700; letter-spacing: -.2px;
  padding-left: 11px; border-left: 3px solid var(--accent);
  line-height: 1.4;
}
.md h2:first-child { margin-top: 12px; }
.md h3 { font-size: 15.5px; margin: 20px 0 8px; font-weight: 650; color: var(--text); }
.md p { margin: 0 0 12px; }
.md ul, .md ol { margin: 6px 0 14px; padding-left: 22px; }
.md li { margin: 4px 0; }
.md strong { font-weight: 700; color: var(--text); }
.md em { font-style: normal; color: var(--accent); }
.md blockquote {
  margin: 12px 0; padding: 8px 14px;
  border-left: 3px solid var(--line);
  background: var(--bg-soft);
  color: var(--text-2);
  font-size: 13px;
  border-radius: 0 8px 8px 0;
}
.md hr { border: 0; border-top: 1px dashed var(--line); margin: 20px 0; }
.md code {
  background: var(--bg-soft); border: 1px solid var(--line-soft);
  padding: 1px 5px; border-radius: 5px; font-size: 12.5px;
}
.md table {
  width: 100%; border-collapse: collapse; margin: 12px 0 16px;
  font-size: 13px;
}
.md th, .md td {
  border: 1px solid var(--line-soft);
  padding: 7px 10px; text-align: left; vertical-align: top;
}
.md th { background: var(--card-2); font-weight: 600; color: var(--text); }
.md tr:nth-child(even) td { background: rgba(255,255,255,.015); }
html[data-theme="light"] .md tr:nth-child(even) td { background: #fafbfc; }

.md .lead {
  font-size: 15px; color: var(--text);
  padding: 10px 14px; border-radius: 10px;
  background: var(--accent-soft);
  margin-bottom: 16px;
}

/* ---------------------------------------------------------- 输出区 */

.output {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.output-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 11px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-soft);
  font-size: 12.5px; color: var(--muted);
}
.output-body { padding: 20px 22px 24px; max-height: 72vh; overflow-y: auto; }

.empty {
  display: grid; place-items: center; gap: 8px;
  padding: 60px 20px; text-align: center; color: var(--muted);
}
.empty .glyph { font-size: 30px; opacity: .5; }
.empty h3 { margin: 0; font-size: 15px; color: var(--text-2); font-weight: 600; }
.empty p { margin: 0; font-size: 12.5px; max-width: 420px; }

/* ---------------------------------------------------------- 评分 */

.score-box { display: flex; align-items: center; gap: 18px; }
.score-ring {
  width: 92px; height: 92px; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--v) * 1%), var(--line-soft) 0);
  position: relative;
  flex: 0 0 92px;
}
.score-ring::before {
  content: ""; position: absolute; inset: 8px;
  border-radius: 50%; background: var(--card);
}
.score-ring b {
  position: relative; font-size: 26px; font-weight: 750; letter-spacing: -1px;
}
.score-ring b small { font-size: 11px; color: var(--muted); font-weight: 400; }

.score-meta { flex: 1; min-width: 0; }
.score-meta .kv { display: flex; gap: 16px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.score-meta .kv b { color: var(--text); font-weight: 600; }

.word-hits { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.word-hit {
  font-size: 11.5px; padding: 2px 8px; border-radius: 6px;
  background: rgba(255, 92, 92, .1); color: #ff8f8f;
  border: 1px solid rgba(255, 92, 92, .18);
}

.issue-list { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--text-2); }
.issue-list li { margin: 3px 0; }

/* ---------------------------------------------------------- 日历 */

.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
}
.cal-dow {
  background: var(--bg-soft); padding: 8px; text-align: center;
  font-size: 11.5px; color: var(--muted); letter-spacing: .5px;
}
.cal-cell {
  background: var(--card);
  min-height: 96px;
  padding: 8px;
  display: flex; flex-direction: column; gap: 5px;
  cursor: pointer;
  transition: background .12s;
}
.cal-cell:hover { background: var(--card-2); }
.cal-cell.other { opacity: .38; }
.cal-cell.today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.cal-date { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-cell.today .cal-date { color: var(--accent); font-weight: 700; }
.cal-ev {
  font-size: 11.5px; line-height: 1.4;
  padding: 2px 6px; border-radius: 5px;
  background: var(--card-2);
  border-left: 2px solid var(--muted);
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.cal-ev.platform-xiaohongshu { border-left-color: #ff2e4d; }
.cal-ev.platform-douyin { border-left-color: #fe2c55; }
.cal-ev.platform-wechat { border-left-color: #07c160; }
.cal-ev.platform-weibo { border-left-color: #ff8200; }
.cal-ev.platform-zhihu { border-left-color: #0084ff; }
.cal-ev.platform-bilibili { border-left-color: #fb7299; }
.cal-ev.status-done { opacity: .55; text-decoration: line-through; }

/* ---------------------------------------------------------- 列表项 */

.list-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}
.list-item:hover { border-color: var(--line); }
.list-item .li-main { flex: 1; min-width: 0; }
.list-item h5 { margin: 0 0 3px; font-size: 13.5px; font-weight: 550; }
.list-item .li-sub { font-size: 11.5px; color: var(--muted); }
.list-item .li-actions { display: flex; gap: 6px; opacity: 0; transition: .15s; }
.list-item:hover .li-actions { opacity: 1; }

/* 风格选择卡 */
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.style-card {
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  cursor: pointer;
  transition: .15s;
}
.style-card:hover { border-color: var(--accent); }
.style-card.on { background: var(--accent-soft); border-color: rgba(255,90,60,.5); }
.style-card b { display: block; font-size: 13px; font-weight: 600; }
.style-card span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.45; }

/* 步骤 */
.steps { display: flex; gap: 6px; flex-wrap: wrap; }
.step {
  font-size: 11px; padding: 3px 9px; border-radius: 20px;
  background: var(--card-2); color: var(--muted);
}
.step.on { background: var(--accent-soft); color: var(--accent); }

/* ---------------------------------------------------------- 登录 */

.login-layer {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(255, 90, 60, .12), transparent 60%),
    radial-gradient(700px 400px at 80% 90%, rgba(90, 169, 255, .08), transparent 60%),
    var(--bg);
}
.login-card {
  width: min(400px, calc(100vw - 40px));
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px 28px 22px;
  box-shadow: var(--shadow);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.login-brand h1 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: .2px; }
.login-brand p { margin: 0; font-size: 11.5px; color: var(--muted); letter-spacing: 1px; }
.login-err { color: var(--danger); font-size: 12px; min-height: 18px; }
.login-foot { margin: 14px 0 0; text-align: center; font-size: 11px; color: var(--muted); }

/* ---------------------------------------------------------- 遮罩 / 提示 */

.overlay {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  background: rgba(6, 9, 13, .72);
  backdrop-filter: blur(4px);
}
.overlay-card {
  width: min(380px, calc(100vw - 40px));
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 26px 22px;
  text-align: center;
  box-shadow: var(--shadow);
}
.overlay-card h3 { margin: 14px 0 4px; font-size: 15px; }
.overlay-card p { margin: 0; font-size: 12px; color: var(--muted); }

.spinner {
  width: 38px; height: 38px; margin: 0 auto;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ov-bar {
  height: 3px; background: var(--line-soft); border-radius: 4px;
  margin-top: 18px; overflow: hidden;
}
.ov-bar span {
  display: block; height: 100%; width: 30%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 4px;
  transition: width .4s ease;
}

.toast-wrap {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--card-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 12.5px;
  box-shadow: var(--shadow);
  animation: toastIn .2s ease;
  max-width: 80vw;
}
.toast.ok { border-color: rgba(53, 208, 127, .4); }
.toast.err { border-color: rgba(255, 92, 92, .45); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* ---------------------------------------------------------- 弹层 */

.sheet-mask {
  position: fixed; inset: 0; z-index: 95;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(6, 9, 13, .66);
  backdrop-filter: blur(4px);
  animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity: 0; } }

.sheet {
  width: min(600px, 100%);
  max-height: 86vh;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: sheetIn .2s cubic-bezier(.2, .8, .3, 1);
}
.sheet.wide { width: min(860px, 100%); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }

.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-soft);
}
.sheet-head h3 { margin: 0; font-size: 15px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sheet-body { padding: 18px 20px; overflow-y: auto; flex: 1; }

.sheet-foot {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px; padding: 12px 20px;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-soft);
}

.cal-ev.status-writing { border-left-color: var(--warn); }
.cal-ev.status-done { border-left-color: var(--ok); opacity: .5; }


@media (max-width: 1100px) {
  .split { grid-template-columns: 1fr; }
  .split-wide { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .side-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 55; backdrop-filter: blur(2px); }
  #pageSub { display: none; }
  .crumb h2 { font-size: 16px; letter-spacing: .3px; }
  .side {
    position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
    width: 240px; flex-basis: 240px;
    box-shadow: var(--shadow);
    z-index: 60;
  }
  .side.open { transform: translateX(0); }
  .mobile-only { display: grid; }
  .view { padding: 16px 14px 70px; }
  .topbar { padding: 0 14px; height: 58px; flex-basis: 58px; }
  .today-date { display: none; }
  .page-hero { flex-direction: column; align-items: flex-start; gap: 10px; }
  .page-hero h1 { font-size: 21px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hot-row { grid-template-columns: 28px 1fr; }
  .hot-actions { grid-column: 2; opacity: 1; }
  .hot-row { padding: 10px; }
  .review-body { padding: 4px 16px 16px; }
  .cal-cell { min-height: 76px; padding: 5px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .output-body { max-height: none; }
}
