/* V6 passport scene. Every rule is scoped; the surrounding page owns layout. */
.passport-scene {
  --passport-ink: #153e34;
  --passport-muted: #56736a;
  --passport-green: #1a745b;
  --passport-edge: #dbe9df;
  --passport-product-scale: 1;
  --passport-product-top: -56%;
  position: relative;
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
  color: var(--passport-ink);
  font-family: inherit;
  isolation: isolate;
  container-type: inline-size;
  container-name: teal-passport;
}

.passport-scene,
.passport-scene * {
  box-sizing: border-box;
}

.passport-scene__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 640 / 510;
  isolation: isolate;
}

.passport-scene__light {
  position: absolute;
  inset: 8% 0 1%;
  z-index: 0;
  border-radius: 40%;
  background: radial-gradient(ellipse at 55% 54%, #dff6b84d 0, #ddf2e44d 35%, #eef6e900 70%);
  pointer-events: none;
}

.passport-scene__wallet-back,
.passport-scene__wallet-window {
  position: absolute;
  inset: 35% 4% 7% 6%;
  border-radius: 27px;
}

.passport-scene__wallet-back {
  z-index: 1;
  border: 1px solid #d6e6d8;
  background: linear-gradient(154deg, #ffffff 2%, #f5fbef 48%, #eaf5e6 100%);
  box-shadow: 0 1px 1px #ffffff inset, 0 4px 7px -4px #2b564d21, 0 28px 50px -28px #3b614f55;
}

.passport-scene__wallet-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 22px 23px;
  font-size: clamp(14px, 2.65cqw, 17px);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.2;
  white-space: nowrap;
}

.passport-scene__wallet-heading svg {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.passport-scene__wallet-slot {
  position: absolute;
  top: 36%;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(90deg, #b9d1c300, #b9d1c3 15%, #b9d1c3 85%, #b9d1c300);
}

.passport-scene__card-slot {
  position: absolute;
  inset: 0;
  z-index: 2;
  perspective: 1100px;
  clip-path: inset(-28% -8% 7% -8%);
  pointer-events: none;
}

/* Scroll, pointer and product motion deliberately have separate transforms. */
.passport-scene__card-scroll {
  position: absolute;
  top: 11%;
  left: 57%;
  width: 51%;
  max-width: 330px;
  aspect-ratio: 0.93;
  margin-left: -25.5%;
  transform: translate3d(0, 0, 0) rotate(-7deg) scale(1);
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
}

.passport-scene__card-pointer {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  transform-style: preserve-3d;
  transform-origin: 50% 58%;
}

.passport-scene__card-surface {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid #d8e6df;
  border-radius: 23px;
  background: #fffefa;
  box-shadow: 0 1px 0 #ffffff inset, 1px 3px 0 #dce8de, 0 9px 14px -10px #244f4170, 0 28px 45px -24px #204c3c66;
}

.passport-scene__card-print {
  position: absolute;
  inset: 0 0 44%;
  background: linear-gradient(122deg, #e2f3e2 2%, #f1f9df 47%, #d9eee4 100%);
}

.passport-scene__card-print::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid #ffffff8c;
  border-radius: 13px;
}

.passport-scene__foil {
  position: absolute;
  inset: -30% -50%;
  background: linear-gradient(117deg, transparent 30%, #ffffff00 42%, #ffffffa3 49%, #e6fff45c 53%, #ffffff00 61%, transparent 72%);
  opacity: 0.52;
  transform: translate3d(-13%, -2%, 0);
  pointer-events: none;
}

.passport-scene__card-symbol {
  position: absolute;
  top: 19px;
  left: 19px;
  width: 28px;
  height: 28px;
  stroke: #367b62;
  stroke-width: 1.3;
  opacity: 0.65;
}

.passport-scene__product-fit {
  position: absolute;
  top: var(--passport-product-top);
  left: -20%;
  width: 140%;
  aspect-ratio: 1;
  z-index: 2;
  transform: translateZ(34px) scale(var(--passport-product-scale));
  transform-origin: 50% 62%;
}

.passport-scene__product-pop {
  width: 100%;
  height: 100%;
  transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  transform-origin: 48% 64%;
}

.passport-scene__product-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: contain;
  filter: drop-shadow(0 18px 10px #163f391c);
  user-select: none;
  -webkit-user-drag: none;
}

.passport-scene[data-scene-product="1"] {
  --passport-product-scale: 0.65;
  --passport-product-top: -58%;
}

.passport-scene[data-scene-product="2"] {
  --passport-product-scale: 0.72;
  --passport-product-top: -60%;
}

.passport-scene__card-cap {
  position: absolute;
  z-index: 5;
  top: 13px;
  left: 15px;
  right: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 35px;
  padding: 8px 11px;
  border: 1px solid #ffffffb3;
  border-radius: 10px;
  background: #f6fbeded;
  opacity: 0;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  transform: translateZ(38px);
}

.passport-scene__information {
  position: absolute;
  z-index: 3;
  left: 8%;
  right: 8%;
  bottom: 6.5%;
  background: #fffefa;
  transform: translateZ(36px);
}

.passport-scene__information::before {
  content: "";
  position: absolute;
  inset: -10px -10px -10px;
  z-index: -1;
  border-radius: 8px;
  background: #fffefa;
}

.passport-scene__account-type {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  color: #56736a;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}

.passport-scene__example {
  padding: 3px 7px;
  border-radius: 5px;
  background: #eef4eb;
  color: #45603b;
  font-size: 11px;
  font-weight: 600;
}

.passport-scene__product-name {
  margin: 0;
  color: var(--passport-ink);
  font-family: inherit;
  font-size: clamp(20px, 3.75cqw, 25px);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.passport-scene__product-id {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 7px 0 0;
  color: var(--passport-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.passport-scene__product-id > span:first-child {
  flex: 0 0 auto;
  color: #56736a;
  font-size: 11px;
}

.passport-scene__account-details {
  display: flex;
  gap: 23px;
  margin-top: 15px;
  padding-top: 11px;
  border-top: 1px solid #e5ece3;
  color: #365b4e;
  font-size: 12px;
  line-height: 1.3;
}

.passport-scene__account-details > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.passport-scene__account-details svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.passport-scene__wallet-window {
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

.passport-scene__wallet-front {
  position: absolute;
  inset: auto 0 0;
  height: 56%;
  padding: 8px 18px 18px;
  border: 1px solid #d6e6d8;
  border-radius: 23px 23px 27px 27px;
  background: linear-gradient(168deg, #fafff8 8%, #f0f8eb 100%);
  box-shadow: 0 -3px 9px -5px #617d5b30, 0 1px 0 #ffffff inset;
  transform: translateY(max(0px, calc(100% - 54px)));
}

.passport-scene__wallet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
}

.passport-scene__wallet-sections {
  display: inline-flex;
  align-items: center;
  gap: clamp(12px, 3cqw, 22px);
  color: #56736a;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.passport-scene__wallet-sections a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding-inline: 2px;
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
}

.passport-scene__wallet-sections a:hover {
  color: #194c39;
  text-decoration: underline;
  text-underline-offset: 6px;
}

.passport-scene__wallet-sections .passport-scene__wallet-current {
  position: relative;
  color: #295b46;
}

.passport-scene__wallet-current::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: #438b59;
}

.passport-scene .passport-scene__open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 75px;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 11px;
  margin: 0;
  color: #194c39;
  background: #dff1cf;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  pointer-events: auto;
  transition: background-color 160ms ease;
}

.passport-scene .passport-scene__open:hover {
  background: #d0eabc;
}

.passport-scene__open svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.passport-scene__wallet-product {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 52px;
  margin: 12px 0 0;
  padding: 7px 10px;
  border: 1px solid #dce9d8;
  border-radius: 13px;
  background: #ffffffc9;
  font: inherit;
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
}

.passport-scene__wallet-product[hidden] {
  display: none;
}

.passport-scene__wallet-product:hover {
  background: #fff;
  border-color: #aecaa3;
}

.passport-scene__wallet-product > img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex: 0 0 auto;
}

.passport-scene__wallet-item-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.passport-scene__wallet-product strong {
  color: #214c3b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.passport-scene__wallet-item-copy > span {
  color: #56736a;
  font-size: 12px;
  line-height: 1.2;
}

.passport-scene__wallet-product > svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  stroke: #739074;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.passport-scene__picker {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 398px);
  margin: 4px auto 12px;
  padding: 4px;
  border: 1px solid #e0e8da;
  border-radius: 18px;
  background: #f6faef;
}

.passport-scene .passport-scene__picker button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 54px;
  margin: 0;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #56736a;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.passport-scene .passport-scene__picker button:hover {
  color: #254d3a;
  background: #edf5e5;
}

.passport-scene .passport-scene__picker button[aria-pressed="true"] {
  border-color: #d2e3cd;
  color: #1b5139;
  background: #fff;
  box-shadow: 0 2px 5px -3px #365c3c38;
}

.passport-scene__picker img {
  display: block;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.passport-scene button:focus-visible,
.passport-scene a:focus-visible {
  outline: 3px solid #206c52;
  outline-offset: -3px;
}

.passport-scene.is-scene-image-missing .passport-scene__product-image {
  visibility: hidden;
}

.passport-scene[data-scene-reduced="true"] .passport-scene__product-image {
  filter: none;
}

@container teal-passport (max-width: 480px) {
  .passport-scene__product-fit { --passport-product-scale: 0.72; --passport-product-top: -49%; }
  .passport-scene[data-scene-product="1"] .passport-scene__product-fit { --passport-product-scale: 0.5; --passport-product-top: -53%; }
  .passport-scene[data-scene-product="2"] .passport-scene__product-fit { --passport-product-scale: 0.55; --passport-product-top: -53%; }
  .passport-scene__stage { aspect-ratio: 330 / 356; }
  .passport-scene__wallet-back,
  .passport-scene__wallet-window { inset: 34% 4% 7% 6%; border-radius: 21px; }
  .passport-scene__wallet-heading { flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px 12px; font-size: 13px; }
  .passport-scene__wallet-heading > span { width: 45px; white-space: normal; line-height: 1.2; }
  .passport-scene__wallet-heading svg { width: 21px; height: 21px; }
  .passport-scene__card-scroll { top: 6%; left: 60%; width: 74%; margin-left: -37%; aspect-ratio: 0.94; }
  .passport-scene__card-surface { border-radius: 19px; }
  .passport-scene__card-print::after { inset: 10px; border-radius: 11px; }
  .passport-scene__card-symbol { top: 14px; left: 14px; width: 24px; height: 24px; }
  .passport-scene__information { bottom: 6%; }
  .passport-scene__account-type { gap: 6px; margin-bottom: 7px; font-size: 12px; }
  .passport-scene__example { padding: 3px 5px; }
  .passport-scene__product-name { font-size: 20px; }
  .passport-scene__product-id { gap: 6px; margin-top: 6px; }
  .passport-scene__account-details { gap: 18px; margin-top: 10px; padding-top: 9px; }
  .passport-scene__card-cap { top: 10px; left: 10px; right: 10px; min-height: 31px; padding: 6px 8px; font-size: 12px; }
  .passport-scene__wallet-front { padding: 2px 13px 12px; border-radius: 18px 18px 21px 21px; transform: translateY(max(0px, calc(100% - 50px))); }
  .passport-scene__wallet-row { gap: 8px; }
  .passport-scene__wallet-sections { gap: 12px; font-size: 12px; }
  .passport-scene .passport-scene__open { min-width: 67px; padding-inline: 9px; }
  .passport-scene__wallet-product { gap: 7px; min-height: 44px; margin-top: 7px; padding: 5px 8px; }
  .passport-scene__wallet-product > img { width: 28px; height: 28px; }
  .passport-scene__wallet-item-copy { gap: 3px; }
  .passport-scene__wallet-product strong { font-size: 12px; }
  .passport-scene__wallet-item-copy > span { font-size: 12px; }
  .passport-scene__picker { gap: 4px; margin-top: 3px; padding: 3px; border-radius: 16px; }
  .passport-scene .passport-scene__picker button { min-height: 49px; gap: 3px; padding: 4px 5px; font-size: 12px; border-radius: 12px; }
  .passport-scene__picker img { width: 34px; height: 34px; }
}

@container teal-passport (max-width: 320px) {
  .passport-scene__product-fit { --passport-product-top: -53%; }
  .passport-scene[data-scene-product="1"] .passport-scene__product-fit,
  .passport-scene[data-scene-product="2"] .passport-scene__product-fit { --passport-product-top: -57%; }
  .passport-scene .passport-scene__picker button { gap: 2px; padding-inline: 3px; }
  .passport-scene__picker img { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .passport-scene .passport-scene__picker button,
  .passport-scene .passport-scene__open { transition: none; }
  .passport-scene__product-image { filter: none; }
}

@media (forced-colors: active) {
  .passport-scene__card-surface,
  .passport-scene__wallet-back,
  .passport-scene__wallet-front,
  .passport-scene__picker { border: 1px solid CanvasText; }
  .passport-scene .passport-scene__picker button[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -3px; }
}
