
/* ─── 2026.3.19 ──────────────────────────────────────────────────────────── */

/* ─── VARIABLES ──────────────────────────────────────────────────────────── */
:root {
  --navy:   #0b1929;
  --navy2:  #112240;
  --teal:   #1ec8b0;
  --teal2:  #0fa898;
  --sky:    #38bdf8;
  --white:  #ffffff;
  --gray50: #f8fafc;
  --gray100:#f1f5f9;
  --gray200:#e2e8f0;
  --gray400:#94a3b8;
  --gray600:#475569;
  --gray800:#1e293b;

  --grad: linear-gradient(135deg, #1ec8b0 0%, #38bdf8 100%);
  --grad-dark: linear-gradient(135deg, #0b2a3a 0%, #0b1929 100%);

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 8px 32px rgba(0,0,0,.10);
  --shadow-lg: 0 24px 64px rgba(0,0,0,.14);

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --max-w: 1120px;
  --nav-h: 56px;
}

/* ─── RESET ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--gray800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ─── LAYOUT ─────────────────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}
.section {
  padding: 64px 0;
}

/* ─── NAV ────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: .9rem;
  color: var(--navy);
  flex-shrink: 0;
}
.nav-logo-mark {
  font-family: var(--font-display);
  font-size: 1.15rem;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links {
  display: flex;
  gap: 20px;
  flex: 1;
}
.nav-links a {
  font-size: .82rem;
  font-weight: 500;
  color: var(--gray600);
  transition: color .2s;
}
.nav-links a:hover { color: var(--navy); }
.nav-auth { margin-left: auto; }

/* ─── BUTTONS ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
  transition: all .2s;
  white-space: nowrap;
}
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: 10px; }
.btn-sm { padding: 7px 14px; font-size: .8rem; }
.btn-full { width: 100%; justify-content: center; }

.btn-primary {
  background: var(--grad);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(30,200,176,.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(30,200,176,.4);
}
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--gray200);
}
.btn-outline:hover {
  border-color: var(--teal);
  color: var(--teal2);
}
.btn-ghost {
  background: transparent;
  color: var(--gray600);
  padding: 8px 16px;
}
.btn-ghost:hover { background: var(--gray100); color: var(--navy); }

.link-btn {
  background: none;
  border: none;
  color: var(--teal2);
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
}

/* ─── SECTION HEADER ─────────────────────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 40px;
}
.section-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal2);
  background: rgba(30,200,176,.08);
  border: 1px solid rgba(30,200,176,.2);
  border-radius: 20px;
  padding: 3px 12px;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  line-height: 1.2;
  color: var(--navy);
  margin-bottom: 10px;
}
.section-sub {
  font-size: .95rem;
  color: var(--gray600);
  max-width: 480px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MEASURE SECTION (FIRST SCREEN)
   ═══════════════════════════════════════════════════════════════════════════ */
.section-measure {
  background: var(--gray50);
  padding-top: calc(var(--nav-h) + 24px);
  padding-bottom: 24px;
/*min-height: 100vh;
  min-height: 100dvh;*/
}

/* Two-column layout (desktop) */
.measure-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* LEFT: Info panel */
.measure-info {
  padding-top: 0;
}
.measure-logo-mark {
  font-family: var(--font-display);
  font-size: 2rem;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}
.measure-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 12px;
}
.measure-slogan {
  font-size: .95rem;
  color: var(--gray600);
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: 28px;
}

/* Feature bullets */
.measure-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 32px;
}
.measure-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .85rem;
  color: var(--gray600);
  line-height: 1.5;
}
.measure-feature svg {
  flex-shrink: 0;
  color: var(--teal);
  margin-top: 1px;
}

/* RIGHT: Tool panel */
.measure-tool {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}

/* Mode toggle bar */
.mode-bar {
  display: flex;
  border-bottom: 1px solid var(--gray200);
}
.mode-btn {
  flex: 1;
  padding: 12px 16px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--gray400);
  background: var(--gray50);
  border: none;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font-body);
}
.mode-btn:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.mode-btn:last-child  { border-radius: 0 var(--radius) 0 0; }
.mode-btn:not(:last-child) { border-right: 1px solid var(--gray200); }
.mode-btn-active {
  color: var(--navy);
  background: var(--white);
  box-shadow: inset 0 -2px 0 var(--teal);
}
.mode-btn:hover:not(.mode-btn-active) {
  color: var(--gray600);
  background: var(--gray100);
}
.mode-hint {
  font-size: .72rem;
  font-weight: 400;
  color: var(--gray400);
}


/* ─── Photo Guide Strip (full width below both columns) ─── */

.photo-guide-strip {
  margin-top: 18px;
  background: var(--white);
  border: 1px solid var(--gray200);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.photo-guide-strip-title {
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 14px;
}

.photo-guide-strip-scroll {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.guide-strip-item {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--gray200);
  transition: transform .2s;
}
.guide-strip-item:hover { transform: translateY(-2px); }
.guide-strip-correct { border-color: var(--teal); }
.guide-strip-wrong { border-color: #fecaca; }
.guide-strip-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.guide-strip-label {
  display: block;
  padding: 6px 8px;
  font-size: .72rem;
  font-weight: 600;
  text-align: center;
}
.guide-strip-label-ok {
  background: rgba(30,200,176,.08);
  color: var(--teal2);
}
.guide-strip-label-no {
  background: #fef2f2;
  color: #dc2626;
}

.guide-strip-more {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  font-size: .75rem;
  font-weight: 500;
  color: var(--teal2);
  background: rgba(30,200,176,.06);
  border: 1.5px dashed rgba(30,200,176,.3);
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  line-height: 1.4;
  font-family: var(--font-body);
  transition: all .2s;
}
.guide-strip-more:hover {
  background: rgba(30,200,176,.12);
  border-color: var(--teal);
}

/* Usage bar */
.usage-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  justify-content: center;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--gray100);
}
.usage-label { font-size: .82rem; color: var(--gray600); }
.usage-pips {
  display: flex;
  gap: 5px;
}
.usage-pip {
  width: 18px; height: 7px;
  border-radius: 4px;
  background: var(--gray200);
  transition: background .3s;
}
.usage-pip.active { background: var(--teal); }
.usage-pip.empty { background: var(--gray200); }
.usage-count { font-size: .82rem; font-weight: 600; color: var(--navy); }

.usage-bar-paid { justify-content: center; }
.usage-bar-paid .usage-count {
  font-size: .9rem;
  color: var(--teal);
  text-align: center;
}

/* Guest usage bar (no account) */
.usage-bar-guest .usage-label { color: var(--gray400); }

/* Measure card */
.measure-card {
  background: var(--white);
  border: 1.5px solid var(--gray200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: relative;
}

/* Upload zone */
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 24px 20px;
  gap: 6px;
  cursor: pointer;
  transition: background .2s;
  border: 2px dashed transparent;
}
.upload-zone:hover, .upload-zone.dragover {
  background: rgba(30,200,176,.03);
  border-color: var(--teal);
}
.upload-icon { color: var(--teal); opacity: .6; }
.upload-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 4px;
}
.upload-hint {
  font-size: .76rem;
  color: var(--gray400);
  text-align: center;
}
.upload-privacy {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  color: var(--gray400);
  margin-top: 4px;
}

/* ─── Inline photo guide ─── */
.inline-guide {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.inline-guide-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.inline-guide-img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--gray200);
}
.inline-guide-correct .inline-guide-img {
  border-color: var(--teal);
}
.inline-guide-wrong .inline-guide-img {
  border-color: #f43f5e;
  opacity: .7;
}
.inline-guide-label {
  font-size: .68rem;
  font-weight: 500;
  color: var(--gray600);
}
.inline-guide-correct .inline-guide-label { color: var(--teal2); }
.inline-guide-wrong .inline-guide-label { color: #f43f5e; }

.guide-expand-btn {
  font-size: .72rem;
  color: var(--teal2);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 4px 8px;
}
.guide-expand-btn:hover { color: var(--navy); }

/* Canvas */
.canvas-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 16px;
  background: var(--gray800);
}
#resultCanvas {
  max-width: 100%;
  max-height: 55vh;
  border-radius: 8px;
  display: block;
  cursor: crosshair;
}

/* Drag hint — persistent with close button */
.drag-hint {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.7);
  color: #fff;
  font-size: .72rem;
  padding: 5px 28px 5px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: auto;
  /* No fadeOut animation — stays visible until closed */
}
.drag-hint-close {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.2);
  border: none;
  color: #fff;
  font-size: .85rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: background .15s;
}
.drag-hint-close:hover {
  background: rgba(255,255,255,.4);
}

/* Result panel */
.result-panel {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--gray100);
  flex-wrap: wrap;
}
.result-angle {
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.result-angle-num {
  font-family: var(--font-display);
  font-size: 2.8rem;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.result-angle-unit {
  font-size: 1.2rem;
  color: var(--teal);
  font-weight: 300;
}
.result-meta {
  font-size: .82rem;
  color: var(--gray600);
  margin-top: 2px;
}
.result-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
  align-items: center;
}

/* ─── Inline feedback thumbs ─── */
.inline-feedback {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 6px;
}
.thumb-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: none;
  border: 1.5px solid var(--gray200);
  color: var(--gray400);
  cursor: pointer;
  transition: all .15s;
  padding: 0;
}
.thumb-btn:hover {
  border-color: var(--teal);
  color: var(--teal2);
  background: rgba(30,200,176,.06);
}
.thumb-btn.thumb-active {
  border-color: var(--teal);
  color: var(--teal);
  background: rgba(30,200,176,.1);
}
.thumb-btn.thumb-disabled {
  pointer-events: none;
  opacity: .35;
}
.feedback-thanks {
  font-size: .7rem;
  color: var(--gray400);
  white-space: nowrap;
}
.feedback-thanks a {
  color: var(--teal2);
  text-decoration: underline;
}

/* Signup nudge (light prompt after 1st guest measurement) */
.signup-nudge {
  width: 100%;
  text-align: center;
  border-top: 1px solid var(--gray100);
  padding-top: 12px;
  margin-top: 4px;
}
.signup-nudge p {
  font-size: .82rem;
  color: var(--gray600);
  line-height: 1.5;
}
.signup-nudge a {
  color: var(--teal2);
  font-weight: 600;
  text-decoration: underline;
}

.feedback-row {
  width: 100%;
  text-align: center;
  border-top: 1px solid var(--gray100);
  padding-top: 12px;
  margin-top: 4px;
}
.feedback-btn {
  font-size: .75rem;
  color: var(--gray400);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}
.feedback-btn:hover { color: var(--gray600); }

/* Detecting overlay */
.detecting-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: .88rem;
  color: var(--gray600);
  z-index: 10;
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--gray200);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Detection fail */
.detection-fail {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 12px;
  font-size: .82rem;
  line-height: 1.6;
  color: #9a3412;
}
.detection-fail svg { flex-shrink: 0; margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════════════════════
   HISTORY SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.history-section {
  padding: 8px 0 48px;
}


/* Weekly summary */
.weekly-summary {
  max-width: 720px;
  margin: 0 auto 16px;
}
.weekly-summary-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(30,200,176,.06);
  border: 1px solid rgba(30,200,176,.18);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
}
.weekly-label {
  font-size: .85rem;
  color: var(--gray600);
}
.weekly-change {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--teal);
  font-weight: 700;
}
.weekly-change.negative { color: #f43f5e; }

/* History list */
.history-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  max-width: 720px;
  margin: 0 auto;
}
.history-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--white);
  border: 1px solid var(--gray200);
  border-radius: var(--radius-sm);
  padding: .6rem .9rem;
}
.history-angle {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--teal);
  min-width: 60px;
}
.history-side {
  flex: 1;
  font-size: .82rem;
  color: var(--gray600);
}
.history-mode {
  font-size: .68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.history-mode-flexion {
  background: rgba(30,200,176,.1);
  color: var(--teal2);
}
.history-mode-extension {
  background: rgba(56,189,248,.1);
  color: #0284c7;
}
.history-change {
  font-size: .78rem;
  font-weight: 600;
  min-width: 50px;
  text-align: right;
}
.history-change.positive { color: var(--teal2); }
.history-change.negative { color: #f43f5e; }
.history-change.neutral  { color: var(--gray400); }
.history-date {
  font-size: .76rem;
  color: var(--gray400);
  white-space: nowrap;
}
.history-loading, .history-empty {
  color: var(--gray400);
  font-size: .85rem;
  padding: .5rem 0;
  text-align: center;
}



/* Guest prompt in history */
.history-example-badge {
  text-align: center;
  font-size: .78rem;
  color: var(--gray400);
  background: var(--gray50);
  border: 1px dashed var(--gray200);
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 6px;
}
.history-example-badge a {
  color: #e11d48;
  font-weight: 600;
  text-decoration: underline;
}
.history-example-badge a:hover {
  color: #be123c;
}

.history-guest-prompt {
  text-align: center;
  padding: 32px 20px;
}
.history-guest-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}
.history-guest-text {
  font-size: .9rem;
  color: var(--gray600);
  margin-bottom: 4px;
}
.history-guest-sub {
  font-size: .78rem;
  color: var(--gray400);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRICING
   ═══════════════════════════════════════════════════════════════════════════ */
.section-pricing { background: var(--gray100); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 860px;
  margin: 0 auto;
}
.pricing-card {
  border: 1.5px solid var(--gray200);
  border-radius: var(--radius);
  padding: 32px 24px;
  position: relative;
  transition: box-shadow .25s, transform .25s;
}
.pricing-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.pricing-card-featured {
  border-color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal), var(--shadow-md);
}
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad);
  color: white;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 14px;
  border-radius: 20px;
  white-space: nowrap;
}
.pricing-tier {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gray400);
  margin-bottom: 12px;
}
.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
}
.pricing-amount {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--navy);
  line-height: 1;
}
.pricing-period {
  font-size: .82rem;
  color: var(--gray400);
}
.pricing-save {
  font-size: .75rem;
  font-weight: 600;
  color: var(--teal2);
  margin-bottom: 20px;
}
.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
  margin-top: 20px;
}
.pricing-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--gray800);
}
.pricing-features li.muted { color: var(--gray400); }
.pricing-features svg { flex-shrink: 0; color: var(--teal); }
.pricing-features li.muted svg { color: var(--gray400); }

.pricing-note {
  text-align: center;
  margin-top: 24px;
  font-size: .78rem;
  color: var(--gray400);
}
.pricing-note a { color: var(--teal2); text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════════════════
   STORY
   ═══════════════════════════════════════════════════════════════════════════ */
.section-story {
  background: var(--navy);
  color: var(--white);
}
.section-story .section-title { color: var(--white); }

.story-inner {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 60px;
  align-items: center;
}
.story-text .section-tag {
  color: var(--teal);
  background: rgba(30,200,176,.1);
  border-color: rgba(30,200,176,.25);
}
.story-text p {
  color: rgba(255,255,255,.65);
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 12px;
  font-size: .9rem;
}
.story-sig {
  color: rgba(255,255,255,.4) !important;
  font-size: .82rem;
  font-style: italic;
}

.story-visual {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.story-stat-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
}
.story-stat-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 4px;
}
.story-stat-label {
  font-size: .78rem;
  color: rgba(255,255,255,.45);
}
.story-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: rgba(255,255,255,.5);
  border-left: 2px solid var(--teal);
  padding-left: 16px;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */
.footer {
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--white);
}
.footer-name { font-size: .85rem; }
.footer-by { font-size: .75rem; color: rgba(255,255,255,.35); }
.footer-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: .78rem;
  color: rgba(255,255,255,.45);
  transition: color .2s;
}
.footer-links a:hover { color: var(--teal); }
.footer-copy {
  width: 100%;
  font-size: .72rem;
  color: rgba(255,255,255,.2);
  text-align: center;
  margin-top: 12px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } }

.modal {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 32px;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: slideUp .25s ease;
  margin: auto 0;
  flex-shrink: 0;
}
.modal-sm { max-width: 380px; padding: 32px 28px; }
.modal-guide {
  max-width: 560px;
}
@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
}
.modal-close {
  position: absolute;
  top: 14px; right: 18px;
  font-size: 1.3rem;
  color: var(--gray400);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color .15s;
}
.modal-close:hover { color: var(--navy); }
.modal-icon {
  font-family: var(--font-display);
  font-size: 2.2rem;
  text-align: center;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 10px;
  text-align: center;
}
.modal-sub {
  font-size: .85rem;
  color: var(--gray600);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.6;
}
.modal-note {
  font-size: .75rem;
  color: var(--gray400);
  text-align: center;
  margin-top: 14px;
  line-height: 1.5;
}
.modal-note a { color: var(--teal2); text-decoration: underline; }

/* Login divider */
.login-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray200);
}
.login-divider span {
  font-size: .78rem;
  color: var(--gray400);
  text-transform: lowercase;
}

/* Magic link form */
.magic-link-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.magic-email-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray200);
  border-radius: 8px;
  font-size: .9rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color .2s;
}
.magic-email-input:focus {
  border-color: var(--teal);
}
.magic-link-note {
  font-size: .75rem;
  color: var(--gray400);
  text-align: center;
}

/* Google sign-in container */
.google-signin-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}

/* Paywall plan selector */
.paywall-plans {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.plan-option {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid var(--gray200);
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: border-color .2s;
}
.plan-option:has(input:checked) {
  border-color: var(--teal);
  background: rgba(30,200,176,.04);
}
.plan-option input[type="radio"] { accent-color: var(--teal); }
.plan-label { flex: 1; }
.plan-name {
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}
.plan-price { font-size: .78rem; color: var(--gray600); }
.plan-badge {
  font-size: .65rem;
  font-weight: 600;
  background: rgba(30,200,176,.12);
  color: var(--teal2);
  border-radius: 20px;
  padding: 2px 8px;
}

/* ─── Photo Guide Modal ─── */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-height: 55vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.guide-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--gray200);
}
.guide-correct { border-color: var(--teal); }
.guide-wrong { border-color: #fecaca; }


.guide-card-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.guide-card-label {
  padding: 6px 10px;
  font-size: .78rem;
  font-weight: 600;
}
.guide-label-correct {
  background: rgba(30,200,176,.08);
  color: var(--teal2);
}
.guide-label-wrong {
  background: #fef2f2;
  color: #dc2626;
}
.guide-card-desc {
  padding: 0 10px 10px;
  font-size: .72rem;
  color: var(--gray600);
  line-height: 1.4;
}

/* Feedback modal */
.feedback-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

/* Mobile: hide desktop guide, show mobile guide */
.inline-guide-mobile { display: flex; }
.photo-guide-strip { display: block; }


@media (max-width: 900px) {
  .measure-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .measure-info {
    padding-top: 0;
    text-align: center;
  }
  .measure-title { font-size: clamp(1.6rem, 5vw, 2.2rem); }
  .measure-features { display: none; }
  .inline-guide-mobile { display: flex; }
  .photo-guide-strip { display: none; } /* mobile uses inline guide inside upload zone */
  .measure-tool {
    position: static;
  }
  .measure-card { max-width: 560px; margin: 0 auto; }
  .usage-bar { max-width: 560px; margin-left: auto; margin-right: auto; }
  .detection-fail { max-width: 560px; }
  .story-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 380px;
  }
}

/* Desktop: hide mobile guide, show full-width photo guide strip */
@media (min-width: 901px) {
  .inline-guide-mobile { display: none; }
  .photo-guide-strip { display: block; }
  .measure-slogan br { display: none; }
  /* Align left info panel top with right tool panel */
  .measure-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .section { padding: 48px 0; }
  .nav-links { display: none; }
  .section-measure { padding-top: calc(var(--nav-h) + 12px); padding-bottom: 24px; }
  .measure-card { border-radius: 12px; }
  .upload-zone { padding: 24px 16px 20px; }
  .mode-btn { padding: 10px 12px; font-size: .8rem; }
  .result-panel { flex-direction: column; align-items: flex-start; padding: 16px 18px; }
  .result-actions { margin-left: 0; }
  .guide-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .modal { padding: 28px 20px; }

  .modal-guide {
    max-width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal-guide .guide-grid {
    max-height: none;
    overflow: visible;
  }
}

/* ─── UTILITY ────────────────────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ─── HOMEPAGE BLOG ENTRY ────────────────────────────────────────────────── */
.section-blog-entry {
  padding: 48px 0;
  background: var(--navy);
}
.blog-entry-card {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: 36px 28px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(255,255,255,.05);
  transition: border-color .25s, box-shadow .25s;
}
.blog-entry-card:hover {
  border-color: var(--teal);
  box-shadow: 0 8px 32px rgba(30, 200, 176, .15);
}
.blog-entry-icon {
  font-size: 1.6rem;
  margin-bottom: 12px;
}
.blog-entry-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 8px;
}
.blog-entry-desc {
  font-size: .9rem;
  color: rgba(255,255,255,.6);
  margin-bottom: 20px;
  line-height: 1.5;
}
.section-blog-entry .btn-outline {
  color: var(--white);
  border-color: rgba(255,255,255,.3);
}
.section-blog-entry .btn-outline:hover {
  border-color: var(--teal);
  color: var(--teal);
}

/* Result actions: Download + New photo on same row */
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.result-actions > .btn {
  flex: 1;
  min-width: 0;
}
.result-actions > .inline-feedback {
  width: 100%;
  justify-content: center;
  margin-top: 0.25rem;
}
