/* ==========================================================================
   Tokens — the app's own (tailwind.config.cjs): iOS 26/27 system colors,
   Liquid Glass fills, the module palette and Inter Tight.
   ========================================================================== */
@property --p { syntax: "<angle>"; inherits: true; initial-value: 0deg; }

:root {
  --bg: #F2F2F7;
  --card: #FFFFFF;
  --card-2: #F2F2F7;
  --label: #000000;
  --label-inv: #FFFFFF;
  --label-2: #727272;
  --label-3: #8A8A8E;
  --sep: rgba(0, 0, 0, .11);
  --border: #C6C6C8;
  --fill-2: rgba(120, 120, 128, .16);
  --fill-3: rgba(118, 118, 128, .12);
  --fill-4: rgba(116, 116, 128, .08);
  --glass: rgba(243, 243, 243, .55);
  --glass-medium: rgba(247, 247, 247, .73);
  --selection: #EDEDED;

  --diet: #34C759;
  --fitness: #FF383C;
  --swim: #00C0E8;
  --run: #FF8D28;
  --walk: #6155F5;
  --cycle: #CB30E0;
  --info: #0088FF;
  --yellow: #FFCC00;
  --success: #34C759;
  --danger: #FF383C;

  --shadow-card: 0 1px 1px rgba(0, 0, 0, .02), 0 18px 50px -28px rgba(0, 0, 0, .22);
  --glass-shadow:
    0 0 0 .5px rgba(0, 0, 0, .09),
    1.25px 0 0 -.75px rgba(0, 0, 0, .18),
    -1.25px 0 0 -.75px rgba(0, 0, 0, .18),
    0 8px 15px 0 rgba(0, 0, 0, .02),
    inset 0 40px 10px -40px rgba(255, 255, 255, .6),
    inset 0 -40px 10px -40px rgba(255, 255, 255, .6),
    inset 0 40px 30px -40px rgba(0, 0, 0, .1);
  --glass-medium-shadow:
    0 0 0 .5px rgba(0, 0, 0, .15),
    1.25px 0 0 -.75px rgba(0, 0, 0, .15),
    -1.25px 0 0 -.75px rgba(0, 0, 0, .15),
    0 8px 48px 0 rgba(0, 0, 0, .18),
    inset 0 40px 10px -40px rgba(255, 255, 255, .6),
    inset 0 -40px 10px -40px rgba(255, 255, 255, .6);

  --r-md: 14px;
  --r-lg: clamp(18px, 2.4vw, 24px);
  --r-xl: clamp(24px, 3.2vw, 36px);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --gutter: clamp(16px, 4vw, 32px);
}

html.dark {
  --bg: #000000;
  --card: #1C1C1E;
  --card-2: #2C2C2E;
  --label: #FFFFFF;
  --label-inv: #000000;
  --label-2: #8C8C8C;
  --label-3: #8D8D93;
  --sep: rgba(255, 255, 255, .11);
  --border: #38383A;
  --fill-2: rgba(120, 120, 128, .32);
  --fill-3: rgba(118, 118, 128, .24);
  --fill-4: rgba(118, 118, 128, .18);
  --glass: rgba(153, 153, 153, .17);
  --glass-medium: rgba(36, 36, 38, .78);
  --selection: #121212;

  --diet: #30D158;
  --fitness: #FF4245;
  --swim: #5CDBFF;
  --run: #FF9638;
  --walk: #6155F5;
  --cycle: #DB34F2;
  --info: #0091FF;
  --yellow: #FFD60A;
  --success: #30D158;
  --danger: #FF4245;

  --shadow-card: 0 0 0 .5px rgba(255, 255, 255, .05);
  --glass-shadow:
    0 0 0 .5px rgba(0, 0, 0, .6),
    1.25px 0 0 -.75px rgba(0, 0, 0, .6),
    -1.25px 0 0 -.75px rgba(0, 0, 0, .6),
    0 8px 15px 0 rgba(0, 0, 0, .04),
    inset 0 40px 10px -40px rgba(255, 255, 255, .12),
    inset 0 -40px 10px -40px rgba(255, 255, 255, .12),
    inset 0 40px 30px -40px rgba(0, 0, 0, .45);
  --glass-medium-shadow:
    0 0 0 .5px rgba(0, 0, 0, .6),
    1.25px 0 0 -.75px rgba(255, 255, 255, .08),
    -1.25px 0 0 -.75px rgba(255, 255, 255, .08),
    0 8px 48px 0 rgba(0, 0, 0, .5),
    inset 0 40px 10px -40px rgba(255, 255, 255, .1),
    inset 0 -40px 10px -40px rgba(255, 255, 255, .06);
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; background: var(--bg); }
/* Lenis does the smooth scrolling; native smooth only when it isn't running */
html:not(.lenis) { scroll-behavior: smooth; }
/* Hide scrollbars everywhere: page, sheets, inner scrollers (they still scroll) */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 29px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .5s ease, color .5s ease;
}
main { display: block; overflow-x: clip; }
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--info); outline-offset: 3px; }
::selection { background: color-mix(in srgb, var(--info) 30%, transparent); }

i.ic { display: inline-flex; width: 1em; height: 1em; flex-shrink: 0; font-style: normal; }
i.ic svg { width: 100%; height: 100%; fill: currentColor; stroke: currentColor; stroke-width: 3; overflow: visible; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: clamp(88px, 12vw, 168px) 0; }

/* Liquid Glass (helpers.scss: liquid-glass / liquid-glass-medium) */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(6px) saturate(125%);
  backdrop-filter: blur(6px) saturate(125%);
  box-shadow: var(--glass-shadow);
}
.glass-medium {
  background: var(--glass-medium);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  backdrop-filter: blur(16px) saturate(125%);
  box-shadow: var(--glass-medium-shadow);
}

/* Typography */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; line-height: 20px; font-weight: 600;
  color: var(--label-2);
}
.h1 {
  font-size: clamp(50px, 8.2vw, 108px);
  line-height: .98;
  letter-spacing: -.045em;
  font-weight: 600;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(38px, 5.6vw, 68px);
  line-height: 1.02;
  letter-spacing: -.038em;
  font-weight: 600;
  text-wrap: balance;
}
.h3 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; letter-spacing: -.02em; font-weight: 600; }
.lead { font-size: clamp(17px, 1.7vw, 21px); line-height: 1.55; color: var(--label-2); text-wrap: pretty; }
.muted { color: var(--label-2); }
.small { font-size: 15px; line-height: 22px; }
.sec-head { max-width: 780px; margin-bottom: clamp(40px, 5vw, 64px); }
.sec-head .h2 { margin-top: 18px; }
.sec-head .lead { margin-top: 22px; }
.sec-head.center { margin-inline: auto; text-align: center; }

/* Icon tile (helpers.scss: list-row-icon) */
.tile {
  --c: var(--label);
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: none; color: var(--label); font-size: 18px;
}
.tile.neutral { background: none; color: var(--label); }
.c-diet { --c: var(--diet); } .c-fitness { --c: var(--fitness); } .c-swim { --c: var(--swim); }
.c-run { --c: var(--run); } .c-walk { --c: var(--walk); } .c-cycle { --c: var(--cycle); }
.c-info { --c: var(--info); } .c-yellow { --c: var(--yellow); } .c-label { --c: var(--label); }

/* Buttons (Button - Liquid Glass - Text) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 24px; border-radius: 999px;
  font-size: 17px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap;
  transition: transform .35s var(--ease-spring), background-color .3s, color .3s, opacity .3s;
  user-select: none;
}
.btn:active { transform: scale(.95); }
.btn .ic { font-size: 20px; }
.btn-prominent { background: var(--label); color: var(--label-inv); box-shadow: 0 10px 30px -12px rgba(0,0,0,.45); }
.btn-glass { color: var(--label); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 15px; font-weight: 400; gap: 4px; }
.btn-sm .ic { font-size: 16px; }
.btn-block { width: 100%; }
.btn-round { width: 44px; height: 44px; padding: 0; }
.btn-round .ic { font-size: 20px; }
.btn[disabled] { opacity: .4; pointer-events: none; }

.pro-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; vertical-align: middle;
  height: 22px; padding: 0 9px; border-radius: 999px;
  background: var(--label); color: var(--label-inv);
  font-size: 12px; line-height: 1; font-weight: 600; letter-spacing: .04em;
}
.pro-pill .ic { font-size: 13px; margin-left: -2px; }

/* Segmented control */
.seg {
  position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 3px; border-radius: 999px; background: var(--fill-3);
}
.seg button {
  position: relative; z-index: 1; height: 34px; padding: 0 16px; border-radius: 999px;
  font-size: 15px; font-weight: 600; color: var(--label-2); white-space: nowrap;
  transition: color .3s;
}
.seg button[aria-pressed="true"] { color: var(--label); }
.seg .seg-thumb {
  position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; border-radius: 999px;
  background: var(--card); box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04);
  transition: transform .45s var(--ease-spring), width .45s var(--ease-spring);
}
html.dark .seg .seg-thumb { background: #636366; }

/* iOS switch (components/switch/switch.scss): 64×28 capsule, 38×24 knob that stretches under the finger; on = label color */
.switch {
  --switch-knob: 38px;
  position: relative; width: 64px; height: 28px; margin: 0; border-radius: 999px; flex-shrink: 0;
  background: var(--fill-2); cursor: pointer; outline: none; touch-action: manipulation;
  transition: background-color .25s ease-out;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: var(--switch-knob); height: 24px; border-radius: 999px;
  background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 3px 1px rgba(0,0,0,.06);
  transition: left .35s cubic-bezier(.34,1.3,.64,1), width .25s cubic-bezier(.34,1.3,.64,1), background-color .25s ease-out;
}
.switch:active { --switch-knob: 46px; }
.switch[aria-checked="true"] { background: var(--label); }
.switch[aria-checked="true"]::after { left: calc(100% - 2px - var(--switch-knob)); }
html.dark .switch[aria-checked="true"]::after { background: #2C2C2E; }
.switch:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 32%, transparent); }
.switch:disabled { opacity: .4; cursor: default; }

/* Stepper (program-editor.scss) */
.stepper { display: inline-flex; align-items: center; height: 32px; border-radius: 999px; background: var(--fill-3); flex-shrink: 0; }
.stepper button { width: 46px; height: 32px; display: grid; place-items: center; font-size: 18px; border-radius: 999px; transition: background-color .2s; }
.stepper button:active { background: var(--fill-2); }
.stepper button + button { position: relative; }
.stepper button + button::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 1px; background: var(--sep); }
.stepper .val { padding: 0 6px; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 15px; min-width: 70px; text-align: center; }

/* Cards */
.card {
  position: relative; overflow: hidden;
  background: var(--card); border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  transition: background-color .5s, box-shadow .5s;
}
.card-pad { padding: clamp(20px, 2.4vw, 28px); }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-title h3 { font-size: 20px; line-height: 24px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.card-meta { font-size: 15px; color: var(--label-3); }

/* Reveal */
.js .rv { opacity: 0; transform: translateY(32px) scale(.985); transition: opacity 1s ease, transform 1.1s var(--ease-out); transition-delay: var(--d, 0s); }
.js .rv.in { opacity: 1; transform: none; }

/* ==========================================================================
   Activity rings (components/activity-rings): conic arc cut to a band by a
   mask, a deeper tone at the start, round caps, the end cap's shadow when full.
   ========================================================================== */
.rings {
  --size: 160px;
  --wr: .1;
  --w: calc(var(--size) * var(--wr));
  --g: calc(var(--size) * .042 / max(var(--n, 3), 3));
  position: relative; display: inline-block; flex-shrink: 0;
  width: var(--size); height: var(--size);
}
.ring {
  --p: 0deg;
  --c0: color-mix(in oklch, var(--c), #000 18%);
  --track: color-mix(in srgb, var(--c) 20%, transparent);
  position: absolute; border-radius: 50%;
  inset: calc(var(--i) * (var(--w) + var(--g)));
  background: conic-gradient(var(--c0), var(--c) var(--p), transparent 0), var(--track);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--w) - .5px), #000 calc(100% - var(--w) + .5px), #000 calc(100% - .5px), transparent 100%);
  mask: radial-gradient(farthest-side, transparent calc(100% - var(--w) - .5px), #000 calc(100% - var(--w) + .5px), #000 calc(100% - .5px), transparent 100%);
  transition: --p 1.9s var(--ease-out) var(--delay, 0s);
}
html.dark .ring { --track: color-mix(in srgb, var(--c) 26%, transparent); }
.rings.on .ring { --p: var(--t); }
.ring::before, .ring .cap::before {
  content: ""; position: absolute; left: 50%; top: 0;
  width: var(--w); height: var(--w); margin-left: calc(var(--w) / -2); border-radius: 50%;
}
.ring::before { background: var(--c0); }
.ring .cap { position: absolute; inset: 0; transform: rotate(var(--p)); }
.ring .cap::before { background: var(--c); }
.ring.is-full .cap::before { box-shadow: calc(var(--w) * .18) 0 calc(var(--w) * .3) rgba(0, 0, 0, .35); }
.ring.is-empty::before, .ring.is-empty .cap { opacity: 0; }
.rings:not(.on) .ring::before, .rings:not(.on) .cap { opacity: 0; }

/* ==========================================================================
   Navigation
   ========================================================================== */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--diet), var(--swim), var(--walk), var(--cycle), var(--fitness), var(--run));
}
.nav {
  position: fixed; z-index: 50; top: 14px; left: 50%; transform: translateX(-50%);
  width: min(1120px, calc(100% - 24px));
  display: flex; align-items: center; gap: 12px;
  height: 58px; padding: 0 8px 0 24px; border-radius: 999px;
  background: var(--glass-medium);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  box-shadow: var(--glass-medium-shadow);
  transition: transform .5s var(--ease-out), background-color .5s;
}
.nav.hide { transform: translate(-50%, -90px); }
.brand { display: flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 700; letter-spacing: -.01em; color: var(--label); }
/* İşaret: favicon ile aynı karo; açık temada siyah, koyu temada beyaz */
.brand .mark {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--label); color: var(--bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 3px rgba(0, 0, 0, .15);
  transition: background-color .35s, color .35s;
}
.brand .mark svg { width: 100%; height: 100%; }
/* Yazı logosu: açık temada logo-light (siyah), koyu temada logo-dark (beyaz) */
.brand .logo { display: block; height: 16px; width: auto; }
.brand .logo-dark, .dark .brand .logo-light { display: none; }
.dark .brand .logo-dark { display: block; }
.nav-links { display: flex; gap: 2px; margin-left: auto; }
.nav-links a {
  height: 38px; display: flex; align-items: center; padding: 0 13px; border-radius: 999px;
  font-size: 15px; color: var(--label-2); transition: color .25s, background-color .25s;
}
.nav-links a:hover { color: var(--label); }
.nav-links a.active { color: var(--label); }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.nav .btn-round { width: 42px; height: 42px; }
.nav .menu-btn { display: none; }
.theme-btn .ic-moon { display: none; }
html.dark .theme-btn .ic-sun { display: none; }
html.dark .theme-btn .ic-moon { display: inline-flex; }
.menu-panel {
  position: fixed; z-index: 49; top: 82px; right: 12px; left: 12px;
  border-radius: 28px; padding: 10px;
  display: grid; gap: 2px;
  transform-origin: top right;
  transition: opacity .3s, transform .45s var(--ease-spring);
}
.menu-panel:not(.open) { opacity: 0; transform: scale(.9); pointer-events: none; }
.menu-panel a { padding: 12px 16px; border-radius: 16px; font-size: 17px; }
.menu-panel a:active { background: var(--fill-3); }
.lang-panel {
  position: fixed; z-index: 51; top: 82px; right: 12px; width: 232px;
  border-radius: 24px; padding: 8px;
  display: grid; gap: 2px;
  transform-origin: top right;
  transition: opacity .3s, transform .45s var(--ease-spring);
}
.lang-panel:not(.open) { opacity: 0; transform: scale(.9); pointer-events: none; }
.lang-panel button {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px;
  font-size: 16px; text-align: left; transition: background-color .2s;
}
.lang-panel button:hover, .lang-panel button:active { background: var(--fill-3); }
.lang-panel button small { margin-left: auto; color: var(--label-2); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.lang-panel button .ic { font-size: 16px; opacity: 0; }
.lang-panel button[aria-checked="true"] { font-weight: 600; }
.lang-panel button[aria-checked="true"] .ic { opacity: 1; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; padding: clamp(164px, 18vw, 228px) 0 0; isolation: isolate; text-align: center; overflow: clip; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 46% at 50% 78%, color-mix(in srgb, var(--label) 5%, transparent), transparent 70%);
}
.hero-head { position: relative; z-index: 1; display: grid; justify-items: center; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--label-2); }
/* Flowing gradient text (.flow): the stops drift along the palette, the angle sways and a soft light follows the
   pointer; js/app.js writes the variables every frame. Blurred copies of the same gradient glow behind the letters. */
.flow {
  --c0: #3ba7e0; --c1: #000; --c2: #e5822a; --c3: #000; --c4: #8ecdff; --c5: #000;
  --a: 100deg; --mx: -999px; --my: -999px; --ma: 0; --glow: .22;
  position: relative; isolation: isolate; display: inline-block; color: transparent;
  /* letter tails get painted too; the padding is given back as negative margin so the layout stays put */
  padding: .12em .14em .24em; margin: -.12em -.14em -.24em;
  -webkit-background-clip: text; background-clip: text; background-repeat: no-repeat;
  background-image:
    radial-gradient(80px circle at var(--mx) var(--my), rgb(255 255 255 / var(--ma)), rgb(255 255 255 / calc(var(--ma) * .25)) 45%, rgb(255 255 255 / 0) 100%),
    linear-gradient(var(--a), var(--c0) 0%, var(--c1) 22%, var(--c2) 42%, var(--c3) 62%, var(--c4) 82%, var(--c5) 100%);
}
html.dark .flow:not(.flow-ink) { --glow: .5; }
.flow::before, .flow::after {
  content: attr(data-text); position: absolute; inset: 0; z-index: -1; pointer-events: none; padding: inherit;
  background: inherit; -webkit-background-clip: text; background-clip: text; color: transparent;
}
.flow::before { filter: blur(18px) saturate(1.4); opacity: var(--glow); }
.flow::after { filter: blur(6px) saturate(1.2); opacity: calc(var(--glow) * .9); }
.hero .h1 { margin-top: 22px; max-width: 11ch; font-size: clamp(54px, 9.4vw, 128px); letter-spacing: -.05em; line-height: .94; }
.hero .h1 .q, .final .h1 .q { color: var(--label-3); }
.hero .lead { margin-top: 28px; max-width: 620px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 36px; align-items: center; justify-content: center; }
.hero-cta .btn { height: 54px; padding: 0 26px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-size: 17px; font-weight: 600; color: var(--label); }
.text-link .ic { font-size: 16px; transition: transform .35s var(--ease-spring); }
.text-link:hover .ic { transform: translateX(4px); }
.hero-cta .text-link .ic { transform: rotate(90deg); }
.hero-cta .text-link:hover .ic { transform: rotate(90deg) translateX(4px); }

/* Three phones: Fitness, Özet, Diyet. The opening is played by heroIntro() (script): the middle phone rises and wakes,
   its rings close and send a ripple out, the Dynamic Island tells the score, the side phones swing out from behind it,
   light sweeps over the glass and the screens come alive. The transforms below are where everything lands. */
.hero-stage {
  --sx: 78%; --ss: .88; --sdrop: 60px; --ty: 100px; /* how far the phones sit below the top of the stage */
  position: relative; height: clamp(580px, calc(46vw + 160px), 680px); /* 160px taller than the phones need: the extra is room for the rings */
  --fa: calc(clamp(302px, 33vw, 374px) + var(--ty)); --fb: calc(clamp(420px, 46vw, 520px) + var(--ty)); /* the phones fade out where they always did */
  perspective: 1800px;
  -webkit-mask-image: linear-gradient(#000 var(--fa), transparent var(--fb));
  mask-image: linear-gradient(#000 var(--fa), transparent var(--fb));
}
.hero-stage .phone { position: absolute; left: 50%; top: var(--ty); margin-left: calc(var(--pw) / -2); }
.hero-stage .phone.mid { z-index: 2; }
.hero-stage .phone.side { z-index: 1; translate: 0 var(--sdrop); }
.hero-stage .phone.left { transform: translateX(calc(var(--sx) * -1)) scale(var(--ss)); }
.hero-stage .phone.right { transform: translateX(var(--sx)) scale(var(--ss)); }
.js .hero-stage:not(.ready) .phone { opacity: 0; }

/* Black glass before the screen wakes */
.wake { position: absolute; inset: 0; z-index: 7; background: #000; pointer-events: none; opacity: 0; }

/* The ripple the closing rings send out, behind the phones */
.hero-stage-wrap { position: relative; margin-top: clamp(88px, 10vw, 128px); clip-path: inset(0 -100vw); }
/* Neutral concentric rings like the app's Pro sheet: six bands, fading toward the center, closing one after another.
   Centered on the bottom edge of the stage; the hero clips the lower half. */
@property --rp { syntax: "<angle>"; inherits: true; initial-value: 360deg; }
.hero-ripple {
  --rd: clamp(1160px, calc(92vw + 320px), 1360px); /* radius = the stage height, so the rings never rise above it */ --rw: calc(var(--rd) * .05); --rg: calc(var(--rd) * .007);
  position: absolute; z-index: 0; left: 50%; top: 100%; width: 0; height: 0; pointer-events: none; transform: rotate(180deg);
}
.hero-ripple span {
  --rp: 360deg; --rcol: rgba(26, 26, 26, var(--ra));
  --off: calc(var(--i) * (var(--rw) + var(--rg)));
  position: absolute; left: calc(var(--rd) / -2 + var(--off)); top: calc(var(--rd) / -2 + var(--off));
  width: calc(var(--rd) - 2 * var(--off)); height: calc(var(--rd) - 2 * var(--off)); border-radius: 50%;
  background: conic-gradient(var(--rcol) var(--rp), transparent 0), color-mix(in srgb, var(--rcol) 20%, transparent);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--rw) - .5px), #000 calc(100% - var(--rw) + .5px), #000 calc(100% - .5px), transparent 100%);
  mask: radial-gradient(farthest-side, transparent calc(100% - var(--rw) - .5px), #000 calc(100% - var(--rw) + .5px), #000 calc(100% - .5px), transparent 100%);
}
/* Gradient layer over the rings and the phones: clear at the top, the page color at the bottom edge */
.hero-ripple-fade {
  position: absolute; z-index: 5; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, transparent 35%, color-mix(in srgb, var(--bg) 60%, transparent) 70%, var(--bg) 100%);
}
html.dark .hero-ripple span { --rcol: rgba(245, 245, 245, var(--rb)); }
.hero-ripple span:nth-child(1) { --i: 0; --ra: .055; --rb: .11; }
.hero-ripple span:nth-child(2) { --i: 1; --ra: .042; --rb: .085; }
.hero-ripple span:nth-child(3) { --i: 2; --ra: .03; --rb: .06; }
.hero-ripple span:nth-child(4) { --i: 3; --ra: .02; --rb: .04; }
.hero-ripple span:nth-child(5) { --i: 4; --ra: .012; --rb: .025; }
.hero-ripple span:nth-child(6) { --i: 5; --ra: .007; --rb: .014; }

/* Dynamic Island grows into a live activity: the day's rings and score */
.island { display: flex; align-items: center; overflow: hidden; }
.island .live { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0 9px 0 7px; opacity: 0; color: #fff; white-space: nowrap; }
.island .live .rings { --size: 26px; }
.island .live b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.island .live b small { font-size: 11px; font-weight: 400; color: rgba(255,255,255,.6); margin-right: 4px; letter-spacing: 0; }

/* Screen details that change once the phones are up */
.focus-seg i { transition: width .7s var(--ease-out); }
.focus-sets span { transition: background-color .35s, color .35s; }
.sfood .box { transition: background-color .3s, border-color .3s, color .3s; }
.no-tr .ring, .no-tr .fill, .no-tr .focus-seg i { transition: none !important; }

/* Phone */
.phone {
  --pw: 340px; --ph: 710px; --s: .8154;
  position: relative; width: var(--pw); height: var(--ph); padding: 11px; border-radius: 58px;
  background: linear-gradient(160deg, #2c2c2f, #0e0e10 45%, #1f1f22);
  box-shadow:
    inset 0 0 0 1.5px rgba(255,255,255,.1),
    0 0 0 1px rgba(0,0,0,.55),
    0 50px 100px -40px rgba(0,0,0,.5);
}
html.dark .phone { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.14), 0 0 0 1px rgba(255,255,255,.06), 0 50px 100px -40px rgba(0,0,0,.9); }
.phone::before, .phone::after { content: ""; position: absolute; width: 3px; border-radius: 2px; background: #2a2a2d; }
.phone::before { left: -3px; top: 150px; height: 64px; }
.phone::after { right: -3px; top: 190px; height: 96px; }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 47px; overflow: hidden; background: var(--bg); transition: background-color .5s; }
.island { position: absolute; z-index: 9; top: 11px; left: 50%; width: 100px; height: 29px; margin-left: -50px; border-radius: 20px; background: #000; }
.scr {
  position: absolute; top: 0; left: 0; width: 390px; height: 844px;
  transform: scale(var(--s)); transform-origin: 0 0;
  font-size: 17px; line-height: 22px; text-align: left;
}
.status { height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 6px 34px 0 46px; font-size: 17px; font-weight: 600; }
.status-icons { display: flex; gap: 6px; align-items: center; }
.status-icons .bars { display: flex; gap: 2px; align-items: flex-end; height: 12px; }
.status-icons .bars i { width: 3px; background: var(--label); border-radius: 1px; }
.status-icons .batt { width: 25px; height: 12px; border-radius: 4px; border: 1.2px solid color-mix(in srgb, var(--label) 40%, transparent); padding: 1.5px; position: relative; }
.status-icons .batt::before { content: ""; display: block; height: 100%; width: 78%; border-radius: 2px; background: var(--label); }
.status-icons .batt::after { content: ""; position: absolute; right: -4px; top: 3px; width: 2px; height: 4px; border-radius: 0 2px 2px 0; background: color-mix(in srgb, var(--label) 40%, transparent); }
.status-icons .ic { font-size: 16px; }
.scr-head { display: flex; align-items: flex-end; justify-content: space-between; padding: 8px 16px 0; }
.scr-title { font-size: 34px; line-height: 41px; font-weight: 600; letter-spacing: -.01em; }
.scr-sub { font-size: 15px; line-height: 20px; color: var(--label-3); margin-top: 2px; }
.scr-head .btn-round { width: 44px; height: 44px; }
.scr-body { padding: 18px 16px 0; display: grid; gap: 18px; }
.scr-headline { font-size: 30px; line-height: 44px; font-weight: 600; letter-spacing: -.02em; text-wrap: pretty; }
.scr-headline .q { color: var(--label-2); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; vertical-align: -2px; white-space: nowrap;
  height: 36px; padding: 0 12px 0 5px; border-radius: 999px;
  background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c);
  font-size: 22px; line-height: 1; letter-spacing: -.01em;
}
html.dark .chip { background: color-mix(in srgb, var(--c) 20%, transparent); }
.chip .rings { --size: 26px; --wr: .17; }
.scr-score { display: flex; align-items: baseline; gap: 10px; }
.scr-score b { font-size: 40px; line-height: 1; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.scr-score span { color: var(--label-3); font-size: 15px; }
.scr-h { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px 8px; }
.scr-h b { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.scr-h span { font-size: 15px; color: var(--label-3); }
.scr-card { background: var(--card); border-radius: 24px; overflow: hidden; transition: background-color .5s; }
.tabbar {
  position: absolute; left: 16px; right: 16px; bottom: 26px; z-index: 6;
  display: flex; align-items: center; gap: 10px;
}
.tabbar-pill { flex: 1; display: flex; padding: 4px; border-radius: 999px; height: 62px; }
.tabbar-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border-radius: 999px; font-size: 10px; line-height: 12px; font-weight: 600; color: var(--label);
  transition: background-color .3s;
}
.tabbar-item .ic { font-size: 24px; }
.tabbar-item.sel { background: var(--selection); color: var(--c, var(--label)); }
html.dark .tabbar-item.sel { background: rgba(255,255,255,.1); }
.tabbar-acc { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; }

/* Habit rows (home/habits) */
.habit { display: flex; align-items: center; gap: 12px; padding: 12px 16px; position: relative; }
.habit + .habit::before { content: ""; position: absolute; top: 0; left: 58px; right: 0; height: 1px; background: var(--sep); }
.habit-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.habit-title { font-size: 15px; color: var(--label-2); line-height: 18px; }
.habit-value { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.habit-value small { font-size: 14px; font-weight: 400; color: var(--label-3); }
.bar { display: flex; gap: 3px; height: 6px; border-radius: 6px; background: var(--fill-3); overflow: hidden; }
.bar .fill { height: 100%; border-radius: 6px; background: var(--label); transition: width .7s var(--ease-out); }
.bar .fill.extra { background: var(--yellow); }

/* Phone screens: the fitness focus card and the diet day */
.focus { background: var(--card); border-radius: 26px; padding: 18px; display: grid; gap: 14px; }
.focus-top { display: flex; justify-content: space-between; align-items: center; }
.focus-top small { font-size: 15px; color: var(--label-3); }
.focus-time { font-size: 48px; line-height: 52px; font-weight: 200; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.focus-seg { display: flex; gap: 4px; }
.focus-seg span { flex: 1; height: 6px; border-radius: 6px; background: color-mix(in srgb, var(--c) 20%, transparent); overflow: hidden; }
.focus-seg i { display: block; height: 100%; background: var(--c); border-radius: 6px; }
.focus-move small { font-size: 13px; font-weight: 600; color: var(--c); }
.focus-move b { display: block; font-size: 26px; line-height: 31px; font-weight: 600; letter-spacing: -.02em; margin-top: 2px; }
.focus-move span { font-size: 14px; color: var(--label-3); }
.focus-sets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.focus-sets span { display: grid; justify-items: center; padding: 10px 4px; border-radius: 16px; background: var(--card-2); font-size: 12px; color: var(--label-3); line-height: 15px; }
.focus-sets span b { font-size: 20px; line-height: 24px; color: var(--label); }
.focus-sets span.done { background: var(--c); color: rgba(255,255,255,.85); }
.focus-sets span.done b { color: #fff; }
.focus-next { font-size: 15px; color: var(--label-2); }
.focus-next b { color: var(--label); }
.scr-btn { height: 50px; border-radius: 999px; background: var(--label); color: var(--label-inv); display: grid; place-items: center; font-size: 17px; font-weight: 600; }
.wstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.wstrip span { display: grid; justify-items: center; gap: 4px; font-size: 12px; color: var(--label-3); }
.wstrip b { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; font-weight: 600; color: var(--label); }
.wstrip span.on b { background: var(--label); color: var(--label-inv); }
.wstrip span.done b { box-shadow: inset 0 0 0 2.5px var(--diet); }
.sfood { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 16px; }
.sfood + .sfood { border-top: 1px solid var(--sep); }
.sfood .box { width: 24px; height: 24px; border-radius: 50%; border: 1.6px solid var(--label-3); display: grid; place-items: center; color: transparent; font-size: 14px; flex-shrink: 0; }
.sfood.on .box { background: var(--diet); border-color: var(--diet); color: #fff; }
.sfood small { margin-left: auto; color: var(--label-3); font-size: 14px; }


/* ==========================================================================
   Modules
   ========================================================================== */
/* Left: the six tabs as toggles. Right: a phone screen showing the focused tab and the live tab bar */
.mods-wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 3.5vw, 48px); }
.mods-head { margin-bottom: 18px; }
.mods-head .small { margin-top: 4px; }
/* The two plans, each with its number of tabs */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.plan {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding: 14px 16px; border-radius: 18px;
  background: var(--card); box-shadow: var(--shadow-card); text-align: left; color: var(--label-2);
  transition: box-shadow .3s, color .3s, transform .35s var(--ease-spring);
}
.plan:active { transform: scale(.97); }
.plan-name { font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: -.01em; }
.plan-cap { grid-row: 2; font-size: 14px; line-height: 19px; color: var(--label-3); }
.plan-dots { grid-row: 1 / 3; grid-column: 2; display: flex; gap: 4px; }
.plan-dots i { width: 14px; height: 22px; border-radius: 5px; background: var(--label-3); opacity: .5; transition: background-color .3s, opacity .3s; }
.plan-dots i.off { background: none; box-shadow: inset 0 0 0 1.5px var(--fill-3); opacity: 1; }
.plan[aria-pressed="true"] { color: var(--label); box-shadow: var(--shadow-card), inset 0 0 0 2px var(--label); }
.plan[aria-pressed="true"] .plan-cap { color: var(--label-2); }
.plan[aria-pressed="true"] .plan-dots i:not(.off) { background: var(--label); opacity: 1; }
/* The places in the tab bar: filled, open, or waiting for Pro */
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 20px; }
.slot {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 12px; border-radius: 14px;
  font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; color: var(--label-2);
}
.slot > .ic { font-size: 18px; flex: none; }
.slot.open { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--label) 22%, transparent); }
.slot.lock { background: var(--fill-4); color: var(--label-3); }
.slot.lock .pro-pill { height: 20px; padding: 0 7px; font-size: 11px; }
.slot.full { justify-content: flex-start; padding: 0 12px 0 8px; background: color-mix(in srgb, var(--c) 14%, var(--card)); color: var(--label); }
.slot.full .tile { --c: inherit; width: 30px; height: 30px; border-radius: 9px; background: var(--c); color: #fff; font-size: 18px; }
.slot.full > span:not(.tile) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.slot.full > .ic { font-size: 14px; color: var(--label-3); }
.slot.new { animation: pop .45s var(--ease-spring); }
.slot.lock.hint { animation: slotHint .9s var(--ease-spring) 2; }
@keyframes slotHint { 30% { transform: scale(1.06); background: color-mix(in srgb, var(--label) 14%, transparent); color: var(--label); } }
.mods-wrap > div:first-child { display: flex; flex-direction: column; }
.mods { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 12px; }
.mod { display: grid; align-content: space-between; gap: 26px; padding: 16px; text-align: left; color: var(--label); }
.mods .mod:hover { background: color-mix(in srgb, var(--c) 6%, var(--card)); }
.mod-top { display: flex; justify-content: space-between; align-items: center; }
.mod .tile, .ds-row .tile { --c: inherit; }
.mod .tile { width: 44px; height: 44px; border-radius: 14px; background: var(--fill-4); font-size: 26px; transition: background-color .35s, color .35s, transform .45s var(--ease-spring); }
.mod:active .tile { transform: scale(.9); }
.mod-tick { position: relative; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--label-2); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--label) 22%, transparent); transition: background-color .3s, box-shadow .3s; }
.mod-tick .ic { grid-area: 1 / 1; font-size: 15px; transition: opacity .25s, transform .45s var(--ease-spring); }
.mod-tick .ic + .ic { opacity: 0; transform: scale(.3); color: #fff; }
.mod-body { display: grid; gap: 2px; min-width: 0; }
.mod-body b { font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: -.01em; }
.mod-body small { font-size: 14px; line-height: 19px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mod[aria-pressed="true"] { box-shadow: var(--shadow-card), inset 0 0 0 2px var(--c); }
.mod[aria-pressed="true"] .tile { background: var(--c); color: #fff; }
.mod[aria-pressed="true"] .mod-tick { background: var(--c); box-shadow: none; }
.mod[aria-pressed="true"] .mod-tick .ic:first-child { opacity: 0; transform: rotate(90deg) scale(.3); }
.mod[aria-pressed="true"] .mod-tick .ic + .ic { opacity: 1; transform: none; }
.mods .mod.dim.in { opacity: .45; transition: opacity .3s, background-color .5s, box-shadow .5s; }
/* Until the first tap, the open toggles nudge in turn */
.mods:not(.touched) .mod[aria-pressed="false"] .mod-tick { animation: nudge 3.6s ease-in-out infinite; animation-delay: calc(var(--k) * .3s + 1.5s); }
@keyframes nudge { 0%, 12%, 100% { transform: none; } 5% { transform: scale(1.22); box-shadow: inset 0 0 0 1.5px var(--c); color: var(--c); } }

.demo {
  display: flex; flex-direction: column; gap: 16px; min-height: 560px; padding: 26px 16px 16px;
  border-radius: 48px; background: var(--bg); box-shadow: 0 0 0 1px var(--sep), 0 30px 80px -40px rgba(0, 0, 0, .35);
}
.demo-screen { flex: 1; padding: 0 4px; }
.ds { display: grid; gap: 18px; animation: dsIn .5s var(--ease-out); }
@keyframes dsIn { from { opacity: 0; transform: translateY(12px); } }
.ds-head { display: flex; align-items: center; gap: 16px; }
.ds-head .rings { --size: 78px; }
.ds-head small { display: block; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--label-3); }
.ds-head h4 { font-size: 32px; line-height: 38px; font-weight: 700; letter-spacing: -.025em; }
.ds-desc { font-size: 15px; line-height: 21px; color: var(--label-2); }
.ds-group { background: var(--card); border-radius: 22px; overflow: hidden; }
.ds-label { display: block; padding: 14px 16px 4px; font-size: 13px; font-weight: 600; color: var(--label-3); }
.ds-row { position: relative; width: 100%; min-height: 50px; display: flex; align-items: center; gap: 12px; padding: 0 16px; font-size: 16px; text-align: left; color: var(--label); }
.ds-row + .ds-row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--sep); }
.ds-row > span:not(.tile) { flex: 1; min-width: 0; }
.ds-row small { font-size: 15px; color: var(--label-3); font-variant-numeric: tabular-nums; }
.ds-row > .ic { font-size: 14px; color: var(--label-3); }
.ds-row .tile { width: 28px; height: 28px; border-radius: 8px; background: var(--c); color: #fff; font-size: 17px; }
button.ds-row:hover { background: var(--fill-4); }
.ds-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding: 6px 10px 14px; }
.ds-week > span { display: grid; justify-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--label-3); }
.ds-week > span.on { color: var(--label); }
.ds-week .rings { --size: 30px; }
.ds-empty { padding: 2px 16px 16px; font-size: 15px; color: var(--label-3); }
.preview-bar { display: flex; gap: 8px; align-items: center; }
.preview-bar .tabbar-pill { height: 58px; }
.preview-bar .tabbar-item { font-size: 10px; transition: background-color .3s, color .3s; }
.preview-bar .tabbar-item.new { animation: pop .45s var(--ease-spring); }
.preview-bar .tabbar-acc { width: 58px; height: 58px; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

/* ==========================================================================
   Summary: the day in one sentence. The rings hold the score; morning, noon or evening changes all three
   ========================================================================== */
.sum { display: grid; justify-items: center; gap: clamp(28px, 3.5vw, 40px); text-align: center; }
.sum-rings { position: relative; display: grid; place-items: center; }
.sum-rings .rings { --size: clamp(180px, 20vw, 232px); }
.sum-score { position: absolute; font-size: clamp(26px, 2.8vw, 34px); line-height: 1; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.sum-line { max-width: 940px; min-height: calc(2 * 1.32em); font-size: clamp(28px, 4.2vw, 52px); line-height: 1.32; font-weight: 600; letter-spacing: -.03em; text-wrap: balance; }
.sum-line .chip { font-size: .8em; height: 1.32em; padding: 0 .42em 0 .14em; gap: .22em; vertical-align: -.14em; }
.sum-line .chip .rings { --size: 1.04em; }
.sum-line .nw { white-space: nowrap; }
.sum-note { margin-top: clamp(28px, 3.5vw, 40px); text-align: center; font-size: 15px; color: var(--label-3); }

/* ==========================================================================
   Workout stage: one button, six tabs, a live feed and live numbers
   ========================================================================== */
@property --gc { syntax: "<color>"; inherits: true; initial-value: #FF383C; }
.gym {
  --gc: var(--c);
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: var(--r-xl); background: var(--card); box-shadow: var(--shadow-card);
  padding: clamp(16px, 3vw, 36px);
  transition: --gc .9s var(--ease-out);
}
.gym-glow { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.gym-glow::before {
  content: ""; position: absolute; inset: -20%;
  background: radial-gradient(closest-side at 50% 52%, color-mix(in srgb, var(--gc) 26%, transparent), transparent 70%);
  animation: gymBreath 6s ease-in-out infinite;
}
.gym-glow span {
  position: absolute; left: 50%; top: 52%; width: var(--s); aspect-ratio: 1; border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--gc) 22%, transparent); transform: translate(-50%, -50%);
  animation: gymRipple 7s linear infinite; opacity: 0;
}
.gym-glow span:nth-child(1) { --s: 520px; }
.gym-glow span:nth-child(2) { --s: 520px; animation-delay: -2.33s; }
.gym-glow span:nth-child(3) { --s: 520px; animation-delay: -4.66s; }
@keyframes gymRipple { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(2.2); } }
@keyframes gymBreath { 50% { transform: scale(1.08); opacity: .8; } }
.gym.wet .gym-glow::before { animation-duration: 2.4s; }

/* tabs */
.gym-modes {
  display: flex; gap: 6px; justify-content: center; flex-wrap: nowrap; overflow-x: auto;
  margin: 0 auto clamp(18px, 3vw, 30px); padding: 4px; width: max-content; max-width: 100%;
  border-radius: 999px; background: var(--fill-4);
}
.gym-modes button {
  position: relative; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 999px;
  font-size: 15px; font-weight: 600; color: var(--label-2); white-space: nowrap; flex-shrink: 0;
  transition: background-color .35s, color .35s, transform .35s var(--ease-spring);
}
.gym-modes button .ic { font-size: 19px; color: var(--c); transition: color .35s; }
.gym-modes button:hover { color: var(--label); }
.gym-modes button:active { transform: scale(.94); }
.gym-modes button[aria-selected="true"] { background: var(--c); color: #fff; box-shadow: 0 8px 22px -10px var(--c); }
.gym-modes button[aria-selected="true"] .ic { color: #fff; }
.gym-modes button.tried::after {
  content: "✓"; position: absolute; top: 2px; right: 2px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--c); color: #fff; font-size: 9px; line-height: 15px; text-align: center; font-weight: 700;
  box-shadow: 0 0 0 2px var(--card); animation: pop .4s var(--ease-spring);
}
.gym-modes button.tried[aria-selected="true"]::after { background: #fff; color: var(--c); }

/* three columns: feed, core, numbers */
.gym-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px) minmax(0, 1fr); gap: clamp(16px, 3vw, 40px); align-items: center; min-height: 600px; }
.gym-side { align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 10px; min-width: 0; }
.gym-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--label-3); letter-spacing: .02em; text-transform: uppercase; }
.gym-live { width: 8px; height: 8px; border-radius: 50%; background: var(--label-3); transition: background-color .3s; }
.gym-live.on { background: var(--gc); animation: blink 1.2s ease-in-out infinite; }
.gym-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; min-height: 300px; align-content: start; }
.gym-feed li {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px;
  background: color-mix(in srgb, var(--card-2) 82%, transparent); backdrop-filter: blur(10px);
  font-size: 14px; line-height: 19px; color: var(--label-2);
  animation: feedIn .55s var(--ease-spring);
  transition: opacity .4s;
}
.gym-feed li b { color: var(--label); font-weight: 600; }
.gym-feed li .tile { width: 30px; height: 30px; border-radius: 9px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); font-size: 17px; }
.gym-feed li:nth-child(3) { opacity: .75; } .gym-feed li:nth-child(4) { opacity: .5; } .gym-feed li:nth-child(5) { opacity: .25; }
@keyframes feedIn { from { opacity: 0; transform: translateY(-14px) scale(.92); } }

/* core */
.gym-core { display: grid; justify-items: center; text-align: center; gap: 6px; }
.gym-core.enter > * { animation: fadeUpS .6s var(--ease-out) backwards; }
.gym-core.enter > :nth-child(2) { animation-delay: .04s; } .gym-core.enter > :nth-child(3) { animation-delay: .08s; }
.gym-core.enter > :nth-child(4) { animation-delay: .12s; } .gym-core.enter > :nth-child(5) { animation-delay: .16s; } .gym-core.enter > :nth-child(n+6) { animation-delay: .2s; }
@keyframes fadeUpS { from { opacity: 0; transform: translateY(14px); } }
.swap { animation: swapIn .45s var(--ease-out); }
@keyframes swapIn { from { opacity: 0; transform: translateY(6px); filter: blur(4px); } }
.gym-kicker { font-size: 13px; font-weight: 600; color: var(--gc); letter-spacing: .02em; min-height: 18px; }
.gym-title { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.15; font-weight: 600; letter-spacing: -.02em; }
.gym-sub { font-size: 15px; color: var(--label-3); min-height: 22px; text-wrap: balance; }

.gym-dial { position: relative; width: min(290px, 70vw); aspect-ratio: 1; margin: 14px 0 10px; }
.gym-dial svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.gd-track { fill: none; stroke: var(--fill-3); stroke-width: 14; }
.gd-bar {
  fill: none; stroke: var(--gc); stroke-width: 14; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset .6s var(--ease-out); filter: drop-shadow(0 0 10px color-mix(in srgb, var(--gc) 55%, transparent));
}
.gd-rest { fill: none; stroke: color-mix(in srgb, var(--gc) 55%, transparent); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
#gymTicks line { stroke: var(--card); stroke-width: 5; }
.gd-center { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 2px; }
.gd-center small { font-size: 13px; color: var(--label-3); max-width: 170px; line-height: 17px; }
.gd-center b { font-size: clamp(54px, 6.4vw, 72px); line-height: 1; font-weight: 200; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.bump { animation: bump .32s var(--ease-spring); }
@keyframes bump { 40% { transform: scale(1.08); } }
.gd-burst { position: absolute; inset: 4%; border-radius: 50%; pointer-events: none; opacity: 0; box-shadow: 0 0 0 3px var(--gc), 0 0 40px 6px color-mix(in srgb, var(--gc) 60%, transparent); }
.gd-burst.go { animation: burst .8s var(--ease-out); }
@keyframes burst { 0% { opacity: .9; transform: scale(.92); } 100% { opacity: 0; transform: scale(1.22); } }
/* swimming: water rises in the dial while the phone sits in the locker */
.gym-dial::before {
  content: ""; position: absolute; inset: 12%; border-radius: 50%; z-index: -1; opacity: 0; transition: opacity .6s;
  background: linear-gradient(to top, color-mix(in srgb, var(--gc) 26%, transparent) 42%, transparent 42%);
}
.gym.wet .gym-dial::before { opacity: 1; animation: wave 1.6s ease-in-out infinite; }
@keyframes wave { 50% { background-position: 0 -6px; transform: rotate(4deg); } }

.gym-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; width: 100%; min-height: 50px; margin-bottom: 8px; }
.gc {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 12px;
  background: var(--fill-4); font-size: 13px; color: var(--label-3); transition: background-color .35s, color .35s, transform .35s var(--ease-spring);
}
.gc b { font-size: 14px; color: var(--label); font-weight: 600; font-variant-numeric: tabular-nums; }
.gc .ic { font-size: 14px; }
.gc.now { box-shadow: inset 0 0 0 1.5px var(--gc); color: var(--label); }
.gc.on { background: var(--gc); color: rgba(255, 255, 255, .85); animation: pop .4s var(--ease-spring); }
.gc.on b { color: #fff; }
/* cardio timeline */
.tl { display: flex; gap: 3px; width: 100%; height: 12px; align-self: center; }
.tl i { position: relative; overflow: hidden; border-radius: 4px; background: var(--fill-3); transition: transform .3s; }
.tl i.fast { background: color-mix(in srgb, var(--gc) 26%, transparent); }
.tl i.now { transform: scaleY(1.45); }
.tl u { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--label-3); }
.tl i.fast u { background: var(--gc); }
/* swim lengths */
.lens, .gfoods { display: grid; width: 100%; text-align: left; border-radius: 18px; background: var(--fill-4); padding: 4px 14px; }
.ln, .gfd { display: flex; align-items: center; gap: 10px; min-height: 46px; font-size: 15px; width: 100%; text-align: left; }
.ln + .ln, .gfd + .gfd { border-top: 1px solid var(--sep); }
.ln .grow, .gfd .grow { flex: 1; min-width: 0; display: grid; line-height: 19px; }
.ln small, .gfd small { color: var(--label-3); font-size: 12px; }
.gfd .grow { display: block; }
.ln > b, .gfd > b { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--label-2); }
.ln .stepper { height: 30px; }
.ln .stepper button { width: 32px; height: 30px; font-size: 14px; }
.ln .stepper .val { min-width: 34px; font-size: 14px; }
.gfd .box { width: 22px; height: 22px; border-radius: 50%; border: 1.6px solid var(--label-3); display: grid; place-items: center; font-size: 13px; color: transparent; flex-shrink: 0; transition: background-color .25s, border-color .25s, color .25s, transform .35s var(--ease-spring); }
.gfd[aria-pressed="true"] .box { background: var(--gc); border-color: var(--gc); color: #fff; transform: scale(1.1); }
.gfd[aria-pressed="true"] .grow { color: var(--label-3); }

/* the button */
.gym-btn {
  position: relative; height: 64px; min-width: min(280px, 100%); padding: 0 34px; border-radius: 999px;
  background: var(--gc); color: #fff; font-size: 19px; font-weight: 600; letter-spacing: -.01em;
  box-shadow: 0 18px 40px -16px var(--gc), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .35s var(--ease-spring), box-shadow .3s;
}
.gym-btn:hover { transform: translateY(-2px); }
.gym-btn:active { transform: scale(.94); }
.gym-btn.hit { animation: hit .45s var(--ease-spring); }
@keyframes hit { 30% { transform: scale(.92); } }
.gym-btn.pulse::after { content: ""; position: absolute; inset: 0; border-radius: inherit; animation: gymPulse 2s ease-out infinite; pointer-events: none; }
@keyframes gymPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gc) 60%, transparent); } 80%, 100% { box-shadow: 0 0 0 20px transparent; } }
.gb-in { display: inline-flex; align-items: center; gap: 10px; }
.gb-in .ic { font-size: 22px; }
.gym-hint { font-size: 14px; color: var(--label-3); min-height: 40px; max-width: 340px; margin-top: 6px; line-height: 20px; }

/* numbers */
.gym-stats { gap: 10px; }
.gs { padding: 14px 16px; border-radius: 18px; background: color-mix(in srgb, var(--card-2) 82%, transparent); backdrop-filter: blur(10px); display: grid; gap: 2px; animation: fadeUpS .5s var(--ease-out) backwards; }
.gs:nth-child(2) { animation-delay: .06s; } .gs:nth-child(3) { animation-delay: .12s; } .gs:nth-child(4) { animation-delay: .18s; }
.gs small { font-size: 13px; color: var(--label-3); }
.gs b { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.1; font-weight: 200; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.route { width: 100%; height: auto; margin-top: 6px; overflow: visible; }
.rt-bg, .rt { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.rt-bg { stroke: var(--fill-3); stroke-dasharray: 2 7; }
.rt { stroke: var(--gc); stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--gc) 60%, transparent)); }
.rt-dot { fill: #fff; stroke: var(--gc); stroke-width: 3.5; }

/* the end card */
.gym-done {
  position: absolute; inset: 0; z-index: 5; display: grid; grid-template-columns: auto minmax(0, 380px); justify-content: center; align-items: center;
  gap: clamp(24px, 5vw, 64px); padding: clamp(20px, 4vw, 48px);
  background: color-mix(in srgb, var(--card) 72%, transparent); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  animation: fadeIn .5s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.gym-story {
  width: min(280px, 70vw); aspect-ratio: 9 / 15; border-radius: 30px; padding: 26px 22px; color: #fff;
  display: grid; justify-items: center; align-content: center; gap: 10px; text-align: center;
  background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--gc) 85%, #fff 10%), color-mix(in srgb, var(--gc) 55%, #000) 70%);
  box-shadow: 0 40px 80px -30px color-mix(in srgb, var(--gc) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, .3);
  animation: storyIn 1s var(--ease-spring) backwards .1s;
}
@keyframes storyIn { from { opacity: 0; transform: translateY(60px) rotate(-6deg) scale(.85); } }
.gym-story .rings { --size: 128px; --wr: .15; margin-bottom: 6px; filter: drop-shadow(0 6px 20px rgba(0, 0, 0, .25)); }
.gym-story .ring { --c: #fff !important; --c0: rgba(255, 255, 255, .7); --track: rgba(255, 255, 255, .18) !important; }
.gs-kicker { font-size: 13px; opacity: .8; font-weight: 600; }
.gs-title { font-size: 26px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
.gs-figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 100%; margin-top: 8px; }
.gs-figs div { padding: 10px 4px; border-radius: 14px; background: rgba(255, 255, 255, .16); animation: fadeUpS .5s var(--ease-out) backwards; }
.gs-figs div:nth-child(1) { animation-delay: .5s; } .gs-figs div:nth-child(2) { animation-delay: .6s; } .gs-figs div:nth-child(3) { animation-delay: .7s; }
.gs-figs small { display: block; font-size: 11px; opacity: .8; }
.gs-figs b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gs-badge { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: rgba(0, 0, 0, .22); font-size: 13px; font-weight: 600; margin-top: 4px; animation: pop .5s var(--ease-spring) .9s backwards; }
.gs-badge .ic { font-size: 16px; color: var(--yellow); }
.gym-done-side { display: grid; gap: 18px; justify-items: start; animation: fadeUpS .7s var(--ease-out) .3s backwards; }
.gym-done-lead { font-size: 17px; line-height: 1.5; color: var(--label-2); }
.gym-done-side .btns { display: flex; gap: 10px; flex-wrap: wrap; }
.gym-next {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px 12px 12px; border-radius: 20px; text-align: left;
  background: var(--fill-4); font-size: 17px; font-weight: 600; transition: background-color .25s, transform .35s var(--ease-spring);
}
.gym-next:hover { background: var(--fill-3); }
.gym-next:active { transform: scale(.97); }
.gym-next > span:nth-child(2) { flex: 1; }
.gym-next .tile { width: 40px; height: 40px; border-radius: 12px; background: var(--c); color: #fff; font-size: 22px; }
.gym-next > .ic { color: var(--c); font-size: 18px; transition: transform .35s var(--ease-spring); }
.gym-next:hover > .ic { transform: translateX(4px); }

/* breadth: ready programs rolling by */
.gym-more { margin-top: clamp(48px, 6vw, 80px); display: grid; gap: 24px; }
.gym-more-head { max-width: 680px; display: grid; gap: 8px; }
.marquee { display: grid; gap: 10px; overflow: hidden; margin-inline: calc(var(--gutter) * -1); mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.mq-row { display: flex; gap: 10px; width: max-content; animation: mq 60s linear infinite; }
.mq-row.rev { animation-direction: reverse; animation-duration: 70s; }
.marquee:hover .mq-row { animation-play-state: paused; }
@keyframes mq { to { transform: translateX(-50%); } }
.mq { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 10px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow-card); white-space: nowrap; }
.mq .tile { width: 36px; height: 36px; border-radius: 11px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); font-size: 20px; }
.mq b { font-size: 16px; font-weight: 600; }
.mq small { font-size: 13px; color: var(--label-3); }
.gym-links { display: flex; gap: 10px 28px; flex-wrap: wrap; }
.gym-links .text-link { font-size: 16px; }
.gym-links .text-link .ic { font-size: 20px; color: var(--label-3); }

@media (max-width: 980px) {
  .gym-body { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 22px; }
  .gym-core { order: -2; }
  .gym-stats { order: -1; }
  .gym-stats { flex-direction: row; flex-wrap: wrap; }
  .gym-stats .gs { flex: 1 1 0; min-width: 0; }
  .gym-stats .gs-route { flex-basis: 100%; }
  .gym-feed { min-height: 0; }
  .gym-modes { justify-content: flex-start; }
  .gym-done { position: absolute; grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: start; overflow-y: auto; }
  .gym-done-side { justify-items: center; text-align: center; }
}
@media (max-width: 680px) {
  .gym { margin-inline: calc(var(--gutter) * -1 + 8px); }
  .gym-modes button { padding: 0 12px; font-size: 14px; }
  .gs { padding: 10px 12px; }
  .gs b { font-size: 22px; }
  .gym-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .gym-glow span, .gym-glow::before, .mq-row { animation: none; }
}

/* ==========================================================================
   Move guide / program editor
   ========================================================================== */
.sheet { border-radius: 32px; padding: 0 0 22px; overflow: hidden; }
.sheet-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 0; }
.sheet-grab { width: 36px; height: 5px; border-radius: 3px; background: var(--fill-2); margin: 8px auto 0; }
.sheet-head { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 8px 24px 18px; }
.sheet-head .sym { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; }
.sheet-head h3 { font-size: 26px; line-height: 31px; font-weight: 600; letter-spacing: -.02em; }
.sheet-head p { font-size: 15px; color: var(--label-2); line-height: 21px; }
.sheet-body { padding: 0 20px; display: grid; gap: 14px; }
.sheet-group { background: var(--card); border-radius: 20px; padding: 14px 16px; }
html.dark .sheet .sheet-group { background: var(--card-2); }
.sheet-group h4 { font-size: 13px; color: var(--label-3); font-weight: 400; margin: 0 0 8px; letter-spacing: .01em; }
.muscles { display: flex; flex-wrap: wrap; gap: 6px; }
.muscles span { font-size: 14px; padding: 5px 12px; border-radius: 999px; background: var(--fill-3); color: var(--label-2); }
.muscles span.main { background: color-mix(in srgb, var(--fitness) 16%, transparent); color: var(--fitness); font-weight: 600; }
.howto { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: h; }
.howto li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; font-size: 15px; line-height: 21px; }
.howto.num li::before { counter-increment: h; content: counter(h); width: 24px; height: 24px; border-radius: 50%; background: var(--label); color: var(--label-inv); font-size: 13px; font-weight: 600; display: grid; place-items: center; }
.howto .ic { font-size: 20px; margin-top: 1px; }
.stop-note { font-size: 13px; color: var(--label-3); display: flex; gap: 8px; line-height: 18px; padding: 0 4px; }

.list { background: var(--card); border-radius: 18px; overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 0 16px; font-size: 16px; position: relative; width: 100%; text-align: left; }
.li + .li::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--sep); }
.li .grow { flex: 1; min-width: 0; display: grid; line-height: 19px; padding: 8px 0; }
.li .grow small { color: var(--label-3); font-size: 13px; }
.li .end { color: var(--label-3); font-size: 15px; display: flex; align-items: center; gap: 6px; }
.li .end .ic { font-size: 14px; }
.li.add { color: var(--info); }
.li.tap { transition: background-color .2s; }
.li.tap:active, .li.tap.flash { background: var(--fill-4); }
.list-h { font-size: 13px; color: var(--label-3); padding: 0 16px; margin-bottom: -6px; text-transform: uppercase; letter-spacing: .02em; }
.weeks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.wkp { padding: 14px 12px; border-radius: 16px; background: var(--card-2); display: grid; gap: 8px; position: relative; overflow: hidden; }
.wkp small { font-size: 12px; color: var(--label-3); }
.wkp b { font-size: 15px; line-height: 19px; font-weight: 600; }
.wkp .bars { display: flex; gap: 3px; align-items: flex-end; height: 34px; }
.wkp .bars i { flex: 1; border-radius: 3px; background: color-mix(in srgb, var(--c) 30%, transparent); }
.wkp.cur { background: color-mix(in srgb, var(--c) 12%, var(--card)); box-shadow: inset 0 0 0 1.5px var(--c); }
.wkp.cur .bars i, .wkp.past .bars i { background: var(--c); }
.wkp.past::after { content: "✓"; position: absolute; top: 10px; right: 12px; font-size: 13px; color: var(--c); font-weight: 600; }

/* ==========================================================================
   History: five weeks of rings, a holiday break that keeps the streak
   ========================================================================== */
.hist { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.hist .sec-head { margin-bottom: 0; }
.hist-card { padding: clamp(18px, 2.4vw, 26px); }
#gecmis { padding-block-start: clamp(56px, 8vw, 100px); }
.hist-cal > :nth-child(n+8):nth-child(-n+21) { display: none; }
.hist-streak { display: flex; align-items: baseline; gap: 10px; margin-bottom: clamp(20px, 2.6vw, 28px); }
.hist-streak .ic { align-self: center; font-size: 30px; color: var(--run); }
.hist-streak b { font-size: clamp(44px, 5vw, 60px); line-height: 1; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.hist-streak span { color: var(--label-2); }
.hist-cal { --cell: clamp(32px, 5vw, 46px); display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px 6px; justify-items: center; align-items: center; }
.hist-cal .dn { font-size: 13px; line-height: 16px; font-weight: 600; color: var(--label-3); }
.hist-cal .c { position: relative; display: grid; place-items: center; width: var(--cell); height: var(--cell); }
.hist-cal .rings { --size: var(--cell); }
.hist-cal .today::after { content: ""; position: absolute; bottom: -9px; width: 4px; height: 4px; border-radius: 50%; background: var(--label); }
.hist-cal .missed { width: 84%; height: 84%; border-radius: 50%; border: 2px dashed var(--label-3); opacity: .7; }
.hist-cal .later::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--fill-2); }
.hist-cal .ara {
  justify-self: stretch; height: var(--cell); display: flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 999px; background: var(--fill-3); color: var(--label-2); font-size: 15px; font-weight: 600;
}
.hist-cal .ara .ic { font-size: 18px; }

/* ==========================================================================
   Share: a stage for the poster. Tilt it, flip it to another tab, wipe in a look, stick it on a photo;
   "Paylaş" plays the rest: the share sheet, the flight into a story or a post, the friends' reactions
   ========================================================================== */
@property --pc { syntax: "<color>"; inherits: true; initial-value: #FF8D28; }
.sx {
  --pc: var(--run);
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(170px, 216px) minmax(0, 1fr) minmax(170px, 216px); grid-template-rows: minmax(0, 1fr) auto;
  gap: 20px 24px; min-height: 800px; padding: 32px;
  border-radius: var(--r-xl); background: var(--card); box-shadow: var(--shadow-card);
  transition: --pc .9s ease, background-color .5s, box-shadow .5s;
}
/* The light around the card takes the tab's color */
.sx-aura { position: absolute; inset: 0; z-index: -3; pointer-events: none; opacity: 0; transition: opacity 2s ease .3s; }
.sx.in .sx-aura { opacity: 1; }
.sx-aura i { position: absolute; border-radius: 50%; background: var(--pc); filter: blur(80px); opacity: .3; }
.sx-aura i:nth-child(1) { width: 540px; height: 540px; left: 50%; top: 44%; margin: -270px 0 0 -270px; animation: auraA 16s ease-in-out infinite; }
.sx-aura i:nth-child(2) { width: 320px; height: 320px; left: 8%; top: 62%; opacity: .16; animation: auraB 19s ease-in-out infinite; }
.sx-aura i:nth-child(3) { width: 280px; height: 280px; right: 6%; top: 4%; opacity: .14; background: color-mix(in srgb, var(--pc), #fff 35%); animation: auraB 23s ease-in-out infinite reverse; }
html.dark .sx-aura i:nth-child(1) { opacity: .36; }
.sx-dots { position: absolute; inset: 0; z-index: -2; pointer-events: none; background-image: radial-gradient(var(--fill-2) 1.1px, transparent 1.5px); background-size: 22px 22px; -webkit-mask-image: radial-gradient(55% 50% at 50% 45%, #000, transparent); mask-image: radial-gradient(55% 50% at 50% 45%, #000, transparent); transition: opacity .8s; }
@keyframes auraA { 33% { transform: translate(60px, -40px) scale(1.1); } 66% { transform: translate(-50px, 30px) scale(.92); } }
@keyframes auraB { 50% { transform: translate(80px, -60px) scale(1.2); } }

/* Sticker: a photo comes up behind it */
.sx-scene { position: absolute; inset: 0; z-index: -1; opacity: 0; transform: scale(1.12); transition: opacity .9s ease, transform 1.4s var(--ease-out); pointer-events: none; }
.sx-scene svg, .ss-bg svg { width: 100%; height: 100%; display: block; }
.sx-scene::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 50%, transparent, rgba(0,0,0,.28)); }
.sx.is-sticker .sx-scene { opacity: 1; transform: none; }
.sx.is-sticker .sx-dots { opacity: 0; }

/* Rails: tabs on the left, formats on the right */
.sx-rail {
  position: relative; z-index: 2; align-self: center; display: grid; gap: 4px; padding: 10px; border-radius: 26px;
  background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); box-shadow: var(--glass-shadow);
  transition: opacity .5s, transform .7s var(--ease-out);
}
.sx-rail h4 { font-size: 13px; color: var(--label-3); font-weight: 400; margin: 4px 10px 6px; }
.sx-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; height: 54px; padding: 0 14px 0 8px; border-radius: 18px;
  text-align: left; font-size: 16px; font-weight: 600; color: var(--label-2); white-space: nowrap;
  transition: background-color .35s, color .35s, box-shadow .35s, transform .4s var(--ease-spring);
}
.sx-opt:hover { color: var(--label); }
.sx-opt:active { transform: scale(.95); }
.sx-opt[aria-pressed="true"] { background: var(--card); color: var(--label); box-shadow: 0 8px 20px -10px rgba(0,0,0,.3); }
html.dark .sx-opt[aria-pressed="true"] { background: #3A3A3C; }
.sx-opt > span:last-child { display: grid; line-height: 19px; }
.sx-opt small { font-size: 12px; line-height: 15px; font-weight: 400; color: var(--label-3); }
.sx-opt .tile, .glyph { width: 38px; height: 38px; border-radius: 12px; background: var(--fill-3); color: var(--label-2); transition: background-color .35s, color .35s, transform .55s var(--ease-spring); }
.sx-opt .tile { font-size: 22px; }
.sx-opt[aria-pressed="true"] .tile { background: var(--pc); color: #fff; transform: rotate(-8deg) scale(1.06); }
.glyph { display: grid; place-items: center; flex-shrink: 0; }
.glyph::before { content: ""; height: 20px; aspect-ratio: var(--ar, 1); border: 1.75px solid currentColor; border-radius: 4px; }
.glyph.st::before { height: 13px; aspect-ratio: 3 / 2; border-style: dashed; border-radius: 6px; }
.sx-opt[aria-pressed="true"] .glyph { background: var(--pc); color: #fff; transform: scale(1.06); }

/* The card in the middle */
.sx-center { position: relative; z-index: 1; display: grid; place-items: center; min-height: 640px; padding-bottom: 44px; }
.sx-center.lift { z-index: 3; }
.sx-tilt {
  --rx: 0deg; --ry: 0deg; --px: 0; --py: 0; --mx: 50%; --my: 30%; --hov: 0; --dr: 0deg;
  position: relative; perspective: 1100px; transition: opacity .4s;
}
.sx-tilt.gone { opacity: 0; pointer-events: none; }
.sx.in .sx-tilt { animation: sxDrop 1.5s var(--ease-out) .2s backwards; }
@keyframes sxDrop { from { opacity: 0; transform: translateY(-140px) rotate(12deg) scale(.8); } }

/* The dock: size, look, share */
.sx-dock {
  position: relative; z-index: 2; grid-column: 1 / -1; justify-self: center; display: flex; align-items: center; gap: 12px;
  padding: 7px 7px 7px 20px; border-radius: 999px;
  background: var(--glass-medium); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); box-shadow: var(--glass-medium-shadow);
  transition: opacity .5s, transform .7s var(--ease-out);
}
.sx-dim { min-width: 128px; font-size: 13px; color: var(--label-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sx-looks button { display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; height: 38px; }
.sw { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); transition: transform .4s var(--ease-spring); }
.sw.color { background: var(--pc); }
.sw.dark { background: #000; box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); }
.sw.light { background: #fff; }
.sx-looks button[aria-pressed="true"] .sw { transform: scale(1.2); }
.sx-go { position: relative; overflow: hidden; height: 46px; padding: 0 22px; background: var(--pc); color: #fff; box-shadow: 0 14px 30px -12px var(--pc); }
.sx-go::after { content: ""; position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); transform: translateX(-160%) skewX(-18deg); animation: goShine 4.2s ease-in-out 2.4s infinite; }
@keyframes goShine { 0% { transform: translateX(-160%) skewX(-18deg); } 30%, 100% { transform: translateX(360%) skewX(-18deg); } }

/* While it's being shared the controls step aside */
.sx.sharing .sx-tabs { opacity: 0; transform: translateX(-40px); pointer-events: none; }
.sx.sharing .sx-fmts { opacity: 0; transform: translateX(40px); pointer-events: none; }
.sx.sharing .sx-dock { opacity: 0; transform: translateY(40px); pointer-events: none; }

/* ---- The poster */
.poster {
  --ac: #fff; --on: var(--pc); --sub: rgba(255,255,255,.74); --chip: rgba(255,255,255,.2); --ln: rgba(255,255,255,.24);
  position: relative; width: 300px; height: 533px; border-radius: 26px; overflow: hidden; container-type: size;
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px; padding: 24px 22px 20px;
  background-color: var(--pc); color: #fff;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  box-shadow: 0 0 0 0 #fff, 0 60px 90px -50px color-mix(in srgb, var(--pc) 85%, #000), 0 30px 50px -30px rgba(0,0,0,.45);
  transition: width .8s cubic-bezier(.3,1.2,.4,1), height .8s cubic-bezier(.3,1.2,.4,1), background-color .5s, color .5s, border-radius .6s, padding .6s, box-shadow .6s, rotate .6s var(--ease-spring), scale .4s var(--ease-spring);
  user-select: none; -webkit-user-select: none; touch-action: pan-y; cursor: grab;
}
.poster::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 60% at 100% 0%, rgba(255,255,255,.34), transparent 60%), radial-gradient(100% 50% at 0% 100%, rgba(0,0,0,.16), transparent 70%); }
/* Film grain, so it reads as a print, not a div */
.poster::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .16; mix-blend-mode: overlay; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.poster.dark { --ac: var(--pc); --on: #fff; --sub: rgba(255,255,255,.6); --chip: color-mix(in srgb, var(--pc) 24%, transparent); --ln: rgba(255,255,255,.14); background-color: #0B0B0C; }
.poster.dark::before { background: radial-gradient(110% 55% at 100% 0%, color-mix(in srgb, var(--pc) 55%, transparent), transparent 62%), radial-gradient(80% 40% at 0% 100%, color-mix(in srgb, var(--pc) 24%, transparent), transparent 70%); }
.poster.light { --ac: var(--pc); --on: #fff; --sub: rgba(0,0,0,.55); --chip: color-mix(in srgb, var(--pc) 15%, transparent); --ln: rgba(0,0,0,.1); background-color: #fff; color: #000; }
.poster.light::before { background: radial-gradient(110% 55% at 100% 0%, color-mix(in srgb, var(--pc) 30%, transparent), transparent 62%); }
.poster.light::after { opacity: .1; mix-blend-mode: multiply; }

/* Holographic foil and a glare that follow the pointer */
.p-holo, .p-glare { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.p-holo {
  opacity: calc(var(--hov, 0) * .22); mix-blend-mode: color-dodge;
  background: repeating-linear-gradient(115deg, #ff7eb3 0%, #7afcff 6%, #feff9c 12%, #c48bff 18%, #ff7eb3 24%);
  background-size: 400% 400%; background-position: calc(50% + var(--px, 0) * 45%) calc(50% + var(--py, 0) * 45%);
  -webkit-mask-image: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), #000, transparent 75%); mask-image: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), #000, transparent 75%);
}
.poster.light .p-holo { mix-blend-mode: multiply; opacity: calc(var(--hov, 0) * .3); }
.p-glare { opacity: var(--hov, 0); mix-blend-mode: soft-light; background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255,255,255,.5), rgba(255,255,255,0) 50%); }
.p-flash { position: absolute; inset: 0; z-index: 5; background: #fff; opacity: 0; pointer-events: none; }

.p-top, .p-viz, .p-nums, .p-brand { position: relative; z-index: 1; }
.p-top { display: flex; align-items: center; gap: 10px; translate: calc(var(--px, 0) * -4px) calc(var(--py, 0) * -4px); }
.p-top .tile { width: 38px; height: 38px; border-radius: 11px; font-size: 23px; background: var(--chip); color: currentColor; }
.poster.dark .p-top .tile, .poster.light .p-top .tile { background: var(--pc); color: #fff; }
.p-top b { display: block; font-size: 18px; line-height: 21px; font-weight: 600; }
.p-top small { display: block; font-size: 13px; color: var(--sub); }
.p-viz { flex: 1 1 0; min-height: 0; display: grid; color: var(--ac); translate: calc(var(--px, 0) * 10px) calc(var(--py, 0) * 10px); }
.p-viz svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.p-nums { display: grid; gap: 12px; translate: calc(var(--px, 0) * 6px) calc(var(--py, 0) * 6px); }
.p-badge { justify-self: start; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px 0 7px; border-radius: 999px; background: var(--chip); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.poster.dark .p-badge, .poster.light .p-badge { color: var(--pc); }
.p-badge .ic { font-size: 15px; }
.p-fig small { display: block; font-size: 13px; line-height: 16px; color: var(--sub); margin-bottom: 3px; }
.p-fig b { display: block; font-size: 30px; line-height: 1; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.p-fig em { font-style: normal; }
.p-fig b span { font-size: .52em; font-weight: 500; color: var(--sub); letter-spacing: 0; margin-left: 3px; }
.p-fig.big b { font-size: clamp(40px, 23cqw, 78px); letter-spacing: -.05em; }
.poster.dark .p-fig.big b, .poster.light .p-fig.big b { color: var(--pc); }
.p-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 12px; border-top: 1px solid var(--ln); }
.p-brand { display: flex; align-items: center; opacity: .9; }
.p-brand svg { width: 60px; height: 10px; }
@container (max-height: 400px) { .p-fig.big b { font-size: clamp(36px, 19cqw, 64px); } .p-fig b { font-size: 26px; } }
/* Post and square (heights here are the content box): the picture moves behind the numbers, up in the corner */
@container (max-height: 340px) {
  .p-viz { position: absolute; z-index: 0; right: 6%; top: 8%; width: 58%; height: 40%; opacity: .34; }
}
@container (max-height: 270px) {
  .p-viz { top: 14%; height: 36%; }
  .p-badge { display: none; }
}

/* Story's safe area: the app's own buttons cover the top and the bottom */
.p-safe { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .5s; }
.p-safe .sf-top, .p-safe .sf-bot { position: absolute; left: 0; right: 0; }
.p-safe .sf-top { top: 0; height: 13%; display: flex; gap: 4px; padding: 12px 14px; background: linear-gradient(rgba(0,0,0,.42), rgba(0,0,0,.1)); border-bottom: 1.5px dashed rgba(255,255,255,.85); }
.p-safe .sf-top i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.75); }
.p-safe .sf-bot { bottom: 0; height: 13%; background: linear-gradient(rgba(0,0,0,.1), rgba(0,0,0,.42)); border-top: 1.5px dashed rgba(255,255,255,.85); }
.p-safe .sf-bot::after { content: ""; position: absolute; left: 14px; right: 52px; bottom: 16px; height: 30px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.75); }
.p-safe em { position: absolute; left: 50%; top: 50%; translate: -50% -50%; font-style: normal; font-size: 12px; font-weight: 600; color: #fff; padding: 5px 11px; border-radius: 999px; background: rgba(0,0,0,.5); white-space: nowrap; }
.sx.show-safe .poster:not(.sticker) .p-safe { opacity: 1; }

/* Sticker: die-cut white edge, lies a little crooked, picks up when dragged */
.poster.sticker { padding: 18px 20px; border-radius: 30px; rotate: calc(-4deg + var(--dr, 0deg)); box-shadow: 0 0 0 6px #fff, 0 28px 40px -16px rgba(0,0,0,.6); touch-action: none; }
.poster.sticker .p-viz, .poster.sticker .p-badge, .poster.sticker .p-brand { display: none; }
.poster.sticker .p-nums { grid-template-columns: auto auto auto; justify-content: space-between; align-items: end; }
.poster.sticker .p-row { display: contents; }
.poster.sticker .p-fig.big b { font-size: 36px; }
.poster.sticker .p-fig b { font-size: 24px; }
.poster.sticker.dragging { cursor: grabbing; scale: 1.07; box-shadow: 0 0 0 6px #fff, 0 60px 60px -24px rgba(0,0,0,.55); }

/* The pieces draw themselves in (the still state is the finished one) */
.p-viz .draw { stroke-dasharray: var(--da, 1) 2; }
.poster.play .p-viz .draw { animation: vizDraw 1.7s var(--ease-out) backwards; animation-delay: var(--vd, .25s); }
.poster.play .p-viz .pop { transform-box: fill-box; transform-origin: center; animation: popIn .7s var(--ease-spring) backwards; animation-delay: var(--vd, 1.5s); }
.poster.play .p-viz .vbar { transform-box: fill-box; transform-origin: 50% 100%; animation: barUp .9s var(--ease-spring) backwards; animation-delay: calc(var(--i, 0) * 32ms + .25s); }
.poster.play .p-viz .fade { animation: vizFade 1.2s ease backwards; animation-delay: var(--vd, .15s); }
.poster.play .p-badge { animation: popIn .8s var(--ease-spring) 1.1s backwards; }
.p-viz .ping { transform-box: fill-box; transform-origin: center; animation: ping 2.2s ease-out 2s infinite; }
@keyframes vizDraw { from { stroke-dashoffset: var(--da, 1); } }
@keyframes vizFade { from { opacity: 0; } }
@keyframes barUp { from { transform: scaleY(0); } }
@keyframes ping { from { transform: scale(1); opacity: .9; } 70%, to { transform: scale(3.2); opacity: 0; } }

/* ---- The share sheet */
.sx-sheet {
  position: absolute; z-index: 6; left: 50%; bottom: 18px; width: min(440px, calc(100% - 24px)); padding: 16px 16px 20px; border-radius: 34px;
  translate: -50% calc(100% + 60px); transition: translate .65s var(--ease-spring);
}
.sx.sheet-on .sx-sheet { translate: -50% 0; }
.sh-head { display: flex; align-items: center; gap: 12px; padding: 0 4px 14px; border-bottom: 1px solid var(--sep); }
.sh-thumb { position: relative; flex-shrink: 0; width: 46px; height: 58px; border-radius: 9px; overflow: hidden; display: grid; place-items: center; background: var(--fill-3); }
.sh-head > div { flex: 1; display: grid; line-height: 20px; }
.sh-head b { font-size: 15px; font-weight: 600; }
.sh-head small { font-size: 13px; color: var(--label-3); }
.sh-x { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--fill-3); color: var(--label-2); font-size: 15px; }
.sh-row { display: flex; justify-content: space-between; gap: 4px; padding-top: 16px; }
.sh-t { display: grid; justify-items: center; gap: 8px; width: 66px; font-size: 12px; line-height: 15px; text-align: center; color: var(--label-2); transition: transform .35s var(--ease-spring); }
.sh-t > span { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 27px; background: var(--fill-3); color: var(--label); }
.sh-t .ring-ic { background: conic-gradient(from 210deg, var(--yellow), var(--run), var(--fitness), var(--cycle), var(--walk), var(--yellow)); color: #fff; }
.sh-t.tap { transform: scale(.86); }
.sh-t.tap > span { box-shadow: 0 0 0 4px var(--card), 0 0 0 6px var(--pc); }
.sx-finger { position: absolute; left: 0; top: 0; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; opacity: 0; pointer-events: none; background: rgba(255,255,255,.6); box-shadow: 0 0 0 1.5px rgba(0,0,0,.12), 0 8px 22px rgba(0,0,0,.28); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }

/* ---- The show: a phone, the post landing in it, the reactions around it */
.sx-show { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .45s, visibility 0s .45s; }
.sx.showing .sx-show { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .3s; }
.sx-phone {
  --w: 270px; position: relative; width: var(--w); height: calc(var(--w) * 2.07); padding: 9px; border-radius: calc(var(--w) * .17);
  background: #0A0A0B; opacity: 0;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.14), 0 0 0 1px rgba(0,0,0,.35), 0 70px 110px -40px rgba(0,0,0,.6), 0 0 120px -20px color-mix(in srgb, var(--pc) 55%, transparent);
}
.sx-phone .isl { position: absolute; z-index: 9; top: 19px; left: 50%; width: 82px; height: 24px; margin-left: -41px; border-radius: 20px; background: #000; }
.sx-screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: calc(var(--w) * .17 - 9px); background: #000; color: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.shot { position: relative; }
.shot .poster { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; transition: none; box-shadow: none; }
.shot .poster.sticker { box-shadow: 0 0 0 6px #fff, 0 20px 30px -12px rgba(0,0,0,.5); }
.flyer { position: absolute !important; z-index: 7; left: 0; top: 0; margin: 0; transform-origin: 0 0; pointer-events: none; transition: none !important; }

/* Story */
.ss-bg { position: absolute; inset: 0; background: color-mix(in srgb, var(--pc) 70%, #000); }
.ss-bg.dark { background: #121214; }
.ss-bg.light { background: #E9E9EE; }
.ss-bg:not(.scene)::after { content: ""; position: absolute; inset: 0; background: radial-gradient(90% 50% at 50% 50%, rgba(255,255,255,.18), transparent 70%); }
.ss-media { position: absolute; left: 0; right: 0; top: 50%; translate: 0 -50%; display: grid; justify-items: center; }
.ss-media.free { inset: 0; translate: none; display: block; }
.ss-media.free .shot { position: absolute; }
.ss-media .shot > .poster { border-radius: 26px; }
.ss-top { position: absolute; z-index: 2; left: 0; right: 0; top: 0; padding: 50px 12px 18px; background: linear-gradient(rgba(0,0,0,.4), transparent); }
.ss-bars { display: flex; gap: 3px; }
.ss-bars i { flex: 1; height: 2.5px; border-radius: 2px; background: rgba(255,255,255,.35); overflow: hidden; }
.ss-bars i:not(:last-child) { background: rgba(255,255,255,.9); }
.ss-bars b { display: block; height: 100%; background: #fff; transform-origin: 0 0; transform: scaleX(0); }
.sx.landed .ss-bars b { transition: transform 6.5s linear; transform: scaleX(1); }
.ss-who { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; }
.ss-who b { font-weight: 600; }
.ss-who small { color: rgba(255,255,255,.7); font-size: 12px; }
.sx-av { position: relative; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: linear-gradient(135deg, var(--pc), color-mix(in srgb, var(--pc), #000 30%)); color: #fff; font-size: 16px; box-shadow: 0 0 0 1.5px #000, 0 0 0 3px var(--pc); }
.ss-bot { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 30px 14px 16px; font-size: 22px; background: linear-gradient(transparent, rgba(0,0,0,.45)); }
.ss-reply { flex: 1; height: 38px; display: flex; align-items: center; padding: 0 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.55); font-size: 13px; color: rgba(255,255,255,.85); }
.ss-bot .lk, .fd-act .lk { transition: color .3s, transform .4s var(--ease-spring); }
.ss-bot .lk.on, .fd-act .lk.on { color: #FF383C; transform: scale(1.18); }
.ss-views { position: absolute; z-index: 2; left: 14px; bottom: 66px; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(0,0,0,.35); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ss-views .ic { font-size: 15px; }

/* Post */
.fd { position: absolute; inset: 0; display: flex; flex-direction: column; padding-top: 50px; background: #000; }
.fd-head { display: flex; align-items: center; gap: 9px; padding: 0 12px 10px; font-size: 13px; line-height: 16px; }
.fd-head > span:nth-child(2) { flex: 1; display: grid; }
.fd-head small { color: rgba(255,255,255,.6); font-size: 11.5px; }
.fd-head .ic { font-size: 20px; }
.fd-media { position: relative; flex-shrink: 0; }
.fd-media .shot > .poster { border-radius: 0; }
.fd-burst { position: absolute; left: 50%; top: 50%; z-index: 4; font-size: 96px; color: #fff; margin: -48px 0 0 -48px; width: 96px; height: 96px; display: grid; place-items: center; opacity: 0; pointer-events: none; filter: drop-shadow(0 8px 20px rgba(0,0,0,.35)); }
.fd-act { display: flex; gap: 16px; padding: 12px 12px 6px; font-size: 24px; }
.fd-act > :last-child { margin-left: auto; }
.fd-likes { padding: 0 12px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fd-cap { padding: 4px 12px 0; font-size: 13px; line-height: 17px; color: rgba(255,255,255,.92); }
.fd-cmts { display: grid; gap: 3px; padding: 6px 12px 0; font-size: 12.5px; line-height: 16px; overflow: hidden; }
.fd-cmts p { animation: fadeUp .5s var(--ease-out) backwards; }
.fd-cap b, .fd-cmts b { font-weight: 600; margin-right: 5px; }

/* Friends' reactions */
.sx-buzz { position: absolute; inset: 0; pointer-events: none; }
.bz {
  position: absolute; display: flex; align-items: center; gap: 10px; width: max-content; max-width: 260px; padding: 10px 16px 10px 10px; border-radius: 22px;
  background: var(--glass-medium); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); box-shadow: var(--glass-medium-shadow);
  font-size: 14px; line-height: 18px; color: var(--label);
  animation: bob 5s ease-in-out infinite; animation-delay: var(--bd, 0s);
  transition: transform .55s var(--ease-spring), opacity .45s;
}
.bz .sx-av { width: 34px; height: 34px; font-size: 14px; font-weight: 600; background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: none; }
.bz b { display: block; font-weight: 600; }
.bz.hot { box-shadow: 0 0 0 2px var(--pc), 0 18px 40px -12px color-mix(in srgb, var(--pc) 60%, transparent), var(--glass-medium-shadow); }
@keyframes bob { 50% { translate: 0 -7px; } }
.fl { position: absolute; z-index: 8; font-size: 26px; line-height: 1; pointer-events: none; animation: flUp var(--t, 2.6s) cubic-bezier(.25,.6,.35,1) forwards; }
@keyframes flUp {
  0% { opacity: 0; transform: translate(0, 0) scale(.3); }
  14% { opacity: 1; transform: translate(calc(var(--dx) * .15), -36px) scale(1.15); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.85) rotate(var(--rot)); }
}
.sx-end { position: absolute; z-index: 9; left: 50%; bottom: 20px; display: flex; gap: 10px; translate: -50% 20px; opacity: 0; pointer-events: none; transition: opacity .5s, translate .6s var(--ease-spring); }
.sx.ended .sx-end { opacity: 1; translate: -50% 0; pointer-events: auto; }
.sx-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

@media (max-width: 980px) {
  .sx { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; gap: 14px; min-height: 0; padding: 14px; }
  .sx-rail { display: flex; gap: 4px; justify-self: center; max-width: 100%; padding: 5px; border-radius: 24px; overflow-x: auto; }
  .sx-rail h4 { display: none; }
  .sx-tabs { order: 0; } .sx-center { order: 1; min-height: 560px; } .sx-fmts { order: 2; } .sx-dock { order: 3; }
  .sx-opt { width: auto; flex-shrink: 0; height: 46px; gap: 8px; padding: 0 14px 0 5px; border-radius: 19px; font-size: 15px; }
  .sx-opt .tile, .glyph { width: 36px; height: 36px; border-radius: 50%; }
  .sx-opt small { display: none; }
  .sx.sharing .sx-tabs, .sx.sharing .sx-fmts { transform: translateY(-20px); }
}
@media (max-width: 680px) {
  .sx { margin-inline: calc(var(--gutter) * -1 + 8px); border-radius: 30px; }
  .sx-center { min-height: 500px; }
  /* Only the picked tab and format keep their names */
  .sx-opt:not([aria-pressed="true"]) > span:last-child { display: none; }
  .sx-opt:not([aria-pressed="true"]) { padding-right: 5px; }
  .sx-dock { flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; padding: 12px; border-radius: 28px; }
  .sx-dim { width: 100%; min-width: 0; text-align: center; }
  .sx-looks { flex: 1 1 100%; }
  .sx-looks button { padding: 0 8px; }
  .sx-go { flex: 1 1 100%; height: 50px; }
  .sx-phone { --w: 232px; }
  .bz { max-width: none; }
  .sx-end { flex-direction: column; width: max-content; }
}

/* ==========================================================================
   Pro
   ========================================================================== */
.pro { position: relative; border-radius: var(--r-xl); overflow: hidden; padding: clamp(28px, 5vw, 72px); background: #000; color: #fff; isolation: isolate; }
html.dark .pro { background: #0b0b0c; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
/* Neutral rings like the app's Pro sheet: the regular ring component in one tone, fading toward the center. They sit
   centered on the comparison so it is framed by them, and close with the same animation as every other ring. */
  --fade: linear-gradient(to right, transparent 4%, #000 24%); -webkit-mask-image: var(--fade); mask-image: var(--fade); }
.pro .pro-grid { position: relative; }
.pro-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.pro .pro-pill { background: #fff; color: #000; height: 28px; padding: 0 13px 0 11px; font-size: 13px; gap: 6px; }
.pro .pro-pill .ic { font-size: 15px; }
.pro .h2 { color: #fff; margin-top: 20px; }
.pro .lead { color: rgba(255,255,255,.66); margin-top: 20px; max-width: 440px; }
.pro .seg { margin-top: 32px; background: rgba(255,255,255,.12); }
.pro .seg button { color: rgba(255,255,255,.6); }
.pro .seg button[aria-pressed="true"] { color: #fff; }
.pro .seg .seg-thumb, html.dark .pro .seg .seg-thumb { background: rgba(255,255,255,.2); box-shadow: none; }
.price { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 28px; }
.price b { font-size: clamp(52px, 6.4vw, 80px); line-height: 1; font-weight: 600; letter-spacing: -.045em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price .per { font-size: 20px; color: rgba(255,255,255,.6); align-self: flex-end; padding-bottom: 6px; }
.save { display: inline-flex; height: 26px; align-items: center; padding: 0 10px; border-radius: 999px; background: #fff; color: #000; font-size: 13px; font-weight: 600; white-space: nowrap; transition: opacity .3s, transform .4s var(--ease-spring); }
.save.off { opacity: 0; transform: scale(.6); }
.price-sub { margin-top: 10px; color: rgba(255,255,255,.66); font-size: 15px; min-height: 22px; }
.pro .btn-prominent { background: #fff; color: #000; box-shadow: none; }
.pro-cta { margin-top: 28px; }
.pro-cta .btn { height: 54px; padding: 0 28px; }
.pro-notes { display: grid; gap: 10px; margin-top: 26px; font-size: 14px; color: rgba(255,255,255,.6); line-height: 20px; max-width: 460px; }
.pro-notes div { display: flex; gap: 10px; }
.pro-notes .ic { font-size: 18px; color: #fff; flex-shrink: 0; margin-top: 1px; }
/* Free vs Pro, as in the app's Pro sheet: a folder-tab card, the Pro column one highlighted strip with the chrome shine as
   its border, row separators stopping at it. The two right columns have fixed widths, the shapes behind follow them. */
.cmp { --cf: 76px; --cp: 76px; --ct: calc(var(--cf) + var(--cp)); position: relative; margin-top: 18px; padding: 6px 10px 6px 16px; }
.cmp::before { /* the Pro column's border: blue edge, white core, amber edge */
  content: ""; position: absolute; right: 10px; bottom: 10px; top: -8px; width: var(--cp); border-radius: 14px;
  background: linear-gradient(135deg, #fff, #3ba7e0, #fff, #e5822a, #fff);
  box-shadow: 0 0 24px rgba(59, 167, 224, .2), 0 0 24px rgba(229, 130, 42, .2);
}
.cmp::after { /* its fill: opaque, so the gradient only shows as a ring */
  content: ""; position: absolute; top: -6px; right: 12px; bottom: 12px; width: calc(var(--cp) - 4px); border-radius: 12px;
  background: #2c2c2e; box-shadow: inset 0 0 0 999px rgba(118, 118, 128, .24);
}
.cmp-bg { position: absolute; z-index: -1; top: 42px; right: 0; bottom: 0; left: 0; background: #2c2c2e; border-radius: 20px 12px 20px 20px; }
.cmp-bg::before { /* the tab above the Pro column */
  content: ""; position: absolute; top: -38px; right: 10px; width: var(--ct); height: 38px; background: #2c2c2e; border-radius: 14px 14px 0 0;
}
.cmp-bg::after { /* the concave notch where tab and body meet */
  content: ""; position: absolute; top: -14px; right: calc(10px + var(--ct)); width: 14px; height: 14px; transform: rotate(180deg);
  background: radial-gradient(circle at bottom right, transparent 14px, #2c2c2e 14px);
}
.cmp table { position: relative; z-index: 1; width: 100%; border-collapse: collapse; }
.cmp th, .cmp td { padding: 0; }
.cmp thead th { width: var(--cf); height: 36px; text-align: center; font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.cmp thead th:first-child { width: auto; text-align: left; }
.cmp thead th.is-pro { width: var(--cp); color: #fff; }
.cmp-title { font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.cmp tbody th { padding: 12px 12px 12px 0; text-align: left; font-size: 15px; line-height: 20px; font-weight: 400; color: #fff; }
.cmp tbody td { text-align: center; vertical-align: middle; }
.cmp tbody i { font-size: 18px; color: rgba(255,255,255,.6); -webkit-text-stroke: .5px currentColor; }
.cmp tbody i.no { color: rgba(255,255,255,.28); }
.cmp tbody td.is-pro i { color: #fff; -webkit-text-stroke: .9px currentColor; }
.cmp tbody tr + tr th, .cmp tbody tr + tr td:not(.is-pro) { border-top: .5px solid rgba(255,255,255,.14); }
@media (max-width: 480px) { .cmp { --cf: 64px; --cp: 56px; padding-left: 14px; } .cmp tbody th { font-size: 14px; } }

/* Soon */
.soon { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.soon .card.wide { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); grid-template-rows: 1fr auto 1fr; grid-template-areas: "vis tag" "vis h" "vis p"; column-gap: 28px; align-content: center; }
.soon .wide .droid { grid-area: vis; } .soon .wide .tag2 { grid-area: tag; align-self: end; } .soon .wide h3 { grid-area: h; } .soon .wide p { grid-area: p; align-self: start; max-width: 520px; }
@media (max-width: 680px) { .soon .card.wide { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "tag" "vis" "h" "p"; } }
.soon .card { padding: 26px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; }
.soon .tag2 { justify-self: start; display: inline-flex; align-items: center; height: 24px; line-height: 1; font-size: 12px; font-weight: 600; padding: 0 10px; border-radius: 999px; background: var(--fill-3); color: var(--label-2); letter-spacing: .03em; }
.soon h3 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 27px; }
.soon p { font-size: 15px; line-height: 22px; color: var(--label-2); }
.widget { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.widget > div { aspect-ratio: 1; border-radius: 22px; background: var(--card-2); padding: 12px; display: grid; align-content: space-between; }
.widget .rings { --size: 58px; --wr: .14; }
.widget b { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.widget small { font-size: 11px; color: var(--label-3); display: block; }
.widget .tile { transform-origin: 50% 90%; }
.widget b { font-variant-numeric: tabular-nums; }
/* Widgets drop onto the home screen one after the other, then idle like live widgets: a slow bob, a flickering streak */
@keyframes widgetIn { from { opacity: 0; transform: translateY(24px) scale(.82); } }
@keyframes flick { 25% { transform: scale(1.04, .97) rotate(-2deg); } 50% { transform: scale(.97, 1.04) rotate(1.5deg); } 75% { transform: scale(1.02, .99) rotate(-1deg); } }
.in .widget > div { animation: widgetIn .9s var(--ease-spring) backwards, floatY 5s ease-in-out infinite; animation-delay: .25s, 1.4s; }
.in .widget > div + div { animation-delay: .4s, 2.2s; }
.in .widget .tile { animation: popIn .7s var(--ease-spring) .7s backwards, flick 2.4s ease-in-out 1.6s infinite; }
.in .widget small { animation: fadeUp .7s var(--ease-out) .8s backwards; }

/* Soon: Apple Health. Data rides two lanes between Health's heart and the app's rings: reads in, writes out */
.hk { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 18px 14px; border-radius: 22px; background: var(--card-2); min-height: 150px; }
.hk-heart { position: relative; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-size: 30px; background: linear-gradient(160deg, #FF6482, #FF2D55); box-shadow: 0 6px 18px -6px rgba(255, 45, 85, .6); }
.hk-heart::before { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid #FF2D55; opacity: 0; }
.hk .rings { --size: 52px; --wr: .14; }
.hk-lanes { display: grid; gap: 10px; }
.hk-lane { position: relative; height: 26px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent); mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent); }
.hk-lane::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: repeating-linear-gradient(90deg, var(--label-3) 0 4px, transparent 4px 10px); opacity: .5; }
.hk-lane i { position: absolute; top: 0; left: -26px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; color: var(--c); background: color-mix(in srgb, var(--c) 26%, var(--card)); }
.hk-lane i svg { width: 15px; height: 15px; }
.hk-lane.to-health i { left: 100%; }
@keyframes laneR { from { left: -26px; } to { left: 100%; } }
@keyframes laneL { from { left: 100%; } to { left: -26px; } }
@keyframes dashR { to { background-position: 10px 0; } }
@keyframes dashL { to { background-position: -10px 0; } }
@keyframes beat { 0%, 45%, 100% { transform: scale(1); } 12% { transform: scale(1.12); } 24% { transform: scale(.98); } 34% { transform: scale(1.07); } }
@keyframes ripple { from { opacity: .8; transform: scale(1); } to { opacity: 0; transform: scale(1.6); } }
.in .hk-heart { animation: popIn .8s var(--ease-spring) .2s backwards, beat 1.6s ease-in-out 1s infinite; }
.in .hk-heart::before { animation: ripple 1.6s ease-out 1s infinite; }
.in .hk-lane.to-app::before { animation: dashR .6s linear infinite; }
.in .hk-lane.to-health::before { animation: dashL .6s linear infinite; }
.in .hk-lane.to-app i { animation: laneR 3.6s linear infinite; animation-delay: calc(var(--k) * 1.2s + .4s); }
.in .hk-lane.to-health i { animation: laneL 3.6s linear infinite; animation-delay: calc(var(--k) * 1.2s + 1s); }

/* Soon: coach. The coach's plan ticks off set by set while the shared bar fills, then starts over */
.coach { display: grid; gap: 10px; padding: 14px; border-radius: 22px; background: var(--card-2); min-height: 150px; }
.coach-top { display: flex; align-items: center; gap: 10px; }
.coach-top b { display: block; font-size: 14px; line-height: 18px; font-weight: 600; }
.coach-top small { display: block; font-size: 11px; line-height: 14px; color: var(--label-3); }
.avs { display: flex; }
.av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; color: #fff; background: var(--c); box-shadow: 0 0 0 2px var(--card-2); }
.av + .av { margin-left: -9px; }
.live { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--diet); }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.coach-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.coach-list li { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 20px; }
.coach-list em { margin-left: auto; font-style: normal; font-variant-numeric: tabular-nums; color: var(--label-3); }
.ck { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; color: #fff; box-shadow: inset 0 0 0 1.5px var(--label-3); }
.ck .ic { transform: scale(0); }
.coach-bar { height: 6px; border-radius: 3px; background: var(--fill-3); overflow: hidden; }
.coach-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--walk), var(--run)); transform-origin: 0 50%; transform: scaleX(0); }
@keyframes tick { 0%, 10%, 66%, 100% { background-color: transparent; box-shadow: inset 0 0 0 1.5px var(--label-3); } 14%, 62% { background-color: var(--diet); box-shadow: inset 0 0 0 0 transparent; } }
@keyframes tickIc { 0%, 11%, 64%, 100% { transform: scale(0); } 16%, 60% { transform: scale(1); } }
@keyframes tickTx { 0%, 10%, 66%, 100% { color: var(--label); } 14%, 62% { color: var(--label-3); } }
@keyframes coachBar { 0%, 10% { transform: scaleX(0); } 14%, 25% { transform: scaleX(.3333); } 29%, 40% { transform: scaleX(.6667); } 44%, 58% { transform: scaleX(1); } 62%, 73% { transform: scaleX(.6667); } 77%, 88% { transform: scaleX(.3333); } 92%, 100% { transform: scaleX(0); } }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--diet) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 6px transparent; } }
.in .avs .av { animation: popIn .7s var(--ease-spring) backwards; animation-delay: .25s; }
.in .avs .av + .av { animation-delay: .4s; }
.in .live::before { animation: livePulse 1.8s ease-out infinite; }
.in .coach-list li { animation: stagIn .7s var(--ease-out) backwards, tickTx 6s ease 1.2s infinite; animation-delay: calc(var(--k) * 90ms + .35s), calc(var(--k) * .9s + 1.2s); }
.in .coach-list .ck { animation: tick 6s ease calc(var(--k) * .9s + 1.2s) infinite; }
.in .coach-list .ck .ic { animation: tickIc 6s var(--ease-spring) calc(var(--k) * .9s + 1.2s) infinite; }
.in .coach-bar i { animation: coachBar 6s var(--ease-out) 1.2s infinite; }
/* Soon: Android. The bot peeks up, blinks and wiggles its antennas over a build bar that keeps running */
.droid { --droid: #3DDC84; display: grid; place-items: center; align-content: center; gap: 12px; padding: 18px 14px; border-radius: 22px; background: var(--card-2); min-height: 150px; overflow: hidden; }
.droid small { font-size: 11px; font-weight: 600; letter-spacing: .03em; color: var(--label-3); }
.bot { position: relative; width: 72px; height: 36px; border-radius: 36px 36px 4px 4px; background: var(--droid); margin-top: 14px; transform-origin: 50% 100%; }
.bot .ant { position: absolute; top: -12px; left: 18px; width: 3px; height: 16px; border-radius: 2px; background: var(--droid); transform: rotate(-30deg); transform-origin: 50% 100%; }
.bot .ant.r { left: auto; right: 18px; transform: rotate(30deg); }
.bot .eye { position: absolute; top: 17px; left: 20px; width: 7px; height: 7px; border-radius: 50%; background: var(--card-2); }
.bot .eye.r { left: auto; right: 20px; }
.droid-bar { position: relative; width: min(140px, 70%); height: 6px; border-radius: 3px; background: var(--fill-3); overflow: hidden; }
.droid-bar i { position: absolute; top: 0; bottom: 0; left: 0; width: 40%; border-radius: inherit; background: var(--droid); transform: translateX(-100%); }
@keyframes peek { from { transform: translateY(46px); } }
@keyframes botBob { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-3px) rotate(-3deg); } 75% { transform: translateY(-3px) rotate(3deg); } }
@keyframes eyeBlink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes antL { 0%, 70%, 100% { transform: rotate(-30deg); } 78% { transform: rotate(-44deg); } 86% { transform: rotate(-24deg); } }
@keyframes antR { 0%, 70%, 100% { transform: rotate(30deg); } 78% { transform: rotate(44deg); } 86% { transform: rotate(24deg); } }
@keyframes build { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.in .bot { animation: peek .9s var(--ease-spring) .35s backwards, botBob 3.2s ease-in-out 1.3s infinite; }
.in .bot .eye { animation: eyeBlink 3.6s ease-in-out 1.6s infinite; }
.in .bot .ant { animation: antL 2.8s ease-in-out 1.2s infinite; }
.in .bot .ant.r { animation-name: antR; }
.in .droid-bar i { animation: build 1.8s cubic-bezier(.65, 0, .35, 1) .8s infinite; }
@media (prefers-reduced-motion: reduce) {
  .droid-bar i { transform: none; left: 30%; }
  .hk-lane { -webkit-mask-image: none; mask-image: none; display: flex; justify-content: space-evenly; }
  .hk-lane i, .in .hk-lane i { position: relative; left: auto; animation: none !important; }
  .in .coach-list li { animation: none !important; }
  .in .coach-list li:not(:last-child) { color: var(--label-3); }
  .in .coach-list li:not(:last-child) .ck { animation: none !important; background: var(--diet); box-shadow: none; }
  .in .coach-list li:not(:last-child) .ck .ic { animation: none !important; transform: none; }
  .in .coach-bar i { animation: none !important; transform: scaleX(.6667); }
}

/* FAQ */
.faq { max-width: 860px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--card); border-radius: 22px; box-shadow: var(--shadow-card); overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 22px; font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm { width: 30px; height: 30px; border-radius: 50%; background: var(--fill-3); display: grid; place-items: center; font-size: 16px; flex-shrink: 0; transition: transform .45s var(--ease-spring); }
.faq details[open] summary .pm { transform: rotate(45deg); }
.faq .ans { padding: 0 22px 22px; color: var(--label-2); font-size: 16px; line-height: 25px; }
.faq details[open] .ans { animation: fadeIn .5s var(--ease-out); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-6px); } }

/* Final CTA */
.final { position: relative; text-align: center; padding: clamp(100px, 14vw, 180px) 0 clamp(80px, 10vw, 120px); overflow: hidden; }
.final .rings { --size: min(360px, 78vw); --wr: .055; }
.final .h1 { margin-top: 40px; font-size: clamp(44px, 7vw, 92px); }
.final .lead { margin: 22px auto 0; max-width: 560px; }
.final .hero-cta { justify-content: center; }

footer { border-top: 1px solid var(--sep); padding: 48px 0 calc(48px + env(safe-area-inset-bottom)); }
.foot { display: grid; justify-items: center; gap: 18px; text-align: center; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; font-size: 14px; color: var(--label-2); }
.foot-links a:hover { color: var(--label); }
.foot small { display: block; font-size: 13px; color: var(--label-3); max-width: 480px; line-height: 19px; }

/* ==========================================================================
   Motion: what plays as each part comes into view (on top of .rv)
   ========================================================================== */
@keyframes stagIn { from { opacity: 0; transform: translateY(18px) scale(.96); } }
@keyframes popIn { from { opacity: 0; transform: scale(.3) rotate(-24deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } }
@keyframes growW { from { width: 0; } }
@keyframes growH { from { height: 0; } }
@keyframes navIn { from { opacity: 0; transform: translate(-50%, -110%); } }
@keyframes shine { from { transform: translateX(-120%) skewX(-18deg); } to { transform: translateX(220%) skewX(-18deg); } }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--fitness) 55%, transparent); } 80%, 100% { box-shadow: 0 0 0 16px transparent; } }
@keyframes floatY { 50% { transform: translateY(-10px); } }

.nav { animation: navIn 1s var(--ease-out) .15s backwards; }

/* Headings come up word by word from behind a line */
.w { display: inline-block; overflow: hidden; vertical-align: bottom; padding: .1em .02em .16em; margin: -.1em -.02em -.16em; }
.w > span { display: inline-block; transform: translateY(110%); transition: transform 1.05s var(--ease-out); transition-delay: calc(var(--wi) * 55ms + .05s); }
.in .w > span, .w.in > span { transform: none; }
.sec-head.in .eyebrow .tile { animation: popIn .8s var(--ease-spring) .05s backwards; }
.sec-head.in .lead { animation: fadeUp .9s var(--ease-out) .35s backwards; }

/* Children of a [data-stagger] list follow one another (index in --i, step in --step) */
.in [data-stagger] > *, .in[data-stagger] > * { animation: stagIn .8s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * var(--step, 70ms) + var(--sd, .2s)); }
[data-stagger] > * .ring { transition-delay: calc(var(--i, 0) * var(--step, 70ms) + .45s); }

/* Module cards fold up in 3D */
.mods .mod.rv:not(.in) { transform: perspective(1100px) rotateX(22deg) translateY(70px) scale(.95); transform-origin: 50% 100%; }

/* Bars and columns grow in */
.rv.in .bar .fill { animation: growW 1.2s var(--ease-out) .35s backwards; }
.rv.in .wkp .bars i { animation: growH .9s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 90ms + .5s); }
.rv.in .wkp .bars i:nth-child(2) { animation-delay: calc(var(--i, 0) * 90ms + .56s); } .rv.in .wkp .bars i:nth-child(3) { animation-delay: calc(var(--i, 0) * 90ms + .62s); }
.rv.in .wkp .bars i:nth-child(4) { animation-delay: calc(var(--i, 0) * 90ms + .68s); } .rv.in .wkp .bars i:nth-child(n+5) { animation-delay: calc(var(--i, 0) * 90ms + .74s); }

/* The week grid fills column by column */

/* Earned badges catch the light once */

/* Pro: the checks pop row by row */


/* Final rings sit on a slow float */
.final .rings.on { animation: floatY 7s ease-in-out 2s infinite; }

/* ==========================================================================
   Info button
   ========================================================================== */
.info-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; margin: -4px; border-radius: 50%; color: var(--label-3); transition: background-color .2s, color .2s; }
.info-btn:hover { background: var(--fill-4); color: var(--label); }

/* Sheets (<dialog>): centered card on wide screens, bottom sheet on phones */
.dlg {
  width: min(600px, calc(100% - 32px)); max-width: none; max-height: min(86vh, 920px);
  margin: auto; padding: 0; border: 0; border-radius: 32px;
  background: var(--bg); color: var(--label);
  overflow: auto; overscroll-behavior: contain;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45);
}
.dlg[open] { animation: dlgIn .5s var(--ease-out); }
.dlg::backdrop { background: rgba(0, 0, 0, .38); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dlg[open]::backdrop { animation: fadeIn .35s ease; }
html.dark .dlg { color-scheme: dark; background: #111113; box-shadow: 0 0 0 .5px rgba(255, 255, 255, .1), 0 30px 80px -20px #000; }
html:has(.dlg[open]) { overflow: hidden; }
.dlg-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 10px 24px; background: inherit; }
.dlg-bar h3 { font-size: 22px; line-height: 27px; font-weight: 600; letter-spacing: -.02em; }
.dlg-bar .btn-round { width: 40px; height: 40px; }
.dlg-body { display: grid; gap: 14px; padding: 4px 16px 20px; }
.dlg .sheet-bar { position: sticky; top: 0; z-index: 2; background: inherit; padding-bottom: 10px; }
.dlg .sheet { border-radius: 0; background: inherit; }
html.dark .dlg .card { background: var(--card); }
@keyframes dlgIn { from { opacity: 0; transform: translateY(30px) scale(.97); } }
@keyframes dlgUp { from { transform: translateY(100%); } }
@keyframes fadeIn { from { opacity: 0; } }
@media (max-width: 680px) {
  .dlg { width: 100%; max-height: 92vh; margin: auto 0 0; border-radius: 28px 28px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .dlg[open] { animation: dlgUp .45s var(--ease-out); }
  .dlg-body { padding-inline: 12px; }
}

/* Toast */
.toast { position: fixed; z-index: 70; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 140%); display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); padding: 12px 18px 12px 12px; border-radius: 22px; font-size: 15px; line-height: 20px; transition: transform .55s var(--ease-spring); }
.toast.show { transform: translate(-50%, 0); }
.toast .tile { width: 30px; height: 30px; }
#confetti { position: fixed; inset: 0; z-index: 80; pointer-events: none; width: 100%; height: 100%; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .nav-links a { padding: 0 9px; font-size: 14px; }
}
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav .menu-btn { display: inline-flex; }
  .nav-actions { margin-left: auto; }
  .pro-grid, .mods-wrap, .hist { grid-template-columns: minmax(0, 1fr); }
  .demo { width: min(440px, 100%); justify-self: center; }
  .mods, .soon { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hist-card { width: min(560px, 100%); }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .soon { grid-template-columns: minmax(0, 1fr); }
  .sum-line { min-height: calc(3 * 1.32em); }
  .mods { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .mod { gap: 14px; padding: 12px; }
  .mod .tile { width: 36px; height: 36px; border-radius: 11px; font-size: 21px; }
  .mod-tick { width: 22px; height: 22px; }
  .mod-tick .ic { font-size: 13px; }
  .mod-body b { font-size: 15px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; }
  .mod-body small { display: none; }
  .plans { gap: 8px; }
  .plan { padding: 12px 14px; }
  .slot { padding: 0 8px; font-size: 14px; gap: 6px; }
  .slot.full { padding: 0 8px 0 6px; }
  .slot.full > .ic { display: none; }
  .slot.full .tile { width: 26px; height: 26px; font-size: 16px; }
  .demo { min-height: 540px; border-radius: 40px; padding-top: 22px; }
  .phone { --pw: 300px; --ph: 624px; --s: .7128; border-radius: 52px; }
  .phone-screen { border-radius: 42px; }
  .hero-ripple { --rd: 1160px; }
  .hero-stage { height: 580px; --fa: calc(302px + var(--ty)); --fb: calc(420px + var(--ty)); --sx: 66%; --ss: .84; --sdrop: 48px; }
  .weeks { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
  .phone { --pw: 280px; --ph: 582px; --s: .6615; }
  .hero-ripple { --rd: 1080px; }
  .hero-stage { height: 540px; --fa: calc(274px + var(--ty)); --fb: calc(380px + var(--ty)); --ty: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .w > span { transform: none; }
}

/* Waitlist sheet */
.dlg.dlg-sm { width: min(440px, calc(100% - 32px)); }
@media (max-width: 680px) { .dlg.dlg-sm { width: 100%; } }
.wl-form .sheet-head .rings { width: 88px; height: 88px; }
.wl-row { display: block; border-radius: 18px; padding: 0; }
.wl-row input[type="email"] { width: 100%; height: 54px; padding: 0 18px; border: 0; background: transparent; color: var(--label); font: inherit; font-size: 17px; text-align: center; outline: none; border-radius: 18px; }
.wl-row:focus-within { box-shadow: 0 0 0 2px var(--label); }
.wl-row input::placeholder { color: var(--label-3); }
.wl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wl-form .btn, .wl-done .btn { height: 54px; }
.wl-note { margin: 0; text-align: center; font-size: 14px; color: var(--label-3); min-height: 20px; }
.wl-note.good { color: var(--label); }
.wl-note.bad { color: #ff453a; }
.wl-check { display: grid; place-items: center; width: 88px; height: 76px; font-size: 88px; line-height: 1; color: var(--success); }
.wl-check .ic { font-size: inherit; stroke-width: 2.5; }
.wl-form[hidden], .wl-done[hidden] { display: none; }

/* Legal pages */
.legal { max-width: 720px; margin: 0 auto; padding: 120px 20px 80px; }
.legal-top { position: fixed; top: 0; left: 0; right: 0; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; z-index: 5; }
.legal h1 { font-size: clamp(34px, 6vw, 52px); letter-spacing: -.035em; margin: 0 0 6px; }
.legal .upd { color: var(--label-2, rgba(128,128,128,.9)); margin: 0 0 36px; }
.legal h2 { font-size: 22px; letter-spacing: -.02em; margin: 34px 0 8px; }
.legal p { line-height: 1.6; margin: 0 0 12px; }
.legal nav.alt { display: flex; gap: 18px; margin: 40px 0 0; padding-top: 20px; border-top: 1px solid var(--sep); font-size: 15px; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }
