/* ── Tokens ─────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #000000;
  --bg-2:      #0c0c0e;
  --bg-3:      #141416;
  --line:      #1f2024;
  --line-2:    #2a2c32;
  --ink:       #ffffff;
  --ink-2:     #8e8e93;
  --ink-3:     #6b6b70;
  --accent:    #00e676;
  --accent-2:  #5cffa6;
  --accent-ink:#001a0d;
  --accent-glow: rgba(0, 230, 118, 0.45);
  --danger:    #ef4444;

  --sans: "Geist", ui-sans-serif, -apple-system, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  --pad: clamp(20px, 5.5vw, 36px);
  --pad-screen: clamp(20px, 6vw, 40px);
  --maxw: 1180px;
  --bottom-safe: env(safe-area-inset-bottom, 0px);
}

html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  overflow-x: hidden;
  background-image:
    radial-gradient(900px 500px at 80% -10%, rgba(0,230,118,0.10), transparent 60%),
    radial-gradient(800px 600px at -10% 110%, rgba(0,230,118,0.06), transparent 55%);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--accent-ink); }

.hidden { display: none !important; }

/* ── Layout ─────────────────────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
}

/* ── Buttons ────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 12px;
  padding: 17px 24px;
  min-height: 56px;
  border-radius: var(--r-pill);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.005em;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
  will-change: transform;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: var(--r-pill);
  padding: 17px 24px;
  min-height: 56px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.005em;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 12px;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.18) inset,
    0 -1px 0 rgba(0,0,0,0.25) inset,
    0 14px 30px -10px rgba(0,230,118,0.45);
}
.btn-primary:hover { transform: translateY(-1px); background: var(--accent-2); }
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary .arrow { width: 18px; height: 18px; transition: transform .2s ease; }
.btn-primary:hover .arrow { transform: translateX(3px); }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  height: 52px;
  width: 100%;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.btn-secondary:hover { border-color: var(--accent); background: rgba(0,230,118,0.06); }

/* ── Landing ─────────────────────────────────────────────────────────── */

#screen-landing {
  display: block;
  min-height: 100dvh;
  padding-left: max(var(--pad-screen), env(safe-area-inset-left));
  padding-right: max(var(--pad-screen), env(safe-area-inset-right));
}

#screen-landing .wrap {
  padding-left: 0;
  padding-right: 0;
}

.nav {
  padding: 18px 0 8px;
  display: flex; align-items: center; justify-content: flex-start;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  text-transform: uppercase;
}
.brand-mark {
  width: 22px; height: 22px; border-radius: 6px;
  background: conic-gradient(from 220deg, var(--accent), var(--accent-2), var(--accent));
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 5px;
  border-radius: 3px; background: var(--bg);
}
.nav-domain { color: var(--ink-3); }
.nav-domain b { color: var(--ink-2); font-weight: 500; }

.hero { padding: 24px 0 48px; position: relative; }
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--line-2); }

.hero h1 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(40px, 10.5vw, 88px);
  line-height: 1.0;
  letter-spacing: -0.035em;
  margin: 16px 0 0;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--accent); font-weight: 700; }
.hero .sub {
  margin-top: 16px;
  font-family: var(--sans);
  font-size: clamp(17px, 4.4vw, 22px);
  color: var(--ink-2);
  font-weight: 400;
  line-height: 1.4;
  max-width: 32ch;
  letter-spacing: -0.005em;
}

.cta-row {
  margin-top: 24px;
  display: flex; flex-direction: column; gap: 12px; align-items: stretch;
}

.trust {
  margin-top: 20px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  padding: 0; list-style: none;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--ink-3); text-transform: uppercase;
}
.trust .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }
.trust .item { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.trust .ico { width: 12px; height: 12px; color: var(--accent-2); flex-shrink: 0; }

/* Hero figure ── */

.hero-figure {
  margin-top: 40px; margin-left: auto; margin-right: auto;
  position: relative;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, oklch(0.14 0 0), oklch(0.10 0 0));
  border: 1px solid var(--line);
  overflow: hidden;
  aspect-ratio: 5 / 7;
  max-width: min(420px, 88vw);
  width: 100%;
}
.hero-figure .hero-photo {
  position: absolute; left: 50%; bottom: 0;
  height: 100%; width: auto; max-width: 110%;
  transform: translateX(-50%);
  object-fit: contain;
  filter: grayscale(1) contrast(1.05) brightness(1.05);
}
.hero-figure .photo-tint {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.55) 100%);
}
.hero-figure .corner {
  position: absolute; width: 14px; height: 14px;
  border: 1px solid var(--accent);
}
.hero-figure .corner.tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.hero-figure .corner.tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.hero-figure .corner.bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
.hero-figure .corner.br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }
.hero-figure .label {
  position: absolute;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3);
}
.hero-figure .label.tl { top: 18px; left: 36px; }
.hero-figure .label.br { bottom: 18px; right: 36px; color: var(--accent-2); }

.hero-figure .plumb {
  position: absolute; left: 55.2%; top: 0; bottom: 0;
  width: 1px; transform: translateX(-50%);
  background-image: linear-gradient(to bottom, var(--accent) 0 6px, transparent 6px 12px);
  background-size: 1px 12px; background-repeat: repeat-y;
  opacity: 0.55; pointer-events: none; z-index: 1;
}

.hero-figure .data-strip {
  position: absolute; right: 14px; top: 22%;
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 14px;
  font-family: var(--mono); font-size: 9px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); text-align: right;
  text-shadow: 0 0 6px rgba(0,0,0,0.8); z-index: 2;
}
.hero-figure .data-strip li b { font-weight: 600; margin-left: 4px; color: var(--accent-2); }

.hero-figure .marker {
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,230,118,0.15);
  transform: translate(-50%, -50%);
  animation: pulse 2.4s ease-in-out infinite;
}
.hero-figure .marker::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 4px; height: 4px; border-radius: 50%;
  background: #001a0d; transform: translate(-50%, -50%);
}
.hero-figure .mk-tag {
  position: absolute; left: 22px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 9px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); white-space: nowrap;
  text-shadow: 0 0 6px rgba(0,0,0,0.85), 0 1px 2px rgba(0,0,0,0.9);
}
.hero-figure .mk-tag::before {
  content: ""; position: absolute; right: 100%; top: 50%;
  width: 18px; height: 1px; background: var(--accent);
  opacity: 0.7; margin-right: 3px;
}
.hero-figure .mk-1 { top: 12.9%; left: 45.8%; }
.hero-figure .mk-2 { top: 22.7%; left: 55.8%; }
.hero-figure .mk-2 .mk-tag { left: auto; right: 22px; }
.hero-figure .mk-2 .mk-tag::before { right: auto; left: 100%; margin-right: 0; margin-left: 3px; }
.hero-figure .mk-3 { top: 27.9%; left: 66.2%; }
.hero-figure .mk-4 { top: 45.9%; left: 55.3%; }
.hero-figure .mk-4 .mk-tag { left: auto; right: 22px; }
.hero-figure .mk-4 .mk-tag::before { right: auto; left: 100%; margin-right: 0; margin-left: 3px; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(0,230,118,0.15); }
  50%      { box-shadow: 0 0 0 6px rgba(0,230,118,0.05); }
}

.hero-figure .scan-line {
  position: absolute; left: 0; right: 0; height: 2px; top: 0;
  background: linear-gradient(90deg, transparent, var(--accent) 20%, var(--accent) 80%, transparent);
  opacity: 0;
  animation: scan 3.6s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(0,230,118,0.55);
  pointer-events: none; z-index: 2; will-change: top, opacity;
}
@keyframes scan {
  0%   { top: 0%; opacity: 0; }
  10%  { opacity: 0.9; }
  50%  { top: 100%; opacity: 0.9; }
  90%  { opacity: 0.9; }
  100% { top: 0%; opacity: 0; }
}

.hero-figure .readout {
  position: absolute; left: 18px; bottom: 18px; z-index: 3;
  display: flex; flex-direction: column; gap: 2px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 10px 14px;
  border-radius: 10px;
}
.hero-figure .readout-score {
  font-family: var(--sans); font-weight: 700;
  font-size: 28px; line-height: 1; letter-spacing: -0.03em;
  color: var(--accent);
}
.hero-figure .readout-score b { font-weight: 700; }
.hero-figure .readout-score span { font-size: 12px; color: var(--ink-3); font-weight: 500; margin-left: 2px; }
.hero-figure .readout-meta {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-2);
}

/* How it works ── */

.section { padding: 64px 0; position: relative; }
.section-head {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 32px;
}
.section-head h2 {
  font-family: var(--sans); font-weight: 700;
  font-size: clamp(32px, 8vw, 56px);
  line-height: 1.05; letter-spacing: -0.03em; margin: 0;
}
.section-head h2 em { font-style: normal; color: var(--accent); font-weight: 700; }

.steps { display: grid; grid-template-columns: 1fr; gap: 12px; }
.step {
  position: relative;
  background: linear-gradient(180deg, oklch(0.21 0.012 60), oklch(0.19 0.010 60));
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px 22px;
  overflow: hidden;
}
.step-num {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; color: var(--ink-3);
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 22px;
}
.step-num .n {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%; border: 1px solid var(--line-2);
  color: var(--ink-2); font-size: 11px;
}
.step h3 {
  font-family: var(--sans);
  font-size: clamp(24px, 5.5vw, 30px);
  font-weight: 700; letter-spacing: -0.025em;
  line-height: 1.1; margin: 0 0 10px;
}
.step p {
  font-size: 15px; line-height: 1.55;
  color: var(--ink-2); margin: 0; max-width: 38ch;
}
.step-vis {
  margin-top: 24px; height: 100px;
  border-top: 1px dashed var(--line);
  padding-top: 20px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3);
}
.step-vis svg { width: 100%; height: 100%; max-width: 280px; }
.step-vis-photo { height: auto; }
.step-vis-photo img { width: 100%; max-width: 320px; height: auto; border-radius: 4px; }

/* Privacy ── */

.privacy { padding: 2.5rem 0; text-align: center; max-width: 520px; margin: 0 auto; }
.privacy-title {
  font-family: var(--sans); font-weight: 700;
  font-size: clamp(22px, 4.5vw, 28px);
  letter-spacing: -0.025em; line-height: 1.15;
  color: var(--ink); margin: 0 0 12px;
}
.privacy-body {
  font-family: var(--sans);
  font-size: clamp(15px, 3.8vw, 17px);
  line-height: 1.5; color: var(--ink-2);
  margin: 0; letter-spacing: -0.005em;
}

/* Final CTA ── */

.final { padding: 72px 0 64px; text-align: center; position: relative; }
.final::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 50% at 50% 40%, rgba(0,230,118,0.12), transparent 70%);
  pointer-events: none;
}
.final .inner { position: relative; }
.final h2 {
  font-family: var(--sans); font-weight: 700;
  font-size: clamp(36px, 9vw, 72px);
  line-height: 1.0; letter-spacing: -0.035em;
  margin: 0 0 28px;
}
.final h2 em { font-style: normal; color: var(--accent); font-weight: 700; }
.final .btn-primary { width: 100%; max-width: 360px; margin: 0 auto; }
.final .caption {
  margin-top: 22px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3);
}

/* Footer ── */

.footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 calc(40px + env(safe-area-inset-bottom));
  color: var(--ink-3); font-size: 13px;
}
.footer-grid { display: flex; flex-direction: column; gap: 18px; }
.footer-links {
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.footer-links a { color: var(--ink-2); transition: color .15s ease; }
.footer-links a:hover { color: var(--accent); }
.footer-links .sep { color: var(--line-2); }
.footer-legal { line-height: 1.6; color: var(--ink-3); }
.footer-disclaimer { font-style: italic; font-size: 11px; color: var(--ink-3); opacity: 0.75; max-width: 60ch; }

/* ── Capture ────────────────────────────────────────────────────────── */

#screen-capture {
  height: 100dvh;
  display: flex; flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.progress-bar {
  display: flex; gap: 4px;
  padding: 0.6rem 1rem 0.4rem;
  background: var(--bg);
  flex-shrink: 0;
}
.progress-bar .bar {
  flex: 1;
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  position: relative;
  transition: background 0.25s, box-shadow 0.25s;
}
.progress-bar .bar.done   { background: var(--accent); }
.progress-bar .bar.active {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: bar-pulse 1.2s infinite;
}
@keyframes bar-pulse { 50% { opacity: 0.5; } }

.progress-bar .bar::after {
  content: attr(data-label);
  position: absolute;
  top: -14px; left: 0;
  font-family: var(--mono);
  font-size: 0.55rem;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.camera-wrapper {
  position: relative;
  flex: 1; min-height: 0;
  background: #000;
  overflow: hidden;
}

#video {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  display: block;
}

#overlay {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  transform: scaleX(-1);
}

.body-guide {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 38%; height: 85%;
  border: 2px dashed rgba(0,230,118,0.18);
  border-radius: 60% 60% 40% 40% / 30% 30% 10% 10%;
  pointer-events: none;
}

.capture-bottom {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding: 1rem 1.25rem calc(1rem + var(--bottom-safe));
  display: flex; flex-direction: column;
  gap: 0.55rem;
  flex-shrink: 0;
}

.step-info { text-align: center; }

.step-info .step-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 0.5rem;
  display: inline-flex; align-items: center; gap: 10px;
}
.step-info .step-count::before {
  content: ""; width: 22px; height: 1px;
  background: var(--accent); opacity: 0.55;
}

.step-info h2 {
  font-family: var(--sans);
  font-size: clamp(28px, 7vw, 36px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.35rem;
  color: var(--ink);
}

.step-info p {
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.4;
}

#capture-status {
  font-family: var(--sans);
  font-size: 1.4rem;
  font-weight: 700;
  min-height: 2rem;
  text-align: center;
  color: var(--accent);
  line-height: 1;
}

/* ── Loader ─────────────────────────────────────────────────────────── */

#screen-loader {
  background: var(--bg);
  color: var(--ink);
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.loader-wrap { text-align: center; max-width: 320px; }
.loader-gif {
  width: 100%; max-width: 280px; height: auto;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 0 24px var(--accent-glow));
}
.loader-title {
  font-family: var(--sans);
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
}
.loader-sub {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ── Modals ─────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; z-index: 100;
  animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.75rem 1.5rem 1.5rem;
  width: 100%;
  max-width: 420px;
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.modal-title {
  font-family: var(--sans);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--ink);
}
.modal-sub {
  font-size: 0.95rem;
  color: var(--ink-2);
  line-height: 1.45;
  margin-bottom: 1.4rem;
}

/* Gender picker */
.gender-options { display: flex; flex-direction: column; gap: 0.6rem; }

.gender-btn {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line-2);
  background: var(--bg-3);
  color: var(--ink);
  border-radius: var(--r-pill);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.1s;
}
.gender-btn:hover,
.gender-btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0,230,118,0.06);
  outline: none;
}
.gender-btn:active { transform: scale(0.98); }

/* Email form */
#form-email { display: flex; flex-direction: column; gap: 0.75rem; }

#form-email input[type="text"],
#form-email input[type="email"] {
  height: 48px;
  padding: 0 1rem;
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--r-md);
  font-family: var(--sans);
  font-size: 1rem;
  -webkit-appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#form-email input::placeholder { color: var(--ink-3); }
#form-email input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  outline: none;
}

.consent-row {
  display: flex; gap: 0.6rem; align-items: flex-start;
  font-size: 0.85rem; line-height: 1.45;
  color: var(--ink-2);
  cursor: pointer;
}
.consent-row input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 2px; flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.consent-row a { color: var(--accent); text-decoration: underline; }

#btn-email-submit { margin-top: 0.4rem; width: 100%; }

/* ── Results ────────────────────────────────────────────────────────── */

#screen-results {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  padding: 0;
  max-width: 540px;
  margin: 0 auto;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
}

.results-header {
  display: flex; align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}

.back-btn {
  background: none; border: none;
  color: var(--ink);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border-radius: 50%;
  touch-action: manipulation;
  transition: background 0.15s;
}
.back-btn:active { background: rgba(255,255,255,0.06); }

.header-title {
  flex: 1; text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.header-spacer { width: 36px; }

.summary-section { padding: 1rem 1.25rem 1.5rem; }

.score-intro {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.75rem;
}

#screen-results .score-value {
  font-family: var(--sans);
  font-size: clamp(64px, 18vw, 96px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--accent);
  margin-bottom: 1rem;
}
#screen-results .score-value.good { color: var(--accent); }
#screen-results .score-value.fair { color: var(--accent-2); }
#screen-results .score-value.poor { color: var(--danger); }

.deviations-count {
  font-family: var(--sans);
  font-size: clamp(18px, 4.5vw, 22px);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1.5rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.captured-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.photo-thumb { display: block; }

.photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  background: #000;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.photo-wrap img,
.photo-wrap canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.photo-wrap canvas { pointer-events: none; }
.photo-thumb span { display: none; }

.btn-share, .btn-proceed {
  width: 100%;
  height: 56px;
  border-radius: var(--r-pill);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  margin-bottom: 0.75rem;
  touch-action: manipulation;
  transition: transform 0.1s, opacity 0.15s, background 0.2s, border-color 0.2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
}
.btn-share {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-2);
}
.btn-share:hover { border-color: var(--accent); color: var(--accent); }
.btn-proceed {
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.18) inset,
    0 -1px 0 rgba(0,0,0,0.25) inset,
    0 14px 30px -10px rgba(0,230,118,0.45);
}
.btn-proceed:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn-share:active, .btn-proceed:active { transform: scale(0.98); }

.diagnoses-section {
  padding: 0.5rem 1.25rem 0.5rem;
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.diagnosis-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.25rem 0;
}

.diag-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.25rem;
}

.diag-card h3 {
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.diag-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.compare-col { display: flex; flex-direction: column; gap: 0.5rem; align-items: stretch; }

.compare-col figcaption {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  order: -1;
}
.compare-col.ideal figcaption { color: var(--accent); }
.compare-col.user  figcaption { color: var(--danger); }

.compare-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid transparent;
  background: var(--bg-3);
}
.compare-col.ideal .compare-img-wrap {
  border-color: var(--accent);
  background: rgba(0,230,118,0.05);
}
.compare-col.user .compare-img-wrap {
  border-color: var(--danger);
  background: #000;
}

.compare-img-wrap img,
.compare-img-wrap canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
}
.compare-col.user .compare-img-wrap img,
.compare-col.user .compare-img-wrap canvas {
  object-fit: cover;
  transform: scaleX(-1);
}

.diag-desc {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.diag-info { display: flex; flex-direction: column; gap: 1rem; }

.diag-info strong {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.diag-info p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-2);
  white-space: pre-line;
}

.no-issues-big {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--bg-2);
  border: 1px solid var(--accent);
  border-radius: var(--r-md);
  color: var(--accent);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.05rem;
}

.breakdown-section {
  padding: 1.25rem;
  background: var(--bg);
  border-top: 1px solid var(--line);
}

#screen-results .section-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  margin-bottom: 0.75rem;
  display: flex; align-items: center; gap: 0.5rem;
}

.section-tag {
  font-family: var(--mono);
  font-size: 9px;
  padding: 0.15rem 0.45rem;
  border-radius: var(--r-sm);
  background: rgba(0,230,118,0.12);
  color: var(--accent);
  letter-spacing: 0.1em;
  border: 1px solid var(--accent);
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--bg-2);
  margin-bottom: 1.25rem;
}

.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.85rem;
  min-width: 320px;
  color: var(--ink);
}
.breakdown-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  background: var(--bg-3);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.breakdown-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--line);
}
.breakdown-table tr:nth-child(even) td { background: var(--bg-3); }
.breakdown-table tr:last-child td { border-bottom: none; }

.breakdown-table .score-cell {
  font-family: var(--mono);
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}
.breakdown-table .score-cell.ok  { color: var(--accent); }
.breakdown-table .score-cell.bad { color: var(--danger); }

/* ── Responsive ─────────────────────────────────────────────────────── */

@media (min-width: 480px) {
  .hero { padding: 40px 0 72px; }
  .cta-row { flex-direction: row; align-items: center; }
  .cta-row .btn-primary { width: auto; }
  .hero-figure { aspect-ratio: 5 / 7; }
}

@media (min-width: 1024px) {
  :root { --pad: 56px; }
  .hero {
    padding: 56px 0 96px;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 72px;
    align-items: center;
  }
  .hero-figure { margin-top: 0; aspect-ratio: 5 / 7; max-width: none; }
  .hero h1 { font-size: clamp(72px, 7vw, 104px); }
  .section { padding: 120px 0; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .step { padding: 36px 32px; }
  .section-head { flex-direction: row; justify-content: space-between; align-items: end; }
  .final { padding: 140px 0 120px; }
}

@media (min-width: 600px) {
  #screen-capture {
    height: auto;
    max-width: 720px;
    width: 100%;
    gap: 1rem;
    padding: 1.5rem;
    overflow: visible;
    margin: 0 auto;
  }
  .camera-wrapper {
    flex: none;
    aspect-ratio: 4/3;
    border-radius: var(--r-md);
    border: 1px solid var(--line);
  }
  .body-guide { display: none; }
  .capture-bottom {
    background: transparent;
    border-top: none;
    padding: 0;
    gap: 0.75rem;
  }
  #capture-status { font-size: 2rem; min-height: 2.5rem; }
  .step-info p { font-size: 1rem; }

  #screen-results { padding: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .scan-line { animation: none; opacity: 0.4; top: 50%; }
  .progress-bar .bar.active { animation: none; }
  .marker { animation: none; }
  .btn-primary, .btn-share, .btn-proceed { transition: none; }
}
