/* The token chip in the header and its sheet (a modal <dialog>): a side sheet on wide screens, a
   bottom sheet on phones. Colours and type come from index.html's tokens. */
:root {
  --tok-panel: #130a0d;
  --tok-card: rgba(255, 255, 255, .035);
  --tok-amber: #ffbf5e;
  --tok-green: #5ee6a8;
  --tok-err: #ff8597;
  --tok-ease: cubic-bezier(.2, .8, .2, 1);
  --tok-out: cubic-bezier(.4, 0, 1, 1);
  --tok-w: min(400px, 100vw);
  /* Small text on the panel stays at 5:1 contrast or more. */
  --tok-faint: rgba(246, 238, 240, .54);
}

/* ---- chip ---------------------------------------------------------------------------------------- */

.tok-chip { pointer-events: auto; display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 9px 0 6px;
            border-radius: 999px; background: var(--chip, var(--glass)); border: 2px solid var(--chip-line, var(--line));
            box-shadow: var(--drop, none); color: var(--ink);
            font-size: 12px; font-weight: 800; letter-spacing: .03em; cursor: pointer; white-space: nowrap;
            transition: border-color .25s, background-color .25s, transform .2s var(--tok-ease), opacity .5s, box-shadow .6s; }
.tok-chip[hidden] { display: none; }
.tok-chip.is-new { animation: tok-chip-in .55s var(--tok-ease) both; }
.tok-chip:hover { border-color: var(--gold, rgba(255, 45, 74, .65)); }
.tok-chip:active { transform: translateY(2px); }
.tok-chip:focus-visible, .tok-sheet :focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.tok-sheet .tok-title:focus, .tok-sheet .tok-title:focus-visible { outline: none; }
.tok-chip[aria-expanded="true"] { border-color: rgba(255, 45, 74, .8); }
.tok-chip.is-pulse { animation: tok-pulse 1.1s ease-out; }
/* The icon slot: the progress ring alone, or the site's coin inside it. The coin only shows when the token is
   the configured one (sheet.js adds .has-coin), never next to a test network's stand-in. */
.tok-icon { position: relative; flex: none; width: 18px; height: 18px; transition: width .3s var(--tok-ease), height .3s var(--tok-ease); }
.tok-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.tok-ring circle { fill: none; stroke-width: 3.4; }
.tok-coin { position: absolute; left: 50%; top: 50%; width: 17px; height: 17px; margin: -8.5px 0 0 -8.5px; display: none; }
.tok-chip.has-coin { padding-left: 2px; }
.tok-chip.has-coin .tok-icon { width: 24px; height: 24px; }
.tok-chip.has-coin .tok-ring circle { stroke-width: 1.8; }
.tok-chip.has-coin .tok-coin { display: block; animation: tok-coin-in .5s var(--tok-ease) both; }
.tok-ring-track { stroke: rgba(255, 255, 255, .16); }
.tok-ring-fill { stroke: var(--red); stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: 100;
                 transition: stroke-dashoffset 1s var(--tok-ease); }
.tok-chip.is-busy .tok-ring { animation: tok-spin 1.4s linear infinite; }
.tok-chip.is-busy .tok-ring-fill { stroke-dashoffset: 72; }
.tok-chip-val { color: var(--dim); font-variant-numeric: tabular-nums; }
.tok-chip-val:empty { display: none; }
.tok-chip-net { padding: 1px 6px; border-radius: 999px; font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
                color: var(--tok-amber); background: rgba(255, 191, 94, .12); border: 1px solid rgba(255, 191, 94, .32); }
.tok-chip-net[hidden] { display: none; }
.tok-chip-tx { width: 7px; height: 7px; border-radius: 50%; background: var(--red); display: none; }
.tok-chip.has-tx .tok-chip-tx { display: block; animation: tok-blink 1.2s ease-in-out infinite; }
.tok-chip.has-final .tok-chip-tx { display: block; background: var(--tok-green); animation: none; }
.tok-chev { width: 12px; height: 12px; color: var(--faint); margin-left: -2px; transition: transform .25s var(--tok-ease), color .25s; }
.tok-chip:hover .tok-chev { transform: translateX(2px); color: var(--ink); }

@media (max-width: 760px) {
  .tok-chip { position: absolute; left: var(--gut); top: var(--row2, calc(max(16px, env(safe-area-inset-top)) + 40px)); }
}

/* ---- wallet button (wallet.json: the wallet alone, while the token sheet is off) ------------------------- */

/* Same look as the chip, a gold edge until an account is connected. Above the room's other overlays: its menu
   and notes drop over the scene. */
.wal { position: relative; z-index: 3; flex: none; pointer-events: none; }
.wal[hidden], .wal [hidden] { display: none !important; }
.wal-chip { pointer-events: auto; display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px 0 8px;
            border-radius: 999px; background: var(--chip, var(--glass)); border: 2px solid rgba(255, 201, 60, .6);
            box-shadow: var(--drop, none); color: var(--ink);
            font-size: 12px; font-weight: 800; letter-spacing: .03em; cursor: pointer; white-space: nowrap;
            transition: border-color .25s, background-color .25s, transform .2s var(--tok-ease), box-shadow .6s; }
.wal-chip:hover { border-color: var(--gold, #ffc93c); transform: translateY(-1px); }
.wal-chip:active { transform: translateY(2px); }
.wal:not(.is-on) .wal-icon { color: var(--gold, #ffc93c); }
.wal.is-soon .wal-chip { cursor: default; color: var(--faint); border-style: dashed; border-color: rgba(255, 201, 60, .35); transform: none; }
.wal.is-soon .wal-icon { color: var(--faint); }
.wal.is-on .wal-chip { border-color: var(--chip-line, var(--line)); }
.wal :focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.wal.is-open .wal-chip { border-color: rgba(255, 45, 74, .8); }
.wal.is-new .wal-chip { animation: tok-chip-in .55s var(--tok-ease) both; }
.wal.is-pulse .wal-chip { animation: tok-pulse 1.1s ease-out; }
.wal.is-nudge .wal-chip { animation: tok-nudge .32s ease-out; }

/* The icon: a wallet; a spinner while the wallet answers; a green dot once connected. */
.wal-icon { position: relative; flex: none; width: 16px; height: 16px; }
.wal-icon svg { position: absolute; inset: 0; width: 16px; height: 16px; transition: opacity .2s, transform .3s var(--tok-ease); }
.wal-icon::after { content: ""; position: absolute; inset: 1px; border-radius: 50%; border: 2px solid currentColor;
                   border-right-color: transparent; opacity: 0; transition: opacity .2s; }
.wal-dot { position: absolute; left: 4px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--tok-green);
           box-shadow: 0 0 0 3px rgba(94, 230, 168, .15); opacity: 0; transform: scale(.4);
           transition: opacity .25s, transform .4s var(--tok-ease); }
.wal.is-busy .wal-icon svg, .wal.is-on .wal-icon svg { opacity: 0; transform: scale(.6); }
.wal.is-busy .wal-icon::after { opacity: 1; animation: wal-spin .8s linear infinite; }
.wal.is-on .wal-dot { opacity: 1; transform: none; }
.wal.is-on .wal-label { font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0; }
.wal-label.is-swap { animation: wal-swap .35s var(--tok-ease); }
.wal-bal { color: var(--dim); font-variant-numeric: tabular-nums; }
.wal-bal:empty:not(.is-wait) { display: none; }
.wal-bal.is-wait { width: 3.4em; height: .8em; border-radius: 4px; background: rgba(255, 255, 255, .1); animation: tok-blink 1.4s ease-in-out infinite; }
.wal-chev { display: none; width: 12px; height: 12px; margin-left: -2px; color: var(--faint); transition: transform .25s var(--tok-ease), color .25s; }
.wal.is-on .wal-chev { display: block; }
.wal-chip:hover .wal-chev { color: var(--ink); }
.wal.is-open .wal-chev { transform: rotate(180deg); }

/* The menu of a connected account, and the notes: small cards under the button. */
.wal-menu, .wal-note { pointer-events: auto; position: absolute; left: 0; top: calc(100% + 10px); white-space: normal;
                       background: rgba(22, 9, 13, .97); border: 2px solid var(--chip-line, var(--line));
                       box-shadow: 0 4px 0 var(--outline, #000), 0 16px 44px rgba(0, 0, 0, .45); }
.wal-menu { width: 272px; padding: 14px 14px 10px; border-radius: 14px; transform-origin: 18px 0; }
.wal-menu.is-in { animation: wal-in .26s var(--tok-ease) both; }
.wal-acct { display: flex; align-items: center; gap: 6px; }
.wal-addr { font: 600 13px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; min-width: 0; overflow-wrap: anywhere; }
.wal-copy { position: relative; flex: none; width: 28px; height: 28px; margin-left: auto; border-radius: 8px; cursor: pointer;
            display: inline-grid; place-items: center; color: var(--dim); background: rgba(255, 255, 255, .05); border: 1px solid var(--line);
            transition: color .2s, background-color .2s, transform .15s var(--tok-ease); }
.wal-copy:hover { color: var(--ink); background: rgba(255, 255, 255, .1); }
.wal-copy:active { transform: scale(.92); }
.wal-copy svg { grid-area: 1 / 1; width: 14px; height: 14px; transition: opacity .2s, transform .3s var(--tok-ease); }
.wal-copied-ico { opacity: 0; transform: scale(.5); color: var(--tok-green); }
.wal-copy.is-done .wal-copy-ico { opacity: 0; transform: scale(.5); }
.wal-copy.is-done .wal-copied-ico { opacity: 1; transform: none; }
.wal-via { margin-top: 2px; font-size: 11.5px; color: var(--tok-faint); }
.wal-funds { margin-top: 12px; }
.wal-k { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--tok-faint); }
.wal-funds b { display: block; margin-top: 3px; font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15;
               color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.wal-funds b.is-wait { width: 7em; height: 1.05em; border-radius: 5px; background: rgba(255, 255, 255, .08); animation: tok-blink 1.4s ease-in-out infinite; }
.wal-sub { margin-top: 4px; font-size: 12px; line-height: 1.4; color: var(--tok-amber); }
.wal-row { display: flex; align-items: center; gap: 14px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.wal-link { background: none; border: 0; padding: 6px 0; font: inherit; font-size: 12.5px; color: var(--dim); cursor: pointer;
            text-decoration: underline; text-decoration-color: rgba(246, 238, 240, .25); text-underline-offset: 3px; }
.wal-link:hover { color: var(--ink); text-decoration-color: currentColor; }
.wal-row #wal-disconnect { margin-left: auto; }
.wal-note { display: flex; align-items: baseline; gap: 10px; width: max-content; max-width: min(300px, calc(100vw - 2 * var(--gut)));
            padding: 8px 12px; border-radius: 12px; font-size: 12.5px; font-weight: 500; line-height: 1.4; color: var(--ink); }
.wal-note.is-in { animation: tok-rise .3s var(--tok-ease) both; }
.wal-note.is-err { color: var(--tok-err); border-color: rgba(255, 133, 151, .35); }
.wal-note.is-soon { border-color: var(--gold, rgba(255, 191, 94, .4)); }
.wal-note.is-soon::before { content: ""; flex: none; align-self: center; width: 7px; height: 7px; border-radius: 50%; background: var(--tok-amber);
                            box-shadow: 0 0 0 3px rgba(255, 191, 94, .16); }
.wal-note .wal-link { flex: none; padding: 0; }

@media (max-width: 760px) {
  .wal { position: absolute; left: var(--gut); top: var(--row2, calc(max(16px, env(safe-area-inset-top)) + 40px)); }
  .wal-menu { width: min(300px, calc(100vw - 2 * var(--gut))); }
}

@media (prefers-reduced-motion: reduce) {
  .wal-chip, .wal-icon svg, .wal-dot, .wal-copy svg { transition-duration: .01s !important; }
  .wal.is-new .wal-chip, .wal.is-pulse .wal-chip, .wal.is-nudge .wal-chip, .wal-label.is-swap, .wal-menu.is-in, .wal-note.is-in,
  .wal-bal.is-wait, .wal-funds b.is-wait { animation: none !important; }
  .wal.is-busy .wal-icon::after { animation-duration: 2.4s; }
}

@keyframes wal-spin { to { transform: rotate(360deg); } }
@keyframes wal-swap { from { opacity: 0; transform: translateY(3px); } }
@keyframes wal-in { from { opacity: 0; transform: translateY(-4px) scale(.97); } }

/* ---- sheet --------------------------------------------------------------------------------------- */

.tok-sheet { position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0; border: 0; width: var(--tok-w); max-width: 100vw;
             height: 100dvh; max-height: 100dvh; background: transparent; color: var(--ink); overflow: visible; }
.tok-sheet::backdrop { background: rgba(5, 2, 3, .36); opacity: 0; transition: opacity .32s var(--tok-ease); }
.tok-sheet.is-open::backdrop { opacity: 1; }
.tok-panel { position: relative; height: 100%; overflow-y: auto; overscroll-behavior: contain; background: var(--tok-panel);
             border-left: 1px solid var(--line); box-shadow: -24px 0 60px rgba(0, 0, 0, .45);
             padding: 0 22px max(24px, env(safe-area-inset-bottom));
             transform: translateX(28px); opacity: 0;
             transition: transform .34s var(--tok-ease), opacity .26s var(--tok-ease); }
.tok-sheet.is-open .tok-panel { transform: none; opacity: 1; }
.tok-sheet.is-closing .tok-panel { transition-duration: .2s, .18s; transition-timing-function: var(--tok-out); }
.tok-sheet.is-dragging .tok-panel { transition: none; }
.tok-panel > * { animation: none; }
.tok-sheet.is-open .tok-panel > .tok-stagger { animation: tok-rise .5s var(--tok-ease) both; animation-delay: calc(var(--i, 0) * 35ms + 60ms); }

.tok-grip { display: none; }
.tok-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; margin: 0 -22px;
            padding: max(18px, env(safe-area-inset-top)) 22px 12px; background: linear-gradient(var(--tok-panel) 78%, rgba(19, 10, 13, 0)); }
.tok-head-coin { flex: none; width: 30px; height: 30px; margin-right: -2px; }
.tok-head-coin:not([hidden]) { animation: tok-pop .5s var(--tok-ease) both; }
.tok-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; outline: none; overflow-wrap: anywhere; }
.tok-net { padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
           color: var(--tok-amber); background: rgba(255, 191, 94, .1); border: 1px solid rgba(255, 191, 94, .3); white-space: nowrap; }
.tok-net[hidden] { display: none; }
.tok-x { margin-left: auto; flex: none; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center;
         justify-content: center; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); cursor: pointer;
         color: var(--dim); transition: color .2s, background-color .2s, transform .2s var(--tok-ease); }
.tok-x:hover { color: var(--ink); background: rgba(255, 255, 255, .1); }
.tok-x:active { transform: scale(.92); }
.tok-x svg { width: 16px; height: 16px; }

.tok-about { color: var(--dim); font-size: 14px; line-height: 1.5; margin-top: 2px; }
.tok-about b { color: var(--ink); font-weight: 600; }
.tok-testnote { margin-top: 8px; font-size: 12.5px; line-height: 1.45; color: rgba(255, 191, 94, .8); }
.tok-notice { margin-top: 16px; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.45;
              background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: var(--ink); }
.tok-notice.is-warn { background: rgba(255, 191, 94, .08); border-color: rgba(255, 191, 94, .3); }
.tok-notice.is-coming { font-size: 20px; font-weight: 800; letter-spacing: -.01em; text-align: center; padding: 26px 14px;
                        background: radial-gradient(120% 140% at 50% 0%, rgba(255, 45, 74, .18), rgba(255, 45, 74, 0) 70%), rgba(255, 255, 255, .03); }
.tok-notice.is-coming::before { content: ""; display: block; width: 72px; height: 72px; margin: 0 auto 12px;
                                background: url(yuvi-mark.svg) center / contain no-repeat; animation: tok-pop .6s var(--tok-ease) both; }
.tok-sheet [hidden], .tok-chip [hidden] { display: none !important; }

.tok-h { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--tok-faint); margin-bottom: 10px; }
.tok-sec { margin-top: 26px; }

/* supply */
.tok-supply { margin-top: 22px; }
.tok-progress-row { display: flex; align-items: baseline; gap: 10px; }
.tok-big { font-size: 15px; color: var(--dim); font-variant-numeric: tabular-nums; }
.tok-big b { display: inline-block; font-size: 34px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); margin-right: 2px; }
.tok-pct { margin-left: auto; font-size: 15px; font-weight: 600; color: var(--red); font-variant-numeric: tabular-nums; }
.tok-bar { position: relative; height: 6px; margin-top: 10px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.tok-bar i { position: absolute; inset: 0 auto 0 0; width: 0; min-width: 0; border-radius: 6px; background: var(--red);
             box-shadow: 0 0 14px rgba(255, 45, 74, .55); transition: width 1s var(--tok-ease); }
.tok-bar.has-some i { min-width: 5px; }
.tok-sub { margin-top: 8px; font-size: 12.5px; color: var(--tok-faint); font-variant-numeric: tabular-nums; }
.tok-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.tok-stats div, .tok-bal div { min-width: 0; }
.tok-stats dt, .tok-bal dt { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--tok-faint); }
.tok-stats dd, .tok-bal dd { margin-top: 4px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* mint card */
.tok-card { margin-top: 24px; padding: 16px; border-radius: 16px; background: var(--tok-card); border: 1px solid var(--line); }
.tok-account { display: flex; align-items: center; gap: 8px; min-width: 0; margin-bottom: 14px; animation: tok-rise .4s var(--tok-ease) both; }
.tok-account .tok-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tok-green); box-shadow: 0 0 0 3px rgba(94, 230, 168, .15); flex: none; }
.tok-addr { font: 600 13px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tok-via { font-size: 11.5px; color: var(--tok-faint); white-space: nowrap; }
.tok-link { margin-left: auto; flex: none; background: none; border: 0; padding: 6px 2px; font-size: 12.5px; color: var(--dim);
            cursor: pointer; text-decoration: underline; text-decoration-color: rgba(246, 238, 240, .25); text-underline-offset: 3px; }
.tok-link:hover { color: var(--ink); text-decoration-color: currentColor; }
.tok-bal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-bottom: 14px; margin-bottom: 14px;
           border-bottom: 1px solid var(--line); }
.tok-offer { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.tok-offer-what { font-size: 16px; font-weight: 600; }
.tok-offer-size { font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }
.tok-fee { width: 100%; font-size: 13px; color: var(--dim); }
.tok-fee b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.tok-btn { position: relative; width: 100%; min-height: 48px; margin-top: 14px; border-radius: 12px; border: 0; cursor: pointer;
           display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; font-size: 15px;
           color: #fff; background: var(--red); box-shadow: 0 8px 26px rgba(255, 45, 74, .28), inset 0 1px 0 rgba(255, 255, 255, .2);
           transition: transform .16s var(--tok-ease), filter .2s, background-color .25s, box-shadow .25s, color .25s; }
.tok-btn:hover { filter: brightness(1.08); }
.tok-btn:active { transform: scale(.98); }
.tok-btn:disabled { cursor: default; color: var(--tok-faint); background: rgba(255, 255, 255, .07); box-shadow: none; filter: none; transform: none; }
.tok-btn.is-busy::before { content: ""; width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor;
                           border-right-color: transparent; animation: tok-spin .8s linear infinite; }
.tok-under { display: flex; align-items: flex-start; gap: 12px; margin-top: 10px; }
.tok-hint { font-size: 12.5px; line-height: 1.45; color: var(--tok-faint); }
.tok-hint.is-err { color: var(--tok-err); animation: tok-nudge .32s ease-out; }
.tok-hint.is-warn { color: var(--tok-amber); }
.tok-fine { margin-top: 12px; font-size: 11.5px; line-height: 1.5; color: var(--tok-faint); }

/* transaction tracker */
.tok-tx { margin-top: 2px; padding: 14px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
          animation: tok-rise .35s var(--tok-ease) both; transition: border-color .4s; }
.tok-tx + .tok-offer, .tok-tx ~ .tok-btn { margin-top: 16px; }
.tok-tx.is-final { border-color: rgba(94, 230, 168, .45); }
.tok-tx.is-failed { border-color: rgba(255, 133, 151, .45); }
.tok-tx.is-unknown { border-color: rgba(255, 191, 94, .45); }
.tok-tx-title { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.tok-tx-badge { margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--dim); }
.tok-tx.is-final .tok-tx-badge { color: var(--tok-green); }
.tok-tx.is-failed .tok-tx-badge { color: var(--tok-err); }
.tok-tx.is-unknown .tok-tx-badge { color: var(--tok-amber); }
.tok-steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.tok-steps li { font-size: 10.5px; line-height: 1.25; color: var(--tok-faint); transition: color .3s; }
.tok-steps li::before { content: ""; display: block; height: 4px; margin-bottom: 7px; border-radius: 4px; background: rgba(255, 255, 255, .1);
                        background-image: linear-gradient(var(--ink), var(--ink)); background-repeat: no-repeat; background-size: 0% 100%;
                        transition: background-size .6s var(--tok-ease); }
.tok-steps li.is-done { color: var(--dim); }
.tok-steps li.is-done::before { background-size: 100% 100%; background-image: linear-gradient(rgba(246, 238, 240, .7), rgba(246, 238, 240, .7)); }
.tok-steps li.is-now { color: var(--ink); }
.tok-steps li.is-now::before { background-size: 100% 100%; background-image: linear-gradient(var(--red), var(--red)); animation: tok-blink 1.3s ease-in-out infinite; }
.tok-tx.is-final .tok-steps li::before { background-size: 100% 100%; background-image: linear-gradient(var(--tok-green), var(--tok-green)); animation: none; }
.tok-tx.is-final .tok-steps li { color: var(--dim); }
.tok-tx.is-final .tok-steps li:last-child { color: var(--tok-green); font-weight: 600; }
.tok-tx-detail { margin-top: 10px; font-size: 12.5px; line-height: 1.45; color: var(--dim); overflow-wrap: anywhere; }
.tok-tx-detail:empty { display: none; }
.tok-tx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 8px; }
.tok-tx-actions .tok-link { margin-left: 0; }
.tok-tx-actions a { font-size: 12.5px; color: var(--dim); text-decoration: underline; text-decoration-color: rgba(246, 238, 240, .25);
                    text-underline-offset: 3px; padding: 6px 0; }
.tok-tx-actions a:hover { color: var(--ink); }
.tok-tx-hash { font: 11.5px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--tok-faint); }
.tok-tx-hash:empty { display: none; }
.tok-check { display: inline-block; width: 13px; height: 13px; margin-right: 4px; vertical-align: -1px; animation: tok-pop .5s var(--tok-ease) both; }

/* lists */
.tok-rows { list-style: none; padding: 0; }
.tok-rows li { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-top: 1px solid rgba(255, 255, 255, .06); font-size: 13.5px; min-width: 0; }
.tok-rows li:first-child { border-top: 0; padding-top: 2px; }
.tok-rank { width: 16px; flex: none; color: var(--tok-faint); font-variant-numeric: tabular-nums; font-size: 12px; }
.tok-who { font: 12.5px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--dim); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tok-you { margin-left: 6px; padding: 1px 6px; border-radius: 999px; font: 600 10px/1.4 Inter, system-ui, sans-serif; letter-spacing: .05em;
           text-transform: uppercase; color: var(--tok-green); background: rgba(94, 230, 168, .1); }
.tok-amt { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tok-share { width: 52px; flex: none; text-align: right; color: var(--tok-faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.tok-rows a.tok-act { display: flex; align-items: baseline; gap: 10px; width: 100%; min-width: 0; color: inherit; text-decoration: none; }
.tok-rows a.tok-act:hover .tok-what { text-decoration: underline; text-underline-offset: 3px; }
.tok-what { font-weight: 600; white-space: nowrap; }
.tok-act .tok-amt { margin-left: 0; font-weight: 400; color: var(--dim); }
.tok-when { margin-left: auto; color: var(--tok-faint); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tok-empty { font-size: 13px; color: var(--tok-faint); }

/* perks */
.tok-perk { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13.5px; min-width: 0; }
.tok-cmd { flex: none; padding: 3px 8px; border-radius: 8px; font: 600 12.5px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
           color: #ffb3bf; background: rgba(255, 45, 74, .12); border: 1px solid rgba(255, 45, 74, .25); }
.tok-perk-text { color: var(--dim); min-width: 0; }
.tok-soon { margin-left: auto; flex: none; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--tok-faint); }
.tok-soon.is-live { color: var(--tok-green); }

.tok-foot { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 11.5px; line-height: 1.5; color: var(--tok-faint); }
.tok-foot a { display: inline-block; margin-top: 6px; color: var(--dim); text-decoration: underline; text-decoration-color: rgba(246, 238, 240, .25); text-underline-offset: 3px; }
.tok-foot a:hover { color: var(--ink); }

.tok-bump { animation: tok-bump .7s var(--tok-ease); }
.tok-skeleton { display: inline-block; width: 3.2em; height: .8em; border-radius: 4px; background: rgba(255, 255, 255, .08); animation: tok-blink 1.4s ease-in-out infinite; vertical-align: middle; }

/* phones: a bottom sheet */
@media (max-width: 760px) {
  .tok-sheet { inset: auto 0 0 0; width: 100vw; height: auto; max-height: 90dvh; }
  .tok-panel { height: auto; max-height: 90dvh; border-left: 0; border-top: 1px solid var(--line); border-radius: 20px 20px 0 0;
               box-shadow: 0 -20px 50px rgba(0, 0, 0, .5); padding: 0 18px max(22px, env(safe-area-inset-bottom));
               transform: translateY(100%); opacity: 1; transition: transform .42s var(--tok-ease); }
  .tok-sheet.is-open .tok-panel { transform: translateY(var(--tok-drag, 0px)); }
  .tok-sheet.is-closing .tok-panel { transition-duration: .24s; }
  .tok-grip { display: block; position: absolute; left: 0; right: 0; top: 0; height: 22px; cursor: grab; }
  .tok-grip i { position: absolute; left: 50%; top: 8px; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: rgba(255, 255, 255, .22); }
  .tok-head { margin: 0 -18px; padding: 24px 18px 10px; touch-action: none; }
  .tok-title { font-size: 24px; }
  .tok-head-coin { width: 28px; height: 28px; }
  .tok-big b { font-size: 30px; }
  .tok-stats dd { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .tok-chip, .tok-panel, .tok-sheet::backdrop, .tok-ring-fill, .tok-bar i, .tok-steps li::before { transition-duration: .01s !important; }
  .tok-chip.is-new, .tok-chip.is-pulse, .tok-sheet.is-open .tok-panel > .tok-stagger, .tok-account, .tok-tx, .tok-bump,
  .tok-hint.is-err, .tok-check, .tok-steps li.is-now::before, .tok-chip.has-tx .tok-chip-tx, .tok-skeleton,
  .tok-chip.has-coin .tok-coin, .tok-head-coin, .tok-notice.is-coming::before { animation: none !important; }
  .tok-icon { transition: none; }
  .tok-chip.is-busy .tok-ring, .tok-btn.is-busy::before { animation-duration: 2.4s; }
  .tok-panel { transform: none !important; }
}

@keyframes tok-chip-in { from { opacity: 0; transform: translateY(-4px) scale(.96); } }
@keyframes tok-coin-in { from { opacity: 0; transform: scale(.55) rotate(-25deg); } }
@keyframes tok-pulse { 0% { box-shadow: var(--drop, 0 0 0 transparent), 0 0 0 0 rgba(255, 201, 60, .6); } 100% { box-shadow: var(--drop, 0 0 0 transparent), 0 0 0 12px rgba(255, 201, 60, 0); } }
@keyframes tok-spin { to { transform: rotate(270deg); } }
@keyframes tok-blink { 50% { opacity: .45; } }
@keyframes tok-rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes tok-bump { 0% { color: var(--red); transform: translateY(-3px); } 100% { transform: none; } }
@keyframes tok-pop { 0% { opacity: 0; transform: scale(.4); } 60% { transform: scale(1.15); } 100% { transform: none; } }
@keyframes tok-nudge { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

/* ---- the on-chain game (token/game-view.js) ----------------------------------------------------------------- */

.game-jar { margin-bottom: 14px; }
.game-tier { display: flex; align-items: baseline; gap: 6px; font-size: 15px; }
.game-tier span { font-size: 12.5px; color: var(--tok-faint); }
.game-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.game-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; font-size: 11.5px; color: var(--tok-faint); }
.game-field.game-wide { grid-column: 1 / -1; }
.game-field[hidden] { display: none; }
.game-field input, .game-field select, .game-guess input { width: 100%; min-width: 0; height: 40px; padding: 0 11px;
  border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); color: var(--ink);
  font: 14px/1.2 Inter, system-ui, sans-serif; }
.game-field input:disabled, .game-field select:disabled { opacity: .6; }
.game-review { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .05);
  font-size: 13px; line-height: 1.5; color: var(--ink); }
.tok-hint.is-ok { color: var(--tok-green); }
.game-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-badge { flex: none; padding: 1px 7px; border-radius: 999px; font: 600 10px/1.5 Inter, system-ui, sans-serif;
  letter-spacing: .06em; text-transform: uppercase; color: var(--tok-amber); border: 1px solid rgba(255, 191, 94, .45); }
.game-title { display: flex; align-items: baseline; gap: 10px; font-size: 14px; }
.game-seal { margin-top: 6px; font-size: 12px; color: var(--tok-faint); }
.game-seal code, .game-reveal { font: 11.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.game-clues { margin: 10px 0 0; padding-left: 0; list-style: none; font-size: 13.5px; line-height: 1.5; }
.game-clues li { padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, .06); }
.game-clues li:first-child { border-top: 0; }
.game-guess { display: flex; gap: 8px; margin: 12px 0 6px; }
.game-guess[hidden] { display: none; }
.game-guess button { flex: none; height: 40px; padding: 0 16px; border-radius: 10px; border: 0; cursor: pointer;
  background: var(--red); color: #fff; font: 600 14px/1 Inter, system-ui, sans-serif; }
.game-guess button:disabled { cursor: default; background: rgba(255, 255, 255, .07); color: var(--tok-faint); }
.game-reveal { margin-top: 8px; color: var(--dim); }
.game-rules { margin-top: 10px; font-size: 12.5px; color: var(--tok-faint); }
.game-rules summary { cursor: pointer; }
.game-rules p { margin-top: 6px; line-height: 1.5; }
@media (max-width: 420px) { .game-form { grid-template-columns: 1fr; } }
.game-who { margin-bottom: 14px; }
.game-named { display: flex; align-items: baseline; gap: 10px; font-size: 13.5px; }
.game-named[hidden], .game-check[hidden] { display: none; }
.game-ok { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--tok-green); }
.game-check { display: grid; gap: 8px; }
.game-btn2 { height: 40px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06);
  color: var(--ink); font: 600 14px/1 Inter, system-ui, sans-serif; cursor: pointer; }
.game-btn2:disabled { cursor: default; color: var(--tok-faint); }
.game-anon { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--tok-faint); }
