:root {
  --cream: #f7f9f0;
  --paper: #ffffff;
  --mint: #eaf4dd;
  --mint-deep: #dcecc9;
  --leaf: #6cbf6c;
  --leaf-soft: #89cd7d;
  --leaf-deep: #4d9455;
  --leaf-dark: #35603c;
  --ink: #33422d;
  --muted: #7f8d74;
  --dim: #a7b39b;
  --line: #e5ecda;
  --line-soft: #eff4e7;
  --sun: #f6c85f;
  --blush: #f4a7a2;
  --danger: #e38a7d;
  --shadow: 0 18px 44px rgba(74, 102, 55, .10);
  --shadow-soft: 0 10px 26px rgba(74, 102, 55, .07);
  --radius: 26px;
  --sans: "Nunito", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --number: "Nunito", "Noto Sans SC", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 8% -12%, #ffffff, transparent 62%),
    radial-gradient(760px 460px at 96% -8%, #edf7e2, transparent 64%),
    linear-gradient(180deg, #f9fbf2 0%, #f3f8ea 55%, #f8fbf2 100%);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100svh; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 66px;
  padding: 0 max(18px, calc((100vw - 920px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(249, 251, 242, .82);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: linear-gradient(150deg, #9dd68b, #63b96b);
  border-radius: 11px;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(108, 191, 108, .28);
}
.brand strong { display: block; font-size: 15px; font-weight: 800; letter-spacing: .02em; }
.brand small { display: block; margin-top: 1px; color: var(--muted); font-size: 10px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.server-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  white-space: nowrap;
}
.server-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--sun); }
.server-status.online i { background: var(--leaf); box-shadow: 0 0 0 4px rgba(108, 191, 108, .14); }
.icon-button, .close-button {
  width: 34px;
  height: 34px;
  color: var(--muted);
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 18px;
  line-height: 1;
  transition: .2s;
}
.icon-button:hover, .close-button:hover { color: var(--leaf-deep); border-color: var(--mint-deep); }

.layout { display: block; }
.content {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 34px 20px 44px;
}

.kicker {
  color: var(--dim);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
}
h1, h2, p { margin: 0; }
h1 {
  margin-top: 9px;
  color: var(--ink);
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
}
h1 span { color: var(--leaf-deep); }
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 0 4px;
}
.page-subtitle { margin-top: 8px; color: var(--muted); font-size: 12px; }
.today-stamp { margin-left: 6px; color: var(--leaf-deep); letter-spacing: 0; }
.heading-date { text-align: right; color: var(--muted); font-size: 11px; line-height: 1.5; white-space: nowrap; }
.heading-date span, .heading-date strong { display: block; }
.heading-date strong { color: var(--ink); font-size: 16px; font-weight: 800; }
.clock-inline { margin-top: 4px; color: var(--leaf-deep); font-size: 12px; font-weight: 700; }

/* ---------- 宠物小闹芽 ---------- */
.pet-stage {
  position: relative;
  min-height: 322px;
  margin-bottom: 16px;
  padding: 20px 18px 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  border: 1px solid #dfebd2;
  border-radius: 30px;
  background: linear-gradient(180deg, #f3faea 0%, #e8f4da 48%, #d8edc5 100%);
  box-shadow: var(--shadow);
}
.pet-sky { position: absolute; inset: 0; pointer-events: none; }
.pet-cloud {
  position: absolute;
  display: block;
  width: 94px;
  height: 26px;
  background: rgba(255, 255, 255, .92);
  border-radius: 999px;
  filter: blur(1px);
}
.pet-cloud:before, .pet-cloud:after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
}
.pet-cloud:before { width: 34px; height: 34px; top: -14px; left: 16px; }
.pet-cloud:after { width: 24px; height: 24px; top: -9px; right: 18px; }
.cloud-one { top: 30px; left: 8%; animation: cloud-drift 17s ease-in-out infinite; }
.cloud-two { top: 58px; right: 7%; width: 68px; opacity: .8; animation: cloud-drift 22s ease-in-out infinite reverse; }
.pet-hill {
  position: absolute;
  bottom: -74px;
  border-radius: 50%;
  pointer-events: none;
}
.hill-back { left: -18%; width: 118%; height: 190px; background: #cbe5b4; }
.hill-front { left: -22%; bottom: -96px; width: 146%; height: 210px; background: #b9d99f; }
.pet-bubble {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  max-width: 210px;
  padding: 10px 14px;
  color: #6f7c62;
  background: rgba(255, 253, 246, .96);
  border: 1px solid #efe6cd;
  border-radius: 16px 16px 16px 5px;
  box-shadow: 0 8px 18px rgba(95, 120, 70, .12);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
  transition: background .3s, color .3s, border-color .3s;
}
.pet-bubble:after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 22px;
  width: 12px;
  height: 12px;
  background: inherit;
  border-right: 1px solid inherit;
  border-bottom: 1px solid inherit;
  border-radius: 0 0 3px 0;
  transform: rotate(45deg);
}
.pet-wrap {
  position: relative;
  z-index: 1;
  width: min(232px, 48vw);
  margin-bottom: 16px;
  transform-origin: 50% 92%;
  animation: pet-bob 4.6s ease-in-out infinite;
}
.pet { display: block; width: 100%; height: auto; overflow: visible; }
.pet-shadow { fill: rgba(73, 105, 55, .16); }
.pet-body { fill: #fffaf0; stroke: #5d7a4f; stroke-width: 3; }
.pet-belly { fill: #fff2d9; opacity: .92; }
.pet-eye { fill: #3b4835; transform-box: fill-box; transform-origin: center; animation: pet-blink 5.6s infinite; }
.pet-blush { fill: var(--blush); opacity: .5; }
.pet-mouth { stroke: #5d7a4f; stroke-width: 3; fill: none; stroke-linecap: round; transform-box: fill-box; transform-origin: center; }
.mouth-open { fill: #e28b80; stroke: #9a544b; stroke-width: 2; opacity: 0; }
.pet-leaf { fill: #9ad482; stroke: #5d7a4f; stroke-width: 2; transform-box: fill-box; transform-origin: bottom center; animation: leaf-sway 3.6s ease-in-out infinite; }
.leaf-right { animation-delay: .6s; }
.pet-stem { fill: none; stroke: #6d9c58; stroke-width: 3; stroke-linecap: round; }
.pet-arm, .pet-foot { stroke: #5d7a4f; stroke-width: 3; stroke-linecap: round; fill: #f6ecd4; }
.pet-noise { opacity: 0; }
.pet-noise path { stroke: #e58a63; stroke-width: 4; stroke-linecap: round; }
.pet-zzz { fill: #85a06f; font-family: var(--sans); font-weight: 800; font-size: 15px; opacity: 1; }
.pet-zzz text { animation: zzz-float 2.6s ease-in-out infinite; }
.pet-zzz text:last-child { animation-delay: .8s; }
.pet-hearts { opacity: 0; }
.pet-hearts path { fill: #f08e88; transform-box: fill-box; transform-origin: center; }
.pet-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 7px 15px;
  color: var(--muted);
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(84, 116, 66, .12);
  font-size: 11px;
  backdrop-filter: blur(6px);
}
.pet-name { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 800; }
.pet-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--leaf); }

.pet-wrap.is-crazy { animation: pet-panic .22s linear infinite; }
.pet-wrap.is-furious { animation: pet-panic .13s linear infinite; }
.pet-wrap.is-cheer { animation: pet-hop 1.05s ease-in-out infinite; }
.pet-wrap.is-happy { animation: pet-hop .85s ease-in-out infinite; }
.pet-wrap.is-sad { animation: pet-droop 3.2s ease-in-out infinite; }

.pet-wrap.is-crazy .mouth-calm,
.pet-wrap.is-furious .mouth-calm { opacity: 0; }
.pet-wrap.is-crazy .mouth-open,
.pet-wrap.is-furious .mouth-open { opacity: 1; }
.pet-wrap.is-crazy .pet-blush,
.pet-wrap.is-furious .pet-blush { opacity: .85; }
.pet-wrap.is-crazy .pet-noise,
.pet-wrap.is-furious .pet-noise { opacity: 1; animation: noise-flash .32s infinite alternate; }
.pet-wrap.is-crazy .pet-zzz,
.pet-wrap.is-furious .pet-zzz,
.pet-wrap.is-happy .pet-zzz,
.pet-wrap.is-cheer .pet-zzz { opacity: 0; }
.pet-wrap.is-crazy .pet-eye,
.pet-wrap.is-furious .pet-eye { animation: eye-crazy .22s infinite alternate; }
.pet-wrap.is-cheer .pet-hearts,
.pet-wrap.is-happy .pet-hearts { opacity: 1; animation: heart-float 1.9s ease-in-out infinite; }
.pet-wrap.is-sad .mouth-calm { transform: rotate(180deg); opacity: .75; }
.pet-wrap.is-sad .pet-zzz { opacity: 0; }

.pet-stage.is-crazy .pet-bubble,
.pet-stage.is-furious .pet-bubble {
  color: #b45f48;
  background: #fff4ee;
  border-color: #f1cbbb;
  animation: bubble-shake .3s infinite;
}
.pet-stage.is-cheer .pet-bubble { color: #5b7d42; background: #fbfff2; border-color: #d9ebc1; }
.pet-stage.is-happy .pet-bubble { color: #4a7c3f; background: #fbfff2; border-color: #d5e9bd; }
.pet-stage.is-sad .pet-bubble { color: #8f8a6f; background: #fdfbf3; border-color: #ece6cf; }
.pet-stage.is-crazy .pet-dot,
.pet-stage.is-furious .pet-dot { background: #ef8a7c; animation: dot-pulse .5s infinite alternate; }
.pet-stage.is-happy .pet-dot { background: var(--sun); }

@keyframes pet-bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-9px) rotate(1.5deg); }
}
@keyframes pet-panic {
  0% { transform: translate(0, 0) rotate(-3deg); }
  25% { transform: translate(-5px, -7px) rotate(4deg); }
  50% { transform: translate(5px, -2px) rotate(-4deg); }
  75% { transform: translate(-4px, -9px) rotate(3deg); }
  100% { transform: translate(0, 0) rotate(-3deg); }
}
@keyframes pet-hop {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-14px); }
  62% { transform: translateY(-5px); }
}
@keyframes pet-droop {
  0%, 100% { transform: translateY(5px) rotate(-2deg); }
  50% { transform: translateY(9px) rotate(1deg); }
}
@keyframes pet-blink {
  0%, 91%, 100% { transform: scaleY(1); }
  94% { transform: scaleY(.12); }
}
@keyframes leaf-sway {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(6deg); }
}
@keyframes noise-flash {
  from { opacity: .35; }
  to { opacity: 1; }
}
@keyframes eye-crazy {
  from { transform: scale(1); }
  to { transform: scale(1.22) scaleY(.7); }
}
@keyframes heart-float {
  0%, 100% { opacity: .35; transform: translateY(4px) scale(.9); }
  50% { opacity: 1; transform: translateY(-4px) scale(1.05); }
}
@keyframes bubble-shake {
  0%, 100% { transform: rotate(-1.5deg); }
  50% { transform: rotate(1.5deg) translateX(2px); }
}
@keyframes dot-pulse {
  from { box-shadow: 0 0 0 0 rgba(239, 138, 124, .5); }
  to { box-shadow: 0 0 0 5px rgba(239, 138, 124, 0); }
}
@keyframes cloud-drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(18px); }
}
@keyframes zzz-float {
  0%, 100% { opacity: .35; transform: translateY(2px); }
  50% { opacity: 1; transform: translateY(-5px); }
}

/* ---------- 流程条 ---------- */
.flow-steps {
  display: grid;
  grid-template-columns: 1fr 30px 1fr 30px 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 11px 15px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}
.flow-step { display: flex; align-items: center; gap: 8px; color: var(--dim); }
.flow-step > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  color: var(--muted);
  background: var(--mint);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}
.flow-step strong { font-size: 11px; font-weight: 700; white-space: nowrap; }
.flow-step.active { color: var(--leaf-deep); }
.flow-step.active > span, .flow-step.done > span { color: #fff; background: var(--leaf); }
.flow-steps > i { height: 2px; background: var(--mint-deep); border-radius: 99px; }

/* ---------- 闹钟卡片 ---------- */
.alarm-card {
  padding: 21px 24px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-topline, .alarm-time-row, .card-actions, .microcopy, .alarm-meta-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  color: var(--leaf-deep);
  background: var(--mint);
  border: 1px solid var(--mint-deep);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}
.status-pill i { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--leaf); }
.status-pill.alert { color: #b8732f; background: #fdf1d9; border-color: #f3dfb6; }
.status-pill.alert i { background: var(--sun); }
.status-pill.danger { color: #b45f50; background: #fdece6; border-color: #f2d0c6; }
.status-pill.danger i { background: var(--danger); }
.mono { color: var(--muted); font-size: 10px; font-weight: 600; }
.alarm-time-row { justify-content: flex-start; align-items: flex-end; gap: 20px; margin: 20px 0 18px; }
.alarm-time {
  color: var(--ink);
  font-family: var(--number);
  font-size: clamp(54px, 9vw, 74px);
  font-weight: 800;
  line-height: .9;
  letter-spacing: -.04em;
}
.alarm-time span { padding: 0 5px; color: var(--leaf); }
.alarm-time-meta { display: grid; gap: 6px; padding-bottom: 4px; color: var(--muted); font-size: 11px; }
.alarm-time-meta strong { color: var(--leaf-deep); font-size: 13px; font-weight: 800; }
.progress-line, .verify-progress {
  width: 100%;
  height: 6px;
  overflow: hidden;
  background: var(--line-soft);
  border-radius: 99px;
}
.progress-line span, .verify-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--leaf-soft), var(--leaf));
  border-radius: 99px;
  transition: width .3s ease;
}
.alarm-meta-grid {
  justify-content: flex-start;
  gap: clamp(24px, 7vw, 72px);
  margin-top: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.alarm-meta-grid div { display: grid; gap: 5px; }
.alarm-meta-grid span { color: var(--muted); font-size: 10px; }
.alarm-meta-grid strong { font-size: 12px; font-weight: 700; }

.sound-settings {
  margin: 14px 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fbf1;
}
.sound-settings > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  color: var(--ink);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  list-style-position: inside;
}
.sound-settings > summary small { color: var(--muted); font-size: 10px; font-weight: 600; }
.sound-settings-inner { padding: 2px 14px 13px; }
.sound-modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; padding: 0; margin: 0; border: 0; }
.sound-mode { display: block; min-width: 0; cursor: pointer; }
.sound-mode input { position: absolute; opacity: 0; pointer-events: none; }
.sound-mode > span {
  display: block;
  padding: 9px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: .2s;
}
.sound-mode input:checked + span { background: var(--mint); border-color: var(--leaf-soft); }
.sound-mode input:focus-visible + span { outline: 2px solid var(--leaf); outline-offset: 2px; }
.sound-mode strong, .sound-mode small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sound-mode strong { font-size: 10px; }
.sound-mode small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.sound-level { display: grid; grid-template-columns: auto minmax(100px, 1fr) auto; align-items: center; gap: 12px; margin-top: 12px; }
.sound-level > label { color: var(--muted); font-size: 10px; white-space: nowrap; }
.sound-level > label strong { margin-left: 4px; color: var(--leaf-deep); font-size: 10px; }
.sound-level input { width: 100%; accent-color: var(--leaf); }
.sound-preview {
  min-width: 70px;
  padding: 7px 10px;
  color: var(--leaf-deep);
  background: var(--paper);
  border: 1px solid var(--mint-deep);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}
.sound-preview:hover { background: var(--mint); }
.sound-limit { margin-top: 8px; color: var(--dim); font-size: 9px; line-height: 1.5; }
.sound-preview:disabled { display: none; }
.microcopy { justify-content: flex-start; gap: 6px; margin-top: 14px; color: var(--muted); font-size: 10px; }
.microcopy span { color: var(--leaf); font-size: 14px; }

/* ---------- 按钮 ---------- */
.primary-button, .secondary-button, .ghost-button, .small-button {
  min-height: 42px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
}
.primary-button {
  color: #fff;
  background: linear-gradient(160deg, #8ad07c, #61b968);
  box-shadow: 0 9px 20px rgba(97, 185, 104, .26);
}
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(97, 185, 104, .32); }
.secondary-button {
  color: var(--leaf-deep);
  background: var(--paper);
  border-color: var(--mint-deep);
}
.secondary-button:hover { background: var(--mint); }
.ghost-button {
  color: var(--leaf-deep);
  background: var(--paper);
  border-color: var(--line);
}
.ghost-button:hover { background: #f7fbf0; border-color: var(--mint-deep); }
.small-button {
  min-height: 32px;
  padding: 7px 12px;
  color: var(--leaf-deep);
  background: var(--mint);
  border-color: var(--mint-deep);
  font-size: 10px;
}
.small-button:hover { background: var(--mint-deep); }
.card-actions { justify-content: flex-start; gap: 9px; }
.text-button { padding: 0; color: var(--muted); background: none; border: 0; font-size: 11px; font-weight: 700; }
.text-button:hover { color: var(--leaf-deep); }

/* ---------- 通用分区 ---------- */
.section-block { margin-top: 50px; scroll-margin-top: 24px; }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 4px 13px;
  border-bottom: 1px solid var(--line);
}
.section-heading h2 { margin-top: 7px; font-size: 23px; font-weight: 800; letter-spacing: -.02em; }
.section-number { color: #d5e4c5; font-family: var(--number); font-size: 30px; font-weight: 800; }

.verify-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; padding-top: 18px; }
.camera-stage {
  position: relative;
  height: 290px;
  overflow: hidden;
  background: linear-gradient(160deg, #e8f1df, #dbe9d0);
  border: 1px solid #dbe9d0;
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}
#camera-video { display: none; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
#motion-canvas { display: none; }
.camera-stage.live #camera-video { display: block; }
.camera-stage.live .camera-placeholder { display: none; }
.camera-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  color: var(--muted);
}
.camera-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: var(--leaf-deep);
  background: rgba(255, 255, 255, .85);
  border-radius: 50%;
  font-size: 30px;
  box-shadow: var(--shadow-soft);
}
.camera-placeholder strong { margin-top: 12px; color: var(--ink); font-size: 13px; font-weight: 800; }
.camera-placeholder p { margin-top: 5px; font-size: 10px; }
.camera-badge, .motion-tag {
  position: absolute;
  top: 12px;
  padding: 5px 9px;
  color: var(--leaf-deep);
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}
.camera-badge { left: 12px; }
.motion-tag { right: 12px; color: var(--muted); }
.motion-tag.active { color: var(--leaf-deep); background: #f2fbe7; }
.camera-controls { display: flex; align-items: center; gap: 14px; margin-top: 10px; padding: 0 4px; }
.verify-copy { display: flex; flex-direction: column; min-height: 290px; padding: 1px 4px 0; }
.verify-status {
  display: flex;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}
.status-orb { flex: 0 0 8px; width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--dim); }
.verify-status.live .status-orb { background: var(--sun); box-shadow: 0 0 0 5px rgba(246, 200, 95, .16); }
.verify-status.success .status-orb { background: var(--leaf); box-shadow: 0 0 0 5px rgba(108, 191, 108, .16); }
.verify-status strong { font-size: 12px; font-weight: 800; }
.verify-status p { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.timer-wrap { margin: auto 0 10px; }
.timer { color: var(--ink); font-family: var(--number); font-size: 62px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.timer span { margin-left: 6px; color: var(--leaf); font-size: 20px; }
.timer-label { margin-top: 5px; color: var(--muted); font-size: 10px; }
.verify-rules { display: grid; gap: 7px; padding: 12px 0; }
.verify-rules div { display: grid; grid-template-columns: 24px 1fr; gap: 4px; color: var(--muted); }
.verify-rules span { color: var(--leaf-deep); font-size: 10px; font-weight: 800; }
.verify-rules p { font-size: 10px; line-height: 1.5; }
.environment-readout { margin: 0 0 9px; color: var(--muted); font-size: 9px; }
.verify-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.disclaimer { margin-top: 10px; color: var(--dim); font-size: 9px; line-height: 1.5; }

.checks-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 17px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}
.checks-intro { display: flex; align-items: center; gap: 14px; }
.checks-intro strong { font-size: 13px; font-weight: 800; }
.checks-intro p { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.check-radar {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  background: var(--mint);
  border-radius: 50%;
}
.check-radar:before, .check-radar:after { content: ""; position: absolute; border: 1px solid #cde3b8; border-radius: 50%; }
.check-radar:before { inset: 8px; }
.check-radar:after { inset: 16px; }
.check-radar span { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--leaf); }
.check-radar span:first-child { top: 11px; right: 8px; }
.check-radar span:nth-child(2) { bottom: 9px; left: 11px; }
.check-radar span:nth-child(3) { opacity: 0; }
.checks-count { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.checks-count > span { color: var(--muted); font-size: 10px; }
.checks-count strong { color: var(--leaf-deep); font-family: var(--number); font-size: 22px; font-weight: 800; }
.check-timeline { display: grid; grid-template-columns: repeat(3, 1fr); padding: 20px 6px 0; }
.timeline-item { display: flex; gap: 9px; position: relative; }
.timeline-item:not(:last-child):after {
  content: "";
  position: absolute;
  top: 4px;
  left: 16px;
  width: calc(100% - 10px);
  height: 2px;
  transform: translateX(10px);
  background: var(--line-soft);
  border-radius: 99px;
  z-index: -1;
}
.timeline-item > span {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border: 2px solid #d5e3c5;
  border-radius: 50%;
  background: var(--cream);
}
.timeline-item.done > span { border-color: var(--leaf); background: var(--leaf); }
.timeline-item strong, .timeline-item small { display: block; }
.timeline-item strong { font-size: 10px; font-weight: 700; }
.timeline-item small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.timeline-item.muted { color: var(--dim); }

.platform-notes { margin-top: 36px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.platform-notes > summary {
  padding: 14px 4px;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  list-style-position: inside;
}
.platform-notes[open] .boundary-grid { padding: 0 0 16px; margin-top: 0; }
.boundary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.boundary-grid article {
  display: flex;
  gap: 10px;
  min-height: 118px;
  padding: 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}
.boundary-grid strong { font-size: 11px; font-weight: 800; }
.boundary-grid p { margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.boundary-icon {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}
.boundary-icon.green { color: var(--leaf-deep); background: var(--mint); }
.boundary-icon.orange { color: #b8732f; background: #fdf1d9; }
.boundary-icon.blue { color: #5a8fa8; background: #e8f4f7; }
.footer {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  padding: 14px 4px 0;
  color: var(--dim);
  border-top: 1px solid var(--line);
  font-size: 9px;
}

/* ---------- 弹窗 ---------- */
.modal {
  width: min(520px, calc(100% - 32px));
  padding: 24px;
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid #f0ead9;
  border-radius: 26px;
  box-shadow: 0 30px 100px rgba(70, 92, 50, .28);
}
.modal::backdrop { background: rgba(47, 66, 38, .32); backdrop-filter: blur(6px); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; }
.modal h2 { margin-top: 8px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.modal-lead { margin: 16px 0 20px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.field-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.modal input[type="datetime-local"] {
  width: 100%;
  padding: 12px 14px;
  color: var(--ink);
  background: #f8fbf2;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
}
.modal input[type="datetime-local"]:focus { border-color: var(--leaf-soft); box-shadow: 0 0 0 4px rgba(108, 191, 108, .12); }
.mode-select { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 15px; }
.mode-option {
  position: relative;
  display: flex;
  gap: 9px;
  padding: 13px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: .2s;
}
.mode-option.selected, .mode-option:has(input:checked) { background: var(--mint); border-color: var(--leaf-soft); }
.mode-option input { display: none; }
.mode-option strong, .mode-option small { display: block; }
.mode-option strong { font-size: 11px; font-weight: 800; }
.mode-option small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.mode-option i { display: none; position: absolute; top: 10px; right: 10px; color: var(--leaf-deep); font-style: normal; font-size: 11px; }
.mode-option:has(input:checked) i { display: block; }
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 15px;
  border-top: 1px solid var(--line-soft);
}
.modal-foot span { color: var(--muted); font-size: 9px; line-height: 1.4; }
.recovery-modal { max-width: 410px; text-align: center; }
.recovery-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  color: #b8732f;
  background: #fdf1d9;
  border-radius: 50%;
  font-size: 19px;
  font-weight: 800;
}
.recovery-modal h2 { margin-top: 9px; }
.recovery-modal > p:not(.kicker) { margin-top: 13px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.recovery-actions { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }
.recovery-modal small { display: block; margin-top: 16px; color: var(--dim); font-size: 9px; }
.check-modal { max-width: 370px; text-align: center; }
.check-modal-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  color: var(--leaf-deep);
  background: var(--mint);
  border-radius: 50%;
  font-size: 28px;
}
.check-modal h2 { margin-top: 9px; }
.check-modal p:not(.kicker) { margin-top: 12px; color: var(--muted); font-size: 11px; }
.check-countdown { margin: 18px 0; color: var(--leaf-deep); font-family: var(--number); font-size: 42px; font-weight: 800; letter-spacing: -.03em; }
.check-modal .primary-button { width: 100%; }
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 20;
  max-width: min(420px, calc(100% - 30px));
  padding: 11px 18px;
  color: #fff;
  background: rgba(61, 82, 52, .94);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 14px 34px rgba(50, 68, 40, .3);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 闹钟触发后的核验切屏 ---------- */
[hidden] { display: none !important; }
body.wake-open { overflow: hidden; }
.wake-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
  background: rgba(52, 70, 40, .38);
  backdrop-filter: blur(8px);
}
.wake-panel {
  width: min(980px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 26px;
  background: #fffdf8;
  border: 1px solid #efe9d7;
  border-radius: 30px;
  box-shadow: 0 30px 90px rgba(60, 84, 46, .28);
  animation: wake-in .32s ease-out;
}
.wake-head h2 {
  margin-top: 8px;
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: -.02em;
}
.wake-head > p:last-child { margin-top: 8px; color: var(--muted); font-size: 12px; }
.wake-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; margin-top: 22px; }
.wake-body .camera-stage { height: 340px; }
.wake-copy { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.wake-conditions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.wake-condition {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #f8fbf2;
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: .2s;
}
.wake-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  color: var(--leaf-deep);
  background: var(--mint);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  transition: .2s;
}
.wake-condition strong, .wake-condition small { display: block; }
.wake-condition strong { font-size: 12px; font-weight: 800; }
.wake-condition small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.wake-condition.active {
  background: #eaf7dd;
  border-color: var(--leaf-soft);
  box-shadow: 0 8px 18px rgba(108, 191, 108, .15);
}
.wake-condition.active .wake-icon { color: #fff; background: var(--leaf); }
.wake-condition.active small { color: var(--leaf-deep); font-weight: 700; }
.wake-note { color: var(--muted); font-size: 10px; line-height: 1.6; }
.wake-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.wake-actions .primary-button { flex: 1 1 180px; }
.wake-exit { align-self: flex-start; color: var(--dim); font-size: 10px; }
.wake-exit:hover { color: var(--danger); }
@keyframes wake-in {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- 响应式 ---------- */
@media (max-width: 820px) {
  .content { padding: 26px 18px 36px; }
  .verify-grid { grid-template-columns: 1fr; gap: 17px; }
  .camera-stage { height: 250px; }
  .wake-body { grid-template-columns: 1fr; gap: 16px; }
  .wake-body .camera-stage { height: 240px; }
  .wake-panel { padding: 20px; }
  .verify-copy { min-height: 0; }
  .timer-wrap { margin: 22px 0 10px; }
}
@media (max-width: 600px) {
  .wake-screen { padding: 0; place-items: stretch; }
  .wake-panel { width: 100%; height: 100%; max-height: none; padding: 18px 14px; border-radius: 0; border: 0; }
  .wake-head h2 { font-size: 24px; }
  .wake-body { margin-top: 16px; }
  .wake-conditions { grid-template-columns: 1fr 1fr; gap: 7px; }
  .wake-condition { padding: 10px; gap: 8px; }
  .wake-icon { width: 28px; height: 28px; flex-basis: 28px; font-size: 10px; }
  .wake-actions .primary-button { flex-basis: 100%; }
  .topbar { height: 58px; padding: 0 14px; }
  .server-status { display: none; }
  .content { padding: 20px 14px 30px; }
  .page-heading { align-items: flex-start; margin-bottom: 12px; }
  .page-heading h1 { font-size: 30px; }
  .page-subtitle { max-width: 230px; font-size: 10px; }
  .heading-date { padding-top: 3px; font-size: 10px; }
  .heading-date strong { font-size: 13px; }
  .pet-stage { min-height: 272px; padding: 14px 12px 0; border-radius: 26px; }
  .pet-wrap { width: min(190px, 54vw); margin-bottom: 12px; }
  .pet-bubble { top: 12px; left: 12px; max-width: 160px; padding: 8px 11px; font-size: 11px; }
  .pet-footer { margin-bottom: 11px; padding: 6px 12px; font-size: 10px; }
  .flow-steps { grid-template-columns: 1fr 14px 1fr 14px 1fr; gap: 5px; padding: 8px 9px; border-radius: 15px; }
  .flow-step { gap: 5px; }
  .flow-step > span { width: 21px; height: 21px; flex-basis: 21px; font-size: 9px; }
  .flow-step strong { font-size: 9px; }
  .alarm-card { padding: 15px 15px 14px; border-radius: 22px; }
  .card-topline .mono { font-size: 9px; }
  .alarm-time-row { margin: 15px 0 13px; gap: 14px; }
  .alarm-time { font-size: 50px; }
  .alarm-time-meta { font-size: 10px; }
  .alarm-meta-grid { gap: 10px; padding: 11px 0; }
  .alarm-meta-grid div:last-child { display: none; }
  .sound-settings > summary { min-height: 38px; padding: 0 11px; }
  .sound-settings-inner { padding: 2px 11px 12px; }
  .sound-modes { grid-template-columns: 1fr 1fr; }
  .sound-level { grid-template-columns: 1fr auto; }
  .sound-level > label { grid-column: 1 / -1; }
  .sound-level input { grid-column: 1; }
  .sound-preview { grid-column: 2; grid-row: 2; }
  .card-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .card-actions button { width: 100%; }
  .alarm-card .microcopy { display: none; }
  .section-block { margin-top: 38px; }
  .section-heading h2 { font-size: 19px; }
  .section-number { font-size: 24px; }
  .camera-stage { height: 220px; border-radius: 18px; }
  .verify-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .verify-actions .primary-button { grid-column: 1 / -1; }
  .verify-actions button { width: 100%; }
  .checks-card { align-items: flex-start; flex-direction: column; gap: 13px; padding: 15px; }
  .checks-count { width: 100%; flex-wrap: wrap; }
  .checks-count .small-button { margin-left: auto; }
  .check-timeline { gap: 10px; }
  .timeline-item:not(:last-child):after { display: none; }
  .boundary-grid { grid-template-columns: 1fr; }
  .boundary-grid article { min-height: auto; }
  .footer { flex-direction: column; gap: 8px; }
  .mode-select { grid-template-columns: 1fr; }
  .modal-foot { align-items: flex-start; flex-direction: column; }
  .modal-foot .primary-button { width: 100%; }
  .recovery-actions { flex-direction: column; }
  .recovery-actions button { width: 100%; }
}

.guard-card { display: grid; gap: 12px; justify-items: start; }
.guard-actions { display: flex; flex-wrap: wrap; gap: 10px; }
