/* ── Self-hosted JomaNeue (the site's primary face, à la qoves) ── */
@font-face { font-family: "JomaNeue"; src: url("/webfonts/JomaNeue-Hairline.woff2") format("woff2"); font-weight: 100; font-style: normal; font-display: swap; }
@font-face { font-family: "JomaNeue"; src: url("/webfonts/JomaNeue-HairlineItalic.woff2") format("woff2"); font-weight: 100; font-style: italic; font-display: swap; }
@font-face { font-family: "JomaNeue"; src: url("/webfonts/JomaNeue-Light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "JomaNeue"; src: url("/webfonts/JomaNeue-LightItalic.woff2") format("woff2"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "JomaNeue"; src: url("/webfonts/JomaNeue-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "JomaNeue"; src: url("/webfonts/JomaNeue-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "JomaNeue"; src: url("/webfonts/JomaNeue-Semibold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "JomaNeue"; src: url("/webfonts/JomaNeue-SemiboldItalic.woff2") format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: "JomaNeue"; src: url("/webfonts/JomaNeue-Extrabold.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "JomaNeue"; src: url("/webfonts/JomaNeue-ExtraboldItalic.woff2") format("woff2"); font-weight: 800; font-style: italic; font-display: swap; }

:root {
  /* ── Muted dusty-blue system (accent sampled from #b5c7d2) ── */
  --bg: #eef1f6;
  --bg-2: #f8fafc;
  --surface: #ffffff;
  --surface-2: #e8edf3;
  --border: #e1e7ef;
  --border-2: #ccd6e1;

  --text: #1b2331;
  --muted: #6b7585;

  --primary: #5b7a99;       /* muted dusty blue (usable accent) */
  --primary-600: #47607a;   /* darker, for hover */
  --primary-300: #b5c7d2;   /* the sampled swatch */
  --primary-100: #dde4ec;
  --primary-50: #eef2f6;

  --ok: #178a63;
  --warn: #c2891f;
  --danger: #d83c3c;

  --shadow-sm: 0 1px 2px rgba(20, 28, 48, .05);
  --shadow: 0 10px 34px rgba(20, 28, 48, .07);
  --shadow-lg: 0 28px 64px rgba(20, 28, 48, .12);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "JomaNeue", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-heading: var(--font);
}

/* Headings use the Neue Montreal-style display face */
h1, h2, h3, .hero h2, .sent-title, .brand h1 { font-family: var(--font-heading); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* beats display:flex on hidden .step-actions, etc. */
/* Lock the viewport against any horizontal pan. The full-bleed intro (dividers +
   carousel bleed to the screen edges via negative margins); on mobile that let
   the <html> element pan ~20px sideways past body's overflow:hidden. Clipping
   overflow-x at the root stops it. `clip` leaves vertical scrolling untouched
   (long admin/gallery pages still scroll); `hidden` is the fallback. */
html, body { height: 100%; overflow-x: hidden; overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1200px 560px at 50% -12%, var(--bg-2) 0%, var(--bg) 60%) fixed,
    var(--bg);
  color: var(--text);
  line-height: 1.55;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* The wizard is a fixed-height app; never let the page itself scroll. */
body:has(.app) { overflow: hidden; }

a { color: var(--primary-600); text-underline-offset: 2px; }

/* ── App shell (no-scroll wizard) ── */
/* Size to the SMALL viewport (svh): the visible area with the browser's UI
   shown. This keeps the bottom of the fold (scroll cue) and the pinned action
   bars above Chrome's retractable bottom bar — consistent with Safari, where
   100% already excluded it. svh is static (unlike dvh), so there's no
   dvh/innerHeight jitter that would push the pinned bar offscreen.
   100% is the fallback for browsers without svh support. */
.app {
  height: 100%;
  height: 100svh;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
}
/* Sticky header: transparent at the top, frosted/darker once the page scrolls (qoves-style) */
.topbar { flex: none; padding: 16px 0 12px; position: relative; z-index: 20; }
.topbar::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw;
  transform: translateX(-50%); z-index: -1; pointer-events: none;
  background: rgba(231, 236, 242, 0);
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0);
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
.topbar.scrolled::before {
  background: rgba(225, 231, 239, 0.82);
  border-bottom-color: var(--border-2);
  box-shadow: 0 6px 22px rgba(20, 28, 48, .07);
  -webkit-backdrop-filter: saturate(150%) blur(14px); backdrop-filter: saturate(150%) blur(14px);
}
.stage { flex: 1; min-height: 0; position: relative; }

.topbar-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 9px;
  background: url(/img/logo.svg) center / contain no-repeat;
}
.brand h1 { font-size: 16px; font-weight: 600; margin: 0; letter-spacing: -0.02em; color: var(--text); }
/* Compact "Get started" in the header (intro only) */
.topbar-cta { padding: 9px 18px; font-size: 14px; }

.progress { display: flex; gap: 6px; margin-top: 12px; }
.progress.hidden { display: none; }
.progress .seg { height: 4px; flex: 1; border-radius: 99px; background: var(--border-2); transition: background .35s ease; }
.progress .seg.done { background: var(--primary); }

/* Steps fill the stage; only the body scrolls, actions stay pinned. */
.step { display: none; height: 100%; flex-direction: column; }
.step.active { display: flex; animation: fade .28s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.step-body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: clip; padding: 6px 2px 10px; }
.step-body.center-body { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
/* Tall steps: keep horizontal centering but pin to the top so the heading can't
   be clipped above the scroll area (the flex justify-content:center overflow bug). */
.step-body.center-body.top { justify-content: flex-start; padding-top: 14px; }
.step-actions {
  flex: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 0 18px; border-top: 1px solid var(--border);
}
.step-actions.center { justify-content: center; }

/* Qoves-style headings: regular weight (400), tight line-height, slight negative tracking */
h2 { margin: 0 0 12px; font-size: 28px; font-weight: 400; letter-spacing: -0.018em; line-height: 1.14; }
h3 { font-weight: 500; letter-spacing: -0.015em; }
.lead { color: var(--muted); margin: 0 0 20px; line-height: 1.62; font-size: 16px; }
.lead.small { font-size: 14.5px; margin-bottom: 16px; }

/* Hero / carousel (intro) — this step scrolls; Get Started stays pinned below. */
/* Intro scroll area spans the full screen width (cancels the .app 20px side
   padding) so dividers can run edge-to-edge; content keeps its gutters below. */
.intro-body { display: block; padding: 6px 0 18px; margin-inline: -20px; overflow-x: clip; }
.intro-body > *:not(.section-sep) { padding-inline: 20px; }
.hero { text-align: center; padding: 22px 6px 18px; }
.hero h2 { font-size: clamp(42px, 11vw, 68px); font-weight: 300; letter-spacing: -0.025em; line-height: 1.04; color: var(--text); }
.hero h2 .accent { font-style: italic; color: var(--primary); }

/* Emphasis in the funnel: carousel-accent color AND bold, so it stands out. */
.app strong { font-weight: 700; color: var(--primary); }
.hero .lead { max-width: 500px; margin: 14px auto 0; font-size: 16px; color: var(--muted); }
.hero-cta { text-align: center; margin-top: 20px; }
.hero-cta .btn.big { width: auto; max-width: none; padding: 15px 44px; }

/* First fold: carousel + heading + CTA always fit exactly one screen. JS sizes
   the carousel to whatever vertical space is left after the heading + lead +
   button, so the whole fold fits any viewport (see fitIntroFold in wizard.js).
   The CSS `height` is a close fallback for the very first paint — without it the
   ports (height:100%) resolve against an auto-height track and flash full-size
   for a frame before JS measures. JS then sets the exact pixel height. */
.intro-fold { display: flex; flex-direction: column; }
.intro-fold .hero-carousel {
  flex: none; min-height: 0; grid-template-rows: 1fr 1fr; margin: 0;
  height: clamp(180px, calc(100svh - 310px), 520px);
}
.intro-fold .hero-carousel .marquee { min-height: 0; height: 100%; }
.intro-fold .hero-carousel .track { height: 100%; }
.intro-fold .hero-carousel .port { height: 100%; width: auto; }
.intro-fold .hero { flex: 0 0 auto; padding: 12px 6px 4px; }
.intro-fold .hero-cta { margin-top: 14px; }

/* "More below" scroll hint at the bottom of the first fold */
.scroll-cue {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin: 16px auto 0; padding: 4px 10px; border: 0; background: none; cursor: pointer;
  color: var(--muted); font: inherit;
}
.scroll-cue .chev {
  width: 11px; height: 11px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); animation: scroll-cue-bounce 1.8s ease-in-out infinite;
}
.scroll-cue:hover { color: var(--text); }
@keyframes scroll-cue-bounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: .55; }
  50% { transform: rotate(45deg) translate(2px, 2px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .scroll-cue .chev { animation: none; } }

/* Faint single hairline divider between landing sections (qoves-style),
   running edge-to-edge across the full-bleed intro scroll area. */
.section-sep {
  width: 100%; max-width: none; height: 0; margin: 34px 0; border: 0;
  border-top: 1px solid var(--border);
}

/* Landing content sections */
.info-block { max-width: 580px; margin: 28px auto 14px; text-align: center; }
.info-block h3 { font-size: 20px; margin: 0 0 8px; letter-spacing: -0.01em; }
.info-block p { color: var(--muted); line-height: 1.62; font-size: 15px; margin: 0; }

/* ── Qoves-style section headings: regular weight, large, tight tracking ── */
.info-block h3.q-title {
  font-size: clamp(32px, 9vw, 40px);
  line-height: 1.2;
  font-weight: 300;
  letter-spacing: -0.6px;
  color: var(--text);
  margin: 0;
}
.q-head { text-align: center; margin: 30px 0 18px; }
.q-type {
  display: inline-block;
  text-transform: uppercase;
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 99px;
}
.q-name {
  font-size: clamp(26px, 7.5vw, 32px);
  line-height: 1.15;
  font-weight: 300;
  letter-spacing: -0.48px;
  color: var(--text);
  margin: 10px 0 0;
}

/* 2-up stylish examples grid */
.portrait-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 460px; margin: 10px auto 6px; }
.pg-item { margin: 0; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--surface-2); }
.pg-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Use-case grid: label + a pair of portraits per case ── */
.usecase-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px 16px;
  max-width: 620px;
  margin: 18px auto 6px;
}
.usecase-title {
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text);
  margin: 0 0 10px;
}
@media (max-width: 380px) {
  .usecase-list { gap: 22px 12px; }
  .usecase-title { font-size: 14px; }
}

.example { margin: 8px auto; max-width: 620px; text-align: center; }
.example img { width: 100%; border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow); display: block; }
.example figcaption { color: var(--muted); font-size: 13px; margin-top: 9px; }

/* Interactive before/after block (tap a photo to enlarge) */
.ba-block { max-width: 480px; margin: 10px auto 6px; }
.ba-head { text-align: center; margin: 14px 0 10px; }
.ba-title { display: block; font-size: 22px; font-weight: 800; letter-spacing: 2px; line-height: 1.1; }
.ba-title.before { color: var(--muted); }
.ba-title.after { color: var(--primary); }
.ba-sub { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.ba-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
/* AFTER row spans the full block width (same horizontal length as the 3 BEFORE
   images), so the 2 after portraits render wider. */
.ba-grid.after { grid-template-columns: repeat(2, 1fr); }
.ba-thumb {
  padding: 0; border: 1px solid var(--border); border-radius: 13px; overflow: hidden; cursor: pointer;
  aspect-ratio: 3 / 4; background: var(--surface-2); box-shadow: var(--shadow-sm);
  transition: transform .08s ease, box-shadow .2s ease;
}
.ba-thumb:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.ba-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ba-arrow { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; margin: 16px 0 4px; }
.ba-arrow-icon {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--primary); color: var(--primary-600); font-size: 18px; font-weight: 700;
  background: var(--surface); box-shadow: var(--shadow-sm);
}

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(16, 42, 71, .82); backdrop-filter: blur(4px); animation: fade .2s ease; }
.lightbox-img { position: relative; max-width: 92vw; max-height: 88vh; border-radius: 14px; box-shadow: var(--shadow-lg); animation: pop .22s ease; }
.lightbox-close {
  position: absolute; top: 18px; right: 18px; z-index: 2; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .92); color: var(--text); font-size: 24px; line-height: 1; cursor: pointer;
}
.lightbox-close:hover { background: #fff; }

/* Collaborative chat-log mockup */
.chat-mock { max-width: 470px; margin: 16px auto 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 16px 16px 18px; }
.chat-head { font-size: 13px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-bottom: 13px; padding-bottom: 11px; border-bottom: 1px solid var(--border); }
.chat-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(21, 160, 122, .16); }
.chat-row { display: flex; margin-bottom: 8px; }
.chat-row.me { justify-content: flex-end; }
.bubble { max-width: 80%; padding: 9px 13px; border-radius: 15px; font-size: 13.5px; line-height: 1.42; }
.chat-row.them .bubble { background: var(--surface-2); color: var(--text); border-bottom-left-radius: 5px; }
.chat-row.me .bubble { background: linear-gradient(135deg, var(--primary), var(--primary-600)); color: #fff; border-bottom-right-radius: 5px; }
.bubble-img { background: var(--primary-50); border: 1px dashed var(--primary-100); color: var(--primary-600); font-style: italic; }
/* Mini portrait previews inside the chat */
.chat-styles { display: flex; gap: 7px; }
.cs-card {
  width: 58px; height: 76px; border-radius: 10px; object-fit: cover; display: block;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}

.intro-foot { text-align: center; color: var(--muted); font-size: 14px; font-weight: 600; margin: 20px auto 2px; }

.see-more-wrap { text-align: center; margin: 26px auto 10px; }

/* ── Browse-all gallery page (/examples) ──
   App-shell: pinned Back bar on top, scrolling gallery in the middle, pinned
   Get Started on the bottom — so the CTA is always visible while browsing. */
body:has(.gallery) { overflow: hidden; }
.gallery { height: 100%; display: flex; flex-direction: column; }
.gallery-bar {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.gallery-back {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  font-size: 15px; font-weight: 600; color: var(--text);
  padding: 8px 14px 8px 10px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.gallery-back:hover { border-color: var(--primary-300); color: var(--primary-600); }
.gallery-main { flex: 1; min-height: 0; overflow-y: auto; padding: 20px; }
.gallery-main > .masonry, .gallery-intro { max-width: 1120px; margin-left: auto; margin-right: auto; }
.gallery-intro { text-align: center; color: var(--muted); margin: 2px auto 22px; font-size: 15px; }
.gallery-cta {
  flex: none; display: flex; justify-content: center; padding: 14px 20px;
  background: var(--surface); border-top: 1px solid var(--border);
}
.masonry { column-count: 4; column-gap: 14px; }
@media (max-width: 980px) { .masonry { column-count: 3; } }
@media (max-width: 680px) { .masonry { column-count: 2; column-gap: 10px; } }
.masonry-item {
  break-inside: avoid; margin: 0 0 14px; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm); background: var(--surface-2);
}
.masonry-item img { width: 100%; height: auto; display: block; }

.carousel { position: relative; display: grid; gap: 12px; margin-bottom: 14px; }
/* Big hero carousel: two rows fill ~55% of the viewport, heading sits below it */
.hero-carousel { gap: 14px; margin: 4px 0 6px; }
.hero-carousel .port { width: auto; height: clamp(150px, 27vh, 300px); }
/* Native horizontal scroll (swipeable on touch); JS drives the gentle auto-drift */
.marquee {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* old Edge */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 2.5%, #000 97.5%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 2.5%, #000 97.5%, transparent);
}
.marquee::-webkit-scrollbar { display: none; }  /* Chrome/Safari */
.track { display: flex; gap: 12px; width: max-content; }

.port {
  flex: none; margin: 0; width: 124px; aspect-ratio: 3 / 4;
  border-radius: 13px; overflow: hidden; background: var(--surface-2);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.port img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Buttons */
.btn {
  appearance: none; border: 0; cursor: pointer; font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  padding: 13px 26px; border-radius: 999px; color: #fff;
  background: var(--primary);
  box-shadow: 0 1px 2px rgba(20, 28, 48, .12), 0 8px 20px rgba(91, 122, 153, .26);
  transition: transform .12s ease, box-shadow .25s ease, background .2s ease, opacity .2s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--primary-600); box-shadow: 0 2px 4px rgba(20, 28, 48, .12), 0 12px 26px rgba(91, 122, 153, .32); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.big { padding: 16px 40px; font-size: 16px; width: 100%; max-width: 360px; }
.btn.secondary { background: var(--surface); border: 1px solid var(--border-2); color: var(--text); box-shadow: var(--shadow-sm); }
.btn.secondary:hover { background: var(--surface); border-color: var(--muted); box-shadow: var(--shadow); }
.btn.ghost { background: transparent; color: var(--muted); padding: 13px 12px; box-shadow: none; }
.btn.ghost:hover { background: transparent; color: var(--text); box-shadow: none; }
.btn.link-btn { background: none; box-shadow: none; color: var(--primary-600); padding: 6px 10px; font-size: 14px; }
.btn.link-btn:hover { background: none; transform: none; box-shadow: none; text-decoration: underline; }

/* Upload */
.dropzone {
  border: 2px dashed var(--border-2); border-radius: var(--radius);
  padding: 22px 20px; text-align: center; cursor: pointer; background: var(--primary-50);
  transition: border-color .2s, background .2s;
}
.dropzone.compact { padding: 18px; }
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-100); }
.dropzone strong { color: var(--text); font-size: 15px; }
.dz-optional { display: block; margin: 0 0 5px; color: var(--muted); font-size: 14px; font-weight: 600; }
.dropzone p { color: var(--muted); margin: 5px 0 0; font-size: 13.5px; }
/* "Photos like these work great" example strip on the upload step */
/* Upload tips — concise checklist instead of a paragraph */
.tips-intro { margin-bottom: 8px; }
.tips { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.tips li {
  position: relative; padding-left: 26px; color: var(--muted);
  font-size: 14.5px; line-height: 1.5;
}
.tips li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--primary); font-weight: 700;
}
.tips strong { color: var(--text); font-weight: 600; }

.upload-examples { margin: 0 0 14px; }
/* Upload Photos call-to-action (page 1a) + Add-more (page 1b) */
.upload-cta { text-align: center; margin: 20px 0 4px; }
.upload-cta .btn.big { width: auto; max-width: none; padding: 15px 48px; }
.upload-hint { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.manage-actions { text-align: center; margin-top: 16px; }
.ue-label { font-size: 13px; font-weight: 650; color: var(--ok); margin-bottom: 8px; }
.ue-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.ue-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 9px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); display: block; }
@media (max-width: 520px) { .ue-grid { grid-template-columns: repeat(3, 1fr); } }

.counter { margin: 14px 0 4px; font-weight: 650; color: var(--text); font-size: 14px; }
.counter .need { color: var(--warn); }
.counter .ok { color: var(--ok); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 9px; margin-top: 12px; }
.thumb { position: relative; aspect-ratio: 3/4; border-radius: 11px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .rm {
  position: absolute; top: 5px; right: 5px; width: 23px; height: 23px; border-radius: 50%;
  border: 0; background: rgba(16, 42, 71, .62); color: #fff; cursor: pointer; font-size: 15px; line-height: 1;
  display: grid; place-items: center;
}
.thumb .rm:hover { background: var(--danger); }
.thumb.uploading { opacity: .55; }
.thumb .spin { position: absolute; inset: 0; display: grid; place-items: center; color: var(--primary-600); font-size: 13px; }

/* Style picker (image tiles) */
.styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 11px; }
.style-card {
  position: relative; padding: 0; border: 2px solid var(--border); border-radius: 14px; overflow: hidden;
  cursor: pointer; background: var(--surface-2); aspect-ratio: 3/4; box-shadow: var(--shadow-sm);
  transition: border-color .15s, transform .08s, box-shadow .2s;
}
.style-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.style-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.style-card .tick {
  position: absolute; top: 7px; right: 7px; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(16,42,71,.35); color: #fff; display: grid; place-items: center; font-size: 14px;
  opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; backdrop-filter: blur(2px);
}
.style-card.selected { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.style-card.selected .tick { opacity: 1; transform: scale(1); background: var(--primary); }

/* Forms */
.field { margin-bottom: 17px; }
.field label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 13.5px; letter-spacing: -0.01em; color: var(--text); }
.field .hint { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="password"], .select-full {
  width: 100%; padding: 13px 15px; border-radius: var(--radius-sm); border: 1px solid var(--border-2);
  background: var(--surface); color: var(--text); font-size: 15px; font-family: inherit;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field input::placeholder { color: #aab4c4; }
.field-note { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; background: var(--primary-50); border: 1px solid var(--primary-100); border-radius: 10px; padding: 9px 12px; }
.field input:focus, .select-full:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-50); }
.consent { display: flex; gap: 12px; align-items: flex-start; background: var(--primary-50);
  border: 1px solid var(--primary-100); border-radius: 12px; padding: 14px; text-align: left; }
.consent.compact { max-width: 440px; margin: 4px auto 0; }
.consent input { margin-top: 2px; width: 18px; height: 18px; flex: none; accent-color: var(--primary); }
.consent .privacy { color: var(--muted); font-size: 12.5px; line-height: 1.5; }

.error-msg { color: var(--danger); font-size: 14px; margin-top: 10px; min-height: 18px; font-weight: 500; }

/* Pricing */
.price-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px 28px; margin: 6px auto 16px; max-width: 420px; width: 100%;
}
.price { font-size: 54px; font-weight: 800; letter-spacing: -0.03em; line-height: 1;
  background: linear-gradient(120deg, var(--primary), var(--primary-600)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.price .cur { font-size: 30px; vertical-align: super; margin-right: 2px; }
.price-sub { color: var(--muted); margin-top: 8px; font-size: 16px; }
.price-points { list-style: none; margin: 18px 0 0; padding: 0; text-align: left; display: grid; gap: 9px; }
.price-points li { position: relative; padding-left: 26px; color: var(--text); font-size: 14px; }
.price-points li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--ok); font-weight: 800; }

/* Processing animation — the user's photos being sent */
.processing { display: flex; flex-direction: column; align-items: center; gap: 22px; width: 100%; max-width: 380px; }
/* Tiles flex to 1/5 of the row so exactly 5 fit per row at any width; up to 10
   photos → two rows of 5, fewer photos → centered partial rows. */
.proc-photos { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; min-height: 92px; max-width: 340px; margin: 0 auto; }
.proc-photo {
  flex: 0 0 calc(20% - 6.4px); max-width: 64px; aspect-ratio: 3/4; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow);
  border: 2px solid #fff; opacity: 0; transform: translateY(14px) scale(.9);
  animation: proc-in .5s ease forwards, proc-float 2.4s ease-in-out infinite;
}
.proc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes proc-in { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes proc-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* Confirmation: make "Application sent" obvious + waitlist badge */
.sent-check { font-size: 60px; line-height: 1; margin-bottom: 6px; animation: pop .3s ease; }
.sent-title { font-size: 32px; }
/* Yellow/amber "pending" badge — they're waitlisted, not in yet */
.waitlist-badge {
  display: inline-block; margin: 10px 0 16px; padding: 8px 18px; border-radius: 99px;
  background: linear-gradient(135deg, #ffd569, #f3a72e); color: #6e4d0c;
  font-weight: 700; font-size: 16px; box-shadow: 0 6px 16px rgba(224, 154, 31, .32);
}

/* Confetti celebration on the confirmation screen */
.confetti-host { position: relative; }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.confetti-piece {
  position: absolute; top: -16px; width: 8px; height: 14px; border-radius: 2px; opacity: 0;
  animation-name: confetti-fall; animation-timing-function: ease-in;
  animation-iteration-count: 1; animation-fill-mode: forwards;
}
@keyframes confetti-fall {
  0% { opacity: 0; transform: translateY(-20px) rotate(0deg); }
  8% { opacity: 1; }
  100% { opacity: 0; transform: translateY(86vh) rotate(620deg); }
}
.confetti-host .result { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }

/* Loader (generation theater) */
.loader { display: flex; flex-direction: column; align-items: center; gap: 20px; width: 100%; max-width: 360px; }
.spinner { width: 56px; height: 56px; border-radius: 50%; border: 5px solid var(--primary-100); border-top-color: var(--primary); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loader-bar { width: 100%; height: 8px; border-radius: 99px; background: var(--primary-100); overflow: hidden; }
.loader-fill { height: 100%; width: 0%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), var(--primary-300)); transition: width .4s ease; }
.loader-text { color: var(--muted); font-size: 15px; font-weight: 600; margin: 0; }

/* Result */
.result { max-width: 480px; }
.result .big { font-size: 56px; margin-bottom: 8px; }
.result .tip { background: var(--primary-50); border: 1px solid var(--primary-100); border-radius: 12px;
  padding: 13px 16px; color: var(--text); font-size: 13.5px; line-height: 1.5; margin-top: 8px; }
.boost-card { background: var(--primary-50); border: 1px solid var(--primary-100); border-radius: 14px;
  padding: 15px 18px; margin-top: 18px; max-width: 460px; }
.boost-card p { margin: 0; color: var(--text); font-size: 14.5px; line-height: 1.5; }
.improve-h { font-size: 17px; margin: 18px 0 4px; }

/* ── Modal (see more) ── */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16, 42, 71, .45); backdrop-filter: blur(3px); animation: fade .2s ease; }
.modal-panel {
  position: relative; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 720px; max-height: 86vh; display: flex; flex-direction: column; overflow: hidden;
  animation: pop .22s ease;
}
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(10px); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-close { border: 0; background: var(--surface-2); width: 32px; height: 32px; border-radius: 50%; font-size: 20px; color: var(--muted); cursor: pointer; line-height: 1; }
.modal-close:hover { background: var(--primary-100); color: var(--primary-600); }
/* Flex-wrap (not grid) so items size reliably inside the scrolling panel —
   same fixed-width + aspect-ratio pattern the intro carousel uses. */
.modal-grid { padding: 16px 20px; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-content: flex-start; }
.m-port { flex: none; margin: 0; width: 132px; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.m-port img { width: 100%; height: 100%; object-fit: cover; display: block; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: center; }

/* ── Admin ── (normal scrolling page) */
.wrap { width: 100%; max-width: 860px; margin: 0 auto; padding: 28px 20px 64px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.admin-head h1 { font-size: 21px; margin: 0; }
.admin-head a { color: var(--primary-600); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  padding: 7px 14px; border-radius: 99px; border: 1px solid var(--border);
  color: var(--muted); text-decoration: none; font-size: 13px; background: var(--surface); box-shadow: var(--shadow-sm);
  transition: border-color .15s, color .15s, background .15s;
}
.chip:hover { border-color: var(--primary-300); }
.chip.active { color: var(--primary-600); border-color: var(--primary); background: var(--primary-50); font-weight: 600; }
table.list { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
table.list th, table.list td { text-align: left; padding: 13px 15px; border-bottom: 1px solid var(--border); font-size: 14px; }
table.list th { color: var(--muted); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2); }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr:hover { background: var(--primary-50); }
table.list a { text-decoration: none; color: var(--primary-600); }
.badge { display: inline-block; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 650; }
.badge.submitted { background: var(--primary-100); color: var(--primary-600); }
.badge.selected { background: #d6f3e9; color: var(--ok); }
.badge.needs_better_photos { background: #fbedd2; color: var(--warn); }
.badge.rejected { background: #fbdcdd; color: var(--danger); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin: 16px 0; }
.photo-grid a { display: block; aspect-ratio: 3/4; border-radius: 11px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
/* Admin: manage example photos */
.ex-manage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.ex-manage-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.ex-manage-item img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.ex-manage-item form { margin: 0; }
.ex-del { width: 100%; border: 0; border-top: 1px solid var(--border); background: var(--surface); color: var(--danger); font-weight: 650; font-size: 13px; padding: 9px; cursor: pointer; }
.ex-del:hover { background: #fbdcdd; }
/* Curation controls on the example manager */
.ex-flags { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-top: 1px solid var(--border); }
.ex-flags label { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text); cursor: pointer; }
.ex-flags input { accent-color: var(--primary); width: 15px; height: 15px; }
.ex-curate-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; color: var(--muted); font-size: 14px; }

.style-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.style-thumbs img { width: 64px; aspect-ratio: 3/4; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 9px 16px; margin: 14px 0; font-size: 14px; }
.kv .k { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.panel h3 { margin: 0 0 12px; font-size: 15px; }
textarea { width: 100%; min-height: 84px; padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-2);
  background: var(--surface); color: var(--text); font-family: inherit; font-size: 14px; }
textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
select { padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: var(--surface);
  color: var(--text); font-size: 14px; }
select:focus { outline: none; border-color: var(--primary); }
.login-wrap { max-width: 380px; margin: 72px auto; }
.site-foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 22px; }

@media (max-width: 560px) {
  h2 { font-size: 22px; }
  .hero h2 { font-size: clamp(28px, 9vw, 44px); }
  .port { width: 104px; }
  .price { font-size: 46px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv .k { margin-top: 8px; }
}

/* ── Terms & Conditions ── */
/* Inline "Terms & Conditions" trigger inside the consent copy */
.terms-link {
  appearance: none; border: 0; background: none; padding: 0; margin: 0;
  font: inherit; color: var(--primary-600); font-weight: 600; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
}
.terms-link:hover { color: var(--primary); }

.terms-status { max-width: 440px; margin: 8px auto 0; text-align: center; font-size: 12.5px; min-height: 18px; }
.terms-status .ts-done { display: none; color: var(--ok); font-weight: 600; }
.terms-status .ts-pending { color: var(--muted); }
.terms-status[data-state="done"] .ts-pending { display: none; }
.terms-status[data-state="done"] .ts-done { display: inline; }

/* Full-screen scroll-gated modal */
.terms-modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: rgba(20, 28, 48, .55);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: fade .2s ease;
}
.terms-modal[hidden] { display: none; }
body.terms-open { overflow: hidden; }

.terms-panel {
  display: flex; flex-direction: column;
  width: 100%; max-width: 720px; height: min(92vh, 900px);
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
}

.terms-header { flex: none; padding: 18px 22px 12px; border-bottom: 1px solid var(--border); }
.terms-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.terms-header h2 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.terms-close {
  appearance: none; border: 0; background: none; cursor: pointer;
  font-size: 26px; line-height: 1; color: var(--muted); padding: 2px 6px; border-radius: 8px;
}
.terms-close:hover { color: var(--text); background: var(--surface-2); }
.terms-meta { margin: 6px 0 10px; color: var(--muted); font-size: 12.5px; }
.terms-progress { height: 5px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.terms-progress-fill { height: 100%; width: 0; background: var(--primary); transition: width .15s ease; }

.terms-body {
  flex: 1; min-height: 0; overflow-y: auto; padding: 18px 22px;
  -webkit-overflow-scrolling: touch; scroll-behavior: smooth;
}
.terms-body:focus { outline: none; }
.terms-intro-note {
  background: var(--primary-50); border: 1px solid var(--primary-100); border-radius: 12px;
  padding: 12px 14px; margin: 0 0 18px; color: var(--text); font-size: 13.5px; line-height: 1.55;
}
.terms-section { margin: 0 0 22px; }
.terms-section h3 {
  margin: 0 0 8px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--text);
}
.terms-section .terms-num { color: var(--primary-600); margin-right: 4px; }
.terms-section p { margin: 0 0 10px; color: var(--muted); font-size: 14px; line-height: 1.62; }
.terms-end {
  margin: 8px 0 4px; padding: 14px; text-align: center; color: var(--muted); font-size: 13px;
  border-top: 1px dashed var(--border-2);
}

.terms-footer { flex: none; padding: 12px 22px 16px; border-top: 1px solid var(--border); background: var(--bg-2); }
.terms-scroll-hint { margin: 0 0 10px; text-align: center; color: var(--muted); font-size: 12.5px; }
.terms-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.terms-actions .btn { flex: 1; max-width: none; }
.terms-actions .btn.ghost { flex: 0 0 auto; }

@media (max-width: 560px) {
  .terms-panel { height: 100%; max-width: none; border-radius: 14px; }
  .terms-header h2 { font-size: 19px; }
}

/* ── Terms as a full wizard step (scroll the inner body to unlock Submit) ── */
.terms-step { text-align: left; width: 100%; max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; min-height: 0; }
.terms-step > h2 { margin: 0 0 4px; font-size: 24px; font-weight: 500; letter-spacing: -0.02em; }
.terms-step .terms-body {
  flex: 1; min-height: 220px; max-height: 58vh;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
  margin-top: 10px;
}
.terms-step .terms-scroll-hint { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: 12.5px; }
/* Reading-speed reveal modal */
.tdm-panel { max-width: 460px; }
.tdm-body { position: relative; z-index: 1; padding: 30px 26px 24px; text-align: center; }
.tdm-emoji { font-size: 52px; line-height: 1; margin-bottom: 6px; }
.tdm-title { margin: 0 0 12px; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.tdm-stat { margin: 0 0 12px; font-size: 15.5px; line-height: 1.55; color: var(--text); }
.tdm-body .btn.big { margin-top: 4px; }
.tdm-ast { font-size: 0.7em; vertical-align: super; color: var(--muted); font-weight: 400; }
/* Asterisked footnote pinned to the bottom of the modal. */
.tdm-source {
  margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--border);
  font-size: 10.5px; line-height: 1.4; color: var(--muted); text-align: left;
}
.tdm-body .btn.big { width: 100%; max-width: none; }
.tdm-dismiss {
  display: block; margin: 12px auto 0; border: 0; background: none; cursor: pointer;
  color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 2px;
}
.tdm-dismiss:hover { color: var(--text); }

/* ── Use-case multi-select: checkable option cards (square, obvious checkbox) ── */
.uc-select { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; width: 100%; max-width: 420px; margin: 8px auto 0; }
.uc-card {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 8px 8px 10px;
  background: var(--surface); border: 2px solid var(--border-2); border-radius: 4px;
  cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s;
}
.uc-card:hover { border-color: var(--primary-300); }
.uc-card.selected { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-50); }
.uc-thumb { aspect-ratio: 3 / 4; border-radius: 2px; overflow: hidden; background: var(--surface-2); }
.uc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Label row: checkbox + name, so it's clearly a thing you tick. */
.uc-name { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--text); }
.uc-check {
  flex: none; width: 20px; height: 20px; border-radius: 4px;
  border: 2px solid var(--border-2); background: var(--surface);
  color: transparent; font-size: 13px; font-weight: 800; line-height: 16px; text-align: center;
  transition: background .15s, border-color .15s, color .15s;
}
.uc-card.selected .uc-check { background: var(--primary); border-color: var(--primary); color: #fff; }
