/* Capture reference: Style Guide Draft 0.8.1, page 10. */
.dorothy .quiet-dim{display:block;background:rgb(0 0 0 / 50%);backdrop-filter:none}
.dorothy .guide-v3{position:absolute;inset:auto 16px calc(clamp(40px, 11vh, 96px) + 60px);transform:none;width:auto;height:594px;max-height:calc(100% - clamp(40px, 11vh, 96px) - 76px);box-sizing:border-box;padding:56px 24px 16px;border-radius:20px;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:16px;overflow-y:auto;pointer-events:auto;font-family:Atkinson,sans-serif;animation:capture-enter .4s ease both}
.dorothy .guide-v3::before{display:none}
.capture-frame{position:relative;width:255px;height:395px;flex:none;max-width:100%;border-radius:50%;overflow:hidden;background:#f2f2f2}
.capture-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transform:scaleX(-1);opacity:0}
.camera-ready .capture-video{opacity:1}
.capture-outline{position:absolute;inset:0;width:100%;height:100%;fill:none;stroke:#e00000;stroke-width:3;transition:stroke .32s ease;z-index:2}
.holding .capture-outline{stroke:#43ce94}
.capture-face-symbol{position:absolute;top:20px;left:calc(50% - 20px);width:40px;height:52px;color:#fff}
.capture-face-symbol svg{display:block;width:40px;height:52px}
.capture-instruction{position:absolute;top:88px;left:0;right:0;margin:0;padding:8px 0;background:rgb(255 255 255 / 64%);color:#222;text-align:center;font:16px/24px Atkinson,sans-serif}
.capture-bank{width:48px;height:48px;flex:none;display:grid;place-items:center}
.capture-bank .auth-token{width:48px;height:48px}
.capture-note{margin:0;font:12px/18px Atkinson,sans-serif;color:#666;text-align:center}
.dorothy .live-cancel{position:absolute;left:50%;top:auto;bottom:32px;transform:translateX(-50%);height:44px;min-width:88px;padding:8px 16px;border:0;background:#f3f3f3;border-radius:12px;color:#222;z-index:14}
.dorothy .guide-v3.leaving{transform:translateY(12px);opacity:0}
@keyframes capture-enter{from{opacity:0;translate:0 16px}to{opacity:1;translate:0 0}}
@media(prefers-reduced-motion:reduce){.dorothy .guide-v3{animation:none}.capture-outline{transition:none}}

.capture-footer{border:0;padding:0;background:transparent;display:flex;align-items:center;justify-content:space-between;width:100%;margin-top:auto;flex:none;min-height:48px;gap:16px}
.capture-privacy{display:inline-flex;align-items:center;min-height:44px;font:14px/20px Atkinson,sans-serif;color:#555;text-decoration:underline;text-underline-offset:3px}
.capture-privacy:focus-visible{outline:2px solid #555;outline-offset:4px;border-radius:4px}

.capture-back{position:absolute;top:12px;left:12px;width:44px;height:44px;display:grid;place-items:center;border:0;background:transparent;color:#222;border-radius:50%;z-index:3;padding:10px}
.capture-back svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.capture-back:focus-visible{outline:2px solid #555;outline-offset:2px}
.add-card-trigger{position:absolute;right:20px;top:20px;width:44px;height:44px;border:0;border-radius:50%;background:#f3f3f5;font:32px/1 Geist,sans-serif;color:#222;z-index:5}
.wallet-unified>.panel-heading{padding-right:48px}
.add-card-dialog{position:fixed;inset:0;margin:auto;width:min(370px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid #e5e5e8;border-radius:24px;padding:24px;background:#fff;color:#191919;font-family:Geist,sans-serif;box-shadow:0 24px 80px #0003}
.add-card-dialog::backdrop{background:#0006;backdrop-filter:blur(4px)}
.add-card-dialog h2{font-size:24px;margin:6px 0 28px 44px}
.add-card-back{position:absolute;top:20px;left:16px;width:44px;height:44px;border:0;border-radius:50%;background:#f3f3f5;font-size:32px}
.new-card{position:relative;aspect-ratio:1.586;border-radius:20px;background:radial-gradient(ellipse at 10% 0,#70818e,transparent 70%),linear-gradient(130deg,#3b4854,#17222e);color:white;padding:24px;box-shadow:0 12px 24px #17222e25;display:flex;flex-wrap:wrap;align-content:space-between;justify-content:space-between;overflow:hidden}
.new-card>span:first-child{font-size:11px;letter-spacing:2px}.new-card-mark{font-size:24px}.new-card strong{width:100%;font-size:19px;font-weight:500;letter-spacing:1px;margin-top:36px}.new-card small{font-size:10px;max-width:75%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.new-card-particle{position:absolute;width:3px;height:3px;border-radius:50%;background:#d6e1e9;pointer-events:none}
.add-card-form{display:grid;gap:16px;margin-top:20px}.add-card-form p{font-size:12px;line-height:18px;color:#777;margin:0}.add-card-form label{display:grid;gap:8px;font-size:13px}.add-card-form input{width:100%;min-width:0;height:48px;border:1px solid #dddde3;border-radius:12px;padding:12px;font:16px Geist,sans-serif;background:#fafafa;color:#191919}.card-field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.add-card-form .card-form-error{color:#b42318}.card-form-error:empty{display:none}.generic-mark{font-size:30px;background:#354b57;color:#fff;border-radius:12px}

/* Wallet heading: 44px targets, 8px rhythm, 20px separation. */
.wallet-unified>.panel-heading{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:8px;padding:0;min-height:44px;margin:0 0 20px}
.wallet-unified>.panel-heading p{display:none}
.wallet-unified>.panel-heading h1{margin:0;font-size:20px;line-height:28px;letter-spacing:-.5px;white-space:nowrap}
.wallet-unified>.panel-heading #back,.wallet-unified>.panel-heading .add-card-trigger{position:static;inset:auto;margin:0;width:44px;height:44px;min-width:44px;padding:12px;border:0;display:grid;place-items:center;border-radius:50%;background:#f3f3f5;transform:none}
.wallet-unified>.panel-heading .add-card-trigger{font-size:26px;line-height:20px;font-weight:400}
.wallet-unified>.panel-heading #back svg{width:20px;height:20px}
@media(max-width:360px){.wallet-unified>.panel-heading{gap:4px;margin-bottom:16px}.wallet-unified>.panel-heading h1{font-size:18px;line-height:24px}}

.wallet-unified>.wallet-toolbar{grid-template-columns:44px 1fr 44px;margin-bottom:12px}
.wallet-toolbar .add-card-trigger{grid-column:3}

.adding-card .wallet-deck{pointer-events:none}
.inline-card-entry{width:100%;margin:0 0 8px}
.inline-card-entry .new-card{aspect-ratio:auto;min-height:296px;padding:16px;display:block;border-radius:20px;overflow:visible}
.inline-card-entry .new-card-mark{float:right;font-size:20px}
.inline-card-entry .new-card>strong,.inline-card-entry .new-card>small{display:none}
.inline-card-entry .add-card-form{margin-top:12px;gap:8px}
.inline-card-entry .add-card-form>p:first-child{font-size:10px;line-height:12px;color:#d0d7dd;order:5}
.inline-card-entry .add-card-form label{font-size:11px;gap:4px;color:#e4e9ef}
.inline-card-entry .add-card-form input{height:36px;padding:8px 10px;border:1px solid #ffffff38;background:#ffffff12;color:#fff;border-radius:8px;font-size:16px}
.inline-card-entry input::placeholder{color:#c1cbd5}
.inline-card-entry .add-card-form .selfie{height:36px;min-height:36px;padding:8px;margin:0;background:#fff;color:#202b36;font-size:13px}
.inline-card-entry .card-form-error{color:#ffe0da}
.adding-card .wallet-payment [data-selfie]{visibility:hidden;pointer-events:none}
@media(max-height:740px){.inline-card-entry .new-card{min-height:0;padding:12px}.inline-card-entry .add-card-form{gap:4px;margin-top:8px}.inline-card-entry .add-card-form input{height:32px}}

.inline-card-entry{display:flex;align-items:flex-end}.inline-card-entry .new-card{width:100%}

/* One fixed layout slot: only opacity and transforms animate. */
.wallet-entry-slot{position:relative;margin-bottom:8px;isolation:isolate}
.wallet-entry-slot>.wallet-deck{position:absolute;inset:0;margin:0!important;transition:opacity 360ms ease;will-change:opacity}
.wallet-entry-slot>.inline-card-entry{position:absolute;inset:0;margin:0;height:100%;min-height:0;align-items:stretch;z-index:2}
.wallet-entry-slot .new-card{min-height:0;height:100%;box-sizing:border-box;overflow:auto;scrollbar-width:thin}
.wallet-entry-slot .new-card-particle{pointer-events:none}
.adding-card .wallet-payment [data-selfie]{visibility:visible;opacity:.35;pointer-events:none}
@media(prefers-reduced-motion:reduce){.wallet-entry-slot>.wallet-deck{transition:none}}
#reveal .wallet-unified .wallet-entry-slot>.wallet-deck{position:absolute;inset:0;margin:0!important;opacity:0;transition:opacity 480ms ease,filter 480ms ease;filter:blur(3px)}
#reveal .wallet-unified .wallet-entry-slot>.inline-card-entry{position:absolute;inset:0;width:100%;height:100%;margin:0;overflow:visible}

.card-transition-cloud{position:absolute;inset:0;pointer-events:none;z-index:3;overflow:hidden;border-radius:20px}
.card-transition-cloud .new-card-particle{background:#b5c4cf;width:2px;height:2px}

#reveal .wallet-unified .wallet-entry-slot>.wallet-deck{filter:none;transition:opacity 520ms ease}
/* Reserve validation space and keep the action inside the card's rounded edge. */
.wallet-entry-slot .new-card{display:flex;flex-direction:column;padding:12px 16px 16px;overflow:hidden}
.inline-card-entry .new-card>span:first-child{line-height:16px;flex:none}
.inline-card-entry .new-card-mark{position:absolute;right:16px;top:12px;line-height:16px}
.inline-card-entry .add-card-form{flex:1;min-height:0;display:grid;grid-template-rows:auto auto minmax(16px,1fr) 36px;gap:6px;margin-top:8px}
.inline-card-entry .add-card-form label{gap:3px;font-size:11px;line-height:14px}
.inline-card-entry .add-card-form input{height:32px;padding:6px 10px}
.inline-card-entry .add-card-form .card-form-error{display:block;min-height:16px;font-size:11px;line-height:16px;margin:0;white-space:nowrap}
.inline-card-entry .add-card-form .selfie{align-self:end;height:36px;min-height:36px;line-height:20px;padding:8px;margin:0}
@media(max-height:620px){.wallet-entry-slot .new-card{overflow-y:auto}.inline-card-entry .add-card-form{flex:none}}
@media(max-height:740px){.wallet-entry-slot .new-card{overflow-y:auto}.inline-card-entry .add-card-form{flex:none}}

#reveal .wallet-deck .added-wallet-card{background:radial-gradient(ellipse at 10% 0,#70818e,transparent 70%),linear-gradient(130deg,#3b4854,#17222e));color:#fff}
#reveal .card-settling .wallet-card{transition:none!important}
#reveal .card-settling .added-wallet-card.wallet-active{transform-origin:center center}
.wallet-unified>.panel-heading #back{position:relative}
.wallet-unified>.panel-heading #back::after{display:none}

.card-morph-surface{position:absolute;inset:0;z-index:4;pointer-events:none;overflow:hidden;border-radius:inherit;padding:12px 16px 16px;background:radial-gradient(ellipse at 10% 0,#70818e,transparent 70%),linear-gradient(130deg,#3b4854,#17222e));text-align:left}
.card-morph-surface .add-card-form{opacity:1!important;margin-top:8px;gap:6px}
.card-morph-surface>strong,.card-morph-surface>small{display:none}
.card-morph-surface .new-card-mark{float:right}
.card-morph-surface input{height:32px;padding:6px 10px;background:#ffffff12;color:#fff;border-color:#ffffff38}
.card-morph-surface label{font-size:11px;gap:3px;color:#e4e9ef}
.card-morph-surface .selfie{height:36px;min-height:36px;margin:0;padding:8px;background:white;color:#202b36}

.bank-face .auth-token.token-chase,.receipt-bank .auth-token.token-chase{background:transparent;box-shadow:none;overflow:visible}
.bank-face .auth-token.token-chase svg,.receipt-bank .auth-token.token-chase svg{display:block;width:84%;height:84%;border-radius:0;overflow:visible}

#reveal .wallet-unified .wallet-deck .wallet-card:has(img[src*="chase-reserve-wallet"]){overflow:hidden;background:#17222e!important;outline:none; border:0!important;box-shadow:0 8px 20px #17222e20}
#reveal .wallet-unified .wallet-deck img[src*="chase-reserve-wallet"]{border-radius:0;inset:-.5px;width:calc(100% + 1px);height:calc(100% + 1px)}

#reveal .wallet-unified .wallet-deck.wallet-reflow button.wallet-card{transition:none!important}

.wallet-locked .wallet-deck .wallet-card{filter:grayscale(1) blur(4px)!important;opacity:.15!important;pointer-events:none}
.wallet-unlock{position:absolute;inset:0;z-index:30;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;text-align:center;gap:12px}
.wallet-unlock h2{font-size:22px;line-height:28px;margin:0}.wallet-unlock p{font-size:14px;line-height:20px;color:#666;margin:0;max-width:240px}
.wallet-unlock .selfie{font-size:14px;min-height:48px;margin:8px 0 0;width:100%}
.wallet-lock-symbol{width:48px;height:48px;font-size:0;position:relative;border:2px solid #333;border-radius:8px;background:#fafafa;margin-top:16px}
.wallet-lock-symbol:before{content:'';position:absolute;width:24px;height:24px;left:10px;top:-20px;border:2px solid #333;border-bottom:0;border-radius:16px 16px 0 0}
.wallet-lock-symbol:after{content:'';position:absolute;left:21px;top:16px;width:4px;height:12px;border-radius:3px;background:#333}
.wallet-locked [data-selfie]:disabled{background:#e1e1e5;color:#999;cursor:not-allowed}.wallet-locked [data-add-card]:disabled{opacity:.35}

.wallet-unlock{gap:32px;padding:24px}
.wallet-unlock .wallet-lock-symbol{display:grid;place-items:center;width:88px;height:88px;margin:0;border:1px solid #ffffffb3;border-radius:28px;background:linear-gradient(145deg,#ffffffed,#e9eaeddd);color:#34383e;box-shadow:0 8px 24px #171b2512}
.wallet-unlock .wallet-lock-symbol:before,.wallet-unlock .wallet-lock-symbol:after{display:none}
.wallet-lock-symbol svg{width:52px;height:52px}
.wallet-unlock .selfie{margin:0}
.wallet-locked [data-morebanks]{display:none!important}

.capture-bank.capture-unico{width:72px;height:48px}.capture-unico img{display:block;width:100%;height:100%;object-fit:contain}

/* Compact inline entry: two field rows with a deliberate action gap. */
.wallet-entry-slot .new-card{padding:16px;justify-content:flex-start}
.inline-card-entry .add-card-form{flex:none;margin:0;grid-template-rows:auto auto auto;gap:12px}
.inline-card-entry .add-card-form input{height:36px;padding:8px 10px}
.inline-card-entry .add-card-form .card-form-error:empty{display:none}
.inline-card-entry .add-card-form .selfie{margin-top:12px}
.adding-card [data-morebanks]{display:none}
.adding-card .wallet-entry-slot{margin-bottom:20px}

/* Keep entry at the wallet footprint; center the compact field group. */
.wallet-entry-slot .new-card{justify-content:center}
.adding-card [data-morebanks]{display:block;visibility:hidden;pointer-events:none}
.adding-card .wallet-entry-slot{margin-bottom:8px}

/* One easing family; avoid double-fading the deck under scripted motion. */
#reveal .wallet-unified .wallet-entry-slot>.wallet-deck{transition:none}
.dorothy .guide-v3{animation-duration:560ms;animation-timing-function:cubic-bezier(.22,.68,.2,1)}

.wallet-entry-slot .new-card.nubank-details{background:radial-gradient(ellipse at top left,#a145df,transparent 75%),linear-gradient(140deg,#7822ac,#300b50)}
.card-details-identity b{display:flex;justify-content:space-between;font-size:16px;font-weight:600}
.card-details-identity b span{font-size:13px;font-weight:400}
.card-details-identity p{margin:6px 0 0;color:#eee0f6;font-size:12px;line-height:16px}

/* Dorothy footer: clearer branding and slightly lower privacy baseline. */
.dorothy .capture-bank,.dorothy .capture-bank .auth-token{width:56px;height:56px}
.dorothy .capture-bank.capture-unico{width:84px;height:56px}
.dorothy .capture-privacy{transform:translateY(6px)}

/* Give the footer emblem room to breathe inside its circular token. */
.dorothy .capture-bank:not(.capture-unico),.dorothy .capture-bank .auth-token{width:64px;height:64px}
.dorothy .capture-bank .auth-token svg{display:block;width:88%;height:88%;border-radius:0;overflow:hidden}
.dorothy .capture-bank .auth-token img{width:88%;height:88%;padding:0;object-fit:contain}

/* Same footer footprint for payment and token setup keeps both ovals aligned. */
.dorothy .capture-footer{min-height:64px}
.dorothy .capture-bank.capture-unico{height:64px}

/* Amex uses the isolated Centurion medallion, without a card-pattern tile. */
.auth-token.token-10,.auth-token.token-11{background:transparent!important;box-shadow:none;border-radius:0;overflow:visible}
.bank-face .auth-token.token-10 svg,.bank-face .auth-token.token-11 svg,.receipt-bank .auth-token.token-10 svg,.receipt-bank .auth-token.token-11 svg{border-radius:0;overflow:visible}

/* Missing details remain anchored to the selected card, above the payment summary. */
#reveal .completing-card .wallet-entry-slot>.wallet-deck{filter:grayscale(1);opacity:.32}
#reveal .completing-card .wallet-entry-slot>.wallet-deck .wallet-active{visibility:hidden}
#reveal .completing-card .wallet-entry-slot>.inline-card-entry{top:var(--details-top);bottom:auto;height:var(--details-height)}
#reveal .completing-card .new-card{justify-content:flex-start;padding:20px 16px}
#reveal .completing-card .add-card-form{width:100%;gap:16px}
.wallet-unified .wallet-payment{transition:opacity 450ms ease,filter 450ms ease}
#reveal .adding-card .wallet-payment{opacity:.32;filter:grayscale(1);pointer-events:none}
#reveal .adding-card .wallet-payment [data-selfie]{opacity:1;background:#aaa;color:#fff}

.nubank-flip-front{position:absolute;inset:0 0 auto;overflow:hidden;border-radius:20px;background:#52118a;backface-visibility:hidden;pointer-events:none;z-index:3}
.nubank-flip-front .card-artwork{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.nubank-flip-front .wallet-card-number{position:absolute;bottom:16px;left:20px;color:#fff}
.nubank-flip-front .wallet-bank-name,.nubank-flip-front .wallet-card-kind{display:none}
#reveal .completing-card .new-card{padding:16px;backface-visibility:hidden}
#reveal .completing-card .add-card-form{gap:12px;grid-template-rows:auto auto auto auto}
#reveal .completing-card .card-details-identity p{display:none}
#reveal .completing-card .add-card-form .selfie{margin-top:4px}

.demo-settings-reset{display:block;width:100%;min-height:44px;margin-top:12px;border:1px solid #c8cecb;border-radius:12px;background:transparent;color:#38423d;font:inherit}

/* Expanded wallet uses one size for every card, including the selection. */
#reveal .wallet-unified .wallet-deck.wallet-expanded button.wallet-card{--wallet-scale:1;width:var(--wallet-width);height:var(--wallet-height);min-height:var(--wallet-height);left:50%;transform:translate(-50%,calc(var(--slot) * var(--wallet-step))) scale(1)}

/* Let the returning card's perspective edge extend outside the scroll viewport. */
#reveal .wallet-unified .wallet-deck.wallet-flip-return:not(.wallet-expanded){overflow:visible}

.wallet-unified [data-alternatives]{transition:opacity 450ms ease,filter 450ms ease}
#reveal .adding-card [data-alternatives]{opacity:.32;filter:grayscale(1);pointer-events:none}

/* Keep the return turn anchored to the same top edge as its form face. */
#reveal .card-settling .added-wallet-card.wallet-active{transform-origin:50% 0}
#reveal .card-returning .wallet-payment,
#reveal .card-returning [data-alternatives]{opacity:.32;filter:grayscale(1);pointer-events:none}
#reveal [data-morebanks]{transition:opacity 450ms ease}
#reveal .card-returning [data-morebanks]{opacity:0!important;pointer-events:none}

/* A gentler return to the wallet in both card-entry flows. */
#reveal .blank-card:not(.adding-card) .wallet-payment,
#reveal .blank-card:not(.adding-card) [data-alternatives]{transition:opacity 900ms cubic-bezier(.45,0,.55,1),filter 900ms cubic-bezier(.45,0,.55,1)}
#reveal .blank-card:not(.adding-card) [data-morebanks]{transition:opacity 900ms cubic-bezier(.45,0,.55,1)}

#reveal .card-settling .wallet-card.wallet-active{transform-origin:50% 0}

/* Shared JS timing drives both sides of the wallet fade. */
#reveal .wallet-unified .wallet-payment,
#reveal .wallet-unified [data-alternatives]{transition:none!important}
