:root {
  --breath-bg: #000000;
  --breath-panel-top: #0d1a24;
  --breath-panel-bottom: #122936;
  --breath-stroke: rgba(154, 179, 197, 0.42);
  --breath-soft: rgba(255, 255, 255, 0.54);
  --breath-muted: rgba(255, 255, 255, 0.42);
  --breath-button: rgba(88, 110, 125, 0.62);
  --breath-button-stroke: rgba(188, 206, 219, 0.28);
  --breath-accent: #0ac7c8;
  --scene-glow: rgba(191, 98, 255, 0.26);
  --scene-top-mask: rgba(26, 11, 52, 0.92);
  --scene-bottom-mask: rgba(6, 4, 16, 0.98);
  --scene-bg-a: #24113d;
  --scene-bg-b: #0a0618;
  --scene-accent: rgba(173, 118, 255, 0.88);
  --scene-accent-soft: rgba(173, 118, 255, 0.42);
  --scene-ring: rgba(222, 205, 244, 0.64);
  --scene-ring-glow: rgba(214, 186, 244, 0.42);
  --breath-core-max: 430px;
  --scene-ix: 55%;
  --scene-iy: 20%;
  --scene-ix-soft: 62%;
  --scene-iy-soft: 28%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 68% 30%, rgba(28, 77, 106, 0.24), transparent 28%),
    linear-gradient(180deg, #02070b 0%, #07131a 18%, #08131b 100%);
  color: #fff;
  font-family: "Nunito Sans", "Noto Sans SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
}

.breath-lightpillar-bg {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  width: min(100vw, var(--breath-core-max));
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 18%, var(--scene-glow), transparent 56%),
    linear-gradient(180deg, var(--scene-bg-a) 0%, var(--scene-bg-b) 100%);
}

.breath-lightpillar-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(85% 105% at var(--scene-ix) var(--scene-iy), color-mix(in srgb, var(--scene-glow) 92%, white 8%), transparent 52%),
    radial-gradient(120% 140% at var(--scene-ix-soft) var(--scene-iy-soft), color-mix(in srgb, var(--scene-glow) 55%, white 45%), transparent 62%),
    linear-gradient(180deg, var(--scene-top-mask) 0%, var(--scene-bottom-mask) 100%);
  transition: background 0.16s linear;
}

html[data-breath-scene="stretch"] {
  --scene-glow: rgba(214, 177, 233, 0.34);
  --scene-top-mask: rgba(168, 148, 186, 0.58);
  --scene-bottom-mask: rgba(228, 201, 189, 0.62);
  --scene-bg-a: #b8abc2;
  --scene-bg-b: #d8c0b4;
  --scene-accent: rgba(212, 192, 231, 0.92);
  --scene-accent-soft: rgba(212, 192, 231, 0.42);
  --scene-ring: rgba(235, 220, 249, 0.62);
  --scene-ring-glow: rgba(219, 193, 241, 0.42);
}

html[data-breath-scene="vitality"] {
  --scene-glow: rgba(255, 182, 98, 0.36);
  --scene-top-mask: rgba(60, 30, 12, 0.9);
  --scene-bottom-mask: rgba(28, 13, 6, 0.99);
  --scene-bg-a: #50311b;
  --scene-bg-b: #1d0f07;
  --scene-accent: rgba(255, 205, 136, 0.92);
  --scene-accent-soft: rgba(255, 190, 112, 0.4);
  --scene-ring: rgba(255, 231, 188, 0.64);
  --scene-ring-glow: rgba(255, 198, 118, 0.44);
}

html[data-breath-scene="focus"] {
  --scene-glow: rgba(96, 204, 255, 0.3);
  --scene-top-mask: rgba(8, 28, 48, 0.92);
  --scene-bottom-mask: rgba(4, 16, 30, 0.99);
  --scene-bg-a: #123a5a;
  --scene-bg-b: #071627;
  --scene-accent: rgba(153, 228, 255, 0.94);
  --scene-accent-soft: rgba(112, 210, 255, 0.42);
  --scene-ring: rgba(192, 244, 255, 0.68);
  --scene-ring-glow: rgba(116, 224, 255, 0.5);
}

html[data-breath-scene="study"] {
  --scene-glow: rgba(96, 230, 188, 0.3);
  --scene-top-mask: rgba(8, 38, 30, 0.9);
  --scene-bottom-mask: rgba(4, 22, 18, 0.99);
  --scene-bg-a: #14473e;
  --scene-bg-b: #081f1b;
  --scene-accent: rgba(176, 255, 232, 0.94);
  --scene-accent-soft: rgba(118, 242, 201, 0.4);
  --scene-ring: rgba(205, 255, 241, 0.66);
  --scene-ring-glow: rgba(126, 245, 212, 0.48);
}

.breath-lightpillar-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.12) 15%, rgba(0, 0, 0, 0) 30%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 36%, rgba(0, 0, 0, 0.24) 52%, rgba(0, 0, 0, 0.72) 74%, rgba(0, 0, 0, 0.95) 100%);
}

.breath-lightpillar-bg canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  transition: filter 0.6s ease, transform 0.6s ease;
}

html[data-page="breath-home"] .mc-page {
  position: relative;
  z-index: 1;
  height: 100dvh;
  width: min(100vw, var(--breath-core-max));
  margin: 0 auto;
  background: transparent !important;
  overflow: hidden;
}

html[data-page="breath-home"] {
  --mc-max: min(100%, 430px);
}

html[data-page="breath-home"],
html[data-page="breath-home"] body {
  background: linear-gradient(180deg, var(--scene-bg-a) 0%, var(--scene-bg-b) 100%);
}

@media (min-width: 769px) {
  html[data-page="breath-home"],
  html[data-page="breath-home"] body {
    background: #000 !important;
  }
}

html[data-page="breath-home"] .mc-topbar {
  left: 50%;
  right: auto;
  width: min(100vw, var(--breath-core-max));
  transform: translateX(-50%);
}

html[data-page="breath-home"] .mc-topbar-inner {
  max-width: 100%;
}

html[data-page="breath-home"]:not(.is-ui-ready) .breath-lightpillar-bg::before,
html[data-page="breath-home"]:not(.is-ui-ready) .breath-scene-card,
html[data-page="breath-home"]:not(.is-ui-ready) .breath-home-cta,
html[data-page="breath-home"]:not(.is-ui-ready) .breath-home-title,
html[data-page="breath-home"]:not(.is-ui-ready) .breath-home-cards {
  transition: none !important;
}

html[data-page="breath-home"].preload * {
  transition: none !important;
  animation: none !important;
}

.breath-home-title {
  position: absolute;
  top: 12vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(86%, 320px);
  text-align: center;
  pointer-events: none;
  z-index: 6;
  isolation: isolate;
}

.breath-home-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.breath-home-hero img {
  width: min(40vw, 160px);
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.22));
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 0.56s ease, transform 0.56s ease;
}

.breath-home-chat-bubble {
  position: absolute;
  top: 13px;
  left: calc(50% + 37px);
  width: fit-content;
  max-width: min(70vw, 340px);
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--scene-accent) 38%, rgba(10, 16, 28, 0.82) 62%);
  border: 1px solid color-mix(in srgb, var(--scene-ring) 58%, transparent 42%);
  color: color-mix(in srgb, var(--scene-ring) 72%, white 28%);
  font-size: 11px;
  line-height: 1.4;
  white-space: normal;
  word-break: break-word;
  display: block;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.48s ease, transform 0.48s ease;
}

.breath-home-intro-ready-wrap {
  transition: opacity 0.48s ease, transform 0.48s ease;
}

.breath-home-chat-bubble::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 18px;
  width: 10px;
  height: 10px;
  background: color-mix(in srgb, var(--scene-accent) 38%, rgba(10, 16, 28, 0.82) 62%);
  border-left: 1px solid color-mix(in srgb, var(--scene-ring) 58%, transparent 42%);
  border-bottom: 1px solid color-mix(in srgb, var(--scene-ring) 58%, transparent 42%);
  transform: rotate(45deg);
}

.breath-home-chat-bubble.is-chat-pop {
  animation: homeBubblePop 0.34s ease;
}

.breath-home-chat-bubble.is-personalized-pending {
  opacity: 0.72;
}

@keyframes homeBubblePop {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.breath-home-title h1 {
  margin: 0;
  font-family: "Noto Sans SC", "Nunito Sans", system-ui, sans-serif;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0.06em;
  color: #ffffff;
  text-shadow:
    0 0 14px rgba(255, 255, 255, 0.55),
    0 4px 26px rgba(255, 255, 255, 0.28);
}

.breath-home-title p {
  margin: 12px 0 0;
  font-family: "Noto Sans SC", "Nunito Sans", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.94);
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.45),
    0 3px 16px rgba(255, 255, 255, 0.22);
}

.breath-home-cards {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 8;
  width: min(82%, 320px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  pointer-events: auto;
  transition: opacity 0.46s ease, transform 0.46s ease;
}

.breath-home-cards .breath-scene-card {
  width: 100%;
  min-height: clamp(246px, 38vh, 320px);
  padding: 16px 16px 18px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)) !important;
  backdrop-filter: blur(18px) saturate(122%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(122%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 22px rgba(0, 0, 0, 0.22),
    0 0 0 1px color-mix(in srgb, var(--scene-ring) 34%, transparent 66%),
    0 0 18px color-mix(in srgb, var(--scene-ring-glow) 52%, transparent 48%) !important;
  border: none;
}

.breath-home-cards .breath-scene-card::before {
  background: none !important;
}

.breath-home-cards .breath-scene-card.is-active,
.breath-home-cards .breath-scene-card:not(.is-active) {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 22px rgba(0, 0, 0, 0.22),
    0 0 0 1px color-mix(in srgb, var(--scene-ring) 34%, transparent 66%),
    0 0 18px color-mix(in srgb, var(--scene-ring-glow) 52%, transparent 48%) !important;
  border-color: transparent !important;
  margin-top: -64px;
}

.scene-card-head {
  margin-top: 11px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.scene-card-title h2 {
  margin: 0;
  font-size: clamp(21px, 4.65vw, 27px);
  line-height: 1.02;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.97);
}

.scene-card-title p {
  margin: 8px 0 0;
  font-size: clamp(12px, 2.8vw, 15px);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(245, 249, 255, 0.9);
}

.scene-card-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(245, 249, 255, 0.9);
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.scene-card-center {
  margin-left: 7px;
  margin-bottom: 44px;
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: calc(100% - 32px);
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.scene-card-center .scene-icon {
  width: 34px;
  height: 34px;
  color: rgba(246, 250, 255, 0.92);
  margin-bottom: 6px;
}

.scene-card-center p {
  margin: 0;
  font-size: clamp(14px, 2.85vw, 17px);
  font-weight: 500;
  line-height: 1.24;
  color: rgba(240, 246, 255, 0.92);
}

.breath-home-cards.is-scene-switching .scene-card-head {
  opacity: 0;
  transform: translateY(-8px);
}

.breath-home-cards.is-scene-switching .scene-card-center {
  opacity: 0;
  transform: translate(-50%, -47%);
}

.breath-home-switch-mode {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 999;
  pointer-events: auto;
  border: none;
  background: transparent;
  color: rgba(238, 244, 252, 0.92);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  min-height: 44px;
  padding: 8px 12px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  isolation: isolate;
}

.breath-home-switch-mode > * {
  pointer-events: none;
}

.breath-home-switch-mode .switch-icon {
  font-size: 18px;
  line-height: 1;
  color: color-mix(in srgb, var(--scene-accent) 75%, white 25%);
}

.breath-home-cta-wrap {
  position: absolute;
  left: 50%;
  bottom: calc(58px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 7;
  width: min(90%, 420px);
  display: flex;
  justify-content: center;
  transition: opacity 0.46s ease, transform 0.46s ease;
}

.breath-home-cta-wrap.is-delayed-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(10px);
}

.breath-home-intro-ready-wrap {
  position: absolute;
  top: calc(12vh + min(36vw, 158px) + 26px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  width: min(90%, 420px);
  display: flex;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
}

#breath-intro-ready {
  transition:
    transform 0.32s ease,
    box-shadow 0.32s ease,
    background-color 0.32s ease,
    border-color 0.32s ease,
    color 0.32s ease,
    letter-spacing 0.32s ease;
}

#breath-intro-ready:hover,
#breath-intro-ready:focus-visible {
  transform: translateY(-3px) scale(1.03);
  letter-spacing: 0.06em;
  box-shadow:
    0 0 8px rgba(130, 205, 255, 0.38),
    0 0 22px rgba(130, 205, 255, 0.3),
    0 10px 18px rgba(0, 0, 0, 0.28);
}

#breath-intro-ready:active {
  transform: translateY(-1px) scale(0.99);
}

/* PC / 平板宽屏：放宽呼吸首页主栏，避免 430px 窄条贴在宽屏中间 */
@media (min-width: 600px) {
  html[data-page="breath-home"] {
    --breath-core-max: 600px;
    --mc-max: min(100%, 600px);
  }

  html[data-page="breath-home"] .breath-home-cards {
    width: min(78%, 420px);
  }
}

html[data-page="breath-home"].is-home-intro .mc-topbar,
html[data-page="breath-home"].is-home-intro .breath-session-setting,
html[data-page="breath-home"].is-home-intro .breath-home-cards,
html[data-page="breath-home"].is-home-intro .breath-home-cta-wrap {
  opacity: 0;
  pointer-events: none;
}

html[data-page="breath-home"].is-home-intro .breath-home-hero {
  top: 40%;
  transform: translate(-50%, -50%);
}

html[data-page="breath-home"].is-home-intro .mc-topbar,
html[data-page="breath-home"].is-home-intro .breath-session-setting {
  transform: translateY(8px);
}

html[data-page="breath-home"].is-home-intro .breath-home-cards {
  transform: translate(-50%, -50%) translateY(8px);
}

html[data-page="breath-home"].is-home-intro .breath-home-cta-wrap {
  transform: translateX(-50%) translateY(8px);
}

html[data-page="breath-home"].is-home-intro .breath-home-chat-bubble {
  opacity: 0;
  transform: translateY(6px);
}

html[data-page="breath-home"].is-home-intro .breath-home-intro-ready-wrap {
  opacity: 0;
  pointer-events: none;
}

html[data-page="breath-home"].is-home-intro .breath-home-hero img {
  opacity: 0;
  transform: translateY(8px) scale(0.96);
}

html[data-page="breath-home"].is-home-intro.intro-step-1 .breath-home-hero img {
  opacity: 1;
  transform: translateY(0) scale(1);
}

html[data-page="breath-home"].is-home-intro.intro-step-2 .breath-home-chat-bubble {
  opacity: 1;
  transform: translateY(0);
}

html[data-page="breath-home"].is-home-chat-visible:not(.is-home-intro) .breath-home-chat-bubble {
  opacity: 1;
  transform: translateY(0);
}

html[data-page="breath-home"].is-home-intro.intro-step-3 .breath-home-intro-ready-wrap {
  opacity: 1;
  pointer-events: auto;
}

html[data-page="breath-home"].is-home-intro.is-home-intro-leaving .mc-topbar,
html[data-page="breath-home"].is-home-intro.is-home-intro-leaving .breath-session-setting,
html[data-page="breath-home"].is-home-intro.is-home-intro-leaving .breath-home-cards,
html[data-page="breath-home"].is-home-intro.is-home-intro-leaving .breath-home-cta-wrap {
  opacity: 1;
  pointer-events: auto;
}

html[data-page="breath-home"].is-home-intro.is-home-intro-leaving .mc-topbar,
html[data-page="breath-home"].is-home-intro.is-home-intro-leaving .breath-session-setting {
  transform: translateY(0);
}

html[data-page="breath-home"].is-home-intro.is-home-intro-leaving .breath-home-cards {
  transform: translate(-50%, -50%) translateY(0);
}

html[data-page="breath-home"].is-home-intro.is-home-intro-leaving .breath-home-cta-wrap {
  transform: translateX(-50%) translateY(0);
}

html[data-page="breath-home"].is-home-intro.is-home-intro-leaving .breath-home-hero img,
html[data-page="breath-home"].is-home-intro.is-home-intro-leaving .breath-home-chat-bubble,
html[data-page="breath-home"].is-home-intro.is-home-intro-leaving .breath-home-intro-ready-wrap {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}

.breath-home-cta {
  margin-bottom: 57px;
  margin-top: 251px;
  min-width: 152px;
  height: 48px;
  padding: 0 24px;
  border-radius: 13px;
  border: 1px solid var(--scene-accent);
  background: linear-gradient(180deg, rgba(42, 44, 50, 0.72), rgba(26, 28, 34, 0.7));
  color: rgba(245, 249, 255, 0.96);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px) saturate(125%);
  -webkit-backdrop-filter: blur(12px) saturate(125%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 0 1px var(--scene-accent-soft),
    0 0 26px var(--scene-accent-soft),
    0 10px 24px rgba(0, 0, 0, 0.4);
}

@media (min-width: 900px) {
  html[data-page="breath-home"] {
    --breath-core-max: min(calc(100vw - 48px), 960px);
    --mc-max: min(calc(100% - 48px), 960px);
  }

  html[data-page="breath-home"] .mc-page,
  html[data-page="breath-home"] .breath-lightpillar-bg,
  html[data-page="breath-home"] .mc-topbar {
    width: min(100vw, var(--breath-core-max));
  }

  .breath-home-title {
    top: 9vh;
    width: min(74%, 620px);
  }

  .breath-home-hero img {
    width: min(22vw, 230px);
  }

  .breath-home-chat-bubble {
    top: 24px;
    left: calc(50% + 58px);
    max-width: min(38vw, 420px);
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.5;
  }

  .breath-home-intro-ready-wrap {
    top: calc(9vh + min(22vw, 230px) + 30px);
    width: min(56%, 520px);
  }

  .breath-home-title h1 {
    font-size: clamp(42px, 4.2vw, 58px);
  }

  .breath-home-title p {
    margin-top: 14px;
    font-size: clamp(20px, 1.8vw, 26px);
  }

  .breath-session-audio {
    top: calc(10vh + env(safe-area-inset-top, 0px));
  }

  .breath-home-cards {
    top: 50%;
    width: min(54%, 560px);
    gap: 18px;
  }

  .breath-home-cards .breath-scene-card {
    min-height: clamp(280px, 34vh, 360px);
    padding: 20px 22px 22px;
    border-radius: 26px;
  }

  .scene-card-title h2 {
    font-size: clamp(28px, 2.8vw, 38px);
  }

  .scene-card-title p {
    font-size: clamp(14px, 1.3vw, 17px);
  }

  .scene-card-center {
    gap: 10px;
  }

  .scene-card-center .scene-icon {
    width: 42px;
    height: 42px;
  }

  .scene-card-center p {
    font-size: clamp(17px, 1.55vw, 21px);
  }

  .breath-home-switch-mode {
    font-size: 16px;
  }

  .breath-home-cta-wrap {
    bottom: calc(46px + env(safe-area-inset-bottom, 0px));
    width: min(52%, 540px);
  }

  .breath-home-cta {
    height: 52px;
    min-width: 172px;
    padding: 0 28px;
    font-size: 15px;
  }
}

@media (min-width: 1200px) {
  html[data-page="breath-home"] {
    --breath-core-max: min(calc(100vw - 64px), 1040px);
    --mc-max: min(calc(100% - 64px), 1040px);
  }

  html[data-page="breath-home"] .breath-home-cards {
    width: min(50%, 580px);
  }
}

@media (max-width: 768px) {
  :root {
    --breath-core-max: 100vw;
  }

  .breath-lightpillar-bg {
    left: 0;
    width: 100vw;
    transform: none;
  }

  html[data-page="breath-home"] .mc-page,
  html[data-page="breath-home"] .mc-topbar {
    left: 0;
    width: 100vw;
    transform: none;
  }
}

.breath-home-cta:hover {
  border-color: color-mix(in srgb, var(--scene-accent) 88%, white 12%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 0 1px color-mix(in srgb, var(--scene-accent-soft) 86%, white 14%),
    0 0 32px color-mix(in srgb, var(--scene-accent-soft) 84%, white 16%),
    0 12px 28px rgba(0, 0, 0, 0.42);
}

.breath-session-center {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.5s ease, transform 0.5s ease;
}


.breath-session-audio {
  position: absolute;
  top: calc(60px + env(safe-area-inset-top, 0px));
  right: calc(10px + env(safe-area-inset-right, 0px));
  z-index: 30;
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.96);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
}

.breath-session-audio svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.breath-session-audio .audio-body {
  fill: currentColor;
  stroke: none;
}

.breath-session-audio .audio-slash {
  opacity: 0;
}

html.is-breath-sound-off .breath-session-audio .audio-wave {
  opacity: 0;
}

html.is-breath-sound-off .breath-session-audio .audio-slash {
  opacity: 1;
}

.breath-home-back {
  position: absolute;
  top: calc(66px + env(safe-area-inset-top, 0px));
  left: calc(12px + env(safe-area-inset-left, 0px));
  z-index: 70;
  min-width: 78px;
  height: 38px;
  padding: 0 10px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.96);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  opacity: 1;
  pointer-events: auto;
}

.breath-home-back > span:first-child {
  font-size: 30px;
  color: #ffffff;
  line-height: 0.9;
  transform: translateY(-1px);
}

.breath-home-back .breath-session-back-text {
  font-size: 18px;
  transform: translateY(2px);
}

.breath-session-setting {
  position: absolute;
  top: calc(66px + env(safe-area-inset-top, 0px));
  right: calc(12px + env(safe-area-inset-right, 0px));
  z-index: 70;
  width: 46px;
  height: 38px;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.96);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
}

.breath-session-setting > span:first-child {
  font-size: 28px;
  line-height: 1;
  transform: translateY(0);
}

html[data-page="breath-home"]:not(.is-breathing) .breath-home-back {
  position: fixed !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  z-index: 120;
}

html[data-page="breath-home"]:not(.is-breathing):not(.is-home-intro) .breath-session-setting {
  position: fixed !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  z-index: 120;
}

html[data-page="breath-home"] .breath-settings {
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

html[data-page="breath-home"] .breath-settings-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  background: transparent;
  opacity: 0;
  transition: opacity 0.24s ease;
}

html[data-page="breath-home"] .breath-settings-sheet {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  width: min(calc(100% - 32px), 430px);
  max-height: min(42dvh, 360px);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  box-sizing: border-box;
  border-radius: 28px;
  padding: 22px 14px 18px;
  background: linear-gradient(180deg, rgba(27, 29, 56, 0.58) 0%, rgba(31, 33, 61, 0.5) 100%);
  backdrop-filter: blur(28px) saturate(135%);
  -webkit-backdrop-filter: blur(28px) saturate(135%);
  box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.44);
  transform: translate(-50%, calc(100% + 16px));
  transition: transform 0.28s cubic-bezier(0.22, 0.85, 0.22, 1);
}

html[data-page="breath-home"] .breath-settings-sheet::-webkit-scrollbar {
  display: none;
}

html[data-page="breath-home"] .breath-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

html[data-page="breath-home"] .breath-setting-row + .breath-setting-row {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-page="breath-home"] .breath-setting-row h3 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 17px;
  font-weight: 600;
  color: rgba(242, 247, 255, 0.94);
  letter-spacing: 0.01em;
}

html[data-page="breath-home"] .breath-setting-help {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(220, 232, 255, 0.8);
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(226, 236, 255, 0.84);
  transform: translateY(-2px);
}

html[data-page="breath-home"] .breath-mode-segment {
  display: inline-flex;
  gap: 10px;
}

html[data-page="breath-home"] .breath-mode-segment button {
  min-width: 108px;
  height: 48px;
  border: 0;
  border-radius: 9px;
  background: rgba(96, 103, 132, 0.34);
  color: rgba(243, 247, 255, 0.9);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

html[data-page="breath-home"] .breath-mode-segment button.is-active {
  background: linear-gradient(135deg, rgba(0, 173, 143, 0.76), rgba(0, 160, 175, 0.68));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 8px 18px rgba(0, 173, 143, 0.16);
}

html[data-page="breath-home"] .breath-setting-row-goal {
  align-items: flex-start;
  gap: 10px;
}

html[data-page="breath-home"] .breath-setting-row-goal h3 {
  align-self: center;
}

html[data-page="breath-home"] .breath-goal-wrap {
  width: 62%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

html[data-page="breath-home"] .breath-goal-highlight {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(0, 173, 143, 0.14);
  pointer-events: none;
  z-index: 1;
}

html[data-page="breath-home"] .breath-goal-picker {
  position: relative;
  width: 100%;
  height: 84px;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.35) 18%, #000 34%, #000 66%, rgba(0, 0, 0, 0.35) 82%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.35) 18%, #000 34%, #000 66%, rgba(0, 0, 0, 0.35) 82%, transparent 100%);
}

html[data-page="breath-home"] .breath-goal-picker::-webkit-scrollbar {
  display: none;
}

html[data-page="breath-home"] .breath-goal-spacer {
  height: 28px;
}

html[data-page="breath-home"] .breath-goal-option {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 28px;
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(227, 234, 247, 0.34);
  font-size: 15px;
  font-weight: 500;
  line-height: 28px;
  scroll-snap-align: center;
  transition: color 0.14s ease, transform 0.14s ease, background-color 0.14s ease;
}

html[data-page="breath-home"] .breath-goal-option.is-active {
  color: rgba(247, 250, 255, 0.98);
  transform: scale(1.02);
}

html[data-page="breath-home"] .breath-goal-unit {
  position: absolute;
  top: 28px;
  left: calc(50% + 18px);
  z-index: 3;
  font-size: 12px;
  font-weight: 600;
  line-height: 28px;
  color: rgba(247, 250, 255, 0.9);
  pointer-events: none;
}

html[data-page="breath-home"] .breath-sound-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
}

html[data-page="breath-home"] .breath-sound-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

html[data-page="breath-home"] .breath-sound-slider {
  width: 62px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #00ad8f 0%, #00a0af 100%);
  position: relative;
}

html[data-page="breath-home"] .breath-sound-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

html[data-page="breath-home"] .breath-sound-switch input:not(:checked) + .breath-sound-slider {
  background: rgba(123, 131, 163, 0.45);
}

html[data-page="breath-home"] .breath-sound-switch input:not(:checked) + .breath-sound-slider::after {
  transform: translateX(-28px);
}

html[data-page="breath-home"] .breath-settings-confirm {
  width: 62%;
  height: 44px;
  margin: 18px auto 0;
  display: block;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #00ad8f 0%, #00a0af 100%);
  color: #f4f6ff;
  box-shadow: 0 10px 24px rgba(0, 173, 143, 0.22);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.breath-loading {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

html.is-loading .breath-loading {
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

html.is-loading .breath-home-cta,
html.is-loading .breath-scene-card,
html.is-loading .mc-topbar {
  pointer-events: none;
}

.breath-loading .dot-spinner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  --uib-speed: 0.9s;
  width: 2.8rem;
  height: 2.8rem;
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--scene-ring-glow) 72%, transparent 28%));
}

.breath-loading .dot-spinner__dot {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
}

.breath-loading .dot-spinner__dot::before {
  content: "";
  width: 20%;
  height: 20%;
  border-radius: 50%;
  background-color: #fff;
  filter: drop-shadow(0 0 10px rgb(95, 150, 202));
  box-shadow:
    -6px -6px 11px #c1c1c1,
    6px 6px 11px #ffffff,
    0 0 20px rgba(18, 31, 53, 0.3);
  transform: scale(0);
  opacity: 0.5;
  animation: breathDotPulse calc(var(--uib-speed) * 1.111) ease-in-out infinite;
}

.breath-loading .dot-spinner__dot:nth-child(2) {
  transform: rotate(45deg);
}

.breath-loading .dot-spinner__dot:nth-child(2)::before {
  animation-delay: calc(var(--uib-speed) * -0.875);
}

.breath-loading .dot-spinner__dot:nth-child(3) {
  transform: rotate(90deg);
}

.breath-loading .dot-spinner__dot:nth-child(3)::before {
  animation-delay: calc(var(--uib-speed) * -0.75);
}

.breath-loading .dot-spinner__dot:nth-child(4) {
  transform: rotate(135deg);
}

.breath-loading .dot-spinner__dot:nth-child(4)::before {
  animation-delay: calc(var(--uib-speed) * -0.625);
}

.breath-loading .dot-spinner__dot:nth-child(5) {
  transform: rotate(180deg);
}

.breath-loading .dot-spinner__dot:nth-child(5)::before {
  animation-delay: calc(var(--uib-speed) * -0.5);
}

.breath-loading .dot-spinner__dot:nth-child(6) {
  transform: rotate(225deg);
}

.breath-loading .dot-spinner__dot:nth-child(6)::before {
  animation-delay: calc(var(--uib-speed) * -0.375);
}

.breath-loading .dot-spinner__dot:nth-child(7) {
  transform: rotate(270deg);
}

.breath-loading .dot-spinner__dot:nth-child(7)::before {
  animation-delay: calc(var(--uib-speed) * -0.25);
}

.breath-loading .dot-spinner__dot:nth-child(8) {
  transform: rotate(315deg);
}

.breath-loading .dot-spinner__dot:nth-child(8)::before {
  animation-delay: calc(var(--uib-speed) * -0.125);
}

.breath-session-stack {
  position: relative;
  z-index: 1;
  width: min(88%, 340px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.breath-session-center::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(245, 248, 255, 0.08), rgba(8, 10, 14, 0.2));
  backdrop-filter: blur(14px) saturate(115%);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
}

.breath-session-circle {
  position: relative;
  z-index: 2;
  width: min(45vw, 190px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 42%, rgba(225, 235, 246, 0.26), rgba(212, 224, 238, 0.18) 58%, rgba(198, 214, 231, 0.14) 100%);
  border: 2px solid var(--scene-ring);
  backdrop-filter: blur(16px) saturate(115%);
  -webkit-backdrop-filter: blur(16px) saturate(115%);
  box-shadow:
    0 0 56px var(--scene-ring-glow),
    0 0 0 1px color-mix(in srgb, var(--scene-ring) 52%, white 48%),
    0 10px 36px rgba(0, 0, 0, 0.22);
  transform: scale(1);
}

.breath-session-label {
  color: rgba(233, 244, 255, 0.86);
  font-size: clamp(14px, 3.8vw, 18px);
  font-weight: 600;
  letter-spacing: 0.08em;
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  transition: opacity 0.8s ease, transform 0.8s ease, filter 0.8s ease;
  text-shadow:
    0 0 14px rgba(209, 234, 255, 0.35),
    0 2px 10px rgba(0, 0, 0, 0.2);
}

.breath-session-label.is-fading-in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.breath-session-label.is-fading-out {
  opacity: 0;
  transform: translateY(-4px);
  filter: blur(1px);
}

.breath-session-guide {
  order: -1;
  margin: 0;
  max-width: 30ch;
  text-align: center;
  color: rgba(237, 245, 255, 0.88);
  font-size: clamp(15px, 3.8vw, 19px);
  line-height: 1.55;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
  min-height: 3.2em;
}

.breath-session-timer {
  margin: 18px 0 0;
  color: rgba(240, 246, 255, 0.88);
  font-size: clamp(18px, 4.4vw, 24px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  text-shadow:
    0 0 12px rgba(214, 229, 255, 0.2),
    0 3px 14px rgba(0, 0, 0, 0.28);
}

.breath-session-end {
  min-width: 112px;
  height: 36px;
  padding: 0 16px;
  margin-top: 30px;
  border: 1px solid rgba(223, 233, 247, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(233, 240, 250, 0.72);
  font-size: clamp(13px, 3.4vw, 15px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  backdrop-filter: blur(10px) saturate(110%);
  -webkit-backdrop-filter: blur(10px) saturate(110%);
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.breath-session-end.is-holding {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(232, 241, 255, 0.34);
  color: rgba(246, 250, 255, 0.84);
}

.breath-session-end.is-complete {
  background: linear-gradient(90deg, #00ad8f 0%, #00a0af 100%);
  border-color: rgba(145, 255, 233, 0.46);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(0, 173, 143, 0.28);
}

.breath-session-end-progress {
  width: 150px;
  height: 3px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(236, 236, 238, 0.25);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.breath-session-end-progress.is-visible {
  opacity: 1;
}

html.is-breath-complete .breath-session-end-progress {
  opacity: 0 !important;
}

.breath-session-end-progress .progress {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: rgb(255, 255, 255);
  transition: none;
}

.breath-session-guide.is-fading-in {
  animation: guideFloatIn 1.2s cubic-bezier(0.22, 0.8, 0.2, 1);
}

.breath-session-guide.is-fading-out {
  animation: guideFloatOut 0.8s cubic-bezier(0.3, 0.2, 0.25, 1) forwards;
}

@keyframes guideFadeSwap {
  0% {
    opacity: 0.12;
    transform: translateY(10px);
    filter: blur(2.4px);
  }
  65% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes guideFloatIn {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    filter: blur(2.2px);
  }
  55% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes guideFloatOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-16px) scale(0.985);
    filter: blur(1.8px);
  }
}

@keyframes breathDotPulse {
  0%,
  100% {
    transform: scale(0);
    opacity: 0.5;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
}

html.is-breathing .mc-topbar,
html.is-breathing .breath-home-title,
html.is-breathing .breath-home-cards,
html.is-breathing .breath-home-cta-wrap {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

html.is-breathing .breath-lightpillar-bg::before {
  filter: blur(8px) saturate(0.9);
  transition: none !important;
}

html.is-breathing .breath-lightpillar-bg canvas {
  filter: blur(10px) saturate(0.85);
  transform: none;
  transition: none !important;
}

html.is-breathing .breath-session-center {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

html.is-breathing .breath-session-audio {
  opacity: 1;
  pointer-events: auto;
}

html.is-breathing .breath-session-end {
  pointer-events: auto;
}

html.is-breathing .breath-home-back {
  opacity: 0;
  pointer-events: none;
}

html.is-breathing .breath-session-setting {
  opacity: 0;
  pointer-events: none;
}

html.is-settings-open .breath-settings {
  pointer-events: auto;
}

html.is-settings-open .breath-settings-backdrop {
  opacity: 1;
}

html.is-settings-open .breath-settings-sheet {
  transform: translate(-50%, 0);
}

.breath-scene-card {
  position: relative;
  min-height: 142px;
  padding: 14px 14px 12px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.045));
  backdrop-filter: blur(32px) saturate(150%);
  -webkit-backdrop-filter: blur(32px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1),
    0 12px 24px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.breath-scene-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 16% 10%, rgba(255, 255, 255, 0.16), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
}

.breath-scene-card > * {
  position: relative;
  z-index: 1;
}

.breath-scene-card:not(.is-active) {
  background: linear-gradient(145deg, rgba(145, 152, 166, 0.28), rgba(90, 97, 112, 0.16)) !important;
  border-color: rgba(226, 232, 244, 0.28);
  backdrop-filter: blur(34px) saturate(135%);
  -webkit-backdrop-filter: blur(34px) saturate(135%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08),
    0 12px 24px rgba(0, 0, 0, 0.34);
}

.breath-scene-card:hover {
  transform: translateY(-2px);
}

.breath-scene-card.is-active {
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    inset 0 -1px 0 rgba(255, 255, 255, 0.2),
    0 16px 34px rgba(0, 0, 0, 0.46);
}

.scene-icon {
  width: 30px;
  height: 30px;
  color: rgba(235, 240, 248, 0.92);
}

.scene-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scene-content h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.96);
}

.scene-content p {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: rgba(228, 234, 243, 0.82);
}

@media (max-width: 380px) {
  .breath-home-title h1 {
    font-size: 34px;
  }

  .breath-home-title p {
    font-size: 17px;
  }

  .scene-content h2 {
    font-size: 17px;
  }

  .scene-content p {
    font-size: 12px;
  }
}

.scene-sleep.is-active {
  background:
    linear-gradient(145deg, rgba(215, 197, 230, 0.48), rgba(180, 160, 196, 0.3)),
    radial-gradient(120% 120% at 15% 15%, rgba(236, 226, 245, 0.46), transparent 62%);
  border-color: rgba(236, 226, 245, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(250, 244, 255, 0.8),
    inset 0 -1px 0 rgba(255, 255, 255, 0.16),
    0 0 0 1px rgba(203, 184, 226, 0.85),
    0 0 20px rgba(208, 186, 230, 0.58),
    0 16px 30px rgba(0, 0, 0, 0.44);
}

.scene-relax.is-active {
  background:
    linear-gradient(145deg, rgba(255, 193, 112, 0.36), rgba(191, 111, 35, 0.2)),
    radial-gradient(120% 120% at 15% 15%, rgba(255, 214, 153, 0.35), transparent 62%);
  border-color: rgba(255, 230, 186, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 220, 0.66),
    inset 0 -1px 0 rgba(255, 255, 255, 0.16),
    0 0 0 1px rgba(255, 186, 92, 0.9),
    0 0 20px rgba(255, 175, 72, 0.58),
    0 16px 30px rgba(0, 0, 0, 0.44);
}

.scene-focus.is-active {
  background:
    linear-gradient(145deg, rgba(112, 210, 255, 0.34), rgba(37, 122, 171, 0.2)),
    radial-gradient(120% 120% at 15% 15%, rgba(153, 228, 255, 0.32), transparent 62%);
  border-color: rgba(191, 238, 255, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(232, 248, 255, 0.66),
    inset 0 -1px 0 rgba(255, 255, 255, 0.16),
    0 0 0 1px rgba(92, 201, 255, 0.9),
    0 0 20px rgba(77, 195, 255, 0.58),
    0 16px 30px rgba(0, 0, 0, 0.44);
}

.scene-meditate.is-active {
  background:
    linear-gradient(145deg, rgba(118, 242, 201, 0.32), rgba(45, 148, 118, 0.2)),
    radial-gradient(120% 120% at 15% 15%, rgba(164, 255, 225, 0.3), transparent 62%);
  border-color: rgba(194, 255, 238, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(234, 255, 248, 0.64),
    inset 0 -1px 0 rgba(255, 255, 255, 0.16),
    0 0 0 1px rgba(89, 224, 183, 0.88),
    0 0 20px rgba(90, 224, 184, 0.56),
    0 16px 30px rgba(0, 0, 0, 0.44);
}

.breath-tool-page {
  min-height: 100vh;
  max-width: 430px;
  margin: 0 auto;
  background:
    radial-gradient(circle at 80% 46%, rgba(20, 71, 102, 0.24), transparent 34%),
    linear-gradient(180deg, #010407 0%, #07131c 36%, #0b2430 100%);
}

.breath-tool-hero {
  position: relative;
  height: 186px;
  overflow: hidden;
}

.breath-tool-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.breath-tool-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.12) 42%, rgba(0, 0, 0, 0.5) 100%),
    radial-gradient(circle at 80% 30%, rgba(62, 130, 203, 0.14), transparent 30%);
}

.breath-tool-hero__badge {
  position: absolute;
  right: 18px;
  top: 86px;
  z-index: 2;
  min-width: 88px;
  padding: 9px 12px;
  border-radius: 16px;
  background: rgba(6, 10, 15, 0.62);
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.breath-tool-panel {
  position: relative;
  z-index: 3;
  margin-top: -24px;
  min-height: calc(100vh - 162px);
  padding: 28px 20px calc(28px + env(safe-area-inset-bottom));
  border-top-left-radius: 36px;
  border-top-right-radius: 36px;
  border: 1px solid rgba(164, 188, 204, 0.26);
  background:
    radial-gradient(circle at 50% 40%, rgba(18, 66, 98, 0.32), transparent 30%),
    linear-gradient(180deg, var(--breath-panel-top) 0%, var(--breath-panel-bottom) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 -18px 48px rgba(0, 0, 0, 0.28);
}

.breath-tool-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.breath-tool-panel__title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.breath-tool-panel__title-row h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.breath-tool-panel__title-row p {
  margin: 0;
  font-size: 10px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.76);
}

.breath-tool-help {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(208, 221, 231, 0.32);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.75);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font: inherit;
}

.breath-carousel {
  margin-bottom: 28px;
}

.breath-carousel__track {
  position: relative;
  height: 188px;
  overflow: hidden;
}

.breath-mode-card {
  position: absolute;
  top: 0;
  left: 50%;
  width: 184px;
  padding: 8px 0 0;
  border: none;
  background: transparent;
  color: inherit;
  transform: translateX(-50%) scale(0.78);
  opacity: 0.24;
  transition: transform 0.32s ease, opacity 0.32s ease, filter 0.32s ease;
  text-align: center;
}

.breath-mode-card[data-position="-1"] {
  transform: translateX(calc(-50% - 138px)) scale(0.86);
  opacity: 0.28;
}

.breath-mode-card[data-position="1"] {
  transform: translateX(calc(-50% + 138px)) scale(0.86);
  opacity: 0.28;
}

.breath-mode-card.is-active {
  transform: translateX(-50%) scale(1);
  opacity: 1;
}

.breath-mode-card[data-position="-2"],
.breath-mode-card[data-position="2"] {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) scale(0.7);
}

.breath-mode-card.is-active .breath-mode-card__icon {
  box-shadow:
    0 22px 30px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(58, 88, 110, 0.6);
}

.breath-mode-card__icon {
  width: 82px;
  height: 82px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, rgba(12, 41, 57, 0.94), rgba(4, 8, 12, 0.98)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 18px 24px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(44, 69, 88, 0.52);
}

.breath-mode-card__icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.breath-mode-card__name {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.breath-mode-card__desc {
  display: block;
  font-size: 10px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.5);
}

.breath-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.breath-carousel__dots button {
  width: 4px;
  height: 4px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  transition: width 0.24s ease, background-color 0.24s ease;
}

.breath-carousel__dots button.is-active {
  width: 10px;
  background: rgba(255, 255, 255, 0.96);
}

.breath-settings {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.breath-settings__trigger,
.breath-start-button {
  min-height: 64px;
  border-radius: 14px;
  border: 1px solid var(--breath-button-stroke);
  background: var(--breath-button);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.breath-settings__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  font: inherit;
}

.breath-settings__label {
  font-size: 16px;
  font-weight: 700;
}

.breath-settings__value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
}

.breath-settings__value svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.52);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.24s ease;
}

.breath-settings__trigger[aria-expanded="true"] .breath-settings__value svg {
  transform: rotate(90deg);
}

.breath-rounds {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.breath-rounds button {
  min-width: 72px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(188, 206, 219, 0.26);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.74);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.breath-rounds button.is-active {
  background: rgba(12, 199, 200, 0.18);
  border-color: rgba(12, 199, 200, 0.48);
  color: #fff;
}

.breath-start-button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

@media (max-width: 380px) {
  .breath-tool-hero {
    height: 168px;
  }

  .breath-tool-panel {
    padding-left: 16px;
    padding-right: 16px;
  }

  .breath-mode-card[data-position="-1"] {
    transform: translateX(calc(-50% - 120px)) scale(0.82);
  }

  .breath-mode-card[data-position="1"] {
    transform: translateX(calc(-50% + 120px)) scale(0.82);
  }
}
