/* Separate exploration: Fibonacci × 4. Existing payment behavior is unchanged. */
:root{--fib-1:4px;--fib-2:8px;--fib-3:12px;--fib-5:20px;--fib-8:32px;--fib-13:52px;--motion-tap:160ms;--motion-select:260ms;--motion-grow:420ms;--ease-grow:cubic-bezier(.22,1,.36,1)}
.phone:not(.pix-mode) .blank-card{padding:var(--fib-5);border-radius:var(--fib-5);box-shadow:0 12px 32px #2424380d,0 1px 4px #24243805}
.wallet-unified .panel-heading{margin-bottom:var(--fib-5);gap:var(--fib-2)}
.wallet-unified .panel-heading h1{font-size:20px;line-height:28px;letter-spacing:-.5px}
.wallet-unified .wallet-deck{--stack-step:32px;--hero-height:176px;height:296px;margin-bottom:var(--fib-2)}
.wallet-unified .wallet-deck .wallet-card:not([aria-hidden="true"]),.wallet-unified .wallet-deck:not(.wallet-expanded) .wallet-card:nth-child(n+5):not([aria-hidden="true"]){transition:transform var(--motion-select) var(--ease-grow),height var(--motion-select) var(--ease-grow),width var(--motion-select) var(--ease-grow),left var(--motion-select) var(--ease-grow),filter var(--motion-select),opacity var(--motion-tap),box-shadow var(--motion-select)}
.wallet-unified .wallet-deck .wallet-card.wallet-active[aria-pressed="true"]:not([aria-hidden="true"]){width:100%;left:0;height:200px;min-height:200px}
.wallet-unified .wallet-show-all{min-height:44px;padding:var(--fib-2) var(--fib-5);margin:0 auto var(--fib-3)}
.wallet-unified .wallet-payment .merchant-terms{margin-bottom:var(--fib-3);padding-bottom:var(--fib-3);column-gap:var(--fib-3);row-gap:var(--fib-1)}
.wallet-unified .wallet-payment .merchant-total{margin-bottom:var(--fib-5)}
.wallet-unified .merchant-total strong{font-size:28px;line-height:32px;letter-spacing:-.7px}
.selfie{min-height:var(--fib-13);border-radius:var(--fib-8);transition:background var(--motion-tap),transform var(--motion-tap)}
.selfie:active{transform:scale(.98)}
.wallet-unified .alternative-link{min-height:44px;margin:var(--fib-3) auto 0;display:block;padding:var(--fib-3)}
.quiet-overlay .live-label{gap:var(--fib-1);transition-duration:var(--motion-tap)}
.receipt-details{margin-top:var(--fib-8);padding:var(--fib-5) 0}
.receipt-bank{gap:var(--fib-3);margin-bottom:var(--fib-5)}
.receipt-plan{gap:var(--fib-1);margin-top:var(--fib-3)}
.quiet-receipt{padding-top:var(--fib-5)}
.quiet-receipt .selfie{margin-top:var(--fib-8)}
.plan-toggle{min-height:var(--fib-13);padding:var(--fib-3) var(--fib-5)}
@media(hover:none) and (pointer:coarse) and (max-height:740px){.wallet-unified .wallet-deck{--stack-step:28px;--hero-height:152px;height:256px}.wallet-unified .wallet-deck .wallet-card.wallet-active[aria-pressed="true"]:not([aria-hidden="true"]){height:172px;min-height:172px}.wallet-unified .panel-heading{margin-bottom:12px}.wallet-unified .wallet-show-all{margin-bottom:8px}.wallet-unified .wallet-payment .merchant-total{margin-bottom:12px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.001ms!important;animation-delay:0ms!important;transition-duration:.001ms!important}}

/* The wallet review fits the available phone height; only the expanded picker scrolls. */
.phone:not(.pix-mode) #reveal:has(.wallet-unified){padding-top:16px;padding-bottom:8px;bottom:8px;align-items:end}
.phone:not(.pix-mode) .blank-card.compact-banks:has(.wallet-unified){height:auto;max-height:100%;overflow:hidden}
.wallet-unified .wallet-deck{overflow:hidden;overscroll-behavior:contain}
.wallet-unified .wallet-deck.wallet-expanded{overflow-x:hidden;overflow-y:auto}
@media(hover:none) and (pointer:coarse) and (max-width:500px){.phone:not(.pix-mode) #reveal:has(.wallet-unified){padding-top:calc(12px + env(safe-area-inset-top));padding-bottom:8px;bottom:calc(8px + env(safe-area-inset-bottom))}}

@media(hover:none) and (pointer:coarse) and (max-height:740px){
 .phone:not(.pix-mode) .blank-card.compact-banks:has(.wallet-unified){padding:14px 16px 10px}
 .wallet-unified .panel-heading{margin-bottom:8px}
 .wallet-unified .wallet-deck,.wallet-unified .wallet-deck.wallet-expanded{--stack-step:24px;--hero-height:172px;height:244px}
 .wallet-unified .wallet-deck .wallet-card:not([aria-hidden="true"]),
 .wallet-unified .wallet-deck:not(.wallet-expanded) .wallet-card:nth-child(n+5):not([aria-hidden="true"]){width:272px;max-width:100%;height:172px;min-height:172px;left:50%;transform:translate(-50%,calc(var(--slot)*24px)) scale(.92)}
 .wallet-unified .wallet-deck .wallet-card.wallet-active[aria-pressed="true"]:not([aria-hidden="true"]){width:272px;max-width:100%;height:172px;min-height:172px;left:50%;transform:translate(-50%,calc(var(--slot)*24px)) scale(1)}
 .wallet-unified .wallet-deck .wallet-card:hover{transform:translate(-50%,calc(var(--slot)*24px)) scale(.92)}
 .wallet-unified .wallet-deck .wallet-card.wallet-active:hover{transform:translate(-50%,calc(var(--slot)*24px)) scale(1)}
 .wallet-unified .wallet-show-all{min-height:40px;padding:6px 14px;margin-bottom:6px}
 .wallet-unified .wallet-payment .merchant-terms{margin-bottom:6px;padding-bottom:6px}
 .wallet-unified .wallet-payment .merchant-total{margin-bottom:8px}
 .wallet-unified .alternative-link{margin-top:4px}
 .wallet-unified .selfie{min-height:48px}
}

@media(hover:none) and (pointer:coarse) and (max-height:620px){
 .phone:not(.pix-mode) .blank-card.compact-banks:has(.wallet-unified){padding:10px 12px 8px}
 .wallet-unified .panel-heading{margin-bottom:6px}
 .wallet-unified .panel-heading h1{font-size:18px;line-height:22px}
 .wallet-unified .wallet-deck,.wallet-unified .wallet-deck.wallet-expanded{--stack-step:18px;--hero-height:128px;height:182px}
 .wallet-unified .wallet-deck .wallet-card:not([aria-hidden="true"]),
 .wallet-unified .wallet-deck:not(.wallet-expanded) .wallet-card:nth-child(n+5):not([aria-hidden="true"]){width:203px;max-width:100%;height:128px;min-height:128px;left:50%;transform:translate(-50%,calc(var(--slot)*18px)) scale(.92)}
 .wallet-unified .wallet-deck .wallet-card.wallet-active[aria-pressed="true"]:not([aria-hidden="true"]){width:203px;max-width:100%;height:128px;min-height:128px;left:50%;transform:translate(-50%,calc(var(--slot)*18px)) scale(1)}
 .wallet-unified .wallet-deck .wallet-card:hover{transform:translate(-50%,calc(var(--slot)*18px)) scale(.92)}
 .wallet-unified .wallet-deck .wallet-card.wallet-active:hover{transform:translate(-50%,calc(var(--slot)*18px)) scale(1)}
 .wallet-unified .wallet-card-number,.wallet-unified .wallet-card-kind{bottom:14px}
 .wallet-unified .wallet-show-all{min-height:36px;padding:4px 12px;margin-bottom:4px}
 .wallet-unified .wallet-payment .merchant-terms{margin-bottom:4px;padding-bottom:4px}
 .wallet-unified .wallet-payment .merchant-total{margin-bottom:6px}
 .wallet-unified .merchant-total strong{font-size:24px;line-height:28px}
 .wallet-unified .selfie{min-height:44px}
 .wallet-unified .alternative-link{min-height:36px;margin-top:2px;padding:6px}
}

/* One geometry contract for every card and input type. Never split left centering
   from its translateX: legacy nth-child/hover rules must not override one half. */
#reveal .wallet-unified .wallet-deck {--wallet-width:100%;--wallet-height:200px;--wallet-step:32px;height:calc(var(--wallet-height) + 3 * var(--wallet-step));}
#reveal .wallet-unified .wallet-deck button.wallet-card {
 --wallet-scale:.92;position:absolute;top:0;left:50%;right:auto;
 width:var(--wallet-width);max-width:100%;height:var(--wallet-height);min-height:var(--wallet-height);
 transform-origin:50% 0;transform:translate(-50%,calc(var(--slot) * var(--wallet-step))) scale(var(--wallet-scale));
 transition:transform var(--motion-select) var(--ease-grow),filter var(--motion-select),opacity var(--motion-tap),box-shadow var(--motion-select);
}
#reveal .wallet-unified .wallet-deck button.wallet-card.wallet-active {--wallet-scale:1}
@media(hover:none) and (pointer:coarse) and (max-height:740px){#reveal .wallet-unified .wallet-deck{--wallet-width:272px;--wallet-height:172px;--wallet-step:24px}}
@media(hover:none) and (pointer:coarse) and (max-height:620px){#reveal .wallet-unified .wallet-deck{--wallet-width:203px;--wallet-height:128px;--wallet-step:18px}}
@media(prefers-reduced-motion:reduce){#reveal .wallet-unified .wallet-deck button.wallet-card{transition:none!important}}

/* Scale the whole fixed composition, not individual text or card layouts. */
@media (hover:hover), (pointer:fine) {
 body{min-width:0;min-height:100svh;height:100svh;padding:12px;display:grid;place-items:center;background:#eeeef0;overflow:hidden}
 .preview-frame{position:relative;width:calc(420px * var(--preview-scale,1));height:calc(892px * var(--preview-scale,1))}
 .phone{width:420px;height:892px;min-height:892px;position:absolute;top:0;left:0;transform:scale(var(--preview-scale,1));transform-origin:top left}
}

/* Discreet, keyboard-accessible demo control; never covers checkout actions. */
.demo-settings-trigger{position:static;min-height:44px;padding:0;border:0;background:transparent;border-radius:8px;color:inherit;font:inherit;cursor:pointer}
.demo-settings-trigger:focus-visible{outline:2px solid #677d72;outline-offset:-5px;background:#ffffff88}
.demo-settings-trigger:disabled{pointer-events:none}
.demo-settings{width:min(340px,calc(100vw - 40px));max-height:calc(100svh - 40px);overflow:auto;padding:24px;border:1px solid #e3e5e4;border-radius:24px;background:#fafbf9;color:#202521;font:14px Geist,system-ui,sans-serif;box-shadow:0 20px 80px #0002}
.demo-settings::backdrop{background:#0005;backdrop-filter:blur(5px)}
.demo-settings h2{font-size:20px;margin:0 0 20px;letter-spacing:-.5px}.demo-settings fieldset{border:0;padding:0;margin:0;display:grid;gap:8px}.demo-settings label{display:flex;align-items:center;gap:12px;padding:16px;border:1px solid #d8ded9;border-radius:16px;background:#fff;cursor:pointer}.demo-settings label:has(input:checked){border-color:#506f60;background:#edf3ef}.demo-settings input{accent-color:#446c56;width:18px;height:18px}.demo-settings b,.demo-settings small{display:block}.demo-settings small{font-size:12px;color:#67706b;margin-top:4px}.demo-settings p{font-size:11px;color:#6b746e;line-height:1.5;margin:20px 0}.demo-settings-done{width:100%;min-height:44px;border:0;border-radius:12px;background:#203c2f;color:#fff;font:inherit}

.dorothy .quiet-dim{background:#f9faf8;backdrop-filter:blur(5px);animation:dorothy-veil .84s cubic-bezier(.22,.7,.2,1) both}
@keyframes dorothy-veil{from{opacity:0}to{opacity:1}}
.dorothy .live-pill{visibility:hidden}
.dorothy-card-ghost{position:absolute;z-index:11;object-fit:cover;border-radius:14px;pointer-events:none}
.dorothy-guide{position:absolute;z-index:12;top:144px;bottom:128px;left:24px;right:24px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;pointer-events:none;transition:opacity .52s ease,transform .52s ease}
.dorothy-heading{font-size:20px;letter-spacing:-.5px;font-weight:500;color:#273b30;opacity:0;transition:opacity .52s}
.dorothy-oval{height:calc(100% - 104px);max-height:384px;width:100%;overflow:visible;flex-shrink:1;min-height:0}
.dorothy-surface{opacity:0;transition:opacity .84s}.dorothy-outline{fill:none;stroke:#b5a264;stroke-width:1.5;opacity:0;transition:opacity .52s,stroke .52s}.dorothy-dots{fill:#aa9349;opacity:1;transition:opacity .52s ease}.dorothy-note{margin:0;font-size:12px;letter-spacing:.1px;color:#7c857e;opacity:0;transition:opacity .84s}
.dorothy-guide.formed .dorothy-surface,.dorothy-guide.entered .dorothy-heading,.dorothy-guide.entered .dorothy-note{opacity:1}
.dorothy-guide.settled .dorothy-outline{opacity:1}.dorothy-guide.settled .dorothy-dots{opacity:0}
.dorothy-guide.verified .dorothy-outline{stroke:#2c9d6b;stroke-width:2}.dorothy-guide.verified .dorothy-heading{color:#22794f}
.dorothy-guide.leaving{opacity:0;transform:translateY(-8px)}
@media(hover:none) and (pointer:coarse){.dorothy-guide{top:calc(88px + env(safe-area-inset-top));bottom:112px;gap:20px}.dorothy-oval{max-height:336px}}
@media(prefers-reduced-motion:reduce){.dorothy .quiet-dim,.dorothy-guide,.dorothy-guide *{transition:none!important;animation:none!important}.dorothy-dots{display:none}.dorothy-guide.leaving{transform:none}}

/* Dorothy uses a 4px spatial grid, 320/520/840/2200ms Fibonacci-related motion, and golden-angle source distribution. Optical strokes remain fractional. */

/* Dorothy is a bounded extension of the quiet-auth pill, not a new screen. */
.dorothy{--dorothy-top:72px;--dorothy-height:min(416px,calc(100% - 104px))}
.dorothy .quiet-dim{background:#00000024;backdrop-filter:blur(1px)}
.dorothy-guide{top:var(--dorothy-top);bottom:auto;left:50%;right:auto;width:min(280px,calc(100% - 48px));height:var(--dorothy-height);transform:translateX(-50%);padding:24px 20px 72px;display:grid;grid-template-rows:24px minmax(0,1fr)16px;gap:16px;isolation:isolate}
.dorothy-guide::before{content:"";position:absolute;z-index:-1;left:0;right:0;top:0;height:52px;border:1px solid #fff;border-radius:28px;background:#f7f9f6f5;box-shadow:0 12px 40px #1a302018;backdrop-filter:blur(16px);transition:height .84s cubic-bezier(.22,.7,.2,1)}
.dorothy-guide.entered::before{height:100%}
.dorothy-heading{font-size:16px;line-height:24px;white-space:nowrap;text-align:center;letter-spacing:-.3px}
.dorothy-oval{height:100%;max-height:none;width:100%;align-self:stretch}
.dorothy-note{font-size:10px;line-height:16px;text-align:center;white-space:nowrap}
.dorothy .live-cancel{top:calc(var(--dorothy-top) + var(--dorothy-height) - 56px);bottom:auto;height:40px;padding:8px 24px;background:#e9eeea;border:1px solid #dee5df;border-radius:20px;z-index:14}
.dorothy-guide.leaving{transform:translate(-50%,-8px)}
@media(hover:none) and (pointer:coarse){.dorothy{--dorothy-top:calc(24px + env(safe-area-inset-top));--dorothy-height:min(416px,calc(100% - 80px - env(safe-area-inset-top)))}}
@media(prefers-reduced-motion:reduce){.dorothy-guide::before{transition:none!important}.dorothy-guide.leaving{transform:translateX(-50%)}}

/* Explicit formation → lock → simulated scan. Fibonacci-count233 grains with paired top-center paths. */
.dorothy-guide .dorothy-dots{transition:fill .32s ease,opacity .52s ease}
.dorothy-guide.locked .dorothy-dots{fill:#60876e;opacity:1}
.dorothy-guide.locked .dorothy-outline{opacity:.25;stroke:#60876e}
.dorothy-guide.verified .dorothy-dots{fill:#2c9d6b}
.dorothy-scan{opacity:0;transition:opacity .32s ease}
.dorothy-guide.scanning .dorothy-scan{opacity:1}
.dorothy-guide.scanning .dorothy-scan rect{animation:dorothy-scan-pass 1.36s linear both}
.dorothy-guide.processing .dorothy-scan{opacity:0}
@keyframes dorothy-scan-pass{from{transform:translateY(0)}to{transform:translateY(272px)}}
@media(prefers-reduced-motion:reduce){.dorothy-guide.scanning .dorothy-scan rect{animation:none!important;transform:translateY(136px)}}

/* Inline Dorothy: the existing payment card is the surface, not a new modal. */
.dorothy{pointer-events:none}
.dorothy .quiet-dim{display:none}
.dorothy .dorothy-guide{bottom:auto;right:auto;transform:none;padding:0;display:grid;grid-template-rows:24px minmax(0,1fr)16px;gap:8px;isolation:auto}
.dorothy .dorothy-guide::before{display:none}
.dorothy .dorothy-heading{font-size:16px;line-height:24px;letter-spacing:-.3px}
.dorothy .dorothy-oval{height:100%;max-height:none;width:100%}
.dorothy .dorothy-note{font-size:10px;line-height:16px}
.dorothy .live-cancel{bottom:auto;transform:none;padding:0;pointer-events:auto;border:0;background:#f4f4f6;border-radius:24px;color:#62666a;font-size:12px;z-index:14}
.dorothy-inline #reveal .wallet-card{opacity:0!important;transition:opacity .84s ease!important}
.dorothy-inline .wallet-show-all{visibility:hidden}
.dorothy-inline .wallet-payment .selfie,.dorothy-inline .alternative-link{opacity:.3}
.dorothy .dorothy-guide.leaving{transform:translateY(-8px)}
@media(prefers-reduced-motion:reduce){.dorothy-inline #reveal .wallet-card{transition:none!important}.dorothy .dorothy-guide.leaving{transform:none}}

/* A real local preview sits within one clean solid frame; scan remains simulated. */
.dorothy-guide.locked .dorothy-dots{opacity:0}
.dorothy-guide.locked .dorothy-outline{opacity:1;stroke:#60876e;stroke-width:2}
.dorothy-guide.verified .dorothy-outline{stroke:#2c9d6b}
.dorothy-camera-preview{position:absolute;object-fit:cover;border-radius:50%;transform:scaleX(-1);opacity:0;transition:opacity .84s ease;z-index:0}
.dorothy-guide.camera-ready.formed .dorothy-camera-preview{opacity:1}
.dorothy-guide.camera-ready .dorothy-surface{opacity:0!important}
.dorothy-guide .dorothy-oval{position:relative;z-index:1}
.dorothy-guide .dorothy-heading,.dorothy-guide .dorothy-note{position:relative;z-index:2}

/* Give the oval the space formerly used by the footer disclosure. */
.dorothy .dorothy-guide{grid-template-rows:24px minmax(0,1fr)}
.dorothy .dorothy-note{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Exact vector perimeter and uniform grains avoid a rough scalloped lock. */
.dorothy-oval{shape-rendering:geometricPrecision}
.dorothy .dorothy-dots{transition:fill .52s ease,opacity .52s ease}
.dorothy .dorothy-outline{stroke-width:2;transition:opacity .52s ease,stroke .52s ease}

/* One continuous handoff: evenly spaced grains fill the same contour. */
.dorothy .dorothy-dots{fill:#839477;transition:opacity .52s ease}
.dorothy .dorothy-outline{stroke:#839477;stroke-width:2}
.dorothy .dorothy-guide.merging .dorothy-outline{opacity:1}
.dorothy .dorothy-guide.merging .dorothy-dots{opacity:0}
.dorothy .dorothy-guide.locked .dorothy-outline{stroke:#839477}
.dorothy .dorothy-guide.verified .dorothy-outline{stroke:#60876e}

/* Quiet visual guidance; status remains available to assistive technology. */
.dorothy .dorothy-heading{opacity:0!important;pointer-events:none}

/* By Unico3.0 capture adaptation: camera-backed framing with translucent guidance. */
@font-face{font-family:Atkinson;src:url('assets/atkinson-hyperlegible.ttf') format('truetype');font-display:swap}
.dorothy-camera-preview{border-radius:20px}
.dorothy-camera-shade{opacity:0;transition:opacity .84s ease}
.camera-ready.formed .dorothy-camera-shade{opacity:1}
.dorothy-capture-guidance{position:absolute;z-index:3;left:12px;right:12px;top:36px;margin:0;padding:8px;border-radius:8px;background:#ffffffcf;backdrop-filter:blur(8px);text-align:center;font:16px/24px Atkinson,sans-serif;color:#27362f;opacity:0;transition:opacity .32s ease;pointer-events:none}
.camera-ready.formed .dorothy-capture-guidance{opacity:1}
.dorothy-guide.processing .dorothy-capture-guidance{opacity:0}
.dorothy .dorothy-guide.camera-ready.locked .dorothy-outline{stroke:#c84c4c}
.dorothy .dorothy-guide.camera-ready.scanning .dorothy-outline{stroke:#39865b}
.dorothy .dorothy-scan{display:none!important}

.dorothy-capture-guidance{border-radius:0;background:#ffffffa3;backdrop-filter:blur(4px)}
