* {
  box-sizing: border-box;
}

:root {
  --ink: #172722;
  --forest: #315f4d;
  --leaf: #638656;
  --water: #6fa6a0;
  --clay: #c87556;
  --paper: #fffaf2;
  --mist: #eef4e8;
  --line: rgba(23, 39, 34, 0.14);
  --shadow: rgba(27, 49, 39, 0.22);
  --release: 0;
  --tension: 1;
  color: var(--ink);
  background: var(--mist);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.sedona-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(390px, 0.76fr);
  min-height: 100vh;
  background: #eef4e8;
}

.visual-stage {
  position: sticky;
  top: 0;
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(12, 29, 22, 0.18), rgba(12, 29, 22, 0.38)),
    url("./sedona-stream.png") center / cover;
}

.visual-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 30, 22, 0.08), rgba(255, 250, 236, 0.1) 54%, rgba(255, 250, 236, 0.24)),
    linear-gradient(0deg, rgba(12, 25, 20, 0.28), transparent 48%);
  pointer-events: none;
}

#rippleCanvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.site-top,
.visual-center,
.stage-status {
  position: relative;
  z-index: 2;
}

.site-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: max(22px, env(safe-area-inset-top)) 30px 0;
}

.brand {
  color: #fffaf2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 700;
  text-decoration: none;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.34);
}

.site-top nav {
  display: flex;
  gap: 10px;
}

.site-top nav a,
.audio-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid rgba(255, 250, 242, 0.44);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.16);
  color: #fffaf2;
  padding: 0 13px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  backdrop-filter: blur(14px);
}

.audio-toggle {
  width: 38px;
  padding: 0;
}

.audio-toggle span {
  font-size: 18px;
  line-height: 1;
}

.audio-toggle.is-playing {
  border-color: rgba(243, 223, 159, 0.72);
  background: rgba(49, 95, 77, 0.36);
  box-shadow: 0 0 0 4px rgba(243, 223, 159, 0.12);
}

.audio-toggle.is-playing span {
  animation: musicPulse 1.8s ease-in-out infinite;
}

.visual-center {
  display: grid;
  place-items: center;
  gap: 24px;
  min-height: calc(100vh - 178px);
  padding: 40px 24px;
}

.breath-ring {
  display: grid;
  place-items: center;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(255, 250, 242, 0.58);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.08);
  box-shadow:
    0 0 0 calc(12px + 22px * var(--release)) rgba(255, 250, 242, calc(0.08 + 0.07 * var(--release))),
    0 24px 90px rgba(23, 39, 34, 0.32);
  animation: breathe 7.2s ease-in-out infinite;
  backdrop-filter: blur(8px);
}

.feeling-drop {
  display: grid;
  place-items: center;
  width: calc(112px + 60px * var(--tension));
  height: calc(112px + 60px * var(--tension));
  border: 1px solid rgba(255, 250, 242, 0.7);
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.9), rgba(255, 250, 242, 0.48) 27%, rgba(111, 166, 160, 0.56) 60%, rgba(49, 95, 77, 0.66)),
    rgba(255, 250, 242, 0.32);
  box-shadow:
    0 18px 48px rgba(11, 31, 24, calc(0.2 + 0.16 * var(--tension))),
    inset 0 0 28px rgba(255, 255, 255, calc(0.16 + 0.28 * var(--release)));
  transform: translateY(calc(16px * var(--tension))) scale(calc(0.92 + 0.1 * var(--tension)));
  transition: width 700ms ease, height 700ms ease, transform 700ms ease, box-shadow 700ms ease;
}

.feeling-drop span {
  max-width: 78%;
  color: #113127;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
}

.visual-center p {
  width: min(520px, calc(100vw - 48px));
  margin: 0;
  color: #fffaf2;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.7;
  text-align: center;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.38);
}

.stage-status {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  width: min(520px, calc(100% - 48px));
  min-height: 80px;
  margin: 0 auto 28px;
  border: 1px solid rgba(255, 250, 242, 0.42);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.18);
  padding: 16px 18px;
  color: #fffaf2;
  box-shadow: 0 18px 60px rgba(16, 31, 25, 0.2);
  backdrop-filter: blur(16px);
}

.stage-status span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
}

.stage-status strong {
  font-size: 30px;
  line-height: 1;
}

.release-track {
  height: 8px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.28);
}

.release-track i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f3df9f, #9bd3c7, #fffaf2);
  transition: width 700ms ease;
}

.practice-panel {
  display: grid;
  align-content: start;
  min-height: 100vh;
  border-left: 1px solid rgba(255, 255, 255, 0.44);
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.94), rgba(239, 245, 232, 0.98)),
    var(--paper);
  padding: max(28px, env(safe-area-inset-top)) 28px max(24px, env(safe-area-inset-bottom));
  box-shadow: -20px 0 80px rgba(23, 39, 34, 0.16);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 38px;
}

.eyebrow {
  margin: 0;
  color: var(--clay);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.step-meter {
  display: grid;
  gap: 8px;
  width: 128px;
  color: #5d6e63;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.step-meter div {
  height: 6px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(49, 95, 77, 0.16);
}

.step-meter i {
  display: block;
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: var(--forest);
  transition: width 400ms ease;
}

.practice-view {
  display: grid;
  gap: 22px;
}

.practice-view[hidden] {
  display: none;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  color: #172722;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 42px;
  line-height: 1.14;
}

h2 {
  margin-bottom: 0;
  font-size: 32px;
  line-height: 1.22;
}

.lead {
  margin-bottom: 0;
  color: #53685d;
  font-size: 17px;
  line-height: 1.8;
}

.field-group,
.text-field,
.range-field {
  display: grid;
  gap: 12px;
}

.field-title,
.text-field span,
.range-field span {
  color: #2d4037;
  font-size: 14px;
  font-weight: 900;
}

.topic-grid,
.intention-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice-button,
.answer-button,
.primary-button,
.secondary-button,
.secondary-link,
.text-button {
  min-height: 48px;
  border-radius: 8px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.choice-button {
  border: 1px solid rgba(49, 95, 77, 0.18);
  background: rgba(255, 255, 255, 0.68);
  color: #263d33;
  padding: 12px 10px;
  font-weight: 900;
}

.choice-button.is-selected {
  border-color: rgba(49, 95, 77, 0.72);
  background: rgba(49, 95, 77, 0.1);
  box-shadow: inset 0 0 0 1px rgba(49, 95, 77, 0.2);
}

.text-field input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(49, 95, 77, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #172722;
  padding: 0 14px;
  outline: none;
}

.text-field input:focus,
.range-field input:focus-visible,
.choice-button:focus-visible,
.answer-button:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.secondary-link:focus-visible,
.text-button:focus-visible {
  outline: 3px solid rgba(111, 166, 160, 0.34);
  outline-offset: 2px;
}

.range-field {
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid rgba(49, 95, 77, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  padding: 14px;
}

.range-field input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--forest);
}

.range-field strong {
  color: var(--forest);
  font-size: 22px;
}

.primary-button,
.secondary-button,
.secondary-link,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  padding: 0 16px;
  font-weight: 900;
  text-decoration: none;
}

.primary-button {
  background: #315f4d;
  color: #fffaf2;
  box-shadow: 0 14px 34px rgba(49, 95, 77, 0.26);
}

.secondary-button,
.secondary-link {
  border: 1px solid rgba(49, 95, 77, 0.26);
  background: rgba(255, 255, 255, 0.64);
  color: #315f4d;
}

.text-button {
  min-height: 42px;
  background: transparent;
  color: #69796f;
}

.choice-button:hover,
.answer-button:hover,
.primary-button:hover,
.secondary-button:hover,
.secondary-link:hover {
  transform: translateY(-1px);
}

.answer-stack {
  display: grid;
  gap: 12px;
}

.answer-button {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid rgba(49, 95, 77, 0.17);
  background: rgba(255, 255, 255, 0.72);
  padding: 16px;
  text-align: left;
}

.answer-button strong {
  color: #20372d;
  font-size: 18px;
}

.answer-button span {
  color: #66766c;
  font-size: 14px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.summary-strip div {
  display: grid;
  gap: 7px;
  min-height: 82px;
  border: 1px solid rgba(49, 95, 77, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  padding: 13px;
}

.summary-strip span {
  color: #6a7a70;
  font-size: 12px;
  font-weight: 900;
}

.summary-strip strong {
  color: var(--forest);
  font-size: 20px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.poster-preview {
  display: block;
  width: min(100%, 360px);
  max-height: 480px;
  justify-self: center;
  border-radius: 8px;
  box-shadow: 0 20px 55px rgba(23, 39, 34, 0.2);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.action-grid .text-button {
  grid-column: 1 / -1;
}

.copy-status {
  min-height: 22px;
  margin: 0;
  color: var(--clay);
  font-size: 14px;
  font-weight: 800;
}

.care-note {
  align-self: end;
  margin: 34px 0 0;
  color: #7b897f;
  font-size: 12px;
  line-height: 1.7;
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(0.96);
  }
  50% {
    transform: scale(1.04);
  }
}

@keyframes musicPulse {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.72;
  }
  50% {
    transform: translateY(-1px);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 920px) {
  body {
    background: #183228;
  }

  .sedona-shell {
    display: block;
    position: relative;
    min-height: 100svh;
    background: transparent;
  }

  .visual-stage {
    position: fixed;
    inset: 0;
    min-height: 100svh;
    transform: translateZ(0);
  }

  .site-top {
    padding: max(16px, env(safe-area-inset-top)) 18px 0;
  }

  .brand {
    font-size: 24px;
  }

  .site-top nav a {
    min-height: 34px;
    padding: 0 10px;
  }

  .visual-center {
    min-height: auto;
    padding: calc(max(16px, env(safe-area-inset-top)) + 82px) 18px 0;
    gap: 16px;
    pointer-events: none;
  }

  .breath-ring {
    width: 210px;
    height: 210px;
  }

  .feeling-drop {
    width: calc(86px + 42px * var(--tension));
    height: calc(86px + 42px * var(--tension));
  }

  .visual-center p {
    width: min(336px, calc(100vw - 40px));
    font-size: 16px;
  }

  .stage-status {
    position: relative;
    width: calc(100% - 32px);
    min-height: 64px;
    margin: 18px auto 0;
    padding: 12px 14px;
  }

  .practice-panel {
    position: relative;
    z-index: 3;
    min-height: auto;
    width: auto;
    margin: clamp(520px, 66svh, 620px) 14px max(18px, env(safe-area-inset-bottom));
    border-left: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
  }

  .panel-head {
    margin-bottom: 12px;
    border: 1px solid rgba(255, 250, 242, 0.45);
    border-radius: 8px;
    background: rgba(255, 250, 242, 0.72);
    padding: 14px;
    box-shadow: 0 18px 45px rgba(17, 39, 30, 0.12);
    backdrop-filter: blur(18px);
  }

  .practice-view {
    border: 1px solid rgba(255, 250, 242, 0.5);
    border-radius: 8px;
    background: rgba(255, 250, 242, 0.78);
    padding: 20px;
    box-shadow: 0 22px 60px rgba(17, 39, 30, 0.18);
    backdrop-filter: blur(20px);
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 27px;
  }

  .care-note {
    margin: 12px 4px 0;
    color: rgba(255, 250, 242, 0.86);
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
  }
}

@media (max-width: 430px) {
  .topic-grid,
  .intention-grid,
  .action-grid {
    grid-template-columns: 1fr;
  }

  .summary-strip {
    grid-template-columns: 1fr;
  }

  .panel-head {
    align-items: start;
  }

  .step-meter {
    width: 104px;
  }
}
