:root {
  --bg: #0B0D10;
  --bg-2: #101317;
  --panel: #15181D;
  --panel-2: #1B1F26;
  --line: #262B33;
  --line-soft: #1D2128;

  --fg: #E4E9F0;
  --fg-2: #99A2B0;
  --fg-3: #636C7A;

  --lcd: #E2EBF7;
  --lcd-glow: rgba(214, 228, 246, .42);
  --lcd-glow-soft: rgba(214, 228, 246, .14);
  --lcd-off: rgba(255, 255, 255, .052);

  --care: #E3A93C;
  --care-glow: rgba(227, 169, 60, .40);
  --care-dim: #6A5220;
  --care-bg: #231B09;

  --danger: #DE6A6A;
  --danger-glow: rgba(222, 106, 106, .42);
  --danger-dim: #5A2A2A;
  --danger-bg: #2A1414;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Courier New", monospace;
}

/* ============================================================
   三个状态的界面明暗
   正常状态明亮（默认值）；睡眠状态昏暗；延长睡眠昏暗 + 暖色强调。
   全部通过变量切换，不改结构，也不改变其他设计。
   ============================================================ */

body { transition: background-color 1.1s ease, color 1.1s ease; }

/* 睡意遮罩：状态切换时整体压暗，避免"啪"地一下黑屏 */
.sleep-veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 42%, rgba(0, 0, 0, .34) 0%, rgba(0, 0, 0, .82) 100%);
  opacity: 0;
  transition: opacity 1.1s ease;
}

.grid-bg { transition: opacity 1.1s ease; }

/* ---------- 睡眠状态：整体昏暗、低刺激 ---------- */

body[data-ui="sleep"], body[data-ui="nap"] {
  --bg: #07080A;
  --bg-2: #0A0C0E;
  --panel: #0D1013;
  --panel-2: #111418;
  --line: #1B1F25;
  --line-soft: #15181D;
  --fg: #AEB7C3;
  --fg-2: #75808D;
  --fg-3: #545C67;
  --lcd: #AFBDCC;
  --lcd-glow: rgba(175, 189, 204, .28);
  --lcd-glow-soft: rgba(175, 189, 204, .10);
  --lcd-off: rgba(255, 255, 255, .036);
}

body[data-ui="sleep"] .sleep-veil,
body[data-ui="nap"] .sleep-veil,
body[data-ui="extended"] .sleep-veil { opacity: 1; }

body[data-ui="sleep"] .grid-bg,
body[data-ui="nap"] .grid-bg { opacity: .34; }

/* ---------- 延长睡眠状态：延续睡眠氛围，用暖色体现"系统已作出决定" ---------- */

body[data-ui="extended"] {
  --bg: #0A0906;
  --bg-2: #0E0C08;
  --panel: #15110A;
  --panel-2: #1A1509;
  --line: #2C2312;
  --line-soft: #1E180D;
  --fg: #E2D6B8;
  --fg-2: #A0926F;
  --fg-3: #6F6549;
  --lcd: #EEB648;
  --lcd-glow: rgba(238, 182, 72, .38);
  --lcd-glow-soft: rgba(238, 182, 72, .13);
  --lcd-off: rgba(255, 255, 255, .04);
}

body[data-ui="extended"] .grid-bg { opacity: .5; }

/* 暖色底噪：让"这是系统做出的决定"在余光里也能感觉到 */
body[data-ui="extended"] .vignette {
  background: radial-gradient(ellipse at 50% 42%, rgba(227, 169, 60, .05) 0%, rgba(8, 6, 2, .82) 100%);
}

/* ---------- 起夜暂停：延续睡眠氛围，用琥珀点出"正在记录" ---------- */

body[data-ui="nap"] .status-line .hl { animation: nap-pulse 2.4s ease-in-out infinite; }

@keyframes nap-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .42; }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ---------- 背景：网格纹理 + 暗角 ---------- */

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(to right, rgba(255,255,255,.020) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.020) 1px, transparent 1px);
  background-size: 144px 144px, 144px 144px, 36px 36px, 36px 36px;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 42%, transparent 26%, rgba(5, 7, 9, .74) 100%);
}

.app {
  position: relative;
  z-index: 2;
  max-width: 660px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 20px 34px;
  display: flex;
  flex-direction: column;
}

/* ---------- 顶栏 ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
}

.sys { display: flex; flex-direction: column; gap: 2px; }

.sys-name {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--fg-2);
}

.sys-ver {
  font-size: 10px;
  font-family: var(--mono);
  letter-spacing: .1em;
  color: var(--fg-3);
}

.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--fg-3);
  cursor: pointer;
  transition: all .16s;
  flex: 0 0 auto;
}

.mini-btn:hover { color: var(--fg-2); border-color: var(--fg-3); }

.mini-btn.on {
  background: var(--care-bg);
  border-color: var(--care-dim);
  color: var(--care);
}

.ico { display: inline-flex; }
.ico svg { display: block; }

/* ---------- 主舞台 ---------- */

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 18px 0 24px;
}

/* ---------- 液晶时钟 ---------- */

.clock {
  --dw: clamp(46px, 15vw, 118px);
  --lcd-color: var(--lcd);
  /* 双层光晕，且只作用在"点亮的段"上：
       第一层  半径小、亮 —— 贴住段自身的轮廓，数字边缘保持锐利；
       第二层  半径大、暗 —— 外围柔和泛光，保留液晶背光的感觉。
     早先是给整个 .clock 加一层大半径模糊，熄灭段与段间缝隙被一起糊住，
     数字轮廓发虚、读数费力。现在熄灭段完全干净。 */
  --seg-glow-r: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--dw) * .12);
  transition: filter .3s;
}

.clock[data-state="extended"] {
  --lcd-color: var(--care);
  --seg-glow-r: 4.5px;
}

.clock[data-state="ringing"] {
  --lcd-color: var(--danger);
  --lcd-glow: var(--danger-glow);
  --lcd-glow-soft: rgba(222, 106, 106, .16);
  --seg-glow-r: 7px;
  animation: ring-pulse 1.05s ease-in-out infinite;
}

/* 睡眠状态：屏上是使用者原定的时间。冒号缓慢跳动，表示计时在走 */
.clock[data-state="sleeping"] .cln i { animation: colon-blink 2.6s step-end infinite; }

/* 起夜暂停：冒号停止跳动、转为暗灰 —— 睡眠计时已暂停 */
.clock[data-state="napping"] {
  --lcd-color: #86929F;
  --lcd-glow: rgba(134, 146, 159, .20);
  --lcd-glow-soft: rgba(134, 146, 159, .07);
  --seg-glow-r: 2px;
}
.clock[data-state="napping"] .cln i { animation: none; opacity: .28; }

/* 评估中：数字不变，屏幕转为冷白并缓慢呼吸 —— 系统正在处理 */
.clock[data-state="evaluating"] {
  --lcd-color: #A8BCD2;
  --lcd-glow: rgba(168, 188, 210, .34);
  --lcd-glow-soft: rgba(168, 188, 210, .12);
  --seg-glow-r: 4.5px;
  animation: eval-breathe 1.5s ease-in-out infinite;
}

@keyframes eval-breathe {
  0%, 100% { opacity: 1; }
  50%      { opacity: .42; }
}

/* 公布瞬间：数字被改掉的那一下 —— 白闪 + 轻微缩放变形 */
.clock[data-state="changing"] {
  --lcd-color: #FFFFFF;
  --lcd-glow: rgba(255, 255, 255, .60);
  --lcd-glow-soft: rgba(255, 255, 255, .20);
  --seg-glow-r: 8px;
  animation: clock-change 950ms cubic-bezier(.3, .9, .3, 1);
}

@keyframes clock-change {
  0%   { transform: scale(1);    opacity: 1; }
  16%  { transform: scale(.978); opacity: .30; }
  34%  { transform: scale(1.016); opacity: 1; }
  52%  { transform: scale(.994); opacity: .55; }
  72%  { transform: scale(1.006); opacity: 1; }
  100% { transform: scale(1);    opacity: 1; }
}

.clock.dim { opacity: .28; }
.clock.dim .dg i.on, .clock.dim .cln i.on { background: var(--fg-3); filter: none; }

@keyframes ring-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .34; }
}

.dg {
  position: relative;
  width: var(--dw);
  height: calc(var(--dw) * 1.82);
}

.dg i {
  position: absolute;
  display: block;
  background: var(--lcd-off);
  transition: background .22s, filter .3s;
}

/* 只有点亮的段发光。双层 drop-shadow：近处一层亮（保住段的锐利轮廓），
   远处一层暗（外围泛光）。熄灭的段不参与，段间缝隙因此始终干净。 */
.dg i.on {
  background: var(--lcd-color);
  filter: drop-shadow(0 0 var(--seg-glow-r) var(--lcd-glow))
          drop-shadow(0 0 calc(var(--seg-glow-r) * 4) var(--lcd-glow-soft));
}

.dg .s-a, .dg .s-g, .dg .s-d {
  left: 16%;
  right: 16%;
  height: 9.5%;
  clip-path: polygon(11% 0, 89% 0, 100% 50%, 89% 100%, 11% 100%, 0 50%);
}

.dg .s-a { top: 0; }
.dg .s-g { top: 45.6%; }
.dg .s-d { top: 90.5%; }

.dg .s-f, .dg .s-b, .dg .s-e, .dg .s-c {
  width: 15%;
  height: 33.5%;
  clip-path: polygon(50% 0, 100% 10%, 100% 90%, 50% 100%, 0 90%, 0 10%);
}

.dg .s-f { left: 0; top: 10.8%; }
.dg .s-b { right: 0; top: 10.8%; }
.dg .s-e { left: 0; top: 56.4%; }
.dg .s-c { right: 0; top: 56.4%; }

.cln {
  position: relative;
  width: calc(var(--dw) * .34);
  height: calc(var(--dw) * 1.82);
}

.cln i {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: calc(var(--dw) * .165);
  height: calc(var(--dw) * .165);
  border-radius: 2px;
  background: var(--lcd-off);
  transition: background .22s, filter .3s;
}

.cln i.on {
  background: var(--lcd-color);
  filter: drop-shadow(0 0 var(--seg-glow-r) var(--lcd-glow))
          drop-shadow(0 0 calc(var(--seg-glow-r) * 4) var(--lcd-glow-soft));
}
.cln i:nth-of-type(1) { top: 31%; }
.cln i:nth-of-type(2) { top: 63%; }

.clock.live .cln i { animation: colon-blink 2s step-end infinite; }

@keyframes colon-blink {
  0%, 49.9% { opacity: 1; }
  50%, 100% { opacity: .2; }
}

/* ---------- 时钟下方文字 ---------- */

.clock-caption {
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--fg-3);
  margin-top: -6px;
}

.status-line {
  font-size: 13px;
  color: var(--fg-2);
  text-align: center;
  letter-spacing: .01em;
  max-width: 420px;
  min-height: 20px;
}

.status-line .hl { color: var(--care); }
.status-line .mono { font-family: var(--mono); letter-spacing: .02em; }
.status-line .warn { color: var(--danger); }

/* 待裁定时的补充说明：回答"既然算完了为什么不告诉我" */
.status-line .sub {
  display: block;
  margin-top: 7px;
  font-size: 11.5px;
  color: var(--fg-3);
  letter-spacing: .02em;
}

/* ---------- 结论卡 / 提示卡 ---------- */

/* 延长睡眠状态下系统"已作出决定"的局部强调 —— 与正常状态、睡眠状态都不像 */
.verdict-card {
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--care-dim);
  background: var(--care-bg);
  border-radius: 13px;
  padding: 15px 16px 13px;
  text-align: center;
  animation: card-in .32s cubic-bezier(.2, .8, .3, 1);
}

.verdict-card .vc-tag {
  font-size: 10.5px;
  letter-spacing: .18em;
  color: var(--care);
  opacity: .85;
}

.verdict-card .vc-main {
  font-size: 15.5px;
  color: var(--fg);
  margin-top: 7px;
  line-height: 1.5;
}

.verdict-card .vc-main b {
  font-family: var(--mono);
  font-size: 21px;
  color: var(--care);
  margin: 0 2px;
  vertical-align: -1px;
}

.verdict-card .vc-sub {
  font-size: 11.5px;
  color: var(--fg-3);
  margin-top: 7px;
  line-height: 1.65;
}

.verdict-card .vc-sub .mono { font-family: var(--mono); color: var(--fg-2); }

/* 无计时记录时的提示卡：冷色，与关怀卡明确区分 */
.verdict-card.notice-card {
  border-color: var(--line);
  background: rgba(255, 255, 255, .02);
}
.verdict-card.notice-card.warn {
  border-color: var(--danger-dim);
  background: var(--danger-bg);
}
.verdict-card.notice-card .vc-tag { color: var(--fg-2); opacity: 1; }
.verdict-card.notice-card.warn .vc-tag { color: var(--danger); }
.verdict-card.notice-card .vc-main { font-size: 14.5px; }

/* ---------- 图标按钮 ---------- */

.tiles {
  display: flex;
  flex-wrap: wrap;
  /* gap 与方块宽度是按「5 个方块一行」定的：5×70 + 4×8 = 382px，
     刚好塞进最窄的 430px 手机（430 − 2×20 padding = 390）。加方块时记得一起算。 */
  gap: 8px;
  justify-content: center;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 70px;
  height: 70px;
  padding: 6px 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--fg-3);
  font-family: inherit;
  cursor: pointer;
  transition: border-color .16s, color .16s, background .16s;
}

.tile:hover { border-color: var(--fg-3); color: var(--fg-2); }

.tile:active { background: var(--panel-2); }

.tile .tile-value {
  font-size: 11.5px;
  font-family: var(--mono);
  color: var(--fg);
  letter-spacing: .01em;
  line-height: 1;
}

.tile .tile-label {
  font-size: 10px;
  letter-spacing: .04em;
  line-height: 1;
}

.tile.accent { border-color: var(--care-dim); }
.tile.accent .tile-value { color: var(--care); }

/* ---------- 主按钮 ---------- */

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 32px;
  border: 0;
  border-radius: 999px;
  background: var(--fg);
  color: #0B0D10;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .16s, color .16s, transform .1s;
}

.primary-btn:hover { background: #fff; }
.primary-btn:active { transform: scale(.985); }

.primary-btn:disabled {
  background: var(--panel-2);
  color: var(--fg-3);
  cursor: not-allowed;
  transform: none;
}

.primary-btn.danger {
  background: var(--danger);
  color: #150A0A;
}

.primary-btn.danger:hover { background: #e87c7c; }

/* 起夜按钮：正常计时为描边，起夜中转为琥珀 —— 状态一眼可分 */
.primary-btn.nap {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
  font-weight: 500;
}

.primary-btn.nap:hover { border-color: var(--fg-3); background: rgba(255, 255, 255, .025); }

.primary-btn.nap.paused {
  background: var(--care-bg);
  border-color: var(--care-dim);
  color: var(--care);
}

.primary-btn.nap.paused:hover { background: #2B2109; }

/* ---------- 知情确认 ---------- */

.consent-row {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  max-width: 400px;
  font-size: 11.5px;
  color: var(--fg-3);
  line-height: 1.55;
  cursor: pointer;
  text-align: left;
}

.consent-row input {
  margin: 2px 0 0;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  accent-color: var(--care);
  cursor: pointer;
}

.fine-print {
  font-size: 10.5px;
  color: #4A525E;
  letter-spacing: .03em;
  text-align: center;
}

/* ---------- 评估中 ---------- */

.analyzing { display: flex; flex-direction: column; align-items: center; gap: 20px; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-height: 132px;
}

.steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--fg-3);
  opacity: .3;
  transition: opacity .3s, color .3s;
}

.steps li.active { opacity: 1; color: var(--fg); }
.steps li.done { opacity: .72; color: var(--fg-2); }

.steps .mark {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--fg-3);
}

.steps li.done .mark { color: var(--care); }

.bar {
  width: 210px;
  height: 2px;
  background: var(--line);
  border-radius: 1px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--fg-2);
  transition: width .55s linear;
}

/* ---------- 抽屉 ---------- */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 38;
  background: rgba(5, 7, 9, .68);
  opacity: 0;
  pointer-events: none;
  transition: opacity .26s;
}

.sheet-backdrop.open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 40;
  width: min(560px, 100%);
  max-height: 82vh;
  overflow-y: auto;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  padding: 8px 20px 30px;
  transform: translateX(-50%) translateY(103%);
  transition: transform .3s cubic-bezier(.2, .85, .3, 1);
  -webkit-overflow-scrolling: touch;
}

.sheet.open { transform: translateX(-50%) translateY(0); }

.sheet-grip {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  margin: 8px auto 16px;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.sheet-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
}

.sheet-close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg-3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .16s;
  flex: 0 0 auto;
}

.sheet-close:hover { color: var(--fg); border-color: var(--fg-3); }

.sheet-sub {
  font-size: 12px;
  color: var(--fg-3);
  line-height: 1.6;
  margin: 0 0 16px;
}

.sheet-h4 {
  font-size: 11.5px;
  color: var(--fg-3);
  font-weight: 400;
  letter-spacing: .06em;
  margin: 18px 0 4px;
}

/* 抽屉里的睡眠计时面板：数值用等宽字，长文案不换行 */
.sheet .derived { margin-top: 8px; }
.sheet .derived span { color: var(--fg-3); }
.sheet .timeline .t { flex: 0 0 auto; white-space: nowrap; }
.sheet .timeline .d { color: var(--fg-2); }

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

.field { margin-top: 18px; }

.field > label {
  display: block;
  font-size: 12.5px;
  color: var(--fg-2);
  margin-bottom: 9px;
  overflow: hidden;
}

.field .val {
  float: right;
  font-family: var(--mono);
  color: var(--fg);
  font-size: 12.5px;
}

.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }

input[type="time"] {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--fg);
  font-size: 26px;
  font-family: var(--mono);
  padding: 9px 12px;
  text-align: center;
  letter-spacing: .05em;
  outline: none;
  transition: border-color .15s;
}

input[type="time"]:focus { border-color: var(--care-dim); }
input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(.5); cursor: pointer; }

.segmented { display: flex; gap: 6px; }

.segmented button {
  flex: 1;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--fg-2);
  font-size: 13px;
  padding: 10px 0;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}

.segmented button:hover { border-color: var(--fg-3); }

.segmented button.on {
  background: var(--care-bg);
  border-color: var(--care-dim);
  color: var(--care);
}

.derived {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--fg-2);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.derived b {
  color: var(--fg);
  font-weight: 500;
  font-family: var(--mono);
}

.btn {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--fg);
  transition: all .15s;
}

.btn:hover { border-color: var(--fg-3); }
.btn + .btn { margin-top: 9px; }

.btn.primary {
  background: var(--fg);
  color: #0B0D10;
  border-color: var(--fg);
  font-weight: 600;
}

.btn.primary:hover { background: #fff; }

.btn:disabled { cursor: not-allowed; }

.btn.primary:disabled {
  background: var(--panel-2);
  border-color: var(--line);
  color: var(--fg-3);
}

.btn.ghost { background: transparent; }

.btn.danger { color: var(--danger); border-color: var(--danger-dim); background: transparent; }
.btn.danger:hover { border-color: var(--danger); }
.btn.danger:disabled { color: var(--fg-3); border-color: var(--line); }

/* ---------- 报告 ---------- */

.report { font-family: var(--mono); font-size: 12.5px; }

.report-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 4px;
}

.report-title {
  font-size: 13.5px;
  font-family: system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: .03em;
}

.report-id {
  font-size: 12px;
  color: var(--care);
  margin-top: 4px;
  letter-spacing: .02em;
}

.report-stamp {
  font-size: 11px;
  color: var(--fg-3);
  text-align: right;
  line-height: 1.5;
  flex: 0 0 auto;
}

.report h4 {
  font-size: 11.5px;
  color: var(--fg-3);
  font-weight: 400;
  margin: 16px 0 7px;
  letter-spacing: .06em;
  font-family: system-ui, sans-serif;
}

/* 报告里的二级小节（如"昨夜睡眠 / 本次睡眠"），用左侧竖线做分组 */
.report-sub {
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: .08em;
  margin: 14px 0 6px;
  padding-left: 8px;
  border-left: 2px solid var(--line);
  font-family: system-ui, sans-serif;
}

.report-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 3px 0;
}

.report-row .k { color: var(--fg-3); }
.report-row .v { color: var(--fg); text-align: right; }
.report-row .v.care { color: var(--care); }
.report-row .v.muted { color: var(--fg-3); font-style: italic; }

/* 结论未公布时的封存标记 */
.report-pending {
  display: inline-block;
  font-size: 11px;
  color: var(--fg-2);
  border: 1px dashed var(--line);
  border-radius: 4px;
  padding: 3px 9px;
  margin: 2px 0 14px;
  letter-spacing: .04em;
}

.report-note {
  font-family: system-ui, sans-serif;
  font-size: 11.5px;
  color: var(--fg-3);
  line-height: 1.7;
  margin: 7px 0 0;
}

.report-note.quote {
  color: var(--fg-2);
  font-size: 12px;
  border-left: 2px solid var(--line);
  padding-left: 12px;
  margin-top: 12px;
}

.report-note.sig { font-size: 11px; color: #4E5661; }
.report-note.muted, .report-note.quote.muted { font-style: italic; color: #4E5661; }

/* 报告附则：制度性的自我说明，常驻 */
.report-annex {
  border-left: 2px solid var(--line);
  padding: 2px 0 2px 11px;
  margin: 16px 0 8px;
}

.report-annex-title {
  font-size: 11.5px;
  color: var(--fg-2);
  letter-spacing: .04em;
  margin-bottom: 6px;
}

.report-annex p {
  font-family: system-ui, sans-serif;
  font-size: 11.5px;
  color: var(--fg-3);
  line-height: 1.75;
  margin: 0 0 5px;
}

.report-annex p.dim { color: #4E5661; }

/* ---------- 记录 ---------- */

.timeline { list-style: none; margin: 0; padding: 0; }

.timeline li {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
  align-items: baseline;
}

.timeline li:last-child { border-bottom: 0; padding-bottom: 0; }

.timeline .t {
  font-family: var(--mono);
  color: var(--fg-3);
  flex: 0 0 46px;
  font-size: 11.5px;
}

.timeline .d { color: var(--fg-2); line-height: 1.55; }
.timeline .d .mono { font-family: var(--mono); color: var(--fg-3); }

/* ---------- 撤销受理卡片 ---------- */

.notice {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 15px;
  margin-top: 12px;
  background: rgba(255, 255, 255, .02);
}

.notice.accepted { border-color: var(--care-dim); background: var(--care-bg); }

.notice-title { font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.notice.accepted .notice-title { color: var(--care); }

.notice-id {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-2);
  margin-bottom: 8px;
}

.notice p { font-size: 12.5px; color: var(--fg-2); margin: 0; line-height: 1.65; }

.queue-bar {
  height: 3px;
  background: rgba(227, 169, 60, .15);
  border-radius: 2px;
  margin: 13px 0 10px;
  overflow: hidden;
}

.queue-bar span {
  display: block;
  height: 100%;
  width: 6%;
  background: var(--care);
  border-radius: 2px;
  animation: queue 2.4s ease-in-out infinite alternate;
}

@keyframes queue {
  from { width: 4%; }
  to   { width: 11%; }
}

/* ---------- 接管浮层 ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 7, 9, .93);
  animation: fade-in .22s ease-out;
}

.overlay[hidden] { display: none; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.overlay-inner {
  width: 100%;
  max-width: 400px;
  background: var(--bg-2);
  border: 1px solid var(--care-dim);
  border-radius: 16px;
  padding: 26px 24px 22px;
  text-align: center;
  animation: card-in .28s cubic-bezier(.2, .8, .3, 1);
}

@keyframes card-in {
  from { transform: translateY(9px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* 结论公布浮层：无需关怀时用冷色，不抢琥珀色 */
.overlay-inner.calm { border-color: var(--line); }
.overlay-inner.calm .overlay-tag {
  color: var(--fg-2);
  background: rgba(255, 255, 255, .03);
  border-color: var(--line);
}
.overlay-inner.calm .overlay-box .v { color: var(--fg); }

.overlay-tag {
  display: inline-block;
  font-size: 11.5px;
  color: var(--care);
  background: var(--care-bg);
  border: 1px solid var(--care-dim);
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 16px;
  letter-spacing: .04em;
}

.overlay-main { font-size: 16px; margin: 0 0 18px; line-height: 1.6; }

.overlay-box {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 14px;
  margin-bottom: 15px;
}

.overlay-box .k { font-size: 11.5px; color: var(--fg-3); margin-bottom: 3px; }

.overlay-box .v {
  font-family: var(--mono);
  font-size: 30px;
  color: var(--care);
  letter-spacing: .03em;
  line-height: 1.2;
}

.overlay-fine { font-size: 12px; color: var(--fg-3); line-height: 1.65; margin: 0 0 20px; }
.overlay-fine.tight { margin-bottom: 7px; }
.overlay-fine.tight + .overlay-fine { color: #4E5661; }

/* 评估浮层里的步骤条 */
.overlay-steps {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  text-align: left;
  min-height: 78px;
}

.overlay-steps li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--fg-3);
  opacity: .32;
  transition: opacity .3s, color .3s;
}

.overlay-steps li.active { opacity: 1; color: var(--fg); }
.overlay-steps li.done { opacity: .7; color: var(--fg-2); }

.overlay-steps .mark { width: 14px; height: 14px; flex: 0 0 auto; color: var(--fg-3); }
.overlay-steps li.done .mark { color: var(--care); }

.overlay .bar { margin: 0 auto; }

/* 减少动态效果：所有动画与状态切换过渡一并关掉。
   无头截图加 --force-prefers-reduced-motion 即可得到确定性的画面。 */
@media (prefers-reduced-motion: reduce) {
  .overlay,
  .overlay-inner,
  .verdict-card,
  .clock,
  .queue-bar span,
  .clock.live .cln i,
  .clock[data-state="sleeping"] .cln i,
  .status-line .hl { animation: none !important; }

  /* 抽屉与遮罩的过渡也要一并关掉 —— 否则无头截图会捕获到
     抽屉尚未就位的中间态（内容看似"缺了一半"） */
  body, .grid-bg, .sleep-veil, .sheet, .sheet-backdrop,
  .btn, .tile, .segmented button { transition: none !important; }
}

/* ---------- 响应式 ---------- */

@media (max-width: 560px) {
  .app { padding: 18px 15px 28px; }
  .clock { --dw: clamp(38px, 13.2vw, 62px); }
  .tile { width: 68px; height: 64px; }
  .tile .tile-value { font-size: 11px; }
  input[type="time"] { font-size: 23px; }
}
