/* ---------- pay-morph mockup (Indy 2026-10-24): Pay levels (Cash / Coins / coin detail) + Contact <-> Pay morph ---------- */
.pay-pane .pay-view[hidden] { display: none !important; }
.pay-pane .pay-view { display: flex; flex-direction: column; align-items: center; }
.pay-pane .pay-stack { display: block; }
.contact-pane.is-sub .contact-card-shine { display: none; }
.pay-pane .ios-grid--pay { flex-wrap: nowrap; max-width: none; }
.pay-pane .ios-grid--coins { gap: 14px 14px; }
.pay-top { position: relative; align-self: stretch; display: flex; align-items: center; justify-content: center; min-height: 36px; min-width: 15rem; }
.pay-pane .coin-view .pay-top, .pay-pane .doge-view .pay-top { min-width: 0; }
.pay-back {
  position: absolute; left: -2px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0; margin: 0; border: 0; border-radius: 50%;
  color: var(--fg); background: var(--lg-ctl, rgba(127, 127, 127, 0.14)); cursor: pointer; -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 1px 0 var(--lg-ctl-top, rgba(255, 255, 255, 0.2)), inset 0 0 0 1px var(--lg-ctl-rim, rgba(0, 0, 0, 0.08)), 0 1px 2px rgba(0, 0, 0, 0.10);
  transition: background-color 120ms ease, transform 120ms ease;
}
.pay-back:hover { background: var(--lg-ctl-hover, rgba(127, 127, 127, 0.22)); }
.pay-back:active { transform: translateY(-50%) scale(0.92); }
.pay-back svg { display: block; width: 16px; height: 16px; margin-left: -1px; }
.pay-back:focus-visible { outline: 2px solid var(--ds-accent, #2f62d9); outline-offset: 2px; }
.pay-title { display: inline-flex; align-items: center; gap: 7px; color: var(--fg);
  font: 600 15px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", "Helvetica Neue", Arial, sans-serif; letter-spacing: 0.01em; }

/* App tiles */
.ios-cash { background: linear-gradient(180deg, #3fd16b 0%, #24b24f 55%, #169a3f 100%); }
.ios-coins { background: linear-gradient(160deg, #fff9ef 0%, #fde9c8 55%, #f8d29a 100%); }
/* Official logos, hosted locally (Indy 2026-10-24): bitcoin.org, Dogecoin Core repo, cardano.org brand assets, midnight.network brand hub */
.ios-logo { position: relative; display: block; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.28)); }
.ios-logo--coins { filter: drop-shadow(0 1px 1.5px rgba(120, 60, 0, 0.35)); }
.ios-btc { background: linear-gradient(180deg, #fffdf8 0%, #fdf1de 60%, #f7e2c0 100%); }
.ios-ada { background: #0033ad; }   /* Cardano brand Blue #0033AD (cardano.org/brand-assets) */
.ios-logo--ada { filter: none; }
.ios-mn { background: #0a0a0a; }
.ios-logo--mn { filter: none; }
.ios-mn::after { box-shadow: inset 0 0 0 0.75px rgba(255, 255, 255, 0.22); }
.coin-mini { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; overflow: hidden; }
.coin-mini img { display: block; width: 20px; height: 20px; }
.coin-mini--ada { background: #0033ad; }
.coin-mini--ada img { width: 16px; height: 16px; }
.coin-mini--mn { background: #0a0a0a; box-shadow: inset 0 0 0 0.75px rgba(255, 255, 255, 0.25); }
.coin-mini--mn img { width: 14px; height: 14px; }
.coin-mini--btc { border-radius: 50%; }

/* Coin detail (same build as the after28 Dogecoin view, neutral accent per coin) */
.coin-view { --coin: #f7931a; gap: 10px; width: 19rem; max-width: 100%; margin: 0 auto; padding: 0.1rem 0 0.15rem; white-space: normal; box-sizing: border-box; }
.coin-view--ada { --coin: #2f6bff; }
.coin-view--mn { --coin: #8e8e9a; }
.coin-qr-tile { display: block; padding: 8px; border-radius: 16px; background: #fff;
  box-shadow: 0 0 0 2px var(--coin), 0 0 0 5px color-mix(in srgb, var(--coin) 22%, transparent), 0 8px 20px rgba(0, 0, 0, 0.22); }
.coin-qr { display: block; width: 164px; height: 164px; }
.coin-qr--ada, .coin-qr--mn { width: 196px; height: 196px; }   /* 49 modules x 4px */
.coin-addr-row { display: flex; align-items: center; gap: 6px; align-self: stretch; margin-top: 4px; }
.coin-addr {
  flex: 1 1 auto; min-width: 0; height: 36px; padding: 0 11px; margin: 0; border: 0; border-radius: 999px; cursor: copy;
  display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap;
  color: var(--fg); background: var(--lg-ctl, rgba(127, 127, 127, 0.12));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--coin) 60%, transparent), inset 0 1px 0 var(--lg-ctl-top, rgba(255, 255, 255, 0.2));
  font: 500 12px/1 "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; letter-spacing: -0.01em;
  -webkit-tap-highlight-color: transparent; transition: background-color 120ms ease;
}
.coin-addr:hover { background: var(--lg-ctl-hover, rgba(127, 127, 127, 0.2)); }
.coin-copy {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; margin: 0; border: 0; border-radius: 50%;
  color: #fff; background: var(--coin); cursor: pointer; -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 0 0 1px rgba(0, 0, 0, 0.18), 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: background 160ms ease, transform 120ms ease;
}
.coin-copy:active { transform: scale(0.92); }
.coin-copy svg { grid-area: 1 / 1; display: block; width: 16px; height: 16px; transition: opacity 140ms ease; }
.coin-copy .icon-check { opacity: 0; }
.coin-addr:focus-visible, .coin-copy:focus-visible { outline: 2px solid var(--coin); outline-offset: 2px; }
.coin-view.is-copied .coin-copy { background: linear-gradient(180deg, #3ad873 0%, #22b456 100%); }
.coin-view.is-copied .coin-copy .icon-copy { opacity: 0; }
.coin-view.is-copied .coin-copy .icon-check { opacity: 1; }
.coin-status { display: grid; place-items: center; min-height: 20px; }
.coin-status > span { grid-area: 1 / 1; text-align: center; transition: opacity 160ms ease; }
.coin-status-hint { color: var(--muted, rgba(127, 127, 127, 0.9)); font: 500 11.5px/1.3 -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Arial, sans-serif; }
.coin-status-done { color: #22b456; font: 600 14px/1.2 -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Arial, sans-serif; opacity: 0; }
.coin-view.is-copied .coin-status-hint { opacity: 0; }
.coin-view.is-copied .coin-status-done { opacity: 1; }
@media (max-width: 640px) {
  .coin-view { width: 100%; max-width: 22rem; gap: 12px; }
  .coin-qr { width: 205px; height: 205px; }                     /* 41 x 5px */
  .coin-qr--ada, .coin-qr--mn { width: 196px; height: 196px; }
  .coin-addr { height: 40px; font-size: 13px; }
  .coin-copy { width: 40px; height: 40px; }
  .pay-top { min-width: 0; }
}

/* Level slides (after28 pattern) */
@keyframes pv-in-fwd { from { opacity: 0; transform: translate3d(22px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes pv-in-back { from { opacity: 0; transform: translate3d(-22px, 0, 0); } to { opacity: 1; transform: none; } }
.pay-view.pv-in-fwd { animation: pv-in-fwd 340ms cubic-bezier(.32, .72, 0, 1) both; }
.pay-view.pv-in-back { animation: pv-in-back 320ms cubic-bezier(.32, .72, 0, 1) both; }

/* Contact <-> Pay morph. During the transition the pane itself is drawn without its glass; the shared View Transition
   group carries the glass, so the shell morphs size/position/shape cleanly and only the content crossfades. */
html.pane-morph .contact-pane, html.pane-morph .contact-scrim, html.pane-swap-now .contact-pane, html.pane-swap-now .contact-scrim { transition: none !important; }
html.pane-morph .contact-pane::after { animation: none !important; }
.contact-pane.morph-src { view-transition-name: pay-morph; }
html.pane-morph .contact-pane.morph-src.contact-pane {
  background: transparent !important; border-color: transparent !important; box-shadow: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
html.pane-morph .contact-pane.morph-src::before { opacity: 0; }
::view-transition-group(pay-morph) {
  animation-duration: 440ms; animation-timing-function: cubic-bezier(.32, .72, 0, 1);
  border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, var(--lg-sheen) 0%, rgba(255, 255, 255, 0) 46%), var(--lg-solid);
  box-shadow: inset 0 0 0 1px var(--lg-edge), var(--lg-shadow);
}
::view-transition-image-pair(pay-morph) { overflow: hidden; border-radius: inherit; }
::view-transition-old(pay-morph), ::view-transition-new(pay-morph) {
  width: auto; height: auto; inset: 0 auto auto 0; object-fit: none; mix-blend-mode: normal;
}
::view-transition-old(pay-morph) { animation: pm-out 200ms ease-out both; }
::view-transition-new(pay-morph) { animation: pm-in 300ms cubic-bezier(.32, .72, 0, 1) 120ms both; }
@keyframes pm-out { from { opacity: 1; filter: blur(0); } to { opacity: 0; filter: blur(3px); } }
@keyframes pm-in { from { opacity: 0; filter: blur(3px); transform: scale(.97); } to { opacity: 1; filter: none; transform: none; } }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 440ms; }
@media (max-width: 640px) {
  ::view-transition-group(pay-morph) { border-radius: 32px; }
  ::view-transition-new(pay-morph) { transform-origin: 50% 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .pay-view.pv-in-fwd, .pay-view.pv-in-back { animation: none; }
  .pay-back, .coin-copy, .coin-copy svg, .coin-status > span, .coin-addr { transition: none; }
  .pay-back:active { transform: translateY(-50%); }
  .coin-copy:active { transform: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* r3 (Indy 2026-10-24): desktop top level gets the same "Pay Indy" title as the mobile sheet, built like the
   Coins / Dogecoin sub-level titles (.pay-top + .pay-title, no back button). Mobile keeps its sheet title (.contact-card-name). */
/* same 13.6px title-to-grid spacing as the Coins level */
@media (max-width: 640px) { .pay-pane .pay-top--home { display: none; } }

/* r4 (Indy 2026-10-24): tighter Pay pane. Top level and Cash/Coins share smaller tiles (60 -> 52px desktop, 54px mobile),
   tighter gaps/margins, a shorter title row and less pane padding; coin/doge detail headers match. Contact pane untouched. */
.pay-pane .ios-grid, .pay-pane .pay-options.ios-grid { gap: 12px 12px; margin: 0.55rem auto 0.3rem; max-width: none; }
.pay-pane .ios-app { width: 56px; gap: 5px; }
.pay-pane .ios-tile { width: 52px; height: 52px; border-radius: 11.6px; }
.pay-pane .ios-icon { zoom: 0.8667; }          /* 60 -> 52px, logos scale with it */
.pay-pane .ios-label { font-size: 11px; max-width: 62px; }
.pay-pane .pay-top, .pay-pane .doge-top { min-height: 32px; }
.pay-pane .pay-top { min-width: 11rem; }
.pay-pane .coin-view .pay-top, .pay-pane .doge-view .pay-top { min-width: 0; }
.pay-pane .pay-back, .pay-pane .doge-back { width: 32px; height: 32px; }
.pay-pane .pay-title { font-size: 14.5px; }
@media (min-width: 641px) {
  html[data-theme] .contact-pane.contact-pane.pay-pane { min-width: 0; padding: 9.6px 11.2px; }
  .pay-pane .doge-view { --pl: 11.2px; --pb: 9.6px; }
}
@media (max-width: 640px) {
  .pay-pane .ios-grid, .pay-pane .pay-options.ios-grid { gap: 14px 20px; margin: 0.6rem auto 0.5rem; }
  .pay-pane .ios-app { width: 60px; }
  .pay-pane .ios-tile { width: 54px; height: 54px; border-radius: 12px; }
  .pay-pane .ios-icon { zoom: 0.9; }
  .pay-pane .pay-top { min-width: 0; }
  .pay-pane .pay-back, .pay-pane .doge-back { width: 34px; height: 34px; }
}

/* r6 (Indy 2026-10-24): "Contact Indy" title, the same as "Pay Indy". Desktop: a .pay-top--home title row above the
   icons (same font, size and row height as the Pay pane's). Mobile: the sheet title (.contact-card-name) reads
   "Contact Indy", like the Pay sheet's "Pay Indy". */
.contact-pane:not(.pay-pane) .contact-top { min-height: 32px; min-width: 0; margin: 0 0 -0.25rem; }
.contact-pane:not(.pay-pane) .contact-top .pay-title { font-size: 14.5px; }
@media (max-width: 640px) { .contact-pane .contact-top { display: none; } }

/* r6 (Indy 2026-10-24): address pills hug their text in every coin pane (Bitcoin, Cardano, Midnight, Dogecoin).
   Shrink-to-fit (no stretch, no fixed width), the same 12px padding at both ends, and the pill + copy button pair is
   centred in the pane. If a pill is ever wider than the pane it still shrinks and clips rather than overflowing. */
.coin-addr-row, .doge-view .doge-addr-row { justify-content: center; }
.coin-addr, .doge-view .doge-addr { flex: 0 1 auto; width: auto; padding: 0 12px; }
/* r9 (Indy 2026-10-24): the X tile is the exact official X app icon (Apple App Store artwork for "X" by X Corp.,
   app id 333903271, 512px PNG via the iTunes lookup API), downscaled only; the tile's rounded corners clip it. */
.ios-x .ios-app-art { display: block; width: 100%; height: 100%; }

/* r12 (Indy 2026-10-24): title morph on Contact <-> Pay. "Indy" is one persistent element (pm-indy): only the new
   snapshot is drawn, so it never fades or doubles; its group glides to the new x/y with the pane's 440ms easing.
   The first word floats up and fades out; the incoming word rises in from below. Same direction both ways
   (Contact -> Pay and Pay -> Contact), like a counter rolling up. Reduced motion: no View Transition (instant swap). */
.pt-text .pt-word, .pt-text .pt-indy { display: inline-block; }
.pt-text.pt-old .pt-word { view-transition-name: pm-word-out; }
.pt-text.pt-new .pt-word { view-transition-name: pm-word-in; }
.pt-text.pt-old .pt-indy, .pt-text.pt-new .pt-indy { view-transition-name: pm-indy; }
::view-transition-group(pm-indy), ::view-transition-group(pm-word-out), ::view-transition-group(pm-word-in) {
  animation-duration: 440ms; animation-timing-function: cubic-bezier(.32, .72, 0, 1);
}
::view-transition-old(pm-indy) { animation: none; opacity: 0; }
::view-transition-new(pm-indy) { animation: none; opacity: 1; }
::view-transition-old(pm-word-out) { animation: pt-out 280ms cubic-bezier(.32, .72, 0, 1) both; }
::view-transition-new(pm-word-in) { animation: pt-in 340ms cubic-bezier(.32, .72, 0, 1) 100ms both; }
@keyframes pt-out { from { opacity: 1; transform: none; filter: none; } to { opacity: 0; transform: translateY(-0.6em); filter: blur(1.5px); } }
@keyframes pt-in { from { opacity: 0; transform: translateY(0.6em); filter: blur(1.5px); } to { opacity: 1; transform: none; filter: none; } }

/* after46 (Indy 2026-10-25, mobile): "the pay pane app icons are way too small, make them life size". Phone tiles now
   match the Contact sheet's 64px home-screen size (labels 12.5px); the sheet grows to fit. The four-coin row keeps one
   line with a tighter gap. */
@media (max-width: 640px) {
  .pay-pane .ios-grid, .pay-pane .pay-options.ios-grid { gap: 14px 26px; margin: 0.95rem auto 0.8rem; }
  .pay-pane .ios-app { width: 70px; gap: 7px; }
  .pay-pane .ios-tile { width: 64px; height: 64px; border-radius: 14.3px; }
  .pay-pane .ios-icon { zoom: 1.0667; }
  .pay-pane .ios-label { font-size: 12.5px; max-width: 72px; }
  .pay-pane .pay-coins .ios-grid { gap: 14px 10px; }
  .pay-pane .pay-coins .ios-app { width: 66px; }
}
