body { margin: 0; background: #f5f5f5; }
.proactive-monitor {
  --pm-ink: #191919;
  --pm-muted: #5b5b5b;
  --pm-card: linear-gradient(146deg, #ffffffd9, #e7e7e7b3 74%, #f6f6f6);
  box-sizing: border-box;
  min-height: 100dvh;
  width: 100%;
  padding: calc(12px + max(env(safe-area-inset-top, 0px), var(--rv-native-safe-top, 0px))) clamp(16px, 5vw, 26px) calc(16px + max(env(safe-area-inset-bottom, 0px), var(--rv-native-safe-bottom, 0px)));
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2.15dvh, 22px);
  color: var(--pm-ink);
  color-scheme: light;
  background: radial-gradient(ellipse at 82% 5%, #fff, #f5f5f5 66%);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.proactive-monitor *, .proactive-monitor *::before { box-sizing: border-box; }
.proactive-monitor [hidden] { display: none !important; }
.proactive-monitor :is(p, h1, h2, ol) { margin: 0; }
.proactive-monitor > * { width: 100%; max-width: 520px; margin-inline: auto; }
.pm-header { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; }
.pm-header h1 { text-align: center; font-size: 24px; font-weight: 700; letter-spacing: .04em; }
.pm-back {
  width: 44px; height: 44px; display: grid; place-items: center;
  color: var(--pm-ink); border-radius: 50%; border: 1px solid #fff;
  background: var(--pm-card); box-shadow: 0 3px 10px #0000000a;
}
.pm-roles { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: thin; }
.pm-roles:empty { display: none; }
.pm-roles button {
  flex: 1 0 auto; min-height: 42px; padding: 7px 14px;
  border: 1px solid #c8c8c8; border-radius: 999px;
  background: #ffffffa6; color: var(--pm-muted); font: inherit; font-weight: 620; white-space: nowrap;
}
.pm-roles button[aria-pressed="true"], .pm-check {
  background: linear-gradient(145deg, #292929, #181818); border-color: #242424; color: #fff;
}
.pm-plan, .pm-footer {
  border: 1px solid #fff; border-radius: 23px; background: var(--pm-card);
  box-shadow: inset 0 1px 2px #fff, 0 7px 22px #00000008;
}
.pm-plan {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(15px, 3dvh, 26px) clamp(17px, 5vw, 28px);
  min-height: 122px;
}
.pm-plan::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: -76% -7% 5% 30%; border-radius: 50%;
  border-right: 2px solid #ffffffc9;
  background: linear-gradient(156deg, transparent 54%, #ffffff89 100%);
  transform: rotate(35deg);
}
.pm-plan-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.pm-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--pm-ink); font-size: 13px; cursor: pointer; }
.pm-toggle input { appearance: none; position: relative; width: 42px; height: 24px; margin: 0; border: 1px solid #777; border-radius: 999px; background: #dedede; cursor: inherit; }
.pm-toggle input::before { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0004; }
.pm-toggle input:checked { background: #303030; border-color: #303030; }
.pm-toggle input:checked::before { transform: translateX(18px); }
.pm-toggle input:disabled { opacity: .55; }
.pm-plan h2 { color: var(--pm-muted); font-size: 16px; font-weight: 600; }
.pm-time {
  display: block; font-size: clamp(45px, 8.7dvh, 76px); line-height: 1.06; letter-spacing: -.065em;
  font-weight: 700; font-variant-numeric: tabular-nums; margin-block: 5px 2px;
}
.pm-date, .pm-empty { color: var(--pm-muted); }
.pm-reason { padding-top: 10px; overflow-wrap: anywhere; font-weight: 600; }
.pm-settings { display: inline-block; margin-top: 9px; color: var(--pm-ink); text-underline-offset: 3px; }
.pm-recent { padding-inline: 9px; }
.pm-recent h2 { margin-bottom: 10px; font-size: 19px; }
.pm-events { list-style: none; padding: 0; }
.pm-event { position: relative; padding: 0 0 13px 33px; }
.pm-event:last-child { padding-bottom: 0; }
.pm-event:not(:last-child)::after { content: ""; position: absolute; inset: 20px auto 0 7px; width: 1px; background: #bdbdbd; }
.pm-mark { position: absolute; inset: 3px auto auto 0; width: 15px; height: 15px; color: #272727; }
.pm-event time { display: block; font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.pm-event strong { display: block; font-size: 15px; }
.pm-event p { color: var(--pm-muted); font-size: 13px; overflow-wrap: anywhere; }
.pm-event summary { color: var(--pm-muted); font-size: 13px; cursor: pointer; }
.pm-footer { margin-top: auto; text-align: center; padding: 12px; }
.pm-footer p { font-size: 12px; color: var(--pm-muted); margin-top: 7px; }
.pm-footer .pm-feedback { margin: 0 0 8px; overflow-wrap: anywhere; }
.pm-check { width: 100%; min-height: 44px; padding: 8px; border: 1px solid #242424; border-radius: 14px; font: inherit; font-size: 17px; font-weight: 650; }
.pm-check:disabled { opacity: .52; }
.proactive-monitor :focus-visible { outline: 2px solid #525252; outline-offset: 2px; }
.pm-older { margin-top: 8px; }
.pm-older > details > summary { color: var(--pm-muted); cursor: pointer; font-size: 13px; }
.pm-older .pm-events { padding-top: 10px; }

.pm-plan .pm-check-time { color: var(--pm-muted); font-size: 13px; margin-top: 6px; }
