/* Wallet preview is a separate rendering surface. It never changes a draft
   or the exported PNG. Container units keep the phone and card stack in scale. */
.wallet-preview[hidden] { display: none; }
.maker-stage.is-preview { background: #f0f4f7; }
.maker-stage.is-preview > .maker-canvas-wrap,
.maker-stage.is-preview .maker-layouts,
.maker-stage.is-preview .maker-stage__status { display: none; }
.wallet-preview { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding: 40px 20px 18px; overflow: hidden; }
.wallet-device { container-type: inline-size; position: relative; flex: 0 0 auto; width: min(340px,calc((100dvh - 235px) * .53125),calc(100% - 16px)); aspect-ratio: 17 / 32; margin: 0; padding: 7px; border: 2px solid #686f73; border-radius: 15% / 8%; background: #1d2327; box-shadow: inset 0 0 0 2px #111619,0 0 0 1px rgba(20,28,34,.3); mask-image: linear-gradient(to bottom,#000 0%,#000 74%,transparent 94%); }
.wallet-screen { position: relative; height: 100%; overflow: hidden; border-radius: calc(15cqw - 9px); background: linear-gradient(#fff 0%,#fff 70%,#f0f4f7 100%); color: #11161a; }
.wallet-status { position: relative; display: flex; align-items: center; justify-content: space-between; height: 13cqw; padding: 0 8cqw; font-size: 4.1cqw; font-weight: 700; line-height: 1; }
.wallet-island { position: absolute; top: 3.1cqw; left: 50%; width: 27cqw; height: 7.4cqw; transform: translateX(-50%); border-radius: 100px; background: #000; }
.wallet-status-icons { display: flex; align-items: center; gap: 1cqw; margin-right: -1.7cqw; }
.wallet-status-icons img { width: 4.5cqw; height: 4.5cqw; }
.wallet-status-icons img:last-child { width: 6.4cqw; }
.wallet-heading { position: relative; display: flex; align-items: center; justify-content: space-between; height: 17cqw; padding: 0 4.2cqw; }
.wallet-heading strong { font-size: 7.6cqw; line-height: 1; font-weight: 750; letter-spacing: -.04em; }
.wallet-heading-actions { display: flex; gap: 2cqw; }
.wallet-heading-actions > span { display: grid; place-items: center; width: 8.8cqw; height: 8.8cqw; border-radius: 50%; background: #f0f1f3; }
.wallet-heading-actions img { width: 5cqw; height: 5cqw; }
.wallet-close-payment { position: absolute; top: 50%; left: 4.2cqw; display: grid; place-items: center; width: 8.8cqw; height: 8.8cqw; padding: 0; transform: translateY(-50%); border: 0; border-radius: 50%; background: #f0f1f3; cursor: pointer; }
.wallet-close-payment[hidden] { display: none; }
.wallet-close-payment img { width: 5cqw; height: 5cqw; }
.wallet-stack { position: relative; width: calc(100% - 8.4cqw); height: 145cqw; margin: 1cqw auto 0; }
.wallet-ghost,.wallet-active-card { position: absolute; left: 0; width: 100%; aspect-ratio: 1536 / 969; border: 1px solid rgba(25,38,48,.07); border-radius: 3.4cqw; }
.wallet-ghost { overflow: hidden; background: linear-gradient(135deg,#e4e9ed,#cbd3d9); pointer-events: none; transition: transform 420ms cubic-bezier(.2,.8,.2,1),opacity 280ms ease; }
.wallet-ghost--1 { top: 0; z-index: 1; }
.wallet-ghost--2 { top: 12cqw; z-index: 2; background: linear-gradient(130deg,#42464a,#32373b); }
.wallet-ghost--3 { top: 24cqw; z-index: 3; background: linear-gradient(130deg,#386381,#2c506e); }
.wallet-ghost-brand { position: absolute; top: 7%; left: 5.5%; width: 13%; height: 5%; border-radius: 100px; background: #818b92; }
.wallet-ghost-subtitle { position: absolute; top: 15%; left: 5.5%; width: 9%; height: 2.3%; border-radius: 100px; background: #a5afb5; }
.wallet-ghost-mark { position: absolute; top: 7.5%; right: 5.5%; width: 14%; height: 4.5%; border-radius: 100px; background: #abb4ba; }
.wallet-ghost--2 .wallet-ghost-brand,.wallet-ghost--2 .wallet-ghost-subtitle { background: #92979b; }
.wallet-ghost--2 .wallet-ghost-mark { width: 6.5%; height: 10%; margin-right: 4%; border-radius: 50%; background: #83898d; }
.wallet-ghost--2 .wallet-ghost-mark::after { position: absolute; left: 62%; width: 100%; height: 100%; border-radius: 50%; background: rgba(151,157,161,.5); content: ''; }
.wallet-ghost--3 .wallet-ghost-brand,.wallet-ghost--3 .wallet-ghost-subtitle { background: #9cb3c3; }
.wallet-ghost--3 .wallet-ghost-mark { background: #7794a9; }
.wallet-active-card { top: 36cqw; z-index: 4; overflow: hidden; padding: 0; background: #172c3c; box-shadow: 0 2cqw 4cqw rgba(24,34,43,.16); cursor: pointer; transition: transform 420ms cubic-bezier(.2,.8,.2,1); }
#wallet-card-preview { display: block; width: 100%; height: 100%; }
.wallet-card-number { position: absolute; left: 5.5%; bottom: 5.5%; color: #fff; font-size: 4cqw; line-height: 1; font-weight: 500; white-space: nowrap; }
.wallet-preview[data-number="off"] .wallet-card-number { display: none; }
.wallet-preview[data-number="black"] .wallet-card-number { color: #111; }
.wallet-preview[data-number="white"] .wallet-card-number { text-shadow: 0 1px 2px rgba(0,0,0,.2); }
.wallet-ghost--front { top: 48cqw; z-index: 5; opacity: 0; }
.wallet-preview[data-stack="full"] .wallet-ghost:not(.wallet-ghost--front) { opacity: .52; }
.wallet-preview[data-stack="occluded"] .wallet-ghost--front { opacity: 1; }
.wallet-tap-hint { position: absolute; top: 98cqw; left: 0; width: 100%; margin: 0; color: #899198; text-align: center; font-size: 3.7cqw; line-height: 1.4; }
.wallet-preview[data-stack="occluded"] .wallet-tap-hint,.wallet-preview.is-paying .wallet-tap-hint { visibility: hidden; }
.wallet-reader { position: absolute; top: 67cqw; left: 0; display: flex; flex-direction: column; align-items: center; gap: 3cqw; width: 100%; opacity: 0; transition: opacity 240ms ease; }
.wallet-reader > span { display: grid; place-items: center; width: 13.5cqw; height: 13.5cqw; border: .85cqw solid #007aff; border-radius: 50%; }
.wallet-reader img { width: 9cqw; height: 9cqw; filter: invert(36%) sepia(100%) saturate(3374%) hue-rotate(200deg) brightness(103%) contrast(104%); }
.wallet-reader p { margin: 0; color: #899198; font-size: 4.1cqw; line-height: 1.4; }
.wallet-preview.is-paying .wallet-heading strong { visibility: hidden; }
.wallet-preview.is-paying .wallet-heading-actions > span:first-child { visibility: hidden; }
.wallet-preview.is-paying .wallet-active-card { transform: translateY(-36cqw); }
.wallet-preview.is-paying .wallet-ghost--1 { transform: translateY(108cqw); }
.wallet-preview.is-paying .wallet-ghost--2 { transform: translateY(98cqw); }
.wallet-preview.is-paying .wallet-ghost--3 { transform: translateY(88cqw); }
.wallet-preview.is-paying .wallet-ghost:not(.wallet-ghost--front) { opacity: 1; }
.wallet-preview.is-paying .wallet-ghost--front { opacity: 0; }
.wallet-preview.is-paying .wallet-reader { opacity: 1; transition-delay: 240ms; }
.wallet-preview-controls { position: absolute; right: 10px; bottom: 68px; left: 10px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.wallet-preview-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.wallet-control-group { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid #dce5ec; border-radius: 100px; background: rgba(240,244,247,.94); box-shadow: 0 2px 4px rgba(30,49,62,.06); }
.wallet-control-group > span { padding: 0 8px; color: #5b6975; font-size: 13px; white-space: nowrap; }
.wallet-control-group button { min-height: 30px; padding: 4px 10px; border: 0; border-radius: 100px; background: transparent; color: #586773; font: inherit; font-size: 13px; line-height: 1.4; cursor: pointer; white-space: nowrap; }
.wallet-control-group button[aria-pressed="true"] { background: #fff; color: #26343f; box-shadow: 0 1px 3px rgba(25,46,61,.08); font-weight: 650; }
.wallet-view-control { gap: 4px; background: rgba(255,255,255,.86); }
.wallet-view-control button { padding-inline: 15px; border: 1px solid transparent; }
.wallet-view-control button[aria-pressed="true"] { border-color: #315e7d; color: #254660; }
.maker-view-switch { position: absolute; z-index: 6; bottom: 18px; left: 50%; transform: translateX(-50%); }
.wallet-control-group button:focus-visible,.wallet-active-card:focus-visible,.wallet-close-payment:focus-visible { outline: 2px solid #2784bd; outline-offset: 2px; }
@media (max-width:680px) {
  .maker-page:has(.maker-stage.is-preview) .maker-mobile-tabs,.maker-page:has(.maker-stage.is-preview) .maker-catalog,.maker-page:has(.maker-stage.is-preview) .maker-inspector { display: none; }
  .wallet-preview { padding: 16px 12px 12px; }
  .wallet-preview-controls { bottom: 62px; }
  .maker-view-switch { bottom: 318px; }
  .maker-stage.is-preview .maker-view-switch { bottom: 12px; }
  .wallet-control-group button { padding-inline: 9px; }
}
@media (prefers-reduced-motion:reduce) {
  .wallet-ghost,.wallet-active-card,.wallet-reader { transition: none; }
}
