@font-face {
  font-family: "Instrument Serif";
  src: url("./fonts/instrument-serif-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url("./fonts/inter-600-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  --dawn-pearl: #fbf1ed;
  --rose-mist: #ead9e5;
  --lavender-air: #d8d1e9;
  --lake-blue: #b9ceda;
  --sun-apricot: #f3c6aa;
  --ink: #604d49;
  --ink-soft: rgba(96, 77, 73, .68);
  --glass: rgba(255, 248, 246, .48);
  --glass-strong: rgba(255, 251, 248, .72);
  --glass-line: rgba(255, 255, 255, .72);
  --breath-scale: .78;
  --duration-progress: 0%;
  --practice-index: 0;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--rose-mist);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 600;
  overflow-x: hidden;
}

.welcome-screen {
  position: fixed;
  z-index: 1000;
  inset: 0;
  min-height: 100svh;
  overflow: hidden;
  color: #5d4947;
  background: linear-gradient(180deg, #e4d9ea 0%, #f0dce1 52%, #c9d8dc 100%);
  isolation: isolate;
  opacity: 1;
  transform: translateZ(0);
}

.welcome-screen::before,
.welcome-screen::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.welcome-screen::before {
  z-index: 0;
  inset: -30%;
  background:
    conic-gradient(from 214deg at 50% 35%, transparent 0 17%, rgba(255,255,255,.18) 21%, transparent 27% 45%, rgba(255,248,238,.14) 49%, transparent 55% 100%);
  mix-blend-mode: screen;
  opacity: 0;
  transform: rotate(-8deg) scale(.82);
  animation: welcome-rays 4.2s cubic-bezier(.16, 1, .3, 1) .25s both;
}

.welcome-screen::after {
  z-index: 4;
  inset: 0;
  background: radial-gradient(circle at 50% 43%, rgba(255,255,255,.9), rgba(255,250,244,.42) 13%, transparent 38%);
  opacity: 0;
  transform: scale(.2);
  animation: welcome-first-flash 2.3s cubic-bezier(.2,.9,.2,1) both;
}

.welcome-image,
.welcome-light,
.welcome-wings {
  position: absolute;
  inset: 0;
}

.welcome-image {
  z-index: -3;
  background: url("./assets/healing-dawn.webp") center 58% / cover no-repeat;
  filter: blur(22px) brightness(1.08) saturate(.72);
  opacity: .18;
  transform: scale(1.12);
  animation: welcome-image-reveal 3.2s cubic-bezier(.2, .78, .2, 1) both;
}

.welcome-light {
  z-index: -2;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, .96) 0%, rgba(255, 244, 229, .58) 12%, rgba(250, 224, 235, .22) 30%, transparent 54%),
    linear-gradient(180deg, rgba(255, 253, 252, .16), rgba(239, 215, 226, .06) 62%, rgba(223, 229, 235, .3));
  mix-blend-mode: screen;
  opacity: 0;
  transform: scale(.72);
  animation: welcome-light-bloom 3.4s cubic-bezier(.16, 1, .3, 1) .1s both;
}

.welcome-aura {
  position: absolute;
  z-index: -1;
  top: 32%;
  left: 50%;
  width: min(72vw, 620px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: welcome-aura-arrive 3.2s cubic-bezier(.16, 1, .3, 1) .35s both;
}

.welcome-aura i {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, .46);
  border-radius: 50%;
  box-shadow: inset 0 0 70px rgba(255,255,255,.08), 0 0 60px rgba(255,249,239,.12);
  animation: welcome-aura-breathe 6s ease-in-out infinite alternate;
}

.welcome-aura i:nth-child(2) {
  inset: 13%;
  border-color: rgba(255, 250, 243, .58);
  animation-delay: -.8s;
}

.welcome-aura i:nth-child(3) {
  inset: 28%;
  border-color: rgba(255, 255, 255, .7);
  animation-delay: -1.6s;
}

.welcome-wings {
  z-index: -1;
  top: 17%;
  right: auto;
  bottom: auto;
  left: 50%;
  width: min(92vw, 760px);
  height: min(56vw, 430px);
  transform: translateX(-50%);
  filter: blur(7px);
  opacity: 0;
  animation: welcome-wings-arrive 2.7s cubic-bezier(.16, 1, .3, 1) .45s both;
}

.welcome-wings i {
  position: absolute;
  top: 6%;
  width: 48%;
  height: 86%;
  border-radius: 70% 22% 72% 28%;
  background:
    repeating-radial-gradient(ellipse at 80% 50%, rgba(255, 255, 255, .56) 0 1px, transparent 3px 13px),
    radial-gradient(ellipse at 82% 50%, rgba(255, 255, 255, .74), rgba(255, 245, 233, .2) 48%, transparent 72%);
  box-shadow: 0 0 90px rgba(255, 248, 238, .52);
  opacity: .62;
}

.welcome-wings i:first-child { left: 0; transform: rotate(-12deg); }
.welcome-wings i:last-child { right: 0; transform: scaleX(-1) rotate(-12deg); }

.welcome-content {
  width: min(calc(100% - 44px), 680px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(92px, calc(env(safe-area-inset-top) + 62px)) 0 max(38px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transform: translateY(24px);
  animation: welcome-copy-arrive 1.25s cubic-bezier(.2, .82, .2, 1) .9s both;
}

.welcome-mark {
  margin: 0 0 22px;
  color: rgba(93, 73, 71, .56);
  font-size: 9px;
  letter-spacing: .25em;
  opacity: 0;
  animation: welcome-line-arrive .9s ease 1.35s both;
}

.welcome-content h1 {
  margin: 0;
  font-family: "Songti SC", STSong, "Noto Serif CJK SC", serif;
  font-size: clamp(50px, 8vw, 86px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.04em;
  text-shadow: 0 4px 35px rgba(255, 250, 244, .82);
  clip-path: inset(0 0 100% 0);
  animation: welcome-title-reveal 1.4s cubic-bezier(.16, 1, .3, 1) 1.15s both;
}

.welcome-copy {
  max-width: 560px;
  margin: 28px auto 0;
  color: rgba(93, 73, 71, .74);
  font-family: "Songti SC", STSong, serif;
  font-size: clamp(14px, 2.1vw, 17px);
  line-height: 2;
  opacity: 0;
  transform: translateY(12px);
  animation: welcome-line-arrive 1.1s cubic-bezier(.2,.8,.2,1) 1.8s both;
}

.welcome-enter {
  min-width: 210px;
  min-height: 56px;
  margin-top: 36px;
  padding: 15px 36px;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 999px;
  background: rgba(255, 250, 247, .42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82), 0 18px 48px rgba(104, 79, 94, .13);
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  cursor: pointer;
  font-size: 14px;
  letter-spacing: .12em;
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
  opacity: 0;
  transform: translateY(14px);
  animation: welcome-line-arrive 1s cubic-bezier(.2,.8,.2,1) 2.12s both;
  isolation: isolate;
  overflow: hidden;
}

.welcome-enter::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,.62) 46%, transparent 70%);
  transform: translateX(-120%);
  animation: welcome-button-sheen 4.8s ease-in-out 3.1s infinite;
}

.welcome-enter:hover {
  transform: translateY(-2px) scale(1.02);
  background: rgba(255, 253, 250, .68);
  box-shadow: inset 0 1px 0 #fff, 0 24px 58px rgba(104, 79, 94, .16);
}

.welcome-content small {
  margin-top: 18px;
  color: rgba(93, 73, 71, .48);
  font-size: 9px;
  letter-spacing: .08em;
  opacity: 0;
  animation: welcome-line-arrive .9s ease 2.4s both;
}

body.welcome-active { overflow: hidden; }

.app-shell {
  transition: filter .9s ease, transform 1.1s cubic-bezier(.2, .82, .2, 1), opacity .8s ease;
}

body.welcome-active .app-shell {
  filter: blur(16px);
  opacity: .34;
  transform: scale(1.035);
}

.welcome-screen.is-leaving {
  opacity: 0;
  filter: blur(16px);
  transform: scale(1.035);
  transition: opacity 1.05s ease .18s, filter 1.05s ease .18s, transform 1.15s cubic-bezier(.2, .8, .2, 1) .18s;
  pointer-events: none;
}

.welcome-screen.is-leaving::after {
  animation: none;
  opacity: 1;
  transform: scale(2.8);
  transition: opacity .86s ease, transform 1s cubic-bezier(.16,1,.3,1);
}

.welcome-screen.is-leaving .welcome-aura {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.45);
  transition: opacity .72s ease, transform 1.05s cubic-bezier(.16,1,.3,1);
}

.welcome-screen.is-leaving .welcome-content {
  opacity: 0;
  transform: translateY(-18px);
  transition: opacity .42s ease, transform .65s ease;
}

@keyframes welcome-image-reveal {
  0% { opacity: .08; filter: blur(30px) brightness(1.2) saturate(.5); transform: scale(1.16); }
  100% { opacity: .88; filter: blur(0) brightness(1.02) saturate(.88); transform: scale(1); }
}

@keyframes welcome-light-bloom {
  0% { opacity: 0; transform: scale(.62); }
  44% { opacity: 1; }
  100% { opacity: .72; transform: scale(1.18); }
}

@keyframes welcome-wings-arrive {
  0% { opacity: 0; transform: translateX(-50%) scale(.72); }
  100% { opacity: .68; transform: translateX(-50%) scale(1); }
}

@keyframes welcome-copy-arrive {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes welcome-first-flash {
  0% { opacity: .9; transform: scale(.18); }
  42% { opacity: .5; }
  100% { opacity: 0; transform: scale(2.4); }
}

@keyframes welcome-rays {
  0% { opacity: 0; transform: rotate(-12deg) scale(.78); }
  45% { opacity: .78; }
  100% { opacity: .34; transform: rotate(0) scale(1.08); }
}

@keyframes welcome-aura-arrive {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.52); }
  52% { opacity: .88; }
  100% { opacity: .56; transform: translate(-50%, -50%) scale(1); }
}

@keyframes welcome-aura-breathe {
  from { transform: scale(.98); opacity: .48; }
  to { transform: scale(1.045); opacity: .88; }
}

@keyframes welcome-title-reveal {
  0% { clip-path: inset(0 0 100% 0); filter: blur(12px); transform: translateY(24px); opacity: 0; }
  100% { clip-path: inset(0 0 0 0); filter: blur(0); transform: translateY(0); opacity: 1; }
}

@keyframes welcome-line-arrive {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes welcome-button-sheen {
  0%, 62% { transform: translateX(-120%); }
  82%, 100% { transform: translateX(120%); }
}

button,
a { -webkit-tap-highlight-color: transparent; }

button {
  border: 0;
  font: inherit;
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(112, 79, 73, .82);
  outline-offset: 4px;
}

.app-shell {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
  background: linear-gradient(180deg, #e8dfea, #e9d8df 56%, #c9d7dc);
}

.scene,
.scene-blur,
.scene-image,
.scene-wash {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene { z-index: -2; overflow: hidden; }

.scene-blur {
  inset: -5%;
  width: 110%;
  height: 110%;
  object-fit: cover;
  filter: blur(38px) saturate(.8);
  transform: scale(1.08);
  opacity: .82;
}

.scene-image {
  left: 50%;
  width: min(100%, 820px);
  object-fit: cover;
  object-position: center center;
  transform: translateX(-50%);
  box-shadow: 0 0 120px rgba(224, 207, 221, .84);
}

.scene-wash {
  background:
    linear-gradient(180deg, rgba(255, 249, 250, .08) 0%, rgba(255, 248, 248, 0) 43%, rgba(239, 221, 225, .18) 68%, rgba(240, 226, 226, .74) 100%),
    radial-gradient(circle at 50% 43%, rgba(255, 246, 237, .22), transparent 42%);
}

.topbar {
  position: relative;
  z-index: 10;
  width: min(calc(100% - 64px), 1180px);
  margin: 0 auto;
  padding-top: max(24px, env(safe-area-inset-top));
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  width: max-content;
  flex-direction: column;
  align-items: stretch;
  color: var(--ink);
  line-height: 1;
  text-decoration: none;
  filter: drop-shadow(0 1px 10px rgba(255, 250, 248, .34));
}

.brand-main {
  display: block;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 31px;
  font-weight: 400;
  line-height: .86;
  letter-spacing: -.035em;
  white-space: nowrap;
}

.brand-sub {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(5, 1fr) .75fr repeat(6, 1fr);
  align-items: center;
  margin-top: 6px;
  color: rgba(96, 77, 73, .72);
  font-family: Inter, sans-serif;
  font-size: 7px;
  font-weight: 600;
  line-height: 1;
}

.brand-sub span { text-align: center; }
.brand-sub i { display: block; }

.sound-button {
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .64);
  border-radius: 50%;
  background: rgba(255, 250, 249, .26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 8px 28px rgba(119, 91, 104, .08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, opacity .2s ease;
}

.sound-button:hover { transform: scale(1.03); }
.sound-button svg { width: 100%; height: 100%; fill: var(--ink); }
.sound-button .sound-wave { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.sound-button:not(.is-on) .sound-wave { opacity: .16; }
.sound-button:not(.is-on) { opacity: .58; }

.breathing-space {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 36px), 720px);
  margin: 18px auto 0;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.practice-tabs {
  position: relative;
  width: min(100%, 620px);
  min-height: 54px;
  margin: 0 auto;
  padding: 5px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  border: 1px solid rgba(255, 255, 255, .58);
  border-radius: 999px;
  background: rgba(255, 247, 248, .28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .56), 0 14px 40px rgba(105, 82, 100, .08);
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  overflow: hidden;
}

.practice-indicator {
  position: absolute;
  z-index: 0;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc((100% - 16px) / 3);
  border-radius: 999px;
  background: rgba(255, 250, 246, .78);
  box-shadow: 0 7px 22px rgba(126, 91, 104, .12), inset 0 1px 0 rgba(255, 255, 255, .84);
  transform: translateX(calc(var(--practice-index) * (100% + 3px)));
  transition: transform .55s cubic-bezier(.2, .9, .2, 1), width .35s ease;
  will-change: transform;
}

.practice-tab {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 10px 8px;
  border-radius: 999px;
  background: transparent;
  color: rgba(96, 77, 73, .64);
  cursor: pointer;
  font-size: 14px;
  letter-spacing: .03em;
  white-space: nowrap;
  transition: color .25s ease, background .25s ease, box-shadow .25s ease, transform .25s ease;
}

.practice-tab.is-active {
  color: #59413d;
  background: transparent;
  box-shadow: none;
}

.practice-tab:active { transform: scale(.98); }

.practice-stage {
  display: flex;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  padding-top: clamp(12px, 2.2vh, 24px);
}

.stage-copy {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
}

.stage-kicker {
  margin: 0 0 6px;
  color: rgba(96, 77, 73, .7);
  font-size: 10px;
  letter-spacing: .14em;
}

.stage-copy h1 {
  margin: 0;
  font-family: "Songti SC", STSong, "Noto Serif CJK SC", serif;
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .01em;
}

.method-trigger {
  margin: 0 auto;
  padding: 7px 0 4px;
  border-bottom: 1px solid rgba(96, 77, 73, .3);
  background: transparent;
  color: rgba(96, 77, 73, .76);
  cursor: pointer;
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 10px;
  letter-spacing: .08em;
  transition: color .2s ease, transform .2s ease, border-color .2s ease;
}

.method-trigger:hover { color: var(--ink); border-color: rgba(96, 77, 73, .5); }
.method-trigger:active { transform: translateY(1px); }

.breath-visual {
  position: relative;
  width: clamp(280px, 43vh, 390px);
  max-width: 84vw;
  aspect-ratio: 1;
  margin: clamp(-12px, -1.2vh, -4px) auto clamp(-28px, -2.5vh, -14px);
  display: grid;
  place-items: center;
}

.breath-halo {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 50%;
  box-shadow: inset 0 0 34px rgba(255, 255, 255, .05);
}

.halo-one { inset: 2%; opacity: .42; }
.halo-two { inset: 12%; opacity: .56; }
.halo-three { inset: 22%; opacity: .68; }

.breath-core {
  position: relative;
  width: 62%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 52% 48% 52% 48% / 60% 60% 40% 40%;
  background:
    radial-gradient(circle at 34% 25%, rgba(255, 255, 255, .92), transparent 28%),
    radial-gradient(circle at 68% 74%, rgba(213, 205, 243, .58), transparent 36%),
    linear-gradient(145deg, rgba(255, 239, 222, .74), rgba(246, 230, 242, .64) 46%, rgba(209, 221, 245, .72));
  box-shadow:
    0 0 62px rgba(255, 237, 214, .68),
    0 0 126px rgba(222, 207, 242, .48),
    inset 0 -24px 48px rgba(189, 178, 222, .17),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  transform: scale(var(--breath-scale)) rotate(45deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  will-change: transform;
}

.breath-core::before {
  content: "";
  position: absolute;
  inset: 10%;
  border: 1px solid rgba(255, 255, 255, .44);
  border-radius: inherit;
}

.breath-copy {
  position: relative;
  z-index: 1;
  width: 82%;
  transform: rotate(-45deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.phase-label {
  min-height: 22px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: .08em;
  white-space: nowrap;
}

.phase-count {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(72px, 11vh, 110px);
  font-weight: 400;
  line-height: .72;
}

.breath-core small {
  max-width: 152px;
  margin-top: 16px;
  color: rgba(96, 77, 73, .68);
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

.session-card {
  position: relative;
  width: min(100%, 570px);
  border: 1px solid rgba(255, 255, 255, .58);
  border-radius: 28px;
  background: var(--glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .68), 0 18px 50px rgba(100, 78, 94, .09);
  backdrop-filter: blur(20px) saturate(1.05);
  -webkit-backdrop-filter: blur(20px) saturate(1.05);
  overflow: hidden;
  transition: background .55s ease, box-shadow .55s ease, transform .55s cubic-bezier(.2, .85, .2, 1);
}

.session-card.is-running {
  background: rgba(255, 248, 246, .58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 24px 70px rgba(100, 78, 94, .13);
  transform: translateY(-2px);
}

.setup-controls {
  width: 100%;
  padding: 18px 22px 14px;
  opacity: 1;
  transform: translateY(0) scale(1);
  transform-origin: center;
  transition: opacity .3s ease, transform .55s cubic-bezier(.2, .85, .2, 1);
}

.session-card.is-running .setup-controls {
  opacity: 0;
  transform: translateY(-14px) scale(.96);
  pointer-events: none;
}

.running-console {
  position: absolute;
  inset: 0;
  padding: 22px 28px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(18px) scale(.96);
  pointer-events: none;
  text-align: center;
  transition: opacity .38s ease .08s, transform .55s cubic-bezier(.2, .85, .2, 1);
}

.session-card.is-running .running-console {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.running-label,
.running-phase { margin: 0; }

.running-label {
  color: rgba(96, 77, 73, .57);
  font-size: 9px;
  letter-spacing: .18em;
}

.remaining-hero {
  margin: 5px 0 4px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(50px, 8vh, 76px);
  font-weight: 400;
  line-height: .92;
  letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
}

.running-phase {
  color: rgba(96, 77, 73, .72);
  font-family: "Songti SC", STSong, serif;
  font-size: 12px;
  letter-spacing: .05em;
}

fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }

.duration-field legend {
  width: 100%;
  margin: 0 0 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: .08em;
}

.duration-field output {
  color: var(--ink);
  font-size: 10px;
  letter-spacing: 0;
}

.duration-field output strong {
  margin-right: 3px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

.duration-scale { position: relative; }

.duration-line {
  position: absolute;
  top: 7px;
  left: calc(16.666% + 3px);
  right: calc(16.666% + 3px);
  height: 1px;
  overflow: hidden;
  background: rgba(96, 77, 73, .17);
}

.duration-line i {
  display: block;
  width: var(--duration-progress);
  height: 100%;
  background: linear-gradient(90deg, #b48d91, #cf9c86);
  box-shadow: 0 0 8px rgba(198, 143, 125, .48);
  transition: width .35s cubic-bezier(.22, .8, .22, 1);
}

.duration-options {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.duration-option {
  min-width: 0;
  padding: 0 4px;
  display: grid;
  justify-items: center;
  gap: 3px;
  background: transparent;
  color: rgba(96, 77, 73, .52);
  cursor: pointer;
  transition: color .25s ease, transform .25s ease;
}

.duration-dot {
  width: 15px;
  height: 15px;
  border: 4px solid rgba(255, 250, 248, .82);
  border-radius: 50%;
  background: rgba(133, 104, 103, .34);
  box-shadow: 0 0 0 1px rgba(96, 77, 73, .11);
  transition: transform .3s ease, background .3s ease, box-shadow .3s ease;
}

.duration-option strong {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
}

.duration-option small { font-size: 9px; letter-spacing: .08em; }

.duration-option.is-active { color: var(--ink); }
.duration-option.is-active .duration-dot {
  background: #bd8f86;
  transform: scale(1.18);
  box-shadow: 0 0 0 5px rgba(255, 246, 241, .48), 0 0 18px rgba(196, 137, 120, .42);
}

.duration-option:active { transform: translateY(1px); }

.rhythm-field {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid rgba(96, 77, 73, .1);
}

.rhythm-field legend {
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: .08em;
}

.rhythm-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(123, 98, 104, .08);
}

.rhythm-option {
  min-width: 0;
  padding: 8px 6px;
  border-radius: 999px;
  background: transparent;
  color: rgba(96, 77, 73, .55);
  cursor: pointer;
  font-size: 11px;
  white-space: nowrap;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}

.rhythm-option.is-active {
  color: var(--ink);
  background: rgba(255, 250, 248, .74);
  box-shadow: 0 4px 14px rgba(110, 79, 93, .09), inset 0 1px 0 rgba(255, 255, 255, .78);
}

.feature-row {
  min-height: 20px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: rgba(96, 77, 73, .62);
  font-size: 10px;
  letter-spacing: .04em;
}

.feature-toggle {
  padding: 3px 0;
  background: transparent;
  color: rgba(96, 77, 73, .48);
  cursor: pointer;
  font-size: 9px;
}

.feature-toggle.is-on { color: var(--ink); }
.feature-toggle span { display: inline-block; width: 16px; }

.action-row {
  position: relative;
  width: min(100%, 470px);
  margin-top: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.primary-action {
  width: min(100%, 360px);
  min-height: 54px;
  padding: 14px 34px;
  border: 1px solid rgba(255, 255, 255, .74);
  border-radius: 999px;
  background: rgba(255, 249, 246, .66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .84), 0 14px 40px rgba(105, 78, 91, .12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  cursor: pointer;
  font-size: 14px;
  letter-spacing: .08em;
  transition: transform .22s ease, background .22s ease, box-shadow .22s ease;
}

.primary-action:hover {
  transform: scale(1.02);
  background: rgba(255, 251, 249, .82);
  box-shadow: inset 0 1px 0 #fff, 0 18px 46px rgba(105, 78, 91, .15);
}

.primary-action:active { transform: scale(.985); }
.primary-action:disabled { opacity: .72; cursor: wait; transform: none; }

.secondary-action {
  position: static;
  flex: 0 0 auto;
  min-width: 78px;
  padding: 5px 10px 4px;
  border-bottom: 1px solid rgba(96, 77, 73, .28);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 11px;
  white-space: nowrap;
}

.session-progress {
  width: 100%;
  margin: 17px auto 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.method-sheet {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: hidden;
}

.method-sheet::backdrop {
  background: rgba(70, 52, 62, .12);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.sheet-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(calc(100% - 32px), 560px);
  max-height: min(82svh, 640px);
  padding: 18px 16px 16px;
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: 30px;
  background: rgba(248, 239, 239, .92);
  box-shadow: 0 30px 100px rgba(86, 62, 78, .24), inset 0 1px 0 rgba(255, 255, 255, .84);
  backdrop-filter: blur(28px) saturate(1.08);
  -webkit-backdrop-filter: blur(28px) saturate(1.08);
  opacity: 0;
  transform: translate(-50%, -47%) scale(.9);
  transition: opacity .25s ease, transform .45s cubic-bezier(.16, 1, .3, 1);
}

.method-sheet.is-open .sheet-panel {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.method-sheet.is-closing .sheet-panel {
  opacity: 0;
  transform: translate(-50%, -48%) scale(.94);
}

.sheet-header {
  padding: 0 6px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.sheet-header p,
.sheet-header h2 { margin: 0; }

.sheet-header p {
  color: rgba(96, 77, 73, .52);
  font-size: 9px;
  letter-spacing: .18em;
}

.sheet-header h2 {
  margin-top: 4px;
  font-family: "Songti SC", STSong, serif;
  font-size: 24px;
  font-weight: 500;
}

.sheet-close {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .64);
  border-radius: 50%;
  background: rgba(255, 251, 248, .48);
  color: rgba(96, 77, 73, .62);
  cursor: pointer;
  font-size: 23px;
  font-weight: 400;
  line-height: 1;
}

.sheet-scroll {
  max-height: calc(min(82svh, 640px) - 102px);
  padding: 0 2px 6px;
  display: grid;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.sheet-scroll::-webkit-scrollbar { display: none; }

.method-card {
  min-height: 190px;
  padding: 22px 22px 24px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 24px;
  background: rgba(255, 250, 247, .56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .68);
}

.method-card-accent {
  background: linear-gradient(145deg, rgba(239, 224, 235, .72), rgba(231, 229, 246, .62));
}

.method-card span {
  color: rgba(96, 77, 73, .42);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 18px;
}

.method-card h3 {
  margin: 22px 0 10px;
  font-family: "Songti SC", STSong, serif;
  font-size: 22px;
  font-weight: 500;
}

.method-card p {
  margin: 0;
  color: rgba(96, 77, 73, .78);
  font-family: "Songti SC", STSong, serif;
  font-size: 14px;
  line-height: 1.85;
}

.method-card .method-lead {
  color: rgba(96, 77, 73, .9);
  font-size: 15px;
  line-height: 1.9;
}

.method-steps {
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 11px;
  counter-reset: method-step;
  list-style: none;
}

.method-steps li {
  position: relative;
  padding-left: 34px;
  color: rgba(96, 77, 73, .8);
  font-family: "Songti SC", STSong, serif;
  font-size: 14px;
  line-height: 1.8;
  counter-increment: method-step;
}

.method-steps li::before {
  content: counter(method-step, decimal-leading-zero);
  position: absolute;
  top: .1em;
  left: 0;
  color: rgba(96, 77, 73, .38);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 15px;
}

.method-meta-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.method-meta-grid article,
.outcome-block {
  padding: 14px 15px;
  border: 1px solid rgba(255, 255, 255, .58);
  border-radius: 16px;
  background: rgba(255, 251, 249, .34);
}

.method-card h4 {
  margin: 0 0 7px;
  color: rgba(96, 77, 73, .58);
  font-family: Inter, "PingFang SC", sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .12em;
}

.method-meta-grid p { font-size: 12px; line-height: 1.75; }

.method-safety {
  margin-top: 12px !important;
  padding: 12px 14px;
  border-left: 2px solid rgba(176, 127, 116, .38);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 244, 238, .42);
  color: rgba(96, 77, 73, .64) !important;
  font-family: Inter, "PingFang SC", sans-serif !important;
  font-size: 10px !important;
  line-height: 1.7 !important;
}

.principle-list {
  margin-top: 18px;
  display: grid;
}

.principle-list article {
  padding: 15px 0;
  border-top: 1px solid rgba(96, 77, 73, .12);
}

.principle-list article:last-child { padding-bottom: 6px; }

.principle-list h4 {
  margin-bottom: 8px;
  color: rgba(96, 77, 73, .84);
  font-family: "Songti SC", STSong, serif;
  font-size: 15px;
  letter-spacing: .02em;
}

.principle-list p { font-size: 13px; line-height: 1.85; }

.outcome-block { margin-top: 16px; }

.outcome-block ul {
  margin: 0;
  padding-left: 1.15em;
  color: rgba(96, 77, 73, .78);
  font-family: "Songti SC", STSong, serif;
  font-size: 13px;
  line-height: 1.8;
}

.outcome-block li + li { margin-top: 4px; }

body.sheet-open { overflow: hidden; }

.progress-track {
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(96, 77, 73, .14);
}

.progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #bc8c86, #a789aa);
}

.completion-message {
  width: min(100%, 540px);
  margin: 10px auto 0;
  color: var(--ink);
  font-family: "Songti SC", STSong, serif;
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

audio { display: none; }
[hidden] { display: none !important; }

@media (max-width: 760px) {
  .welcome-content { width: calc(100% - 40px); padding-top: max(78px, calc(env(safe-area-inset-top) + 46px)); }
  .welcome-content h1 { font-size: clamp(48px, 15vw, 66px); }
  .welcome-copy { max-width: 340px; font-size: 14px; line-height: 1.9; }
  .welcome-wings { top: 22%; width: 110vw; height: 76vw; }
  .welcome-aura { top: 34%; width: 118vw; }
  .welcome-enter { margin-top: 31px; }

  .scene-blur { display: none; }
  .scene-image { width: 100%; box-shadow: none; }

  .topbar {
    width: calc(100% - 36px);
    padding-top: max(18px, env(safe-area-inset-top));
  }

  .brand-main { font-size: 27px; }
  .brand-sub { margin-top: 5px; font-size: 6px; }
  .sound-button { width: 40px; height: 40px; padding: 9px; }

  .breathing-space { margin-top: 12px; }
  .practice-tabs { min-height: 50px; }
  .practice-tab { padding: 9px 7px; font-size: 13px; }
  .practice-stage { padding-top: 10px; }
  .stage-copy h1 { font-size: 21px; }
  .breath-visual { width: clamp(252px, 36.5vh, 330px); margin-top: -8px; margin-bottom: -24px; }
  .phase-label { font-size: 13px; }
  .phase-count { font-size: clamp(68px, 10vh, 92px); }
  .breath-core small { margin-top: 18px; }
  .setup-controls { padding: 15px 17px 12px; border-radius: 24px; }
  .session-card { border-radius: 24px; }
  .running-console { padding-inline: 20px; }
  .action-row { margin-top: 11px; }
  .primary-action { min-height: 52px; }
  .method-meta-grid { grid-template-columns: 1fr; }
}

@media (max-height: 760px) and (max-width: 760px) {
  .breathing-space { margin-top: 8px; }
  .practice-tabs { min-height: 44px; }
  .practice-tab { padding-block: 7px; }
  .practice-stage { padding-top: 6px; }
  .method-trigger { padding-top: 5px; }
  .breath-visual { width: clamp(222px, 32vh, 270px); margin-top: -8px; margin-bottom: -25px; }
  .setup-controls { padding-block: 12px 10px; }
  .duration-field legend { margin-bottom: 7px; }
  .rhythm-field { margin-top: 9px; padding-top: 9px; }
  .feature-row { margin-top: 7px; }
  .primary-action { min-height: 48px; }
}

@media (max-width: 350px) {
  .breathing-space { width: calc(100% - 24px); }
  .practice-tab { padding-inline: 3px; font-size: 11px; }
  .setup-controls { padding-inline: 13px; }
  .duration-option strong { font-size: 19px; }
  .rhythm-option { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .welcome-image { opacity: .88; filter: none; transform: none; }
  .welcome-light { opacity: .68; transform: none; }
  .welcome-wings { opacity: .6; }
  .welcome-aura { opacity: .52; }
  .welcome-content { opacity: 1; transform: none; }
}
