/* Nexus Wallet. Signed-in pages use the app shell (sidebar + top bar), after the
   NFT Collection UI Kit layout (andrewtimango, Envato); colours stay Nexus orange. */
:root {
  --bg: #f5f6f8; --panel: #ffffff; --ink: #15141a; --body: #3a3840; --muted: #6c6a73;
  --line: #e7e7ec; --soft: #f0f1f4; --accent: #ff6700; --accent-ink: #ffffff; --accent-soft: #fff0e6; --focus: #1c5fbf;
  --ok: #17703f; --ok-bg: #e5f4ea; --bad: #a8261b; --bad-bg: #fbe8e6; --warn: #8a5300; --warn-bg: #fdf1dc;
  --radius: 16px; --shadow: 0 1px 2px rgba(21, 20, 26, .05), 0 6px 20px rgba(21, 20, 26, .05);
  --space:
    radial-gradient(1.5px 1.5px at 12% 22%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 28% 70%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 46% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 63% 58%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 74% 30%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 90% 76%, #fff 50%, transparent 51%),
    radial-gradient(circle at 88% -20%, rgba(255, 140, 60, .85), rgba(255, 103, 0, .35) 26%, transparent 46%),
    radial-gradient(circle at 70% 120%, rgba(120, 80, 255, .55), transparent 45%),
    linear-gradient(120deg, #120d2b 0%, #2a1660 55%, #3d1a5c 100%);
  --t-bronze: #f6e6d8; --t-silver: #eceef2; --t-gold: #fbf0cf; --t-sapphire: #dde7fb; --t-onyx: #e3e3e8; --t-platinum: #eef0f7; --t-none: #f0f1f4;
}
/* Dark: follows the device (Auto) unless the theme switcher picks Light or Dark (html[data-theme]). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0e13; --panel: #1a1920; --ink: #f2f0ec; --body: #d4d1cb; --muted: #9c98a3;
    --line: #2c2a33; --soft: #24222b; --accent: #ff7a1f; --accent-ink: #15141a; --accent-soft: #3a2414; --focus: #7fb0f5;
    --ok: #7fd3a0; --ok-bg: #173323; --bad: #f2a199; --bad-bg: #3a1c19; --warn: #f3c47c; --warn-bg: #3a2c12;
    --shadow: none;
    --t-bronze: #33261c; --t-silver: #2a2c31; --t-gold: #352d16; --t-sapphire: #1c2640; --t-onyx: #222127; --t-platinum: #282a33; --t-none: #24222b;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #0f0e13; --panel: #1a1920; --ink: #f2f0ec; --body: #d4d1cb; --muted: #9c98a3;
    --line: #2c2a33; --soft: #24222b; --accent: #ff7a1f; --accent-ink: #15141a; --accent-soft: #3a2414; --focus: #7fb0f5;
    --ok: #7fd3a0; --ok-bg: #173323; --bad: #f2a199; --bad-bg: #3a1c19; --warn: #f3c47c; --warn-bg: #3a2c12;
    --shadow: none;
    --t-bronze: #33261c; --t-silver: #2a2c31; --t-gold: #352d16; --t-sapphire: #1c2640; --t-onyx: #222127; --t-platinum: #282a33; --t-none: #24222b;
    color-scheme: dark;
}
.logo-on-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-on-light { display: none; } :root:not([data-theme="light"]) .logo-on-dark { display: block; } }
:root[data-theme="dark"] .logo-on-light { display: none; } :root[data-theme="dark"] .logo-on-dark { display: block; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--body); font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; overflow-wrap: anywhere; }
h1, h2, h3, strong { color: var(--ink); }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .5em; }
a { color: var(--focus); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 8px; background: var(--panel); padding: 8px 12px; z-index: 9; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Line icons only — never the coins. */
.side-nav svg, .search svg, .event svg, .btn svg, .meta-pill svg, .end-icon svg, .status-icon svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 1.1rem; font-weight: 600; }
.brand-word { display: block; line-height: 0; }
.brand-word img { width: auto; height: 26px; }
/* The "bambox" wordmark (Stephen 12.10.26): text, so it follows light/dark like the rest of the page.
   Set in Varela Round (Stephen 13.10), served from the wallet itself (CSP: no font hosts). Varela Round
   by Joe Prince, SIL Open Font License 1.1 (fonts.google.com/specimen/Varela+Round); Latin subset. */
@font-face { font-family: 'Varela Round'; font-style: normal; font-weight: 400; font-display: swap;
             src: url('/assets/varela-round-latin.woff2') format('woff2');
             unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
.wordmark { font-family: 'Varela Round', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-weight: 400; font-size: 1.7rem; line-height: 1; letter-spacing: -.01em; color: var(--ink); text-transform: lowercase; }
/* The briefcase sits beside the name (Stephen 13.10). */
.brand-logo { display: block; width: 30px; height: 30px; flex: none; }
.top-brand { align-items: center; gap: 8px; }
.top-brand .brand-logo { width: 28px; height: 28px; }
.brand-word.wordmark { line-height: 1; }
.top-brand .wordmark { font-size: 1.35rem; }
.auth-logo .wordmark { color: #fff; font-size: 2.6rem; }
.print-wordmark { font-size: 1.6rem; color: #15141a; }
.brand .wordmark, .auth-logo .wordmark { padding-left: 0; border-left: 0; font-weight: 400; }
.brand .wordmark { color: var(--ink); font-size: 1.5rem; }
.brand, .top-brand { white-space: nowrap; overflow-wrap: normal; }
.brand { gap: 8px; }
.brand-mark { display: none; width: 30px; height: 30px; }
.brand span { padding-left: 10px; border-left: 1px solid var(--line); color: var(--muted); font-weight: 500; line-height: 1.2; }

/* ── Signed out: plain bar ─────────────────────────────────────────────── */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
       padding: 14px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.main { max-width: 960px; margin: 0 auto; padding: 28px 16px 48px; }
.foot { max-width: 960px; margin: 0 auto; padding: 0 16px 40px; color: var(--muted); font-size: .85rem; }

/* ── Signed in: app shell ──────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 28px;
        padding: calc(22px + env(safe-area-inset-top)) 0 22px; background: var(--panel); border-right: 1px solid var(--line); }   /* clear of the status bar on iPad (Stephen 13.10) */
.side .brand { padding: 0 22px; }
.side-nav { display: grid; gap: 2px; }
.side-nav form { margin: 0; }
.side-nav a, .side-link { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 22px;
       color: var(--muted); text-decoration: none; font: inherit; font-size: .95rem; background: none; border: 0; border-right: 3px solid transparent; cursor: pointer; text-align: left; }
.side-nav svg { width: 20px; height: 20px; flex: none; }
.side-nav a:hover, .side-link:hover { color: var(--ink); background: var(--soft); }
.side-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); border-right-color: var(--accent); font-weight: 600; }
.side-note { margin: auto 22px 0; font-size: .8rem; color: var(--muted); }

.shell-main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
       padding: calc(12px + env(safe-area-inset-top)) 28px 12px; background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 0 1 380px; }
.search svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); }
.search input { padding: 9px 14px 9px 38px; border-radius: 10px; background: var(--soft); border-color: transparent; font-size: .95rem; }
.top-right { display: flex; align-items: center; gap: 14px; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; color: var(--ink); }
.pill img { width: 18px; height: 18px; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--panel);
          font-weight: 700; text-decoration: none; }
.has-shell .main { max-width: 1180px; width: 100%; margin: 0; padding: 24px 28px 48px; }

/* ── Panels, forms, buttons ────────────────────────────────────────────── */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin: 0 0 16px; }
.panel.narrow { max-width: 480px; margin: 6vh auto 16px; padding: 28px; }
.panel.empty { text-align: center; padding: 40px 20px; }
.panel.danger { border-color: var(--bad); }
.lede { font-size: 1.05rem; }
.muted { color: var(--muted); } .small { font-size: .875rem; }
.crumb { margin: 0 0 12px; font-size: .9rem; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.head h1 { margin: 0; }
.stack { display: grid; gap: 10px; margin: 18px 0; }
label { font-weight: 600; color: var(--ink); }
input { font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); width: 100%; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border-radius: 10px;
       border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.small-btn { min-height: 36px; padding: 6px 16px; font-size: .9rem; }

.chip { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--line); color: var(--ink); }
.chip.ok { background: var(--ok-bg); color: var(--ok); } .chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.warn { background: var(--warn-bg); color: var(--warn); } .chip.muted { color: var(--muted); }

/* ── My coins: banner ──────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; border-radius: 20px; padding: 40px 32px 32px; margin-bottom: 28px; color: #fff;
        background: var(--space); }
.hero h1 { color: #fff; font-size: 2.1rem; margin: 6px 0 18px; }
.hero-kicker { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .85rem; color: rgba(255, 255, 255, .8); }
.hero-kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(255, 103, 0, .3); }
.hero-sub { margin: 0; color: rgba(255, 255, 255, .8); }
.hero-stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-stats li { display: flex; align-items: baseline; gap: 6px; padding: 8px 14px; border-radius: 12px;
                 background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); }
.hero-stats strong { color: #fff; font-size: 1.15rem; }
.hero-stats span { color: rgba(255, 255, 255, .8); font-size: .9rem; }

/* ── My coins: cards ───────────────────────────────────────────────────── */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 1.15rem; }
.grid { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
        box-shadow: var(--shadow); padding: 10px; transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(21, 20, 26, .08); }
.card-tile { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 12px; background: var(--t-none); }
.card-tile[data-tier="bronze"] { background: var(--t-bronze); } .card-tile[data-tier="silver"] { background: var(--t-silver); }
.card-tile[data-tier="gold"] { background: var(--t-gold); } .card-tile[data-tier="sapphire"] { background: var(--t-sapphire); }
.card-tile[data-tier="onyx"] { background: var(--t-onyx); } .card-tile[data-tier="platinum"] { background: var(--t-platinum); }
.card-tile .coin { width: 56%; height: auto; max-height: 82%; aspect-ratio: 1; margin: 0; }
.coin.placeholder { display: block; width: 50%; aspect-ratio: 1; border-radius: 50%; background: var(--line); }
.tile-chip { position: absolute; top: 8px; right: 8px; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 6px 4px; flex: 1; }
.card-name { margin: 0; font-size: 1rem; line-height: 1.3; }
.card-name a { color: var(--ink); text-decoration: none; }
.card-name a:hover { text-decoration: underline; }
.card-issuer { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .85rem; color: var(--muted); min-width: 0; }
.card-issuer span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-issuer img { width: 20px; height: 20px; border-radius: 50%; object-fit: contain; background: #fff; flex: none; }
.issuer-dot { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: .7rem; font-weight: 700; flex: none; }
.card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; }
.card-meta { display: grid; font-size: .78rem; line-height: 1.35; }
.card-meta strong { font-size: .85rem; }

/* ── My coins: activity ────────────────────────────────────────────────── */
.activity { padding: 20px 0 8px; }
.activity h2 { padding: 0 20px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: .8rem; padding: 8px 20px; border-bottom: 1px solid var(--line); }
td { padding: 10px 20px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.row-coin { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.row-coin-img { width: 32px; height: 32px; flex: none; }
.event { display: inline-flex; align-items: center; gap: 6px; }
.event svg { width: 16px; height: 16px; color: var(--ok); }

/* ── Coin page ─────────────────────────────────────────────────────────── */
.coin.big { width: 200px; height: 200px; }
.coin-stage { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.coin-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; margin-bottom: 22px; }
.coin-hero h1 { margin-bottom: .3em; }
.coin-title .issuer { justify-content: center; }
.coin-frame { position: relative; width: 280px; height: 280px; display: flex; align-items: center; justify-content: center; }
.coin-frame .coin.big { width: 200px; height: 200px; margin: 0; }
/* The 3D coin fills ~56.8 % of its viewer, so the viewer is sized to make it the same size as the 2D coin (--coin). */
.coin-frame { --coin: 200px; }
.coin-frame .coin3d-frame { position: absolute; left: 50%; top: 50%; width: calc(var(--coin) / .568); height: calc(var(--coin) / .568); transform: translate(-50%, -50%);
                            border: 0; background: transparent; opacity: 0; transition: opacity .35s ease; }
.coin-stage .segmented { position: relative; z-index: 1; }
.coin-frame.is-3d .coin3d-frame { opacity: 1; }
/* The 3D viewer's page has no colour scheme of its own; when the wallet is dark, a mismatched scheme
   makes the browser paint an opaque white square behind the iframe. Matching it keeps the coin floating. */
.coin3d-frame, .reveal-3d { color-scheme: light; }
/* The viewer is bigger than the coin (~176 %); clip it to the frame so its empty edges can't sit
   over the status chip or catch drags meant for the page. */
.coin-frame { overflow: hidden; border-radius: 50%; }
.showcase .tile-chip { z-index: 2; }
.coin-frame.is-3d .coin.big { visibility: hidden; }
.issuer { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; }
.issuer img { border-radius: 6px; object-fit: contain; background: #fff; }
.status { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.status p { margin: .3em 0; }
.ends { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ends li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.ends li > span:last-child { display: grid; gap: 2px; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: .85rem; }
.downloads { display: flex; flex-wrap: wrap; gap: 10px; }
.has-shell .coin-page { max-width: 820px; margin: 0 auto; }

/* ── Small screens: the sidebar becomes a top strip ────────────────────── */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px;
          padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .brand { padding: 0; }
  .side-nav { display: flex; gap: 4px; }
  .side-nav a, .side-link { min-height: 40px; padding: 0 10px; border-right: 0; border-radius: 10px; font-size: .9rem; gap: 6px; }
  .side-nav a[aria-current="page"] { border-right: 0; }
  .side-note { display: none; }
  .top { position: static; padding: 10px 16px; }
  .has-shell .main { padding: 18px 16px 40px; }
  .shell-foot { padding: 0 16px 24px; }
}
@media (max-width: 520px) {
  h1 { font-size: 1.45rem; }
  .print-sheet { padding: 22px 18px; }
  .print-foot { flex-direction: column; align-items: flex-start; }
  .share-qr { width: 140px; height: 140px; }
  .copy-row { flex-direction: column; }
  .public-bar { padding: 12px 16px; }
  .status-card { flex-wrap: wrap; }
  .status-body { flex-basis: calc(100% - 60px); }
  .status-card form { width: 100%; }
  .status-card form .btn { width: 100%; }
  .side-nav span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .side-nav a, .side-link { padding: 0 12px; }
  .side .brand-word, .side .brand span { display: none; }
  .side .brand-mark { display: block; }
  .side-nav a, .side-link { white-space: nowrap; padding: 0 12px; }
  .search { flex: 1 1 auto; }
  .pill { display: none; }
  .hero { padding: 28px 20px 22px; }
  .hero h1 { font-size: 1.6rem; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { padding: 8px; }
  .card-foot { flex-direction: column; align-items: stretch; }
  .coin.big { width: 140px; height: 140px; }
  .coin-frame { width: 240px; height: 240px; --coin: 160px; }
  .coin-frame .coin.big { width: 160px; height: 160px; }
  .panel.narrow { margin-top: 3vh; padding: 22px; }
  .downloads .btn { flex: 1 1 100%; }
}

/* ── Signed out: split layout (space panel + card) ─────────────────────── */
.auth { display: grid; grid-template-columns: minmax(320px, 42%) 1fr; min-height: 100vh; }
.auth-art { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px;
            padding: calc(48px + env(safe-area-inset-top)) 44px 48px; color: #fff; background: var(--space); }
.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: auto; color: #fff; text-decoration: none; }
.auth-logo img { width: auto; height: 40px; }
.auth-logo span { display: inline-flex; align-items: center; gap: 10px; padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .35); font-size: 1.2rem; font-weight: 500; color: rgba(255, 255, 255, .85); }
.auth-logo span img.wallet-mark { width: 32px; height: 32px; padding: 4px; border-radius: 8px; background: #fff; }   /* white tile, as the app icon: the grey handle needs it on the dark panel */
/* The Bambox Wallet briefcase (same drawing as the app icon; Stephen 12.10: briefcase on app and site) above the heading on the sign-in steps. */
.panel-mark { display: block; width: 60px; height: 60px; margin: 0 0 14px; padding: 7px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }   /* white tile (as the app icon) so the grey handle shows on the dark theme too */
.auth-title { margin: 0 0 8px; font-size: 2.2rem; line-height: 1.15; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.auth-main { display: flex; flex-direction: column; min-width: 0; }
.has-auth .main { width: 100%; max-width: 560px; margin: 0 auto; padding: 14vh 24px 32px; flex: 1; }
.has-auth .panel.narrow { margin: 0; padding: 32px; }
.has-auth .foot { width: 100%; max-width: 560px; }

/* ── Copyright ─────────────────────────────────────────────────────────── */
.copyright { margin: 8px 0 0; font-size: .8rem; color: var(--muted); }
.copyright a { color: inherit; }
.shell-foot { padding: 0 28px 28px; margin-top: auto; }

/* ── Account banner ────────────────────────────────────────────────────── */
.hero-small { padding: 28px 32px 24px; }
.hero-small h1 { margin: 6px 0 4px; font-size: 1.8rem; }
.notice { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0;
          padding: 12px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); }
.notice p { margin: 0; } .notice strong { color: inherit; } .notice form { margin: 0; }
details.change { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
details.change summary { cursor: pointer; font-weight: 600; color: var(--focus); width: max-content; }
details.change .stack { max-width: 420px; }

/* ── Coin page showcase ────────────────────────────────────────────────── */
.crumb a { text-decoration: none; }
.showcase { position: relative; padding: 28px 20px 26px; border-radius: 20px; background: var(--t-none); border: 1px solid var(--line); }
.showcase[data-tier="bronze"] { background: var(--t-bronze); } .showcase[data-tier="silver"] { background: var(--t-silver); }
.showcase[data-tier="gold"] { background: var(--t-gold); } .showcase[data-tier="sapphire"] { background: var(--t-sapphire); }
.showcase[data-tier="onyx"] { background: var(--t-onyx); } .showcase[data-tier="platinum"] { background: var(--t-platinum); }
.showcase .tile-chip { top: 14px; right: 14px; }
.coin-actions { display: flex; gap: 8px; }
.print-only { display: none; }

/* ── Buttons with icons, page action bar ───────────────────────────────── */
.btn { gap: 8px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.page-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; max-width: 820px; margin: 0 auto 14px; }
.page-actions-right { display: flex; gap: 8px; flex-wrap: wrap; }
.form-foot { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* ── Coin page: 2D/3D switch, meta pills, status card, validation list ── */
.segmented { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: color-mix(in srgb, var(--panel) 70%, transparent); border: 1px solid var(--line); }
.segmented button { min-width: 56px; min-height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--ink); color: var(--panel); }
.meta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.meta-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 4px 12px; border-radius: 999px;
             background: var(--panel); border: 1px solid var(--line); color: var(--ink); font-size: .88rem; font-weight: 600; text-decoration: none; }
.meta-pill img { width: 22px; height: 22px; border-radius: 50%; object-fit: contain; background: #fff; }
.meta-pill svg { width: 16px; height: 16px; color: var(--muted); }
.meta-pill.as-button:hover { border-color: var(--ink); }
.tier-dot { width: 14px; height: 14px; border-radius: 50%; background: #ff7a1f; flex: none;
            box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 0 0 3px rgba(21, 20, 26, .2); }   /* ring: dark tiers show on dark pills, light tiers on light */
.tier-dot[data-tier="bronze"] { background: #c9824a; } .tier-dot[data-tier="silver"] { background: #b8bdc6; } .tier-dot[data-tier="gold"] { background: #e3b230; }
.tier-dot[data-tier="sapphire"] { background: #2f6bd3; } .tier-dot[data-tier="onyx"] { background: #2e2e34; } .tier-dot[data-tier="platinum"] { background: #d9dee7; }
.status-card { display: flex; align-items: flex-start; gap: 16px; }
.status-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; flex: none; background: var(--soft); color: var(--muted); }
.status-icon svg { width: 24px; height: 24px; stroke-width: 2.4; }
.status-card.ok .status-icon { background: var(--ok-bg); color: var(--ok); }
.status-card.bad .status-icon { background: var(--bad-bg); color: var(--bad); }
.status-card.warn .status-icon { background: var(--warn-bg); color: var(--warn); }
.status-body { flex: 1; min-width: 0; }
.status-body h2 { margin: 0 0 2px; font-size: 1.1rem; }
.status-body p { margin: 0 0 6px; }
.status-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.end-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex: none; background: var(--ok-bg); color: var(--ok); }
.end-icon.root { background: var(--panel); border: 1px solid var(--line); }
.end-icon svg { width: 18px; height: 18px; stroke-width: 2.4; }

/* ── 3D player: the coin on the Skills Studio stage (badge.html's dark / light scene) ──
   In 3D the showcase becomes the player. Text and details sit on it: white on the dark
   stage, dark on the light stage. The 2D view keeps the tier-tinted tile. */
.showcase { transition: background .3s ease, color .3s ease; }
.showcase.is-player { border-color: transparent; overflow: hidden; }
.showcase.is-player[data-stage="dark"] {
  background: radial-gradient(900px 700px at 50% 38%, rgba(120, 150, 255, .08) 0%, rgba(0, 0, 0, 0) 55%),
              radial-gradient(900px 700px at 50% 100%, rgba(214, 138, 62, .05) 0%, rgba(0, 0, 0, 0) 55%),
              linear-gradient(180deg, #06060c 0%, #11111b 60%, #181826 100%);
  --stage-ink: rgba(255, 255, 255, .92); --stage-muted: rgba(255, 255, 255, .6);
  --stage-pill: rgba(255, 255, 255, .08); --stage-line: rgba(255, 255, 255, .16); --stage-on: #ffffff; --stage-on-ink: #15141a;
}
.showcase.is-player[data-stage="light"] {
  background: radial-gradient(900px 700px at 50% 38%, rgba(255, 245, 220, .55) 0%, rgba(0, 0, 0, 0) 55%),
              radial-gradient(900px 700px at 50% 100%, rgba(180, 150, 110, .08) 0%, rgba(0, 0, 0, 0) 55%),
              linear-gradient(180deg, #f6f4f0 0%, #e4e0d9 60%, #c9c4bc 100%);
  --stage-ink: rgba(20, 20, 24, .9); --stage-muted: rgba(20, 20, 24, .6);
  --stage-pill: rgba(255, 255, 255, .6); --stage-line: rgba(20, 20, 24, .12); --stage-on: #15141a; --stage-on-ink: #ffffff;
}
/* Paint the stage under the (transparent) 1px border too — otherwise the gradient tiles into the
   border and its darker bottom shows as a line across the top of the light stage. */
.showcase.is-player[data-stage] { background-origin: border-box; background-repeat: no-repeat; }
.showcase.is-player h1 { color: var(--stage-ink); }
.showcase.is-player .meta-pill { background: var(--stage-pill); border-color: var(--stage-line); color: var(--stage-ink); }
.showcase.is-player .meta-pill svg { color: var(--stage-muted); }
.showcase.is-player .segmented { background: var(--stage-pill); border-color: var(--stage-line); }
.showcase.is-player .segmented button { color: var(--stage-muted); }
.showcase.is-player .segmented button[aria-pressed="true"] { background: var(--stage-on); color: var(--stage-on-ink); }
.stage-switch { position: absolute; top: 12px; left: 12px; z-index: 2; display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px;
                background: var(--stage-pill, var(--soft)); border: 1px solid var(--stage-line, var(--line)); }
.stage-switch button { display: grid; place-items: center; width: 32px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--stage-muted, var(--muted)); cursor: pointer; }
.stage-switch button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stage-switch button[aria-pressed="true"] { background: var(--stage-on, var(--panel)); color: var(--stage-on-ink, var(--ink)); }
.stage-sep { width: 1px; margin: 5px 3px; background: var(--stage-line, var(--line)); }

/* ── Phone + app: header brand, bottom tab bar, safe areas (as the Nexus QA Bank app) ── */
.top-brand { display: none; text-decoration: none; }
.top-brand .brand-word img { height: 22px; width: auto; }
.tabbar { display: none; }
.code-input { font-size: 1.6rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.field-error { margin: 0; color: var(--bad); font-weight: 600; }
@media (max-width: 860px) {
  .side { display: none; }
  .top { position: sticky; top: 0; padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
         display: grid; grid-template-columns: 1fr auto 1fr; grid-template-areas: ". brand right"; align-items: center; }
  .top-brand { display: flex; grid-area: brand; justify-self: center; }
  .top .search, .top > span { display: none; }
  .top-right { grid-area: right; justify-self: end; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(3, 1fr);
            padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--panel) 94%, transparent);
            backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 48px; justify-content: center; border-radius: 12px;
              color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600; }
  .tabbar a svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a.on { color: var(--accent); }
  .tabbar a:active { background: var(--soft); }
  .has-shell .main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .shell-foot { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .public-bar { padding-top: calc(12px + env(safe-area-inset-top)); }
  .auth-art { padding-top: calc(20px + env(safe-area-inset-top)); }
  .auth-main .auth-theme { position: static; display: flex; justify-content: flex-end; padding: 12px 16px 0; }
}
/* On phones and in the app the coin search sits in My coins rather than the header, and nothing hovers. */
.coins-search { display: none; }
@media (max-width: 860px) { .coins-search { display: block; margin: 0 0 14px; } }
.is-app { -webkit-tap-highlight-color: transparent; }
/* Moving between pages (Stephen 13.10: the quick flash each time is bad, and a risk for people with
   epilepsy): the browser keeps the old page on screen until the new one is ready, then a short,
   gentle cross-fade. With Reduce Motion there is no fade at all, just the swap. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; animation-timing-function: ease; }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }
/* Pull to refresh moves the page itself (wallet.js), so the app's own bounce at the top is off. */
html:has(> body.is-app), body.is-app { overscroll-behavior-y: none; }
/* App second splash (Stephen 13.10): white, coloured briefcase, charcoal title. Fixed white in dark mode too. */
.app-splash { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center;
              gap: 18px; background: #ffffff; transition: opacity .45s ease; }
.app-splash img { width: 132px; height: 132px; }
.app-splash p { margin: 0; color: #2f3033; font-size: 1.7rem; font-weight: 700; letter-spacing: -.01em; }
.app-splash.is-leaving { opacity: 0; pointer-events: none; }
.splash-seen .app-splash { display: none; }
@media (prefers-reduced-motion: reduce) { .app-splash { transition: none; } }
.is-app .shell-foot .copyright { opacity: .8; }

/* ── App: demo wallet strip ─────────────────────────────────────────────── */
.demo-strip { position: relative; z-index: 40; display: flex; justify-content: space-between; align-items: center; gap: 10px;
              padding: calc(6px + env(safe-area-inset-top)) 16px 6px; background: #ffd27a; color: #2a1e00; font-size: .8rem; font-weight: 600; }
.form-foot.center { justify-content: center; }
.demo-strip a { color: #2a1e00; font-weight: 700; white-space: nowrap; }
.demo-strip ~ .shell .top, .demo-strip ~ .auth .auth-art { padding-top: 10px; }

/* ── My coins: refresh button, pull-to-refresh indicator and hint ────────── */
.hero-refresh { position: absolute; top: 16px; right: 16px; z-index: 1; display: inline-flex; align-items: center; gap: 6px; min-height: 36px;
                padding: 6px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .1);
                color: #fff; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.hero-refresh:hover { background: rgba(255, 255, 255, .18); }
.hero-refresh svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hero-refresh.is-spinning svg, .ptr.is-loading .ptr-icon svg { animation: ptr-spin .8s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }
.ptr-hint { display: flex; align-items: center; justify-content: center; gap: 6px; margin: -16px 0 18px; color: var(--muted); font-size: .82rem; font-weight: 600; }
.ptr-hint svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; animation: ptr-nudge 1.6s ease-in-out infinite; }
@keyframes ptr-nudge { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
.ptr { position: fixed; left: 50%; top: calc(58px + env(safe-area-inset-top)); z-index: 35; display: flex; align-items: center; gap: 8px;
       padding: 8px 14px; border-radius: 999px; background: var(--panel); color: var(--ink); border: 1px solid var(--line);
       box-shadow: 0 6px 18px rgba(0, 0, 0, .12); font-size: .82rem; font-weight: 600; opacity: 0; transform: translate(-50%, 0); pointer-events: none; }
.ptr-icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--soft); }
.ptr-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.ptr.is-armed .ptr-icon { background: var(--accent); color: #fff; }
.ptr.is-armed .ptr-icon svg { transform: rotate(180deg); }
.ptr.is-loading .ptr-icon svg { transform: none; }
@media (max-width: 520px) { .hero-refresh span { display: none; } .hero-refresh { padding: 6px 9px; } }
@media (prefers-reduced-motion: reduce) { .ptr-hint svg { animation: none; } }

/* ── Theme toggle (top right) + Appearance choices (Account) ───────────── */
.theme-toggle { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 12px; border: 1px solid var(--line);
                background: var(--panel); color: var(--ink); cursor: pointer; }
.theme-toggle:hover { background: var(--soft); }
.theme-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.appearance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.appearance button { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 84px; padding: 12px 8px; border-radius: 14px;
                     border: 1px solid var(--line); background: var(--soft); color: var(--body); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.appearance button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.appearance button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent); }
.public-right { display: flex; align-items: center; gap: 12px; }
.auth-theme { position: absolute; top: calc(16px + env(safe-area-inset-top)); right: 16px; z-index: 2; }
.auth-main { position: relative; }

/* ── Download my data ──────────────────────────────────────────────────── */
.data-card { display: flex; align-items: flex-start; gap: 16px; }
.ok-icon { background: var(--ok-bg); color: var(--ok); }

/* ── What difference it made (OB 3.0 evidence) ──────────────────────────── */
.impact-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 12px; }
.impact-list li { display: grid; gap: 6px; }
.impact-step { font-size: .85rem; font-weight: 700; color: var(--muted); }
.impact-list blockquote { margin: 0; padding: 12px 14px; border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; background: var(--soft); color: var(--ink); }
/* ── How each step was validated (one OB 3.0 Evidence per validated objective) ── */
.step-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 14px; }
.step-list li { display: grid; gap: 6px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.step-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.step-head { display: flex; align-items: flex-start; gap: 10px; color: var(--ink); }
.step-tick { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; flex: none; background: var(--ok-bg); color: var(--ok); }
.step-tick svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.step-how { margin: 0 0 0 34px; color: var(--muted); font-size: .92rem; }
.step-words { display: grid; gap: 6px; margin-left: 34px; }
.step-words blockquote { margin: 0; padding: 10px 12px; border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; background: var(--soft); color: var(--ink); }
.step-more { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.step-more summary { cursor: pointer; font-weight: 700; color: var(--focus); width: max-content; min-height: 32px; display: flex; align-items: center; }
.step-more .step-list { margin-top: 14px; }

/* ── Digital Passport ──────────────────────────────────────────────────── */
.ok-notice { background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.share-card { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.share-qr { width: 168px; height: 168px; flex: none; padding: 8px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.qr-img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.share-body { flex: 1 1 280px; min-width: 0; }
.share-body h2 { margin-bottom: 2px; }
.copy-row { display: flex; gap: 8px; margin: 12px 0; }
.copy-row input { flex: 1; min-width: 0; padding: 9px 12px; font-size: .9rem; }
.share-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.share-actions form { margin: 0; }
.manage h3 { font-size: 1rem; margin: 22px 0 8px; color: var(--ink); }
.switch-row, .pick { display: flex; align-items: center; gap: 14px; cursor: pointer; font-weight: 400; }
.switch-row { padding: 14px; margin: 6px 0 16px; border-radius: 12px; background: var(--soft); }
.switch-row > span, .pick-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.switch { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 46px; height: 28px; padding: 0; border-radius: 999px;
          background: var(--line); border: 0; cursor: pointer; transition: background .15s ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s ease; }
.switch:checked { background: var(--ok); }
.switch:checked::after { transform: translateX(18px); }
.switch-row .switch { order: -1; }
.bulk { display: flex; gap: 8px; margin-bottom: 10px; }
.pick-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.pick { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.pick-coin { width: 36px; height: 36px; flex: none; }
.pick-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.change summary { list-style: none; display: inline-flex; align-items: center; min-height: 36px; padding: 6px 16px; border: 1px solid var(--line);
                         border-radius: 10px; color: var(--ink); font-size: .9rem; }
details.change summary::-webkit-details-marker { display: none; }
details.change[open] summary { margin-bottom: 4px; }

/* ── Public passport frame ─────────────────────────────────────────────── */
.public-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(14px + env(safe-area-inset-top)) 28px 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
.passport-chip { background: var(--accent-soft); color: var(--accent); }
.has-public .main { max-width: 1100px; }
.public-foot { max-width: 1100px; margin: 0 auto; width: 100%; }

/* ── Print page ────────────────────────────────────────────────────────── */
.has-bare { background: var(--bg); }
.print-page { max-width: 820px; margin: 0 auto; padding: 20px 16px 40px; }
.print-toolbar { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.print-sheet { background: #fff; color: #17161a; border: 1px solid var(--line); border-radius: 16px; padding: 40px 44px; }
.print-sheet h1, .print-sheet h2, .print-sheet strong { color: #17161a; }
.print-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid #e3e1db; color: #6c6a73; font-size: .85rem; }
.print-head img { height: 28px; width: auto; }
.print-coin { display: grid; place-items: center; margin: 28px 0 12px; }
.print-coin-svg { width: 150px; height: 150px; }
.print-sheet h1 { text-align: center; margin-bottom: 18px; }
.print-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 20px; }
.print-facts div { padding: 10px 12px; border: 1px solid #e3e1db; border-radius: 10px; }
.print-facts dt { font-size: .75rem; color: #6c6a73; text-transform: uppercase; letter-spacing: .06em; }
.print-facts dd { margin: 2px 0 0; font-weight: 600; }
.print-sheet section { margin-bottom: 14px; }
.print-sheet section h2 { font-size: .95rem; margin-bottom: 4px; }
.print-sheet section p, .print-sheet section ul { margin: 0; color: #3a3840; }
.print-sheet ul { padding-left: 18px; }
.print-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-top: 24px; padding-top: 16px; border-top: 1px solid #e3e1db; font-size: .9rem; color: #3a3840; }
.print-foot p { margin: 0 0 6px; }
.print-foot .small { color: #6c6a73; }
.break { word-break: break-all; }
.qr { width: 120px; height: 120px; flex: none; }

/* ── New coin reveal: spin on x/z, celebration, then it lands in the collection ── */
.card[data-new], tr[data-new-row] { visibility: hidden; }
.card.is-landing { animation: card-land .7s cubic-bezier(.2, .8, .2, 1.2) both; }
@keyframes card-land { 0% { transform: scale(.9); box-shadow: 0 0 0 0 rgba(255, 103, 0, .0); }
                       45% { transform: scale(1.04); box-shadow: 0 0 0 8px rgba(255, 103, 0, .25); }
                       100% { transform: scale(1); box-shadow: var(--shadow); } }
.reveal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; color: #fff;
          background: radial-gradient(circle at 50% 42%, rgba(80, 50, 160, .55), rgba(10, 8, 25, .88) 60%); backdrop-filter: blur(6px);
          opacity: 0; transition: opacity .3s ease; }
.reveal.is-open { opacity: 1; }
.reveal canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.reveal-stage { position: relative; text-align: center; max-width: 420px; }
.reveal-coin-wrap { position: relative; width: 220px; height: 220px; margin: 0 auto 26px; perspective: 900px; }
.reveal-glow { position: absolute; inset: -60px; border-radius: 50%; background: radial-gradient(circle, var(--reveal-fill, #ff7a1f) 0%, transparent 62%); opacity: 0; }
.reveal-glow.is-on { animation: reveal-glow 2.2s ease-out both; }
.reveal.is-intro .reveal-glow { opacity: .3; animation: reveal-pulse 2.4s ease-in-out infinite; }
@keyframes reveal-glow { 0% { opacity: 0; transform: scale(.4); } 50% { opacity: .6; transform: scale(1.12); } 100% { opacity: .35; transform: scale(1); } }
@keyframes reveal-pulse { 0%, 100% { opacity: .2; transform: scale(.9); } 50% { opacity: .45; transform: scale(1.05); } }
/* The coin opens facing the owner (scale up). The 3D coin then turns inside three.js
   (badge.html 'nexus-badge:spin'); the flat fallback turns with CSS (.is-flat-spin). */
.reveal-coin { position: relative; width: 100%; height: 100%; border-radius: 50%; background: var(--reveal-fill, #ff7a1f);
               transform-style: preserve-3d; animation: coin-open .45s cubic-bezier(.2, .8, .3, 1.15) both; }
@keyframes coin-open { from { transform: scale(.35); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.reveal-coin.is-flat-spin { animation: coin-flat-spin 1.9s cubic-bezier(.45, 0, .25, 1) both; }
@keyframes coin-flat-spin { from { transform: rotateY(0deg); } to { transform: rotateY(1080deg); } }
.reveal-coin.is-waiting { animation: none; opacity: 0; }
.reveal-coin.is-3d { background: transparent; border-radius: 0; }
.reveal-coin:not(.is-3d) .reveal-3d { visibility: hidden; }
.reveal-3d { position: absolute; inset: -38%; width: 176%; height: 176%; border: 0; background: transparent; pointer-events: none; }   /* 3D coin = the 2D coin's size */
.reveal-coin.is-flying { animation: none; transition: transform .7s cubic-bezier(.5, 0, .2, 1), opacity .7s ease; }
.reveal-text { opacity: 0; }
.reveal-text.is-shown { opacity: 1; }
.reveal-text.is-playing { animation: reveal-text .6s ease .15s both; }
@keyframes reveal-text { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.reveal-sound { position: absolute; top: 16px; right: 16px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
                border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; }
.reveal-sound svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.reveal-sound[aria-pressed="true"] .mute, .reveal-sound[aria-pressed="false"] .wave { display: none; }
.reveal-kicker { margin: 0 0 6px; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #ffd27a; }
.reveal h2 { margin: 0 0 6px; font-size: 1.7rem; line-height: 1.2; color: #fff; }
.reveal-issuer { margin: 0 0 18px; color: rgba(255, 255, 255, .8); }
.reveal-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.reveal .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.reveal-count { margin: 14px 0 0; font-size: .85rem; color: rgba(255, 255, 255, .65); }
.reveal.is-leaving { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .reveal-coin, .reveal-coin.is-flat-spin, .reveal-glow.is-on, .reveal-text.is-playing, .card.is-landing { animation: none; }
  .reveal-text { opacity: 1; }
  .reveal-glow { opacity: .35; }
}
@media (max-width: 520px) { .reveal-coin-wrap { width: 170px; height: 170px; } .reveal h2 { font-size: 1.35rem; } }

[hidden] { display: none !important; }

@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { position: static; height: auto; padding: 20px; gap: 0; }
  .auth-logo { margin: 0 auto; justify-content: center; }
  .auth-logo img { height: 30px; }
  .auth-logo .wordmark { font-size: 2rem; }
  .auth-art .hero-kicker, .auth-title, .auth-art .hero-stats { display: none; }
  .has-auth .main { padding: 20px 16px 28px; }
  .has-auth .panel.narrow { padding: 22px; }
}

/* ── Print: the flat coin and its details, nothing else ────────────────── */
@media print {
  @page { margin: 16mm; }
  body { background: #fff; color: #000; }
  .side, .top, .skip, .crumb, .no-print, .coin-actions, .coin3d-frame, .tile-chip { display: none !important; }
  .shell { display: block; }
  .has-shell .main { padding: 0; max-width: none; }
  .coin-frame.is-3d .coin.big { visibility: visible; }
  .showcase { background: none !important; border: 0; padding: 0 0 12px; }
  .panel { box-shadow: none; break-inside: avoid; border-color: #ccc; }
  .print-only { display: block; color: #555; }
  .has-bare { background: #fff; }
  .print-page { padding: 0; max-width: none; }
  .print-sheet { border: 0; padding: 0; border-radius: 0; }
  .shell-foot { display: block; padding: 0; }
  a { color: #000; text-decoration: none; }
}

/* ── Account: Connected to Nexus (10.10) ─────────────────────────────────── */
.conn-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.conn { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.conn-mark { width: 36px; height: 36px; flex: none; padding: 4px; border-radius: 9px; background: #fff; border: 1px solid var(--line); }
.conn-body { flex: 1; min-width: 180px; display: grid; gap: 4px; justify-items: start; }
.conn-off { flex-basis: 100%; }
.conn-off summary { list-style: none; width: max-content; }
.conn-off summary::-webkit-details-marker { display: none; }
.conn-off[open] summary { margin-bottom: 10px; }

/* ── Privacy page (11.10) ───────────────────────────────────────────────── */
.privacy h2 { font-size: 1.05rem; margin: 22px 0 6px; }
.privacy ul { margin: 0 0 8px; padding-left: 1.2em; display: grid; gap: 8px; }
.privacy p, .privacy li { max-width: 65ch; }


/* The page swap moves focus to the new page for screen readers; no focus ring for that (Stephen 13.10 saw a blue line). */
#main[tabindex="-1"]:focus { outline: none; }
