/* 评论工作台 —— Keuury 天光：淡渐变天空、三层中性玻璃、墨色是唯一强调色，不发光 */
:root {
  --ink: #15161b;
  --ink-2: #4b4e58;
  --ink-3: #8b8e98;
  --on-ink: #ffffff;
  --line: rgba(21, 22, 27, 0.08);
  --line-2: rgba(21, 22, 27, 0.14);
  --bg: #f6f7fc;
  --sky:
    radial-gradient(60% 45% at 12% 6%, rgba(196, 214, 255, 0.78), transparent 70%),
    radial-gradient(50% 40% at 92% 18%, rgba(226, 212, 255, 0.62), transparent 70%),
    radial-gradient(70% 50% at 70% 100%, rgba(255, 219, 231, 0.55), transparent 70%),
    linear-gradient(180deg, #f5f7ff 0%, #fbf9ff 100%);
  --glass: rgba(255, 255, 255, 0.6);
  --glass-solid: rgba(255, 255, 255, 0.92);
  --glass-thin: rgba(255, 255, 255, 0.74);
  --glass-thick: rgba(255, 255, 255, 0.8);
  --lens: #ffffff;
  --rim: rgba(255, 255, 255, 0.78);
  --spec: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  --shadow: 0 1px 2px rgba(30, 40, 80, 0.05), 0 12px 32px rgba(60, 70, 130, 0.08);
  --shadow-lift: 0 2px 6px rgba(30, 40, 80, 0.08), 0 24px 60px rgba(60, 70, 130, 0.18);
  --scrim: rgba(18, 20, 32, 0.22);
  --ok: #1e9a62;
  --amber: #c48612;
  --bad: #cf4545;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f1f2f6;
    --ink-2: #b7bac4;
    --ink-3: #7d818c;
    --on-ink: #111217;
    --line: rgba(255, 255, 255, 0.08);
    --line-2: rgba(255, 255, 255, 0.14);
    --bg: #0d0f17;
    --sky:
      radial-gradient(60% 45% at 12% 6%, rgba(60, 82, 150, 0.45), transparent 70%),
      radial-gradient(50% 40% at 92% 18%, rgba(92, 70, 150, 0.38), transparent 70%),
      radial-gradient(70% 50% at 70% 100%, rgba(120, 60, 90, 0.3), transparent 70%),
      linear-gradient(180deg, #0c0e16 0%, #11121b 100%);
    --glass: rgba(30, 33, 46, 0.6);
    --glass-solid: rgba(30, 33, 46, 0.95);
    --glass-thin: rgba(48, 52, 68, 0.55);
    --glass-thick: rgba(36, 39, 54, 0.88);
    --lens: rgba(255, 255, 255, 0.14);
    --rim: rgba(255, 255, 255, 0.08);
    --spec: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.4), 0 24px 60px rgba(0, 0, 0, 0.5);
    --scrim: rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}
.sky { position: fixed; inset: 0; background: var(--sky); z-index: -1; }
button { font: inherit; color: inherit; }
.wrap { max-width: 600px; margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) 16px calc(120px + env(safe-area-inset-bottom)); }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  backdrop-filter: blur(28px) saturate(1.5);
  border: 1px solid var(--rim);
  box-shadow: var(--spec), var(--shadow);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--glass-solid); }
}

/* ---------- 顶部：今天还差几条 ---------- */
.hero { padding: 6px 4px 18px; }
.eyebrow { margin: 0; font-size: 13px; color: var(--ink-3); }
.hero h1 { margin: 4px 0 0; font-size: 32px; line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; }
.hero h1 .num { font-variant-numeric: tabular-nums; }
.sub { margin: 6px 0 14px; color: var(--ink-2); font-size: 14px; }
.bar-total { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar-total i { display: block; height: 100%; background: var(--ink); border-radius: 4px; transition: width 0.6s var(--ease); }
.plats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.plat-stat { padding: 10px 12px; border-radius: 16px; }
.plat-stat b { display: block; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.3; }
.plat-stat b small { font-size: 13px; font-weight: 400; color: var(--ink-3); }
.plat-stat span { font-size: 12.5px; color: var(--ink-2); }
.mini { height: 3px; border-radius: 3px; background: var(--line); margin-top: 6px; overflow: hidden; }
.mini i { display: block; height: 100%; background: var(--ink-2); transition: width 0.6s var(--ease); }

/* ---------- 吸顶：待发 / 已发 / 跳过 + 平台筛选 ---------- */
.bar {
  position: sticky; top: 0; z-index: 5;
  margin: 0 -16px 12px;
  padding: 10px 16px 10px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  backdrop-filter: blur(24px) saturate(1.5);
  border-bottom: 1px solid var(--line);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .bar { background: var(--glass-solid); } }
.seg { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; border-radius: 14px; background: var(--line); }
.seg button {
  position: relative; z-index: 1;
  appearance: none; border: 0; background: none; cursor: pointer;
  padding: 7px 0; border-radius: 11px;
  font-size: 14px; color: var(--ink-2);
  transition: color 0.3s var(--ease);
}
.seg button[aria-selected="true"] { color: var(--ink); font-weight: 500; }
.seg button small { font-size: 12px; color: var(--ink-3); margin-left: 3px; font-variant-numeric: tabular-nums; }
.lens {
  position: absolute; top: 3px; bottom: 3px; left: 0;
  border-radius: 11px;
  background: var(--lens);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(30, 40, 80, 0.08);
  transition: transform 0.45s var(--spring), width 0.45s var(--spring);
}
.filters { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters button {
  flex: none; appearance: none; cursor: pointer;
  font-size: 13px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--glass-thin); color: var(--ink-2);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: transparent; }

/* ---------- 帖子卡片 ---------- */
.post { border-radius: 24px; padding: 16px 16px 4px; margin-bottom: 14px; }
.post-head { display: flex; align-items: center; gap: 10px; }
.mark {
  flex: none; width: 30px; height: 30px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 600;
  background: var(--ink); color: var(--on-ink);
}
.who { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-3); line-height: 1.35; }
.who b, .who .meta { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who b { font-size: 14.5px; font-weight: 500; color: var(--ink); }
.src { flex: none; font-size: 13px; color: var(--ink-2); text-decoration: none; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); }
.post-text { margin: 10px 0 0; font-size: 14.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.post-text.open { -webkit-line-clamp: unset; display: block; }
.zh { margin: 4px 0 0; font-size: 13px; line-height: 1.55; color: var(--ink-3); }
.post > .zh { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tip { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-2); display: flex; gap: 6px; align-items: baseline; }
.tip::before { content: "i"; flex: none; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--line-2); font: 600 10px/13px var(--mono); text-align: center; color: var(--ink-3); }

/* ---------- 一条任务 ---------- */
.task { padding: 14px 0 14px; border-top: 1px solid var(--line); margin-top: 14px; }
.task-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.kind { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bead { width: 7px; height: 7px; border-radius: 50%; flex: none; box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.18), inset 0 1px 1px rgba(255, 255, 255, 0.5); }
.bead.amber { background: var(--amber); }
.bead.ok { background: var(--ok); }
.bead.gray { background: var(--ink-3); }

.their { margin: 0 0 10px; padding: 2px 0 2px 12px; border-left: 2px solid var(--line-2); }
.their p { margin: 0; font-size: 14px; line-height: 1.5; }
.their .who-line { font-size: 12.5px; color: var(--ink-3); margin-bottom: 2px; }

.mine { padding: 12px 14px; border-radius: 16px; background: var(--glass-thin); border: 1px solid var(--line); }
.mine-head { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ink-3); margin-bottom: 4px; }
.mine-head .grow { flex: 1; }
.link { appearance: none; border: 0; background: none; cursor: pointer; font-size: 12.5px; color: var(--ink-2); padding: 4px 6px; border-radius: 8px; }
.link:active { background: var(--line); }
.mine-text { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink); white-space: pre-wrap; }
.edited { font-size: 11.5px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; }
.edit-box {
  width: 100%; min-height: 120px; resize: vertical;
  font: 16px/1.55 inherit; font-family: inherit; color: var(--ink);
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--glass-solid); outline: none;
}
.edit-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.ask {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 10px; padding: 10px 12px; border-radius: 14px;
  background: var(--glass-thin); border: 1px dashed var(--line-2);
  font-size: 14px;
}
.ask .grow { flex: 1; min-width: 120px; color: var(--ink-2); }

.actions { display: flex; gap: 8px; margin-top: 12px; }
.btn {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  font-size: 15px; font-weight: 500; text-decoration: none;
  color: var(--on-ink); background: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s var(--spring), opacity 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn.wide { flex: 1; }
.btn.ghost { color: var(--ink); background: var(--glass-thin); border: 1px solid var(--line-2); box-shadow: var(--spec); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn.icon { width: 44px; padding: 0; flex: none; }

/* 已发 / 跳过：一行一条 */
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; margin-bottom: 8px; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.row-text { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-head { font-size: 13px; color: var(--ink-3); margin: 18px 4px 8px; }

.empty { text-align: center; padding: 48px 16px; color: var(--ink-3); }
.empty b { display: block; font-size: 20px; color: var(--ink); font-weight: 600; margin-bottom: 6px; }

/* ---------- 回来就问：发出去了吗 ---------- */
.scrim { position: fixed; inset: 0; z-index: 20; background: var(--scrim); animation: fade 0.3s var(--ease); }
.sheet {
  position: fixed; z-index: 21; left: 0; right: 0; bottom: 0;
  max-width: 600px; margin: 0 auto;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: var(--glass-thick);
  box-shadow: var(--spec), var(--shadow-lift);
  animation: up 0.5s var(--spring);
}
.sheet[hidden], .scrim[hidden], .toast[hidden], .fab[hidden] { display: none; }
.grab { width: 40px; height: 5px; border-radius: 5px; background: var(--line-2); margin: 0 auto 14px; }
.sheet h2 { margin: 0; font-size: 22px; font-weight: 600; line-height: 1.3; }
.sheet .ctx { margin: 4px 0 12px; font-size: 13px; color: var(--ink-3); }
.quote { margin: 0 0 16px; padding: 10px 12px; border-radius: 14px; background: var(--glass-thin); border: 1px solid var(--line); font-size: 14px; line-height: 1.5; }
/* 截断放在里层：外层有内边距，截在外层会露出第 4 行的上半截 */
.quote span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sheet .btn { width: 100%; }
.sheet .pair { display: flex; gap: 8px; margin-top: 8px; }
.sheet .pair .btn { flex: 1; }
.next-line { margin: 6px 2px 0; font-size: 12.5px; color: var(--ink-3); text-align: center; min-height: 18px; }
.skip-label { margin: 16px 2px 6px; font-size: 12.5px; color: var(--ink-3); }
.reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.reasons button { appearance: none; cursor: pointer; font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass-thin); color: var(--ink-2); }
.cool { color: var(--amber); }

/* ---------- 提示条和「继续」 ---------- */
.toast {
  position: fixed; z-index: 30; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px;
  padding: 10px 10px 10px 18px; border-radius: 999px;
  background: var(--ink); color: var(--on-ink);
  font-size: 14px; white-space: nowrap;
  box-shadow: var(--shadow-lift);
  animation: rise 0.45s var(--spring);
}
.toast button { appearance: none; border: 0; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--on-ink); background: rgba(255, 255, 255, 0.14); padding: 6px 12px; border-radius: 999px; }
.fab {
  position: fixed; z-index: 10; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom));
  appearance: none; cursor: pointer;
  padding: 11px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--ink);
  animation: rise 0.45s var(--spring);
}
.fab:active { transform: scale(0.97); }
@media (min-width: 640px) { .fab { right: calc(50% - 300px + 16px); } }

.foot { margin-top: 28px; text-align: center; font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }
.foot .link { text-decoration: underline; }

.flash { animation: flash 1.2s var(--ease); }
@keyframes flash { 0% { background: var(--line-2); } 100% { background: transparent; } }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes rise { from { transform: translate(var(--tx, 0), 16px); opacity: 0; } to { transform: translate(var(--tx, 0), 0); opacity: 1; } }
.toast { --tx: -50%; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
