:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  color: #28443b;
  background: #edf1eb;
}
* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; min-height: 100dvh; background: #edf1eb; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #88ae9c; outline-offset: 4px; }

.meditation-shell { width: min(1500px, calc(100% - 56px)); min-height: 100dvh; margin: 0 auto; display: flex; flex-direction: column; }
.meditation-header { height: 96px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { font: 700 2.4rem/1 Georgia, serif; letter-spacing: -.08em; }
.brand span { color: #7fa38c; }
.header-state { display: flex; align-items: center; gap: 10px; color: #71897a; font-size: .72rem; font-weight: 800; letter-spacing: .2em; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #74aa88; box-shadow: 0 0 0 5px #dbeade; }
.return-link { border: 1px solid #d3dfd3; border-radius: 999px; padding: 12px 18px; background: #ffffffa8; color: #4b705c; font-size: .82rem; font-weight: 750; white-space: nowrap; transition: background .2s, transform .2s; }
.return-link:hover { background: #fff; transform: translateY(-2px); }
.return-link span { margin-left: 12px; }

.meditation-layout { flex: 1; min-height: 650px; display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(360px, .84fr); gap: 18px; }
.breath-stage { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 650px; overflow: hidden; border-radius: 28px; padding: clamp(28px, 3vw, 50px); color: #f5f7ef; background: radial-gradient(circle at 53% 29%, #54786d 0, #31564c 28%, #193c35 68%, #102e2b 100%); isolation: isolate; }
.breath-stage::before { content: ""; position: absolute; z-index: -1; width: 85%; aspect-ratio: 1; left: 7%; top: -24%; border-radius: 50%; background: radial-gradient(circle, #d2e7cb20, transparent 67%); }
.breath-stage::after { content: ""; position: absolute; z-index: -1; inset: 0; opacity: .28; background: linear-gradient(135deg, #ffffff14, transparent 36%, #082a2666); }
.stage-top { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 14px; color: #bfd3c6; font-size: .72rem; font-weight: 800; letter-spacing: .19em; }
.stage-top span:last-child { text-align: right; letter-spacing: .1em; }
.breathing-scene { position: absolute; top: 3%; left: 50%; width: min(73%, 520px); aspect-ratio: 1; transform: translateX(-50%); display: grid; place-items: center; pointer-events: none; }
.breathing-halo, .breathing-orb { position: absolute; display: block; border-radius: 50%; }
.breathing-halo { border: 1px solid #d9ece248; animation: inhale 9s ease-in-out infinite; }
.halo-one { inset: 0; opacity: .58; }
.halo-two { inset: 12%; opacity: .7; animation-delay: -2s; }
.halo-three { inset: 23%; border-color: #e9f4e480; animation-delay: -4s; }
.breathing-orb { inset: 28%; display: grid; place-items: center; background: radial-gradient(circle at 33% 25%, #fff7e7 0, #dce8dc 27%, #a5c8b8 62%, #719e90 100%); box-shadow: inset -18px -24px 40px #315d5640, 0 0 85px #cae7d75c, 0 0 150px #d7e9ce2b; animation: inhale 9s ease-in-out infinite; }
.breathing-orb span { color: #668c7e; font: 300 clamp(3.5rem, 8vw, 7rem)/1 Georgia, serif; transform: translateY(-.08em); }
@keyframes inhale { 0%, 100% { transform: scale(.92); } 50% { transform: scale(1.04); } }
.stage-copy { position: relative; z-index: 2; margin-top: auto; max-width: 600px; }
.stage-eyebrow { margin: 0 0 15px; color: #c2d4c3; font-size: .68rem; font-weight: 800; letter-spacing: .27em; }
.stage-copy h1 { margin: 0; font: 500 clamp(2.8rem, 5vw, 5rem)/1.18 Georgia, "Songti SC", serif; letter-spacing: -.06em; }
.stage-copy > p:last-child { margin: 16px 0 0; color: #c9d9d0; font-size: .95rem; line-height: 1.8; }
.time-display { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px 20px; margin-top: 26px; padding-top: 18px; border-top: 1px solid #e8f3e436; }
.time-display > span { width: 100%; color: #c1d5c9; font-size: .68rem; font-weight: 800; letter-spacing: .18em; }
.time-display strong { font: 500 clamp(2.25rem, 4vw, 4rem)/1.08 Georgia, serif; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.time-display small { color: #d2ded2; font-size: .82rem; }

.reflection-panel { min-width: 0; min-height: 650px; display: flex; flex-direction: column; border: 1px solid #e3e9df; border-radius: 28px; padding: clamp(30px, 3.2vw, 54px); background: #fffefa; box-shadow: 0 22px 60px #3753440a; }
.reflection-heading { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 19px; }
.panel-index { color: #96a797; font-size: .7rem; font-weight: 800; letter-spacing: .22em; }
.heading-rule { height: 1px; background: #e1e9df; }
.reflection-heading h2 { grid-column: 1 / -1; margin: 28px 0 0; font: 500 clamp(2.2rem, 3vw, 3.6rem)/1.2 Georgia, "Songti SC", serif; letter-spacing: -.055em; color: #28443b; }
.reflection-heading p { grid-column: 1 / -1; margin: 18px 0 0; min-height: 2.7em; color: #829385; font-size: .88rem; line-height: 1.65; }
.details-form { display: flex; flex-direction: column; margin-top: clamp(24px, 4vh, 48px); }
.details-form label { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 11px; font-size: .9rem; font-weight: 750; color: #36594a; }
.details-form label small { color: #aab6a8; font-size: .65rem; font-weight: 800; letter-spacing: .2em; }
.details-form input, .details-form textarea { width: 100%; border: 1px solid #dce7dc; border-radius: 13px; padding: 15px 17px; background: #f7faf5; color: #28443b; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
.details-form input { height: 55px; margin-bottom: 24px; font-size: 1rem; font-weight: 650; }
.details-form textarea { min-height: 128px; resize: vertical; font-size: .92rem; line-height: 1.75; }
.details-form input:focus, .details-form textarea:focus { border-color: #8eaf98; background: #fff; box-shadow: 0 0 0 4px #dcebdc8c; }
.details-form input::placeholder, .details-form textarea::placeholder { color: #a5b4a6; }
.reflection-actions { margin-top: auto; padding-top: 22px; }
.save-status { min-height: 1.4em; margin: 0 0 14px; color: #7d9984; font-size: .78rem; }
.save-status.error { color: #b35f5b; }
.finish-button { width: 100%; min-height: 59px; border: 0; border-radius: 13px; display: flex; justify-content: space-between; align-items: center; padding: 0 23px; background: #315d4a; color: #fff; font-size: .96rem; font-weight: 800; box-shadow: 0 12px 26px #315d4a24; transition: background .2s, transform .2s, box-shadow .2s; }
.finish-button:not(:disabled):hover { background: #244c3c; transform: translateY(-2px); box-shadow: 0 15px 30px #315d4a34; }
.finish-button span { font-size: 1.4rem; font-weight: 400; }
.finish-hint { margin: 13px 0 0; color: #a1aea0; font-size: .74rem; line-height: 1.5; }
.meditation-footer { flex: none; min-height: 65px; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #97a99a; font-size: .65rem; font-weight: 750; letter-spacing: .14em; }

@media (max-width: 850px) {
  .meditation-layout { grid-template-columns: 1fr; }
  .breath-stage { min-height: 590px; }
  .breathing-scene { width: min(62%, 430px); top: 0; }
  .reflection-panel { min-height: 0; }
  .reflection-heading p { min-height: 0; }
  .reflection-actions { margin-top: 30px; }
}
@media (max-width: 600px) {
  .meditation-shell { width: min(100% - 28px, 480px); }
  .meditation-header { height: 74px; }
  .brand { font-size: 2rem; }
  .header-state { display: none; }
  .return-link { padding: 10px 13px; font-size: .74rem; }
  .breath-stage { min-height: 560px; border-radius: 20px; padding: 25px; }
  .stage-top { font-size: .62rem; }
  .breathing-scene { width: min(100%, 385px); top: 4%; }
  .stage-copy h1 { font-size: clamp(2.7rem, 10vw, 3.8rem); }
  .reflection-panel { border-radius: 20px; padding: 28px 25px 30px; }
  .reflection-heading h2 { font-size: 2.6rem; }
  .meditation-footer { font-size: .55rem; }
}
@media (max-height: 780px) and (min-width: 851px) {
  .meditation-header { height: 72px; }
  .meditation-layout, .breath-stage, .reflection-panel { min-height: 560px; }
  .breathing-scene { width: min(55%, 390px); top: -6%; }
  .reflection-heading h2 { margin-top: 14px; }
  .reflection-heading p { margin-top: 9px; }
  .details-form { margin-top: 20px; }
  .details-form input { margin-bottom: 15px; }
  .details-form textarea { min-height: 90px; }
  .meditation-footer { min-height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
