* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root { color: #f9f5e9; background: #141e22; font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif; color-scheme: dark; }
body { margin: 0; }
button, select, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid #e8d3a9; outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1, h2 { font-family: "Songti SC", "Noto Serif CJK SC", SimSun, serif; font-weight: 600; }
h1 { font-size: clamp(2.15rem, 5vw, 4rem); letter-spacing: .045em; }
h2 { font-size: 1.35rem; letter-spacing: .03em; }
.masthead { position: absolute; inset: 0 0 auto; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 18px clamp(18px, 5vw, 68px); }
.brand { display: flex; align-items: center; gap: 8px; background: #172229b5; border: 0; border-radius: 32px; padding: 4px 14px 4px 8px; min-height: 48px; font-size: 1.2rem; letter-spacing: .16em; }
.brand img { height: 34px; width: 34px; object-fit: contain; }
.preview-label { font-size: .72rem; background: #172229b5; border-radius: 24px; padding: 6px 10px; }
.screen { min-height: 100svh; }
.home-hero { position: relative; isolation: isolate; display: grid; align-items: end; min-height: min(75svh, 730px); background: url(assets/lake.png) center 58%/cover; }
.home-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(0deg,#101b24 0%,#142533a0 20%,transparent 60%); }
.scene-motion { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.home-hero .scene-motion { z-index: -2; }
.player[data-track="meditation"] #rain-motion { display: none; }
.hero-copy { width: min(1120px,100%); margin-inline: auto; padding: 116px clamp(23px,5vw,64px) 58px; }
.meta { color: #f6debb; font-size: .83rem; letter-spacing: .16em; margin-bottom: 10px; }
.hero-action { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 22px; }
.hero-action > span { color: #eee4d6; font-size: .86rem; }
.primary { display: inline-flex; gap: 14px; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 0; border-radius: 28px; background: #f0d8ad; color: #18232a; font-weight: 650; }
.primary span { font-size: .72em; }
.rain-start { gap: 10px; padding-left: 5px; }
.rain-start img { display: block; width: 38px; height: 38px; border-radius: 50%; object-fit: cover; object-position: center 40%; }
.collection, .library { width: min(1120px,100%); margin-inline: auto; padding: 22px clamp(23px,5vw,64px) 116px; }
.collection h2 { margin-bottom: 16px; }
.tiles, .shelf { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(12px,3vw,24px); }
.tile, .cover { background-size: cover; background-position: center; border: 0; border-radius: 18px; width: 100%; position: relative; text-align: left; overflow: hidden; }
.tile { min-height: clamp(142px,25vw,260px); display: grid; align-items: end; padding: 14px; font-size: 1.12rem; font-weight: 650; }
.tile small { display: block; margin-top: 3px; font-size: .78rem; font-weight: 400; color: #f7e9d9; }
.rain-tile { background-image: linear-gradient(0deg,#122029d9,transparent 62%),url(assets/rain.png); }
.story-tile { background-image: linear-gradient(0deg,#172029ce,transparent 60%),url(assets/story.png); }
.library { padding-top: 116px; }
#sleep { padding-top: 82px; }
.sleep-feature { margin-top: 16px; }
.sleep-feature h2 { margin-bottom: 9px; font-size: 1.05rem; color: #f1dfc4; }
.tonight { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; text-align: left; width: 100%; min-height: clamp(140px, 30vw, 205px); padding: 15px; border: 1px solid #ffffff29; border-radius: 18px; background: linear-gradient(90deg,#101b24e8,#101b2430 78%),url(assets/story.png) center 53%/cover; }
.tonight strong { display: block; font-size: 1.3rem; font-family: "Songti SC", "Noto Serif CJK SC", SimSun, serif; font-weight: 600; }
.tonight small { display: block; margin-top: 6px; font-size: .8rem; color: #f7e9d9; }
.tonight .cover-play { flex: 0 0 42px; }
.filters { display: flex; gap: 9px; flex-wrap: wrap; margin-block: 20px 28px; }
#sleep .filters { margin-block: 17px; }
.filters button, .secondary, .player-top button { min-height: 44px; border: 1px solid #ffffff40; padding: 0 12px; border-radius: 25px; background: #17242c80; }
#sleep .filters button { padding-inline: 9px; font-size: .88rem; }
.filters button[aria-pressed="true"], .secondary[aria-pressed="true"] { color: #1b2428; background: #f0d8ad; border-color: transparent; }
.cover { display: grid; align-items: end; justify-items: end; aspect-ratio: 4/4.7; max-height: 410px; padding: 11px; }
.cover-play { display: grid; place-items: center; background: #f7eddb; color: #212a2c; width: 42px; height: 42px; border-radius: 50%; font-size: .8rem; }
.shelf h2 { margin-top: 12px; font-size: 1.25rem; }
.shelf p { margin-top: 6px; font-size: .8rem; color: #cdd0c8; }
.player { isolation: isolate; position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.player-scene { position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg,#10202c 0%,#10202cdd 17%,#10202c55 44%,transparent 66%,#10202c55),url(assets/rain.png) center 40%/cover; }
.player.rain-entering { position: fixed; inset: 0; min-height: 0; z-index: 5; }
.rain-transition-photo { position: fixed; z-index: 6; display: block; object-fit: cover; object-position: center 40%; pointer-events: none; }
.player[data-track="story"] .player-scene { background-image: linear-gradient(0deg,#10202c 0%,#10202cdd 17%,#10202c55 45%,transparent 67%,#10202c55),url(assets/story.png); }
.player-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 22px clamp(20px,5vw,64px); }
.player-top button { min-width: 48px; }
.player-content { width: min(550px,100%); margin-inline: auto; padding: 290px 23px 20px; }
.player-content h1 { margin-bottom: 20px; }
.rain-controls { display: flex; gap: 10px; align-items: end; justify-content: space-between; }
.rain-controls small { display: block; color: #e9dfd2; margin-bottom: 3px; }
.rain-controls strong { font-size: 2rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.timer { display: flex; align-items: center; min-height: 44px; gap: 8px; padding: 0 12px; border: 1px solid #ffffff45; border-radius: 24px; background: #22313bd9; font-size: .82rem; white-space: nowrap; }
#timer-setting { color: #f0d8ad; }
#timer-sheet { position: fixed; inset: auto 0 0; width: min(100%, 480px); max-width: 100%; max-height: 90svh; margin: 0 auto; padding: 0; border: 1px solid #ffffff30; border-bottom: 0; border-radius: 24px 24px 0 0; color: inherit; background: #202d34; }
#timer-sheet[open] { animation: timer-rise 230ms ease-out both; }
#timer-sheet::backdrop { background: #090f15a6; }
.timer-sheet-inner { padding: 12px 20px max(24px, env(safe-area-inset-bottom)); }
.timer-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
#timer-close { width: 44px; height: 44px; background: transparent; border: 0; border-radius: 50%; font-size: 1.5rem; }
.timer-options { display: grid; gap: 6px; }
.timer-options button { display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 0 14px; border: 1px solid transparent; border-radius: 12px; background: #ffffff08; }
.timer-options button[aria-pressed="true"] { border-color: #f0d8ad66; background: #f0d8ad1a; color: #f0d8ad; }
.timer-options button[aria-pressed="true"]::after { content: "✓" / ""; }
@keyframes timer-rise { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { #timer-sheet[open] { animation: none; } }
.transport { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.play { order: -1; display: grid; place-items: center; flex: 0 0 60px; height: 60px; border: 0; border-radius: 50%; background: #f0d8ad; color: #18232a; font-size: 1.24rem; }
.secondary { font-size: .82rem; }
#seek { width: 100%; accent-color: #f0d8ad; }
.elapsed { display: flex; justify-content: space-between; color: #e3ded5; font-size: .85rem; font-variant-numeric: tabular-nums; }
#notice { min-height: 1.35em; font-size: .79rem; margin-top: 9px; }
.dock { position: fixed; z-index: 4; left: 0; right: 0; bottom: 0; background: #142026f0; border-top: 1px solid #ffffff25; padding: 0 max(14px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(14px, env(safe-area-inset-left)); }
.dock nav, #mini { display: flex; justify-content: space-around; gap: 8px; max-width: 580px; margin-inline: auto; }
.dock button { border: 0; background: transparent; padding: 0 16px; min-height: 50px; color: #d0d6d3; }
.dock [aria-current="page"] { color: #f0d8ad; font-weight: 650; }
#mini { border-bottom: 1px solid #ffffff25; }
#mini-open { margin-right: auto; }
.app:has(#player:not([hidden], .rain-entering)) .masthead, .app:has(#player:not([hidden], .rain-entering)) .dock { display: none; }
.practice { background: radial-gradient(ellipse at 60% 18%,#d2e5df,#f1e9de 72%); color: #213b3a; }
.app:has(#practice:not([hidden])) .brand, .app:has(#practice:not([hidden])) .preview-label { color: #f9f5e9; }
.practice-inner { text-align: center; padding: 116px 20px 120px; }
.practice-inner p { margin: 10px 0 19px; }
.breath-art { margin: 44px auto 32px; height: clamp(100px,33vw,190px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 31%,#f8f4d7,#a2c6be 48%,#447b77); box-shadow: 0 0 0 16px #567b7030; }
.practice[data-breathing="true"] .breath-art { animation: breathe 10s infinite ease-in-out; }
@keyframes breathe { 0%, 100% { transform: scale(.88); } 40% { transform: scale(1.12); } }
@media (prefers-reduced-motion:reduce) { .breath-art { animation: none !important; } }
@media (min-width: 900px) {
  .home-hero { background-image: url(assets/lake-wide.png); }
  .home-hero::before { background: linear-gradient(0deg,#101b24 0%,#142533a0 18%,transparent 60%); }
  .collection, .library { padding-bottom: 108px; }
  .player-scene { background-position: 75% 38%; }
  .rain-transition-photo { object-position: 75% 38%; }
  .player-content { margin-inline: clamp(38px,10vw,160px) auto; }
}
@media (prefers-reduced-motion: reduce) { .scene-motion { display: none; } }
@media (max-width: 375px) { .transport { gap: 6px; } .transport .secondary { padding-inline: 8px; } }


.desktop-nav { display: none; }
.favorite-heading { margin-block: 28px 16px; }
#favorite-list button { display: block; min-height: 48px; padding: 0 12px; margin-block: 8px; border: 1px solid #ffffff40; border-radius: 14px; background: #24333a; }
.meditation-tile { background-image: linear-gradient(0deg,#172029ce,transparent 60%),url(assets/meditation.png); }
.player[data-track="meditation"] .player-scene { background-image: linear-gradient(0deg,#10202c 0%,#10202cdd 17%,#10202c55 45%,transparent 67%,#10202c55),url(assets/meditation.png); }
.transport button { flex-shrink: 0; }
@media (max-width: 375px) {
  .transport .secondary { padding-inline: 6px; font-size: .76rem; }
  .transport .play { flex-basis: 52px; height: 52px; }
}
@media (min-width: 900px) {
  .desktop-nav { display: flex; gap: 6px; padding: 3px; background: #172229cf; border-radius: 26px; }
  .desktop-nav button { border: 0; border-radius: 24px; background: transparent; min-height: 44px; padding: 0 20px; }
  .desktop-nav button[aria-current="page"] { background: #f0d8ad; color: #18232a; }
  .dock:has(#mini[hidden]), .dock nav { display: none; }
  .shelf { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
.record-list { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 24px; color: var(--muted); }
.record-list button { background: #263943; border: 1px solid #50636a; border-radius: 10px; padding: 10px 14px; }
#practice .breath-art { animation: none; transform: scale(var(--breath-scale, 1)); }
@media (prefers-reduced-motion: reduce) { #practice .breath-art { transform: none; } }
#breath-end { margin: 10px auto; color: #28424a; }
.panel { background: #142026; padding: 96px 24px 130px; }
.panel-inner { max-width: 720px; margin: auto; }
.panel h1 { font-size: clamp(28px, 5vw, 42px); margin: 24px 0 16px; }
.panel h2 { margin: 28px 0 12px; font-size: 22px; }
.panel p { line-height: 1.8; }
.muted { color: #bac7c9; }
.gold, .price { color: #f0d8ad; }
.back-link, .text-link { border: 0; background: transparent; color: #f0d8ad; padding: 12px 0; text-align: left; }
.full { width: 100%; margin: 12px 0; }
.panel form { display: grid; gap: 14px; margin: 20px 0; }
.panel label { display: grid; gap: 8px; }
.panel input:not([type=checkbox]), .panel textarea, .panel select {
    display: block; width: 100%; min-height: 48px; padding: 12px; border: 1px solid #72878d;
    border-radius: 10px; background: #22343d; color: #f3f1e8; font: inherit;
}
.panel textarea { min-height: 120px; }
.panel .agree { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; line-height: 1.7; font-size: 14px; }
.agree input { min-width: 20px; min-height: 20px; accent-color: #e9c98d; }
.agree .text-link { padding: 0; }
.outline { border: 1px solid #87989c; background: transparent; border-radius: 12px; padding: 12px 20px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; margin: 18px 0; }
.plan-grid { display: grid; gap: 16px; margin: 24px 0; }
.plan { display: grid; gap: 12px; text-align: left; padding: 22px; border: 1px solid #a68e65; background: #223039; border-radius: 18px; }
.plan strong { font-size: 21px; }.price { font-size: 28px; }
.order-card, .lesson { display: flex; flex-wrap: wrap; width: 100%; gap: 14px; justify-content: space-between; text-align: left; margin: 14px 0; padding: 20px; background: #20313a; border: 1px solid #4c626b; border-radius: 16px; }
.order-card small { width: 100%; color: #bac7c9; overflow-wrap: anywhere; }
.order-details, .membership-state { padding: 16px 20px; background: #20313a; border-radius: 16px; margin: 24px 0; overflow-wrap: anywhere; }
.local-note { padding: 14px; border: 1px dashed #75858a; color: #bec8c9; font-size: 14px; line-height: 1.8; margin: 18px 0; }
.local-note button { border: 1px solid #73838a; border-radius: 8px; background: transparent; padding: 10px; }
.form-error { color: #ffd3bd; min-height: 1.5em; white-space: pre-wrap; }
.recovery-code { display: block; overflow-wrap: anywhere; padding: 20px; background: #22343d; user-select: all; }
.account-actions { display: grid; gap: 12px; margin: 24px 0; }
.membership-link { padding: 22px; border: 1px solid #a68e65; border-radius: 18px; color: #f0d8ad; background: #26343b; text-align: left; }
.course-entry { display: block; margin: 48px auto 0; padding: 20px; background: #e3d6bb; border: 1px solid #ab9d86; border-radius: 16px; color: #263c41; }
.detail-cover { width: 100%; max-height: 280px; object-fit: cover; border-radius: 18px; }
#track-info { padding: 0; margin: -6px 0 18px; font-size: 14px; }
@media (min-width: 900px) { .plan-grid { grid-template-columns: repeat(3, 1fr); } }
#global-notice { position: fixed; z-index: 12; bottom: 90px; left: 20px; right: 20px; max-width: 600px; margin: auto; padding: 16px; background: #35474f; border: 1px solid #8b9da1; border-radius: 12px; }
