:root {
  --sleepy-slider-start: #a9b7ed;
  --sleepy-slider-middle: #aaa0e8;
  --sleepy-slider-end: #69cbb5;
  --sleepy-safe-top: env(safe-area-inset-top, 0px);
}

/* Keep every native iPhone surface at the device viewport size.
   iOS zooms focused form controls whose computed font is below 16px. */
html,
body,
#root,
.cl-app.is-native,
.cl-phone.is-native {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

html,
body {
  overscroll-behavior-x: none;
}

button,
[role="button"],
input,
select,
textarea {
  touch-action: manipulation;
}

input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  font-size: 16px !important;
}

.cl-sheet-backdrop,
.cl-summary-page,
.cl-sounds-page,
.cl-membership-page,
.cl-compliance-backdrop,
.sleepy-support-chat-layer,
.sleepy-rhythm-layer,
.sleepy-rhythm-page {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.cl-sheet,
.sleepy-rhythm-scroll,
.sleepy-support-chat-body {
  max-width: 100%;
  overscroll-behavior-x: none;
}

@supports (width: 100dvw) {
  .cl-sheet-backdrop,
  .cl-summary-page,
  .cl-sounds-page,
  .cl-membership-page,
  .cl-compliance-backdrop,
  .sleepy-support-chat-layer,
  .sleepy-rhythm-layer,
  .sleepy-rhythm-page {
    max-width: 100dvw;
  }
}

:root.sleepy-iphone-preview {
  --sleepy-safe-top: 59px;
}

/* The hackathon build has no membership or purchase surface. */
.cl-plus-card,
.cl-membership-page,
.cl-summary-gift,
.cl-free-promise,
.cl-plus-preview-note,
.cl-plus-terms {
  display: none !important;
}

.cl-choice-row.sleepy-source-options {
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  position: absolute !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.sleepy-slider-control {
  margin-top: 30px;
  padding: 22px 20px 18px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 30px;
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 225, 239, 0.72), transparent 35%),
    linear-gradient(145deg, rgba(238, 235, 255, 0.96), rgba(232, 249, 245, 0.96));
  box-shadow: 0 16px 34px rgba(52, 68, 91, 0.11);
}

.sleepy-slider-readout {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.sleepy-slider-face {
  width: 66px;
  height: 66px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 9px 20px rgba(53, 68, 91, 0.09);
}

.sleepy-slider-face .sleepy-mood-head {
  width: 132px !important;
  max-width: none !important;
  height: 132px !important;
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  object-fit: contain;
  filter: drop-shadow(0 8px 11px rgba(78, 72, 150, 0.16));
  animation: none !important;
}

/* The homepage keeps the original high-resolution mascot still until its body is tapped. */
.cl-kalo-hero .cl-kalo.sleepy-home-interactive > img {
  width: 430px !important;
  height: 645px !important;
  opacity: 1 !important;
  cursor: pointer;
  animation: none !important;
  transform: translateY(4px);
  filter: drop-shadow(0 16px 18px rgba(81, 73, 151, 0.2));
  -webkit-user-select: none;
  user-select: none;
}

.cl-kalo-hero .cl-kalo.sleepy-home-reacting > img {
  animation: sleepy-home-tap 660ms cubic-bezier(0.22, 0.9, 0.3, 1.2) both !important;
}

@keyframes sleepy-home-tap {
  0%, 100% { transform: translateY(4px) rotate(0deg) scale(1); }
  24% { transform: translateY(-8px) rotate(-2.2deg) scale(1.025, 0.985); }
  52% { transform: translateY(5px) rotate(1.7deg) scale(0.985, 1.02); }
  76% { transform: translateY(-3px) rotate(-0.8deg) scale(1.01); }
}

@media (max-height: 720px) {
  .cl-kalo-hero .cl-kalo.sleepy-home-interactive > img {
    width: 390px !important;
    height: 585px !important;
  }
}

.sleepy-slider-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.sleepy-slider-copy strong {
  color: #27354a;
  font-family: Georgia, "PingFang SC", serif;
  font-size: 23px;
  line-height: 1.1;
}

.sleepy-slider-copy small {
  color: #7769df;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.sleepy-range-wrap {
  margin-top: 18px;
  position: relative;
}

.sleepy-range-wrap::before {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 50%;
  height: 9px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sleepy-slider-start), var(--sleepy-slider-middle), var(--sleepy-slider-end));
  box-shadow: inset 0 1px 2px rgba(41, 54, 76, 0.12);
  pointer-events: none;
}

.sleepy-range {
  width: 100%;
  height: 34px;
  margin: 0;
  position: relative;
  z-index: 1;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  background: transparent;
  touch-action: pan-x;
}

.sleepy-range::-webkit-slider-runnable-track {
  height: 9px;
  border-radius: 999px;
  background: transparent;
}

.sleepy-range::-webkit-slider-thumb {
  width: 31px;
  height: 31px;
  margin-top: -11px;
  appearance: none;
  -webkit-appearance: none;
  border: 5px solid #ffffff;
  border-radius: 50%;
  background: #6659e7;
  box-shadow: 0 5px 13px rgba(48, 57, 112, 0.32);
}

.sleepy-range:focus-visible::-webkit-slider-thumb {
  outline: 3px solid rgba(102, 89, 231, 0.25);
  outline-offset: 3px;
}

.sleepy-slider-ends {
  margin-top: 2px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: #7c8798;
  font-size: 10px;
  font-weight: 800;
}

.sleepy-slider-ends span:last-child {
  text-align: right;
}

.sleepy-slider-continue {
  width: 100%;
  min-height: 52px;
  margin-top: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 24px;
  background: linear-gradient(120deg, #4bcbb7, #6d68eb);
  box-shadow: 0 10px 22px rgba(80, 123, 192, 0.29);
  font-size: 14px;
  font-weight: 850;
}

@media (max-height: 720px) {
  .sleepy-slider-control {
    margin-top: 18px;
    padding-top: 16px;
  }

  .sleepy-slider-readout {
    min-height: 68px;
  }
}

/* Keyword-first reflection summary and supportive local conversation. */
.cl-summary-page.sleepy-keyword-summary-ready .cl-summary-main,
.cl-summary-page.sleepy-keyword-summary-ready .cl-summary-dream,
.cl-summary-page.sleepy-keyword-summary-ready .cl-summary-encourage {
  display: none !important;
}

.cl-summary-page.sleepy-keyword-summary-ready > .cl-kalo.small {
  display: none !important;
}

.cl-summary-page.sleepy-keyword-summary-ready > .cl-kalo.small img {
  width: 360px;
  max-width: none;
  height: auto;
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  animation: none;
}

.cl-summary-page.sleepy-keyword-summary-ready > .cl-kalo.small .cl-kalo-hello {
  display: none !important;
}

.sleepy-keyword-insights {
  height: 420px;
  margin: 18px -20px 0;
  position: relative;
  z-index: 3;
  pointer-events: none;
}

.sleepy-keyword-cloud {
  width: 100%;
  height: 100%;
  position: relative;
  isolation: isolate;
}

.sleepy-keyword-bubble {
  --bubble-a: rgba(247, 245, 255, 0.64);
  --bubble-b: rgba(202, 214, 247, 0.36);
  --bubble-c: rgba(232, 205, 239, 0.24);
  --bubble-rim: rgba(255, 255, 255, 0.72);
  --bubble-ink: #524b9d;
  --bubble-x: 0px;
  --bubble-y: 0px;
  --bubble-rotate: 0deg;
  --bubble-float-x: 3px;
  --bubble-float-y: -7px;
  --bubble-back-x: -2px;
  --bubble-float-duration: 10.5s;
  width: 118px;
  height: 88px;
  padding: 14px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  overflow: hidden;
  z-index: 1;
  pointer-events: auto;
  color: var(--bubble-ink);
  border: 1px solid var(--bubble-rim);
  border-radius: 52% 48% 55% 45% / 48% 54% 46% 52%;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.58) 0 8%, transparent 31%),
    radial-gradient(circle at 76% 78%, var(--bubble-c), transparent 58%),
    linear-gradient(145deg, var(--bubble-a), rgba(255, 255, 255, 0.54) 48%, var(--bubble-b));
  box-shadow:
    inset 5px 6px 16px rgba(255, 255, 255, 0.28),
    inset -5px -6px 14px rgba(118, 132, 196, 0.05),
    0 9px 20px rgba(86, 94, 154, 0.08);
  -webkit-backdrop-filter: blur(9px) saturate(1.04);
  backdrop-filter: blur(9px) saturate(1.04);
  transform: translate(var(--bubble-x), var(--bubble-y)) rotate(var(--bubble-rotate));
  transition: transform 180ms ease, filter 180ms ease, opacity 180ms ease, color 180ms ease, background 180ms ease, box-shadow 180ms ease;
  animation:
    sleepyBubbleIn 560ms cubic-bezier(0.2, 0.9, 0.3, 1.08) var(--bubble-delay) both,
    sleepyBubbleFloat var(--bubble-float-duration) ease-in-out calc(700ms + var(--bubble-delay)) infinite;
}

.sleepy-keyword-bubble::before {
  content: "";
  position: absolute;
  inset: 1px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: inherit;
  background: transparent;
  pointer-events: none;
}

.sleepy-keyword-bubble::after {
  content: "";
  width: 36%;
  height: 18%;
  position: absolute;
  top: 10%;
  left: 16%;
  transform: rotate(-14deg);
  border-radius: 50%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0));
  filter: blur(2px);
  pointer-events: none;
}

.sleepy-keyword-bubble:active {
  transform: translate(var(--bubble-x), var(--bubble-y)) rotate(var(--bubble-rotate)) scale(0.95);
  filter: saturate(1.08);
}

.sleepy-keyword-bubble.is-muted {
  opacity: 0.42;
  filter: blur(0.4px) saturate(0.76);
}

.sleepy-keyword-bubble.is-selected {
  z-index: 8;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.32);
  background: linear-gradient(145deg, rgba(83, 73, 159, 0.96), rgba(40, 56, 93, 0.98));
  box-shadow: 0 14px 30px rgba(39, 45, 89, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  animation-play-state: paused;
  transform: translate(var(--bubble-x), var(--bubble-y)) rotate(var(--bubble-rotate)) scale(1.04);
}

.sleepy-keyword-bubble.is-selected > strong {
  text-shadow: none;
}

.sleepy-keyword-bubble:focus-visible {
  outline: 3px solid rgba(92, 82, 204, 0.26);
  outline-offset: 3px;
}

.sleepy-keyword-bubble.size-1 {
  width: 104px;
  height: 78px;
}

.sleepy-keyword-bubble.size-2 {
  width: 112px;
  height: 84px;
}

.sleepy-keyword-bubble.size-3 {
  width: 120px;
  height: 90px;
}

.sleepy-keyword-bubble.size-4 {
  width: 128px;
  height: 96px;
}

.sleepy-keyword-bubble > strong {
  position: relative;
  z-index: 2;
  max-width: 132px;
  font-size: 14px;
  font-weight: 760;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-align: center;
  text-shadow: 0 1px 4px rgba(255, 255, 255, 0.92);
}

.sleepy-keyword-bubble:nth-child(2n) { --bubble-float-x: -4px; border-radius: 55% 45% 49% 51% / 47% 56% 44% 53%; }
.sleepy-keyword-bubble:nth-child(3n) { border-radius: 47% 53% 56% 44% / 54% 46% 54% 46%; }
.sleepy-keyword-bubble:nth-child(4n) { border-radius: 53% 47% 45% 55% / 46% 55% 45% 54%; }
.sleepy-keyword-bubble:nth-child(1) { width: 148px; height: 104px; top: 7px; left: -18px; --bubble-x: 7px; --bubble-y: 5px; --bubble-rotate: -9deg; --bubble-float-duration: 9.8s; }
.sleepy-keyword-bubble:nth-child(2) { width: 158px; height: 108px; top: -1px; right: -18px; --bubble-x: -4px; --bubble-y: -2px; --bubble-rotate: 7deg; --bubble-float-duration: 12.4s; }
.sleepy-keyword-bubble:nth-child(3) { width: 142px; height: 98px; top: 96px; left: 19px; --bubble-x: -3px; --bubble-y: -5px; --bubble-rotate: 6deg; --bubble-float-x: 5px; --bubble-float-duration: 10.8s; }
.sleepy-keyword-bubble:nth-child(4) { width: 160px; height: 106px; top: 89px; right: -23px; --bubble-x: 3px; --bubble-y: 6px; --bubble-rotate: -7deg; --bubble-float-duration: 13.2s; }
.sleepy-keyword-bubble:nth-child(5) { width: 154px; height: 106px; top: 187px; left: -16px; --bubble-x: 8px; --bubble-y: -4px; --bubble-rotate: -6deg; --bubble-float-duration: 11.6s; }
.sleepy-keyword-bubble:nth-child(6) { width: 166px; height: 112px; top: 181px; right: 8px; --bubble-x: -6px; --bubble-y: 2px; --bubble-rotate: 7deg; --bubble-float-y: -9px; --bubble-float-duration: 9.4s; }
.sleepy-keyword-bubble:nth-child(7) { width: 150px; height: 102px; top: 287px; left: 18px; --bubble-x: 3px; --bubble-rotate: 6deg; --bubble-float-x: 6px; --bubble-float-duration: 12.8s; }
.sleepy-keyword-bubble:nth-child(8) { width: 158px; height: 108px; top: 278px; right: -20px; --bubble-x: -3px; --bubble-rotate: -8deg; --bubble-float-duration: 10.2s; }

.cl-summary-page.sleepy-keyword-summary-ready .cl-summary-excerpts {
  margin: -10px -4px 0;
  padding: 24px 4px 0;
  position: relative;
  z-index: 4;
  background: linear-gradient(180deg, rgba(248, 249, 252, 0), rgba(248, 249, 252, 0.94) 46px, #f8f9fc 82px);
}

.cl-summary-page.sleepy-keyword-summary-ready .cl-summary-excerpts.sleepy-excerpts-collapsible {
  display: none;
}

.cl-summary-page.sleepy-keyword-summary-ready .cl-summary-excerpts.sleepy-excerpts-collapsible.is-open {
  display: block;
}

.sleepy-excerpts-toggle {
  width: calc(100% - 8px);
  min-height: 58px;
  margin: -13px 4px 18px;
  padding: 14px 19px;
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #5f54c5;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 30px rgba(61, 72, 111, 0.14);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font-size: 13px;
  font-weight: 850;
}

.sleepy-excerpts-toggle:not(.is-open) {
  margin-top: 28px;
  margin-bottom: 22px;
}

.sleepy-excerpts-toggle.is-open {
  margin-top: -13px;
}

.sleepy-excerpts-toggle i {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  color: #6659d5;
  border-radius: 50%;
  background: rgba(112, 99, 221, 0.1);
  font-size: 17px;
  font-style: normal;
  line-height: 1;
  transform: translateY(-1px);
  transition: transform 180ms ease;
}

.sleepy-excerpts-toggle.is-open i {
  transform: translateY(1px) rotate(180deg);
}

/* “Recent words” on the trend page stays compact until the user asks to read it. */
.cl-reflection-list.sleepy-collapsible > article {
  display: none;
}

.cl-reflection-list.sleepy-collapsible.is-open > article {
  display: block;
  animation: sleepy-picker-arrive 220ms ease-out both;
}

.sleepy-reflection-toggle {
  padding: 5px 5px 5px 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #7f899b;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 750;
}

.sleepy-reflection-toggle i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #675bd7;
  border-radius: 50%;
  background: rgba(107, 92, 222, 0.1);
  font-size: 17px;
  font-style: normal;
  line-height: 1;
  transition: transform 180ms ease;
}

.sleepy-reflection-toggle.is-open i {
  transform: rotate(180deg);
}

.sleepy-keyword-bubble.tone-violet { --bubble-a: rgba(247, 242, 255, 0.48); --bubble-b: rgba(190, 190, 241, 0.38); --bubble-c: rgba(231, 184, 229, 0.28); --bubble-rim: rgba(151, 119, 216, 0.32); --bubble-ink: #5c4d9c; }
.sleepy-keyword-bubble.tone-indigo { --bubble-a: rgba(241, 244, 255, 0.48); --bubble-b: rgba(176, 196, 239, 0.39); --bubble-c: rgba(208, 190, 236, 0.28); --bubble-rim: rgba(113, 137, 211, 0.32); --bubble-ink: #4e609b; }
.sleepy-keyword-bubble.tone-blue { --bubble-a: rgba(240, 250, 255, 0.48); --bubble-b: rgba(167, 212, 235, 0.38); --bubble-c: rgba(199, 191, 235, 0.27); --bubble-rim: rgba(95, 169, 204, 0.31); --bubble-ink: #426f92; }
.sleepy-keyword-bubble.tone-rose { --bubble-a: rgba(255, 244, 249, 0.48); --bubble-b: rgba(239, 186, 210, 0.37); --bubble-c: rgba(193, 202, 242, 0.27); --bubble-rim: rgba(211, 118, 166, 0.3); --bubble-ink: #965373; }
.sleepy-keyword-bubble.tone-amber { --bubble-a: rgba(255, 249, 238, 0.48); --bubble-b: rgba(240, 205, 164, 0.36); --bubble-c: rgba(224, 192, 232, 0.26); --bubble-rim: rgba(204, 155, 93, 0.3); --bubble-ink: #8f683b; }
.sleepy-keyword-bubble.tone-mint { --bubble-a: rgba(240, 255, 251, 0.48); --bubble-b: rgba(168, 224, 211, 0.37); --bubble-c: rgba(185, 204, 240, 0.27); --bubble-rim: rgba(87, 177, 159, 0.3); --bubble-ink: #397b70; }
.sleepy-keyword-bubble.tone-green { --bubble-a: rgba(246, 255, 242, 0.48); --bubble-b: rgba(194, 224, 175, 0.37); --bubble-c: rgba(188, 214, 237, 0.27); --bubble-rim: rgba(121, 174, 102, 0.29); --bubble-ink: #587c4e; }
.sleepy-keyword-bubble.tone-cyan { --bubble-a: rgba(240, 255, 255, 0.48); --bubble-b: rgba(159, 220, 222, 0.37); --bubble-c: rgba(193, 191, 235, 0.27); --bubble-rim: rgba(78, 173, 177, 0.3); --bubble-ink: #397b7d; }
.sleepy-keyword-bubble.tone-orange { --bubble-a: rgba(255, 248, 241, 0.48); --bubble-b: rgba(239, 197, 171, 0.37); --bubble-c: rgba(222, 191, 228, 0.26); --bubble-rim: rgba(207, 139, 99, 0.3); --bubble-ink: #915d40; }
.sleepy-keyword-bubble.tone-pink { --bubble-a: rgba(255, 243, 250, 0.48); --bubble-b: rgba(234, 181, 213, 0.37); --bubble-c: rgba(188, 206, 241, 0.27); --bubble-rim: rgba(205, 111, 170, 0.3); --bubble-ink: #925278; }
.sleepy-keyword-bubble.tone-lavender { --bubble-a: rgba(248, 245, 255, 0.48); --bubble-b: rgba(201, 193, 239, 0.38); --bubble-c: rgba(226, 185, 226, 0.26); --bubble-rim: rgba(145, 124, 211, 0.31); --bubble-ink: #5f559b; }

@keyframes sleepyBubbleIn {
  from { opacity: 0; transform: translate(var(--bubble-x), calc(var(--bubble-y) + 14px)) rotate(var(--bubble-rotate)) scale(0.9); }
  to { opacity: 1; transform: translate(var(--bubble-x), var(--bubble-y)) rotate(var(--bubble-rotate)) scale(1); }
}

@keyframes sleepyBubbleFloat {
  0%, 100% { translate: 0 0; }
  38% { translate: var(--bubble-float-x) var(--bubble-float-y); }
  72% { translate: var(--bubble-back-x) 3px; }
}

body.sleepy-support-chat-open {
  overflow: hidden !important;
}

.sleepy-support-chat-layer {
  position: fixed;
  z-index: 10020;
  inset: 0;
  height: 100dvh;
  max-height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  color: #253249;
  background:
    radial-gradient(circle at 88% 4%, rgba(185, 171, 245, 0.38), transparent 29%),
    radial-gradient(circle at 5% 46%, rgba(141, 221, 209, 0.24), transparent 32%),
    linear-gradient(165deg, #f8f7ff 0%, #f2f8f8 58%, #f8f3f7 100%);
  animation: sleepyChatIn 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes sleepyChatIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.sleepy-support-chat-header {
  min-height: 124px;
  padding: max(58px, var(--sleepy-safe-top)) 18px 13px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(96, 103, 135, 0.08);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(22px);
}

.sleepy-support-chat-back {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #6256ca;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 6px 15px rgba(75, 73, 121, 0.09);
  font-size: 31px;
  font-weight: 300;
  line-height: 1;
}

.sleepy-support-chat-header > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sleepy-support-chat-header small {
  color: #7b70d6;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sleepy-support-chat-header strong {
  overflow: hidden;
  font-family: Georgia, "PingFang SC", serif;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sleepy-support-chat-header > span {
  padding: 6px 9px;
  color: #438e7d;
  border-radius: 999px;
  background: #ddf4ed;
  font-size: 9px;
  font-weight: 850;
}

.sleepy-support-chat-body {
  min-height: 0;
  padding: 16px 16px 12px;
  overflow-y: auto;
}

.sleepy-support-chat-intro {
  margin-bottom: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 10px 22px rgba(76, 80, 116, 0.08);
}

.sleepy-pet-sprite {
  display: inline-block;
  flex: 0 0 auto;
  aspect-ratio: 192 / 208;
  background-repeat: no-repeat;
  background-size: 800% 1100%;
  background-color: transparent;
  image-rendering: auto;
}

.sleepy-support-chat-intro img,
.sleepy-support-chat-intro .sleepy-pet-sprite {
  width: 50px;
  height: 54px;
  object-fit: contain;
}

.sleepy-support-chat-intro div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sleepy-support-chat-intro small {
  color: #766ad7;
  font-size: 9px;
  font-weight: 850;
}

.sleepy-support-chat-intro strong {
  font-size: 14px;
}

.sleepy-support-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sleepy-support-chat-layer.is-thinking .sleepy-support-messages::after {
  content: "Sleepy 正在想一想…";
  align-self: flex-start;
  margin-left: 46px;
  padding: 9px 12px;
  color: #7770a8;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 700;
}

.sleepy-support-message {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.sleepy-support-message.user {
  justify-content: flex-end;
}

.sleepy-support-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  padding: 0;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(237, 232, 255, 0.92), rgba(219, 247, 240, 0.94));
  box-shadow: 0 7px 15px rgba(74, 73, 118, 0.12);
}

.sleepy-support-message p {
  max-width: 84%;
  margin: 0;
  padding: 12px 14px;
  color: #46546a;
  border-radius: 8px 20px 20px 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 20px rgba(67, 73, 105, 0.08);
  font-size: 13px;
  font-weight: 590;
  line-height: 1.65;
  white-space: pre-wrap;
}

.sleepy-support-message.user p {
  color: #fff;
  border-radius: 20px 8px 20px 20px;
  background: linear-gradient(135deg, #7669dc, #5d80d6);
}

.sleepy-support-paths {
  margin: 16px 0 10px 46px;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sleepy-support-paths::-webkit-scrollbar {
  display: none;
}

.sleepy-support-paths button {
  flex: 0 0 auto;
  padding: 9px 12px;
  color: #665ac5;
  border: 1px solid rgba(104, 91, 199, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  font-size: 10px;
  font-weight: 820;
}

.sleepy-support-boundary {
  margin: 10px 10px 4px 46px;
  color: #8a94a4;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.55;
}

.sleepy-support-composer {
  padding: 11px 14px max(12px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: end;
  gap: 9px;
  position: sticky;
  z-index: 3;
  bottom: 0;
  border-top: 1px solid rgba(96, 103, 135, 0.08);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(22px);
}

.sleepy-support-composer textarea {
  min-height: 44px;
  max-height: 104px;
  padding: 12px 14px;
  resize: none;
  color: #344156;
  border: 1px solid rgba(92, 102, 131, 0.12);
  border-radius: 20px;
  outline: none;
  background: #f5f6fb;
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
}

.sleepy-support-composer textarea:focus {
  border-color: rgba(103, 91, 207, 0.38);
  box-shadow: 0 0 0 3px rgba(103, 91, 207, 0.08);
}

.sleepy-support-composer button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 17px;
  background: linear-gradient(145deg, #6d62da, #50c6b1);
  box-shadow: 0 8px 18px rgba(92, 93, 191, 0.25);
  font-size: 20px;
  font-weight: 900;
}

/* Sleep Rhythm Light — hackathon sound-and-light demo. */
.sleepy-rhythm-card {
  width: 100%;
  min-height: 126px;
  margin: 14px 0 4px;
  padding: 18px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 14px;
  text-align: left;
  color: #243249;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 28px;
  background:
    radial-gradient(circle at 8% 18%, rgba(255, 196, 145, 0.58), transparent 32%),
    radial-gradient(circle at 92% 92%, rgba(112, 105, 231, 0.27), transparent 40%),
    linear-gradient(135deg, #fff4e6, #efeaff 62%, #e5f7f3);
  box-shadow: 0 15px 34px rgba(68, 70, 120, 0.13);
}

.sleepy-rhythm-card-icon {
  width: 74px;
  height: 74px;
  position: relative;
  display: grid;
  place-items: center;
  color: #6c5fe0;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 #fff, 0 10px 24px rgba(101, 87, 173, 0.16);
}

.sleepy-rhythm-card-icon svg {
  width: 50px;
  height: 50px;
}

.sleepy-rhythm-card-icon i {
  width: 12px;
  height: 12px;
  position: absolute;
  right: 8px;
  top: 8px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #5fc9ae;
  box-shadow: 0 0 14px #5fc9ae;
}

.sleepy-rhythm-card-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sleepy-rhythm-card-copy small,
.sleepy-section-heading small {
  color: #7163db;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sleepy-rhythm-card-copy strong {
  font-family: Georgia, "PingFang SC", serif;
  font-size: 21px;
  line-height: 1.15;
}

.sleepy-rhythm-card-copy em {
  color: #6f7c90;
  font-size: 11px;
  font-style: normal;
  font-weight: 650;
  line-height: 1.45;
}

.sleepy-rhythm-card-arrow {
  color: #6b61cf;
  font-size: 29px;
  font-weight: 300;
}

body.sleepy-rhythm-open {
  overflow: hidden;
}

.sleepy-rhythm-layer {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: flex;
  justify-content: center;
  background: rgba(19, 25, 43, 0.36);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.sleepy-rhythm-page {
  width: min(100%, 520px);
  height: 100%;
  position: relative;
  overflow: hidden;
  color: #253249;
  background: #f3f4f8;
  box-shadow: 0 0 70px rgba(12, 17, 35, 0.28);
}

.sleepy-rhythm-header {
  height: calc(68px + var(--sleepy-safe-top));
  padding: calc(10px + var(--sleepy-safe-top)) 16px 10px;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  background: rgba(247, 247, 250, 0.86);
  border-bottom: 1px solid rgba(66, 73, 98, 0.08);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.sleepy-rhythm-header > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sleepy-rhythm-header small {
  color: #8175df;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.sleepy-rhythm-header strong {
  margin-top: 2px;
  overflow: hidden;
  color: #253249;
  font-family: Georgia, "PingFang SC", serif;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sleepy-rhythm-close {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #4f596b;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(44, 52, 75, 0.08);
  font-size: 27px;
  font-weight: 300;
  line-height: 1;
}

.sleepy-demo-connection {
  max-width: 130px;
  min-height: 34px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #7b8493;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 8px;
  font-weight: 850;
}

.sleepy-demo-connection i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #aab0bb;
}

.sleepy-demo-connection.connected {
  color: #397f6f;
}

.sleepy-demo-connection.connected i {
  background: #53c3a8;
  box-shadow: 0 0 10px rgba(83, 195, 168, 0.8);
}

.sleepy-rhythm-scroll {
  height: calc(100% - 68px - var(--sleepy-safe-top));
  padding: 0 16px calc(36px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sleepy-rhythm-hero {
  margin: 0 -16px;
  padding: 28px 24px 24px;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(circle at 18% 15%, rgba(255, 176, 112, 0.42), transparent 32%),
    radial-gradient(circle at 86% 28%, rgba(124, 113, 234, 0.44), transparent 34%),
    linear-gradient(155deg, #252a49, #383760 58%, #213e4a);
}

.sleepy-rhythm-hero > small {
  color: rgba(255, 255, 255, 0.6);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.sleepy-rhythm-hero h1 {
  margin: 7px 0 6px;
  color: #fff;
  font-family: Georgia, "PingFang SC", serif;
  font-size: 30px;
  font-weight: 650;
}

.sleepy-rhythm-hero p {
  max-width: 390px;
  margin: 0 auto;
  color: rgba(239, 240, 251, 0.7);
  font-size: 11px;
  line-height: 1.55;
}

.sleepy-lamp-scene {
  --lamp-rgb: 255, 178, 105;
  --lamp-power: 0.72;
  width: 190px;
  height: 154px;
  margin: -4px auto 6px;
  position: relative;
  display: grid;
  place-items: center;
}

.sleepy-lamp-halo {
  width: 154px;
  height: 124px;
  position: absolute;
  top: 3px;
  border-radius: 50%;
  opacity: calc(0.16 + var(--lamp-power) * 0.84);
  background: radial-gradient(circle, rgba(var(--lamp-rgb), 0.9), rgba(var(--lamp-rgb), 0.2) 48%, transparent 72%);
  filter: blur(8px);
  transform: scale(calc(0.84 + var(--lamp-power) * 0.28));
  transition: 900ms ease;
}

.sleepy-lamp {
  width: 98px;
  height: 112px;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 48px 48px 31px 31px;
  background:
    radial-gradient(circle at 45% 31%, rgba(255, 255, 255, 0.92), transparent 14%),
    linear-gradient(160deg, rgba(var(--lamp-rgb), calc(0.32 + var(--lamp-power) * 0.68)), rgba(var(--lamp-rgb), calc(0.08 + var(--lamp-power) * 0.48)));
  box-shadow:
    inset 10px 4px 22px rgba(255, 255, 255, 0.34),
    inset -12px -15px 27px rgba(31, 26, 67, 0.2),
    0 0 calc(14px + var(--lamp-power) * 34px) rgba(var(--lamp-rgb), calc(var(--lamp-power) * 0.7));
  transition: 700ms ease;
}

.sleepy-lamp::before {
  content: "";
  width: 74px;
  height: 10px;
  position: absolute;
  left: 12px;
  bottom: -8px;
  border-radius: 0 0 12px 12px;
  background: #242743;
}

.sleepy-lamp span {
  width: 35px;
  height: 4px;
  position: absolute;
  left: 31px;
  bottom: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
}

.sleepy-lamp i {
  width: 5px;
  height: 5px;
  position: absolute;
  right: 12px;
  bottom: 11px;
  border-radius: 50%;
  background: #70e1c4;
  box-shadow: 0 0 8px #70e1c4;
}

.sleepy-lamp-shadow {
  width: 100px;
  height: 18px;
  position: absolute;
  bottom: 7px;
  border-radius: 50%;
  opacity: calc(0.22 + var(--lamp-power) * 0.32);
  background: #090d22;
  filter: blur(7px);
}

.sleepy-lamp-scene[data-mode="morning"][data-stage="3"] .sleepy-lamp,
.sleepy-lamp-scene[data-mode="morning"][data-stage="3"] .sleepy-lamp-halo {
  animation: sleepy-lamp-pulse 1.5s ease-in-out infinite alternate;
}

@keyframes sleepy-lamp-pulse {
  from { filter: saturate(0.9); transform: scale(0.98); }
  to { filter: saturate(1.25); transform: scale(1.03); }
}

.sleepy-live-readout {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.sleepy-live-readout span {
  min-width: 104px;
  padding: 8px 10px;
  color: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 9px;
  font-weight: 700;
}

.sleepy-live-readout b {
  color: #fff;
  font-size: 15px;
}

.sleepy-mode-tabs {
  margin: 16px 0;
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 19px;
  background: #e4e6ed;
}

.sleepy-mode-tabs button {
  min-height: 42px;
  color: #747e90;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 850;
}

.sleepy-mode-tabs button.active {
  color: #5549ca;
  background: #fff;
  box-shadow: 0 5px 14px rgba(55, 63, 94, 0.11);
}

.sleepy-ai-plan,
.sleepy-ai-signals,
.sleepy-schedule-card,
.sleepy-content-section,
.sleepy-shortcuts-card,
.sleepy-curve-section,
.sleepy-hardware-card {
  margin-top: 13px;
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 9px 24px rgba(49, 57, 81, 0.07);
}

.sleepy-ai-plan {
  padding: 17px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(135deg, #eeeaff, #ecf8f5);
}

.sleepy-ai-spark {
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 13px;
  background: linear-gradient(145deg, #7568e4, #53c8af);
  box-shadow: 0 7px 15px rgba(101, 92, 208, 0.25);
}

.sleepy-ai-plan small {
  color: #6256cc;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.sleepy-ai-plan p {
  margin: 5px 0 0;
  color: #526078;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.55;
}

.sleepy-schedule-card,
.sleepy-content-section,
.sleepy-shortcuts-card,
.sleepy-curve-section,
.sleepy-hardware-card {
  padding: 17px;
}

.sleepy-ai-signals {
  padding: 14px;
}

.sleepy-ai-signals > small {
  color: #7163db;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.sleepy-ai-signals > div {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.sleepy-ai-signals span {
  min-width: 0;
  padding: 10px 7px;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  column-gap: 5px;
  border-radius: 14px;
  background: #f3f3f8;
}

.sleepy-ai-signals i {
  grid-row: 1 / 3;
  color: #6b60da;
  font-size: 16px;
  font-style: normal;
}

.sleepy-ai-signals em {
  overflow: hidden;
  color: #8992a1;
  font-size: 7px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sleepy-ai-signals strong {
  color: #344158;
  font-family: Georgia, "PingFang SC", serif;
  font-size: 12px;
}

.sleepy-schedule-setting {
  padding-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #edf0f4;
}

.sleepy-time-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.sleepy-schedule-setting small {
  color: #7e8899;
  font-size: 9px;
  font-weight: 800;
}

.sleepy-time-display {
  min-width: 142px;
  padding: 8px 10px 8px 8px;
  display: grid;
  grid-template-columns: 30px auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  color: #28354a;
  border: 1px solid rgba(126, 113, 233, 0.13);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(142, 121, 239, 0.1), rgba(89, 204, 184, 0.12));
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.sleepy-time-display.active {
  border-color: rgba(113, 101, 221, 0.35);
  box-shadow: 0 7px 18px rgba(86, 78, 169, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.sleepy-time-display i {
  width: 30px;
  height: 30px;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 11px;
  background: linear-gradient(145deg, #8a73ed, #5ccbb8);
  font-size: 15px;
  font-style: normal;
}

.sleepy-time-display strong {
  font-family: Georgia, "PingFang SC", serif;
  font-size: 22px;
  line-height: 1;
}

.sleepy-time-display em {
  margin-top: 3px;
  color: #8993a4;
  font-size: 7px;
  font-style: normal;
  font-weight: 750;
}

.sleepy-time-display:focus-within { border-color: rgba(113, 101, 221, .5); box-shadow: 0 0 0 3px rgba(126, 113, 233, .09); }
.sleepy-time-display .sleepy-time-input {
  width: 84px; min-width: 0; margin: 0; padding: 0; grid-column: 2; grid-row: 1;
  appearance: none; -webkit-appearance: none; border: 0; outline: none;
  border-radius: 0; background: transparent !important; box-shadow: none;
  color: #28354a; caret-color: #7765d8; font-family: Georgia, "PingFang SC", serif;
  font-size: 24px !important; font-weight: 700; line-height: 1.15;
}
.sleepy-time-display em { grid-column: 2; grid-row: 2; }

.sleepy-time-panel {
  margin-top: 13px;
  padding: 13px;
  border: 1px solid rgba(113, 101, 221, 0.13);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(245, 240, 255, 0.92), rgba(235, 250, 247, 0.94));
  box-shadow: 0 12px 28px rgba(54, 57, 95, 0.09);
  animation: sleepy-picker-arrive 220ms ease-out both;
}

.sleepy-time-wheels {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.sleepy-time-wheels > b {
  color: #7468dc;
  font-family: Georgia, serif;
  font-size: 27px;
}

.sleepy-time-wheel {
  width: 82px;
  display: grid;
  grid-template-columns: 27px 1fr 27px;
  grid-template-rows: auto auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.69);
}

.sleepy-time-wheel button {
  width: 27px;
  height: 39px;
  grid-row: 1 / span 2;
  color: #7569dd;
  background: rgba(118, 105, 221, 0.07);
  font-size: 17px;
}

.sleepy-time-wheel strong {
  align-self: end;
  color: #243148;
  font-family: Georgia, serif;
  font-size: 21px;
  text-align: center;
}

.sleepy-time-wheel small {
  align-self: start;
  color: #99a1b0;
  font-size: 6px;
  text-align: center;
}

.sleepy-time-presets {
  margin-top: 11px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.sleepy-time-presets button {
  padding: 7px 2px;
  color: #707b8f;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 9px;
  font-weight: 800;
}

.sleepy-time-presets button.active {
  color: #fff;
  background: linear-gradient(135deg, #8874ee, #5fcab8);
}

.sleepy-picker-done {
  width: 100%;
  margin-top: 9px;
  padding: 8px;
  color: #fff;
  border-radius: 11px;
  background: linear-gradient(120deg, #8c75ef, #7189ed 52%, #58cab7);
  font-size: 9px;
  font-weight: 850;
}

@keyframes sleepy-picker-arrive {
  from { opacity: 0; transform: translateY(-5px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.sleepy-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #68758a;
  font-size: 9px;
  font-weight: 750;
}

.sleepy-switch input {
  width: 1px;
  height: 1px;
  position: absolute;
  opacity: 0;
}

.sleepy-switch i {
  width: 38px;
  height: 23px;
  position: relative;
  border-radius: 999px;
  background: #cbd0da;
  transition: 180ms ease;
}

.sleepy-switch i::after {
  content: "";
  width: 17px;
  height: 17px;
  position: absolute;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(36, 42, 60, 0.22);
  transition: 180ms ease;
}

.sleepy-switch input:checked + i {
  background: #5bc7ad;
}

.sleepy-switch input:checked + i::after {
  transform: translateX(15px);
}

.sleepy-timeline {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}

.sleepy-timeline button {
  min-width: 0;
  padding: 0 3px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #8992a2;
  text-align: center;
}

.sleepy-timeline button::before {
  content: "";
  height: 2px;
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  background: #e1e4eb;
}

.sleepy-timeline button:first-child::before { left: 50%; }
.sleepy-timeline button:last-child::before { right: 50%; }

.sleepy-timeline i {
  width: 12px;
  height: 12px;
  position: relative;
  z-index: 1;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #b9beca;
  box-shadow: 0 0 0 1px #daddE5;
}

.sleepy-timeline button.active i {
  background: #7165dd;
  box-shadow: 0 0 0 3px rgba(113, 101, 221, 0.16);
}

.sleepy-timeline span {
  margin-top: 8px;
  color: #5e6b80;
  font-size: 10px;
  font-weight: 900;
}

.sleepy-timeline strong {
  margin-top: 3px;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.35;
}

.sleepy-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sleepy-section-heading > span {
  color: #929aab;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.sleepy-content-grid {
  margin-top: 13px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sleepy-content-grid button {
  min-width: 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  border-radius: 18px;
  background: #f4f4f8;
}

.sleepy-content-art {
  width: 100%;
  height: 66px;
  position: relative;
  overflow: hidden;
  border-radius: 13px;
  background: linear-gradient(135deg, #e39a74, #6f68d9);
}

.sleepy-content-art.art-night-1 { background: linear-gradient(135deg, #4e628f, #9a86ce); }
.sleepy-content-art.art-morning-0 { background: linear-gradient(135deg, #f0a66e, #f5d6a1); }
.sleepy-content-art.art-morning-1 { background: linear-gradient(135deg, #57bca6, #7270df); }

.sleepy-content-art::before,
.sleepy-content-art::after,
.sleepy-content-art i {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
}

.sleepy-content-art::before { width: 52px; height: 52px; left: -8px; top: 20px; }
.sleepy-content-art::after { width: 70px; height: 70px; right: -18px; top: -26px; }
.sleepy-content-art i { width: 24px; height: 24px; left: calc(50% - 12px); top: calc(50% - 12px); background: rgba(255, 255, 255, 0.72); box-shadow: 0 0 18px rgba(255, 255, 255, 0.5); }

.sleepy-content-grid small {
  margin-top: 9px;
  color: #8c95a4;
  font-size: 8px;
  font-weight: 800;
}

.sleepy-content-grid strong {
  width: 100%;
  margin-top: 3px;
  overflow: hidden;
  color: #344159;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sleepy-content-grid em {
  margin-top: 4px;
  color: #7165d5;
  font-size: 7px;
  font-style: normal;
  font-weight: 750;
}

.sleepy-shortcuts-card {
  background: linear-gradient(145deg, #252c45, #34385b);
}

/* Shortcut controls live on their own page and stay hidden on the rhythm overview. */
.sleepy-rhythm-page:not(.shortcut-settings-open) .sleepy-shortcuts-card {
  display: none;
}

.sleepy-rhythm-page.shortcut-settings-open .sleepy-shortcuts-card {
  margin: 0;
  padding: 0;
  position: absolute;
  z-index: 30;
  inset: 0;
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 85% 4%, rgba(116, 105, 225, 0.34), transparent 29%),
    radial-gradient(circle at 8% 68%, rgba(79, 195, 170, 0.18), transparent 31%),
    linear-gradient(165deg, #252c45, #34385b 62%, #292f49);
  box-shadow: none;
}

.sleepy-shortcuts-page-header {
  min-height: calc(66px + var(--sleepy-safe-top));
  padding: calc(10px + var(--sleepy-safe-top)) 17px 10px;
  position: sticky;
  z-index: 4;
  top: 0;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(37, 44, 69, 0.88);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.sleepy-shortcuts-page-header > button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.11);
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
}

.sleepy-shortcuts-page-header > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sleepy-shortcuts-page-header small {
  color: #9a90ef;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.sleepy-shortcuts-page-header strong {
  color: #fff;
  font-family: Georgia, "PingFang SC", serif;
  font-size: 17px;
}

.sleepy-shortcuts-page-header > span {
  color: #8fe0cd;
  font-size: 22px;
  text-align: center;
}

.sleepy-shortcuts-page-body {
  padding: 18px 17px calc(26px + env(safe-area-inset-bottom, 0px));
}

.sleepy-shortcuts-title {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.sleepy-shortcuts-title > span {
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(135deg, #775ee3, #e65fa4 55%, #f0aa62);
  box-shadow: 0 7px 18px rgba(16, 19, 35, 0.34);
  font-size: 20px;
}

.sleepy-shortcuts-title small {
  color: #cbc5ff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.sleepy-shortcuts-title p {
  margin: 5px 0 0;
  color: rgba(239, 241, 249, 0.68);
  font-size: 9px;
  line-height: 1.5;
}

.sleepy-music-app-picker {
  margin-top: 14px;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 9px;
  font-weight: 800;
}

.sleepy-audio-output-picker {
  margin-top: 9px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.sleepy-audio-output-picker span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sleepy-audio-output-picker small {
  color: rgba(255, 255, 255, 0.57);
  font-size: 7px;
}

.sleepy-audio-output-picker strong {
  font-size: 10px;
}

.sleepy-audio-output-picker select {
  max-width: 48%;
  padding: 7px 9px;
  color: #fff;
  border: 1px solid rgba(143, 224, 205, 0.34);
  border-radius: 10px;
  background: #2e304b;
  font: inherit;
  font-size: 8px;
}

.sleepy-playback-settings {
  margin-top: 9px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.sleepy-playback-settings label {
  min-width: 0;
  padding: 11px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.sleepy-playback-settings label > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.sleepy-playback-settings small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 8px;
}

.sleepy-playback-settings strong {
  color: #8fe0cd;
  font-size: 10px;
}

.sleepy-playback-settings input[type="range"] {
  width: 100%;
  margin: 4px 0;
  accent-color: #8fe0cd;
}

.sleepy-playback-settings select {
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  color: #fff;
  border: 1px solid rgba(143, 224, 205, 0.32);
  border-radius: 10px;
  background: #2e304b;
}

.sleepy-music-current {
  width: 100%;
  padding: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #fff;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07) !important;
  text-align: left;
}

.sleepy-music-current span {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sleepy-music-current > b {
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
}

.sleepy-music-current .tone-apple { background: linear-gradient(145deg, #ff5a7c, #d84be8); }
.sleepy-music-current .tone-spotify { background: linear-gradient(145deg, #36d77b, #118d50); }
.sleepy-music-current .tone-podcasts { background: linear-gradient(145deg, #ad7cff, #6d4bdf); }
.sleepy-music-current .tone-netease { background: linear-gradient(145deg, #ff5f5f, #cf2525); }
.sleepy-music-current .tone-qq { background: linear-gradient(145deg, #76df77, #24a555); }
.sleepy-music-current .tone-xiaoyuzhou { background: linear-gradient(145deg, #52c9f0, #536fe6); }

.sleepy-music-current small {
  color: rgba(255, 255, 255, 0.57);
  font-size: 7px;
}

.sleepy-music-current strong {
  color: #fff;
  font-size: 11px;
}

.sleepy-music-current > i {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  color: #d8d3ff;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 15px;
  font-style: normal;
  transition: transform 180ms ease;
}

.sleepy-music-current.active > i {
  transform: rotate(180deg);
}

.sleepy-music-options {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  animation: sleepy-picker-arrive 220ms ease-out both;
}

.sleepy-music-options button {
  min-width: 0;
  padding: 7px;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  text-align: left;
}

.sleepy-music-options button.active {
  color: #fff;
  border-color: rgba(142, 224, 205, 0.55);
  background: rgba(101, 202, 181, 0.16);
}

.sleepy-music-options button > i {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 9px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.sleepy-music-options .tone-apple { background: linear-gradient(145deg, #ff5a7c, #d84be8); }
.sleepy-music-options .tone-spotify { background: linear-gradient(145deg, #36d77b, #118d50); }
.sleepy-music-options .tone-podcasts { background: linear-gradient(145deg, #ad7cff, #6d4bdf); }
.sleepy-music-options .tone-netease { background: linear-gradient(145deg, #ff5f5f, #cf2525); }
.sleepy-music-options .tone-qq { background: linear-gradient(145deg, #76df77, #24a555); }
.sleepy-music-options .tone-xiaoyuzhou { background: linear-gradient(145deg, #52c9f0, #536fe6); }

.sleepy-music-options button > span {
  overflow: hidden;
  font-size: 7px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sleepy-music-options button {
  min-height: 46px;
}

.sleepy-music-options button > em {
  opacity: 0;
  color: #8fe0cd;
  font-size: 9px;
  font-style: normal;
}

.sleepy-music-options button.active > em {
  opacity: 1;
}

.sleepy-shortcut-flow {
  margin-top: 11px;
  display: grid;
  gap: 5px;
}

.sleepy-shortcut-flow > span {
  padding: 10px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  color: #fff;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.07);
}

.sleepy-shortcut-flow i {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  color: #f4c99b;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-style: normal;
}

.sleepy-shortcut-flow strong {
  min-width: 0;
  font-size: 8px;
  line-height: 1.35;
}

.sleepy-shortcut-flow em {
  color: #8fe0cd;
  font-size: 7px;
  font-style: normal;
  font-weight: 800;
}

.sleepy-shortcut-flow > b {
  height: 8px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
  line-height: 8px;
  text-align: center;
}

.sleepy-shortcut-actions {
  margin-top: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sleepy-shortcut-actions span {
  padding: 7px 9px;
  color: #e8e5ff;
  border: 1px solid rgba(203, 197, 255, 0.16);
  border-radius: 999px;
  background: rgba(117, 104, 228, 0.17);
  font-size: 8px;
  font-weight: 800;
}

.sleepy-shortcut-privacy {
  margin: 10px 2px 0;
  color: rgba(239, 241, 249, 0.58);
  font-size: 8px;
  line-height: 1.5;
}

.sleepy-automation-guide {
  margin-top: 12px;
  padding: 13px;
  color: #eef0f8;
  border: 1px solid rgba(143, 224, 205, 0.2);
  border-radius: 14px;
  background: rgba(143, 224, 205, 0.08);
}

.sleepy-automation-guide > strong {
  color: #8fe0cd;
  font-size: 10px;
}

.sleepy-automation-guide ol {
  margin: 9px 0 0;
  padding-left: 18px;
  color: rgba(239, 241, 249, 0.74);
  font-size: 9px;
  line-height: 1.55;
}

.sleepy-automation-guide li + li {
  margin-top: 6px;
}

@media (max-width: 360px) {
  .sleepy-playback-settings {
    grid-template-columns: 1fr;
  }
}

.sleepy-curve-chart {
  height: 150px;
  margin-top: 12px;
  padding: 9px;
  position: relative;
  overflow: hidden;
  border-radius: 17px;
  background: linear-gradient(180deg, #f7f7fb, #eef0f5);
}

.sleepy-curve-grid {
  position: absolute;
  inset: 10px 10px 31px;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 26px, rgba(103, 111, 137, 0.08) 27px);
}

.sleepy-curve-chart svg {
  width: calc(100% - 18px);
  height: 104px;
  position: relative;
  z-index: 1;
  overflow: visible;
}

.sleepy-curve-chart path {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.sleepy-curve-chart path.light { stroke: #6b60dd; }
.sleepy-curve-chart path.sound { stroke: #55c1a8; stroke-dasharray: 6 5; }

.sleepy-curve-legend {
  display: flex;
  justify-content: center;
  gap: 18px;
  color: #7e8797;
  font-size: 8px;
  font-weight: 800;
}

.sleepy-curve-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.sleepy-curve-legend i {
  width: 14px;
  height: 3px;
  border-radius: 999px;
}

.sleepy-curve-legend i.light { background: #6b60dd; }
.sleepy-curve-legend i.sound { background: #55c1a8; }

.sleepy-hardware-card code {
  margin-top: 12px;
  padding: 12px;
  display: block;
  overflow-x: auto;
  color: #c5f7e9;
  border-radius: 15px;
  background: #242b42;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.sleepy-hardware-card p,
.sleepy-automation-hint,
.sleepy-local-note {
  color: #87909f;
  font-size: 9px;
  line-height: 1.5;
}

.sleepy-hardware-card p {
  margin: 9px 2px 0;
}

.sleepy-open-simulator {
  width: 100%;
  min-height: 46px;
  margin-top: 12px;
  border-radius: 15px;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  background: linear-gradient(120deg, #5bc8ae, #7064df);
  box-shadow: 0 10px 22px rgba(91, 97, 197, 0.2);
}

.sleepy-rhythm-actions {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 9px;
}

.sleepy-rhythm-actions button {
  min-height: 50px;
  padding: 0 10px;
  border-radius: 18px;
  font-size: 10px;
  font-weight: 850;
}

.sleepy-start-demo {
  color: #fff;
  background: linear-gradient(120deg, #5bc8ae, #7064df);
  box-shadow: 0 10px 22px rgba(91, 97, 197, 0.24);
}

.sleepy-add-automation {
  color: #6458ce;
  background: #e9e6ff;
}

.sleepy-automation-hint,
.sleepy-local-note {
  margin: 9px 10px 0;
  text-align: center;
}

.sleepy-local-note {
  margin-top: 17px;
  color: #5caa97;
  font-weight: 800;
}

.sleepy-rhythm-toast {
  max-width: calc(100% - 40px);
  padding: 11px 16px;
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  color: #fff;
  border-radius: 15px;
  opacity: 0;
  background: rgba(35, 42, 61, 0.92);
  box-shadow: 0 10px 28px rgba(24, 29, 47, 0.25);
  font-size: 10px;
  font-weight: 750;
  text-align: center;
  transform: translate(-50%, 12px);
  transition: 200ms ease;
  pointer-events: none;
}

.sleepy-rhythm-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 740px) {
  .sleepy-rhythm-page {
    height: min(94vh, 900px);
    margin: auto;
    border-radius: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sleepy-lamp,
  .sleepy-lamp-halo,
  .sleepy-lamp-scene[data-stage="3"] .sleepy-lamp,
  .sleepy-lamp-scene[data-stage="3"] .sleepy-lamp-halo {
    animation: none !important;
    transition: none !important;
  }
}

/* Full-screen clustered reflection bubbles: large organic shapes, pastel fills,
   one readable ink color, and deliberate edge overlap. */
.sleepy-keyword-insights {
  height: clamp(620px, calc(100dvh - 150px), 700px);
  overflow: hidden;
}

.sleepy-keyword-cloud {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sleepy-keyword-cloud .sleepy-keyword-bubble,
.sleepy-keyword-cloud .sleepy-keyword-bubble.is-selected {
  width: min(56%, 218px);
  height: 150px;
  padding: 20px 18px;
  color: #344158;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,.8), transparent 31%),
    radial-gradient(circle at 78% 76%, var(--cluster-b), transparent 58%),
    linear-gradient(145deg, var(--cluster-a), rgba(255,255,255,.72) 53%, var(--cluster-b));
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.82),
    inset 0 -8px 20px rgba(255,255,255,.2),
    0 14px 32px rgba(74, 76, 120, .12);
  -webkit-backdrop-filter: blur(10px) saturate(1.08);
  backdrop-filter: blur(10px) saturate(1.08);
}

.sleepy-keyword-cloud .sleepy-keyword-bubble::before {
  inset: 7px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: inherit;
}

.sleepy-keyword-cloud .sleepy-keyword-bubble::after {
  width: 52px;
  height: 16px;
  inset: 15px auto auto 23px;
  opacity: .72;
}

.sleepy-keyword-cloud .sleepy-keyword-bubble > strong,
.sleepy-keyword-cloud .sleepy-keyword-bubble.is-selected > strong {
  color: #344158;
  font-size: 15px;
  font-weight: 780;
  line-height: 1.35;
  text-shadow: 0 1px 5px rgba(255,255,255,.84);
}

.sleepy-keyword-cloud .sleepy-keyword-bubble.is-selected {
  opacity: 1;
  border-color: rgba(111, 96, 200, .3);
  box-shadow: 0 0 0 4px rgba(255,255,255,.72), 0 17px 36px rgba(98,86,176,.22);
}

.sleepy-keyword-bubble.tone-violet,
.sleepy-keyword-bubble.tone-lavender { --cluster-a:#ded8ff; --cluster-b:#f1dcf5; }
.sleepy-keyword-bubble.tone-indigo { --cluster-a:#dbe3ff; --cluster-b:#e8dcfa; }
.sleepy-keyword-bubble.tone-blue { --cluster-a:#d9effc; --cluster-b:#e6e4fb; }
.sleepy-keyword-bubble.tone-rose,
.sleepy-keyword-bubble.tone-pink { --cluster-a:#f7ddea; --cluster-b:#e8e4fb; }
.sleepy-keyword-bubble.tone-amber,
.sleepy-keyword-bubble.tone-orange { --cluster-a:#f8e7cc; --cluster-b:#f0dff1; }
.sleepy-keyword-bubble.tone-mint,
.sleepy-keyword-bubble.tone-cyan { --cluster-a:#d6f1eb; --cluster-b:#dceafb; }
.sleepy-keyword-bubble.tone-green { --cluster-a:#e1f1d7; --cluster-b:#d9eaf6; }

.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(4n + 1) { border-radius: 45% 55% 61% 39% / 48% 39% 61% 52%; }
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(2n) { border-radius: 62% 38% 45% 55% / 41% 58% 42% 59%; }
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(3n) { border-radius: 42% 58% 54% 46% / 63% 44% 56% 37%; }

.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(1) { left:-7%;  top:0;   --bubble-rotate:-7deg; z-index:1; }
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(2) { left:49%;  top:62px; --bubble-rotate:6deg;  z-index:2; }
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(3) { left:-9%;  top:135px;--bubble-rotate:5deg;  z-index:3; }
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(4) { left:45%;  top:212px;--bubble-rotate:-6deg; z-index:4; }
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(5) { left:-6%;  top:292px;--bubble-rotate:-5deg; z-index:5; }
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(6) { left:50%;  top:367px;--bubble-rotate:7deg;  z-index:6; }
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(7) { left:2%;   top:455px;--bubble-rotate:5deg;  z-index:7; }
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(8) { left:48%;  top:525px;--bubble-rotate:-7deg; z-index:8; }

/* 2026-08-29: align the pillow-light and music settings with the journal UI. */
.sleepy-rhythm-page {
  color: #26344d;
  background:
    radial-gradient(circle at 92% 2%, rgba(219, 209, 253, 0.46), transparent 32%),
    radial-gradient(circle at 0 62%, rgba(199, 239, 229, 0.32), transparent 35%),
    #f5f6fb;
}

.sleepy-rhythm-header {
  background: rgba(248, 248, 253, 0.92);
  box-shadow: 0 1px 0 rgba(109, 98, 177, 0.06);
}

.sleepy-rhythm-header strong {
  color: #26344d;
  font-family: Georgia, "PingFang SC", serif;
  font-size: 19px;
}

.sleepy-rhythm-scroll {
  padding: 12px 16px calc(40px + env(safe-area-inset-bottom, 0px));
}

.sleepy-rhythm-hero {
  padding: 14px 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.98);
  border-radius: 32px;
  background:
    radial-gradient(circle at 84% 10%, rgba(226, 218, 255, 0.5), transparent 42%),
    radial-gradient(circle at 10% 84%, rgba(207, 241, 233, 0.48), transparent 45%),
    rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 32px rgba(75, 73, 115, 0.09);
}

.sleepy-heart-pillow-visual {
  height: 184px;
  margin: -7px 0 -1px;
}

.sleepy-heart-pillow-visual img {
  width: 196px;
  height: 196px;
}

.sleepy-live-readout {
  margin-top: 0;
  gap: 10px;
}

.sleepy-live-readout span {
  min-width: 116px;
  padding: 10px 13px;
  color: #7d7891;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 17px;
  background: #f3effb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  font-size: 11px;
}

.sleepy-live-readout span + span {
  background: #ebf6f2;
}

.sleepy-live-readout b {
  color: #7866c8;
  font-family: Georgia, serif;
  font-size: 21px;
}

.sleepy-live-readout span + span b {
  color: #55a592;
}

.sleepy-mode-tabs {
  margin: 18px 0;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 20px;
  background: #ebe8f6;
}

.sleepy-mode-tabs button {
  min-height: 48px;
  border-radius: 16px;
  color: #918aa5;
  font-size: 14px;
  font-weight: 750;
}

.sleepy-mode-tabs button.active {
  color: #6e5dc4;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(95, 83, 156, 0.1);
}

.sleepy-ai-signals,
.sleepy-schedule-card,
.sleepy-content-section {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.98);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 25px rgba(75, 73, 115, 0.07);
}

.sleepy-ai-signals > small,
.sleepy-section-heading > small {
  color: #7968cb;
  font-size: 12px;
  font-weight: 780;
}

.sleepy-ai-signals em {
  font-size: 10px;
}

.sleepy-ai-signals strong {
  font-family: Georgia, serif;
  font-size: 18px;
}

.sleepy-schedule-setting small,
.sleepy-switch {
  font-size: 11px;
}

.sleepy-rhythm-actions button {
  min-height: 56px;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 780;
}

.sleepy-rhythm-page.shortcut-settings-open .sleepy-shortcuts-card {
  color: #26344d;
  background:
    radial-gradient(circle at 92% 2%, rgba(219, 209, 253, 0.46), transparent 34%),
    radial-gradient(circle at 0 72%, rgba(199, 239, 229, 0.3), transparent 36%),
    #f5f6fb;
}

.sleepy-shortcuts-page-header {
  min-height: calc(78px + var(--sleepy-safe-top));
  padding: calc(14px + var(--sleepy-safe-top)) 18px 12px;
  border-bottom: 0;
  background: rgba(248, 248, 253, 0.94);
}

.sleepy-shortcuts-page-header small {
  color: #7567cc;
  font-size: 10px;
}

.sleepy-shortcuts-page-header strong {
  color: #26344d;
  font-family: Georgia, "PingFang SC", serif;
  font-size: 20px;
}

.sleepy-shortcuts-page-header > button {
  width: 42px;
  height: 42px;
  color: #6d5dc4;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 7px 18px rgba(78, 70, 132, 0.1);
}

.sleepy-shortcuts-page-header > span {
  color: #61b9a5;
}

.sleepy-shortcuts-page-body {
  padding: 22px 18px calc(36px + env(safe-area-inset-bottom, 0px));
}

.sleepy-shortcuts-title {
  gap: 13px;
}

.sleepy-shortcuts-title > span {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(145deg, #8877ea, #62c8b6);
  box-shadow: 0 9px 20px rgba(103, 94, 177, 0.18);
}

.sleepy-shortcuts-title small {
  color: #6f60c5;
  font-size: 11px;
}

.sleepy-shortcuts-title p {
  margin-top: 6px;
  color: #68758c;
  font-size: 13px;
  line-height: 1.7;
}

.sleepy-ai-plan-settings {
  margin-top: 18px;
  padding: 18px;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.86);
}

.sleepy-ai-plan-settings small {
  font-size: 11px;
}

.sleepy-ai-plan-settings p {
  color: #57667d;
  font-size: 13px;
  line-height: 1.7;
}

.sleepy-personalized-values span {
  padding: 7px 10px;
  color: #52766f;
  background: #e8f5f1;
  font-size: 10px;
}

.sleepy-music-app-picker {
  margin-top: 17px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.98);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 28px rgba(76, 73, 119, 0.08);
}

.sleepy-music-current {
  min-height: 70px;
  padding: 11px 12px;
  border-radius: 21px;
  color: #2c3a52;
  background: #f5f2fc !important;
}

.sleepy-music-current > b,
.sleepy-music-options button > i {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  font-size: 16px;
}

.sleepy-music-current small {
  color: #89869a;
  font-size: 10px;
}

.sleepy-music-current strong {
  color: #2b3950;
  font-size: 16px;
}

.sleepy-music-current > i {
  width: 34px;
  height: 34px;
  color: #6e5dc4;
  border-radius: 13px;
  background: #ece7fa;
  font-size: 18px;
}

.sleepy-music-options {
  margin-top: 12px;
  gap: 10px;
}

.sleepy-music-options button {
  min-height: 68px;
  padding: 10px 12px;
  grid-template-columns: 44px minmax(0, 1fr) 22px;
  gap: 11px;
  color: #425068;
  border: 1px solid #eceaf3;
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 7px 18px rgba(76, 73, 119, 0.05);
}

.sleepy-music-options button > span {
  font-size: 15px;
  font-weight: 760;
}

.sleepy-music-options button > em {
  color: #58b7a2;
  font-size: 17px;
}

.sleepy-music-options button.active {
  color: #36465c;
  border-color: rgba(112, 96, 202, 0.25);
  background: linear-gradient(135deg, #f0ecff, #e9f7f3);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 9px 21px rgba(91, 80, 159, 0.1);
}

.sleepy-music-current .tone-apple,
.sleepy-music-options .tone-apple { background: linear-gradient(145deg, #e99abb, #bc8cdb); }
.sleepy-music-current .tone-spotify,
.sleepy-music-options .tone-spotify { background: linear-gradient(145deg, #72ceb9, #56aa98); }
.sleepy-music-current .tone-podcasts,
.sleepy-music-options .tone-podcasts { background: linear-gradient(145deg, #aa96eb, #7e6bd0); }
.sleepy-music-current .tone-netease,
.sleepy-music-options .tone-netease { background: linear-gradient(145deg, #e69aae, #c47ea0); }
.sleepy-music-current .tone-qq,
.sleepy-music-options .tone-qq { background: linear-gradient(145deg, #86d3aa, #5cb58d); }
.sleepy-music-current .tone-xiaoyuzhou,
.sleepy-music-options .tone-xiaoyuzhou { background: linear-gradient(145deg, #8fb9e9, #7c8dde); }

.sleepy-shortcut-privacy {
  margin: 15px 3px 0;
  color: #7b8799 !important;
  font-size: 11px;
  line-height: 1.65;
}

/* Compact entry card for the full text reflection. */
.cl-text-summary-preview .cl-summary-preview-copy,
.cl-text-summary-preview .cl-summary-preview-meta,
.cl-text-summary-preview .cl-summary-preview-guidance {
  display: none !important;
}

.cl-text-summary-preview {
  padding: 19px 17px 20px;
}

.cl-text-summary-preview .cl-summary-preview-range {
  margin-top: 17px;
}

.cl-text-summary-preview .cl-summary-preview-open {
  width: min(82%, 286px);
  min-height: 58px;
  margin: 18px auto 2px;
  padding: 13px 48px 13px 24px;
  position: relative;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 255, 255, 0.28), transparent 34%),
    linear-gradient(135deg, #8b77f2, #7189ed 52%, #56cbb7);
  box-shadow: 0 14px 28px rgba(93, 91, 201, 0.27);
  font-size: 14px;
  font-weight: 880;
  text-align: center;
}

.cl-text-summary-preview .cl-summary-preview-open > svg {
  width: 17px;
  position: absolute;
  right: 21px;
}

/* Keep the home screen focused on Sleepy, light, and sound. */
.cl-today .cl-section-title,
.cl-today .cl-latest,
.cl-today > .cl-empty,
.cl-today .cl-local-note {
  display: none !important;
}

/* One top-safe-area contract for every full-screen surface. */
.cl-summary-page {
  padding-top: calc(24px + var(--sleepy-safe-top)) !important;
}

.cl-sheet {
  padding-top: max(22px, var(--sleepy-safe-top)) !important;
}

.cl-sounds-page > header {
  min-height: calc(55px + var(--sleepy-safe-top)) !important;
  padding-top: var(--sleepy-safe-top) !important;
}

.cl-membership-page > header {
  min-height: calc(50px + var(--sleepy-safe-top)) !important;
  padding-top: var(--sleepy-safe-top) !important;
}

.cl-compliance-backdrop {
  padding-top: max(18px, var(--sleepy-safe-top)) !important;
}

.sleepy-iphone-preview .cl-content > section {
  padding-top: 28px;
}

.cl-today > header {
  position: relative;
  z-index: 20;
}

.sleepy-calendar-add-date {
  width: 100%;
  margin-top: 12px;
  padding: 13px 15px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  color: #26344b;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(238, 233, 255, 0.96), rgba(229, 249, 244, 0.96));
  box-shadow: 0 10px 23px rgba(56, 72, 96, 0.1);
  text-align: left;
}

.cl-calendar-recall > .sleepy-calendar-add-date {
  width: calc(100% - 28px);
  margin: 0 14px 12px;
  flex: 0 0 auto;
}

.sleepy-calendar-add-date[hidden] {
  display: none !important;
}

.sleepy-calendar-add-date > i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 13px;
  background: linear-gradient(145deg, #8874ec, #58c9b5);
  font-size: 22px;
  font-style: normal;
  font-weight: 400;
}

.sleepy-calendar-add-date > span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sleepy-calendar-add-date strong {
  font-size: 13px;
}

.sleepy-calendar-add-date small {
  color: #778397;
  font-size: 9px;
}

.sleepy-calendar-add-date > em {
  color: #6c60d4;
  font-size: 25px;
  font-style: normal;
  font-weight: 300;
}

.cl-chart-wrap .sleepy-wave-area,
.cl-chart-wrap .sleepy-wave-line {
  pointer-events: none;
}

.cl-chart-wrap .sleepy-wave-line {
  filter: drop-shadow(0 4px 7px rgba(104, 104, 215, 0.22));
}
:root .sleepy-link-card {
  margin: 16px 20px; padding: 16px; border-radius: 18px; background: #edf6f2; color: #304c45;
  font-size: 13px; line-height: 1.6; overflow-wrap: anywhere;
}
.sleepy-link-card summary { cursor: pointer; font-weight: 650; }
.sleepy-link-card label { display: block; margin: 10px 0; }
.sleepy-link-card input { box-sizing: border-box; display: block; width: 100%; min-height: 44px; margin-top: 4px; padding: 8px 12px; border: 1px solid #bdd3ca; border-radius: 10px; font-size: 16px; background: white; color: #243f37; }
.sleepy-link-card button { width: 100%; min-height: 44px; border: 0; border-radius: 12px; background: #4a7c6d; color: white; font-size: 15px; }

/* 2026-08-28 UI refinement */
/* Connection stays available from the header; keep transport bindings intact. */
.sleepy-rhythm-scroll > [data-lamp-feedback],
.sleepy-rhythm-scroll > .sleepy-link-card { display: none !important; }
.sleepy-keyword-insights { height: 536px; }
.sleepy-keyword-bubble {
  --bubble-select-a: #9488ee;
  --bubble-select-b: #685bc4;
  --bubble-select-glow: rgba(120, 105, 224, .34);
  opacity: .76;
}
.sleepy-keyword-bubble.is-muted { opacity: .3; }
.sleepy-keyword-bubble.is-selected {
  opacity: 1;
  color: #fff;
  border-color: rgba(255,255,255,.78);
  background: radial-gradient(circle at 28% 20%, rgba(255,255,255,.5), transparent 25%), linear-gradient(145deg, var(--bubble-select-a), var(--bubble-select-b));
  box-shadow: 0 0 0 4px rgba(255,255,255,.62), 0 12px 28px var(--bubble-select-glow), inset 0 1px 0 rgba(255,255,255,.55);
}
/* Loose board-like placement: middle positions break up the old two columns.
   A shared responsive width leaves room for drift on small phones. */
.sleepy-keyword-cloud .sleepy-keyword-bubble {
  --scatter-width: min(33%, 148px);
  width: var(--scatter-width); height: 96px; padding: 12px 8px;
  left: calc((100% - var(--scatter-width)) * var(--scatter-x)); right: auto;
  --bubble-x: 0px; --bubble-y: 0px;
}
.sleepy-keyword-cloud .sleepy-keyword-bubble:not(.is-selected) {
  background: radial-gradient(ellipse at 50% 70%, rgba(104,208,237,.08), transparent 62%),
    linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.025) 56%, rgba(208,227,255,.12));
  border: 1px solid rgba(125,221,230,.44);
  box-shadow: inset 2px 2px 8px rgba(255,255,255,.52), inset -2px -4px 10px rgba(140,173,242,.13), 0 5px 15px rgba(124,160,179,.055);
  -webkit-backdrop-filter: blur(1.5px) saturate(1.08); backdrop-filter: blur(1.5px) saturate(1.08);
}
/* Thin-film interference rims: an empty center, layered iridescent edges.
   Both masks follow the organic hit area; neither can intercept a click. */
.sleepy-keyword-cloud .sleepy-keyword-bubble::before {
  inset: 0; padding: 7px; border: 0; border-radius: inherit;
  background: conic-gradient(from var(--film-angle, 20deg),
    rgba(100,236,249,.08) 0deg, rgba(125,223,254,.56) 42deg,
    rgba(236,136,243,.82) 75deg, rgba(255,217,155,.84) 95deg,
    rgba(108,232,246,.65) 119deg, rgba(144,212,255,.07) 159deg,
    rgba(255,255,255,.12) 197deg, rgba(98,238,228,.75) 228deg,
    rgba(225,129,241,.8) 258deg, rgba(255,214,157,.83) 276deg,
    rgba(129,211,254,.64) 299deg, rgba(179,225,254,.03) 341deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  filter: blur(.7px); opacity: .88;
}
.sleepy-keyword-cloud .sleepy-keyword-bubble::after {
  width: auto; height: auto; inset: 2px; padding: 1px; border-radius: inherit; transform: none;
  background: conic-gradient(from var(--film-angle, 20deg), #ffffffde, #6ae7f4b8 24%, #f7a5eccc 42%, #ffffffdd 56%, #b6f5f8aa 73%, #fae5becc 87%, #ffffffde);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  filter: none; opacity: .88;
}
.sleepy-keyword-cloud .sleepy-keyword-bubble > strong {
  position: relative; z-index: 1; font-weight: 650; letter-spacing: .025em;
  text-shadow: 0 1px 5px rgba(255,255,255,.94);
}
.sleepy-keyword-cloud .sleepy-keyword-bubble.is-selected > strong { text-shadow: none; }
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(4n + 1) { border-radius: 46% 54% 58% 42% / 44% 40% 60% 56%; }
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(2n) { --film-angle: 125deg; border-radius: 62% 38% 43% 57% / 47% 58% 42% 53%; }
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(3n) { --film-angle: 240deg; border-radius: 43% 57% 52% 48% / 62% 45% 55% 38%; }
.sleepy-keyword-bubble:nth-child(1) { --scatter-x: .36; top: 10px; }
.sleepy-keyword-bubble:nth-child(2) { --scatter-x: .93; top: 76px; }
.sleepy-keyword-bubble:nth-child(3) { --scatter-x: .05; top: 131px; }
.sleepy-keyword-bubble:nth-child(4) { --scatter-x: .54; top: 205px; }
.sleepy-keyword-bubble:nth-child(5) { --scatter-x: .88; top: 315px; }
.sleepy-keyword-bubble:nth-child(6) { --scatter-x: .04; top: 289px; }
.sleepy-keyword-bubble:nth-child(7) { --scatter-x: .30; top: 410px; }
.sleepy-keyword-bubble:nth-child(8) { --scatter-x: .94; top: 430px; }
.cl-text-summary-preview .cl-summary-preview-open {
  position: relative; justify-content: center; padding-inline: 48px;
  font-size: 18px; text-align: center;
}
.cl-text-summary-preview .cl-summary-preview-open > span { flex: none; font-size: inherit; }
.cl-text-summary-preview .cl-summary-preview-open > svg { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); }
.sleepy-keyword-bubble.tone-violet { --bubble-select-a:#9e92f3; --bubble-select-b:#6b5ac9; --bubble-select-glow:rgba(107,90,201,.34); }
.sleepy-keyword-bubble.tone-indigo { --bubble-select-a:#8ba0ef; --bubble-select-b:#5a70cf; --bubble-select-glow:rgba(90,112,207,.34); }
.sleepy-keyword-bubble.tone-blue { --bubble-select-a:#7ac4e7; --bubble-select-b:#438fbc; --bubble-select-glow:rgba(67,143,188,.34); }
.sleepy-keyword-bubble.tone-rose { --bubble-select-a:#ec96bd; --bubble-select-b:#bd5b88; --bubble-select-glow:rgba(189,91,136,.34); }
.sleepy-keyword-bubble.tone-amber { --bubble-select-a:#efbd79; --bubble-select-b:#bb8039; --bubble-select-glow:rgba(187,128,57,.34); }
.sleepy-keyword-bubble.tone-mint { --bubble-select-a:#75d7c0; --bubble-select-b:#399c86; --bubble-select-glow:rgba(57,156,134,.34); }
.sleepy-keyword-bubble.tone-green { --bubble-select-a:#9bd487; --bubble-select-b:#619d50; --bubble-select-glow:rgba(97,157,80,.34); }
.sleepy-keyword-bubble.tone-cyan { --bubble-select-a:#72d2d5; --bubble-select-b:#38979b; --bubble-select-glow:rgba(56,151,155,.34); }
.sleepy-keyword-bubble.tone-orange { --bubble-select-a:#eda376; --bubble-select-b:#b5693d; --bubble-select-glow:rgba(181,105,61,.34); }
.sleepy-keyword-bubble.tone-pink { --bubble-select-a:#e5a0cf; --bubble-select-b:#b063a0; --bubble-select-glow:rgba(176,99,160,.34); }
.sleepy-keyword-bubble.tone-lavender { --bubble-select-a:#b19be9; --bubble-select-b:#8264be; --bubble-select-glow:rgba(130,100,190,.34); }
.sleepy-support-chat-intro .sleepy-support-static-avatar { width: 50px; height: 50px; object-fit: cover; border-radius: 16px; }

.cl-content > .cl-calendar-visual.live-month {
  padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px));
  overflow: visible;
}
.cl-content:has(> .cl-calendar-visual.live-month) {
  scroll-padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px));
}

.cl-calendar-recall {
  display: block;
  position: relative !important;
  inset: auto;
  width: 100%;
  max-height: none;
  margin: 20px 0 0;
  overflow: visible;
  background: rgba(255,255,255,.82);
  box-shadow: 0 10px 26px rgba(99,92,149,.08);
}
.cl-calendar-recall .cl-recall-event { grid-template-columns: 36px 10px minmax(0, 1fr); gap: 6px; }
.cl-calendar-recall .cl-recall-event > article > p { line-height: 1.8; overflow-wrap: anywhere; }
.cl-calendar-visual.live-month > h2,
.cl-calendar-visual.live-month > p { display: none !important; }
.cl-live-month-grid { margin-top: 18px; column-gap: 9px !important; row-gap: 24px !important; }
.cl-live-month-grid,
.cl-live-weekdays { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cl-live-weekdays { margin-top: 34px; column-gap: 9px; padding-inline: 0; }
.cl-live-month-grid > button { width: min(42px, 100%); min-width: 0; height: auto; min-height: 44px; aspect-ratio: 7 / 9; padding-inline: 0; }

.sleepy-rhythm-page.shortcut-settings-open .sleepy-shortcuts-card {
  color: #27344d;
  background: radial-gradient(circle at 90% 3%, rgba(184,170,246,.36), transparent 31%), radial-gradient(circle at 4% 66%, rgba(116,214,196,.24), transparent 34%), linear-gradient(165deg,#f8f7ff,#f3faf9 62%,#fbf5fa);
}
.sleepy-shortcuts-page-header {
  border-bottom-color: rgba(104,93,190,.1);
  background: rgba(249,248,255,.9);
}
.sleepy-shortcuts-page-header > button { color:#6255cd; background:#fff; box-shadow:0 8px 22px rgba(74,70,123,.12); }
.sleepy-shortcuts-page-header small { color:#7569db; }
.sleepy-shortcuts-page-header strong { color:#253249; }
.sleepy-shortcuts-title > span { background:linear-gradient(145deg,#8877ef,#59c9b6); box-shadow:0 8px 20px rgba(102,96,190,.2); }
.sleepy-shortcuts-title small { color:#6a5bd5; }
.sleepy-shortcuts-title p { color:#66748b; font-size:10px; }
.sleepy-ai-plan-settings { margin:14px 0 0; color:#314159; background:rgba(255,255,255,.72); border-color:rgba(255,255,255,.92); }
.sleepy-ai-plan-settings small { color:#685bd4; }
.sleepy-ai-plan-settings p { color:#56657c; }
.sleepy-personalized-values { margin-top:8px; display:flex; flex-wrap:wrap; gap:6px; }
.sleepy-personalized-values span { padding:6px 9px; color:#4f6e72; border-radius:999px; background:rgba(103,202,184,.14); font-size:8px; font-weight:800; }
.sleepy-music-app-picker { border-color:rgba(112,100,198,.14); background:rgba(255,255,255,.66); box-shadow:0 12px 28px rgba(81,78,126,.09); }
.sleepy-music-current { color:#2e3c55; background:rgba(255,255,255,.84) !important; }
.sleepy-music-current small { color:#8a93a5; }
.sleepy-music-current strong { color:#29364e; }
.sleepy-music-current > i { color:#6a5ed2; background:rgba(106,94,210,.1); }
.sleepy-music-options button { color:#45526a; border-color:rgba(107,98,182,.12); background:rgba(255,255,255,.72); box-shadow:0 6px 16px rgba(77,78,118,.06); }
.sleepy-music-options button.active { color:#294b52; border-color:rgba(78,186,166,.6); background:linear-gradient(135deg,rgba(225,250,245,.95),rgba(239,237,255,.95)); box-shadow:0 0 0 3px rgba(255,255,255,.72),0 8px 20px rgba(75,168,154,.14); }
.sleepy-music-current .tone-ai,
.sleepy-music-options .tone-ai { background: linear-gradient(145deg, #8175e7, #63c9b4); }
.sleepy-music-current span > em {
  display: block;
  margin-top: 3px;
  color: #7f8aa0;
  font-size: 10px;
  font-style: normal;
  font-weight: 650;
  line-height: 1.25;
}
.sleepy-shortcut-privacy { color:#758298 !important; }

.sleepy-time-panel { padding:16px 14px 14px !important; }
.sleepy-time-wheels { gap:8px !important; }
.sleepy-time-wheel { width:auto; min-width:0; min-height:64px; flex:1; grid-template-columns:26px minmax(0,1fr) 26px !important; grid-template-rows:40px 20px; border-radius:20px !important; background:#fff !important; overflow:hidden; }
.sleepy-time-wheel > button { width:26px !important; min-width:0 !important; height:44px !important; padding:0 !important; font-size:18px !important; grid-row:1 / 3; }
.sleepy-time-wheel > button:first-child { grid-column:1; }
.sleepy-time-wheel > button:last-child { grid-column:3; }
.sleepy-time-wheel > strong { grid-column:2; grid-row:1; min-width:0; padding:0; font-size:28px !important; line-height:1.15; text-align:center; background:#fff; }
.sleepy-time-wheel > small { grid-column:2; grid-row:2; padding-top:2px; font-size:9px; text-align:center; }

/* The rhythm experience shares the journal's soft lilac/mint visual language. */
.sleepy-rhythm-page {
  color: #30364f;
  background: radial-gradient(circle at 94% 4%, rgba(217,207,253,.55), transparent 38%),
    radial-gradient(circle at 0 65%, rgba(193,237,226,.36), transparent 42%), #f7f8fc;
}
.sleepy-rhythm-header { gap: 9px; padding-inline: 20px; background: rgba(248,248,253,.82); border-bottom: 0; }
.sleepy-rhythm-header strong { font-size: 18px; }
.sleepy-rhythm-header small { font-size: 8px; letter-spacing: .1em; }
.sleepy-rhythm-close { width: 40px; height: 40px; color: #8072c2; border-radius: 16px; box-shadow: 0 6px 18px rgba(100,91,151,.07); }
.sleepy-demo-connection { min-height: 38px; padding: 0 11px; color: #817993; border: 1px solid rgba(255,255,255,.8); background: rgba(255,255,255,.8); border-radius: 16px; font-size: 10px; }
.sleepy-rhythm-scroll { padding: 8px 20px calc(36px + env(safe-area-inset-bottom, 0px)); scrollbar-width: none; }
.sleepy-rhythm-scroll::-webkit-scrollbar { display: none; }
.sleepy-rhythm-hero {
  margin: 0; padding: 17px 18px 20px; border: 1px solid rgba(255,255,255,.94); border-radius: 34px;
  background: radial-gradient(circle at 85% 0%, rgba(219,207,255,.74), transparent 52%),
    radial-gradient(circle at 2% 75%, rgba(185,236,223,.6), transparent 54%),
    linear-gradient(150deg, #f0edff, #eef8f5 72%, #fbedf5);
  box-shadow: 0 12px 28px rgba(99,92,149,.07);
}
.sleepy-rhythm-hero > small { display: none; }
.sleepy-rhythm-hero h1 { margin: 6px 0 8px; color: #46405f; font-size: 24px; letter-spacing: -.035em; line-height: 1.35; }
.sleepy-rhythm-hero p { max-width: 270px; color: #7b7f98; font-size: 11px; line-height: 1.8; }
.sleepy-lamp-scene { width: 250px; max-width: 100%; height: 150px; margin: 0 auto; }
.sleepy-rhythm-mascot { width: 155px; height: 155px; position: absolute; z-index: 2; left: -2px; bottom: 0; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(112,98,172,.12)); pointer-events: none; }
.sleepy-lamp { width: 84px; height: 98px; position: absolute; right: 25px; bottom: 21px; border-radius: 42px 42px 28px 28px; box-shadow: inset 8px 4px 18px rgba(255,255,255,.7), inset -7px -10px 18px rgba(155,135,180,.09), 0 8px 28px rgba(var(--lamp-rgb),.24); }
.sleepy-lamp::before { width: 66px; left: 8px; height: 8px; bottom: -6px; background: #b8b1cd; }
.sleepy-lamp span { left: 24px; }
.sleepy-lamp-halo { top: 9px; right: -8px; opacity: calc(.12 + var(--lamp-power) * .32); }
.sleepy-lamp-shadow { right: 18px; bottom: 10px; background: #a39aba; opacity: .18; }
.sleepy-live-readout { margin-top: 15px; gap: 9px; }
.sleepy-live-readout span { min-width: 96px; padding: 9px 12px; color: #83849c; font-size: 10px; border: 1px solid rgba(255,255,255,.85); border-radius: 16px; background: rgba(255,255,255,.48); }
.sleepy-live-readout b { margin-right: 2px; color: #7568bc; font-size: 17px; }
.sleepy-live-readout span + span b { color: #539e8b; }
.sleepy-mode-tabs { margin: 18px 0; padding: 5px; background: rgba(229,224,245,.55); border: 1px solid rgba(255,255,255,.8); border-radius: 20px; }
.sleepy-mode-tabs button { min-height: 44px; color: #9690aa; background: transparent; font-size: 13px; font-weight: 650; }
.sleepy-mode-tabs button.active { color: #7966c6; background: rgba(255,255,255,.92); box-shadow: 0 4px 13px rgba(115,102,167,.1); }
.sleepy-ai-signals, .sleepy-schedule-card, .sleepy-content-section { margin-top: 16px; padding: 18px; border-radius: 28px; border-color: rgba(255,255,255,.95); background: rgba(255,255,255,.73); box-shadow: 0 8px 22px rgba(99,92,149,.055); }
.sleepy-ai-signals > small, .sleepy-section-heading > small { color: #8e7ecb; font-size: 11px; font-weight: 650; letter-spacing: .03em; }
.sleepy-ai-signals > div { margin-top: 12px; gap: 8px; }
.sleepy-ai-signals span { display: flex; flex-direction: column; align-items: center; padding: 12px 4px; gap: 5px; border-radius: 18px; background: #f3effb; }
.sleepy-ai-signals span:nth-child(2) { background: #fbeef4; }
.sleepy-ai-signals span:nth-child(3) { background: #ebf6f2; }
.sleepy-ai-signals i { color: #9582cf; font-size: 18px; line-height: 1; }
.sleepy-ai-signals span:nth-child(2) i { color: #ca8daa; }
.sleepy-ai-signals span:nth-child(3) i { color: #70ac9b; }
.sleepy-ai-signals em { color: #8d8a9d; font-size: 9px; font-weight: 500; }
.sleepy-ai-signals strong { color: #5d5776; font-size: 16px; }
.sleepy-schedule-setting { padding-bottom: 0; border-bottom: 0; gap: 10px; }
.sleepy-schedule-setting small { color: #948aa8; font-size: 10px; font-weight: 600; }
.sleepy-time-display { min-width: 138px; border-radius: 18px; border-color: rgba(169,151,224,.35); }
.sleepy-time-display em { color: #9a91aa; font-size: 8px; font-weight: 500; }
.sleepy-switch { max-width: 125px; color: #8a819c; font-size: 10px; font-weight: 500; }
.sleepy-switch i { flex-shrink: 0; }
.sleepy-content-grid { gap: 10px; }
.sleepy-content-grid button { padding: 10px; border: 1px solid rgba(255,255,255,.9); border-radius: 21px; background: #f5f1fc; }
.sleepy-content-grid button + button { background: #edf7f3; }
.sleepy-content-art { height: 74px; border-radius: 15px; background: linear-gradient(140deg, #e3c4d5, #b5a8e1); }
.sleepy-content-art.art-night-1 { background: linear-gradient(140deg, #b4c9df, #b9afe3); }
.sleepy-content-art.art-morning-0 { background: linear-gradient(140deg, #f2cbab, #edd6b1); }
.sleepy-content-art.art-morning-1 { background: linear-gradient(140deg, #a2d4c7, #b2b2e5); }
.sleepy-content-grid small { margin-top: 11px; font-size: 10px; color: #9990a9; font-weight: 500; }
.sleepy-content-grid strong { margin-top: 5px; font-size: 13px; color: #625873; font-weight: 650; }
.sleepy-content-grid em { margin-top: 6px; font-size: 8px; color: #9a88c1; font-weight: 500; }
.sleepy-rhythm-actions { margin-top: 20px; gap: 10px; }
.sleepy-rhythm-actions button { min-height: 52px; border-radius: 20px; font-size: 12px; font-weight: 650; }
.sleepy-start-demo { background: linear-gradient(120deg, #69c8b5, #8d7be0); box-shadow: 0 8px 20px rgba(130,117,191,.17); }
.sleepy-add-automation { background: #eee8fb; color: #8a75bc; }
.sleepy-automation-hint, .sleepy-local-note { font-size: 10px; line-height: 1.8; }
.sleepy-automation-hint { margin-top: 14px; color: #9990a7; }
.sleepy-local-note { color: #7daf9f; font-weight: 500; }
.sleepy-shortcuts-page-header strong { font-size: 18px; }
.sleepy-shortcuts-title p, .sleepy-ai-plan-settings p { font-size: 12px; line-height: 1.75; }
.sleepy-shortcuts-title small, .sleepy-ai-plan-settings small { font-size: 11px; }
.sleepy-personalized-values span { font-size: 9px; }
.sleepy-music-options button > span { font-size: 10px; }
@media (max-width: 350px) {
  .sleepy-rhythm-header { padding-inline: 14px; gap: 6px; }
  .sleepy-rhythm-header strong { font-size: 16px; }
  .sleepy-rhythm-scroll { padding-inline: 14px; }
  .sleepy-ai-signals, .sleepy-schedule-card, .sleepy-content-section { padding: 14px; }
  .sleepy-rhythm-hero h1 { font-size: 22px; }
  .sleepy-switch { max-width: 106px; font-size: 9px; gap: 6px; }
}

/* 2026-08-29 design handoff: finish the three visual fixes from review. */

/* Keep the record-page mascot inside its card with an intentional portrait crop. */
.sleepy-slider-readout {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  justify-content: center;
  gap: 16px;
}

.sleepy-slider-face {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 27px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.98), rgba(240, 237, 255, 0.9));
  box-shadow: 0 10px 22px rgba(69, 73, 116, 0.1);
}

.sleepy-slider-face .sleepy-mood-head {
  width: 104px !important;
  height: auto !important;
  max-width: none !important;
  top: -1px;
  left: 50%;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 7px 9px rgba(78, 72, 150, 0.13));
}

.sleepy-slider-copy {
  width: 100%;
  overflow: hidden;
}

.sleepy-slider-copy strong {
  width: 100%;
  overflow-wrap: anywhere;
}

/* Restore the white heart-shaped pillow light at the top of the rhythm page. */
.sleepy-rhythm-hero {
  overflow: hidden;
}

.sleepy-heart-pillow-visual {
  --pillow-rgb: 255, 178, 105;
  --pillow-power: 0;
  width: 100%;
  height: 176px;
  margin: -5px 0 -4px;
  padding: 0;
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.sleepy-heart-pillow-visual img {
  width: 184px;
  height: 184px;
  position: relative;
  z-index: 2;
  object-fit: contain;
  filter:
    brightness(calc(0.88 + var(--pillow-power) * 0.18))
    saturate(calc(0.92 + var(--pillow-power) * 0.16))
    drop-shadow(0 18px 20px rgba(118, 99, 154, 0.16));
  -webkit-user-select: none;
  user-select: none;
  animation: sleepyHeartPillowBreathe 4.8s ease-in-out infinite;
  transition: filter 240ms ease;
}

.sleepy-heart-pillow-halo {
  width: 164px;
  height: 118px;
  position: absolute;
  z-index: 1;
  top: 31px;
  border-radius: 50%;
  opacity: calc(var(--pillow-power) * 0.96);
  background: radial-gradient(ellipse, rgba(var(--pillow-rgb), 0.86), rgba(var(--pillow-rgb), 0.28) 48%, transparent 72%);
  filter: blur(13px);
  transform: scale(calc(0.84 + var(--pillow-power) * 0.28));
  transition: opacity 220ms linear, transform 220ms ease, background 260ms ease;
}

.sleepy-heart-pillow-core {
  width: 82px;
  height: 68px;
  position: absolute;
  z-index: 3;
  top: 65px;
  left: 50%;
  opacity: calc(var(--pillow-power) * 0.82);
  transform: translateX(-50%) scale(calc(0.76 + var(--pillow-power) * 0.27));
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--pillow-rgb), 0.95), rgba(var(--pillow-rgb), 0.4) 42%, transparent 72%);
  filter: blur(11px);
  mix-blend-mode: soft-light;
  pointer-events: none;
  transition: opacity 180ms linear, transform 220ms ease, background 260ms ease;
}

@keyframes sleepyHeartPillowBreathe {
  0%, 100% { transform: translateY(1px) scale(0.985); }
  50% { transform: translateY(-3px) scale(1.015); }
}

.sleepy-heart-pillow-visual:focus-visible {
  outline: 3px solid rgba(112, 94, 210, 0.3);
  outline-offset: -6px;
  border-radius: 28px;
}

.sleepy-heart-pillow-visual.is-running {
  filter: saturate(1.04);
}

.sleepy-heart-pillow-visual.is-hugged img {
  animation: sleepyHeartPillowHug 520ms cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.sleepy-heart-pillow-visual.is-pressed img {
  animation: none;
  transform: translateY(5px) scale(0.9, 1.06);
  transition: transform 110ms ease-out, filter 160ms ease;
}

@keyframes sleepyHeartPillowHug {
  0%, 100% { transform: translateY(0) scale(1); }
  42% { transform: translateY(5px) scale(0.88, 1.08); }
  70% { transform: translateY(-3px) scale(1.04, 0.96); }
}

/* Replace the rainbow soap-film treatment with Sleepy's lilac/mint glass cards. */
.sleepy-keyword-insights {
  height: 510px;
}

.sleepy-keyword-cloud .sleepy-keyword-bubble {
  width: min(35%, 142px);
  height: 88px;
  padding: 12px 10px;
  opacity: 0.96;
  color: var(--bubble-ink);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 31px;
  background:
    radial-gradient(circle at 82% 10%, var(--bubble-c), transparent 45%),
    linear-gradient(145deg, var(--bubble-a), rgba(255, 255, 255, 0.91) 52%, var(--bubble-b));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 12px 25px rgba(83, 79, 132, 0.11);
  -webkit-backdrop-filter: blur(14px) saturate(1.03);
  backdrop-filter: blur(14px) saturate(1.03);
}

.sleepy-keyword-cloud .sleepy-keyword-bubble::before {
  inset: 5px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 26px;
  background: transparent;
  -webkit-mask: none;
  mask: none;
  filter: none;
  opacity: 1;
}

.sleepy-keyword-cloud .sleepy-keyword-bubble::after {
  width: 32px;
  height: 11px;
  inset: 10px auto auto 16px;
  padding: 0;
  border-radius: 50%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0));
  -webkit-mask: none;
  mask: none;
  filter: blur(1px);
  opacity: 0.8;
  transform: rotate(-10deg);
}

.sleepy-keyword-cloud .sleepy-keyword-bubble > strong {
  color: inherit;
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.015em;
  text-shadow: 0 1px 4px rgba(255, 255, 255, 0.86);
}

.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(4n + 1),
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(2n),
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(3n) {
  border-radius: 31px;
}

.sleepy-keyword-cloud .sleepy-keyword-bubble.is-muted {
  opacity: 0.35;
  filter: saturate(0.72);
}

.sleepy-keyword-cloud .sleepy-keyword-bubble.is-selected {
  opacity: 1;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.9);
  background:
    radial-gradient(circle at 25% 12%, rgba(255, 255, 255, 0.42), transparent 28%),
    linear-gradient(145deg, var(--bubble-select-a), var(--bubble-select-b));
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.65), 0 15px 30px var(--bubble-select-glow);
}

@media (prefers-reduced-motion: reduce) {
  .sleepy-heart-pillow-visual img,
  .sleepy-heart-pillow-halo,
  .sleepy-heart-pillow-core,
  .sleepy-keyword-bubble {
    animation: none !important;
  }
}

/* Final cascade: pack the organic pastel bubbles into one full-screen cluster. */
.sleepy-keyword-insights { height:clamp(620px,calc(100dvh - 150px),700px); overflow:hidden; }
.sleepy-keyword-cloud { position:relative; width:100%; height:100%; overflow:visible; }
.sleepy-keyword-cloud .sleepy-keyword-bubble,
.sleepy-keyword-cloud .sleepy-keyword-bubble.is-selected {
  width:min(43%,168px); height:120px; padding:17px 14px; right:auto; opacity:.97;
  color:#344158; border:1px solid rgba(255,255,255,.76);
  border-radius:49% 51% 55% 45% / 44% 57% 43% 56%;
  background:radial-gradient(circle at 24% 18%,rgba(255,255,255,.52),transparent 31%),radial-gradient(circle at 78% 76%,var(--cluster-b),transparent 62%),linear-gradient(145deg,var(--cluster-a) 0%,var(--cluster-a) 38%,var(--cluster-b) 100%);
  box-shadow:inset 0 2px 0 rgba(255,255,255,.82),inset 0 -8px 20px rgba(255,255,255,.2),0 14px 32px rgba(74,76,120,.12);
  -webkit-backdrop-filter:blur(10px) saturate(1.08); backdrop-filter:blur(10px) saturate(1.08);
}
.sleepy-keyword-cloud .sleepy-keyword-bubble::before { inset:7px; padding:0; border:1px solid rgba(255,255,255,.55); border-radius:inherit; background:transparent; -webkit-mask:none; mask:none; filter:none; opacity:1; }
.sleepy-keyword-cloud .sleepy-keyword-bubble::after { width:52px; height:16px; inset:15px auto auto 23px; padding:0; border-radius:50%; background:linear-gradient(90deg,rgba(255,255,255,.76),rgba(255,255,255,0)); -webkit-mask:none; mask:none; filter:blur(1px); opacity:.72; transform:rotate(-10deg); }
.sleepy-keyword-cloud .sleepy-keyword-bubble > strong,
.sleepy-keyword-cloud .sleepy-keyword-bubble.is-selected > strong { color:#344158; font-size:16px; font-weight:800; line-height:1.35; text-shadow:0 1px 5px rgba(255,255,255,.84); }
.sleepy-keyword-cloud .sleepy-keyword-bubble.is-selected { opacity:1; border-color:rgba(111,96,200,.3); box-shadow:0 0 0 4px rgba(255,255,255,.72),0 17px 36px rgba(98,86,176,.22); }
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(4n + 1) { border-radius:45% 55% 61% 39% / 48% 39% 61% 52%; }
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(2n) { border-radius:62% 38% 45% 55% / 41% 58% 42% 59%; }
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(3n) { border-radius:42% 58% 54% 46% / 63% 44% 56% 37%; }
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(1) { width:min(42%,164px); height:124px; left:-3%; top:8px; --bubble-rotate:-7deg; z-index:1; }
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(2) { width:min(44%,172px); height:128px; left:40%; top:21px; --bubble-rotate:6deg; z-index:2; }
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(3) { width:min(43%,168px); height:126px; left:27%; top:140px; --bubble-rotate:-4deg; z-index:3; }
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(4) { width:min(39%,152px); height:118px; left:-6%; top:267px; --bubble-rotate:6deg; z-index:4; }
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(5) { width:min(42%,164px); height:126px; left:30%; top:246px; --bubble-rotate:-5deg; z-index:5; }
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(6) { width:min(40%,156px); height:120px; left:66%; top:274px; --bubble-rotate:7deg; z-index:6; }
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(7) { width:min(43%,168px); height:128px; left:3%; top:406px; --bubble-rotate:5deg; z-index:7; }
.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(8) { width:min(41%,160px); height:122px; left:50%; top:431px; --bubble-rotate:-7deg; z-index:8; }

.sleepy-keyword-bubble.tone-violet,
.sleepy-keyword-bubble.tone-lavender { --cluster-a:#d8ceff; --cluster-b:#efc9e8; }
.sleepy-keyword-bubble.tone-indigo { --cluster-a:#cbd8ff; --cluster-b:#dfcff5; }
.sleepy-keyword-bubble.tone-blue { --cluster-a:#c5e7fa; --cluster-b:#d4ddff; }
.sleepy-keyword-bubble.tone-rose,
.sleepy-keyword-bubble.tone-pink { --cluster-a:#f5c8dc; --cluster-b:#e4d1f7; }
.sleepy-keyword-bubble.tone-amber,
.sleepy-keyword-bubble.tone-orange { --cluster-a:#f4d5a4; --cluster-b:#efc8d6; }
.sleepy-keyword-bubble.tone-mint,
.sleepy-keyword-bubble.tone-cyan { --cluster-a:#bce8dc; --cluster-b:#c9e1f6; }
.sleepy-keyword-bubble.tone-green { --cluster-a:#cde6b9; --cluster-b:#bee3dc; }

/* The bubble body stays visibly pastel; override the older translucent film rule. */
.sleepy-keyword-cloud .sleepy-keyword-bubble:not(.is-selected) {
  background-color: transparent !important;
  background-image:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,.42), transparent 31%),
    radial-gradient(circle at 78% 76%, var(--cluster-b), transparent 62%),
    linear-gradient(145deg, var(--cluster-a) 0%, var(--cluster-a) 38%, var(--cluster-b) 100%) !important;
  border-color: rgba(255,255,255,.42) !important;
}

/* Airier translucent colors; text remains fully opaque. */
.sleepy-keyword-bubble.tone-violet,
.sleepy-keyword-bubble.tone-lavender { --cluster-a:rgba(174,155,246,.34); --cluster-b:rgba(231,151,207,.29); --cluster-selected-a:rgba(174,155,246,.56); --cluster-selected-b:rgba(231,151,207,.48); }
.sleepy-keyword-bubble.tone-indigo { --cluster-a:rgba(142,167,244,.33); --cluster-b:rgba(196,155,229,.28); --cluster-selected-a:rgba(142,167,244,.55); --cluster-selected-b:rgba(196,155,229,.47); }
.sleepy-keyword-bubble.tone-blue { --cluster-a:rgba(120,195,234,.32); --cluster-b:rgba(151,169,241,.28); --cluster-selected-a:rgba(120,195,234,.54); --cluster-selected-b:rgba(151,169,241,.46); }
.sleepy-keyword-bubble.tone-rose,
.sleepy-keyword-bubble.tone-pink { --cluster-a:rgba(235,144,184,.32); --cluster-b:rgba(191,154,232,.28); --cluster-selected-a:rgba(235,144,184,.53); --cluster-selected-b:rgba(191,154,232,.46); }
.sleepy-keyword-bubble.tone-amber,
.sleepy-keyword-bubble.tone-orange { --cluster-a:rgba(237,181,90,.32); --cluster-b:rgba(229,139,164,.28); --cluster-selected-a:rgba(237,181,90,.54); --cluster-selected-b:rgba(229,139,164,.46); }
.sleepy-keyword-bubble.tone-mint,
.sleepy-keyword-bubble.tone-cyan { --cluster-a:rgba(103,201,177,.31); --cluster-b:rgba(126,180,230,.27); --cluster-selected-a:rgba(103,201,177,.52); --cluster-selected-b:rgba(126,180,230,.45); }
.sleepy-keyword-bubble.tone-green { --cluster-a:rgba(148,201,105,.31); --cluster-b:rgba(91,191,172,.27); --cluster-selected-a:rgba(148,201,105,.52); --cluster-selected-b:rgba(91,191,172,.45); }

.sleepy-keyword-cloud .sleepy-keyword-bubble.is-selected {
  background-color: var(--cluster-selected-a) !important;
  background-image:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,.34), transparent 30%),
    linear-gradient(145deg, var(--cluster-selected-a), var(--cluster-selected-b)) !important;
  border-color: rgba(255,255,255,.55) !important;
  filter: saturate(1.08);
}

.sleepy-keyword-cloud .sleepy-keyword-bubble::before {
  content: none !important;
  display: none !important;
}

.sleepy-keyword-cloud .sleepy-keyword-bubble::after {
  opacity: .38;
}

.sleepy-support-chat-intro .sleepy-support-static-avatar,
.sleepy-support-avatar {
  object-fit: contain;
  object-position: center;
  background: linear-gradient(145deg, rgba(239,235,255,.96), rgba(220,248,241,.96));
}
.sleepy-support-chat-intro .sleepy-support-static-avatar { width:54px; height:54px; padding:1px; border-radius:18px; }
.sleepy-support-avatar { width:42px; height:42px; padding:1px; border-radius:15px; }

.cl-content,
.sleepy-rhythm-scroll,
.sleepy-support-chat-body,
.sleepy-shortcuts-card {
  overflow-x: hidden !important;
  overscroll-behavior-x: none;
  touch-action: pan-y;
}

html,
body,
.cl-app,
.cl-phone {
  max-width: 100%;
  overflow-x: hidden !important;
  overscroll-behavior-x: none;
}

.cl-me > header h1 {
  font-family: "Arial Black", "SF Pro Display", "PingFang SC", sans-serif;
  font-weight: 950;
  letter-spacing: -.065em;
  text-transform: uppercase;
}

.sleepy-shortcut-download {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 13px;
  margin: 14px 0 18px;
  padding: 14px;
  color: #344159;
  text-decoration: none;
  border: 1px solid rgba(126, 111, 224, .18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 12%, rgba(93, 213, 191, .2), transparent 38%),
    linear-gradient(135deg, rgba(247, 244, 255, .98), rgba(235, 248, 246, .94));
  box-shadow: 0 12px 28px rgba(105, 92, 169, .1);
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.sleepy-shortcut-download:active {
  transform: scale(.985);
}

.sleepy-shortcut-download-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: white;
  font-size: 30px;
  font-weight: 800;
  background: linear-gradient(145deg, #9a82f1, #5aa8df 58%, #55cdb2);
  box-shadow: 0 9px 20px rgba(103, 91, 213, .2);
}

.sleepy-shortcut-download-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.sleepy-shortcut-download-copy small {
  color: #7a68db;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.sleepy-shortcut-download-copy strong {
  font-size: 16px;
  line-height: 1.35;
}

.sleepy-shortcut-download-copy em {
  color: #7f8ba0;
  font-size: 11px;
  font-style: normal;
  line-height: 1.4;
}

.sleepy-shortcut-download-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #6759d6;
  font-size: 20px;
  font-weight: 900;
  background: rgba(255, 255, 255, .82);
}

.sleepy-shortcut-download-status {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -25px;
  min-height: 18px;
  color: #738196;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.sleepy-shortcut-download-status[data-state="success"] { color: #338e7d; }
.sleepy-shortcut-download-status[data-state="error"] { color: #bf5578; }

/* Crop the HD expression art to a consistent upper-body chat portrait. */
.sleepy-support-static-avatar-frame,
.sleepy-support-avatar-frame {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.9);
  background: linear-gradient(145deg, rgba(239,235,255,.96), rgba(220,248,241,.96));
  box-shadow: 0 7px 15px rgba(74,73,118,.12);
}
.sleepy-support-static-avatar-frame { width:54px; height:54px; border-radius:18px; }
.sleepy-support-avatar-frame { width:42px; height:42px; border-radius:15px; }
.sleepy-support-static-avatar-frame .sleepy-support-static-avatar,
.sleepy-support-avatar-frame .sleepy-support-avatar {
  width:100%;
  height:100%;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  object-fit:contain;
  transform:scale(1.55) translateY(7%);
  transform-origin:center center;
}

/* Let the home gradient continue behind the status bar and Dynamic Island. */
.cl-phone:has(.cl-today) {
  background:
    radial-gradient(circle at 84% 5%, rgba(219,208,255,.6), transparent 29%),
    radial-gradient(circle at 7% 19%, rgba(188,238,229,.38), transparent 31%),
    linear-gradient(180deg,#f8f7ff,#f3f8f7);
}
.cl-phone:has(.cl-today) .cl-status,
.cl-phone:has(.cl-today) .cl-today {
  background: transparent;
}

.cl-phone:has(.cl-calendar) {
  background:
    radial-gradient(circle at 14% 8%, rgba(92,218,197,.32), transparent 31%),
    radial-gradient(circle at 92% 5%, rgba(205,196,255,.58), transparent 32%),
    linear-gradient(180deg,#f4f3ff,#f7f9fc);
}
.cl-phone:has(.cl-calendar) .cl-calendar { background:transparent; }

.cl-phone:has(.cl-calendar-visual.live-month) {
  background:
    radial-gradient(circle at 25% 18%, rgba(84,224,200,.76), transparent 30%),
    radial-gradient(circle at 82% 56%, rgba(69,182,202,.7), transparent 36%),
    linear-gradient(145deg,#dce7ff,#eadcff 52%,#c7c7da);
}
.cl-phone:has(.cl-calendar-visual.live-month) .cl-calendar-visual.live-month {
  background:transparent;
}

.cl-phone:has(.cl-patterns) {
  background:
    radial-gradient(circle at 88% 6%, rgba(243,177,211,.38), transparent 31%),
    radial-gradient(circle at 4% 22%, rgba(199,236,229,.28), transparent 32%),
    linear-gradient(180deg,#f7f5ff,#f8f8fc);
}
.cl-phone:has(.cl-patterns) .cl-patterns { background:transparent; }

.cl-phone:has(.cl-me) {
  background:
    radial-gradient(circle at 9% 7%, rgba(92,209,187,.33), transparent 31%),
    radial-gradient(circle at 91% 8%, rgba(216,203,255,.48), transparent 32%),
    linear-gradient(180deg,#f5f9f8,#f7f6fc);
}
.cl-phone:has(.cl-me) .cl-me { background:transparent; }

.cl-phone .cl-status { background:transparent; }

/* Larger, more legible source marks in Sound settings. */
.sleepy-music-current > b,
.sleepy-music-options button > i {
  width:52px;
  height:52px;
  border-radius:18px;
  font-size:19px;
}
.sleepy-music-current { min-height:78px; }
.sleepy-music-options button {
  min-height:78px;
  grid-template-columns:52px minmax(0,1fr) 22px;
}

.sleepy-keyword-cloud .sleepy-keyword-bubble > strong,
.sleepy-keyword-cloud .sleepy-keyword-bubble.is-selected > strong {
  color: #fff;
  font-size: 18px;
  font-weight: 780;
  letter-spacing: .01em;
  text-shadow: 0 2px 7px rgba(72, 78, 123, .32);
}

/* Photoreal liquid-glass keyword bubbles. Keep the fill translucent so the
   page color remains visible, while the copy stays solid and legible. */
.sleepy-keyword-cloud .sleepy-keyword-bubble,
.sleepy-keyword-cloud .sleepy-keyword-bubble:not(.is-selected),
.sleepy-keyword-cloud .sleepy-keyword-bubble.is-selected {
  --liquid-a: rgba(184, 164, 241, .17);
  --liquid-b: rgba(243, 178, 215, .15);
  --liquid-edge: rgba(125, 104, 181, .34);
  --liquid-depth: rgba(111, 94, 158, .16);
  opacity: 1;
  filter: saturate(1);
  color: #46516d;
  border: 1px solid var(--liquid-edge) !important;
  background-color: rgba(255,255,255,.08) !important;
  background-image:
    radial-gradient(ellipse at 18% 13%, rgba(255,255,255,.74) 0 5%, rgba(255,255,255,.24) 15%, transparent 34%),
    radial-gradient(ellipse at 84% 82%, var(--liquid-b), transparent 58%),
    linear-gradient(142deg, rgba(255,255,255,.22), var(--liquid-a) 47%, rgba(255,255,255,.06) 72%, var(--liquid-b)) !important;
  box-shadow:
    inset 2px 3px 6px rgba(255,255,255,.78),
    inset -3px -5px 9px var(--liquid-depth),
    inset 0 0 0 2px rgba(255,255,255,.16),
    0 12px 25px rgba(77,71,119,.10),
    0 2px 3px rgba(116,94,155,.13);
  -webkit-backdrop-filter: blur(13px) saturate(1.12);
  backdrop-filter: blur(13px) saturate(1.12);
}

.sleepy-keyword-cloud .sleepy-keyword-bubble::before {
  content: "" !important;
  display: block !important;
  position: absolute;
  inset: 4px 7px 6px 4px;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background:
    radial-gradient(ellipse at 17% 16%, rgba(255,255,255,.72) 0 4%, rgba(255,255,255,.25) 13%, transparent 28%),
    radial-gradient(ellipse at 88% 72%, rgba(255,255,255,.17), transparent 38%);
  -webkit-mask: none;
  mask: none;
  filter: blur(.2px);
  opacity: .82;
  pointer-events: none;
}

.sleepy-keyword-cloud .sleepy-keyword-bubble::after {
  content: "";
  display: block;
  width: 38%;
  height: 10%;
  inset: 11% auto auto 16%;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(90deg, rgba(255,255,255,.72), rgba(255,255,255,.2) 62%, transparent);
  filter: blur(1.4px);
  opacity: .68;
  transform: rotate(-9deg);
  pointer-events: none;
}

.sleepy-keyword-cloud .sleepy-keyword-bubble > strong,
.sleepy-keyword-cloud .sleepy-keyword-bubble.is-selected > strong {
  position: relative;
  z-index: 2;
  color: #46516d;
  font-size: 18px;
  font-weight: 780;
  letter-spacing: .01em;
  text-shadow: 0 1px 5px rgba(255,255,255,.92);
}

.sleepy-keyword-cloud .sleepy-keyword-bubble.is-selected {
  --liquid-a: rgba(167, 139, 236, .40);
  --liquid-b: rgba(235, 145, 202, .34);
  --liquid-edge: rgba(105, 81, 169, .48);
  --liquid-depth: rgba(93, 70, 151, .22);
  filter: saturate(1.05);
  box-shadow:
    inset 2px 3px 7px rgba(255,255,255,.82),
    inset -4px -6px 11px var(--liquid-depth),
    inset 0 0 0 2px rgba(255,255,255,.2),
    0 15px 31px rgba(91,76,156,.19),
    0 2px 4px rgba(95,77,142,.18);
}

.sleepy-keyword-cloud .sleepy-keyword-bubble.tone-blue:not(.is-selected),
.sleepy-keyword-cloud .sleepy-keyword-bubble.tone-cyan:not(.is-selected) { --liquid-a:rgba(125,200,235,.18); --liquid-b:rgba(170,160,235,.14); --liquid-edge:rgba(79,143,192,.33); --liquid-depth:rgba(65,119,171,.15); }
.sleepy-keyword-cloud .sleepy-keyword-bubble.tone-mint:not(.is-selected),
.sleepy-keyword-cloud .sleepy-keyword-bubble.tone-green:not(.is-selected) { --liquid-a:rgba(111,207,179,.17); --liquid-b:rgba(177,207,125,.14); --liquid-edge:rgba(70,156,133,.31); --liquid-depth:rgba(58,135,115,.14); }
.sleepy-keyword-cloud .sleepy-keyword-bubble.tone-rose:not(.is-selected),
.sleepy-keyword-cloud .sleepy-keyword-bubble.tone-pink:not(.is-selected) { --liquid-a:rgba(237,148,190,.17); --liquid-b:rgba(180,146,228,.14); --liquid-edge:rgba(185,93,143,.31); --liquid-depth:rgba(159,78,126,.14); }
.sleepy-keyword-cloud .sleepy-keyword-bubble.tone-amber:not(.is-selected),
.sleepy-keyword-cloud .sleepy-keyword-bubble.tone-orange:not(.is-selected) { --liquid-a:rgba(237,181,102,.18); --liquid-b:rgba(231,142,172,.14); --liquid-edge:rgba(190,129,69,.31); --liquid-depth:rgba(157,104,58,.14); }

.sleepy-keyword-bubble.tone-blue.is-selected,
.sleepy-keyword-bubble.tone-cyan.is-selected { --liquid-a:rgba(105,190,231,.41); --liquid-b:rgba(151,139,225,.32); --liquid-edge:rgba(58,126,181,.47); }
.sleepy-keyword-bubble.tone-mint.is-selected,
.sleepy-keyword-bubble.tone-green.is-selected { --liquid-a:rgba(85,196,163,.40); --liquid-b:rgba(157,195,98,.31); --liquid-edge:rgba(50,139,116,.45); }
.sleepy-keyword-bubble.tone-rose.is-selected,
.sleepy-keyword-bubble.tone-pink.is-selected { --liquid-a:rgba(228,124,174,.40); --liquid-b:rgba(162,123,216,.31); --liquid-edge:rgba(170,72,125,.45); }
.sleepy-keyword-bubble.tone-amber.is-selected,
.sleepy-keyword-bubble.tone-orange.is-selected { --liquid-a:rgba(231,163,69,.41); --liquid-b:rgba(220,119,151,.31); --liquid-edge:rgba(174,108,48,.45); }

/* Use the reference-matched rendered liquid membrane; the original app
   gradient remains visible through the PNG and the solid text stays above it. */
.sleepy-keyword-insights {
  height: 570px;
  margin-bottom: -34px;
  overflow: visible;
}

.sleepy-keyword-cloud .sleepy-keyword-bubble,
.sleepy-keyword-cloud .sleepy-keyword-bubble:not(.is-selected),
.sleepy-keyword-cloud .sleepy-keyword-bubble.is-selected {
  overflow: visible;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.sleepy-keyword-cloud .sleepy-keyword-bubble::before {
  content: "" !important;
  display: block !important;
  position: absolute;
  z-index: 0;
  inset: -15px -20px;
  border: 0;
  border-radius: 0;
  background: url('/sleepy/demo/app/assets/sleepy-liquid-bubble-a-v1.png') center / 100% 100% no-repeat;
  filter: saturate(.72) brightness(1.05);
  opacity: .58;
  pointer-events: none;
}

.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(even)::before {
  transform: scaleX(-1) rotate(3deg);
}

.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(3n)::before {
  background-image: url('/sleepy/demo/app/assets/sleepy-liquid-bubble-b-v1.png');
  transform: rotate(-3deg);
}

.sleepy-keyword-cloud .sleepy-keyword-bubble:nth-child(5n)::before {
  background-image: url('/sleepy/demo/app/assets/sleepy-liquid-bubble-b-v1.png');
  transform: scaleX(-1) rotate(5deg);
}

.sleepy-keyword-cloud .sleepy-keyword-bubble::after {
  content: none;
  display: none;
}

.sleepy-keyword-cloud .sleepy-keyword-bubble.is-selected::before {
  opacity: .84;
  filter: saturate(.94) brightness(1.01);
}

.sleepy-keyword-cloud .sleepy-keyword-bubble.is-muted::before {
  opacity: .34;
}

.sleepy-keyword-cloud .sleepy-keyword-bubble > strong,
.sleepy-keyword-cloud .sleepy-keyword-bubble.is-selected > strong {
  color: #46516d;
  text-shadow: 0 1px 5px rgba(255,255,255,.96);
}

/* Larger sound-source typography. */
.sleepy-music-current small {
  font-size: 14px;
  font-weight: 720;
}

.sleepy-music-current strong {
  font-size: 22px;
  line-height: 1.2;
}

.sleepy-music-options button > span,
.sleepy-music-options button > strong {
  font-size: 17px;
  font-weight: 720;
  line-height: 1.3;
}

.sleepy-shortcut-demo {
  margin: 16px 0 24px;
  padding: 18px;
  border: 1px solid rgba(126, 111, 224, .18);
  border-radius: 24px;
  background: linear-gradient(135deg, #f7f4ff, #ebf8f6);
  color: #344159;
}
.sleepy-shortcut-demo > strong { font-size: 17px; }
.sleepy-shortcut-demo p { margin: 8px 0 14px; font-size: 13px; line-height: 1.65; }
.sleepy-run-shortcut-demo {
  width: 100%; padding: 13px 16px; border: 0; border-radius: 16px;
  background: #7863d6; color: white; font: inherit; font-weight: 700; cursor: pointer;
}
.sleepy-run-shortcut-demo:disabled { opacity: .55; cursor: default; }
.sleepy-install-shortcut-demo { display: block; position: relative; margin: 14px 0 8px; color: #6759d6; font-size: 12px; }
.sleepy-shortcut-demo small { display: block; color: #738196; font-size: 11px; line-height: 1.6; }
.sleepy-demo-status { display: block; font-size: 12px; line-height: 1.6; color: #6759d6; }
.sleepy-demo-status:not(:empty) { margin-top: 10px; }
.sleepy-install-shortcut-demo .sleepy-shortcut-download-status { position: static; display: block; text-align: left; }
.sleepy-shortcut-demo[hidden], .sleepy-shortcut-download[hidden] { display: none; }
.sleepy-mode-badge { position: fixed; z-index: 9999; top: max(8px, env(safe-area-inset-top)); right: 14px; padding: 5px 9px; border-radius: 10px; background: #f0ebff; color: #6956ba; font-size: 10px; pointer-events: none; }
.sleepy-mode-reset { display: block; padding: 10px 0; border: 0; color: #6759d6; background: transparent; font: inherit; font-size: 12px; cursor: pointer; }
.sleepy-health-settings select { max-width: 100%; padding: 8px; border: 1px solid #d6cff0; border-radius: 8px; font: inherit; font-size: 12px; }
.sleepy-health-settings label { font-size: 12px; }
.sleepy-health-nights p { border-bottom: 1px solid #e7e2f2; padding-bottom: 8px; font-size: 12px; }
.sleepy-settings-list { margin:16px 0 24px; border-radius:28px; background:#fff; overflow:hidden; }
.sleepy-settings-row { display:flex; align-items:center; gap:16px; width:100%; padding:20px; border:0; border-bottom:1px solid #edf0f5; background:transparent; text-align:left; font:inherit; cursor:pointer; color:#17243d; }
.sleepy-settings-row:last-of-type { border-bottom:0; }
.sleepy-settings-row > svg { flex:0 0 24px; width:24px; height:24px; color:#705bff; }
.sleepy-settings-row > span:not(.sleepy-settings-chevron) { flex:1; min-width:0; }
.sleepy-settings-row strong { display:block; font-size:16px; line-height:1.5; }
.sleepy-settings-row small { display:block; margin-top:4px; color:#8c99ad; font-size:12px; line-height:1.5; }
.sleepy-settings-chevron { font-size:25px; color:#9ba7b8; }
.sleepy-settings-row:active { background:#f7f4ff; }
.sleepy-settings-row:focus-visible { outline:2px solid #7863d6; outline-offset:-4px; }
.sleepy-settings-dialog { box-sizing:border-box; width:calc(100% - 24px); max-width:480px; max-height:calc(100dvh - 112px); padding:0; border:1px solid #e9e4f5; border-radius:28px; background:#f7f7fc; color:#17243d; box-shadow:0 20px 70px #34245230; overflow:hidden; }
.sleepy-settings-dialog[open] { display:flex; flex-direction:column; }
.sleepy-settings-dialog::backdrop { background:rgba(35,30,53,.32); }
.sleepy-settings-dialog > header { display:flex; align-items:center; gap:12px; padding:16px; border-bottom:1px solid #e9e4f5; flex-shrink:0; background:#fff; }
.sleepy-settings-dialog h2 { margin:0; font-size:18px; line-height:1.5; }
.sleepy-settings-dialog header button { width:40px; height:40px; border:0; border-radius:14px; background:#f5f2ff; color:#705bff; font-size:30px; cursor:pointer; }
.sleepy-settings-content { overflow-y:auto; overscroll-behavior:contain; padding:0 14px; }
.sleepy-settings-content > [hidden] { display:none; }
.sleepy-settings-content .sleepy-shortcut-demo { margin:14px 0; }
.sleepy-settings-content select { max-width:100%; }
.sleepy-special-event-switch {
  display:flex; align-items:center; gap:14px; position:relative;
  padding:20px 16px; margin:24px 0 12px; border-radius:22px;
  background:rgba(255,255,255,.75); border:1px solid rgba(125,108,206,.2);
  text-align:left; cursor:pointer; touch-action:pan-y;
}
.sleepy-special-event-switch span {flex:1; font-size:16px; color:#4b456b;}
.sleepy-special-event-switch input {position:absolute; opacity:0; width:52px; height:32px; right:16px; cursor:pointer;}
.sleepy-special-event-switch i {width:52px; height:32px; flex:none; border-radius:20px; background:#d8d6e3; transition:background .2s; pointer-events:none;}
.sleepy-special-event-switch i::after {content:''; display:block; width:26px; height:26px; margin:3px; border-radius:50%; background:white; box-shadow:0 1px 4px #0002; transition:transform .2s;}
.sleepy-special-event-switch input:checked + i {background:#8070ce;}
.sleepy-special-event-switch input:checked + i::after {transform:translateX(20px);}
.sleepy-special-event-switch input:focus-visible + i {outline:3px solid #b6a4ea; outline-offset:3px;}
.sleepy-special-event-hint {font-size:13px; line-height:1.7; color:#77718a;}

/* 2026-09-13: pillow controls share the journal's mint/lilac canvas and violet actions. */
.sleepy-rhythm-page {
  --rhythm-ink:#17243d;
  --rhythm-muted:#738198;
  --rhythm-accent:#6955ee;
  color:var(--rhythm-ink);
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Helvetica Neue",sans-serif;
  background:radial-gradient(circle at 9% 7%,rgba(92,209,187,.33),transparent 31%),radial-gradient(circle at 91% 8%,rgba(216,203,255,.48),transparent 32%),linear-gradient(180deg,#f5f9f8,#f7f6fc);
}
.sleepy-rhythm-header { grid-template-columns:44px minmax(0,1fr) auto; padding-left:20px; padding-right:20px; background:rgba(247,249,251,.86); border-bottom:1px solid rgba(255,255,255,.65); box-shadow:none; }
.sleepy-rhythm-header strong { color:var(--rhythm-ink); font-family:inherit; font-size:19px; font-weight:750; }
.sleepy-rhythm-header small { color:var(--rhythm-accent); font-weight:700; font-size:8px; }
.sleepy-rhythm-close { width:44px; height:44px; color:var(--rhythm-accent); border:0; border-radius:16px; box-shadow:none; }
.sleepy-demo-connection { min-height:44px; padding:0 12px; color:#667389; font-size:11px; font-weight:600; border:1px solid #edf0f5; border-radius:16px; background:#fff; }
.sleepy-rhythm-scroll { padding:16px 20px calc(32px + env(safe-area-inset-bottom,0px)); }
.sleepy-rhythm-hero { margin:0; padding:12px 12px 16px; border:1px solid rgba(255,255,255,.92); border-radius:28px; background:rgba(255,255,255,.55); box-shadow:none; }
.sleepy-rhythm-page .sleepy-heart-pillow-visual { height:168px; margin:0; }
.sleepy-rhythm-page .sleepy-heart-pillow-visual img { width:180px; height:180px; }
.sleepy-live-readout { gap:10px; }
.sleepy-live-readout span,
.sleepy-live-readout span + span { min-width:0; flex:1; padding:10px 8px; border:0; border-radius:16px; color:var(--rhythm-muted); background:rgba(255,255,255,.9); box-shadow:none; font-size:12px; font-weight:500; }
.sleepy-live-readout b,
.sleepy-live-readout span + span b { color:var(--rhythm-ink); font-family:inherit; font-size:20px; font-weight:700; font-variant-numeric:tabular-nums; }
.sleepy-mode-tabs { margin:20px 0; padding:4px; border:0; border-radius:20px; background:#e9eaf2; }
.sleepy-mode-tabs button { min-height:46px; border-radius:16px; color:#728097; font-size:14px; font-weight:650; }
.sleepy-mode-tabs button.active { color:var(--rhythm-accent); box-shadow:0 3px 10px rgba(31,42,68,.05); }
.sleepy-ai-signals,
.sleepy-schedule-card { margin-top:16px; padding:18px; border:0; border-radius:28px; background:#fff; box-shadow:none; }
.sleepy-ai-signals > small { color:var(--rhythm-ink); font-size:13px; font-weight:650; letter-spacing:0; }
.sleepy-ai-signals > div { gap:8px; margin-top:14px; }
.sleepy-ai-signals span { padding:12px 4px; border-radius:18px; }
.sleepy-ai-signals span:nth-child(1) { background:#f3efff; }
.sleepy-ai-signals span:nth-child(2) { background:#fcf0f6; }
.sleepy-ai-signals span:nth-child(3) { background:#eaf7f3; }
.sleepy-ai-signals i { color:var(--rhythm-accent); }
.sleepy-ai-signals span:nth-child(2) i { color:#ba6692; }
.sleepy-ai-signals span:nth-child(3) i { color:#3c9886; }
.sleepy-ai-signals em { color:#6d7890; font-size:11px; font-weight:500; }
.sleepy-ai-signals strong { color:var(--rhythm-ink); font-family:inherit; font-size:18px; font-weight:700; font-variant-numeric:tabular-nums; }
.sleepy-schedule-setting { gap:10px; }
.sleepy-schedule-setting small { color:#647188; font-size:12px; font-weight:600; }
.sleepy-time-display { min-width:138px; padding:9px; background:#f6f4fe; border:1px solid #e7e1fc; border-radius:18px; box-shadow:none; }
.sleepy-time-display i { color:var(--rhythm-accent); background:#ebe6ff; border-radius:12px; }
.sleepy-time-display .sleepy-time-input { width:82px; color:var(--rhythm-ink); font-family:inherit; font-variant-numeric:tabular-nums; font-size:23px !important; font-weight:700; }
.sleepy-time-display em { color:#78849a; font-size:10px; font-weight:500; }
.sleepy-rhythm-page .sleepy-switch { gap:8px; color:#637086; font-size:11px; font-weight:600; }
.sleepy-rhythm-page .sleepy-switch input:checked + i { background:var(--rhythm-accent); }
.sleepy-schedule-card > p { color:#56657e; font-size:13px; line-height:1.65; }
.sleepy-schedule-card > small { display:block; color:var(--rhythm-muted); font-size:11px; line-height:1.65; }
.sleepy-rhythm-actions { margin-top:20px; gap:10px; grid-template-columns:1.3fr 1fr; }
.sleepy-rhythm-actions button { min-height:52px; border:0; border-radius:20px; font-family:inherit; font-size:14px; font-weight:650; }
.sleepy-start-demo { background:var(--rhythm-accent); box-shadow:0 7px 18px rgba(105,85,238,.16); }
.sleepy-add-automation { color:var(--rhythm-accent); background:#eeebff; }
.sleepy-rhythm-page button:focus-visible { outline:2px solid var(--rhythm-accent); outline-offset:3px; }
.sleepy-rhythm-page .sleepy-automation-hint,
.sleepy-rhythm-page .sleepy-local-note { color:var(--rhythm-muted); font-size:11px; line-height:1.65; font-weight:500; }
.sleepy-rhythm-page.shortcut-settings-open .sleepy-shortcuts-card { color:var(--rhythm-ink); background:radial-gradient(circle at 10% 5%,#ddf3ef,transparent 40%),radial-gradient(circle at 95% 8%,#e9e2ff,transparent 35%),#f7f8fc; }
.sleepy-shortcuts-page-header { background:rgba(247,249,251,.92); }
.sleepy-shortcuts-page-header strong { color:#17243d; font-family:inherit; font-weight:750; }
.sleepy-shortcuts-title,
.sleepy-rhythm-page .sleepy-ai-plan-settings { background:#fff; border:0; box-shadow:none; border-radius:24px; }
.sleepy-rhythm-page .sleepy-ai-spark { color:var(--rhythm-accent); background:#eeebff; box-shadow:none; }
.sleepy-rhythm-page .sleepy-music-current { background:#fff; border-color:#e9e6f4; box-shadow:none; }
.sleepy-rhythm-page .sleepy-music-current strong { color:var(--rhythm-ink); font-family:inherit; }
.sleepy-rhythm-page .sleepy-music-options button.active { background:#f2efff; border-color:#c8bdf8; }
.sleepy-rhythm-page .sleepy-schedule-setting { flex-wrap:wrap; }
.sleepy-rhythm-page .sleepy-switch { min-height:44px; cursor:pointer; }
.sleepy-rhythm-page .sleepy-switch span { white-space:nowrap; }
.sleepy-rhythm-page .sleepy-switch i { flex-shrink:0; }
.sleepy-rhythm-page .sleepy-switch input:focus-visible + i { outline:2px solid var(--rhythm-accent); outline-offset:3px; }
.sleepy-demo-control-entry { position:fixed; right:16px; bottom:calc(102px + env(safe-area-inset-bottom,0px)); z-index:9990; border:1px solid #dfd7fc; border-radius:16px; padding:12px 16px; background:#fff; color:#6955ee; box-shadow:0 5px 18px #4a39721a; font:600 13px -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif; cursor:pointer; }
body:has(.sleepy-rhythm-layer,.cl-sheet-backdrop,dialog[open],.cl-summary-page,.sleepy-support-chat-layer) .sleepy-demo-control-entry { display:none; }
.sleepy-demo-control .sleepy-settings-content { padding:16px; }
.sleepy-demo-control .sleepy-settings-content > p { font-size:13px; color:#65748c; line-height:1.65; }
.sleepy-demo-control .sleepy-settings-row { padding:17px 4px; }
.sleepy-demo-data-actions { display:flex; gap:8px; }
.sleepy-demo-data-actions button { flex:1; min-height:44px; border:0; border-radius:14px; background:#eeebff; color:#6955ee; font:600 14px inherit; cursor:pointer; }
.sleepy-demo-data-actions button:disabled { opacity:.5; }
.sleepy-automation-state { margin-top:14px; padding:12px; border-radius:16px; background:#f4f2fc; color:#586780; font-size:12px; line-height:1.65; }
.sleepy-automation-state[data-phase="error"] { background:#fff1ec; color:#9a472d; }
.sleepy-automation-state strong { display:block; color:#17243d; font-size:12px; }
.sleepy-automation-state button { border:0; background:transparent; padding:8px 0 0; color:#6955ee; font:inherit; cursor:pointer; }
.sleepy-rhythm-page .sleepy-switch:has(input:disabled) { opacity:.55; }
.sleepy-playlist-form { margin:16px 0; padding:18px; background:#fff; border-radius:24px; }
.sleepy-playlist-form label { font-size:13px; color:#17243d; }
.sleepy-playlist-form input { box-sizing:border-box; width:100%; margin:12px 0; padding:12px; border:1px solid #ded7f4; border-radius:12px; color:#17243d; background:#faf9ff; }
.sleepy-playlist-form > div { display:flex; gap:12px; }
.sleepy-playlist-form button { min-height:44px; padding:10px 16px; border:0; border-radius:12px; background:#eeebff; color:#6955ee; font:inherit; cursor:pointer; }
.sleepy-playlist-form button:disabled { opacity:.45; }
.sleepy-playlist-form p { color:#65748c; font-size:12px; line-height:1.6; }
