/* ============================================================================
   BeamHello — recipient card stylesheet (R1).
   Sourced from the refined design hand-off (~/Downloads/refine design - bh.zip
   → reference/styles.css). Reads design-system tokens from
   /css/colors_and_type.css; reuses .bh-* primitives from /css/components.css.

   Layout dispatch — one HTML tree, two visual paths:
     data-layout="split"      → identity rail + content body  (≥720px container)
     data-layout="editorial"  → cover band + docked save bar  (<720px container)
   The renderer always emits data-layout="split"; the breakpoint reveals the
   editorial-only `.hero` block and `.dockbar` and hides the split-only
   `.id-cover`. Container query is the primary mechanism; a min-width media
   query is the fallback for older WebKit.
   ============================================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body.screen {
  font-family: var(--bh-font-body);
  color: var(--bh-ink);
  background: var(--bh-bg);
  container: screen / inline-size;
  min-height: 100vh;
}

/* ---- card root ---------------------------------------------------------- */
.card-root {
  font-family: var(--bh-font-body); color: var(--bh-ink);
  min-height: 100vh; position: relative;
  display: flex; flex-direction: column;
}
.card { position: relative; flex: 1 0 auto; display: flex; flex-direction: column; }

/* ---- editorial hero (visible only in editorial layout) ------------------ */
.hero { display: none; position: relative; overflow: hidden; min-height: 168px;
        padding: 26px 22px 0; }
.hero .hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero .hero-glow {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(120% 120% at 80% -20%, rgba(255,255,255,.30), transparent 55%);
}
.hero .hero-mark { position: relative; z-index: 2; display: flex; }
.hero .share-btn {
  position: absolute; top: 20px; right: 20px; z-index: 3;
  background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.30); color: #fff;
  backdrop-filter: blur(4px);
}
.hero .share-btn:hover { background: rgba(255,255,255,.26); }

/* ---- identity (rail in split, inline-below-hero in editorial) ----------- */
.id { position: relative; padding: 30px 22px 26px; text-align: center;
      display: flex; flex-direction: column; align-items: center;
      background: var(--bh-surface); border-bottom: 1px solid var(--bh-line); }
/* .id-cover is a direct child of .id now (not nested in a display:none .id-bg).
   Hidden by default; the split layout shows it as a 156px gradient band at the
   top of the rail. Editorial uses the separate full-bleed .hero instead. */
.id-cover {
  display: none; position: relative; overflow: hidden;
  background: var(--accent-grad);
}
.id-cover .cover-glow {
  position: absolute; inset: 0;
  background: radial-gradient(120% 130% at 82% -20%, rgba(255,255,255,.32), transparent 55%);
}

.avatar-pop { position: relative; z-index: 2; margin-bottom: 16px; }

.share-btn {
  position: absolute; top: 18px; right: 18px;
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bh-surface); border: 1px solid var(--bh-line);
  box-shadow: var(--bh-shadow-sm); cursor: pointer; color: var(--bh-ink-soft);
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}
.share-btn:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.share-btn:active { transform: scale(.94); }

.name {
  font-family: var(--heading-font); font-weight: 600;
  letter-spacing: -0.015em; color: var(--bh-ink); margin: 0;
  font-size: 28px; line-height: 1.1; text-wrap: balance;
}
.role {
  font-size: 15px; color: var(--bh-ink-soft); margin: 7px 0 0; font-weight: 500;
}
.role .org { color: var(--bh-ink); font-weight: 600; }
.role .dot { margin: 0 8px; color: var(--bh-muted); }

.rail-actions {
  margin-top: 20px; width: 100%; max-width: 340px;
  display: flex; flex-direction: column; gap: 9px;
  position: relative; z-index: 2;
}

/* Split action pill — "Save contact" | "Beam back", one unified gradient pill
   (action-dock hand-off). Container carries the gradient + shadow; the two
   halves are transparent, independently tappable controls over it. Shared by
   the mobile dock (.dockbar) and the desktop identity rail (.rail-actions). */
.save-split {
  flex: 1; display: flex; align-items: stretch; height: 52px;
  background: var(--accent-grad); border-radius: 999px; overflow: hidden;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 34%, transparent);
}
.split-main {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: none; background: transparent; cursor: pointer; color: #fff; text-decoration: none;
  font-family: var(--bh-font-body); font-weight: 700; font-size: 17px; white-space: nowrap;
  transition: filter .15s ease, transform .12s ease;
}
.split-main:active { filter: brightness(1.06); transform: scale(.985); }
.split-divider { width: 1px; flex: none; background: rgba(255,255,255,.32); margin: 11px 0; }
.split-beam {
  flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 0 18px;
  border: none; background: transparent; cursor: pointer; color: #fff;
  font-family: var(--bh-font-body); font-weight: 700; font-size: 14px; white-space: nowrap;
  transition: background .15s ease;
}
.split-beam:active { background: rgba(255,255,255,.14); }
.split-main:focus-visible, .split-beam:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }

.dockbar { display: none; }

.quick { display: grid; grid-template-columns: repeat(2, 1fr);
         gap: 10px; width: 100%; max-width: 340px; margin-top: 18px;
         position: relative; z-index: 2; }
.qbtn {
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 7px;
  min-height: 70px; padding: 12px 8px; text-decoration: none;
  background: var(--bh-surface); border: 1px solid var(--bh-line); border-radius: var(--radius);
  cursor: pointer; color: var(--bh-ink);
  font-family: var(--bh-font-body); font-weight: 600; font-size: 12.5px;
  transition: transform .12s ease, border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
.qbtn:hover { border-color: var(--accent); background: var(--accent-soft); box-shadow: var(--bh-shadow-sm); }
.qbtn:active { transform: scale(.96); }
.qbtn .qic {
  width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
}
.socials { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap;
           position: relative; z-index: 2; }
.soc {
  width: 46px; height: 46px; border-radius: 13px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bh-surface); border: 1px solid var(--bh-line); color: var(--bh-ink-soft);
  cursor: pointer; transition: transform .14s ease, border-color .14s ease, color .14s ease, background .14s ease;
}
.soc:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.soc:active { transform: scale(.95); }
.soc:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.body { padding: 24px 22px 30px; display: flex; flex-direction: column; gap: 14px; }

.bio {
  font-size: 14.5px; line-height: 1.6; color: var(--bh-ink-soft); margin: 0;
  background: var(--accent-soft); padding: 15px 17px; border-radius: var(--radius);
  text-wrap: pretty;
}
.bio .bio-line { display: block; }
.bio .at { color: var(--accent); font-weight: 600; }

.chips-row { display: flex; flex-wrap: wrap; gap: 8px; }

.featured-stack { display: flex; flex-direction: column; gap: 12px; }
.featured {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 16px; border-radius: var(--radius); cursor: pointer; text-decoration: none;
  background: var(--accent-soft); border: 1px solid transparent;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
  color: inherit;
}
.featured:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent), var(--bh-shadow-md); }
.featured:active { transform: scale(.99); }
.featured-ic {
  width: 48px; height: 48px; flex: none; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-grad); color: #fff; box-shadow: var(--bh-shadow-sm);
}
.featured-tx { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.featured-tx b { font-family: var(--heading-font); font-weight: 600; font-size: 17px; color: var(--bh-ink); letter-spacing: -.01em; }
.featured-tx span { font-size: 13px; color: var(--bh-ink-soft); }

.media-stack { display: flex; flex-direction: column; gap: 12px; }
.pod {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 14px; border-radius: var(--radius); cursor: pointer; text-decoration: none;
  background: var(--bh-surface); border: 1px solid var(--bh-line); color: inherit;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.pod:hover { transform: translateY(-2px); box-shadow: var(--bh-shadow-md); border-color: transparent; }
.pod:active { transform: scale(.99); }
.pod-art {
  width: 56px; height: 56px; flex: none; border-radius: 13px; position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--bh-ink) 0%, #2a2740 100%);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.pod-art .wave { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 3px; opacity: .9; }
.pod-art .wave i { width: 3px; border-radius: 3px; background: var(--accent-2); display: block; animation: eq 1.1s ease-in-out infinite; height: 9px; }
.pod-art .wave i:nth-child(2) { animation-delay: .14s; }
.pod-art .wave i:nth-child(3) { animation-delay: .28s; }
.pod-art .wave i:nth-child(4) { animation-delay: .42s; }
.pod-tx { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pod-tx b { font-family: var(--heading-font); font-weight: 600; font-size: 16px; color: var(--bh-ink); letter-spacing: -.01em; }
.pod-tx span { font-family: var(--bh-font-mono); font-size: 11.5px; color: var(--bh-muted); text-transform: uppercase; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-play {
  width: 40px; height: 40px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
}
@keyframes eq { 0%,100% { height: 9px; } 50% { height: 26px; } }
@media (prefers-reduced-motion: reduce) { .pod-art .wave i { animation: none; height: 16px; } }

.qr-quick {
  display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; white-space: nowrap;
  padding: 13px; cursor: pointer;
  background: transparent; border: 1px dashed color-mix(in srgb, var(--accent) 30%, var(--bh-line));
  border-radius: var(--radius); color: var(--bh-ink-soft); font-family: var(--bh-font-body);
  font-weight: 600; font-size: 14px; transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.qr-quick:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.qr-quick i { color: var(--accent); }

.foot { display: flex; align-items: center; justify-content: center; gap: 8px;
        color: var(--bh-muted); font-size: 12.5px; margin-top: 14px; }
.foot .bm { font-weight: 600; color: var(--bh-ink); }
.foot .bm .h { color: var(--accent); }

/* Wallet badges — directly on the card (not the share sheet, which iOS
   bypasses with the native share). Apple-convention black pill. */
.card-wallet { display: flex; flex-direction: column; gap: 8px; }
.card-wallet[hidden] { display: none; }
.wallet-badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 11px 16px; border-radius: 12px;
  background: #16151F; color: #fff; text-decoration: none;
  font-family: var(--bh-font-body); font-weight: 600; font-size: 14.5px;
  transition: filter .14s ease, transform .12s ease;
}
.wallet-badge[hidden] { display: none; }
.wallet-badge:hover { filter: brightness(1.12); }
.wallet-badge:active { transform: scale(.98); }
.wallet-badge:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ============================================================================
   MOBILE-ONLY CHROME — overflow actions menu (⋯), Save pill, ghost Beam.
   These replace the split action bar / pinned dock on the editorial (<720px)
   layout. Hidden by default so the desktop/tablet split layout never shows
   them; the editorial breakpoint below reveals each one.
   ============================================================================ */
.banner-actions { display: none; position: absolute; top: 16px; right: 16px; z-index: 40; }
.icon-glass {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  cursor: pointer; color: #fff;
  transition: background .15s ease, transform .12s ease;
}
.icon-glass:hover { background: rgba(255,255,255,.26); }
.icon-glass:active { transform: scale(.94); background: rgba(255,255,255,.30); }
.icon-glass:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.menu-scrim { position: fixed; inset: 0; z-index: 39; }
.menu-scrim[hidden] { display: none; }

.actions-menu {
  position: absolute; top: 52px; right: 0; z-index: 41; min-width: 210px;
  background: var(--bh-surface); border: 1px solid var(--bh-line);
  border-radius: 16px; box-shadow: var(--bh-shadow-lg);
  padding: 6px; display: flex; flex-direction: column; gap: 2px;
  transform-origin: top right;
  animation: menu-in .16s cubic-bezier(.22,.8,.3,1);
}
.actions-menu[hidden] { display: none; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .actions-menu { animation: none; } }
.menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 12px; border: none; background: transparent; cursor: pointer;
  border-radius: 10px; text-align: left; white-space: nowrap; text-decoration: none;
  font-family: var(--bh-font-body); font-weight: 600; font-size: 15px; color: var(--bh-ink);
  transition: background .12s ease;
}
.menu-item:hover { background: var(--accent-soft); }
.menu-item:active { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.menu-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.menu-ic { display: flex; flex: none; }
.menu-divider { height: 1px; background: var(--bh-line); margin: 4px 6px; }

/* Save contact pill — top-right of the identity, beside the avatar, just under
   the cover seam. Solid accent-gradient pill (the cover IS the only gradient
   above it). */
.save-top {
  display: none; position: absolute; right: 22px; top: 64px; z-index: 5;
  height: 44px; padding: 0 18px; align-items: center; gap: 8px;
  border: none; cursor: pointer; color: #fff; text-decoration: none;
  background: var(--accent-grad); border-radius: 999px;
  font-family: var(--bh-font-body); font-weight: 700; font-size: 15px; white-space: nowrap;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 30%, transparent);
  transition: transform .12s ease, filter .15s ease;
}
.save-top:active { transform: scale(.96); filter: brightness(1.05); }
.save-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Ghost "Beam yours back" — quiet accent text button above the footer. */
.ghost-beam-wrap { display: none; justify-content: center; padding: 6px 0 0; }
.ghost-beam {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; background: transparent; border: none; cursor: pointer;
  color: var(--accent); font-family: var(--bh-font-body); font-weight: 600; font-size: 15px;
  border-radius: 999px; transition: background .15s ease, transform .12s ease;
}
.ghost-beam:hover { background: var(--accent-soft); }
.ghost-beam:active { transform: scale(.97); background: var(--accent-soft); }
.ghost-beam:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ============================================================================
   SPLIT LAYOUT — desktop / tablet ≥720px
   ============================================================================ */
@container screen (min-width: 720px) {
  .card-root[data-layout="split"] .card {
    flex-direction: row; align-items: stretch;
    max-width: 980px; margin: clamp(28px, 6cqh, 64px) auto;
    background: var(--bh-surface); border: 1px solid var(--bh-line);
    border-radius: 28px; box-shadow: var(--bh-shadow-lg); overflow: hidden;
  }
  .card-root[data-layout="split"] .id {
    width: 42%; max-width: 420px; flex: none;
    border-bottom: none; border-right: 1px solid var(--bh-line);
    justify-content: flex-start; align-items: center; text-align: center;
    padding: 0 40px 44px; background: var(--bh-surface);
  }
  .card-root[data-layout="split"] .id-cover {
    display: block; flex: none;
    width: calc(100% + 80px); margin: 0 -40px 0; height: 156px;
  }
  .card-root[data-layout="split"] .avatar-pop { margin-top: -62px; }
  .card-root[data-layout="split"] .share-btn {
    top: 18px; right: 18px; color: #fff;
    background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.34); backdrop-filter: blur(4px);
  }
  .card-root[data-layout="split"] .share-btn:hover { background: rgba(255,255,255,.28); color: #fff; }
  .card-root[data-layout="split"] .name { font-size: 32px; }
  .card-root[data-layout="split"] .body {
    flex: 1; min-width: 0; padding: 48px clamp(28px, 4cqw, 56px); gap: 18px;
    justify-content: center;
  }
}

@supports not (container-type: inline-size) {
  @media (min-width: 720px) {
    body.screen { display: grid; place-items: start center; }
    .card-root[data-layout="split"] .card {
      flex-direction: row; align-items: stretch;
      max-width: 980px; margin: 64px auto;
      background: var(--bh-surface); border: 1px solid var(--bh-line);
      border-radius: 28px; box-shadow: var(--bh-shadow-lg); overflow: hidden;
    }
    .card-root[data-layout="split"] .id {
      width: 42%; max-width: 420px; padding: 0 40px 44px;
      border-right: 1px solid var(--bh-line); border-bottom: none;
    }
    .card-root[data-layout="split"] .id-cover {
      display: block; position: relative; inset: auto;
      width: calc(100% + 80px); margin: 0 -40px; height: 156px;
    }
    .card-root[data-layout="split"] .avatar-pop { margin-top: -62px; }
    .card-root[data-layout="split"] .body { padding: 48px 44px; }
  }
}

/* ============================================================================
   EDITORIAL LAYOUT — mobile <720px container
   ============================================================================ */
@container screen (max-width: 719.99px) {
  /* Card sizes to its content (no forced 100vh) so a short card doesn't strand
     the footer mid-screen — the dock then sits naturally above it. */
  .card-root { min-height: 0; }
  .card-root .hero { display: block; }
  .card-root .id-cover { display: none; }
  /* The hero band carries its own share button; hide the rail/identity one so
     mobile doesn't show two share buttons. */
  .card-root .id .id-share { display: none; }
  .card-root .id { margin-top: -56px; padding: 0 22px 16px; position: relative; z-index: 4;
                    display: flex; flex-direction: column; align-items: flex-start;
                    background: transparent; border-bottom: none; }
  .card-root .name { font-size: 38px; line-height: 1.02; letter-spacing: -0.025em; text-align: left; }
  .card-root .role { font-size: 16px; text-align: left; }
  .card-root .rail-actions { display: none; }
  /* Action dock — the self-contained split pill (its own gradient + shadow)
     in-flow above the footer; pins to the bottom (position: sticky) only when
     content is tall enough to scroll past it. No frosted bar chrome — that
     read as a misplaced strip when sitting in-flow on a short card. The dock
     wrapper is transparent; the pill IS the visual. */
  .card-root .dockbar {
    display: flex; flex-direction: column; align-items: stretch; gap: 10px;
    position: sticky; bottom: 0; z-index: 30;
    margin-top: 4px;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 6px));
    background: transparent;
  }
  .card-root .quick { grid-template-columns: repeat(4, 1fr); width: 100%; max-width: none; margin-top: 22px; }
  .card-root .quick .qic { width: 46px; height: 46px; border-radius: 13px; }
  .card-root .socials { justify-content: flex-start; margin-top: 16px; }
  .card-root .body { padding: 12px 22px 28px; gap: 16px; }
  /* The new mobile chrome — overflow menu, Save pill, ghost Beam — replaces the
     split rail / dock. Hide the dock + the in-body QR + on-card wallet badge
     (all three now live in the overflow menu). */
  .card-root .dockbar { display: none; }
  .card-root .banner-actions { display: block; }
  .card-root .save-top { display: inline-flex; }
  .card-root .ghost-beam-wrap { display: flex; }
  .card-root .qr-quick { display: none; }
  .card-root .card-wallet { display: none; }
}

@supports not (container-type: inline-size) {
  @media (max-width: 719.99px) {
    .card-root { min-height: 0; }
    .card-root .hero { display: block; }
    .card-root .id-cover { display: none; }
    .card-root .id .id-share { display: none; }
    .card-root .id { margin-top: -56px; padding: 0 22px 16px; background: transparent; border-bottom: none;
                      align-items: flex-start; text-align: left; }
    .card-root .name { font-size: 38px; line-height: 1.02; text-align: left; }
    .card-root .role { font-size: 16px; text-align: left; }
    .card-root .rail-actions { display: none; }
    .card-root .dockbar {
      display: flex; flex-direction: column; align-items: stretch; gap: 10px;
      position: sticky; bottom: 0; z-index: 30;
      margin-top: 4px;
      padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 6px));
      background: transparent;
    }
    .card-root .body { padding: 12px 22px 28px; gap: 16px; }
    .card-root .quick { grid-template-columns: repeat(4, 1fr); width: 100%; max-width: none; margin-top: 22px; }
    .card-root .quick .qic { width: 46px; height: 46px; border-radius: 13px; }
    .card-root .socials { justify-content: flex-start; }
    .card-root .dockbar { display: none; }
    .card-root .banner-actions { display: block; }
    .card-root .save-top { display: inline-flex; }
    .card-root .ghost-beam-wrap { display: flex; }
    .card-root .qr-quick { display: none; }
    .card-root .card-wallet { display: none; }
  }
}

/* ============================================================================
   OVERLAYS — share sheet, QR, toast
   ============================================================================ */
.bh-overlay[hidden] { display: none; }
.bh-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.scrim { position: absolute; inset: 0; background: rgba(13,12,22,.46); }
.sheet {
  position: relative; width: 100%; background: var(--bh-surface);
  border-radius: 26px 26px 0 0; padding: 12px 22px 26px;
  box-shadow: var(--bh-shadow-lg);
  animation: slideup .26s cubic-bezier(.22,.8,.3,1);
}
@keyframes slideup { from { transform: translateY(100%); } to { transform: translateY(0); } }
.grab { width: 40px; height: 4px; border-radius: 2px; background: var(--bh-line); margin: 0 auto 16px; }
.sheet-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bh-bg); border: 1px solid var(--bh-line); cursor: pointer; color: var(--bh-ink-soft);
  transition: background .14s ease, color .14s ease;
}
.sheet-close:hover { background: var(--accent-soft); color: var(--accent); }
.sheet-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sheet-head { text-align: center; margin-bottom: 18px; }
.sheet-title { font-family: var(--heading-font); font-weight: 600; font-size: 21px; color: var(--bh-ink); margin: 0; letter-spacing: -.01em; }
.sheet-desc { font-size: 14px; color: var(--bh-ink-soft); margin: 6px 0 0; }
.sheet-list { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.sheet-item {
  display: flex; align-items: center; gap: 14px; padding: 12px 10px; width: 100%; text-align: left;
  background: transparent; border: none; border-radius: 13px; cursor: pointer; text-decoration: none;
  color: var(--bh-ink); font-family: var(--bh-font-body);
  transition: background .12s ease;
}
.sheet-item:hover { background: var(--accent-soft); }
.sheet-ic { width: 46px; height: 46px; flex: none; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.sheet-tx { display: flex; flex-direction: column; gap: 1px; }
.sheet-tx b { font-weight: 600; font-size: 15px; color: var(--bh-ink); }
.sheet-tx span { font-family: var(--bh-font-mono); font-size: 12px; color: var(--bh-muted); }

@container screen (min-width: 640px) {
  .bh-overlay { align-items: center; padding: 24px; }
  .sheet { max-width: 440px; border-radius: 26px;
           animation: pop .24s cubic-bezier(.22,.8,.3,1); padding-top: 26px; }
  .grab { display: none; }
}
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.qr-overlay-host { background: transparent; }
.qr-full {
  position: relative; z-index: 1; width: 100%; max-width: 440px;
  background: var(--bh-bg);
  border-radius: 26px 26px 0 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 32px 24px;
  animation: slideup .26s cubic-bezier(.22,.8,.3,1);
}
@container screen (min-width: 640px) {
  .qr-full { border-radius: 26px; animation: pop .24s cubic-bezier(.22,.8,.3,1); padding: 40px 28px; }
}
.qr-close {
  position: absolute; top: 18px; right: 18px; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bh-surface); border: 1px solid var(--bh-line); cursor: pointer; color: var(--bh-ink-soft);
}
.qr-card { background: #fff; padding: 22px; border-radius: 22px; box-shadow: var(--bh-shadow-md); border: 1px solid var(--bh-line); }
.qr-canvas { display: block; max-width: 100%; height: auto; }
.qr-name { font-family: var(--heading-font); font-weight: 600; font-size: 22px; color: var(--bh-ink); }
.qr-hint { display: flex; align-items: center; gap: 7px; font-family: var(--bh-font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--bh-muted); }
.qr-mode { display: flex; gap: 4px; padding: 4px; background: var(--bh-surface); border: 1px solid var(--bh-line); border-radius: 999px; }
.qr-mode-btn {
  border: none; background: transparent; padding: 6px 14px; cursor: pointer;
  font-family: var(--bh-font-mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--bh-muted); border-radius: 999px;
}
.qr-mode-btn[aria-selected="true"] { background: var(--accent); color: #fff; }

.bh-toast-host {
  position: fixed; left: 0; right: 0; bottom: 24px; z-index: 70;
  display: flex; justify-content: center; pointer-events: none;
}
.bh-toast {
  background: var(--bh-ink); color: #fff;
  padding: 11px 16px; border-radius: 999px;
  font-family: var(--bh-font-body); font-size: 13.5px; font-weight: 500;
  box-shadow: var(--bh-shadow-md);
  animation: toastin .2s ease;
}
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* SavedConfirm sheet — green check + actions stack */
.saved-mark {
  width: 64px; height: 64px; border-radius: 50%; margin: 4px auto 16px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--bh-success, #15A86B) 14%, transparent);
  color: var(--bh-success, #15A86B);
  animation: pop .3s cubic-bezier(.22,1.4,.5,1);
}
.saved-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

/* ExchangeForm sheet ("Beam yours back") */
.exchange-form { display: flex; flex-direction: column; gap: 12px; }
.exchange-form .bh-field { display: flex; flex-direction: column; gap: 5px; }
.exchange-form .bh-field > span {
  font-family: var(--bh-font-body); font-weight: 600; font-size: 13px; color: var(--bh-ink-soft);
  display: flex; justify-content: space-between; align-items: baseline;
}
.exchange-form .opt {
  font-weight: 500; font-size: 11.5px; color: var(--bh-muted); text-transform: none; letter-spacing: 0;
}
.exchange-form .row-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.exchange-status { margin: 0; font-size: 13px; color: var(--bh-muted); min-height: 1em; }
.exchange-status.is-error { color: #a8201f; }
.exchange-done { text-align: center; padding: 8px 0 4px; }
.exchange-done .saved-mark { margin-top: 8px; }
@media (max-width: 460px) {
  .exchange-form .row-two { grid-template-columns: 1fr; }
}

/* ============================================================================
   Motion — gated; visible end-state is the BASE style
   ============================================================================ */
.beam-atmos {
  position: absolute; inset: -40% -20%;
  background: var(--accent-grad); opacity: .07; filter: blur(46px);
  transform: rotate(-18deg); pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .card-root.motion .avatar-pop { animation: a-pop .6s cubic-bezier(.22,.8,.3,1) both; }
  .card-root.motion .name { animation: a-rise .6s ease both; }
  .card-root.motion .role { animation: a-rise2 .72s ease both; }
  .card-root.motion .rail-actions,
  .card-root.motion .dockbar { animation: a-rise3 .82s ease both; }
  .card-root.motion .beam-atmos { animation: a-sweep 1.2s ease forwards; }
  @keyframes a-pop   { from { opacity: 0; transform: scale(.88); } to { opacity: 1; transform: scale(1); } }
  @keyframes a-rise  { 0% { opacity: 0; transform: translateY(12px); } 100% { opacity: 1; transform: translateY(0); } }
  @keyframes a-rise2 { 0%, 14% { opacity: 0; transform: translateY(12px); } 100% { opacity: 1; transform: translateY(0); } }
  @keyframes a-rise3 { 0%, 26% { opacity: 0; transform: translateY(12px); } 100% { opacity: 1; transform: translateY(0); } }
  @keyframes a-sweep { from { opacity: 0; transform: rotate(-18deg) translateX(-26%); } to { opacity: .07; transform: rotate(-18deg) translateX(0); } }
}

/* ============================================================================
   Focus + a11y
   ============================================================================ */
.share-btn:focus-visible,
.qbtn:focus-visible,
.featured:focus-visible,
.pod:focus-visible,
.soc:focus-visible,
.qr-quick:focus-visible,
.qr-close:focus-visible,
.qr-mode-btn:focus-visible,
.sheet-item:focus-visible,
.bh-chip:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
