/* ============================================================
   盯 — 记录想法，然后盯死你
   ============================================================ */

:root {
  --bg: #0a0b0d;
  --panel: #14171c;
  --panel-2: #191d23;
  --panel-3: #20252c;
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #eef0f3;
  --text-2: #9aa1ab;
  --text-3: #656c76;
  --accent: #ff5a3c;
  --accent-2: #ff7a61;
  --accent-soft: rgba(255, 90, 60, 0.13);
  --accent-line: rgba(255, 90, 60, 0.32);
  --ok: #37d39b;
  --ok-soft: rgba(55, 211, 155, 0.13);
  --warn: #ffb020;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 22px;
  --pad: 20px;
  --tab-h: 58px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  overscroll-behavior-y: none;
}

h1, h2, h3, p { margin: 0; }
button { font-family: inherit; font-size: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font-family: inherit; font-size: 16px; color: var(--text); }
svg.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: var(--accent); color: #fff; }

/* ───────────────────────── 布局 ───────────────────────── */

.app {
  position: relative;
  max-width: 540px;
  margin: 0 auto;
  min-height: 100dvh;
}

.app::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 320px;
  background: radial-gradient(120% 100% at 50% 0%, rgba(255, 90, 60, 0.10) 0%, rgba(255, 90, 60, 0) 62%);
  pointer-events: none;
  z-index: 0;
}

.page {
  display: none;
  position: relative;
  z-index: 1;
  padding: max(14px, env(safe-area-inset-top)) var(--pad) calc(var(--tab-h) + env(safe-area-inset-bottom) + 40px);
  animation: pageIn 0.24s ease both;
}
.page.is-active { display: block; }

@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ───────────────────────── 顶部标题 ───────────────────────── */

.topbar { position: relative; padding: 8px 0 18px; }

.topbar-sub {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.topbar-title {
  font-size: 40px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-top: 4px;
}

.topbar-note {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-3);
  max-width: 24em;
}

.topbar-right {
  position: absolute;
  right: 0;
  bottom: 20px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-2);
  background: var(--panel);
  border: 1px solid var(--line);
}
.icon-btn:active { background: var(--panel-2); }

/* ───────────────────────── 通用零件 ───────────────────────── */

.section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 30px 0 12px;
}
.section-head:first-child { margin-top: 12px; }
.section-head h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-2);
}
.section-head .muted { margin-left: auto; }

.muted { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.hint { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.empty {
  padding: 22px 18px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
  color: var(--text-3);
  font-size: 14px;
  text-align: center;
}
.empty b { color: var(--text-2); font-weight: 600; }

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

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 15px 16px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.12s ease, background 0.15s ease, opacity 0.15s;
  user-select: none;
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.32; pointer-events: none; box-shadow: none !important; }

.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 20px -8px rgba(255, 90, 60, 0.9); }
.btn-primary:active { background: #f04a2c; }

.btn-ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.btn-ghost:active { background: var(--panel-3); }

.btn-quiet { color: var(--text-2); background: transparent; }
.btn-quiet:active { background: var(--panel-2); }

.btn-ok { background: var(--ok-soft); color: var(--ok); border: 1px solid rgba(55, 211, 155, 0.28); }
.btn-danger { background: var(--accent-soft); color: var(--accent-2); border: 1px solid var(--accent-line); }

.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }

/* 表单 */
.field { margin-bottom: 16px; }
.field > label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 8px;
}

.input, .textarea {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.input:focus, .textarea:focus { border-color: var(--accent-line); }
.textarea { resize: none; line-height: 1.55; min-height: 84px; }

.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg-opt {
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
}
.seg-opt.is-on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-2); }

/* ───────────────────────── 记 ───────────────────────── */

.capture {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 6px 6px 12px;
  box-shadow: 0 18px 40px -30px #000;
}
.capture:focus-within { border-color: var(--line-2); }

.capture-input {
  display: block;
  width: 100%;
  min-height: 132px;
  background: transparent;
  border: 0;
  outline: none;
  resize: none;
  padding: 14px 14px 8px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
}
.capture-input::placeholder { color: var(--text-3); }

.capture-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 16px;
}

/* 想法条目 */
.idea {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 15px 12px;
}
.idea.has-task { border-color: rgba(55, 211, 155, 0.22); }
.idea.is-dropped { opacity: 0.45; }

.idea-text {
  font-size: 15.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.idea.starred .idea-text::before {
  content: "★";
  color: var(--warn);
  margin-right: 6px;
  font-size: 13px;
}

.idea-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.idea-time { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.idea-foot .spacer { flex: 1; }

.tag {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--panel-3);
  color: var(--text-2);
}
.tag-video { background: rgba(106, 166, 255, 0.14); color: #82b4ff; }
.tag-study { background: rgba(167, 139, 250, 0.14); color: #b39dfb; }
.tag-todo  { background: rgba(255, 176, 32, 0.14); color: var(--warn); }
.tag-ok    { background: var(--ok-soft); color: var(--ok); }
.tag-late  { background: var(--accent-soft); color: var(--accent-2); }
.tag-warn  { background: rgba(255, 176, 32, 0.14); color: var(--warn); }

.mini-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-3);
  background: transparent;
  transition: background 0.15s, color 0.15s;
}
.mini-btn svg.ic { width: 17px; height: 17px; }
.mini-btn:active { background: var(--panel-3); color: var(--text); }
.mini-btn.on { color: var(--warn); }

/* ───────────────────────── 盯 ───────────────────────── */

.verdict {
  display: flex;
  gap: 14px;
  align-items: center;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 16px 16px 16px 14px;
}

.verdict-face { flex: 0 0 auto; width: 60px; height: 60px; }
.verdict-face svg { width: 60px; height: 60px; display: block; }

.verdict-line { font-size: 15.5px; font-weight: 650; line-height: 1.45; letter-spacing: -0.01em; }

.verdict-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 0;
  margin-top: 9px;
  font-size: 12.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.verdict-meta .m + .m::before {
  content: "·";
  margin: 0 9px;
  color: var(--text-3);
  opacity: 0.7;
}
.verdict-meta b { color: var(--text-2); font-weight: 650; }
.verdict-meta .hot { color: var(--accent-2); }

/* 欠账 */
.debt-card {
  margin-top: 14px;
  border-radius: var(--r-xl);
  border: 1px solid var(--accent-line);
  background: linear-gradient(180deg, rgba(255, 90, 60, 0.10), rgba(255, 90, 60, 0.045));
  padding: 15px 16px;
}
.debt-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-2);
}
.debt-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255, 90, 60, 0.7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 90, 60, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(255, 90, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 90, 60, 0); }
}
.debt-item {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 90, 60, 0.16);
}
.debt-item:first-of-type { margin-top: 12px; }
.debt-title { font-size: 15px; font-weight: 600; line-height: 1.45; }
.debt-sub { font-size: 12.5px; color: var(--accent-2); margin-top: 3px; font-variant-numeric: tabular-nums; }
.debt-acts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* 任务卡 */
.task {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 15px;
  transition: background 0.15s;
}
.task:active { background: var(--panel-2); }
.task.is-late { border-color: var(--accent-line); background: linear-gradient(180deg, rgba(255, 90, 60, 0.08), var(--panel)); }
.task.is-done { opacity: 0.55; }

.task-top { display: flex; align-items: flex-start; gap: 10px; }

.task-title {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.005em;
  flex: 1;
  word-break: break-word;
}
.task.is-done .task-title { text-decoration: line-through; text-decoration-color: var(--text-3); }

.task-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 9px;
  font-size: 12px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.task-meta .dot::before { content: "·"; margin-right: 8px; color: var(--text-3); }

.stages { display: flex; align-items: center; gap: 4px; margin-top: 11px; }
.stages .bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--panel-3);
  overflow: hidden;
}
.stages .bar i { display: block; height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.3s ease; }
.stages .lbl { font-size: 11.5px; color: var(--text-2); font-variant-numeric: tabular-nums; margin-left: 8px; white-space: nowrap; }

.task-acts { display: flex; gap: 8px; margin-top: 12px; }
.task-acts .spacer { flex: 1; }

/* 悬浮加号 */
.fab {
  position: fixed;
  right: max(20px, calc((100vw - 540px) / 2 + 20px));
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 18px);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  font-weight: 300;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px -10px rgba(255, 90, 60, 0.85);
  z-index: 5;
  transition: transform 0.14s ease;
}
.fab:active { transform: scale(0.92); }
.fab { display: none; }
body[data-page="watch"] .fab { display: grid; }

/* ───────────────────────── 想 ───────────────────────── */

.searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0 14px;
  height: 44px;
  margin-bottom: 12px;
  color: var(--text-3);
}
.searchbar input {
  flex: 1;
  background: none;
  border: 0;
  outline: none;
  font-size: 15.5px;
  min-width: 0;
}
.searchbar input::placeholder { color: var(--text-3); }
.searchbar input::-webkit-search-cancel-button { -webkit-appearance: none; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.chip.is-on { background: var(--text); color: #0a0b0d; border-color: transparent; }

.day-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin: 18px 0 4px;
}
.day-label:first-child { margin-top: 0; }

/* ───────────────────────── 账 ───────────────────────── */

.review-cta {
  border-radius: var(--r-xl);
  padding: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
}
.review-cta.urgent {
  border-color: var(--accent-line);
  background: linear-gradient(160deg, rgba(255, 90, 60, 0.13), var(--panel));
}
.review-cta h3 { font-size: 18px; font-weight: 750; letter-spacing: -0.02em; }
.review-cta p { font-size: 13.5px; color: var(--text-2); margin-top: 6px; line-height: 1.5; }
.review-cta .btn { margin-top: 14px; }

.review-done {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-radius: var(--r-lg);
  background: var(--ok-soft);
  border: 1px solid rgba(55, 211, 155, 0.25);
  color: var(--ok);
  font-size: 14px;
  font-weight: 600;
}
.review-done .big { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.review-done span.sub { color: rgba(55, 211, 155, 0.7); font-size: 12.5px; font-weight: 500; }

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 15px;
}
.stat .n {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat .n small { font-size: 14px; font-weight: 600; color: var(--text-3); letter-spacing: 0; }
.stat .k { font-size: 12px; color: var(--text-3); margin-top: 4px; letter-spacing: 0.04em; }
.stat.hot .n { color: var(--accent); }
.stat.cool .n { color: var(--ok); }

.heat { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; }
.heat i {
  display: block;
  aspect-ratio: 1;
  border-radius: 5px;
  background: var(--panel-2);
  position: relative;
}
.heat i[data-lv="1"] { background: rgba(255, 90, 60, 0.26); }
.heat i[data-lv="2"] { background: rgba(255, 90, 60, 0.52); }
.heat i[data-lv="3"] { background: rgba(255, 90, 60, 0.82); }
.heat i[data-lv="4"] { background: var(--accent); }
.heat i.reviewed::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 3px;
  width: 3px; height: 3px;
  margin-left: -1.5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}
.heat i.today { outline: 1.5px solid var(--text-3); outline-offset: 1px; }

.log {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.log .d { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; width: 74px; flex: 0 0 auto; }
.log .s { font-size: 13px; color: var(--text-2); display: flex; gap: 10px; flex-wrap: wrap; }
.log .s b { color: var(--text); font-weight: 650; }
.log .s .neg { color: var(--accent-2); }

/* ───────────────────────── 底栏 ───────────────────────── */

.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  gap: 2px;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding: 0 10px env(safe-area-inset-bottom);
  background: rgba(10, 11, 13, 0.82);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-top: 1px solid var(--line);
}

.tab {
  position: relative;
  flex: 1;
  max-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-3);
  transition: color 0.15s;
}
.tab svg.ic { width: 21px; height: 21px; stroke-width: 1.8; }
.tab span { font-size: 10.5px; font-weight: 650; letter-spacing: 0.06em; }
.tab.is-active { color: var(--accent); }
.tab:active { opacity: 0.6; }

.tab-badge {
  position: absolute;
  top: 8px;
  left: 50%;
  margin-left: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  font-style: normal;
  line-height: 16px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px var(--bg);
}

/* ───────────────────────── 弹层 ───────────────────────── */

.sheet { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; }
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fade 0.2s ease both;
}
.sheet-body {
  position: relative;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  background: #12151a;
  border-radius: 24px 24px 0 0;
  border-top: 1px solid var(--line-2);
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  animation: sheetUp 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
  box-shadow: 0 -30px 80px -20px #000;
}
.sheet.is-closing .sheet-body { animation: sheetDown 0.22s ease both; }
.sheet.is-closing .sheet-backdrop { animation: fadeOut 0.22s ease both; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetDown { from { transform: none; } to { transform: translateY(100%); } }

.grabber { width: 38px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 9px auto 0; flex: 0 0 auto; }

.sheet-head { padding: 14px 20px 6px; flex: 0 0 auto; }
.sheet-head h3 { font-size: 20px; font-weight: 750; letter-spacing: -0.02em; }
.sheet-head p { font-size: 13px; color: var(--text-3); margin-top: 4px; line-height: 1.45; }

.sheet-scroll {
  padding: 12px 20px calc(16px + env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
}

.sheet-foot {
  flex: 0 0 auto;
  padding: 12px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  background: #12151a;
}
.sheet-foot .btn { flex: 1; height: 48px; font-size: 16px; }

/* ───────────────────────── 拦截门 ───────────────────────── */

.gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(6, 7, 9, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  padding: max(24px, env(safe-area-inset-top)) 22px calc(20px + env(safe-area-inset-bottom));
  animation: fade 0.25s ease both;
  overflow-y: auto;
}
.gate-inner { max-width: 480px; width: 100%; margin: auto; }

.gate-face { width: 84px; height: 84px; margin: 0 auto 20px; }
.gate-face svg { width: 84px; height: 84px; display: block; }

.gate-kicker {
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.24em;
  color: var(--accent);
  margin-bottom: 10px;
}
.gate-title {
  text-align: center;
  font-size: 27px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.gate-sub {
  text-align: center;
  font-size: 14px;
  color: var(--text-2);
  margin-top: 10px;
  line-height: 1.55;
}

.gate-list { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.gate-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 15px;
}
.gate-item .t { font-size: 15.5px; font-weight: 600; line-height: 1.45; }
.gate-item .s { font-size: 12.5px; color: var(--accent-2); margin-top: 4px; font-variant-numeric: tabular-nums; }
.gate-item .acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.gate-foot { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.gate-foot .btn { height: 50px; font-size: 16px; width: 100%; }

/* ───────────────────────── 数字键盘式任务行（复盘用） ───────────────────────── */

.rev-item { padding: 15px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); margin-bottom: 10px; }
.rev-item.done-decision { border-color: rgba(55, 211, 155, 0.3); }
.rev-item.stuck-decision { border-color: var(--accent-line); }
.rev-item.drop-decision { opacity: 0.55; }
.rev-title { font-size: 15px; font-weight: 600; line-height: 1.45; }
.rev-meta { font-size: 12px; color: var(--text-3); margin-top: 4px; font-variant-numeric: tabular-nums; }
.rev-btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 11px; }
.rev-btn {
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.rev-btn:active { transform: scale(0.97); }
.rev-btn[data-on="done"] { background: var(--ok-soft); border-color: rgba(55, 211, 155, 0.35); color: var(--ok); }
.rev-btn[data-on="forward"] { background: rgba(106, 166, 255, 0.15); border-color: rgba(106, 166, 255, 0.35); color: #8dbcff; }
.rev-btn[data-on="stuck"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-2); }
.rev-btn[data-on="drop"] { background: var(--panel-3); border-color: var(--line-2); color: var(--text-3); }

.rev-why { margin-top: 10px; }
.rev-why textarea {
  width: 100%;
  min-height: 62px;
  border-radius: var(--r-sm);
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 15px;
  outline: none;
  resize: none;
  line-height: 1.5;
}
.rev-why textarea:focus { border-color: var(--accent-line); }
.rev-why.warn textarea { border-color: var(--accent); animation: shake 0.3s; }
@keyframes shake {
  0%, 100% { transform: none; }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ───────────────────────── 结果页 ───────────────────────── */

.result { text-align: center; padding: 8px 0 4px; }
.result .num {
  font-size: 56px;
  font-weight: 850;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.result .num.ok { color: var(--ok); }
.result .num.bad { color: var(--accent); }
.result .lbl { font-size: 13px; color: var(--text-3); margin-top: 6px; letter-spacing: 0.08em; }
.result .say { margin-top: 18px; font-size: 15px; line-height: 1.6; color: var(--text-2); }

.breakdown { display: flex; justify-content: center; gap: 22px; margin-top: 20px; }
.breakdown div { text-align: center; }
.breakdown .v { font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; }
.breakdown .k { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

/* ───────────────────────── 提示条 ───────────────────────── */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 24px);
  transform: translateX(-50%) translateY(8px);
  z-index: 100;
  max-width: min(88vw, 420px);
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(238, 240, 243, 0.96);
  color: #0a0b0d;
  font-size: 13.5px;
  font-weight: 650;
  box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.at-top {
  top: calc(env(safe-area-inset-top) + 18px);
  bottom: auto;
  transform: translateX(-50%) translateY(-8px);
}
.toast.at-top.show { transform: translateX(-50%) translateY(0); }
.toast[hidden] { display: none; }

/* ───────────────────────── 杂项 ───────────────────────── */

.row { display: flex; gap: 10px; align-items: center; }
.row .spacer { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.small { font-size: 12.5px; color: var(--text-3); line-height: 1.6; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

.kv { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv .k { font-size: 14.5px; }
.kv .v { font-size: 13.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
