:root {
  --ink: #162027;
  --muted: #69747d;
  --paper: #fff9ee;
  --surface: #ffffff;
  --line: #e4ded4;
  --mint: #a6e7c2;
  --mint-dark: #137454;
  --coral: #ff8a66;
  --sky: #98d9ff;
  --lemon: #f6d85f;
  --plum: #9d8cff;
  --soft: #f7f2e8;
  --shadow: 0 18px 54px rgba(45, 43, 35, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 138, 102, 0.16), transparent 30%),
    linear-gradient(115deg, rgba(166, 231, 194, 0.32) 0 36%, rgba(152, 217, 255, 0.26) 36% 64%, rgba(246, 216, 95, 0.2) 64%),
    var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(480px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px;
  display: grid;
  place-items: center;
}

.phone-frame {
  width: 100%;
  height: min(860px, calc(100vh - 64px));
  min-height: 720px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(22, 32, 39, 0.12);
  border-radius: 28px;
  background: #fffdf8;
  box-shadow: var(--shadow);
}

.app-header {
  padding: 22px 22px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow,
.tiny-label {
  margin: 0 0 4px;
  color: var(--mint-dark);
  font-size: 12px;
  font-weight: 800;
}

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

h1 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.05;
}

.brand-line {
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.brand-slogan {
  margin: 0;
  color: #c85f42;
  font-family: "Kaiti SC", "STKaiti", "Songti SC", cursive;
  font-size: 14px;
  font-style: italic;
  font-weight: 400;
  line-height: 1;
  transform: translateY(1px);
  text-shadow: 0 3px 12px rgba(255, 138, 102, 0.22);
  white-space: nowrap;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.25;
}

h3 {
  line-height: 1.25;
}

.ghost-button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
}

.step-tabs {
  margin: 0 18px 8px;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-radius: 999px;
  background: #f1eadf;
}

.step-tab {
  height: 34px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
}

.step-tab.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 4px 16px rgba(31, 61, 48, 0.08);
}

.view {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px 18px 22px;
  overflow: auto;
}

.view.active {
  display: block;
}

.site-footer {
  flex: 0 0 auto;
  padding: 8px 16px 12px;
  text-align: center;
  font-size: 11px;
  line-height: 1.3;
  background: #fffdf8;
}

.site-footer a {
  color: #9a8f82;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--mint-dark);
}

.prompt-card,
.today-band,
.field-group,
.loading-panel,
.plan-summary,
.finish-panel,
.session-card,
.action-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.prompt-card {
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(255, 138, 102, 0.16), rgba(166, 231, 194, 0.2)),
    #fff;
}

.prompt-head {
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

textarea {
  width: 100%;
  min-height: 84px;
  resize: none;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  line-height: 1.5;
}

textarea:focus {
  border-color: var(--mint-dark);
  box-shadow: 0 0 0 3px rgba(166, 231, 194, 0.32);
}

.quick-prompts {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.prompt-chip {
  min-height: 30px;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 1px solid rgba(22, 32, 39, 0.08);
  border-radius: 999px;
  color: #503c2e;
  background: #fff8df;
  font-size: 12px;
  font-weight: 700;
}

.today-band {
  margin-top: 16px;
  padding: 13px 14px;
  background:
    linear-gradient(135deg, rgba(166, 231, 194, 0.38), rgba(152, 217, 255, 0.24)),
    #fff;
}

.battery-row,
.choice-grid,
.tag-cloud,
.rating-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 8px;
}

.battery,
.choice,
.tag,
.rating {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
}

.battery.active,
.choice.active,
.tag.active,
.rating.active {
  border-color: rgba(20, 120, 83, 0.36);
  color: #0d563c;
  background: var(--mint);
  box-shadow: 0 5px 12px rgba(20, 120, 83, 0.1);
}

.coach-note {
  margin: 12px 0 0;
  color: #2f4c42;
  font-size: 14px;
  line-height: 1.55;
}

.field-group {
  margin-top: 16px;
  padding: 14px;
}

.safety-group {
  border-color: rgba(255, 138, 102, 0.52);
  background: #fffaf6;
}

.group-title {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.option-fold > summary {
  list-style: none;
  cursor: pointer;
}

.option-fold > summary::-webkit-details-marker {
  display: none;
}

.option-fold > summary::after {
  width: 8px;
  height: 8px;
  content: "";
  border-right: 2px solid #a58c79;
  border-bottom: 2px solid #a58c79;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.option-fold[open] > summary::after {
  transform: translateY(3px) rotate(225deg);
}

.option-fold:not([open]) > summary {
  margin-bottom: 0;
}

.group-title span,
.option-label {
  color: var(--muted);
  font-size: 12px;
}

.option-label {
  margin: 18px 0 9px;
  font-weight: 800;
}

.option-label span {
  margin-left: 6px;
  color: #9a7b68;
  font-weight: 700;
}

.option-label:first-of-type {
  margin-top: 0;
}

.choice-grid {
  margin-bottom: 2px;
}

.choice-grid[data-group="time"] {
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: visible;
  padding-bottom: 2px;
}

.choice-grid[data-group="time"] .choice {
  min-width: 0;
  flex: 1 1 0;
  padding: 0 6px;
  font-size: 11px;
}

.primary-action,
.secondary-action {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
}

.primary-action {
  margin-top: 18px;
  color: #082d20;
  background: linear-gradient(135deg, var(--mint), #c7f3d9);
}

.safety-copy {
  margin: 10px 4px 0;
  color: #8a6e5d;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.primary-action.compact,
.secondary-action {
  margin-top: 0;
}

.secondary-action {
  color: var(--ink);
  background: #f1eadf;
}

.loading-panel {
  min-height: 152px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.pulse-dot {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  background: var(--coral);
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.82);
    opacity: 0.62;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
}

.hidden {
  display: none;
}

.plan-summary {
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #fff;
}

.score-chip {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lemon);
  font-weight: 900;
}

.highlight-strip {
  margin: 12px 0;
  padding: 12px 14px;
  border-left: 5px solid var(--coral);
  border-radius: 8px;
  background: #fff4ee;
}

.highlight-strip p,
.quiet-copy {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.action-list {
  display: grid;
  gap: 12px;
  padding-bottom: 84px;
}

.action-card {
  padding: 12px;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
}

.figure-box {
  width: 112px;
  min-height: 112px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(152, 217, 255, 0.22), rgba(246, 216, 95, 0.18)),
    #f8fbf7;
}

.action-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.action-meta {
  margin: 0 0 6px;
  color: var(--mint-dark);
  font-size: 13px;
  font-weight: 800;
}

.action-tip,
.action-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.action-note {
  margin-top: 6px;
  color: #7c4b38;
}

.action-guide,
.session-guide {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.action-guide li + li,
.session-guide li + li {
  margin-top: 3px;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  padding: 12px 0 0;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 10px;
  background: linear-gradient(180deg, transparent, #fffdf8 24%);
}

.session-card {
  padding: 18px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 248, 223, 0.62)),
    #fff;
}

.session-meta-line {
  width: fit-content;
  margin: 10px auto 0;
  display: flex;
  gap: 8px;
}

.session-meta-line span {
  padding: 5px 10px;
  border-radius: 999px;
  color: #5d4a31;
  background: #fff0c7;
  font-size: 12px;
  font-weight: 800;
}

.voice-toggle {
  margin: 12px auto 0;
  padding: 7px 12px;
  border: 1px solid rgba(67, 145, 116, 0.25);
  border-radius: 999px;
  color: var(--mint-dark);
  background: #eef8f2;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.voice-toggle.active {
  color: #fff;
  background: var(--mint-dark);
}

.big-figure {
  width: 230px;
  height: 230px;
  margin: 18px auto 8px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(166, 231, 194, 0.32), rgba(157, 140, 255, 0.15)),
    #fff;
}

.big-figure .motion-demo {
  width: 204px;
  height: 204px;
}

.timer {
  margin-top: 8px;
  font-size: 42px;
  line-height: 1;
  font-weight: 900;
}

.session-guide {
  max-width: 250px;
  margin: 12px auto 0;
  padding: 12px 14px 12px 30px;
  border-radius: 8px;
  color: #475851;
  background: #f4faf6;
  text-align: left;
}

.session-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  color: #704730;
  background: #fff2ea;
  font-size: 13px;
  line-height: 1.45;
}

.session-controls {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 10px;
}

#nextAction {
  margin-top: 14px;
  text-align: center;
}

.finish-panel {
  padding: 18px;
  background: linear-gradient(135deg, rgba(166, 231, 194, 0.38), rgba(255, 138, 102, 0.22));
}

.finish-panel p {
  margin: 10px 0 0;
  color: #3d5650;
  line-height: 1.6;
}

.memory-list {
  display: grid;
  gap: 8px;
}

.memory-list p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  color: #36534a;
  background: #f3f8f6;
  font-size: 14px;
}

.prd-panel {
  max-width: 560px;
}

.prd-panel h2 {
  margin: 0 0 16px;
  font-size: 32px;
}

.prd-panel ul {
  margin: 0;
  padding-left: 20px;
  color: #33423e;
  line-height: 1.75;
}

.motion-demo {
  width: 98px;
  height: 98px;
  position: relative;
  display: grid;
  place-items: center;
}

.pose-figure {
  width: 94%;
  height: 94%;
  overflow: visible;
}

.pose-badges {
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.pose-badges span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--coral);
  font-size: 11px;
  font-weight: 900;
}

.pose-badges span:first-child {
  background: #7e8b83;
}

.motion-caption {
  position: absolute;
  right: 5px;
  bottom: 4px;
  left: 5px;
  margin: 0;
  padding: 2px 5px;
  border-radius: 999px;
  color: #704730;
  background: rgba(255, 244, 238, 0.9);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.pose-figure text {
  fill: #5f675f;
  font-size: 11px;
  font-weight: 800;
}

.pose-figure .body-line,
.pose-figure .wall,
.pose-figure .chair,
.pose-figure .mat {
  fill: none;
  stroke: var(--ink);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pose-figure .wall,
.pose-figure .chair,
.pose-figure .mat {
  stroke: #8b978e;
  stroke-width: 5;
}

.pose-figure .head {
  fill: #fff;
  stroke: var(--ink);
  stroke-width: 5;
}

.pose-figure .zone,
.pose-figure .breath-zone {
  fill: rgba(255, 138, 102, 0.25);
  stroke: rgba(255, 138, 102, 0.62);
  stroke-width: 3;
  transform-box: fill-box;
  transform-origin: center;
  animation: softGlow 1.4s ease-in-out infinite;
}

.pose-figure .ghost {
  opacity: 0.24;
}

.pose-figure .ghost circle,
.pose-figure .ghost path {
  fill: none;
  stroke: #162027;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pose-figure .motion-arrow {
  fill: none;
  stroke: var(--coral);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 8 8;
  animation: arrowFlow 1.1s linear infinite;
}

.flat-figure {
  width: 98%;
  height: 98%;
}

.flat-figure .skin {
  fill: #f7b993;
}

.flat-figure .ear {
  fill: #f3a982;
}

.flat-figure .hair {
  fill: #7a5140;
}

.flat-figure .hair-shadow {
  fill: #57362c;
}

.flat-figure .shirt {
  fill: #fff8e9;
}

.flat-figure .shirt-light {
  fill: #cfe98a;
}

.flat-figure .shorts {
  fill: #dbe85f;
}

.flat-figure .sock {
  fill: #fff;
}

.flat-figure .shoe {
  fill: #4e544f;
}

.flat-figure .eye {
  fill: #2c2924;
}

.flat-figure .eye-gloss {
  fill: #fff;
}

.flat-figure .cheek {
  fill: #ff9c9c;
  opacity: 0.66;
}

.flat-figure .mouth,
.flat-figure .draw-line {
  fill: none;
  stroke: #2d2923;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flat-figure .mouth {
  stroke-width: 4.5;
}

.flat-figure .draw-line {
  stroke-width: 4.2;
}

.flat-figure .shirt-stripe {
  fill: none;
  stroke: #9ac75c;
  stroke-linecap: round;
  stroke-width: 6;
}

.flat-figure .limb {
  fill: none;
  stroke: #f7b993;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 18;
}

.flat-figure .motion-path {
  fill: none;
  stroke: rgba(255, 138, 102, 0.78);
  stroke-dasharray: 8 9;
  stroke-linecap: round;
  stroke-width: 6;
  animation: arrowFlow 1.15s linear infinite;
}

.flat-figure .arrow {
  fill: var(--coral);
}

.flat-figure .wall,
.flat-figure .chair,
.flat-figure .mat {
  fill: none;
  stroke: #8b978e;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 10;
}

.flat-figure .zone,
.flat-figure .breath-zone {
  fill: rgba(255, 138, 102, 0.22);
  stroke: rgba(255, 138, 102, 0.58);
  stroke-width: 4;
  animation: softGlow 1.4s ease-in-out infinite;
}

.flat-figure .head-group,
.flat-figure .whole-body,
.flat-figure .torso-group,
.flat-figure .arm-left,
.flat-figure .arm-right,
.flat-figure .leg-left,
.flat-figure .leg-right,
.flat-figure .bridge,
.flat-figure .cat-back {
  transform-box: fill-box;
  transform-origin: center;
}

.pose-neck .head-group {
  animation: headNod 1.8s ease-in-out infinite;
}

.pose-stretch .torso-group {
  animation: sideBendFlat 1.8s ease-in-out infinite;
}

.pose-breath .breath-zone {
  animation: breatheFlat 1.8s ease-in-out infinite;
}

.pose-neck .arm-left,
.pose-neck .arm-right,
.pose-arm .arm-left,
.pose-arm .arm-right {
  transform-box: fill-box;
  transform-origin: center;
  animation: armLift 1.25s ease-in-out infinite;
}

.pose-squat .main-pose {
  animation: softSquat 1.35s ease-in-out infinite;
}

.pose-core .arm-left,
.pose-core .leg-left {
  transform-box: fill-box;
  transform-origin: center;
  animation: coreReach 1.25s ease-in-out infinite;
}

.pose-step .leg-right,
.pose-step .arm-right {
  transform-box: fill-box;
  transform-origin: center;
  animation: stepLift 1.05s ease-in-out infinite;
}

.pose-glute .bridge {
  animation: bridgeLift 1.25s ease-in-out infinite;
}

.pose-back .cat-back {
  animation: backRound 1.4s ease-in-out infinite;
}

@keyframes arrowFlow {
  to {
    stroke-dashoffset: -32;
  }
}

@keyframes softGlow {
  50% {
    opacity: 0.55;
    transform: scale(1.05);
  }
}

@keyframes armLift {
  50% {
    transform: translateY(-5px) rotate(-4deg);
  }
}

@keyframes softSquat {
  50% {
    transform: translateY(7px);
  }
}

@keyframes coreReach {
  50% {
    transform: rotate(-8deg) translateY(-4px);
  }
}

@keyframes stepLift {
  50% {
    transform: translateY(-8px);
  }
}

@keyframes bridgeLift {
  50% {
    transform: translateY(-5px);
  }
}

@keyframes backRound {
  50% {
    transform: translateY(-4px);
  }
}

@keyframes headNod {
  50% {
    transform: rotate(7deg) translateY(2px);
  }
}

@keyframes sideBendFlat {
  50% {
    transform: rotate(7deg) translateX(6px);
  }
}

@keyframes breatheFlat {
  50% {
    opacity: 0.58;
    transform: scale(1.08);
  }
}

@media (max-width: 820px) {
  .app-shell {
    padding: 0;
    display: block;
  }

  .phone-frame {
    min-height: 100vh;
    height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .prd-panel {
    display: none;
  }
}

@media (max-width: 390px) {
  .action-card {
    grid-template-columns: 96px 1fr;
  }

  .figure-box {
    width: 96px;
    min-height: 104px;
  }
}
