/* How-to bands + iPhone chrome. Demo timings match the iOS app. */

.howto {
  margin: 48px 0 8px;
  scroll-margin-top: 76px;
}

.howto-band {
  display: grid;
  scroll-margin-top: 76px;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1.05fr);
  min-height: min(72vh, 640px);
  background: transparent;
}

.howto-band:nth-child(even) {
  grid-template-columns: minmax(280px, 1.05fr) minmax(280px, 1fr);
}

.howto-band:nth-child(even) .howto-copy {
  order: 2;
}

.howto-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 6vw, 88px) clamp(28px, 6vw, 96px);
  color: var(--ink);
}

.howto-copy h2 {
  margin: 0 0 16px;
  color: #1f1633;
  font-size: clamp(2rem, 4.4vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.howto-copy p {
  margin: 0 0 28px;
  max-width: 28rem;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.55;
}

.howto-copy .btn-orange {
  align-self: flex-start;
  background: var(--orange);
  color: #fff;
  padding: 13px 22px;
  box-shadow: 0 10px 24px rgba(255, 153, 51, 0.28);
}

.howto-copy .btn-orange:hover {
  background: #f08a22;
}

.howto-copy .btn-orange[role="status"] {
  cursor: default;
}

.howto-copy .btn-orange[role="status"]:hover {
  background: var(--orange);
}

.howto-visual {
  position: relative;
  display: grid;
  place-items: center;
  overflow: visible;
  min-height: 480px;
  padding: 40px 28px;
}

.howto-band:nth-child(1) .howto-visual {
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.35), transparent 42%),
    linear-gradient(160deg, #7ec8c4 0%, #00a5a4 48%, #0b6e6d 100%);
}

.howto-band:nth-child(2) .howto-visual {
  background:
    radial-gradient(circle at 20% 80%, rgba(255, 153, 51, 0.28), transparent 46%),
    linear-gradient(165deg, #163a38 0%, #0c2a28 100%);
}

.howto-band:nth-child(3) .howto-visual {
  background:
    radial-gradient(circle at 70% 30%, rgba(255, 153, 51, 0.22), transparent 44%),
    linear-gradient(160deg, #d8efee 0%, #b9e0de 55%, #9fd4d1 100%);
}

/* ---------- Real iPhone chrome ---------- */

.iphone {
  --iphone-w: 300px;
  --iphone-h: 650px;
  position: relative;
  width: var(--iphone-w);
  height: var(--iphone-h);
  padding: 11px;
  border-radius: 54px;
  background:
    linear-gradient(165deg, #6a6a6e 0%, #2c2c2e 14%, #111113 46%, #1c1c1e 78%, #3a3a3c 100%);
  box-shadow:
    0 0 0 1.6px #070708,
    inset 0 1.2px 0 rgba(255, 255, 255, 0.38),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08),
    0 28px 64px rgba(10, 20, 24, 0.36);
}

.iphone-glass {
  height: 100%;
  padding: 1px;
  border-radius: 44px;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.iphone-screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 43px;
  background: #f7f7f5;
  isolation: isolate;
}

.hw {
  position: absolute;
  z-index: 2;
  background: linear-gradient(#9a9aa0, #3a3a3e 40%, #1c1c1e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 0 0 0.5px #0a0a0a;
}

.hw.silent {
  left: -4px;
  top: 112px;
  width: 4px;
  height: 22px;
  border-radius: 2px 0 0 2px;
}

.hw.vol-up {
  left: -4px;
  top: 154px;
  width: 4px;
  height: 38px;
  border-radius: 2px 0 0 2px;
}

.hw.vol-down {
  left: -4px;
  top: 200px;
  width: 4px;
  height: 38px;
  border-radius: 2px 0 0 2px;
}

.hw.power {
  right: -4px;
  top: 184px;
  width: 4px;
  height: 76px;
  border-radius: 0 2px 2px 0;
}

.status-bar {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 48px;
  padding: 12px 16px 0;
  color: #111;
  font-size: 12px;
  font-weight: 670;
  letter-spacing: -0.04em;
  pointer-events: none;
}

.status-time {
  padding-left: 12px;
}

.island {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 70px;
  height: 18px;
  padding-right: 5px;
  border-radius: 11px;
  background: #000;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.4);
}

.island-cam {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 32%, #2a5a88 0 18%, #0b1528 52%, #05070c 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.status-glyphs {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  padding-right: 8px;
}

.status-glyphs svg {
  display: block;
  height: 11px;
  width: auto;
  fill: currentColor;
}

.home-indicator {
  position: absolute;
  left: 50%;
  bottom: 7px;
  z-index: 9;
  width: 108px;
  height: 5px;
  border-radius: 99px;
  background: #111;
  opacity: 0.55;
  transform: translateX(-50%);
  pointer-events: none;
}

.iphone-screen.is-dark .status-bar {
  color: #fff;
}

.iphone-screen.is-dark .home-indicator {
  background: #fff;
}

.howto-iphone {
  width: min(300px, 78vw);
  height: calc(min(300px, 78vw) * 2.17);
}

.extract-screen,
.preview-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ---------- Shared flow layers ---------- */

.flow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}

.layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.layer-safari { z-index: 1; }
.layer-dim { z-index: 2; }
.layer-menu,
.layer-share { z-index: 3; }
.layer-extract,
.layer-preview { z-index: 4; }
.layer-hand { z-index: 5; }

.layer.is-on,
.flow-extract[data-phase="0"] .layer-safari,
.flow-extract[data-phase="1"] .layer-safari,
.flow-extract[data-phase="2"] .layer-safari,
.flow-extract[data-phase="3"] .layer-safari,
.flow-extract[data-phase="1"] .layer-hand,
.flow-extract[data-phase="2"] .layer-hand,
.flow-extract[data-phase="3"] .layer-hand,
.flow-extract[data-phase="2"] .layer-dim,
.flow-extract[data-phase="3"] .layer-dim,
.flow-extract[data-phase="2"] .layer-menu,
.flow-extract[data-phase="3"] .layer-share,
.flow-extract[data-phase="4"] .layer-extract,
.flow-extract[data-phase="5"] .layer-preview,
.flow-recipe[data-phase="0"] .layer-safari,
.flow-recipe[data-phase="1"] .layer-safari,
.flow-recipe[data-phase="2"] .layer-safari,
.flow-recipe[data-phase="3"] .layer-safari,
.flow-recipe[data-phase="1"] .layer-hand,
.flow-recipe[data-phase="2"] .layer-hand,
.flow-recipe[data-phase="3"] .layer-hand,
.flow-recipe[data-phase="2"] .layer-dim,
.flow-recipe[data-phase="3"] .layer-dim,
.flow-recipe[data-phase="2"] .layer-menu,
.flow-recipe[data-phase="3"] .layer-share,
.flow-recipe[data-phase="4"] .layer-extract,
.flow-recipe[data-phase="5"] .layer-preview {
  opacity: 1;
}

.flow-extract[data-phase="2"] .layer-dim,
.flow-recipe[data-phase="2"] .layer-dim {
  background: rgba(0, 0, 0, 0.2);
}

.flow-extract[data-phase="3"] .layer-dim,
.flow-recipe[data-phase="3"] .layer-dim {
  background: rgba(0, 0, 0, 0.45);
}

.flow-extract[data-phase="1"] .hand,
.flow-recipe[data-phase="1"] .hand { left: 90%; top: 93%; }
.flow-extract[data-phase="2"] .hand,
.flow-recipe[data-phase="2"] .hand { left: 72%; top: 58%; }
.flow-extract[data-phase="3"] .hand,
.flow-recipe[data-phase="3"] .hand { left: 82%; top: 70%; }

/* ---------- Safari recipe page ---------- */

.safari {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #f2ebe0;
}

.safari-scroll {
  flex: 1;
  padding: 50px 12px 8px;
  overflow: hidden;
}

.crumbs {
  margin: 0 0 8px;
  color: #6e6e73;
  font-size: 7px;
}

.safari-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.safari-tabs span {
  color: #1d1d1f;
  font-size: 6px;
  font-weight: 650;
  text-decoration: underline;
}

.safari-tabs .is-on {
  padding: 5px 7px;
  border-radius: 2px;
  background: #111;
  color: #fff;
  text-decoration: none;
}

.safari-meta {
  margin: 0 0 4px;
  color: #1d1d1f;
  font-size: 7px;
  font-weight: 700;
}

.safari-scroll h3 {
  margin: 0 0 4px;
  color: #1d1d1f;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.rating {
  display: flex;
  gap: 4px;
  align-items: center;
  margin: 0 0 8px;
  font-size: 8px;
}

.rating b { font-size: 9px; }
.rating .stars { color: #ff9933; letter-spacing: 1px; font-size: 7px; }
.rating em { color: #6e6e73; font-style: normal; }

.safari-hero {
  width: 100%;
  height: 118px;
  margin-bottom: 8px;
  object-fit: cover;
  border-radius: 2px;
}

.safari-desc {
  margin: 0 0 10px;
  color: #1d1d1f;
  font-size: 8px;
  line-height: 1.4;
}

.ing-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.servings-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 7px;
}

.servings-chip {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 2px;
  font-weight: 650;
}

.ing-section {
  margin: 0 0 4px;
  font-size: 8px;
  font-weight: 700;
}

.ing-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(60, 60, 67, 0.12);
  font-size: 7px;
}

.ing-row b { font-weight: 650; }

.safari-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px 22px;
  background: #fff;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
}

.safari-toolbar svg.nav {
  width: 12px;
  height: 12px;
  stroke: #1d1d1f;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.safari-toolbar svg.nav.dim { stroke: #c7c7cc; }

.safari-url {
  display: flex;
  flex: 1;
  gap: 5px;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(120, 120, 128, 0.12);
  color: #1d1d1f;
  font-size: 8px;
  font-weight: 500;
}

.safari-url svg {
  width: 9px;
  height: 9px;
  fill: #8e8e93;
}

.dots {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #1d1d1f;
}

.flow-extract[data-phase="1"] .dots {
  color: var(--aqua);
  background: rgba(0, 165, 164, 0.15);
  animation: tap-pulse 0.9s ease-in-out infinite;
}

.dots svg { width: 14px; height: 14px; fill: currentColor; }

@keyframes tap-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}

/* Safari ⋯ menu */
.layer-menu {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 8px 72px 0;
}

.safari-menu {
  width: 200px;
  padding: 8px 4px 8px;
  border-radius: 14px;
  background: rgba(246, 246, 248, 0.94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}

.menu-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  color: #1d1d1f;
  font-size: 10px;
}

.menu-row svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.menu-row.is-share {
  margin: 0 4px;
  border-radius: 8px;
  background: rgba(0, 165, 164, 0.1);
  color: var(--aqua);
  font-weight: 650;
  animation: tap-pulse 0.9s ease-in-out infinite;
}

.menu-div {
  height: 1px;
  margin: 4px 12px;
  background: rgba(60, 60, 67, 0.16);
}

.menu-foot {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px 4px;
}

.menu-foot span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  color: #1d1d1f;
  font-size: 7px;
}

.menu-foot svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
}

/* iOS share sheet */
.layer-share {
  display: flex;
  align-items: flex-end;
  padding: 0 6px 18px;
}

.share-sheet {
  width: 100%;
  padding: 14px 8px 18px;
  border-radius: 18px;
  background: #e8e8ed;
}

.share-link {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 6px 12px;
}

.share-link img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
}

.share-link strong {
  display: block;
  color: #1d1d1f;
  font-size: 11px;
  font-weight: 650;
}

.share-link small {
  color: #6e6e73;
  font-size: 10px;
}

.share-apps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0 4px;
  text-align: center;
}

.share-app {
  color: #6e6e73;
  font-size: 7px;
}

.share-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 5px;
  border-radius: 50%;
  background: rgba(120, 120, 128, 0.16);
  color: #007aff;
  font-size: 16px;
}

.share-icon.msg { color: #34c759; }
.share-app img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.share-app.is-kook {
  color: var(--aqua);
  font-weight: 650;
}

.share-app.is-kook img {
  animation: tap-pulse 0.7s ease-in-out infinite;
  box-shadow: 0 0 0 2.5px var(--aqua);
}

/* Touch hand */
.layer-hand {
  z-index: 5;
}

.hand {
  position: absolute;
  width: 54px;
  height: 54px;
  margin: -8px 0 0 -10px;
  filter: drop-shadow(0 3px 6px rgba(0, 165, 164, 0.4));
  transform: translate(-50%, -50%) rotate(-28deg);
  animation: hand-press 1.08s ease-in-out infinite;
}

.hand svg { width: 100%; height: 100%; }

@keyframes hand-press {
  0%, 37% { transform: translate(-50%, -50%) rotate(-28deg) scale(1); }
  52% { transform: translate(-50%, calc(-50% + 6px)) rotate(-28deg) scale(0.86); }
  67%, 100% { transform: translate(-50%, -50%) rotate(-28deg) scale(1); }
}

/* Extracting */
.extract-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
}

.kook-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 48px 16px 12px;
  background: #fff;
  color: var(--aqua);
  font-size: 13px;
}

.extract-screen .kook-nav {
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.22);
}

.kook-nav strong {
  color: #1d1d1f;
  font-size: 15px;
  font-weight: 650;
}

.kook-nav .ghost { opacity: 0; }

.extract-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 28px 36px;
  text-align: center;
}

.extract-spin {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 30px;
}

.extract-spin .extract-ring-scale {
  position: absolute;
  inset: 0;
  animation: spin-scale 1.5s ease-in-out infinite;
}

.extract-spin .extract-ring {
  position: absolute;
  inset: 0;
  width: 120px;
  height: 120px;
  animation: spin-ring 2s linear infinite;
}

.extract-spin .pulse {
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 165, 164, 0.3), rgba(0, 165, 164, 0.1));
  animation: inner-pulse 1s ease-in-out infinite;
}

.extract-spin .fork {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--aqua);
}

.extract-spin .fork svg { width: 32px; height: 32px; display: block; }

.extract-body p {
  margin: 0 0 12px;
  color: #1d1d1f;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.extract-sub {
  display: block;
  margin: 0 0 12px;
  color: #8e8e93;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.dots-bounce {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.dots-bounce i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--aqua);
  animation: bounce-dot 0.6s ease-in-out infinite;
}

.dots-bounce i:nth-child(2) { animation-delay: 0.2s; }
.dots-bounce i:nth-child(3) { animation-delay: 0.4s; }

@keyframes spin-ring { to { transform: rotate(360deg); } }
@keyframes spin-scale {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
@keyframes inner-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}
@keyframes bounce-dot {
  0%, 100% { transform: scale(0.8); }
  50% { transform: scale(1.2); }
}

/* Recipe preview replica */
.preview-screen {
  display: flex;
  flex-direction: column;
  background: #f2f2f7;
}

.preview-scroll {
  flex: 1;
  padding: 10px 12px 6px;
  overflow: hidden;
}

.preview-photo {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.preview-scroll h3 {
  margin: 16px 0 6px;
  color: #1d1d1f;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
}

.preview-scroll p {
  margin: 0 0 16px;
  color: #6e6e73;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.details-label {
  margin: 0 0 10px;
  color: #1d1d1f;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  letter-spacing: -0.01em;
}

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

.detail-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 4px 8px;
  border-radius: 12px;
  background: #e8e8ed;
  color: #6e6e73;
  font-size: 9px;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
}

.detail-card b {
  display: block;
  color: #1d1d1f;
  font-size: 11px;
  font-weight: 600;
}

.detail-card .ico {
  width: 18px;
  height: 18px;
  color: var(--aqua);
}

.preview-cat {
  margin-top: 12px;
}

.cat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.cat-head b {
  flex-shrink: 0;
  color: #1d1d1f;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.cat-chips {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 5px;
  border-radius: 8px;
  background: rgba(0, 165, 164, 0.2);
  color: var(--aqua);
  font-size: 9px;
  font-weight: 400;
  line-height: 1.15;
  white-space: nowrap;
}

.cat-chip .x {
  width: 9px;
  height: 9px;
  display: block;
}

.cat-picker {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 11px 12px;
  border-radius: 12px;
  background: #e8e8ed;
  color: var(--aqua);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
}

.cat-picker .chev {
  width: 9px;
  height: 14px;
  display: block;
  flex-shrink: 0;
}

.preview-actions {
  display: flex;
  gap: 12px;
  padding: 9px 12px 20px;
  background: #fff;
  box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.1);
}

.preview-actions span {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  padding: 12px 6px;
  border-radius: 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.preview-actions svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.preview-actions .discard { background: #ff3b30; }
.preview-actions .save {
  background: linear-gradient(90deg, var(--aqua), rgba(0, 165, 164, 0.8));
}

/* ---------- Scan food ---------- */

.flow-scan {
  background: #111;
}

.scan-feed {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.12) 42%, rgba(0, 0, 0, 0.45)),
    url("/demo-healthy.jpg") center / cover no-repeat;
}

.scan-title {
  position: absolute;
  top: 54px;
  left: 50%;
  z-index: 2;
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  transform: translateX(-50%);
  white-space: nowrap;
}

.scan-title svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }

.reticle {
  position: absolute;
  top: 45%;
  left: 50%;
  z-index: 2;
  width: 93%;
  height: 58%;
  border-radius: 4px;
  transform: translate(-50%, -50%) scale(0.96);
  opacity: 1;
  transition: transform 0.35s ease, opacity 0.3s ease, filter 0.3s ease;
}

.reticle span {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255, 255, 255, 0.85);
}

.reticle span:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 4px 0 0 0; }
.reticle span:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 4px 0 0; }
.reticle span:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 4px; }
.reticle span:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 4px 0; }

.flow-scan[data-phase="1"] .reticle,
.flow-scan[data-phase="2"] .reticle {
  transform: translate(-50%, -50%) scale(1);
}

.flow-scan[data-phase="1"] .reticle span,
.flow-scan[data-phase="2"] .reticle span {
  border-color: var(--aqua);
  filter: drop-shadow(0 0 6px rgba(0, 165, 164, 0.6));
}

.flow-scan[data-phase="3"] .reticle,
.flow-scan[data-phase="4"] .reticle {
  opacity: 0;
}

.scan-hint {
  position: absolute;
  right: 12px;
  bottom: 28px;
  left: 12px;
  z-index: 2;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.scan-hint .mini {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin-ring 0.8s linear infinite;
}

.flow-scan[data-phase="3"] .scan-hint,
.flow-scan[data-phase="4"] .scan-hint { opacity: 0; }

.flow-scan[data-phase="0"] .hint-point,
.flow-scan[data-phase="1"] .hint-point { display: flex; }
.flow-scan[data-phase="2"] .hint-point { display: none; }
.flow-scan[data-phase="0"] .hint-analyzing,
.flow-scan[data-phase="1"] .hint-analyzing { display: none; }
.flow-scan[data-phase="2"] .hint-analyzing { display: flex; }

.leaders {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.35s ease;
  overflow: visible;
}

.flow-scan[data-phase="3"] .leaders {
  opacity: 0.9;
}

.bubbles { position: absolute; inset: 0; z-index: 3; pointer-events: none; }

.bubble {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border: 1.5px solid rgba(0, 165, 164, 0.28);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
  color: #1d1d1f;
  font-size: 7px;
  font-weight: 650;
  line-height: 1.05;
  text-align: center;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bubble b {
  color: var(--aqua);
  font-size: 8px;
}

.bubble i {
  font-style: normal;
  font-size: 14px;
  line-height: 1;
}

.leader {
  position: absolute;
  z-index: 2;
  height: 1.5px;
  background: rgba(0, 165, 164, 0.85);
  transform-origin: 0 50%;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.leader::after {
  content: "";
  position: absolute;
  left: -3px;
  top: 50%;
  width: 7px;
  height: 7px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: var(--aqua);
  transform: translateY(-50%);
}

.flow-scan[data-phase="3"] .bubble,
.flow-scan[data-phase="3"] .leader {
  opacity: 1;
  transform: scale(1);
}

.flow-scan[data-phase="3"] .bubble:nth-child(1) { transition-delay: 0s; }
.flow-scan[data-phase="3"] .bubble:nth-child(2) { transition-delay: 0.09s; }
.flow-scan[data-phase="3"] .bubble:nth-child(3) { transition-delay: 0.18s; }
.flow-scan[data-phase="3"] .bubble:nth-child(4) { transition-delay: 0.27s; }
.flow-scan[data-phase="3"] .bubble:nth-child(5) { transition-delay: 0.36s; }
.flow-scan[data-phase="3"] .bubble:nth-child(6) { transition-delay: 0.45s; }
.flow-scan[data-phase="3"] .bubble:nth-child(7) { transition-delay: 0.54s; }

.scan-sheet {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  padding: 7px 14px 22px;
  border-radius: 18px 18px 0 0;
  background: #e8e8ed;
  transform: translateY(110%);
  transition: transform 0.42s cubic-bezier(0.2, 0.85, 0.2, 1);
}

.flow-scan[data-phase="4"] .scan-sheet { transform: translateY(0); }

.sheet-handle {
  width: 34px;
  height: 4px;
  margin: 0 auto 10px;
  border-radius: 99px;
  background: rgba(60, 60, 67, 0.35);
}

.sheet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sheet-top > div:first-child {
  flex: 1;
  min-width: 0;
}

/* Matches ScanFoodView: title3 bold name, subheadline secondary grams. */
.sheet-dish {
  display: block;
  overflow: hidden;
  color: #1d1d1f;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-top small {
  display: block;
  margin-top: 2px;
  color: rgba(60, 60, 67, 0.6);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.sheet-note {
  display: block;
  margin-top: 3px;
  color: #6e6e73;
  font-size: 9px;
  font-style: normal;
  line-height: 1.25;
}

.kcal {
  display: flex;
  flex: none;
  align-items: baseline;
  gap: 3px;
  color: var(--aqua);
  font-family: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.kcal span { font-size: 11px; font-weight: 600; opacity: 0.8; }

.macros {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 10px 0;
}

.macro {
  padding: 6px 4px;
  border-radius: 8px;
  background: #fff;
  font-size: 8px;
  text-align: center;
}

.macro b { display: block; font-size: 11px; }
.macro.p { color: #007a8a; }
.macro.c { color: #daa520; }
.macro.f { color: #e06c58; }
.macro.fi { color: #8262a8; }

.add-log {
  display: block;
  padding: 10px 0;
  border-radius: 999px;
  background: var(--aqua);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

/* ---------- Weight journey ---------- */

.flow-weight {
  --ring: 0;
  --line: 0;
  --counter: 0;
  display: flex;
  flex-direction: column;
  background: #f2f2f7;
}

.weight-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 48px;
  padding: 9px 12px;
  color: #1d1d1f;
  background: rgba(247, 247, 247, 0.72);
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.weight-nav strong {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
}

.weight-body {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: 11px 13px 12px;
  overflow: hidden;
}

.weight-metrics {
  position: relative;
  z-index: 1;
}

.weight-head {
  display: flex;
  gap: 12px;
  align-items: center;
  line-height: 1;
}

.ring-wrap {
  position: relative;
  width: 60px;
  height: 60px;
  flex: none;
}

.ring {
  display: block;
  width: 60px;
  height: 60px;
  overflow: visible;
}

.ring .track {
  fill: none;
  stroke: rgba(0, 165, 164, 0.14);
  stroke-width: 9;
}

.ring .fill {
  fill: none;
  stroke: url(#weightRing);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 160.22;
  stroke-dashoffset: calc(160.22 * (1 - var(--ring)));
}

.ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #1d1d1f;
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.ring-label small {
  display: block;
  margin-top: 1px;
  color: rgba(60, 60, 67, 0.6);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 7px;
  font-weight: 600;
}

.weight-now {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
}

.weight-now small {
  color: rgba(60, 60, 67, 0.6);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.2;
}

.weight-now .kg {
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: #1d1d1f;
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 29px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.weight-now .kg i {
  color: rgba(60, 60, 67, 0.6);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  line-height: 1;
}

.delta {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(0, 165, 164, 0.14);
  color: var(--aqua);
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.delta svg {
  width: 9px;
  height: 9px;
}

.flow-weight[data-phase="1"] .delta { opacity: 1; }

.spark {
  display: block;
  overflow: visible;
  width: 100%;
  height: 62px;
  margin: 10px 0 8px;
}

.spark .grid { stroke: rgba(60, 60, 67, 0.18); stroke-width: 1; }
.weight-area {
  fill: url(#weightFill);
  opacity: 0;
}
.weight-line {
  fill: none;
  stroke: var(--aqua);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 172;
  stroke-dashoffset: 172;
}

.spark-dot {
  fill: #f2f2f7;
  stroke: var(--aqua);
  stroke-width: 2;
  opacity: 0;
}

.chips {
  display: flex;
  gap: 8px;
}

.chip {
  display: flex;
  flex: 1;
  gap: 7px;
  align-items: center;
  min-width: 0;
  padding: 7px 9px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.05);
}

.chip-ico {
  flex: none;
  width: 13px;
  height: 13px;
  color: var(--aqua);
}

.chip small {
  display: block;
  color: #6e6e73;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.chip b {
  color: #1d1d1f;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.figure {
  position: absolute;
  left: 50%;
  top: 48%;
  bottom: 22px;
  z-index: 0;
  width: 150px;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(-50%);
}

.figure img {
  display: block;
  height: 100%;
  width: auto;
  max-width: none;
  margin-left: 50%;
  object-fit: contain;
  object-position: center bottom;
  transform: translateX(-50%);
}

/* ---------- Discover more carousel ---------- */

.howto-band.howto-discover {
  grid-template-columns: minmax(280px, 1.05fr) minmax(280px, 1fr);
}

.howto-band.howto-discover .howto-copy {
  order: 2;
}

.howto-discover .howto-copy p {
  margin: 0 0 16px;
}

.discover-kicker {
  margin: 4px 0 0;
}

.discover-kicker strong {
  display: block;
  color: #00a5a4;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.discover-kicker span {
  display: block;
  margin-top: 4px;
  color: var(--text, #4f4f4f);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.45;
}

.howto-discover .howto-visual {
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 153, 51, 0.28), transparent 44%),
    linear-gradient(160deg, #5bb8b4 0%, #1a8a88 52%, #0e5f5d 100%);
}

/* ---------- And even more (mirrored discover band) ---------- */

.howto-band.howto-even-more {
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1.05fr);
  background:
    radial-gradient(circle at 72% 18%, rgba(255, 153, 51, 0.22), transparent 44%),
    linear-gradient(160deg, #d8efee 0%, #b9e0de 55%, #9fd4d1 100%);
}

.howto-band.howto-even-more .howto-copy {
  order: 0;
}

.howto-even-more .howto-visual {
  background: transparent;
}

.howto-even-more .howto-copy p {
  margin: 0 0 16px;
}

.howto-even-more .howto-copy h2 {
  color: #000;
}

.howto-even-more .howto-copy p.even-more-tagline {
  margin: 0 0 16px;
  max-width: 28rem;
  color: #000;
  font-size: clamp(1.25rem, 2.8vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.howto-even-more .howto-copy > p:not(.even-more-tagline):not(.even-more-download) {
  margin: 0 0 4px;
}

.even-more-download {
  margin: 0 0 28px;
  max-width: 28rem;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.55;
}

.even-more-download strong {
  color: inherit;
  font-weight: 800;
}

.howto-even-more .howto-copy .btn-orange {
  align-self: flex-start;
  padding: 13px 22px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.howto-even-more .howto-copy .btn-orange[role="status"]:hover {
  background: #000;
}

.end-brand-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.end-brand-screen {
  display: grid;
  place-items: center;
  background: #ddd7cb;
  overflow: hidden;
}

.end-brand-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #ddd7cb;
}

.paywall-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flow-paywall {
  display: flex;
  flex-direction: column;
  background: #f2f2f7;
  overflow: hidden;
}

.paywall-track {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 600%;
  height: 100%;
  transition: transform 0.48s cubic-bezier(0.22, 0.8, 0.28, 1);
}

.flow-paywall[data-slide="0"] .paywall-track { transform: translateX(0); }
.flow-paywall[data-slide="1"] .paywall-track { transform: translateX(-16.6667%); }
.flow-paywall[data-slide="2"] .paywall-track { transform: translateX(-33.3333%); }
.flow-paywall[data-slide="3"] .paywall-track { transform: translateX(-50%); }
.flow-paywall[data-slide="4"] .paywall-track { transform: translateX(-66.6667%); }
.flow-paywall[data-slide="5"] .paywall-track { transform: translateX(-83.3333%); }

.paywall-slide {
  position: relative;
  flex: 0 0 16.6667%;
  width: 16.6667%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
}

.paywall-slide > .flow {
  position: absolute;
  inset: 0;
}

.paywall-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -28px;
  z-index: 2;
  display: flex;
  gap: 8px;
  justify-content: center;
}

.paywall-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 90, 88, 0.28);
  cursor: pointer;
}

.paywall-dots .is-on {
  background: #0b6e6d;
  transform: scale(1.15);
}

.flow-paywall .weight-fill-paywall {
  stroke: url(#weightRingPaywall);
}

.flow-paywall .weight-area-paywall {
  fill: url(#weightFillPaywall);
}

/* ---------- Paywall: recipe nutrition ---------- */

.flow-recipe {
  --ring: 0;
  --bars: 0;
  background: #111;
}

.flow-recipe .recipe-safari {
  background: #f7f3ec;
}

.recipe-hero {
  position: absolute;
  inset: 0;
  z-index: 6;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.flow-recipe[data-phase="6"] .recipe-hero,
.flow-recipe[data-phase="7"] .recipe-hero {
  opacity: 1;
}

.recipe-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.08) 42%, rgba(0, 0, 0, 0.5));
}

.recipe-hero-copy {
  position: absolute;
  top: 62px;
  left: 16px;
  right: 16px;
  z-index: 1;
  text-align: center;
  color: #fff;
}

.recipe-hero-copy strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.recipe-hero-copy span {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  font-size: 10px;
  font-weight: 650;
}

.recipe-sheet {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 7;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 16px 22px;
  border-radius: 18px 18px 0 0;
  background: #f2f2f7;
  transform: translateY(110%);
  transition: transform 0.42s cubic-bezier(0.2, 0.85, 0.2, 1);
}

.flow-recipe[data-phase="7"] .recipe-sheet {
  transform: translateY(0);
}

.recipe-ring {
  position: relative;
  flex: none;
  width: 66px;
  height: 66px;
}

.recipe-ring svg {
  width: 100%;
  height: 100%;
}

.recipe-ring .track {
  fill: none;
  stroke: rgba(60, 60, 67, 0.12);
  stroke-width: 8;
}

.recipe-ring .fill {
  fill: none;
  stroke: #00a5a4;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 163.4;
  stroke-dashoffset: calc(163.4 * (1 - var(--ring) * 0.286));
  transition: stroke-dashoffset 0.8s ease-out;
}

.recipe-ring span {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  line-height: 1.05;
}

.recipe-ring b {
  color: #00a5a4;
  font-family: ui-rounded, "SF Pro Rounded", sans-serif;
  font-size: 16px;
  font-weight: 800;
}

.recipe-ring small {
  color: rgba(0, 165, 164, 0.72);
  font-size: 8px;
  font-weight: 650;
}

.recipe-bars {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 7px;
}

.recipe-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 6px;
  align-items: center;
}

.recipe-bar span {
  color: #6e6e73;
  font-size: 9px;
  font-weight: 500;
}

.recipe-bar b {
  font-size: 9px;
  font-weight: 800;
}

.recipe-bar i {
  grid-column: 1 / -1;
  display: block;
  height: 5px;
  border-radius: 99px;
  background: currentColor;
  opacity: 0.16;
  position: relative;
  overflow: hidden;
}

.recipe-bar i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--share) * 100% * var(--bars));
  border-radius: inherit;
  background: currentColor;
  opacity: 1;
  transition: width 0.8s ease-out;
}

.recipe-bar.p { color: #007a8a; }
.recipe-bar.c { color: #daa520; }
.recipe-bar.f { color: #e06c58; }
.recipe-bar.fi { color: #8262a8; }

/* ---------- Paywall: better choice ---------- */

.flow-choice {
  display: flex;
  flex-direction: column;
  background: #f2f2f7;
}

.choice-nav,
.trends-nav {
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  align-items: center;
  margin-top: 48px;
  padding: 9px 12px;
  color: #1d1d1f;
  background: rgba(247, 247, 247, 0.72);
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.choice-nav strong,
.trends-nav strong {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.nav-side {
  display: grid;
  place-items: center;
  width: 28px;
  height: 22px;
  color: #00a5a4;
}

.nav-side svg {
  width: 14px;
  height: 14px;
}

.choice-body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  padding: 48px 12px 20px;
}

.choice-saving {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 2;
  padding: 7px 13px;
  border-radius: 999px;
  background: #00a5a4;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateX(-50%) scale(0.7);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.2, 0.85, 0.2, 1);
  pointer-events: none;
}

.flow-choice[data-phase="3"] .choice-saving,
.flow-choice[data-phase="4"] .choice-saving,
.flow-choice[data-phase="5"] .choice-saving,
.flow-choice[data-phase="6"] .choice-saving,
.flow-choice[data-phase="7"] .choice-saving,
.flow-choice[data-phase="8"] .choice-saving {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.choice-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  flex: none;
  width: 100%;
  align-items: stretch;
}

.choice-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 16px 8px 14px;
  border-radius: 16px;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.2, 0.85, 0.2, 1);
}

.choice-col.is-light {
  background: rgba(0, 165, 164, 0.08);
  border: 1px solid rgba(0, 165, 164, 0.22);
  color: #00a5a4;
}

.choice-col.is-rich {
  background: rgba(230, 125, 51, 0.08);
  border: 1px solid rgba(230, 125, 51, 0.22);
  color: #e67d33;
}

.flow-choice[data-phase="1"] .choice-col.is-light,
.flow-choice[data-phase="2"] .choice-col.is-light,
.flow-choice[data-phase="3"] .choice-col.is-light,
.flow-choice[data-phase="4"] .choice-col.is-light,
.flow-choice[data-phase="5"] .choice-col.is-light,
.flow-choice[data-phase="6"] .choice-col.is-light,
.flow-choice[data-phase="7"] .choice-col.is-light,
.flow-choice[data-phase="8"] .choice-col.is-light,
.flow-choice[data-phase="2"] .choice-col.is-rich,
.flow-choice[data-phase="3"] .choice-col.is-rich,
.flow-choice[data-phase="4"] .choice-col.is-rich,
.flow-choice[data-phase="5"] .choice-col.is-rich,
.flow-choice[data-phase="6"] .choice-col.is-rich,
.flow-choice[data-phase="7"] .choice-col.is-rich,
.flow-choice[data-phase="8"] .choice-col.is-rich {
  opacity: 1;
  transform: scale(1);
}

.choice-plate {
  position: relative;
  width: 112px;
  height: 112px;
}

.choice-plate img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid currentColor;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.choice-score {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  color: inherit;
  font-family: ui-rounded, "SF Pro Rounded", sans-serif;
  font-size: 14px;
  font-weight: 800;
}

.choice-kcal {
  color: #1d1d1f;
  font-family: ui-rounded, "SF Pro Rounded", sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.choice-kcal small {
  color: #6e6e73;
  font-size: 10px;
  font-weight: 650;
}

.choice-col em {
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 14%, transparent);
  color: inherit;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

/* ---------- Paywall: calorie trends ---------- */

.flow-trends {
  display: flex;
  flex-direction: column;
  background: #f2f2f7;
}

.trends-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 13px 16px;
}

.trends-pill {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.12);
}

.trends-pill span {
  padding: 6px 0;
  border-radius: 999px;
  color: #6e6e73;
  font-size: 11px;
  font-weight: 650;
  text-align: center;
}

.trends-pill .is-on {
  background: #fff;
  color: #00a5a4;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.trends-insight {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.trends-insight small {
  display: block;
  color: #6e6e73;
  font-size: 10px;
  font-weight: 500;
}

.trends-insight b {
  color: #1d1d1f;
  font-family: ui-rounded, "SF Pro Rounded", sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.trends-insight i {
  font-style: normal;
  color: #6e6e73;
  font-size: 10px;
  font-weight: 650;
}

.trends-avg {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0, 165, 164, 0.1);
  color: #6e6e73;
  font-size: 10px;
  font-weight: 500;
}

.trends-avg > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00a5a4;
}

.trends-avg b {
  color: #1d1d1f;
  font-size: 12px;
}

.trends-chart {
  position: relative;
  flex: 1;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Goal 1850 / peak 1910 ≈ 3.1% from top of plot */
.trends-goal-line {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(18px + (100% - 34px) * (1 - 1850 / 1910));
  border-top: 1.5px dashed rgba(0, 165, 164, 0.6);
  z-index: 1;
  pointer-events: none;
}

.trends-goal-line span {
  position: absolute;
  top: -11px;
  left: 2px;
  padding: 0 4px;
  background: #f2f2f7;
  color: rgba(0, 165, 164, 0.9);
  font-size: 8px;
  font-weight: 800;
}

.trends-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
  align-items: end;
  height: 100%;
  padding-top: 18px;
  padding-bottom: 16px;
}

.trends-bars span {
  --grow: 0;
  position: relative;
  display: block;
  height: var(--h);
  border-radius: 4px;
  background: linear-gradient(180deg, #00a5a4, rgba(0, 165, 164, 0.55));
  transform: scaleY(var(--grow));
  transform-origin: bottom center;
  transition: transform 0.55s cubic-bezier(0.2, 0.85, 0.25, 1.15);
}

.trends-bars span.is-over {
  background: linear-gradient(180deg, rgba(255, 59, 48, 0.86), rgba(255, 59, 48, 0.5));
}

.flow-trends[data-phase="1"] .trends-bars span,
.flow-trends[data-phase="2"] .trends-bars span {
  --grow: 1;
}

.trends-bars span:nth-child(1) { transition-delay: 0s; }
.trends-bars span:nth-child(2) { transition-delay: 0.055s; }
.trends-bars span:nth-child(3) { transition-delay: 0.11s; }
.trends-bars span:nth-child(4) { transition-delay: 0.165s; }
.trends-bars span:nth-child(5) { transition-delay: 0.22s; }
.trends-bars span:nth-child(6) { transition-delay: 0.275s; }
.trends-bars span:nth-child(7) { transition-delay: 0.33s; }

.trends-bars small {
  position: absolute;
  left: 50%;
  bottom: -16px;
  color: #6e6e73;
  font-size: 9px;
  font-weight: 500;
  transform: translateX(-50%);
}

/* ---------- Paywall: body transformation ---------- */

.flow-body {
  --progress: 0;
  display: grid;
  place-items: center;
  background: #f2f2f7;
  overflow: hidden;
}

.body-glow {
  position: absolute;
  left: 52%;
  top: 50%;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 165, 164, 0.18), transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.body-fireworks {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.flow-body.is-celebrating .body-fireworks {
  opacity: 0.7;
}

.body-fireworks i {
  --a: 0deg;
  --d: 72px;
  position: absolute;
  left: 58%;
  top: 44%;
  width: 6px;
  height: 6px;
  margin: -3px;
  border-radius: 50%;
  background: #00a5a4;
  opacity: 0;
  animation: body-burst 1.2s ease-out infinite;
}

.body-fireworks i:nth-child(1) { --a: 0deg; --d: 78px; background: #ff9933; animation-delay: 0s; }
.body-fireworks i:nth-child(2) { --a: 15deg; --d: 90px; animation-delay: 0.04s; }
.body-fireworks i:nth-child(3) { --a: 30deg; --d: 70px; background: #ffcc00; animation-delay: 0.08s; }
.body-fireworks i:nth-child(4) { --a: 45deg; --d: 96px; animation-delay: 0.02s; }
.body-fireworks i:nth-child(5) { --a: 60deg; --d: 74px; background: #7ee0de; animation-delay: 0.1s; }
.body-fireworks i:nth-child(6) { --a: 75deg; --d: 102px; background: #ff9933; animation-delay: 0.06s; }
.body-fireworks i:nth-child(7) { --a: 90deg; --d: 68px; animation-delay: 0.12s; }
.body-fireworks i:nth-child(8) { --a: 105deg; --d: 88px; background: #ffcc00; animation-delay: 0.03s; }
.body-fireworks i:nth-child(9) { --a: 120deg; --d: 98px; animation-delay: 0.14s; }
.body-fireworks i:nth-child(10) { --a: 135deg; --d: 72px; background: #7ee0de; animation-delay: 0.07s; }
.body-fireworks i:nth-child(11) { --a: 150deg; --d: 104px; background: #ff9933; animation-delay: 0.11s; }
.body-fireworks i:nth-child(12) { --a: 165deg; --d: 66px; animation-delay: 0.05s; }
.body-fireworks i:nth-child(13) { --a: 180deg; --d: 84px; background: #ffcc00; animation-delay: 0.09s; }
.body-fireworks i:nth-child(14) { --a: 195deg; --d: 100px; animation-delay: 0.01s; }
.body-fireworks i:nth-child(15) { --a: 210deg; --d: 76px; background: #7ee0de; animation-delay: 0.13s; }
.body-fireworks i:nth-child(16) { --a: 225deg; --d: 92px; background: #ff9933; animation-delay: 0.08s; }
.body-fireworks i:nth-child(17) { --a: 240deg; --d: 70px; animation-delay: 0.15s; }
.body-fireworks i:nth-child(18) { --a: 255deg; --d: 108px; background: #ffcc00; animation-delay: 0.04s; }
.body-fireworks i:nth-child(19) { --a: 270deg; --d: 80px; animation-delay: 0.1s; }
.body-fireworks i:nth-child(20) { --a: 285deg; --d: 94px; background: #7ee0de; animation-delay: 0.06s; }
.body-fireworks i:nth-child(21) { --a: 300deg; --d: 72px; background: #ff9933; animation-delay: 0.12s; }
.body-fireworks i:nth-child(22) { --a: 315deg; --d: 106px; animation-delay: 0.02s; }
.body-fireworks i:nth-child(23) { --a: 330deg; --d: 82px; background: #ffcc00; animation-delay: 0.14s; }
.body-fireworks i:nth-child(24) { --a: 345deg; --d: 96px; background: #7ee0de; animation-delay: 0.07s; }

@keyframes body-burst {
  0% {
    opacity: 0;
    transform: rotate(var(--a)) translateY(0) scale(0.3);
  }
  16% { opacity: 1; }
  100% {
    opacity: 0;
    transform: rotate(var(--a)) translateY(calc(var(--d) * -1)) scale(1.1);
  }
}

/* Mirrors SubscriptionBodyTransformationAnimation: HStack spacing -18, ring leading 35 */
.body-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  padding: 10px 6px 10px 0;
}

.body-metrics {
  position: relative;
  z-index: 2;
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: 100px;
  margin-right: -18px;
  padding-left: 28px;
}

.body-ring {
  position: relative;
  width: 92px;
  height: 92px;
}

.body-ring svg {
  display: block;
  width: 92px;
  height: 92px;
}

.body-ring .track {
  fill: none;
  stroke: rgba(0, 165, 164, 0.14);
  stroke-width: 9;
}

.body-ring .fill {
  fill: none;
  stroke: url(#bodyRingGrad);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 238.8;
  stroke-dashoffset: calc(238.8 * (1 - var(--progress)));
}

.body-week-val {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  line-height: 1;
  pointer-events: none;
}

.body-week-val b {
  color: #1d1d1f;
  font-family: ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.body-week-val small {
  margin-top: -1px;
  color: #6e6e73;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0;
}

.body-delta {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  background: #00a5a4;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 165, 164, 0.28);
}

.body-delta-ico {
  width: 10px;
  height: 10px;
  flex: none;
}

.body-delta-check {
  display: none;
}

.flow-body.is-celebrating .body-delta-target {
  display: none;
}

.flow-body.is-celebrating .body-delta-check {
  display: block;
}

.body-figure {
  position: relative;
  z-index: 1;
  flex: none;
  width: 190px;
  height: 214px;
  overflow: hidden;
  pointer-events: none;
}

.body-figure img {
  display: block;
  height: 214px;
  width: auto;
  max-width: none;
  margin-left: 50%;
  object-fit: contain;
  object-position: center bottom;
  transform: translateX(-50%);
}

.discover-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flow-discover {
  display: flex;
  flex-direction: column;
  background: #f2f2f7;
  overflow: hidden;
  padding-top: 48px;
}

.discover-track {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 400%;
  transition: transform 0.48s cubic-bezier(0.22, 0.8, 0.28, 1);
}

.flow-discover[data-slide="0"] .discover-track { transform: translateX(0); }
.flow-discover[data-slide="1"] .discover-track { transform: translateX(-25%); }
.flow-discover[data-slide="2"] .discover-track { transform: translateX(-50%); }
.flow-discover[data-slide="3"] .discover-track { transform: translateX(-75%); }

.discover-slide {
  container-type: inline-size;
  position: relative;
  flex: 0 0 25%;
  width: 25%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
}

.discover-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -28px;
  z-index: 2;
  display: flex;
  gap: 8px;
  justify-content: center;
}

.discover-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.discover-dots .is-on {
  background: #fff;
  transform: scale(1.15);
}

@media (max-width: 800px) {
  .howto-band,
  .howto-band:nth-child(even),
  .howto-band.howto-discover,
  .howto-band.howto-even-more {
    grid-template-columns: 1fr;
  }

  .howto-band:nth-child(even) .howto-copy,
  .howto-band.howto-discover .howto-copy,
  .howto-band.howto-even-more .howto-copy { order: 0; }

  .howto-visual { min-height: 520px; }
}

@media (prefers-reduced-motion: reduce) {
  .discover-track,
  .paywall-track { transition: none !important; }
  .layer,
  .bubble,
  .leader,
  .scan-sheet,
  .reticle,
  .delta,
  .hand,
  .extract-spin,
  .extract-spin .extract-ring,
  .extract-spin .extract-ring-scale,
  .extract-spin .fork,
  .extract-spin .pulse,
  .dots-bounce i,
  .share-app.is-kook img,
  .menu-row.is-share,
  .dots,
  .choice-col,
  .choice-saving,
  .recipe-sheet,
  .recipe-hero,
  .trends-bars span,
  .body-fireworks i {
    animation: none !important;
    transition: none !important;
  }
}
