:root {
  --bg-top: #fdeef2;
  --bg-bottom: #fae2ea;
  --card: #fff8fa;
  --text: #3d1f2a;
  --muted: #8a5a68;
  --chip: #f7e4ea;
  --chip-text: #6b2c40;
  --selected: #e06690;
  --accent-a: #e97aa0;
  --accent-b: #f294c1;
  --shadow: 0 18px 50px rgba(224, 102, 144, 0.16);
  --mint: #e3f5ec;
  --peach: #fdeadf;
  --lavender: #ece8fb;
  --radius: 36px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  min-height: 100%;
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom)) fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.45;
}

body { padding: 20px 16px 40px; min-height: 100vh; }

.screen { display: none; max-width: 480px; margin: 0 auto; animation: fade 0.35s ease; }
.screen.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 22px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

h1 { font-size: 26px; line-height: 1.2; margin: 0 0 10px; font-weight: 700; }
h2 { font-size: 22px; margin: 0 0 8px; font-weight: 700; }
.muted { color: var(--muted); }
.label { color: var(--muted); font-size: 16px; margin: 22px 0 10px; }
.label:first-of-type { margin-top: 14px; }
p { margin: 0 0 12px; }

.btn {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 18px 20px;
  font: inherit;
  font-weight: 600;
  font-size: 18px;
  background: var(--chip);
  color: var(--chip-text);
  margin-top: 12px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}
.btn:active { transform: scale(0.98); }
.btn.accent {
  background: linear-gradient(120deg, var(--accent-a), var(--accent-b));
  color: #fff;
  box-shadow: 0 10px 28px rgba(233, 122, 160, 0.35);
}
.btn.ghost { background: transparent; color: var(--muted); font-weight: 500; }
.btn small { display: block; font-weight: 500; font-size: 13px; opacity: 0.85; margin-top: 2px; }
.btn:disabled { opacity: 0.45; }

.chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.chips.two { grid-template-columns: 1fr 1fr; }
.chips.one { grid-template-columns: 1fr; }
.chip {
  border: 0;
  border-radius: 999px;
  padding: 14px 10px;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  background: var(--chip);
  color: var(--chip-text);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.chip.selected { background: var(--selected); color: #fff; }

.emotions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.emotion {
  border: 0;
  border-radius: 24px;
  padding: 14px 4px 12px;
  background: var(--chip);
  color: var(--chip-text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.emotion span { display: block; font-size: 30px; line-height: 1.2; margin-bottom: 4px; }
.emotion.selected { background: var(--selected); color: #fff; transform: scale(1.03); }

.energy { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.energy .chip { padding: 12px 0; }
.energy-hint { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 6px; }

.rec-text { font-size: 18px; }
.rec-try { background: var(--peach); border-radius: 24px; padding: 16px 18px; margin-top: 14px; }

/* Практики */
.run { text-align: center; padding-top: 20px; }
.run .hint { color: var(--muted); min-height: 52px; margin: 0 auto 10px; max-width: 320px; transition: opacity 0.4s ease; }
.stage { height: 330px; display: flex; align-items: center; justify-content: center; position: relative; }
.timer { font-size: 64px; font-weight: 300; margin-top: 10px; font-variant-numeric: tabular-nums; }
.stop { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; font-size: 18px; padding: 16px 30px; margin-top: 10px; cursor: pointer; }

.gloves { display: flex; gap: 22px; align-items: center; justify-content: center; }
.glove {
  width: 130px; height: 130px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 64px;
  background: #c4cdee; opacity: 0.6; transform: scale(0.82);
  transition: transform 0.12s ease, background 0.12s ease, opacity 0.12s ease, box-shadow 0.12s ease;
}
.glove.left span { display: inline-block; transform: scaleX(-1); }
.glove.hit { background: #e04b55; opacity: 1; transform: scale(1.12); box-shadow: 0 0 60px 18px rgba(224, 75, 85, 0.35); }

.ball {
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #c8f5d6 0%, #5fd98a 30%, #2fae5f 70%, #1d7d43 100%);
  box-shadow: 0 30px 60px rgba(47, 174, 95, 0.25);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; transform: scale(0.62);
  transition-property: transform; transition-timing-function: ease-in-out;
}
.ball .phase { font-size: 20px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.ball .count { font-size: 44px; font-weight: 300; }

.blob {
  width: 210px; height: 210px; border-radius: 46% 54% 52% 48% / 50% 44% 56% 50%;
  background: radial-gradient(circle at 35% 30%, #ffe3ef, #f294c1 55%, #e06690);
  box-shadow: 0 30px 70px rgba(224, 102, 144, 0.35);
  animation: morph 8s ease-in-out infinite;
  transition: transform 0.12s ease-out;
}
.blob.beat { transform: scale(1.08); }
@keyframes morph {
  0%, 100% { border-radius: 46% 54% 52% 48% / 50% 44% 56% 50%; }
  50% { border-radius: 56% 44% 45% 55% / 44% 56% 46% 54%; }
}

/* Итог */
.water { display: block; margin: 0 auto; width: 240px; height: 240px; }
.water.small { width: 180px; height: 180px; }
.shift {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--mint); border-radius: 24px; padding: 14px 12px; margin: 16px 0 12px; font-size: 16px;
}
.shift .arrow { color: var(--muted); }
.shift .state { text-align: center; }
.shift .state span { display: block; font-size: 28px; }
.ack { font-size: 22px; font-weight: 600; text-align: center; margin: 16px 0 8px; }
.center { text-align: center; }

.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  background: var(--text); color: #fff; padding: 12px 22px; border-radius: 999px; font-size: 15px;
  opacity: 0; transition: opacity 0.3s ease; pointer-events: none;
}
.toast.show { opacity: 0.92; }

@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
  .screen { animation: none; }
}
