:root {
  color-scheme: light;
  font-family: Arial, Helvetica, system-ui, sans-serif;
  background: #f6f7f8;
  color: #10181d;
}

* { box-sizing: border-box; }

html { min-width: 280px; }

body { margin: 0; }

button { font: inherit; }

.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; }

.preview {
  min-height: 100svh;
  padding: clamp(20px, 4vw, 52px) 18px 26px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 17px;
}

.preview__intro { max-width: 610px; text-align: center; }
.eyebrow { margin: 0 0 10px; color: #406268; font-size: 11px; font-weight: 700; letter-spacing: .19em; }
h1 { margin: 0; font-size: clamp(23px, 3.3vw, 37px); line-height: 1.12; letter-spacing: -.035em; }
.intro-copy { margin: 10px auto 0; max-width: 540px; color: #57666e; font-size: clamp(13px, 1.5vw, 15px); line-height: 1.5; }

.demo {
  position: relative;
  width: min(100%, 1080px);
  padding: clamp(15px, 3vw, 30px) 16px 12px;
  display: grid;
  justify-items: center;
  gap: 15px;
  background: #fff;
  border: 1px solid #e9edef;
  border-radius: 29px;
  box-shadow: 0 18px 55px rgb(15 36 43 / 8%), 0 2px 10px rgb(15 36 43 / 4%);
}

.phone-stage {
  position: relative;
  width: 100%;
  padding: 135px 0 84px;
  display: grid;
  justify-items: center;
  isolation: isolate;
  perspective: 1100px;
  overflow: hidden;
}

.phone-shadow {
  position: absolute;
  z-index: 0;
  left: 50%;
  bottom: 36px;
  width: min(63%, 255px);
  height: 27px;
  border-radius: 50%;
  background: #082a2d;
  filter: blur(14px);
  opacity: .09;
  transform: translateX(-50%) scale(.65, .8);
  pointer-events: none;
}

.tap-card {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 30px;
  width: min(290px, calc(92vw - 86.48px));
  aspect-ratio: 1586 / 992;
  pointer-events: none;
  opacity: 1;
  transform: translate3d(-50%, 65px, 0) rotateY(-8deg) rotateZ(-4deg) scale(1.45);
  transform-origin: center;
  will-change: transform, opacity;
  filter: drop-shadow(0 9px 13px rgb(3 18 21 / 20%));
}
.tap-card img { display: block; width: 100%; height: 100%; object-fit: contain; }

.phone-rig {
  z-index: 2;
  width: min(300px, calc(100vw - 104px));
  aspect-ratio: 0.486;
  position: relative;
  transform: rotateZ(-2deg);
  will-change: transform;
}

.phone {
  position: absolute;
  inset: 0;
  background: transparent;
}

.phone-front-image, .phone-front-island {
  position: absolute;
  left: 50%;
  width: auto;
  max-width: none;
  transform: translateX(-50%);
  user-select: none;
  pointer-events: none;
}
.phone-front-image, .phone-front-island { top: -4.40%; height: 109.09%; }
.phone-front-image { z-index: 1; }
.phone-front-island {
  z-index: 3;
  /* Reveal only the supplied island pixels above the live HTML screen. */
  clip-path: inset(6.64% 40.53% 89.71% 40.53% round 999px);
}

.phone__screen {
  position: absolute;
  z-index: 2;
  inset: 1.72% 5.3% 1.72% 5.2%;
  overflow: hidden;
  border-radius: 15% / 7%;
  background: #000000;
  isolation: isolate;
  container-type: inline-size;
}

.profile, .profile img, .profile-dim { position: absolute; inset: 0; width: 100%; height: 100%; }
.profile { will-change: filter, clip-path; clip-path: inset(100% 0 0 0); }
.profile img { display: block; object-fit: contain; user-select: none; }
.profile-dim { z-index: 1; background: #071313; opacity: 0; pointer-events: none; }
.scan-pulse {
  position: absolute;
  z-index: 2;
  top: 56%;
  left: 50%;
  width: 70%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.scan-pulse span {
  position: absolute;
  inset: 0;
  border: 1.5px solid rgb(222 255 253 / 83%);
  border-radius: 50%;
  box-shadow: 0 0 6px rgb(173 247 242 / 36%), inset 0 0 4px rgb(222 255 253 / 12%);
  opacity: 0;
  transform: scale(.22);
}

.sheet {
  position: absolute;
  z-index: 3;
  left: 0; bottom: 0;
  width: 100%; height: 68%;
  overflow: hidden;
  border-radius: 24px 24px 0 0;
  background: #fff;
  color: #10151a;
  box-shadow: 0 -10px 25px rgb(0 0 0 / 13%);
  transform: translateY(105%);
  will-change: transform;
}
.sheet__handle {
  position: absolute; top: 10px; left: 50%;
  transform: translateX(-50%);
  width: 42px; height: 4px;
  border-radius: 99px;
  background: #c4c9cd;
}
.sheet__close {
  position: absolute; z-index: 2; top: 14px; right: 14px;
  width: 31px; height: 31px;
  display: grid; place-items: center;
  border: 1px solid #dbe1e6;
  border-radius: 50%;
  color: #11191e;
  font-size: 25px; line-height: 1;
}
.sheet__form, .sheet__confirmation {
  position: absolute; inset: 0;
  padding: 48px 19px 21px;
}
.sheet__form { display: flex; flex-direction: column; }
.sheet__confirmation { z-index: 1; }
.sheet h2 { margin: 0; font-size: clamp(19px, 6cqw, 23px); line-height: 1.1; letter-spacing: -.035em; }
.sheet__subtitle { margin: 4px 0 0; color: #5e697a; font-size: clamp(11px, 3.6cqw, 13px); line-height: 1.3; }
.field-group { display: grid; gap: clamp(10px, 2.8cqw, 14px); margin-top: clamp(16px, 5cqw, 23px); }
.field { min-width: 0; }
.field__label, .optional { font-size: clamp(10px, 3cqw, 12px); line-height: 1.25; }
.field__label { display: block; font-weight: 700; }
.field__label-row { display: flex; align-items: center; justify-content: space-between; }
.optional { color: #69768b; }
.field__value {
  min-height: clamp(38px, 11cqw, 44px);
  margin-top: 4px;
  padding: 0 12px;
  display: flex; align-items: center;
  border: 1px solid #d8e0e8;
  border-radius: 7px;
  background: #fdfdfe;
  font-size: clamp(11px, 3.65cqw, 14px);
  white-space: nowrap;
  overflow: hidden;
}
.field__value--phone { padding: 0; }
.phone-prefix { min-width: 34%; align-self: stretch; padding: 0 7px; display: flex; align-items: center; justify-content: space-evenly; gap: 3px; border-right: 1px solid #d8e0e8; }
.flag { font-size: 15px; }
.chevron { font-size: 18px; color: #748294; }
.phone-number { min-width: 0; padding: 0 11px; overflow: hidden; }
.field__placeholder { color: #9aa6b6; }
.privacy-note { margin: auto 0 13px; color: #637082; font-size: clamp(10px, 3.25cqw, 12px); }
.sheet__action {
  min-height: clamp(43px, 12cqw, 50px);
  padding: 0 14px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  border-radius: 99px;
  background: #15191b;
  color: #fff;
  font-size: clamp(12px, 3.7cqw, 14px);
  font-weight: 700;
  white-space: nowrap;
}
.sheet__action span { position: absolute; right: 15px; font-size: 20px; font-weight: 400; }
.sheet__confirmation { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; opacity: 0; }
.confirmation-check { width: 47px; height: 47px; margin-bottom: 17px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #0e3937, #031817); color: #fff; font-size: 30px; }
.confetti { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.confetti span { position: absolute; top: 30%; left: 50%; width: 4px; height: 7px; border-radius: 1px; opacity: 0; will-change: transform, opacity; }
.sheet__confirmation h2 { font-size: clamp(18px, 5.5cqw, 23px); }
.sheet__confirmation p { margin: 9px 0 24px; color: #5e697a; font-size: clamp(11px, 3.6cqw, 13px); }
.sheet__action--return { align-self: stretch; width: 100%; }

.tap { position: absolute; z-index: 6; width: 27px; height: 27px; border: 2px solid rgb(255 255 255 / 94%); border-radius: 50%; background: rgb(49 143 186 / 45%); box-shadow: 0 0 0 4px rgb(25 93 127 / 55%), 0 2px 9px rgb(0 0 0 / 30%); pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(1); }
.tap span { position: absolute; inset: 6px; border-radius: 50%; background: #d9f1ff; }
.tap--profile { left: 50%; top: 91%; }
.tap--sheet { right: 12%; bottom: 5.3%; }
.tap--return { right: 28%; bottom: 16%; }

.demo__controls { min-height: 45px; display: flex; justify-content: center; align-items: center; gap: 11px; }
.start-control { min-width: 164px; min-height: 44px; padding: 0 18px; border: 1px solid #164e57; border-radius: 99px; background: #0b4e57; color: #fff; cursor: pointer; font-size: 13px; font-weight: 700; }
.start-control:hover { background: #0c606b; }
.start-control:active { transform: scale(.98); }
.start-control.is-running { visibility: hidden; }
.playback { width: 44px; height: 44px; padding: 10px; display: grid; place-items: center; border: 1px solid #cad8dc; border-radius: 50%; background: #fff; color: #075266; cursor: pointer; box-shadow: 0 2px 8px rgb(12 54 65 / 8%); }
.playback:not(.is-visible) { visibility: hidden; }
.playback:hover { background: #f3f9fa; }
.playback:active { transform: scale(.96); }
.playback svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.playback__play { display: none; }
.playback.is-paused .playback__pause { display: none; }
.playback.is-paused .playback__play { display: block; }
.playback:focus-visible, .start-control:focus-visible, .reduced-states button:focus-visible { outline: 3px solid #14778d; outline-offset: 3px; }
.reduced-states { display: none; flex-wrap: wrap; justify-content: center; gap: 7px; }
.reduced-states button { min-height: 42px; padding: 0 13px; border: 1px solid #cbd8dc; border-radius: 99px; background: #fff; color: #28464e; cursor: pointer; font-size: 12px; }
.reduced-states button[aria-pressed="true"] { border-color: #075266; background: #075266; color: #fff; }
.preview__footnote { margin: 0; text-align: center; color: #67757b; font-size: 12px; line-height: 1.4; }

@media (max-width: 500px) {
  .preview { padding-inline: 12px; }
  .demo { padding-inline: 12px; border-radius: 22px; }
  .phone-stage { padding: clamp(96px, 32vw, 135px) 0 85px; }
  .phone-shadow { bottom: 34px; }
  .tap-card { top: 23px; }
}

@media (max-width: 360px) {
  .sheet__form, .sheet__confirmation { padding: 40px 16px 16px; }
  .field-group { gap: 8px; margin-top: 13px; }
  .field__value { min-height: 34px; }
  .privacy-note { margin-bottom: 8px; }
  .sheet__action { min-height: 39px; }
}

@media (prefers-reduced-motion: reduce) {
  .playback, .start-control { display: none; }
  .reduced-states { display: flex; }
  .phone-rig, .sheet, .profile { will-change: auto; }
  .phone-rig { transform: none !important; }
  .tap-card, .scan-pulse { display: none; }
  .phone-stage { perspective: none; }
  .phone-shadow { display: none; }
  .confetti { display: none; }
}

/* Page integration only: the approved scene and its internal geometry stay intact. */
:root { background: transparent; }
.preview { min-height: 0; padding: 0; gap: 0; }
.demo { width: 100%; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.phone-stage { padding-bottom: 64px; }
.demo__controls { margin-top: -6px; }

/* Embedded exchange composition: the source V8 directory remains unchanged. */
html, body { overflow: hidden; }
.preview { width: 100%; }
.demo { gap: 0; }
.phone-stage { padding: 105px 0 72px; overflow: visible; }
.phone-rig { width: min(255px, calc(100vw - 90px)); }
.tap-card { width: min(245px, calc(100vw - 95px)); }
.phone-shadow { bottom: 47px; opacity: .05; filter: blur(11px); }
.demo__controls { min-height: 44px; margin-top: 0; }
.start-control, .confetti { display: none; }
.playback { width: 38px; height: 38px; padding: 8px; box-shadow: none; }
@media (max-width: 500px) {
  .phone-stage { padding: 75px 0 55px; }
  .phone-rig { width: min(230px, calc(100vw - 76px)); }
  .tap-card { width: min(225px, calc(100vw - 80px)); }
}
