/* Home page: street scene, booth, and the step-by-step story. */

.home { background: #121516; }

/* ======================================================================
   Street scene
   ====================================================================== */

.street {
  --sky1: #5461a8; --sky2: #f08f6b; --sky3: #ffc978;
  --ground1: #9e857a; --ground2: #85706b;
  --bldg: #6b5669;
  --stars: 0; --clouds: .6; --cloud-shade: #fab39e;
  --sun-x: .68; --sun-y: .15; --sun-size: 70px;
  --sun-color: #ffb866; --sun-glow: #ff7340;
  --dim: 0; --sign-glow: .7; --spill: 0;
  --ambient: #ffdbbd;
  --sky-ink: #fff;
  --ground-h: clamp(170px, 26vh, 260px);

  position: relative;
  isolation: isolate;
  min-height: max(100svh, 760px);
  overflow: hidden;
  color: var(--sky-ink);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 24px;
  padding: calc(88px + env(safe-area-inset-top)) max(var(--gutter), calc((100vw - var(--maxw)) / 2)) 0;
}

.sky {
  position: absolute; inset: 0; z-index: -5;
  background: linear-gradient(to bottom, var(--sky1) 0%, var(--sky2) 62%, var(--sky3) 100%);
  transition: background 1.2s;
}
/* Gradient transitions are not interpolated, so fade an overlay copy instead. */
.sky-next { position: absolute; inset: 0; z-index: -5; opacity: 0; transition: opacity 1.2s ease; }
.sky-next.show { opacity: 1; }

.stars { position: absolute; inset: 0 0 40% 0; z-index: -4; opacity: var(--stars); transition: opacity 1.2s; }
.stars i {
  position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 4px #fff;
  animation: twinkle 3.6s ease-in-out infinite;
}
@keyframes twinkle { 50% { opacity: .25; } }

.celestial {
  position: absolute; z-index: -4;
  left: calc(var(--sun-x) * 100%); top: calc(var(--sun-y) * 100% + 30px);
  width: calc(var(--sun-size) * 1.9); aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%;
  background: var(--sun-color);
  box-shadow: 0 0 60px 20px color-mix(in srgb, var(--sun-glow) 55%, transparent), 0 0 160px 60px color-mix(in srgb, var(--sun-glow) 25%, transparent);
  transition: left 1.4s cubic-bezier(.4,0,.2,1), top 1.4s cubic-bezier(.4,0,.2,1), width 1.4s, background 1.2s, box-shadow 1.2s;
}
.celestial.moon {
  background: radial-gradient(circle at 34% 36%, #fffbe9 0 55%, #e9e2c8 100%);
  box-shadow: 0 0 40px 8px rgba(255, 246, 214, .25);
}
.celestial.moon::before, .celestial.moon::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(170, 160, 130, .22);
}
.celestial.moon::before { width: 22%; height: 22%; left: 55%; top: 30%; }
.celestial.moon::after { width: 14%; height: 14%; left: 30%; top: 60%; }

.clouds { position: absolute; inset: 0; z-index: -4; opacity: var(--clouds); transition: opacity 1.2s; pointer-events: none; }
.cloud {
  position: absolute; width: 260px; height: 96px;
  animation: drift linear infinite;
}
.cloud svg { width: 100%; height: 100%; overflow: visible; }
.cloud .shade { fill: var(--cloud-shade); transition: fill 1.2s; }
@keyframes drift { from { translate: -40vw 0; } to { translate: 120vw 0; } }

.city {
  position: absolute; left: 0; right: 0; bottom: var(--ground-h); z-index: -3;
  height: auto;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 6px;
  padding: 0 0 0 0;
}
.bldg {
  position: relative; flex: none;
  background: var(--bldg);
  transition: background 1.2s;
  display: grid; align-content: start; gap: 9px 7px;
  padding: 14px 10px;
}
.bldg i { display: block; height: 8px; border-radius: 1px; background: rgba(255, 255, 255, .06); transition: background .8s, box-shadow .8s; }
.bldg i.lit { background: #ffd98e; box-shadow: 0 0 6px rgba(255, 210, 120, .6); }

.ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--ground-h); z-index: -2;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.18), transparent 10px),
    repeating-linear-gradient(to bottom, transparent 0 33px, rgba(0,0,0,.16) 33px 35px),
    linear-gradient(to bottom, var(--ground1), var(--ground2));
  transition: background 1.2s;
}
/* Staggered brick joints */
.ground::before {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 118px, rgba(0,0,0,.14) 118px 120px);
  -webkit-mask: repeating-linear-gradient(to bottom, #000 0 35px, transparent 35px 70px);
          mask: repeating-linear-gradient(to bottom, #000 0 35px, transparent 35px 70px);
}
.ground::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 58px, rgba(0,0,0,.14) 58px 60px, transparent 60px 120px);
  -webkit-mask: repeating-linear-gradient(to bottom, transparent 0 35px, #000 35px 70px);
          mask: repeating-linear-gradient(to bottom, transparent 0 35px, #000 35px 70px);
}
.spill {
  position: absolute; z-index: -1; bottom: calc(var(--ground-h) * .2);
  width: 60%; height: 140px; left: 50%; translate: -50% 0;
  background: radial-gradient(closest-side, rgba(255, 220, 150, .55), transparent);
  opacity: calc(var(--spill) * .6); transition: opacity 1s;
  pointer-events: none;
}
.booth-wrap.is-open .spill { opacity: var(--spill); }

/* Hero copy */
.hero-copy {
  align-self: start;
  padding-top: clamp(24px, 9vh, 96px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 2px 24px rgba(0, 0, 0, .35);
  max-width: 560px;
}
.eyebrow-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .08em;
  padding: 6px 12px 6px 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--sky-ink) 14%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  text-shadow: none;
}
.eyebrow-chip img { width: 22px; height: 22px; border-radius: 6px; }
.hero-copy h1 {
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 1.18; margin: 18px 0 18px; font-weight: 900; letter-spacing: .01em;
}
.hero-copy h1 .pocket { position: relative; display: inline-block; }
.hero-copy h1 .pocket::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .2em;
  background: color-mix(in srgb, var(--amber) 70%, transparent); z-index: -1; border-radius: 4px;
}
.hero-copy p.lead { font-size: clamp(15px, 1.6vw, 18px); margin: 0 0 22px; opacity: .92; max-width: 34em; }
.hero-note { font-size: 13px; opacity: .75; margin: -10px 0 18px; }

.try-hint {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 700;
  padding: 10px 16px; border-radius: 14px;
  background: rgba(255, 250, 240, .92); color: #23302f; text-shadow: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.try-hint .dot { width: 10px; height: 10px; border-radius: 50%; background: #ff6b4a; box-shadow: 0 0 0 0 rgba(255,107,74,.6); animation: ping 1.6s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(255,107,74,0); } 100% { box-shadow: 0 0 0 0 rgba(255,107,74,0); } }

/* Scene controls (time of day + booth color) */
.scene-bar {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px;
  text-shadow: none;
}
.scene-bar .group {
  display: flex; gap: 2px; padding: 4px; border-radius: 999px;
  background: color-mix(in srgb, var(--sky-ink) 14%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.scene-bar button {
  border: 0; background: none; cursor: pointer;
  height: 34px; min-width: 34px; padding: 0 10px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--sky-ink);
}
.scene-bar button svg { width: 18px; height: 18px; }
.scene-bar button[aria-pressed="true"] { background: rgba(255, 252, 245, .95); color: #22302f; }
.scene-bar .swatch { padding: 0; width: 34px; }
.scene-bar .swatch span {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.9);
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.scene-bar .swatch[aria-pressed="true"] { background: rgba(255, 252, 245, .4); }
.scene-bar .clock { font-variant-numeric: tabular-nums; opacity: .8; font-weight: 500; }

/* ======================================================================
   The booth (sizes in container units so it scales as one drawing)
   ====================================================================== */

.booth-wrap {
  position: relative;
  justify-self: center;
  width: min(440px, 100%);
  display: flex; flex-direction: column; align-items: center;
  padding-bottom: calc(var(--ground-h) * .18);
}
.booth {
  --body: #f5f0e3; --body-shade: #dbd4c4; --accent: #12666e; --accent-deep: #0a454d;
  --body-lit: color-mix(in srgb, var(--body) 72%, var(--ambient));
  --shade-lit: color-mix(in srgb, var(--body-shade) 72%, var(--ambient));
  container-type: inline-size;
  width: 100%;
  color: #1d3b3d;
  filter: drop-shadow(0 18px 18px rgba(0,0,0,.28));
  transition: filter .6s;
}
.booth * { transition: background-color .6s, color .6s, border-color .6s; }

.dimmer::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: #0b0f24; opacity: var(--dim); pointer-events: none; transition: opacity 1.2s;
}

.roof {
  position: relative;
  margin: 0 -1cqw;
  padding: 4cqw 13cqw 4.5cqw;
  border-radius: 7cqw 7cqw 2cqw 2cqw;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--body-lit) 92%, #fff), var(--shade-lit));
  box-shadow: inset 0 -1.4cqw 0 rgba(0,0,0,.08), 0 1cqw 1.4cqw rgba(0,0,0,.12);
  z-index: 2;
}
.sign {
  position: relative; z-index: 2;
  height: 13cqw; border-radius: 2.4cqw;
  display: flex; align-items: center; justify-content: center; gap: 4.4cqw;
  background: linear-gradient(to bottom, var(--accent), var(--accent-deep));
  color: #f6ecd6;
  font-size: 7.2cqw; font-weight: 900;
  box-shadow:
    inset 0 0 0 .5cqw rgba(0,0,0,.18),
    0 0 calc(var(--sign-glow) * 5cqw) color-mix(in srgb, var(--accent) 70%, #fff6);
  text-shadow: 0 0 calc(var(--sign-glow) * 2.6cqw) rgba(255, 240, 200, calc(var(--sign-glow) * .9));
}
.sign span { display: inline-block; }
.night-flicker .sign span:nth-child(3) { animation: flicker 7s infinite; }
@keyframes flicker { 0%, 92%, 100% { opacity: 1; } 93% { opacity: .35; } 94% { opacity: 1; } 96% { opacity: .5; } }

.cabinet {
  position: relative;
  margin: 0 1.5cqw;
  display: grid;
  grid-template-columns: 41cqw 1fr 11cqw;
  height: 124cqw;
  background: linear-gradient(90deg, var(--body-lit), color-mix(in srgb, var(--body-lit) 80%, var(--shade-lit)) 70%, var(--shade-lit));
}
.cabinet::before {
  /* skirt band */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8cqw;
  border-radius: 0 0 3cqw 3cqw;
  background: linear-gradient(to bottom, var(--accent), var(--accent-deep));
}
.cabinet > * { position: relative; z-index: 2; }

.panel {
  margin: 1.5cqw 1.2cqw 10cqw 2.4cqw;
  padding: 2cqw 1.6cqw;
  border-radius: 2.4cqw;
  background: color-mix(in srgb, var(--body-lit) 70%, #ffd8b4 30%);
  box-shadow: inset 0 0 0 .7cqw color-mix(in srgb, var(--shade-lit) 70%, #fff), 0 0 calc((1 - var(--sign-glow)) * 0cqw + var(--dim) * 6cqw) rgba(255, 220, 160, .55);
  display: flex; flex-direction: column;
  min-width: 0; overflow: hidden;
}
.menu { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.6cqw; }
.menu button {
  width: 100%; text-align: left; cursor: pointer;
  display: flex; align-items: center; gap: 1.4cqw;
  padding: 1.5cqw 1.2cqw;
  border: 0; border-radius: 1.4cqw;
  background: color-mix(in srgb, var(--body-lit) 60%, #ffe6cc);
  box-shadow: 0 .4cqw 0 rgba(0,0,0,.08);
  color: #1d3b3d;
  transition: transform .15s, background-color .25s, box-shadow .2s;
}
.menu button:hover { transform: translateY(-.3cqw); }
.menu button:active { transform: translateY(.2cqw); box-shadow: none; }
.menu button svg { width: 4cqw; height: 4cqw; flex: none; }
.menu button b { display: block; font-size: 2.75cqw; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu button small { display: block; font-size: 2.4cqw; line-height: 1.2; opacity: .8; }
.menu button span { min-width: 0; }
.menu button[aria-checked="true"] {
  background: linear-gradient(to bottom, var(--accent), var(--accent-deep));
  color: #f7efdf;
  box-shadow: inset 0 0 0 .4cqw rgba(0,0,0,.15);
}
.menu .custom button { background: transparent; box-shadow: none; outline: .4cqw dashed color-mix(in srgb, #1d3b3d 40%, transparent); outline-offset: -.4cqw; }
.menu .custom button[aria-checked="true"] { outline: 0; background: linear-gradient(to bottom, var(--accent), var(--accent-deep)); }
.panel-steps { margin-top: auto; font-size: 2.6cqw; line-height: 1.6; font-weight: 700; opacity: .8; padding-left: 1cqw; }
.panel-steps .done { text-decoration: line-through; opacity: .5; }

.doorway {
  position: relative;
  margin-top: 1.5cqw;
  border: 0; padding: 0; cursor: pointer;
  background: linear-gradient(#262626, #121212);
  overflow: hidden;
  border-radius: .6cqw .6cqw 0 0;
  box-shadow: inset 0 0 0 .5cqw rgba(0,0,0,.4);
}
.interior {
  position: absolute; inset: 0;
  background:
    radial-gradient(70% 40% at 50% 18%, rgba(255, 236, 196, 0), transparent),
    linear-gradient(to bottom, #2c2c2c 0 72%, #1f1f1f 72% 100%);
  transition: background 0.8s;
}
.is-open .interior {
  background:
    radial-gradient(80% 50% at 50% 12%, rgba(255, 238, 200, .55), transparent 70%),
    linear-gradient(to bottom, #6a645a 0 72%, #3b3833 72% 100%);
}
.lcd {
  position: absolute; left: 14%; right: 14%; top: 22%;
  aspect-ratio: 4 / 3; border-radius: 1.4cqw;
  background: #11100d; box-shadow: inset 0 0 0 .5cqw #000;
  display: grid; place-items: center; text-align: center;
  font-family: var(--mono); color: var(--amber); font-size: 2.8cqw; line-height: 1.4;
  opacity: 0; transition: opacity .6s .5s;
  padding: 1cqw;
}
.is-open .lcd { opacity: 1; }
.lcd .blink { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.stool { position: absolute; left: 50%; bottom: 4cqw; translate: -50% 0; width: 30cqw; height: 34cqw; }
.stool .seat { position: absolute; left: 6%; right: 6%; top: 0; height: 22%; border-radius: 50%; background: radial-gradient(ellipse at 50% 30%, #f1e5d5, #c9b39b 70%, #a58e78); box-shadow: 0 1.2cqw 0 #9b836e; }
.stool .post { position: absolute; left: 47%; width: 6%; top: 18%; bottom: 10%; background: linear-gradient(90deg, #a28c78, #e3d3c0, #a28c78); }
.stool .base { position: absolute; left: 22%; right: 22%; bottom: 0; height: 14%; border-radius: 50%; background: radial-gradient(ellipse at 50% 30%, #ddcbb6, #a58e78); }

.rod {
  position: absolute; left: .8cqw; right: .8cqw; top: 1.6cqw; height: 1.4cqw; border-radius: 1cqw; z-index: 3;
  background: linear-gradient(#e4d8c8, #9d8c79);
}
.curtain {
  position: absolute; left: 0; right: 0; top: 2.2cqw; bottom: 26%;
  z-index: 2;
  transform-origin: 100% 0;
  transition: transform .95s cubic-bezier(.65, 0, .25, 1);
  background:
    linear-gradient(to bottom, rgba(0,0,0,.22), transparent 8%, transparent 88%, rgba(0,0,0,.18)),
    repeating-linear-gradient(90deg, #5c6166 0, #9ea6ab 2.6cqw, #858c91 4.4cqw, #5c6166 6.6cqw);
  -webkit-mask: radial-gradient(1.8cqw 1.4cqw at 50% 100%, transparent 98%, #000) 0 0 / 3.3cqw 100% repeat-x, linear-gradient(#000, #000) top / 100% calc(100% - 1.3cqw) no-repeat;
  -webkit-mask-composite: source-over;
          mask: radial-gradient(1.8cqw 1.4cqw at 50% 100%, transparent 98%, #000) 0 0 / 3.3cqw 100% repeat-x, linear-gradient(#000, #000) top / 100% calc(100% - 1.3cqw) no-repeat;
}
.curtain::before {
  /* rings */
  content: ""; position: absolute; left: 0; right: 0; top: -1cqw; height: 3.2cqw;
  background: radial-gradient(circle at 50% 40%, transparent 0 .9cqw, #d8ccbb .95cqw 1.35cqw, transparent 1.4cqw) 0 0 / 7.2cqw 100% repeat-x;
}
.doorway:hover .curtain { transform: skewX(-1.2deg) scaleX(.98); }
.is-open .curtain, .is-open .doorway:hover .curtain { transform: scaleX(.17); }

.doorway .tap {
  position: absolute; z-index: 4; left: 50%; top: 38%; translate: -50% -50%;
  width: 13cqw; height: 13cqw; border-radius: 50%;
  background: rgba(255, 252, 245, .9); color: var(--accent);
  display: grid; place-items: center;
  box-shadow: 0 0 0 0 rgba(255,255,255,.6);
  animation: tap-pulse 2s infinite;
  transition: opacity .3s;
}
.doorway .tap svg { width: 7cqw; height: 7cqw; }
.is-open .doorway .tap { opacity: 0; animation: none; }
@keyframes tap-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.55); } 80%, 100% { box-shadow: 0 0 0 5cqw rgba(255,255,255,0); } }

.side { display: flex; flex-direction: column; align-items: center; padding-top: 72cqw; gap: 1.4cqw; }
.slot {
  position: relative; width: 9cqw; height: 4cqw; border-radius: 1cqw;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--body-lit) 80%, #fff), var(--shade-lit));
  box-shadow: 0 .3cqw .6cqw rgba(0,0,0,.18);
}
.slot::after { content: ""; position: absolute; left: 1.4cqw; right: 1.4cqw; top: 1.6cqw; height: .7cqw; border-radius: 1cqw; background: #1e1e1e; }
.side small { font-size: 1.9cqw; font-weight: 700; text-align: center; line-height: 1.35; opacity: .75; }
.mini-print {
  position: absolute; z-index: 1; left: 50%; top: calc(72cqw + 2.3cqw); translate: -50% 0;
  width: 7cqw; height: 0; overflow: hidden;
  background: #fff; border-radius: .3cqw;
  box-shadow: 0 .4cqw 1cqw rgba(0,0,0,.25);
  transition: height 1.2s cubic-bezier(.3, .7, .3, 1);
}
.mini-print.out { height: 10cqw; }
.mini-print svg { width: 100%; height: auto; }

.booth-under { margin-top: 3.2cqw; text-align: center; container-type: normal; color: var(--sky-ink); }
.booth-label { font-weight: 700; font-size: 15px; opacity: .85; margin: 0 0 10px; text-shadow: 0 1px 8px rgba(0,0,0,.2); }
.cta {
  display: inline-flex; align-items: center; gap: 10px;
  border: 0; cursor: pointer;
  padding: 14px 26px; border-radius: 999px;
  background: var(--cta, #12666e); color: #fff;
  font-weight: 700; font-size: 17px;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  transition: transform .15s, background-color .6s;
}
.cta:hover { transform: translateY(-2px); }
.cta svg { width: 22px; height: 22px; }

@media (min-width: 881px) {
  /* Keep the whole booth above the fold on short laptop screens. */
  .booth-wrap { width: min(440px, 100%, calc((100svh - 230px) / 1.5)); }
}

@media (max-width: 880px) {
  .street {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    min-height: auto;
    padding-top: calc(76px + env(safe-area-inset-top));
    --ground-h: 190px;
  }
  .hero-copy { padding-top: 8px; text-align: center; margin: 0 auto; }
  .hero-copy p.lead { margin-inline: auto; }
  .scene-bar { justify-content: center; }
  .city { height: 38%; }
  .booth-wrap { width: min(400px, 100%); margin-top: 18px; }
}

/* ======================================================================
   Story sections
   ====================================================================== */

.chapter {
  position: relative;
  padding: clamp(72px, 12vh, 128px) var(--gutter);
}
.chapter .inner { max-width: var(--maxw); margin: 0 auto; }
.step-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 14px; letter-spacing: .1em;
  margin-bottom: 14px;
}
.step-tag .n {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid currentColor; font-size: 15px; letter-spacing: 0;
}
.chapter h2 {
  font-size: clamp(28px, 4.4vw, 48px); line-height: 1.22; margin: 0 0 16px; font-weight: 900;
}
.chapter .intro { font-size: clamp(15px, 1.5vw, 18px); max-width: 38em; margin: 0 0 40px; opacity: .85; }

/* ---------- Inside: guided capture ---------- */

.ch-inside {
  background:
    radial-gradient(70% 50% at 50% 0%, rgba(255, 226, 170, .16), transparent 70%),
    linear-gradient(#2a2724, #171513);
  color: #f4ece0;
}
.ch-inside .step-tag { color: var(--amber); }
.capture-grid {
  display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px); align-items: center;
}
.finder-col { display: grid; gap: 16px; justify-items: center; }
.finder {
  position: relative; width: 100%; max-width: 380px; aspect-ratio: 3 / 4;
  border-radius: 34px; overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 10px #0d0c0b, 0 0 0 11px #3a362f, 0 30px 60px rgba(0,0,0,.5);
  touch-action: none; user-select: none; -webkit-user-select: none;
  cursor: grab;
}
.finder.dragging { cursor: grabbing; }
.finder svg { width: 100%; height: 100%; }
.finder .status {
  position: absolute; left: 50%; top: 16px; translate: -50% 0;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(10, 10, 10, .66); color: #fff;
  font-size: 14px; font-weight: 700; white-space: nowrap;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; gap: 8px;
  transition: background .3s;
}
.finder .status.ok { background: rgba(28, 140, 96, .86); }
.finder .status i { width: 8px; height: 8px; border-radius: 50%; background: #ffcc6b; }
.finder .status.ok i { background: #b8ffd9; }
.finder .count {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 120px; font-weight: 900; color: #fff;
  text-shadow: 0 4px 30px rgba(0,0,0,.5);
  pointer-events: none; opacity: 0;
}
.finder .count.show { animation: count .9s ease-out; }
@keyframes count { 0% { opacity: 0; scale: 1.6; } 20% { opacity: 1; scale: 1; } 80% { opacity: 1; } 100% { opacity: 0; scale: .9; } }
.finder .flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.finder .flash.go { animation: flash .7s ease-out; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }
.finder .drag-hint {
  position: absolute; left: 50%; bottom: 18px; translate: -50% 0;
  font-size: 12px; color: rgba(255,255,255,.85); background: rgba(0,0,0,.45);
  padding: 5px 12px; border-radius: 999px; white-space: nowrap; pointer-events: none;
  transition: opacity .4s;
}
.finder.touched .drag-hint { opacity: 0; }

.guide-oval { fill: none; stroke: #ffcc6b; stroke-width: 2.2; stroke-dasharray: 7 6; transition: stroke .3s; }
.guide-oval.ok { stroke: #6ef0b0; stroke-dasharray: none; }
.guide-line { stroke: rgba(255,255,255,.55); stroke-width: 1; stroke-dasharray: 3 4; }
.guide-label { fill: rgba(255,255,255,.85); font-size: 9px; font-family: var(--font); font-weight: 700; }
.frame-edge { fill: none; stroke: rgba(255,255,255,.9); stroke-width: 1.5; }

.controls { width: 100%; max-width: 380px; display: grid; gap: 12px; }
.slider-row { display: grid; grid-template-columns: 4.5em 1fr; align-items: center; gap: 12px; font-size: 14px; font-weight: 700; }
.slider-row input[type="range"] { width: 100%; accent-color: var(--amber); }
.btn-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pill-btn {
  border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 700;
  background: rgba(255, 245, 225, .12); color: inherit;
}
.pill-btn:hover { background: rgba(255, 245, 225, .2); }
.pill-btn[aria-pressed="true"] { background: var(--amber); color: #2a2216; }
.shutter {
  width: 66px; height: 66px; border-radius: 50%; cursor: pointer;
  border: 4px solid #fff; background: #fff; padding: 0;
  box-shadow: inset 0 0 0 3px #1a1816;
  transition: transform .1s;
}
.shutter:active { transform: scale(.92); }

.meters { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; }
.meter {
  display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 16px;
  background: rgba(255, 245, 225, .06);
  border: 1px solid rgba(255, 245, 225, .1);
  transition: background .3s, border-color .3s;
}
.meter .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 204, 107, .16); color: var(--amber); transition: inherit; }
.meter .ico svg { width: 20px; height: 20px; }
.meter b { display: block; font-size: 15px; }
.meter span { font-size: 13px; opacity: .7; }
.meter .val { font-family: var(--mono); font-size: 14px; color: var(--amber); text-align: right; white-space: nowrap; }
.meter.ok { background: rgba(110, 240, 176, .08); border-color: rgba(110, 240, 176, .3); }
.meter.ok .ico { background: rgba(110, 240, 176, .18); color: #6ef0b0; }
.meter.ok .val { color: #6ef0b0; }
.tips { font-size: 14px; opacity: .7; margin: 0; }
.tips li { margin: 4px 0; }

.next-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 24px;
  font-weight: 700; text-decoration: none; color: var(--amber);
}

@media (max-width: 880px) {
  .capture-grid { grid-template-columns: minmax(0, 1fr); }
  .finder { max-width: 320px; }
}

/* ---------- Check ---------- */

.ch-check { background: var(--paper); color: var(--ink); }
.ch-check .step-tag { color: var(--teal); }
.check-grid {
  display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px); align-items: start;
}
.photo-card {
  position: relative; justify-self: center;
  width: min(300px, 80vw);
  padding: 14px 14px 46px; background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 20px 50px rgba(60, 40, 10, .18);
  rotate: -2.5deg;
}
.photo-card .photo { position: relative; overflow: hidden; background: #eee; }
.photo-card .photo svg { width: 100%; height: auto; }
.photo-card figcaption { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-family: var(--mono); font-size: 13px; color: #5d5a55; }
.scanline {
  position: absolute; left: 0; right: 0; height: 30%; top: -30%;
  background: linear-gradient(to bottom, transparent, rgba(18, 102, 110, .35) 85%, rgba(110, 240, 200, .9) 100%);
  mix-blend-mode: multiply;
  pointer-events: none;
}
.scanning .scanline { animation: scan 1.6s ease-in-out 2; }
@keyframes scan { from { top: -30%; } to { top: 100%; } }
.ruler-mark {
  position: absolute; right: -36px; width: 26px;
  border: 2px solid var(--teal); border-left: 0; border-radius: 0 6px 6px 0;
  opacity: 0; transition: opacity .4s;
}
.ruler-mark span { position: absolute; left: 32px; top: 50%; translate: 0 -50%; font-family: var(--mono); font-size: 12px; color: var(--teal); white-space: nowrap; rotate: 2.5deg; }
.checked .ruler-mark { opacity: 1; }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.check-item {
  display: grid; grid-template-columns: 30px 1fr; gap: 4px 12px; align-items: start;
  padding: 14px 16px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line);
  opacity: .35; transform: translateY(6px);
  transition: opacity .4s, transform .4s, border-color .3s, background .3s;
}
.check-item.shown { opacity: 1; transform: none; }
.check-item .mark {
  grid-row: span 2;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 900; font-size: 15px;
  background: var(--paper-2); color: var(--ink-soft);
}
.check-item.ok .mark { background: #1c8c60; color: #fff; }
.check-item.warn .mark { background: #f2a33a; color: #fff; }
.check-item.warn { border-color: rgba(242, 163, 58, .5); background: #fff6e8; }
.check-item b { font-size: 15px; line-height: 1.4; }
.check-item small { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.check-item small .v { font-family: var(--mono); color: var(--ink); }
.check-summary { margin: 20px 0 0; font-weight: 700; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.check-summary .badge { padding: 6px 14px; border-radius: 999px; background: #1c8c60; color: #fff; font-size: 14px; }
.check-summary .badge.warn { background: #f2a33a; }
.disclaimer { font-size: 12.5px; color: var(--ink-soft); margin-top: 16px; }

@media (max-width: 880px) { .check-grid { grid-template-columns: minmax(0, 1fr); } .ruler-mark { display: none; } }

/* ---------- Finish ---------- */

.ch-finish {
  background: linear-gradient(var(--paper), var(--paper-2));
  color: var(--ink);
}
.ch-finish .step-tag { color: var(--teal); }
.finish-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.compare {
  position: relative; justify-self: center;
  width: min(360px, 84vw); aspect-ratio: var(--ratio, 35 / 45);
  border-radius: 4px; overflow: hidden;
  box-shadow: 0 20px 50px rgba(60, 40, 10, .2);
  touch-action: pan-y;
  cursor: ew-resize;
}
.compare > div { position: absolute; inset: 0; }
.compare svg { width: 100%; height: 100%; }
.compare .after { clip-path: inset(0 0 0 var(--split, 50%)); }
.compare .handle {
  position: absolute; top: 0; bottom: 0; left: var(--split, 50%); width: 0;
  border-left: 2px solid #fff; box-shadow: 0 0 8px rgba(0,0,0,.3);
}
.compare .handle::after {
  content: "⟷"; position: absolute; top: 50%; left: 0; translate: -50% -50%;
  width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--teal);
  display: grid; place-items: center; font-weight: 900; box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.compare .tag {
  position: absolute; top: 10px; z-index: 2;
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: rgba(0,0,0,.55); color: #fff;
}
.compare .tag.l { left: 10px; } .compare .tag.r { right: 10px; background: var(--teal); }

.opt-group { margin-bottom: 22px; }
.opt-group h3 { font-size: 15px; margin: 0 0 10px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches button {
  border: 1px solid var(--line); background: var(--card); cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 8px; border-radius: 999px; font-size: 14px; font-weight: 700;
}
.swatches button i { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.swatches button[aria-pressed="true"] { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal); }
.toggle {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line);
  margin-bottom: 10px; font-weight: 700; font-size: 15px;
}
.toggle input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 999px; background: #c9c3b8; position: relative; flex: none; cursor: pointer; transition: background .2s; margin: 0; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: translate .2s; }
.toggle input:checked { background: var(--teal); }
.toggle input:checked::after { translate: 18px 0; }
.toggle input:disabled { opacity: .5; cursor: not-allowed; }
.toggle small { display: block; font-weight: 500; font-size: 12.5px; color: var(--ink-soft); }
.lock-note { font-size: 13px; color: var(--ink-soft); display: flex; gap: 8px; align-items: flex-start; }
.lock-note svg { width: 16px; height: 16px; flex: none; margin-top: 3px; }

@media (max-width: 880px) { .finish-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Print ---------- */

.ch-print { background: #e9e1d3; color: var(--ink); overflow: hidden; }
.ch-print .step-tag { color: var(--teal); }
.print-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.sheet-stage {
  position: relative; display: grid; place-items: center;
  min-height: 460px; padding: 20px;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,.025) 0 10px, transparent 10px 20px);
  border-radius: 24px;
}
.sheet {
  width: min(320px, 70vw);
  filter: drop-shadow(0 18px 30px rgba(60, 40, 10, .25));
  transition: width .5s cubic-bezier(.3,.7,.3,1);
}
.sheet.big { width: min(400px, 82vw); }
.sheet > svg { width: 100%; height: auto; overflow: visible; }
.sheet .photo-in { animation: pop .35s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes pop { from { opacity: 0; transform: scale(.6); } }
.sheet-caption { margin-top: 14px; text-align: center; font-size: 13px; color: var(--ink-soft); font-family: var(--mono); }

.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); margin-bottom: 18px; }
.seg button { border: 0; background: none; cursor: pointer; padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--teal); color: #fff; }
.add-sizes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.add-sizes button {
  border: 1px dashed color-mix(in srgb, var(--teal) 60%, transparent); background: transparent; cursor: pointer;
  padding: 7px 12px; border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--teal);
}
.add-sizes button:hover { background: color-mix(in srgb, var(--teal) 8%, transparent); }
.add-sizes button small { font-weight: 500; opacity: .7; margin-left: 4px; }
.text-btn { border: 0; background: none; padding: 4px 0; cursor: pointer; color: var(--ink-soft); font-size: 13px; text-decoration: underline; }
.toast { min-height: 1.6em; font-size: 13px; color: #b5651d; margin: 6px 0 0; }

.file-card {
  margin-top: 28px;
  display: flex; gap: 16px; align-items: center;
  padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line);
}
.file-card .thumb { width: 54px; flex: none; border-radius: 4px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.file-card .thumb svg { width: 100%; height: auto; }
.file-card b { display: block; font-family: var(--mono); font-size: 14px; word-break: break-all; }
.file-card span { font-size: 13px; color: var(--ink-soft); }

@media (max-width: 880px) { .print-grid { grid-template-columns: minmax(0, 1fr); } .sheet-stage { min-height: 380px; } }

/* ---------- Privacy ---------- */

.ch-privacy {
  background:
    radial-gradient(60% 60% at 80% 20%, rgba(110, 240, 200, .12), transparent 70%),
    linear-gradient(#0d3a40, #072328);
  color: #eaf3ef;
}
.ch-privacy .step-tag { color: #8de7cf; }
.privacy-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.vault > svg { width: 100%; max-width: 520px; margin: 0 auto; overflow: visible; }
.vault .packet { animation: bounce-back 3.2s ease-in-out infinite; }
@keyframes bounce-back { 0% { transform: translateX(0); opacity: 0; } 10% { opacity: 1; } 45% { transform: translateX(118px); } 55% { transform: translateX(118px); } 90% { transform: translateX(0); opacity: 1; } 100% { opacity: 0; } }
.vault .barrier { animation: shake 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes shake { 0%, 42%, 58%, 100% { transform: none; } 46% { transform: rotate(-8deg) scale(1.1); } 50% { transform: rotate(8deg) scale(1.1); } }
.promise { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.promise li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.promise .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(141, 231, 207, .14); color: #8de7cf; }
.promise .ico svg { width: 22px; height: 22px; }
.promise b { display: block; font-size: 16px; }
.promise span { font-size: 14px; opacity: .75; }
.ch-privacy a.more { display: inline-block; margin-top: 24px; color: #8de7cf; font-weight: 700; }

@media (max-width: 880px) { .privacy-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Price (receipt) ---------- */

.ch-price {
  background: var(--paper);
  color: var(--ink);
  text-align: center;
}
.ch-price .step-tag { color: var(--teal); }
.ch-price .intro { margin-inline: auto; }
.printer {
  position: relative; margin: 0 auto; width: min(380px, 100%);
}
.printer-head {
  position: relative; z-index: 2;
  height: 46px; border-radius: 16px 16px 10px 10px;
  background: linear-gradient(var(--teal), var(--teal-deep));
  box-shadow: 0 10px 24px rgba(10, 69, 77, .3);
}
.printer-head::after { content: ""; position: absolute; left: 24px; right: 24px; bottom: 10px; height: 6px; border-radius: 4px; background: #062a2f; }
.receipt-clip { overflow: hidden; margin: -14px 34px 0; padding-bottom: 20px; }
.receipt {
  position: relative;
  padding: 30px 26px 34px;
  background: #fffdf8;
  font-family: var(--mono);
  text-align: left; font-size: 15px; line-height: 1.9;
  box-shadow: 0 10px 20px rgba(0,0,0,.08);
  transform: translateY(-101%);
  transition: transform 2.4s steps(24, end);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 16px 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 16px 100%;
}
.printed .receipt { transform: none; }
.receipt h3 { text-align: center; font-size: 17px; margin: 0 0 4px; font-family: var(--font); }
.receipt .sub { text-align: center; font-size: 12px; color: #77716a; margin: 0 0 10px; }
.receipt hr { border: 0; border-top: 2px dashed #cfc6b8; margin: 12px 0; }
.receipt .row { display: flex; gap: 6px; }
.receipt .row::before { content: ""; order: 1; flex: 1; border-bottom: 2px dotted #cfc6b8; margin-bottom: .55em; }
.receipt .row span:last-child { order: 2; font-weight: 700; color: var(--teal); }
.receipt .thanks { text-align: center; font-size: 13px; color: #77716a; margin-top: 14px; }
.receipt .barcode { height: 34px; margin: 14px auto 0; width: 70%; background: repeating-linear-gradient(90deg, #333 0 2px, transparent 2px 4px, #333 4px 5px, transparent 5px 8px, #333 8px 11px, transparent 11px 12px); }
.price-actions { margin-top: 36px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 26px 12px 20px; border-radius: 16px;
  background: #111; color: #fff; text-decoration: none; text-align: left;
}
.store-btn svg { width: 28px; height: 28px; }
.store-btn small { display: block; font-size: 11px; opacity: .75; line-height: 1.2; }
.store-btn b { display: block; font-size: 19px; line-height: 1.2; }
.store-btn[aria-disabled="true"] { cursor: default; }
.price-actions p { margin: 0; font-size: 13px; color: var(--ink-soft); }

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .receipt { transform: none; }
}
