/* ===== 浅色 · 橙色（阿里巴巴风）· 智训通 ===== */
:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --ink: #1f2329;
  --ink-2: #5a6573;
  --ink-3: #98a1ad;
  --line: #ebedf0;
  --brand: #ff6a00;                 /* 阿里巴巴橙 */
  --brand-2: #ff8a1f;
  --brand-grad: linear-gradient(135deg, #ff6a00 0%, #ff8a1f 100%);
  --brand-soft: #fff3e8;            /* 浅橙底，用于激活态 */
  --brand-ring: rgba(255, 106, 0, .12);
  --green: #16b364;
  --amber: #fa8c16;
  --red: #f5455c;
  --purple: #8b5cf6;
  --blue: #2f6bff;
  --sidebar-bg: #ffffff;
  --sidebar-ink: #5a6573;
  --sidebar-ink-2: #98a1ad;
  --sidebar-line: #eef0f3;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(31,35,41,.03), 0 4px 14px rgba(31,35,41,.04);
  --shadow-sm: 0 1px 2px rgba(31,35,41,.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

.app { display: flex; min-height: 100vh; }

/* ===== 侧边栏（浅色 · 橙色激活） ===== */
.sidebar {
  width: 236px; flex: 0 0 236px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-line);
  color: var(--sidebar-ink);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  z-index: 70;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px 18px; border-bottom: 1px solid var(--sidebar-line); cursor: pointer; }
.brand:hover .brand-name { color: var(--brand); }
.brand-logo {
  width: 40px; height: 40px; border-radius: 11px; color: #fff;
  background: var(--brand-grad);
  display: grid; place-items: center; box-shadow: 0 6px 16px rgba(255,106,0,.30);
}
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: .5px; color: var(--ink); }
.brand-sub { font-size: 12px; color: var(--sidebar-ink-2); margin-top: 2px; }

.nav { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px; border-left: 3px solid transparent;
  color: var(--sidebar-ink); text-decoration: none; font-weight: 600; font-size: 13px;
  transition: all .18s ease;
}
.nav-item svg { color: var(--sidebar-ink-2); transition: color .18s; }
.nav-item:hover { background: #f7f8fa; color: var(--brand); }
.nav-item.active {
  background: var(--brand-soft); color: var(--brand); border-left-color: var(--brand); font-weight: 800;
}
.nav-item.active svg { color: var(--brand); }

/* ===== 私密随笔入口（无痕版：桌面端完全隐形，触屏端长按 dbBadge） ===== */
.nav-item[data-route="essays"] { display: none; } /* 默认隐藏，解锁后才显示 */

/* 桌面/触屏通用：无痕触发器 essay-stealth（"···"中性图标）
   - 默认 display:none
   - 只有显式加上 .is-reveal 才临时出现（约 3 秒后由 JS 自动移除）
   - 全程不依赖 hover，触屏（hover:none）也不会被误触 */
.essay-stealth {
  display: none;
  align-self: flex-start;
  align-items: center; justify-content: center;
  width: 28px; height: 22px; padding: 0;
  background: transparent; border: none; border-radius: 6px;
  color: #c7ccd4; cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.essay-stealth.is-reveal { display: inline-flex; }
.essay-stealth:hover { color: #566072; background: rgba(86,96,114,.08); }
.essay-stealth:focus { outline: none; }
.essay-stealth:focus-visible { outline: 2px solid rgba(86,96,114,.35); outline-offset: 1px; }
/* PIN 弹窗 */
.essay-pin { text-align: center; padding: 6px 2px; }
.essay-pin-tip { color: var(--ink-2); margin: 0 0 14px; font-size: 13px; line-height: 1.6; }
.essay-pin-tip small { color: var(--ink-3); }
.essay-pin-input {
  width: 100%; max-width: 250px; margin: 0 auto 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 16px; text-align: center;
  letter-spacing: 5px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.essay-pin-input:focus { border-color: #566072; box-shadow: 0 0 0 3px rgba(86,96,114,.14); }
.essay-pin-actions { display: flex; gap: 10px; justify-content: center; margin-top: 4px; }
.essay-pin-forgot { margin-top: 12px; font-size: 12px; color: var(--ink-3); cursor: pointer; text-decoration: underline; }

.sidebar-foot { padding: 14px 14px 16px; border-top: 1px solid var(--sidebar-line); display: flex; flex-direction: column; gap: 12px; }
.db-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--ink-2);
  background: #f7f8fa; border: 1px solid var(--sidebar-line);
  padding: 7px 11px; border-radius: 999px; align-self: flex-start;
  cursor: default; user-select: none; -webkit-user-select: none; touch-action: none;
}
/* 长按触发瞬间才出现极轻反馈（平时完全无痕） */
.db-badge.longpressing {
  background: rgba(86,96,114,.10);
  box-shadow: 0 0 0 2px rgba(86,96,114,.22);
  transition: box-shadow .15s ease, background .15s ease;
}
.btn-logout {
  display: flex; align-items: center; justify-content: flex-start; gap: 9px;
  width: 100%; color: var(--ink-2); font-weight: 600; font-size: 13px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
  cursor: pointer; transition: all .16s ease; opacity: 0;
}
.sidebar-foot:hover .btn-logout { opacity: 1; }
.btn-logout:hover { border-color: var(--red); color: var(--red); background: #fff1f3; }
.db-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(22,179,100,.20); }
.db-badge.warn .dot { background: var(--amber); box-shadow: 0 0 0 3px rgba(250,140,22,.20); }

/* ===== 真正"无痕"分端策略 =====
   - 传统桌面（有鼠标，pointer:fine）：db-badge 完全隐形（既看不到"已连接"也看不到 dot），
     唯一入口靠点击侧边栏空白处
   - 触屏（hover:none 或 pointer:coarse）：db-badge 始终可见，长按它进入日记解锁
   双条件 `(hover: hover) and (pointer: fine)` 才能准确锁定"桌面有鼠标电脑"，
   避免触屏笔记本/Android Chrome 把手机端徽章误隐藏，也避免某些准 PC 把桌面徽章保留 */
@media (hover: hover) and (pointer: fine) {
  /* 桌面：彻底隐藏"已连接"徽章，连占位也别留 —— 视觉上彻底看不到任何与日记相关的元素 */
  .db-badge { display: none !important; }
}

/* ===== 主区域 ===== */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 30;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.hamburger {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); cursor: pointer;
}
.topbar-title h1 { font-size: 19px; font-weight: 800; }
.topbar-title p { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.today {
  font-size: 12px; color: var(--ink-2); font-weight: 600;
  background: #fff; border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow-sm);
}
.content { padding: 20px 24px 36px; }

/* ===== 通用组件 ===== */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px;
}
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-head h2 { font-size: 15px; font-weight: 400; }
.home-sec h2 { font-size: 13px; font-weight: 700; }
.home-list th, .home-list td { font-weight: 400; }
.home-sec .count-pill { font-size: 11px; }
.section-head .head-actions { display: flex; align-items: center; gap: 8px; }
.muted { color: var(--ink-3); }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 8px 13px; border-radius: var(--radius-sm); font-weight: 600; font-size: 12px;
  cursor: pointer; transition: all .16s ease;
}
.btn:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.btn-primary {
  background: var(--brand-grad); color: #fff; border: none;
  box-shadow: 0 6px 16px rgba(255,106,0,.28);
}
.btn-primary:hover { color: #fff; filter: brightness(1.05); transform: translateY(-1px); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--red); border-color: #f7c4ca; }
.btn-danger:hover { background: #fff1f3; border-color: var(--red); color: var(--red); }
.btn-sm { padding: 5px 10px; font-size: 11px; border-radius: 8px; }

/* 状态徽标 */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; line-height: 1.6; white-space: nowrap;
}
.badge.blue { background: #eaf1ff; color: #2f6bff; }
.badge.cyan { background: #e0f6f8; color: #0a8a94; }
.badge.green { background: #e3f7ec; color: #16b364; }
.badge.amber { background: #fff1e0; color: #d9730a; }
.badge.red { background: #ffe9ec; color: #e0324a; }
.badge.gray { background: #f1f3f6; color: #7a8595; }
.badge.purple { background: #efe9fd; color: #7c4ddb; }
.badge.warn { background: var(--brand); color: #fff; box-shadow: 0 0 0 1px rgba(255,106,0,.35); font-size: 8px; padding: 2px 7px; }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field .req { color: var(--red); }
.field-inline { display: flex; align-items: center; gap: 8px; }
.field-inline label { margin-bottom: 0; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
input, select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 13px; font-family: inherit; color: var(--ink);
  background: #fff; transition: border-color .16s, box-shadow .16s;
}
.field-inline input, .field-inline select { width: auto; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
textarea { min-height: 84px; resize: vertical; }
.form-row { display: flex; gap: 14px; }
.form-row .field { flex: 1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* 分页 */
.pagination-bar { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.pagination-bar .page-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.pagination-bar .page-info { font-size: 12px; color: var(--ink-2); margin-left: 6px; }

/* 表格 */
.table-wrap { overflow-x: auto; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; color: var(--ink-3); font-weight: 700; background: #fafbfc; position: sticky; top: 0; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: #fff8f3; }
tbody tr:last-child td { border-bottom: none; }
.row-actions { display: flex; gap: 8px; }
.link { color: var(--brand); cursor: pointer; }
.link:hover { text-decoration: underline; }
/* 仪表盘待跟进客户列表 */
tbody tr.clickable { cursor: pointer; }
.cell-overdue { color: var(--red); font-weight: 700; }
.cell-content { white-space: normal; max-width: 200px; color: var(--ink-2); }

/* 收入明细表：紧凑、文本列可换行，避免横向滚动条 */
.rec-table { font-size: 13px; }
.rec-table th, .rec-table td { padding: 8px 10px; }
.rec-table .col-wrap { white-space: normal; }
.rec-table .col-note { max-width: 160px; color: var(--ink-2); }
/* 超期未收款行：醒目提示，督促催收 */
.rec-table tbody tr.row-overdue td { background: #fff5ec; }
.rec-table tbody tr.row-overdue td:first-child { box-shadow: inset 3px 0 0 var(--brand); }

/* 标签页 */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 13px; cursor: pointer;
  transition: all .16s ease;
}
.tab:hover { border-color: var(--brand); color: var(--brand); }
.tab.active { background: var(--brand-grad); color: #fff; border: none; box-shadow: 0 6px 14px rgba(255,106,0,.25); }

/* 统计合计行 */
tbody .total-row td {
  font-weight: 800; background: #fafbfc; border-top: 2px solid var(--line);
}

/* 工具栏 */
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .search { flex: 1; min-width: 200px; position: relative; }
.toolbar .search input { padding-left: 36px; }
.toolbar .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }

/* ===== 页面加载占位（避免切换视图时右侧一片空白） ===== */
.page-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 48vh; gap: 14px; color: var(--ink-3);
}
.page-loading .spin {
  width: 34px; height: 34px;
  border: 3px solid rgba(148, 163, 184, .22);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: page-spin .85s linear infinite;
}
.page-loading .hint { font-size: 13px; letter-spacing: .5px; }
@keyframes page-spin { to { transform: rotate(360deg); } }
/* 兼容旧浏览器降级 */
@media (prefers-reduced-motion: reduce) {
  .page-loading .spin { animation-duration: 2.5s; }
}

/* ===== 仪表盘 ===== */
.motto {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(90deg, var(--brand-soft), #fff);
  border: 1px solid #ffe2c7; border-left: 4px solid var(--brand);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px;
  cursor: pointer; transition: box-shadow .16s;
}
.motto:hover { box-shadow: var(--shadow); }
.motto-ico { color: var(--brand); display: inline-flex; }
.motto-text { flex: 1; font-size: 12px; font-weight: 400; color: var(--ink-2); }
.motto-ph { color: var(--ink-3); font-weight: 400; font-size: 13px; }
.motto-edit { font-size: 12px; color: var(--brand); font-weight: 600; opacity: 0; transition: opacity .15s ease; }
.motto:hover .motto-edit { opacity: 1; }

.stats-grid { display: flex; align-items: stretch; gap: 10px; container-type: inline-size; container-name: sg; }
.stats-grid .stat { flex: 1 1 0; min-width: 0; padding: 12px 13px; gap: 10px; min-height: 72px; }
.stats-grid .stat .ico { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px; }
.stats-grid .stat .ico svg { width: 15px; height: 15px; }
.stats-grid .stat .num { font-size: 16px; }
.stats-grid .stat .body { width: 100%; min-width: 0; }
/* 容器查询：网格宽度 ≤ 1400px 时每个卡片已不足 ~170px，金额 ¥184,500 会截断；
   改为「图标在上 / 数字在下」纵向布局，确保金额完整可见。 */
@container sg (max-width: 1400px) {
  .stats-grid .stat { flex-direction: column; align-items: flex-start; padding: 11px 12px 12px; gap: 6px; min-height: 0; }
  .stats-grid .stat .ico { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 6px; }
  .stats-grid .stat .ico svg { width: 13px; height: 13px; }
  .stats-grid .stat .body { width: 100%; }
  .stats-grid .stat .num { font-size: 15px; line-height: 1.15; }
  .stats-grid .stat .lbl { font-size: 10px; margin-top: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* 财务页顶部收入三卡 + 未收款金额（4 列，避免随仪表盘 6 列留白） */
.fin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1100px) { .fin-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .fin-stats { grid-template-columns: 1fr; } }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 15px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; min-height: 78px;
  display: flex; align-items: center; gap: 12px;
}
.stat::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand);
}
.stat .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; flex: 0 0 30px; }
.stat .ico svg { width: 16px; height: 16px; }
.stat .body { flex: 1; min-width: 0; }
.stat .num { font-size: 17.6px; font-weight: 400; letter-spacing: .3px; font-variant-numeric: tabular-nums; font-family: var(--mono); line-height: 1.1; }
.stat .lbl { font-size: 9.6px; color: var(--ink-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .more { display: none; }
.stat.clickable { cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.stat.clickable:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(255,106,0,.16); border-color: #ffd0a6; }
.stat.c1 { --accent: #ff6a00; } .stat.c1::before { background: #ff6a00; } .stat.c1 .ico { background: #ff6a00; }
.stat.c2 { --accent: #ff8c16; } .stat.c2::before { background: #ff8c16; } .stat.c2 .ico { background: #ff8c16; }
.stat.c3 { --accent: #faad14; } .stat.c3::before { background: #faad14; } .stat.c3 .ico { background: #faad14; }
.stat.c4 { --accent: #ff7a45; } .stat.c4::before { background: #ff7a45; } .stat.c4 .ico { background: #ff7a45; }
.stat.c5 { --accent: #8b5cf6; } .stat.c5::before { background: #8b5cf6; } .stat.c5 .ico { background: #8b5cf6; }
.stat.c6 { --accent: #ef4444; } .stat.c6::before { background: #ef4444; } .stat.c6 .ico { background: #ef4444; }
.stat.c7 { --accent: #0a8a94; } .stat.c7::before { background: #0a8a94; } .stat.c7 .ico { background: #0a8a94; }

.dash-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-top: 16px; }
.mini-list { display: flex; flex-direction: column; gap: 10px; }
.mini-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.mini-item.clickable { cursor: pointer; }
.mini-item.clickable:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.mini-item .mi-main { flex: 1; min-width: 0; }
.mini-item .mi-title { font-weight: 700; font-size: 13px; }
.mini-item .mi-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.mini-item .mi-time { font-size: 12px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mini-item .mi-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto; }
.count-pill { background: var(--brand-grad); color: #fff; font-size: 12px; font-weight: 700; padding: 1px 9px; border-radius: 999px; margin-left: 4px; }
.empty { text-align: center; color: var(--ink-3); padding: 30px; font-size: 14px; }

/* 今日待办勾选 */
.task-check {
  width: 22px; height: 22px; flex: 0 0 22px; border-radius: 7px;
  border: 2px solid var(--line); background: #fff; color: #fff;
  display: grid; place-items: center; cursor: pointer; transition: all .15s;
}
.task-check:hover { border-color: var(--brand); }
.task-check.checked { background: var(--green); border-color: var(--green); }

/* ===== 任务视图 ===== */
.task-summary {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.ts-main { display: flex; align-items: baseline; gap: 10px; }
.ts-num { font-size: 26px; font-weight: 800; color: var(--brand); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ts-lbl { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.task-list { display: flex; flex-direction: column; gap: 12px; }
.task-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 16px; box-shadow: var(--shadow-sm);
}
.task-card.done { opacity: .65; background: #fafbfd; }
.task-card .task-body { flex: 1; min-width: 0; }
.task-title { font-weight: 700; font-size: 14px; }
.task-card.done .task-title { text-decoration: line-through; color: var(--ink-3); }
.task-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.task-meta .tm { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.task-note { font-size: 12px; color: var(--ink-2); margin-top: 8px; white-space: pre-wrap; }

/* ===== 日历 ===== */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.cal-nav { display: flex; align-items: center; gap: 10px; }
.cal-title { font-size: 17px; font-weight: 800; min-width: 130px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; width: 100%; }
.filter-hint {
  font-size: 13px; color: var(--ink-2); background: var(--brand-soft);
  border: 1px solid #ffe2c7; border-radius: 10px; padding: 9px 14px; margin-bottom: 14px;
  display: flex; align-items: center;
}
.cal-dow { text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-3); padding: 6px 0; }
.cal-cell {
  min-height: 82px; min-width: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; padding: 6px; cursor: pointer; transition: all .15s;
  display: flex; flex-direction: column; gap: 4px;
}
.cal-cell:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.cal-cell.out { background: #f7f8fa; opacity: .55; }
.cal-cell.today, .cal-cell.cal-today { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(255,106,0,.28); }
.cal-cell .dnum { font-size: 12px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cal-cell.today .dnum, .cal-cell.cal-today .dnum { color: #fff; font-size: 13px; transform: scale(1.05); }
.cal-cell.today .chip, .cal-cell.cal-today .chip { background: rgba(255,255,255,.92); color: #c55a00; border-left-color: #fff; }
.cal-cell.today .chip.s-预约, .cal-cell.cal-today .chip.s-预约 { background: rgba(255,255,255,.92); color: #c55a00; border-left-color: #fff; }
.cal-cell.today .chip.s-确认, .cal-cell.cal-today .chip.s-确认 { background: rgba(255,255,255,.92); color: #138a4a; border-left-color: #fff; }
.chip {
  font-size: 10px; line-height: 1.4; padding: 2px 5px; border-radius: 6px;
  background: var(--brand-soft); color: var(--brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-left: 3px solid var(--brand); cursor: pointer;
}
.chip:hover { filter: brightness(.97); }
.chip.s-预约 { background: #fff1e0; color: #d9730a; border-left-color: var(--amber); }
.chip.s-确认 { background: #e3f7ec; color: #16b364; border-left-color: var(--green); }

/* 抽屉 */
.drawer-mask { position: fixed; inset: 0; background: rgba(31,35,41,.35); display: none; z-index: 50; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 460px; max-width: 92vw;
  background: #fff; box-shadow: -10px 0 40px rgba(31,35,41,.18);
  transform: translateX(100%); transition: transform .25s ease; z-index: 51;
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.drawer-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.drawer-head h3 { font-size: 16px; font-weight: 800; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-bottom: 18px; }
.detail-grid .full { grid-column: 1 / -1; }
.dd { font-size: 12px; }
.dd .k { color: var(--ink-3); margin-bottom: 3px; }
.dd .v { font-weight: 600; }

.sub-title { font-size: 13px; font-weight: 800; margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }
.follow-item { border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; margin-bottom: 10px; background: #fff; }
.follow-item .fh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.follow-item .fdate { font-size: 12px; color: var(--ink-3); font-weight: 700; }
.follow-item .fcontent { font-size: 12px; color: var(--ink); white-space: pre-wrap; }
.follow-item .fnext { font-size: 12px; color: var(--brand); margin-top: 5px; }

/* ===== 弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(31,35,41,.45);
  display: flex; align-items: center; justify-content: center; z-index: 60; padding: 20px;
}
.modal {
  width: 672px; max-width: 100%; max-height: 90vh; overflow: hidden;
  background: #fff; border-radius: 16px; box-shadow: 0 30px 80px rgba(31,35,41,.30);
  display: flex; flex-direction: column; animation: pop .2s ease;
}
/* 写日记等"长写作"弹窗：更宽、更矮的留白 */
.modal.modal-wide { width: 760px; }
.modal.modal-wide .modal-body { padding: 22px 28px 16px; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 16px; font-weight: 800; }
/* 关闭按钮降视觉权重：变小、变淡、远离输入区，避免打字时误触 */
.modal-close {
  background: none; border: 1px solid transparent; font-size: 18px; line-height: 1;
  color: #b8b8be; cursor: pointer; padding: 4px 8px; border-radius: 8px;
  transition: all .15s ease; margin-left: 12px;
}
.modal-close:hover { color: var(--ink); background: #f3f4f6; border-color: var(--line); }
.modal-body { padding: 20px 22px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }

/* 写日记/编辑表单：操作栏贴底常驻（不再被正文挤到屏幕外） */
.form-actions.sticky-foot {
  position: sticky; bottom: 0; z-index: 2;
  background: #fff;
  margin: 0 -22px -20px;             /* 抵消 modal-body padding，让贴底 */
  padding: 12px 22px;
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 14px rgba(31,35,41,.04);
}
.modal-wide .form-actions.sticky-foot {
  margin: 0 -28px -16px;
  padding: 14px 28px;
}
.form-actions.sticky-foot .dirty-hint {
  margin-right: auto; font-size: 12px; color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 6px;
}
.form-actions.sticky-foot .dirty-hint::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
}

/* ===== Toast ===== */
.toast-wrap { position: fixed; top: 20px; right: 20px; z-index: 80; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand);
  padding: 11px 15px; border-radius: 12px; box-shadow: var(--shadow); font-size: 13px; font-weight: 600;
  min-width: 220px; animation: slideIn .2s ease;
}
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* 移动端遮罩（导航） */
.nav-backdrop { display: none; }

/* ===== 响应式 =====
   注：统计卡已通过容器查询 @container sg (max-width: 1400px) 在网格宽度变窄时
   自动从横向「图标+数字」切到纵向「图标在上、数字在下」，保证金额完整显示。
   以下媒体查询仅处理 ≤560px 时 wrap 成 2×4 的兜底（避免手机端 8 卡横向挤成一团）。 */
@media (max-width: 560px) {
  .stats-grid { flex-wrap: wrap; gap: 8px; }
  .stats-grid .stat { flex: 1 1 calc(50% - 4px); }
}
@media (max-width: 960px) {
  .hamburger { display: inline-flex; }
  .sidebar {
    position: fixed; left: 0; top: 0; height: 100vh; width: 240px; flex: none;
    transform: translateX(-100%); transition: transform .25s ease; box-shadow: 0 20px 60px rgba(0,0,0,.18);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 65; }
  .dash-cols { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .content { padding: 16px 14px 32px; }
  .topbar { padding: 12px 14px; }
  .cal-today-btn { display: none; }
  #pageTitle { font-size: 18px; }
  .stat .num { font-size: 16px; }
  .form-row { flex-direction: column; gap: 0; }
  .toolbar { gap: 10px; }
  .toolbar .search { min-width: 100%; }
  .cal-cell { min-height: 58px; padding: 4px; }
  .cal-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
  .cal-title { min-width: 96px; font-size: 15px; }
  .cal-cell .dnum { font-size: 11px; }
  .chip { font-size: 9px; padding: 1px 4px; }
  .task-card { flex-wrap: wrap; }
  /* 表格在手机端保持可读列宽、整体横向滚动，避免 5 列被压成一团 */
  .table-wrap table { min-width: 560px; }
  /* 课程预约：手机端改为堆叠卡片，每格带字段名，无需横向滚动（已无「课程」列） */
  .home-list.stack { min-width: 0; }
  .home-list.stack thead { display: none; }
  .home-list.stack, .home-list.stack tbody, .home-list.stack tr, .home-list.stack td { display: block; width: 100%; box-sizing: border-box; }
  .home-list.stack tr { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; padding: 4px 10px; }
  .home-list.stack tr:last-child { margin-bottom: 0; }
  .home-list.stack td { border: none; padding: 7px 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: right; }
  .home-list.stack td::before { content: attr(data-label); color: var(--ink-3); font-size: 12px; text-align: left; flex: 0 0 auto; }
  /* 随笔页顶部：手机端整齐两行（搜索框独占一行 + 写日记/锁定等分并排），避免按钮文字被压成两行 */
  .essays-bar { flex-wrap: wrap; gap: 8px; }
  .essays-bar .search-box { flex: 1 1 100%; order: 1; }
  .essays-bar .btn { flex: 1 1 calc(50% - 4px); justify-content: center; order: 2; white-space: nowrap; min-width: 0; }
}
@media (max-width: 560px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 习惯打卡 ===== */
.habits-wrap { display: flex; flex-direction: column; gap: 16px; }
/* 新增习惯：仅页面右上角的小“✚”浮动按钮上悬停时才展开成完整按钮（用得少，不占视线） */
.habits-bar { display: flex; justify-content: flex-end; min-height: 40px; }
.habit-fab {
  display: inline-flex; align-items: center; gap: 0;
  height: 40px; width: 40px; padding: 0; border: none;
  border-radius: 22px; background: var(--brand-grad); color: #fff;
  font-size: 18px; cursor: pointer; overflow: hidden; justify-content: center;
  box-shadow: 0 6px 16px rgba(255,106,0,.28);
  transition: width .25s ease, padding .25s ease, box-shadow .2s ease;
}
.habit-fab .fab-icon { flex: 0 0 auto; line-height: 1; }
.habit-fab .fab-label {
  white-space: nowrap; max-width: 0; opacity: 0; overflow: hidden;
  transition: max-width .25s ease, opacity .2s ease, margin .25s ease;
}
.habit-fab:hover, .habit-fab:focus { width: 138px; padding: 0 18px; justify-content: flex-start; outline: none; box-shadow: 0 8px 20px rgba(255,106,0,.36); }
.habit-fab:hover .fab-label, .habit-fab:focus .fab-label { max-width: 96px; opacity: 1; margin-left: 7px; }
@media (hover: none) {
  .habit-fab { width: auto; padding: 0 18px; justify-content: flex-start; }
  .habit-fab .fab-label { max-width: 96px; opacity: 1; margin-left: 7px; }
}
.habit-today { display: flex; align-items: center; gap: 18px; padding: 18px 20px; background: linear-gradient(135deg, #fffaf3 0%, #ffffff 70%); }
.ht-left { flex: 0 0 auto; }
.ht-right { flex: 1 1 auto; min-width: 0; }
.ht-title { font-size: 16px; font-weight: 700; }
.ht-sub { color: var(--ink-3); font-size: 13px; margin: 2px 0 12px; }
.ring { display: inline-flex; filter: drop-shadow(0 4px 10px rgba(255,106,0,.18)); }
.ring-pct { font-size: 17px; font-weight: 800; fill: var(--ink); }
.ring-sub { font-size: 10px; fill: var(--ink-3); }
.checkin-list { display: flex; flex-direction: column; gap: 8px; }
.checkin-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; transition: background .15s; }
.checkin-row:hover { background: #fafbfc; }
.ci-emoji { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; flex: 0 0 auto; }
.ci-name { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.streak { font-size: 12px; color: var(--brand); font-weight: 700; flex: 0 0 auto; }
.ci-btn { flex: 0 0 auto; border: 1px solid var(--brand); color: var(--brand); background: #fff; border-radius: 20px; padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; }
.ci-btn:hover { background: var(--brand-soft); transform: translateY(-1px); }
.ci-btn.done { background: var(--brand-grad); border: none; color: #fff; box-shadow: 0 4px 12px rgba(255,106,0,.25); }
.habit-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.habit-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.habit-card { padding: 18px; border-radius: var(--radius); transition: transform .18s ease, box-shadow .18s ease, border-color .18s; border: 1px solid var(--line); min-width: 0; }
.habit-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(31,35,41,.08); }
.habit-card.done { border-color: color-mix(in srgb, var(--hc, #ff6a00) 45%, transparent); background: color-mix(in srgb, var(--hc, #ff6a00) 6%, #fff); }
.hc-head { display: flex; align-items: center; gap: 12px; }
.hc-emoji { width: 44px; height: 44px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; font-size: 23px; flex: 0 0 auto; box-shadow: 0 2px 8px rgba(31,35,41,.06); }
.hc-info { flex: 1 1 auto; min-width: 0; }
.hc-name-wrap { flex: 1 1 auto; min-width: 0; }
.hc-name { font-weight: 700; font-size: 15px; display: flex; align-items: center; flex-wrap: nowrap; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-goal { color: var(--ink-3); font-size: 12px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-acts { display: flex; gap: 6px; flex: 0 0 auto; }
.hc-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.habit-card .ci-btn { width: 100%; margin-top: 4px; }
.hc-heat { margin-top: 10px; }
.hc-heat .heatmap { grid-auto-columns: 13px; grid-template-rows: repeat(7, 13px); gap: 3px; }
.hc-heat .hm-cell { border-radius: 3px; }
.hc-heat-tip { font-size: 11px; color: var(--ink-3); margin-top: 6px; text-align: right; }
.stat-pill { font-size: 12px; background: #f6f7f9; border: 1px solid var(--line); border-radius: 20px; padding: 5px 11px; color: var(--ink-2); font-weight: 600; }
.stat-pill:nth-child(1) { color: var(--brand); background: var(--brand-soft); border-color: transparent; }
.heatmap { display: grid; grid-template-rows: repeat(7, 14px); grid-auto-flow: column; grid-auto-columns: 14px; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.hm-cell { border-radius: 4px; background: #ebedf0; cursor: pointer; transition: transform .1s, box-shadow .1s; }
.hm-cell:hover { transform: scale(1.18); }
.hm-cell.on { opacity: 1; }
.hm-cell.today { box-shadow: 0 0 0 2px var(--brand); }
.hm-legend { font-size: 11px; color: var(--ink-3); margin-top: 10px; display: flex; align-items: center; gap: 6px; }
.hm-legend .hm-cell { cursor: default; width: 12px; height: 12px; }
.hm-legend .hm-cell:hover { transform: none; }
.empty-state { text-align: center; padding: 48px 24px; }
.es-emoji { font-size: 50px; }
.es-title { font-size: 18px; font-weight: 700; margin-top: 10px; }
.es-sub { color: var(--ink-3); font-size: 13px; line-height: 1.7; margin: 10px auto 20px; max-width: 420px; }
.emoji-row, .color-row { display: flex; flex-wrap: wrap; gap: 8px; }
.emoji-pick { font-size: 20px; width: 38px; height: 38px; border: 1px solid var(--line); background: #fff; border-radius: 10px; cursor: pointer; transition: all .12s; }
.emoji-pick:hover { border-color: var(--brand); transform: translateY(-1px); }
.emoji-pick.sel { border-color: var(--brand); background: var(--brand-soft); transform: scale(1.05); }
.color-pick { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; transition: transform .12s; }
.color-pick.sel { transform: scale(1.2); box-shadow: 0 0 0 2px var(--brand); }
/* 坚持概览 */
.habit-summary { display: flex; flex-wrap: wrap; align-items: stretch; padding: 0; overflow: hidden; background: linear-gradient(135deg, #fff7f0 0%, #ffffff 55%); border: 1px solid var(--line); position: relative; }
.habit-summary::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--brand-grad); }
.hs-item { padding: 18px 22px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; min-width: 92px; }
.hs-item:last-of-type { border-right: none; }
.hs-val { font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1; letter-spacing: -.5px; }
.hs-label { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.hs-trend { flex: 1 1 240px; min-width: 220px; padding: 16px 22px; }
.hs-trend-label { font-size: 12px; color: var(--ink-3); margin-bottom: 8px; }
.trend { display: flex; align-items: flex-end; gap: 3px; height: 36px; }
.trend-bar { flex: 1 1 auto; min-width: 3px; background: linear-gradient(180deg, #ff8a1f, #ff6a00); border-radius: 2px 2px 0 0; opacity: .9; transition: opacity .15s; }
.trend-bar:hover { opacity: 1; }
/* 里程碑徽章 */
.ms-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 20px; margin-left: 6px; vertical-align: middle; }
.ms-green { background: #e6f7ec; color: #18a058; }
.ms-purple { background: #f1e9ff; color: #7a3ff0; }
.ms-gold { background: #fff5e0; color: #c98a00; }
@media (max-width: 600px) {
  .habit-today { flex-direction: column; align-items: flex-start; gap: 12px; }
  .ht-left { align-self: center; }
  .habit-cards { grid-template-columns: 1fr; }
  .habit-row { grid-template-columns: 1fr; }
  .habit-summary { gap: 0; }
  .hs-item { border-right: none; border-bottom: 1px solid var(--line); min-width: 0; flex: 1 1 40%; }
  .hs-trend { flex-basis: 100%; }
}

/* ===== 我的随笔（日记） ===== */
.essays-wrap { display: flex; flex-direction: column; gap: 22px; max-width: 800px; margin: 0 auto; }

.essays-bar { display: flex; gap: 10px; align-items: center; }
.search-box { flex: 1 1 auto; min-width: 0; position: relative; }
.search-box input {
  width: 100%; height: 42px; border: 1px solid #e9e9ec; border-radius: 11px;
  padding: 0 15px; font-size: 14px; background: #fff; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search-box input::placeholder { color: #b8b8be; }
.search-box input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* Word/日记本式连续文档流 */
.diary-doc { background: #fff; border: 1px solid #ececec; border-radius: 16px; padding: 44px 60px 48px; box-shadow: 0 6px 34px rgba(31,35,41,.05); }
.dt-group { display: flex; flex-direction: column; }
.dt-group + .dt-group { margin-top: 8px; }
.dt-head {
  position: sticky; top: 0; z-index: 2; font-size: 12px; font-weight: 600; color: #b6b6bc;
  background: linear-gradient(180deg, #fff 72%, rgba(255,255,255,0));
  padding: 16px 0 12px; margin-bottom: 4px; letter-spacing: .14em;
  border-bottom: 1px solid #f4f4f2;
}
.essay-doc { position: relative; padding: 28px 0 30px; border-bottom: 1px solid #f3f3f1; cursor: pointer; transition: background .15s ease; }
.essay-doc:first-child { padding-top: 20px; }
.essay-doc:last-child { border-bottom: none; }
.essay-doc:hover { background: #fbfbfa; }
.ed-acts { position: absolute; top: 26px; right: 0; display: flex; gap: 6px; opacity: 0; pointer-events: none; transform: translateX(4px); transition: opacity .2s ease, transform .2s ease; }
.essay-doc:hover .ed-acts { opacity: 1; pointer-events: auto; transform: none; }
.ed-acts .btn { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 8px; }
.ed-title {
  font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  font-size: 16px; font-weight: 600; color: #2f2f2f; margin: 0 0 12px;
  padding-right: 120px; line-height: 1.5; letter-spacing: .01em;
}
.ed-date {
  font-family: var(--font, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif);
  font-size: 12.5px; font-weight: 500; color: #bdbdbd; margin-right: 12px;
  font-variant-numeric: tabular-nums; letter-spacing: .02em; vertical-align: 1px;
}
.ed-body {
  font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  font-size: 15.5px; line-height: 1.95; color: #4a4a4a; letter-spacing: .005em;
  white-space: pre-wrap; padding-right: 44px;
}
.dt-more { text-align: center; margin-top: 22px; }
.dt-more .btn { min-width: 200px; height: 40px; }

/* 阅读弹窗（日记感） */
.diary-reader { font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif; }
.dr-date { color: #b0b0b6; font-size: 12.5px; margin-bottom: 16px; font-family: var(--font, system-ui, sans-serif); letter-spacing: .02em; }
.dr-text { white-space: pre-wrap; line-height: 2; font-size: 16px; color: #3a3a3a; max-height: 58vh; overflow: auto; letter-spacing: .005em; }
.diary-reader .form-actions { margin-top: 18px; }

/* 编辑器 */
#esContent { width: 100%; border: 1px solid #e9e9ec; border-radius: 12px; padding: 14px 16px; font-size: 15.5px; line-height: 1.9; resize: vertical; color: #3a3a3a; font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif; transition: border-color .15s ease, box-shadow .15s ease; }
#esContent:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
#esTitle { border-radius: 10px; border: 1px solid #e9e9ec; padding: 10px 14px; font-size: 15px; transition: border-color .15s ease, box-shadow .15s ease; }
#esTitle:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.es-count { text-align: right; font-size: 12px; color: var(--ink-3); margin-top: 6px; }


@media (max-width: 860px) {
  .essays-wrap { max-width: none; margin: 0; gap: 16px; }
  .diary-doc { padding: 26px 22px 30px; border-radius: 0; border-left: none; border-right: none; }
  .ed-title { padding-right: 0; }
  .ed-body { padding-right: 0; }
  .ed-acts { position: static; opacity: 1; pointer-events: auto; transform: none; margin: 14px 0 0; justify-content: flex-start; }
  .essay-doc { padding: 22px 0 24px; }
}
@media (max-width: 600px) {
  .dt-head { font-size: 11.5px; }
  .ed-date { display: block; margin: 0 0 4px; }
}

