/* ============================================================================
   MTing OS — Pure Live Telemetry (Dynamic Island / Toast) + Native 4-OS Calendar App
   1. Live Layer: 100% pure real-time telemetry (148pt HIG Dynamic Island / PC Toast).
      ZERO artificial bottom replay sheets or buttons inside Dynamic Island!
   2. History & Schedule Layer: Native Apple / Win11 / Android Calendar App (`日历`)
      with Week/Month picker, 24h Day Timeline + Red Current-Time Line, & Event Pixel Replay.
   ============================================================================ */

.pulse-px-canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
  border-radius: inherit;
}

.pulse-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #30D158;
  box-shadow: 0 0 8px rgba(48, 209, 88, 0.85);
  display: inline-block;
  flex-shrink: 0;
  animation: pulseBreath 1.6s ease-in-out infinite;
}
.pulse-live-dot.amber { background: #FF9F0A; box-shadow: 0 0 8px rgba(255, 159, 10, 0.85); }
.pulse-live-dot.idle { background: #64D2FF; box-shadow: 0 0 6px rgba(100, 210, 255, 0.55); animation: none; }
@keyframes pulseBreath {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.42; transform: scale(0.85); }
}

.xpodium-clock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #090A0D;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  flex-shrink: 0;
}
.xpodium-mode { color: #2E7BFF; font-size: 11px; font-weight: 800; }
.xpodium-digits { color: #FF3B30; font-size: 12.5px; font-weight: 800; }
.xpodium-clock.done .xpodium-mode { color: #30D158; }
.xpodium-clock.done .xpodium-digits { color: #F5F5F7; }

.hig-prog-track { display: flex; align-items: center; gap: 5px; width: 100%; }
.hig-prog-seg {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}
.hig-prog-seg > i {
  display: block;
  height: 100%;
  width: var(--w, 0%);
  border-radius: inherit;
  background: #30D158;
  transition: width 0.35s ease;
}
.hig-prog-seg.amber > i { background: #FF9F0A; }
html:not([data-appearance="dark"]) .pulse-nc-live-card .hig-prog-seg { background: rgba(0, 0, 0, 0.10); }

/* ============================================================================
   1. PC LIVE TOAST + NOTIFICATION CENTER (Current Status + Native Calendar Widget)
   ============================================================================ */
.pulse-menubar-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px 0 4px;
  margin-right: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  border: 0.5px solid rgba(255, 255, 255, 0.24);
  color: #FFF;
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.pulse-menubar-pill:hover { background: rgba(0, 0, 0, 0.36); }
.pulse-menubar-pill canvas { width: 16px; height: 16px; border-radius: 4px; }

#pulse-pc-banner {
  position: fixed;
  top: 40px;
  right: 14px;
  width: 348px;
  padding: 11px 14px 11px 11px;
  border-radius: 20px;
  background: rgba(246, 247, 250, 0.82);
  backdrop-filter: blur(30px) saturate(195%);
  -webkit-backdrop-filter: blur(30px) saturate(195%);
  border: 0.5px solid rgba(255, 255, 255, 0.80);
  box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.92), 0 14px 36px rgba(0, 0, 0, 0.20);
  color: #1D1D1F;
  z-index: 19500;
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  transform: translateX(calc(100% + 28px)) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.44s cubic-bezier(0.22, 1.15, 0.36, 1), opacity 0.26s ease;
}
#pulse-pc-banner.show { transform: translateX(0) scale(1); opacity: 1; pointer-events: auto; }
html[data-appearance="dark"] #pulse-pc-banner {
  background: rgba(38, 39, 44, 0.84);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.22), 0 18px 42px rgba(0, 0, 0, 0.48);
  color: #F5F5F7;
}
html[data-os="windows"] #pulse-pc-banner { top: auto; bottom: 58px; right: 12px; width: 360px; border-radius: 8px; }

.pulse-banner-close {
  position: absolute;
  left: -7px;
  top: -7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 0.5px solid rgba(0, 0, 0, 0.14);
  background: rgba(245, 245, 247, 0.95);
  color: #48484A;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  cursor: pointer;
}
#pulse-pc-banner:hover .pulse-banner-close { opacity: 1; }
.pulse-stage-box { width: 46px; height: 46px; border-radius: 11px; background: #14171F; flex-shrink: 0; overflow: hidden; }
.pulse-stage-box canvas { width: 100%; height: 100%; }
.pulse-banner-body { flex: 1; min-width: 0; }
.pulse-banner-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 1px; }
.pulse-banner-app { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; opacity: 0.68; }
.pulse-banner-time { font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; opacity: 0.62; }
.pulse-banner-title { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pulse-banner-sub { font-size: 12px; opacity: 0.75; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#pulse-nc-drawer {
  position: fixed;
  top: 36px;
  right: 12px;
  bottom: 16px;
  width: 352px;
  z-index: 19450;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 2px;
  transform: translateX(calc(100% + 28px));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.40s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease;
}
#pulse-nc-drawer.open { transform: translateX(0); opacity: 1; pointer-events: auto; }
html[data-os="windows"] #pulse-nc-drawer { top: auto; max-height: calc(100dvh - 76px); bottom: 58px; }

.pulse-nc-card {
  border-radius: 22px;
  padding: 14px 15px;
  background: rgba(246, 247, 250, 0.90);
  backdrop-filter: blur(38px) saturate(200%);
  -webkit-backdrop-filter: blur(38px) saturate(200%);
  border: 0.5px solid rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.94), 0 16px 40px rgba(0, 0, 0, 0.22);
  color: #1D1D1F;
}
html[data-appearance="dark"] .pulse-nc-card {
  background: rgba(34, 35, 40, 0.88);
  border-color: rgba(255, 255, 255, 0.14);
  color: #F5F5F7;
}
html[data-os="windows"] .pulse-nc-card { border-radius: 10px; }

.pulse-nc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.pulse-nc-kicker { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; opacity: 0.72; }
.pulse-hero-row { display: flex; align-items: center; gap: 13px; }
.pulse-hero-stage { width: 66px; height: 66px; border-radius: 15px; background: #12151D; flex-shrink: 0; overflow: hidden; }
.pulse-hero-stage canvas { width: 100%; height: 100%; }
.pulse-hero-info { flex: 1; min-width: 0; }
.pulse-hero-phase { font-size: 11.5px; font-weight: 700; color: #24A148; margin-bottom: 2px; }
html[data-appearance="dark"] .pulse-hero-phase { color: #30D158; }
.pulse-hero-phase.idle { color: #5E5CE6; }
html[data-appearance="dark"] .pulse-hero-phase.idle { color: #64D2FF; }
.pulse-hero-move { font-size: 16px; font-weight: 800; line-height: 1.22; }
.pulse-hero-detail { font-size: 12px; opacity: 0.70; margin-top: 2px; line-height: 1.35; }

/* Native macOS Calendar Widget inside Notification Center */
.nc-cal-widget-date { font-size: 12px; font-weight: 800; color: #FF3B30; letter-spacing: 0.2px; }
.nc-cal-ev-list { display: flex; flex-direction: column; gap: 7px; margin-top: 8px; }
.nc-cal-ev-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(120, 120, 128, 0.10);
  cursor: pointer;
  transition: background 0.15s ease;
}
.nc-cal-ev-row:hover { background: rgba(120, 120, 128, 0.18); }
.nc-cal-ev-bar { width: 3.5px; height: 28px; border-radius: 2px; flex-shrink: 0; }
.nc-cal-ev-txt { flex: 1; min-width: 0; }
.nc-cal-ev-txt b { display: block; font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nc-cal-ev-txt small { display: block; font-size: 11px; opacity: 0.65; font-variant-numeric: tabular-nums; }
.nc-cal-open-hint { font-size: 11px; font-weight: 600; color: #0A84FF; flex-shrink: 0; }

/* ============================================================================
   2. iOS 26 DYNAMIC ISLAND — DUAL-ACTIVITY SPLIT PILL + EXPANDED LIVE & MUSIC
   ============================================================================ */
.mob-sys-bar.ios .ios-island {
  opacity: 0 !important;
  pointer-events: none !important;
}
#pulse-ios-wrap {
  position: absolute;
  left: 50%;
  top: 11px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  z-index: 19600;
  pointer-events: none;
  width: auto;
  transition: top 0.36s cubic-bezier(0.22, 1, 0.36, 1), bottom 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}
#pulse-ios-wrap.state-banner,
#pulse-ios-wrap.state-expanded,
#pulse-ios-wrap.state-music {
  width: calc(100% - 16px);
  gap: 0;
}
html[data-device="real"] #pulse-ios-wrap.state-compact {
  top: auto;
  bottom: calc(max(env(safe-area-inset-bottom), 10px) + 156px);
}
html[data-device="real"] #pulse-ios-wrap.state-banner,
html[data-device="real"] #pulse-ios-wrap.state-expanded,
html[data-device="real"] #pulse-ios-wrap.state-music {
  top: max(env(safe-area-inset-top), 10px);
}

#pulse-ios-island {
  position: relative;
  width: 146px;
  height: 36px;
  border-radius: 22px;
  background: #000;
  color: #FFF;
  pointer-events: auto;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.36), inset 0 0 0 0.5px rgba(255, 255, 255, 0.12);
  overflow: hidden;
  cursor: pointer;
  transition:
    width 0.46s cubic-bezier(0.24, 1.22, 0.36, 1),
    height 0.46s cubic-bezier(0.24, 1.22, 0.36, 1),
    border-radius 0.42s cubic-bezier(0.24, 1.22, 0.36, 1);
  -webkit-tap-highlight-color: transparent;
}
html[data-device="real"] #pulse-ios-island.state-compact {
  width: auto;
  min-width: 152px;
  height: 36px;
  padding: 0 12px 0 7px;
  border-radius: 999px;
  background: rgba(16, 18, 24, 0.88);
  backdrop-filter: blur(26px) saturate(185%);
  -webkit-backdrop-filter: blur(26px) saturate(185%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.34), inset 0 0.5px 0 rgba(255, 255, 255, 0.20);
}
html[data-device="real"] #pulse-ios-island.state-banner,
html[data-device="real"] #pulse-ios-island.state-expanded,
html[data-device="real"] #pulse-ios-island.state-music {
  background: rgba(10, 11, 15, 0.95);
  backdrop-filter: blur(34px) saturate(190%);
  -webkit-backdrop-filter: blur(34px) saturate(190%);
}
#pulse-ios-island.state-banner { width: 100%; height: 82px; border-radius: 38px; }
#pulse-ios-island.state-expanded { width: 100%; height: 148px; border-radius: 42px; }
#pulse-ios-island.state-music { width: 100%; height: 184px; border-radius: 44px; cursor: default; }

/* Detached Right Minimal Music Bubble (`36x36`, Apple Split Dynamic Island) */
#pulse-ios-music-orb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: #000;
  color: var(--mus-accent, #E5A15C);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.36), inset 0 0 0 0.5px rgba(255, 255, 255, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
  flex-shrink: 0;
  transition: width 0.34s cubic-bezier(0.24, 1.2, 0.36, 1), opacity 0.22s ease, transform 0.34s cubic-bezier(0.24, 1.2, 0.36, 1);
  -webkit-tap-highlight-color: transparent;
}
html[data-device="real"] #pulse-ios-music-orb {
  background: rgba(16, 18, 24, 0.88);
  backdrop-filter: blur(26px) saturate(185%);
  -webkit-backdrop-filter: blur(26px) saturate(185%);
}
#pulse-ios-wrap:not(.state-compact) #pulse-ios-music-orb {
  width: 0;
  opacity: 0;
  transform: scale(0.35);
  pointer-events: none;
  overflow: hidden;
}

.pi-orb-wave,
.pi-mus-wave {
  display: inline-flex;
  align-items: center;
  gap: 2.2px;
  height: 15px;
  color: var(--mus-accent, #E5A15C);
}
.pi-orb-wave > i,
.pi-mus-wave > i {
  width: 2.3px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  transition: height 0.2s ease;
}
.pi-orb-wave.playing > i,
.pi-mus-wave.playing > i {
  animation: piWaveBounce 0.68s ease-in-out infinite alternate;
}
.pi-orb-wave.playing > i:nth-child(1), .pi-mus-wave.playing > i:nth-child(1) { animation-duration: 0.56s; height: 7px; }
.pi-orb-wave.playing > i:nth-child(2), .pi-mus-wave.playing > i:nth-child(2) { animation-duration: 0.82s; animation-delay: 0.12s; height: 14px; }
.pi-orb-wave.playing > i:nth-child(3), .pi-mus-wave.playing > i:nth-child(3) { animation-duration: 0.62s; animation-delay: 0.24s; height: 10px; }
.pi-orb-wave.playing > i:nth-child(4), .pi-mus-wave.playing > i:nth-child(4) { animation-duration: 0.74s; animation-delay: 0.08s; height: 13px; }
.pi-mus-wave.playing > i:nth-child(5) { animation-duration: 0.58s; animation-delay: 0.20s; height: 11px; }
.pi-mus-wave.playing > i:nth-child(6) { animation-duration: 0.78s; animation-delay: 0.30s; height: 6px; }
@keyframes piWaveBounce {
  0% { transform: scaleY(0.35); }
  100% { transform: scaleY(1.08); }
}

.pi-compact-view, .pi-banner-view, .pi-expanded-view, .pi-music-view { display: none; width: 100%; height: 100%; box-sizing: border-box; }
#pulse-ios-island.state-compact .pi-compact-view { display: flex; align-items: center; justify-content: space-between; padding: 0 11px 0 7px; gap: 8px; }
#pulse-ios-island.state-banner .pi-banner-view { display: flex; align-items: center; padding: 13px 16px 13px 14px; gap: 12px; }
#pulse-ios-island.state-expanded .pi-expanded-view { display: flex; flex-direction: column; justify-content: space-between; padding: 13px 18px 15px; }
#pulse-ios-island.state-music .pi-music-view { display: flex; flex-direction: column; justify-content: space-between; padding: 16px 22px 16px; }

/* Expanded Music Dynamic Island (`state-music` — Apple HIG Now Playing) */
.pi-mus-head {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-top: 2px;
}
.pi-mus-art {
  width: 54px;
  height: 54px;
  border-radius: 13px;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
  cursor: pointer;
}
.pi-mus-meta {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.pi-mus-title {
  font-size: 16.5px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.22;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pi-mus-artist {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.60);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pi-mus-wave {
  height: 22px;
  gap: 3px;
  padding-right: 2px;
}
.pi-mus-wave > i { width: 3px; height: 14px; }

.pi-mus-scrub-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pi-mus-t {
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.52);
  min-width: 36px;
}
.pi-mus-t:last-child { text-align: right; }
.pi-mus-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
  cursor: pointer;
}
.pi-mus-bar > i {
  display: block;
  height: 100%;
  width: var(--mus-pct, 0%);
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.92);
}

.pi-mus-ctrls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  position: relative;
}
.pi-mus-btn {
  border: none;
  background: transparent;
  color: #FFFFFF;
  padding: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, opacity 0.15s ease;
}
.pi-mus-btn:active { transform: scale(0.86); }
.pi-mus-airplay {
  position: absolute;
  right: 2px;
  color: rgba(255, 255, 255, 0.78);
  display: inline-flex;
}

.pi-mini-canvas { width: 24px; height: 24px; border-radius: 7px; background: #141821; flex-shrink: 0; image-rendering: auto; }
.pi-compact-mid { font-size: 11.5px; font-weight: 600; white-space: nowrap; color: rgba(255, 255, 255, 0.92); }
html[data-device="sim"] .pi-compact-mid { display: none; }
.pi-compact-right { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: #30D158; }
.pi-compact-right.idle { color: #64D2FF; }

.pi-banner-stage { width: 54px; height: 54px; border-radius: 15px; background: #141821; flex-shrink: 0; overflow: hidden; }
.pi-banner-stage canvas { width: 100%; height: 100%; }
.pi-banner-info { flex: 1; min-width: 0; }
.pi-banner-kicker { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: #30D158; }
.pi-banner-title { font-size: 14.5px; font-weight: 700; color: #FFF; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-banner-sub { font-size: 12px; color: rgba(255, 255, 255, 0.64); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-banner-timer { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; color: #30D158; flex-shrink: 0; }

.pi-hig-top { display: flex; align-items: center; justify-content: space-between; height: 20px; }
.pi-hig-leading { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: #30D158; max-width: 118px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-hig-leading.idle { color: #64D2FF; }
.pi-hig-camera-gap { width: 114px; flex-shrink: 0; }
.pi-hig-trailing { font-size: 15.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: #30D158; text-align: right; min-width: 64px; }
.pi-hig-trailing.idle { color: rgba(255, 255, 255, 0.78); font-size: 13px; }

.pi-hig-center { display: flex; align-items: center; gap: 13px; }
.pi-hig-stage { width: 56px; height: 56px; border-radius: 14px; background: #131720; box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.15); flex-shrink: 0; overflow: hidden; }
.pi-hig-stage canvas { width: 100%; height: 100%; }
.pi-hig-body { flex: 1; min-width: 0; }
.pi-hig-title { font-size: 17px; font-weight: 700; color: #FFF; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-hig-sub { font-size: 12.5px; color: rgba(255, 255, 255, 0.62); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-hig-bottom { display: flex; align-items: center; height: 10px; }

#pulse-ios-backdrop { position: absolute; inset: 0; z-index: 19550; background: transparent; pointer-events: none; }
#pulse-ios-backdrop.open { pointer-events: auto; }

/* ============================================================================
   3. NATIVE 4-OS CALENDAR APP (`日历` — Apple Calendar iOS 26 / macOS 27 / Win11)
   ============================================================================ */
/* --- Mobile iOS / Android Calendar --- */
.mcal-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #FFFFFF;
  color: #1C1C1E;
  padding-top: var(--sys-top, 48px);
  box-sizing: border-box;
  overflow: hidden;
}
.mcal-page::before,
.mcal-page::after {
  display: none !important;
}
html[data-appearance="dark"] .mcal-page {
  background: #000000;
  color: #FFFFFF;
}

.mcal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px 6px;
  flex-shrink: 0;
}
.mcal-month-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: #FF3B30;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}
html[data-appearance="dark"] .mcal-month-btn { color: #FF453A; }

.mcal-today-btn {
  border: none;
  background: rgba(255, 59, 48, 0.12);
  color: #FF3B30;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
html[data-appearance="dark"] .mcal-today-btn { background: rgba(255, 69, 58, 0.18); color: #FF453A; }

/* 7-day Week Strip */
.mcal-weekstrip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 4px 10px 8px;
  border-bottom: 0.5px solid rgba(128, 128, 136, 0.24);
  flex-shrink: 0;
}
.mcal-wday {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 2px 0;
  cursor: pointer;
}
.mcal-wday-lbl {
  font-size: 10.5px;
  font-weight: 600;
  opacity: 0.52;
}
.mcal-wday-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.mcal-wday.is-today:not(.sel) .mcal-wday-num { color: #FF3B30; font-weight: 700; }
.mcal-wday.sel .mcal-wday-num {
  background: #1C1C1E;
  color: #FFFFFF;
  font-weight: 700;
}
html[data-appearance="dark"] .mcal-wday.sel .mcal-wday-num {
  background: #FFFFFF;
  color: #000000;
}
.mcal-wday.is-today.sel .mcal-wday-num {
  background: #FF3B30 !important;
  color: #FFFFFF !important;
}
.mcal-wday-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: transparent;
}
.mcal-wday.has-wod .mcal-wday-dot { background: #30D158; }

.mcal-date-banner {
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  opacity: 0.82;
  border-bottom: 0.5px solid rgba(128, 128, 136, 0.18);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 24-Hour Day Timeline */
.mcal-timeline-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  position: relative;
  padding-bottom: calc(var(--sys-bottom, 24px) + 20px);
}
.mcal-timeline-canvas {
  position: relative;
  height: 1140px; /* 19 hours (05:00..24:00) x 60px/hr */
  margin: 10px 12px 16px 0;
}
.mcal-hour-row {
  position: absolute;
  left: 0;
  right: 0;
  height: 60px;
  pointer-events: none;
}
.mcal-hour-lbl {
  position: absolute;
  left: 10px;
  top: -7px;
  width: 38px;
  text-align: right;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  opacity: 0.45;
}
.mcal-hour-line {
  position: absolute;
  left: 56px;
  right: 0;
  top: 0;
  height: 0.5px;
  background: rgba(128, 128, 136, 0.22);
}

/* Iconic Apple Calendar Live Red Current-Time Line */
.mcal-now-line {
  position: absolute;
  left: 52px;
  right: 0;
  height: 2px;
  background: #FF3B30;
  z-index: 25;
  pointer-events: none;
}
.mcal-now-line::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -3.5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #FF3B30;
}
.mcal-now-pill {
  position: absolute;
  left: -46px;
  top: -8px;
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #FF3B30;
}

/* Proportional Event Block on Timeline */
.mcal-ev-block {
  position: absolute;
  left: 60px;
  right: 4px;
  border-radius: 9px;
  border-left: 3.5px solid var(--ev-c, #0A84FF);
  background: var(--ev-bg, rgba(10, 132, 255, 0.14));
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  overflow: hidden;
  z-index: 10;
  transition: filter 0.15s ease, transform 0.12s ease;
}
.mcal-ev-block:hover { filter: brightness(1.06); }
.mcal-ev-block:active { transform: scale(0.99); }
.mcal-ev-block.selected {
  box-shadow: 0 0 0 1.5px var(--ev-c, #0A84FF), 0 6px 16px rgba(0, 0, 0, 0.16);
  z-index: 15;
}
.mcal-ev-main { flex: 1; min-width: 0; }
.mcal-ev-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ev-txt, inherit);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mcal-ev-sub {
  font-size: 11px;
  opacity: 0.75;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mcal-ev-thumb {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #131720;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.18);
}
.mcal-ev-thumb canvas { width: 100%; height: 100%; }

/* Mobile Event Details Page (`日程详情`) */
.mcal-detail-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px calc(var(--sys-bottom, 24px) + 24px);
}
.mcal-det-card {
  border-radius: 16px;
  padding: 15px 16px;
  background: #F2F2F7;
  margin-bottom: 14px;
}
html[data-appearance="dark"] .mcal-det-card { background: #1C1C1E; }

.mcal-det-title { font-size: 21px; font-weight: 800; line-height: 1.25; letter-spacing: -0.3px; }
.mcal-det-calrow { display: flex; align-items: center; gap: 7px; font-size: 13px; opacity: 0.78; margin-top: 8px; }
.mcal-det-calrow i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.mcal-det-timerow {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 0.5px solid rgba(128, 128, 136, 0.22);
  font-size: 13.5px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

/* Pixel Replay Module inside Calendar Event Details */
.mcal-replay-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mcal-replay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mcal-replay-kicker {
  font-size: 12px;
  font-weight: 700;
  color: #30D158;
}
html:not([data-appearance="dark"]) .mcal-replay-kicker { color: #1E9E42; }

.mcal-replay-hero {
  display: flex;
  align-items: center;
  gap: 14px;
}
.mcal-replay-stage {
  width: 84px;
  height: 84px;
  border-radius: 18px;
  background: #121620;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 8px 20px rgba(0, 0, 0, 0.22);
  flex-shrink: 0;
  overflow: hidden;
}
.mcal-replay-stage canvas { width: 100%; height: 100%; }
.mcal-replay-info { flex: 1; min-width: 0; }
.mcal-replay-move { font-size: 16.5px; font-weight: 800; line-height: 1.25; }
.mcal-replay-spec { font-size: 12.5px; opacity: 0.72; margin-top: 3px; line-height: 1.35; }

.mcal-chaps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.mcal-chap-btn {
  border: none;
  border-radius: 10px;
  padding: 7px 6px;
  background: rgba(120, 120, 128, 0.14);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.mcal-chap-btn.active {
  background: rgba(48, 209, 88, 0.18);
  box-shadow: inset 0 0 0 1.2px #30D158;
}
.mcal-chap-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--fill, 0%);
  background: rgba(48, 209, 88, 0.16);
  pointer-events: none;
}
.mcal-chap-btn b { display: block; font-size: 11px; font-weight: 700; position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcal-chap-btn small { display: block; font-size: 9.5px; opacity: 0.65; margin-top: 1px; position: relative; }

.mcal-play-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: none;
  background: #30D158;
  color: #061C0C;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  align-self: flex-start;
}

.mcal-notes-lbl { font-size: 12px; font-weight: 700; opacity: 0.55; margin-bottom: 6px; }
.mcal-notes-txt { font-size: 13px; line-height: 1.55; opacity: 0.85; white-space: pre-line; }

/* --- Desktop macOS 27 Tahoe / Windows 11 Calendar Window --- */
.dcal-win {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: #FFFFFF;
  color: #1D1D1F;
  overflow: hidden;
}
html[data-appearance="dark"] .dcal-win { background: #1E1E22; color: #F5F5F7; }

.dcal-toolbar {
  height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 0.5px solid rgba(128, 128, 136, 0.22);
  flex-shrink: 0;
}
.dcal-tb-left { display: flex; align-items: center; gap: 12px; }
.dcal-tb-title { font-size: 15px; font-weight: 700; }
.dcal-nav-group { display: inline-flex; align-items: center; gap: 4px; }
.dcal-nav-btn {
  height: 26px;
  padding: 0 9px;
  border-radius: 7px;
  border: 0.5px solid rgba(128, 128, 136, 0.28);
  background: rgba(120, 120, 128, 0.08);
  color: inherit;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.dcal-nav-btn:hover { background: rgba(120, 120, 128, 0.16); }

.dcal-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 196px 1fr 296px;
}

.dcal-sidebar {
  padding: 14px 12px;
  border-right: 0.5px solid rgba(128, 128, 136, 0.20);
  background: rgba(120, 120, 128, 0.05);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dcal-mini-month-title { font-size: 12.5px; font-weight: 700; margin-bottom: 6px; padding: 0 4px; }
.dcal-mini-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
  font-size: 11px;
}
.dcal-mini-hdr { opacity: 0.45; font-size: 10px; font-weight: 600; padding-bottom: 3px; }
.dcal-mini-day {
  height: 24px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dcal-mini-day.today { color: #FF3B30; font-weight: 700; }
.dcal-mini-day.sel { background: #FF3B30; color: #FFF !important; font-weight: 700; }
.dcal-mini-day.has-wod::after {
  content: "";
  position: absolute;
  bottom: 1.5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #30D158;
}

.dcal-cal-group { display: flex; flex-direction: column; gap: 7px; font-size: 12px; padding: 0 4px; }
.dcal-cal-group-hd { font-size: 11px; font-weight: 700; opacity: 0.5; }
.dcal-cal-item { display: flex; align-items: center; gap: 7px; font-weight: 500; }
.dcal-cal-item i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

.dcal-center {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.dcal-inspector {
  border-left: 0.5px solid rgba(128, 128, 136, 0.20);
  padding: 15px 14px;
  overflow-y: auto;
  background: rgba(120, 120, 128, 0.03);
}
.dcal-inspector .mcal-det-card { margin-bottom: 12px; padding: 13px; }
.dcal-inspector .mcal-det-title { font-size: 16.5px; }
.dcal-inspector .mcal-chaps { grid-template-columns: repeat(2, 1fr); }

/* Optional ?demo=pulse bar */
#pulse-demo-dock {
  position: fixed;
  left: 14px;
  top: 40px;
  z-index: 20500;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  max-width: min(490px, calc(100vw - 28px));
  padding: 7px 9px;
  border-radius: 16px;
  background: rgba(18, 20, 26, 0.84);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 0.5px solid rgba(255, 255, 255, 0.18);
  color: #F5F5F7;
  font-size: 11.5px;
}
html[data-os="ios"] #pulse-demo-dock,
html[data-os="android"] #pulse-demo-dock {
  top: auto; left: 10px; right: 10px; max-width: none;
  bottom: calc(max(env(safe-area-inset-bottom), 10px) + 204px);
  justify-content: center;
}
#pulse-demo-dock.mini { right: auto; padding: 5px 10px; border-radius: 999px; }
html[data-os="ios"] #pulse-demo-dock.mini, html[data-os="android"] #pulse-demo-dock.mini {
  left: auto; right: 12px; bottom: calc(max(env(safe-area-inset-bottom), 10px) + 112px);
}
#pulse-demo-dock.mini .pd-full { display: none; }
#pulse-demo-dock:not(.mini) .pd-mini-only { display: none; }
.pd-chip { height: 26px; padding: 0 9px; border-radius: 8px; border: 0.5px solid rgba(255,255,255,.14); background: rgba(255,255,255,.08); color: #F5F5F7; font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; }
.pd-chip.on { background: #30D158; border-color: #30D158; color: #071B0C; font-weight: 700; }
.pd-chip.ip.on { background: #FF9F0A; border-color: #FF9F0A; color: #1F1100; }
.pd-sep { width: 1px; height: 16px; background: rgba(255,255,255,.16); margin: 0 2px; }
