/* ===================== Aku Salud · Sistema visual ===================== */
:root {
  --bg: #f5f7f6;
  --bg-2: #eef3f1;
  --surface: #ffffff;
  --surface-2: #f2f6f4;
  --text: #0c1916;
  --muted: #5a6b67;
  --faint: #8a9a96;
  --border: #e2e9e6;
  --primary: #0d9488;
  --primary-strong: #0f766e;
  --primary-ink: #ffffff;
  --primary-soft: rgba(13, 148, 136, .1);
  --lime: #65a30d;
  --good: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --good-soft: rgba(22, 163, 74, .12);
  --warn-soft: rgba(217, 119, 6, .12);
  --bad-soft: rgba(220, 38, 38, .1);
  --fig-near: #0f2a25;
  --fig-far: #9fb3ae;
  --shadow-sm: 0 1px 2px rgba(12, 25, 22, .06), 0 1px 1px rgba(12, 25, 22, .04);
  --shadow: 0 10px 30px -12px rgba(12, 25, 22, .18), 0 2px 6px rgba(12, 25, 22, .05);
  --shadow-lg: 0 30px 60px -20px rgba(12, 25, 22, .35);
  --radius: 20px;
  --radius-sm: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a100f;
    --bg-2: #0e1615;
    --surface: #111a18;
    --surface-2: #17221f;
    --text: #e9f2ef;
    --muted: #93a6a1;
    --faint: #64776f;
    --border: #22302c;
    --primary: #2dd4bf;
    --primary-strong: #5eead4;
    --primary-ink: #04201c;
    --primary-soft: rgba(45, 212, 191, .12);
    --lime: #bef264;
    --good: #4ade80;
    --warn: #fbbf24;
    --bad: #f87171;
    --good-soft: rgba(74, 222, 128, .12);
    --warn-soft: rgba(251, 191, 36, .12);
    --bad-soft: rgba(248, 113, 113, .12);
    --fig-near: #e9f2ef;
    --fig-far: #4b5d58;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 12px 32px -14px rgba(0, 0, 0, .7), 0 2px 6px rgba(0, 0, 0, .3);
    --shadow-lg: 0 30px 70px -20px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
html, body { margin: 0; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
}
img, video, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(1.75rem, 5.5vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.3rem, 3.6vw, 1.75rem); font-weight: 800; }
h3 { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
h3 [data-icon] { color: var(--primary); }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.num, .tab { font-variant-numeric: tabular-nums; }

/* Iconos */
[data-icon] { display: inline-flex; width: 1.15em; height: 1.15em; flex: none; }
[data-icon] svg { width: 100%; height: 100%; }

/* ===================== Barra superior ===================== */
.appbar {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
  padding-top: env(safe-area-inset-top, 0);
}
.appbar.scrolled { border-bottom-color: var(--border); }
.appbar-inner { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; font-weight: 600; font-size: 1.1rem; padding: 0; }
.brand b { color: var(--primary); font-weight: 800; }
.brand img { border-radius: 9px; }
.appbar-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 12px; font-weight: 600; font-size: .9rem; box-shadow: var(--shadow-sm);
}
.badge { min-width: 20px; height: 20px; border-radius: 999px; background: var(--primary); color: var(--primary-ink); font-size: .72rem; font-weight: 800; display: grid; place-items: center; padding: 0 6px; }
.badge.zero { background: var(--surface-2); color: var(--muted); }
body.in-camera .appbar { display: none; }

/* ===================== Pantallas ===================== */
main { min-height: calc(100dvh - 60px); }
.screen { display: none; max-width: 1120px; margin: 0 auto; padding: 8px 16px 48px; }
.screen.active { display: block; animation: screen-in .45s var(--ease) both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

/* ===================== Botones ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; border: 1px solid transparent; border-radius: 14px;
  padding: 11px 18px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .15s var(--ease), box-shadow .2s, background .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.lg { padding: 14px 22px; font-size: 1rem; border-radius: 16px; }
.btn.block { width: 100%; }
.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: var(--primary-ink);
  box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--primary) 70%, transparent);
}
.btn.primary:hover { box-shadow: 0 14px 30px -10px color-mix(in srgb, var(--primary) 80%, transparent); }
.btn.secondary { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn.secondary:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.btn.ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn.light { background: rgba(255, 255, 255, .95); color: #0c1916; }
.btn.danger-ghost { background: transparent; border-color: color-mix(in srgb, var(--bad) 35%, var(--border)); color: var(--bad); }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(10, 16, 15, .55); color: #fff; display: grid; place-items: center;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.icon-btn [data-icon] { width: 22px; height: 22px; }
.back {
  display: inline-flex; align-items: center; gap: 4px; background: none; border: 0;
  color: var(--muted); font-weight: 600; padding: 8px 0; cursor: pointer;
}
.back:hover { color: var(--text); }

/* ===================== Portada ===================== */
.hero {
  position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: center;
  padding: 28px 0 24px;
}
.hero-glow {
  position: absolute; inset: -80px -40px auto auto; width: 520px; height: 520px; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--primary) 26%, transparent), transparent);
  filter: blur(10px); z-index: -1;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700;
  color: var(--primary); background: var(--primary-soft); padding: 6px 12px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .06em;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 0 var(--primary); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 60%, transparent); } 80%, 100% { box-shadow: 0 0 0 8px transparent; } }
.hero h1 { margin: 16px 0 14px; }
.grad { background: linear-gradient(90deg, var(--primary), var(--lime)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(1rem, 2.4vw, 1.15rem); color: var(--muted); max-width: 54ch; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin: 24px 0 18px; }
.trust { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .86rem; color: var(--muted); }
.trust li { display: inline-flex; align-items: center; gap: 6px; }
.trust [data-icon] { color: var(--primary); }

.hero-visual { display: flex; justify-content: center; }
.phone {
  position: relative; width: min(300px, 78vw); aspect-ratio: 9 / 16; border-radius: 34px;
  background: #0a100f; padding: 8px; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .06) inset;
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.phone-video { width: 100%; height: 100%; object-fit: cover; border-radius: 27px; background: #e9ece8; }
.scanline {
  position: absolute; left: 8px; right: 8px; top: 8px; height: 22%; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(45, 212, 191, .10) 80%, rgba(45, 212, 191, .85) 99%, transparent);
  border-bottom: 2px solid rgba(94, 234, 212, .9);
  filter: drop-shadow(0 2px 6px rgba(45, 212, 191, .7));
  animation: scan 3.6s ease-in-out infinite;
}
@keyframes scan { 0% { transform: translateY(-10%); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(230%); opacity: 0; } }
.phone-hud { position: absolute; top: 20px; left: 20px; right: 20px; display: flex; gap: 6px; }
.ph-chip { background: rgba(10, 16, 15, .72); color: #fff; border-radius: 12px; padding: 6px 10px; display: flex; flex-direction: column; line-height: 1.1; backdrop-filter: blur(8px); }
.ph-chip small { font-size: .6rem; opacity: .7; text-transform: uppercase; letter-spacing: .06em; }
.ph-chip b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.float-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 12px; font-size: .82rem; font-weight: 700; box-shadow: var(--shadow);
  animation: chip-in .6s var(--ease) both, bob 5s ease-in-out infinite;
}
.float-chip [data-icon] { color: var(--good); }
.float-chip.warn [data-icon] { color: var(--warn); }
.float-chip.c1 { right: -28px; top: 34%; animation-delay: .3s, .3s; }
.float-chip.c2 { left: -36px; top: 56%; animation-delay: .6s, 1.2s; }
.float-chip.c3 { right: -20px; bottom: 12%; animation-delay: .9s, 2s; }
@keyframes chip-in { from { opacity: 0; transform: translateY(12px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 var(--good); animation: ping 1.8s infinite; flex: none; }

/* Progreso */
.progress-card { display: flex; align-items: center; gap: 16px; margin: 8px 0 8px; }
.progress-copy { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.progress-copy .muted { font-size: .88rem; }
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--lime)); transition: width .8s var(--ease); }
.ring {
  --v: 0; --c: var(--primary);
  width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--v) * 1%), var(--surface-2) 0);
  position: relative; font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums;
}
.ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.ring > * { position: relative; }

/* Bloques */
.block { margin-top: 44px; }
.block-head { margin-bottom: 16px; }
.kicker { display: block; color: var(--primary); font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }

.how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; counter-reset: how; }
.how li { counter-increment: how; position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.how li::after { content: counter(how); position: absolute; top: 14px; right: 16px; font-size: 2.2rem; font-weight: 800; color: var(--surface-2); line-height: 1; }
.how b { display: block; margin: 12px 0 4px; font-size: 1.02rem; }
.how p { color: var(--muted); font-size: .9rem; }
.how-ic, .goal-ic {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary);
}
.how-ic svg, .goal-ic svg { width: 22px; height: 22px; }

.goals { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.goal { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.goal b { display: block; margin-bottom: 3px; }
.goal p { color: var(--muted); font-size: .9rem; }

.profile { display: flex; gap: 12px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .82rem; font-weight: 600; color: var(--muted); flex: 1 1 120px; }
.field.grow { flex: 2 1 220px; }
.field input {
  font: inherit; font-size: 1rem; font-weight: 500; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text); width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }

/* Tarjetas de ejercicio */
.ex-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ex-card {
  position: relative; text-align: left; cursor: pointer; padding: 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
  animation: chip-in .5s var(--ease) both;
}
.ex-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); }
.ex-card:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.ex-media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.ex-media img, .ex-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .4s, transform .6s var(--ease); }
.ex-media video { opacity: 0; }
.ex-card.playing .ex-media video { opacity: 1; }
.ex-card:hover .ex-media img, .ex-card:hover .ex-media video { transform: scale(1.04); }
.ex-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .45)); }
.ex-fig {
  position: absolute; right: 10px; bottom: 10px; width: 64px; height: 64px; z-index: 2;
  background: rgba(255, 255, 255, .92); border-radius: 14px; padding: 4px; box-shadow: var(--shadow);
  --fig-near: #0f2a25; --fig-far: #9fb3ae;
}
.ex-fig .fig-arc, .ex-fig .fig-joint, .ex-fig .fig-pulse, .ex-fig .fig-floor { display: none; }
.ex-view { position: absolute; left: 10px; top: 10px; z-index: 2; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 700;
  padding: 4px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
.tag.glass { background: rgba(10, 16, 15, .6); color: #fff; border-color: transparent; backdrop-filter: blur(6px); }
.tag.primary { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.ex-body { padding: 14px 16px 16px; }
.ex-name { font-weight: 800; font-size: 1.08rem; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ex-meta { font-size: .84rem; color: var(--muted); margin-top: 2px; }
.ex-done {
  display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 800;
  padding: 3px 8px; border-radius: 999px;
}
.ex-done.good { background: var(--good-soft); color: var(--good); }
.ex-done.warn { background: var(--warn-soft); color: var(--warn); }
.ex-done.bad { background: var(--bad-soft); color: var(--bad); }

.foot { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); font-size: .82rem; display: grid; gap: 6px; color: var(--muted); }

/* ===================== Ficha del ejercicio ===================== */
.ex-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 0 16px; }
.ex-head h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); margin: 8px 0 6px; }
.ex-head p { max-width: 62ch; }
.ex-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.media-card { padding: 12px; }
.seg { display: flex; background: var(--surface-2); border-radius: 14px; padding: 4px; gap: 4px; margin-bottom: 12px; }
.seg-btn {
  flex: 1; white-space: nowrap; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; cursor: pointer;
  padding: 10px; border-radius: 11px; background: transparent; color: var(--muted); font-weight: 700; font-size: .9rem;
  transition: background .2s, color .2s, box-shadow .2s;
}
.seg-btn.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tab-pane { display: none; }
.tab-pane.on { display: block; animation: screen-in .35s var(--ease) both; }

.video-wrap { position: relative; border-radius: 16px; overflow: hidden; background: #0a100f; display: flex; justify-content: center; }
.video-wrap video { max-height: 62vh; width: auto; max-width: 100%; }
.video-wrap.landscape video { width: 100%; max-height: none; }
.video-badge { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 7px; background: rgba(10, 16, 15, .66); color: #fff; font-size: .78rem; font-weight: 700; padding: 6px 11px; border-radius: 999px; backdrop-filter: blur(8px); }
.video-ctrl { position: absolute; right: 12px; bottom: 12px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(10, 16, 15, .66); color: #fff; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(8px); }
.video-ctrl [data-icon] { width: 20px; height: 20px; }
.speed { position: absolute; left: 12px; bottom: 12px; display: flex; background: rgba(10, 16, 15, .66); border-radius: 999px; padding: 3px; backdrop-filter: blur(8px); }
.speed button { border: 0; background: transparent; color: rgba(255, 255, 255, .7); font-size: .78rem; font-weight: 800; padding: 6px 10px; border-radius: 999px; cursor: pointer; }
.speed button.on { background: #fff; color: #0a100f; }

.guide { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; align-items: center; }
.demo { aspect-ratio: 1 / 1; width: 100%; max-height: 380px; background: radial-gradient(circle at 50% 60%, var(--primary-soft), transparent 70%); border-radius: 16px; }
.guide-side { display: flex; flex-direction: column; gap: 10px; }
.phase-bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.phase-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--lime)); border-radius: inherit; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; counter-reset: st; }
.steps li {
  counter-increment: st; position: relative; padding: 10px 12px 10px 44px; border-radius: 12px; font-size: .9rem; font-weight: 600;
  color: var(--muted); background: var(--surface-2); border: 1px solid transparent; transition: all .3s var(--ease);
}
.steps li::before {
  content: counter(st); position: absolute; left: 12px; top: 50%; translate: 0 -50%; width: 22px; height: 22px; border-radius: 50%;
  background: var(--border); color: var(--text); font-size: .74rem; font-weight: 800; display: grid; place-items: center; transition: all .3s;
}
.steps li.on { color: var(--text); background: var(--surface); border-color: var(--primary); box-shadow: 0 6px 18px -10px color-mix(in srgb, var(--primary) 60%, transparent); transform: translateX(4px); }
.steps li.on::before { background: var(--primary); color: var(--primary-ink); }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.checks, .keys, .detects, .tips { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: .92rem; }
.checks li, .detects li, .tips li { position: relative; padding-left: 28px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--good-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.keys { counter-reset: k; }
.keys li { counter-increment: k; position: relative; padding-left: 32px; }
.keys li::before { content: counter(k); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 7px; background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: .78rem; display: grid; place-items: center; }
.detects li::before { content: ""; position: absolute; left: 3px; top: 7px; width: 10px; height: 10px; border-radius: 3px; background: var(--warn); transform: rotate(45deg); }
.detects li small { display: block; color: var(--muted); font-size: .8rem; }
.tips li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip { font-size: .76rem; font-weight: 700; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; color: var(--muted); }

.config { margin-top: 12px; }
.steppers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stepper, .steppers > * { min-width: 0; }
.stepper { background: var(--surface-2); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.st-label { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.st-ctrl { display: flex; align-items: center; gap: 6px; }
.st-ctrl button {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  font-size: 1.3rem; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .1s;
}
.st-ctrl button:active { transform: scale(.92); }
.st-ctrl input {
  width: 84px; text-align: center; font: inherit; font-size: 1.7rem; font-weight: 800; border: 0; background: transparent;
  color: var(--text); font-variant-numeric: tabular-nums; -moz-appearance: textfield;
}
.st-ctrl input::-webkit-outer-spin-button, .st-ctrl input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.st-ctrl input:focus { outline: none; }
.st-unit { font-size: .76rem; color: var(--muted); text-align: center; }

.switch { display: flex; align-items: center; gap: 12px; margin-top: 14px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 48px; height: 28px; border-radius: 99px; background: var(--border); position: relative; transition: background .2s; flex: none; }
.switch .thumb { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s var(--ease); }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track .thumb { transform: translateX(20px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 4px var(--primary-soft); }
.switch small { display: block; font-size: .8rem; }

.placement { display: flex; gap: 18px; align-items: center; margin-top: 12px; }
.placement-art { width: 132px; flex: none; color: var(--primary); }
.placement-art svg { width: 100%; height: auto; }

.sticky-cta {
  position: sticky; bottom: 0; z-index: 20; margin: 16px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0));
  background: linear-gradient(180deg, transparent, var(--bg) 35%);
}

/* ===================== Cámara ===================== */
body.in-camera { overflow: hidden; }
.screen.camera { max-width: none; padding: 0; position: fixed; inset: 0; z-index: 60; background: #000; }
.screen.camera.active { animation: none; }
.stage { position: relative; width: 100%; height: 100%; overflow: hidden; }
#video, #overlay { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mirror { transform: scaleX(-1); }
.vignette { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, .55), transparent 22%, transparent 70%, rgba(0, 0, 0, .65)); }

.cam-top { position: absolute; top: calc(env(safe-area-inset-top, 0) + 12px); left: 12px; right: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cam-title { color: #fff; font-weight: 800; font-size: 1rem; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); text-align: center; }

.cam-stats { position: absolute; top: calc(env(safe-area-inset-top, 0) + 70px); left: 12px; right: 12px; display: flex; gap: 8px; align-items: stretch; }
.rep-ring { --p: 0; position: relative; width: 84px; height: 84px; flex: none; }
.rep-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.rep-ring circle { fill: none; stroke-width: 9; }
.rep-ring .trk { stroke: rgba(255, 255, 255, .18); fill: rgba(10, 16, 15, .55); }
.rep-ring.zero .val, .big-ring .val.zero { opacity: 0; }
.rep-ring .val { stroke: #2dd4bf; stroke-linecap: round; stroke-dasharray: calc(var(--p) * 1) 100; transition: stroke-dasharray .5s var(--ease); }
.rep-ring > div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; line-height: 1; }
.rep-ring b { font-size: 1.8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.rep-ring small { font-size: .66rem; opacity: .75; margin-top: 3px; }
.cam-metric {
  flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;
  background: rgba(10, 16, 15, .55); color: #fff; border-radius: 18px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.cam-metric small { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.cam-metric b { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.depth-bar { position: absolute; right: 14px; top: 190px; bottom: 170px; width: 12px; background: rgba(255, 255, 255, .18); border-radius: 99px; }
#depth-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; border-radius: 99px; background: linear-gradient(0deg, #2dd4bf, #bef264); transition: height .08s linear; }
#depth-target { position: absolute; left: -6px; right: -6px; height: 3px; background: #fff; border-radius: 3px; bottom: 85%; }
#depth-target span { position: absolute; right: 20px; top: -8px; font-size: .62rem; font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing: .06em; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }

.cam-guide {
  position: absolute; left: 12px; top: 172px; width: 96px; height: 104px; pointer-events: none;
  background: rgba(10, 16, 15, .55); border-radius: 16px; padding: 6px; backdrop-filter: blur(10px);
  --fig-near: #fff; --fig-far: rgba(255, 255, 255, .35);
}
.cam-guide .fig-arc, .cam-guide .fig-joint, .cam-guide .fig-pulse { display: none; }
.cam-guide .fig-floor { stroke: rgba(255, 255, 255, .3); }
.cam-guide .fig-shadow { fill: rgba(255, 255, 255, .12); }

.countdown { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: rgba(0, 0, 0, .35); }
.countdown.on { display: flex; }
.cd-ring { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; border: 6px solid rgba(255, 255, 255, .25); position: relative; }
.cd-ring::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 6px solid #2dd4bf; border-color: #2dd4bf transparent transparent transparent; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.cd-ring span { font-size: 4.5rem; font-weight: 800; color: #fff; animation: pop .9s var(--ease) both; }
.countdown p { color: #fff; font-weight: 700; font-size: 1.1rem; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
@keyframes pop { from { transform: scale(1.6); opacity: 0; } to { transform: none; opacity: 1; } }

.rep-flash { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.rep-flash b { font-size: 6rem; font-weight: 800; color: #fff; text-shadow: 0 6px 30px rgba(0, 0, 0, .5); animation: flash 1s var(--ease) both; }
.rep-flash b.good { color: #4ade80; } .rep-flash b.warn { color: #fbbf24; } .rep-flash b.bad { color: #f87171; }
@keyframes flash { 0% { opacity: 0; transform: scale(.6); } 25% { opacity: 1; transform: scale(1.08); } 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: translateY(-30px) scale(.95); } }

.cue {
  position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0) + 100px); transform: translateX(-50%);
  width: min(92%, 520px); display: flex; align-items: center; gap: 10px;
  background: rgba(10, 16, 15, .72); color: #fff; border-radius: 18px; padding: 12px 16px;
  font-size: 1.05rem; font-weight: 700; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .08); transition: background .25s;
}
.cue.bump { animation: cue-bump .35s var(--ease); }
@keyframes cue-bump { 0% { transform: translateX(-50%) scale(.96); } 60% { transform: translateX(-50%) scale(1.03); } 100% { transform: translateX(-50%) scale(1); } }
.cue-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .15); flex: none; padding: 4px; }
.cue.good { background: rgba(21, 128, 61, .9); }
.cue.warn { background: rgba(180, 83, 9, .92); }
.cue.bad { background: rgba(185, 28, 28, .92); }
.cam-bottom { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom, 0) + 22px); display: flex; justify-content: center; }

/* ===================== Resultados ===================== */
.res-hero {
  display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center;
  background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--primary) 7%, var(--surface)));
}
.big-ring { position: relative; width: 150px; height: 150px; }
.big-ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.big-ring circle { fill: none; stroke-width: 10; }
.big-ring .trk { stroke: var(--surface-2); }
.big-ring .val { stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray 1.2s var(--ease); }
.big-ring .val.good { stroke: var(--good); } .big-ring .val.warn { stroke: var(--warn); } .big-ring .val.bad { stroke: var(--bad); }
.big-ring > div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.big-ring b { font-size: 2.8rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.big-ring small { color: var(--muted); font-size: .76rem; font-weight: 700; margin-top: 4px; }
.res-title .kicker { margin-bottom: 4px; }
.res-title h1 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); }
.res-title p { margin-top: 6px; }
.level-pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .82rem; padding: 5px 11px; border-radius: 999px; margin-top: 10px; }
.level-pill.good { background: var(--good-soft); color: var(--good); }
.level-pill.warn { background: var(--warn-soft); color: var(--warn); }
.level-pill.bad { background: var(--bad-soft); color: var(--bad); }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.metric { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px; box-shadow: var(--shadow-sm); }
.metric .k { font-size: .76rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.metric .v { font-size: 1.6rem; font-weight: 800; margin: 2px 0 8px; font-variant-numeric: tabular-nums; }
.metric .mbar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.metric .mbar i { display: block; height: 100%; border-radius: inherit; width: 0; transition: width 1s var(--ease); }
.c-good { color: var(--good); } .c-warn { color: var(--warn); } .c-bad { color: var(--bad); }
.bg-good { background: var(--good); } .bg-warn { background: var(--warn); } .bg-bad { background: var(--bad); }

.reco { display: flex; gap: 16px; align-items: center; margin-top: 12px; border-width: 1px 1px 1px 5px; }
.reco.down { border-left-color: var(--bad); } .reco.up { border-left-color: var(--good); } .reco.keep { border-left-color: var(--warn); }
.reco-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none; }
.reco.down .reco-ic { background: var(--bad-soft); color: var(--bad); }
.reco.up .reco-ic { background: var(--good-soft); color: var(--good); }
.reco.keep .reco-ic { background: var(--warn-soft); color: var(--warn); }
.reco-ic svg { width: 26px; height: 26px; }
.reco b { font-size: 1.1rem; display: block; }
.reco p { color: var(--muted); font-size: .92rem; margin-top: 2px; }
.weight-change { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 800; font-variant-numeric: tabular-nums; }
.weight-change .from { color: var(--muted); text-decoration: line-through; }
.weight-change .to { font-size: 1.3rem; }

.reps-chart { display: flex; align-items: flex-end; gap: 5px; height: 120px; margin-top: 8px; padding-top: 6px; }
.reps-chart .rb { flex: 1; min-width: 8px; max-width: 34px; border-radius: 8px 8px 4px 4px; position: relative; transform-origin: bottom; animation: grow .7s var(--ease) both; }
.reps-chart .rb span { position: absolute; left: 50%; bottom: -20px; translate: -50% 0; font-size: .7rem; color: var(--muted); font-weight: 700; }
@keyframes grow { from { transform: scaleY(0); } to { transform: none; } }
.chart-card { padding-bottom: 30px; }
.issues { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.issues li { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; font-size: .92rem; font-weight: 600; }
.issues li .cnt { margin-left: auto; font-size: .78rem; color: var(--muted); font-weight: 700; white-space: nowrap; }
.issues li .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warn); flex: none; }
.ok-note { display: flex; align-items: center; gap: 8px; color: var(--good); font-weight: 700; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.actions { display: flex; gap: 10px; margin-top: 20px; }
.actions .btn { flex: 1; }

/* ===================== Informe ===================== */
.report-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 6px 0 16px; }
.report-head h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
.report-who { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.rep-table { display: grid; gap: 8px; }
.rep-row { display: grid; grid-template-columns: 44px 1.4fr 1fr 1fr 70px; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 10px 14px; }
.rep-row .thumb { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: var(--surface-2); }
.rep-row .nm b { display: block; }
.rep-row .nm small { color: var(--muted); }
.rep-row .mini { font-size: .74rem; color: var(--muted); font-weight: 700; }
.rep-row .mini .mbar { height: 6px; border-radius: 99px; background: var(--surface-2); margin-top: 4px; overflow: hidden; }
.rep-row .mini .mbar i { display: block; height: 100%; border-radius: inherit; }
.rep-row .sc { font-size: 1.4rem; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.rep-row.pending { opacity: .6; border-style: dashed; }
.next-steps { counter-reset: ns; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.next-steps li { counter-increment: ns; position: relative; padding-left: 38px; font-size: .94rem; }
.next-steps li::before { content: counter(ns); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 9px; background: var(--primary); color: var(--primary-ink); font-weight: 800; font-size: .82rem; display: grid; place-items: center; }
.empty { text-align: center; padding: 48px 20px; }
.empty .empty-ic { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.empty .empty-ic svg { width: 30px; height: 30px; }
.empty p { color: var(--muted); margin: 6px auto 18px; max-width: 40ch; }

/* ===================== Animación (maniquí) ===================== */
.fig { width: 100%; height: 100%; overflow: visible; }
.fig-floor { stroke: var(--border); stroke-width: 1.5; }
.fig-shadow { fill: color-mix(in srgb, var(--text) 12%, transparent); }
.fig-bone { stroke-linecap: round; }
.fig-near .fig-bone { stroke: var(--fig-near); }
.fig-far .fig-bone { stroke: var(--fig-far); }
.fig-torso-front { fill: var(--fig-near); stroke: var(--fig-near); stroke-width: 6; stroke-linejoin: round; }
.fig-torso-side { fill: var(--fig-near); stroke: var(--fig-near); stroke-width: 5; stroke-linejoin: round; }
.fig-hl { stroke: #fff; stroke-linecap: round; opacity: .18; }
.fig-far .fig-hl { opacity: .1; }
.fig-head-hl { fill: #fff; opacity: .16; }
@media (prefers-color-scheme: dark) { .fig-hl { stroke: #000; opacity: .14; } .fig-head-hl { fill: #000; opacity: .12; } }
.fig-ghost .fig-hl, .fig-ghost .fig-head-hl { display: none; }
.fig-ghost .fig-torso-side { fill: var(--primary); stroke: var(--primary); }
.cam-guide .fig-hl, .cam-guide .fig-head-hl { stroke: #000; fill: #000; opacity: .12; }
.fig-head { fill: var(--fig-near); }
.fig-ghost { opacity: .16; }
.fig-ghost .fig-bone, .fig-ghost .fig-torso-front { stroke: var(--primary); }
.fig-ghost .fig-head, .fig-ghost .fig-torso-front { fill: var(--primary); }
.fig-eq { fill: var(--primary); stroke: var(--fig-near); stroke-width: 1.5; }
.fig-arc { fill: color-mix(in srgb, var(--primary) 22%, transparent); stroke: var(--primary); stroke-width: 2; }
.fig-joint { fill: var(--primary); stroke: var(--surface); stroke-width: 2.2; transition: fill .2s; }
.fig-pulse { fill: none; stroke: var(--good); stroke-width: 2; opacity: 0; }
.fig-label-bg { fill: var(--surface); stroke: var(--border); }
.fig-label { font: 800 10.5px "Plus Jakarta Sans", system-ui, sans-serif; fill: var(--primary); }
.fig.reached .fig-joint { fill: var(--good); }
.fig.reached .fig-arc { stroke: var(--good); fill: color-mix(in srgb, var(--good) 22%, transparent); }
.fig.reached .fig-label { fill: var(--good); }
.fig.reached .fig-pulse { animation: joint-pulse 1s ease-out infinite; }
@keyframes joint-pulse { 0% { opacity: .9; r: 5; } 100% { opacity: 0; r: 18; } }

/* ===================== Cuenta ===================== */
.appbar-actions { display: flex; gap: 8px; align-items: center; }
.account-btn { position: relative; padding: 5px 12px 5px 5px; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; overflow: hidden;
  background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: .82rem;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar [data-icon] { width: 16px; height: 16px; }
.avatar.xl { width: 64px; height: 64px; font-size: 1.5rem; margin: 0 auto; }
.sync-dot { position: absolute; top: 3px; left: 25px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--surface); background: var(--good); }
.sync-dot[hidden] { display: none; }
.sync-dot.syncing { background: var(--warn); animation: ping 1.2s infinite; }
.sync-dot.error { background: var(--bad); }
@media (max-width: 760px) { .account-btn { padding: 5px; } }

.cloud-banner { display: flex; align-items: center; gap: 14px; margin: 8px 0; border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); background: linear-gradient(135deg, var(--surface), var(--primary-soft)); }
.cloud-banner[hidden] { display: none; }
.cloud-banner > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cloud-banner .muted { font-size: .88rem; }
.cloud-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.cloud-ic svg { width: 22px; height: 22px; }
@media (max-width: 760px) { .cloud-banner { flex-wrap: wrap; } .cloud-banner .btn { width: 100%; } }

.sheet {
  width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto;
  border: 1px solid var(--border); border-radius: 24px; padding: 24px 22px 22px; background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-lg);
}
.sheet[open] { animation: sheet-in .35s var(--ease) both; }
.sheet::backdrop { background: rgba(5, 10, 9, .55); backdrop-filter: blur(4px); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.sheet-close-form { position: absolute; top: 12px; right: 12px; margin: 0; }
.icon-btn.subtle { background: var(--surface-2); color: var(--muted); width: 36px; height: 36px; backdrop-filter: none; }
.icon-btn.subtle [data-icon] { width: 18px; height: 18px; }
.sheet-head { text-align: center; margin-bottom: 18px; }
.sheet-head img { margin: 0 auto 10px; border-radius: 12px; }
.sheet-head h2 { font-size: 1.4rem; margin: 6px 0 4px; }
.sheet-head p { font-size: .9rem; }
.btn.google { background: var(--surface); border-color: var(--border); color: var(--text); box-shadow: var(--shadow-sm); }
.btn.google:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: .8rem; font-weight: 600; margin: 16px 0 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-seg { margin-bottom: 14px; }
.auth-form { display: grid; gap: 12px; }
.auth-form .field[hidden] { display: none; }
.form-error { color: var(--bad); background: var(--bad-soft); border-radius: 10px; padding: 9px 12px; font-size: .88rem; font-weight: 600; }
.form-error.ok { color: var(--good); background: var(--good-soft); }
.form-error[hidden] { display: none; }
.link-btn { background: none; border: 0; color: var(--primary); font-weight: 700; cursor: pointer; padding: 4px; font-size: .9rem; }
.acc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.acc-stats div { background: var(--surface-2); border-radius: 14px; padding: 12px; text-align: center; }
.acc-stats b { display: block; font-size: 1.5rem; font-weight: 800; }
.acc-stats small { color: var(--muted); font-size: .78rem; }
.sync-line { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--good); font-size: .86rem; font-weight: 700; margin-bottom: 14px; }
.sync-line.syncing { color: var(--warn); }
.sync-line.error { color: var(--bad); }
.sheet .btn.block + .btn.block { margin-top: 8px; }
.btn.loading { pointer-events: none; opacity: .7; }
.btn.loading::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.delta { font-size: .74rem; font-weight: 800; margin-left: 6px; }
.delta.up { color: var(--good); } .delta.down { color: var(--bad); }

/* ===================== Toast ===================== */
.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0) + 24px); translate: -50% 20px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-weight: 700; font-size: .92rem;
  opacity: 0; pointer-events: none; transition: opacity .25s, translate .3s var(--ease); box-shadow: var(--shadow-lg);
}
.toast.on { opacity: 1; translate: -50% 0; }

/* ===================== Responsive ===================== */
@media (max-width: 900px) {
  .ex-grid { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 12px; gap: 28px; }
  .hero-visual { order: -1; }
  .phone { width: min(230px, 62vw); }
  .float-chip.c1 { right: -44px; }
  .float-chip.c2 { left: -50px; }
  .float-chip.c3 { right: -36px; }
  .how { grid-template-columns: 1fr; }
  .goals { grid-template-columns: 1fr; }
  .guide { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .res-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .rep-row { grid-template-columns: 40px 1fr 60px; }
  .rep-row .mini { display: none; }
  .hide-sm { display: none; }
  .progress-card { flex-wrap: wrap; }
  .progress-card .btn { width: 100%; }
}
@media (max-width: 480px) {
  .ex-grid { grid-template-columns: 1fr; }
  .ex-media { aspect-ratio: 16 / 10; }
  .placement { flex-direction: column; align-items: flex-start; }
  .placement-art { width: 110px; }
  .hero-cta .btn { flex: 1; }
  .actions { flex-direction: column-reverse; }
  .actions .btn { width: 100%; }
  .steppers { grid-template-columns: 1fr; gap: 8px; }
  .stepper { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label ctrl" "unit ctrl"; align-items: center; justify-items: start; row-gap: 0; }
  .stepper .st-label { grid-area: label; }
  .stepper .st-unit { grid-area: unit; text-align: left; }
  .stepper .st-ctrl { grid-area: ctrl; }
  .st-ctrl input { width: 64px; font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .appbar, .no-print, .actions, .toast { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .metric, .rep-row { break-inside: avoid; box-shadow: none; }
  .screen { padding: 0; }
}
