/* =============================================================================
   Borkshire UI Kit — component stylesheet (port of docs/design/ui-kit/borkshire-ui-taster.html,
   DRAFT v4 approved 2026-09-25). Scoping: every token (--bx-*) lives on the [data-kit] wrapper
   (KitRoot), every class and keyframe carries the bk- prefix, and every bare element/attribute
   rule is prefixed with [data-kit]. Nothing here reaches an existing .bx-* screen. See README.md.
   Keep this file a faithful copy of the taster CSS: regenerate from the taster, then re-apply
   the scoping edits listed in README.md, rather than hand-tuning values here.
   ============================================================================= */

/* =============================================================================
   Borkshire UI Kit — taster stylesheet. DRAFT v1, 2026-09-24.
   Tokens are --bx-*, classes are .bk-* so this lifts into apps/web globals.css.
   Light ("frost") is the primary theme; dark ("night desk") is a peer, not a tint.
   ============================================================================= */

[data-kit] {
  color-scheme: light;
  /* ---- ground & surfaces ---- */
  --bx-ground: #f5f6f9;
  --bx-surface: #ffffff;
  --bx-inset: #eef0f5;
  --bx-stage: #171b2b; /* the one dark surface in light mode: the chart */
  --bx-stage-fg: #f4f5fa;
  --bx-stage-fg2: rgba(244, 245, 250, 0.62);
  --bx-stage-line: rgba(244, 245, 250, 0.14);
  /* ---- ink ---- */
  --bx-ink: #161a26;
  --bx-ink-2: #565c6c;
  --bx-ink-3: #5f6575;
  --bx-ink-rgb: 22, 26, 38;
  /* ---- lines ---- */
  --bx-line: rgba(22, 26, 38, 0.12);
  --bx-line-strong: rgba(22, 26, 38, 0.24);
  --bx-line-ink: #161a26;
  /* ---- action (one accent per screen) ---- */
  --bx-accent: #3d63e6;
  --bx-accent-deep: #2b4bc4;
  --bx-accent-soft: #e9eeff;
  --bx-accent-rgb: 61, 99, 230;
  --bx-on-accent: #ffffff;
  /* ---- brand sunny yellow: Power, rank #1, streak. Never a button fill. ---- */
  --bx-sun: #ffd84d;
  --bx-sun-deep: #8a6600;
  --bx-sun-soft: #fff3c4;
  --bx-sun-rgb: 255, 216, 77;
  /* ---- semantic ---- */
  --bx-up: #137a3a;
  --bx-up-soft: #e6f6ec;
  --bx-up-rgb: 19, 122, 58;
  --bx-down: #be372b;
  --bx-down-soft: #fceae7;
  --bx-down-rgb: 190, 55, 43;
  --bx-warn: #8f5e00;
  --bx-warn-soft: #fff1cc;
  --bx-focus: #3d63e6;
  --bx-accent-text: #2b4bc4; /* accent-coloured text on soft/inset faces */
  --bx-grain-blend: multiply;
  --bx-stage-accent: #6d8bff;
  --bx-stage-up: #5cdc8e;
  --bx-stage-down: #ff8a7a;
  --bx-stage-warn: #ffd37a;
  --bx-scrim: rgba(22, 26, 38, 0.42);
  --bx-skeleton: rgba(22, 26, 38, 0.08);
  --bx-skeleton-hi: rgba(255, 255, 255, 0.7);
  /* ---- shadows ---- */
  --bx-shadow-1: 0 1px 2px rgba(22, 26, 38, 0.06), 0 6px 20px rgba(22, 26, 38, 0.06);
  --bx-shadow-2: 0 2px 6px rgba(22, 26, 38, 0.08), 0 18px 48px rgba(22, 26, 38, 0.14);
  --bx-shadow-overlay: 0 24px 64px rgba(22, 26, 38, 0.24);
  /* ---- radius ---- */
  --bx-r-btn: 10px;
  --bx-r-input: 12px;
  --bx-r-card: 16px;
  --bx-r-sheet: 20px;
  --bx-r-pill: 999px;
  /* ---- stroke ---- */
  --bx-stroke: 1px;
  --bx-stroke-control: 1.5px;
  --bx-stroke-focus: 2px;
  /* ---- type ---- */
  --bx-font-ui:
    var(--font-figtree, 'Figtree'), 'Figtree', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --bx-font-num:
    var(--font-sora, 'Sora'), 'Sora', var(--font-figtree, 'Figtree'), 'Figtree', 'SF Pro Rounded',
    system-ui, sans-serif;
  /* ---- motion ---- */
  --bx-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --bx-ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
  --bx-ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --bx-ease-in: cubic-bezier(0.5, 0, 0.75, 0);
  --bx-ease-roll: cubic-bezier(0.34, 1.28, 0.64, 1); /* odometer overshoot */
  --bx-ease-punch: cubic-bezier(0.34, 1.56, 0.64, 1);
  --bx-ease-move: cubic-bezier(0.76, 0, 0.24, 1);
  --bx-dur-micro: 110ms;
  --bx-dur-fast: 200ms;
  --bx-dur-enter: 320ms;
  --bx-dur-hero: 520ms;
  --bx-dur-exit: 160ms;
  /* ---- texture ---- */
  --bx-grain-opacity: 0.045;
  --bx-ruling: repeating-linear-gradient(
    to bottom,
    transparent 0 27px,
    rgba(22, 26, 38, 0.06) 27px 28px
  );
  --bx-grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .6 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
  --bx-dots: radial-gradient(rgba(22, 26, 38, 0.1) 0.8px, transparent 0.9px);
  --bx-paws-opacity: 0.035;
  --bx-paws: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'><g fill='%23161A26'><path transform='translate(12 10) scale(.9)' d='M12 3.5c-1.4 0-2.5 1.6-2.5 3.5S10.6 10.5 12 10.5s2.5-1.6 2.5-3.5S13.4 3.5 12 3.5zM6 6c-1.2 0-2.2 1.4-2.2 3.1S4.8 12 6 12s2.2-1.3 2.2-2.9S7.2 6 6 6zm12 0c-1.2 0-2.2 1.4-2.2 3.1S16.8 12 18 12s2.2-1.3 2.2-2.9S19.2 6 18 6zm-6 6.5c-3.2 0-6 2.8-6 5.4 0 1.7 1.3 2.6 2.7 2.6 1.1 0 2-.7 3.3-.7s2.2.7 3.3.7c1.4 0 2.7-.9 2.7-2.6 0-2.6-2.8-5.4-6-5.4z'/><path transform='translate(50 48) rotate(-25) scale(.75)' d='M12 3.5c-1.4 0-2.5 1.6-2.5 3.5S10.6 10.5 12 10.5s2.5-1.6 2.5-3.5S13.4 3.5 12 3.5zM6 6c-1.2 0-2.2 1.4-2.2 3.1S4.8 12 6 12s2.2-1.3 2.2-2.9S7.2 6 6 6zm12 0c-1.2 0-2.2 1.4-2.2 3.1S16.8 12 18 12s2.2-1.3 2.2-2.9S19.2 6 18 6zm-6 6.5c-3.2 0-6 2.8-6 5.4 0 1.7 1.3 2.6 2.7 2.6 1.1 0 2-.7 3.3-.7s2.2.7 3.3.7c1.4 0 2.7-.9 2.7-2.6 0-2.6-2.8-5.4-6-5.4z'/><rect x='58' y='14' width='16' height='5' rx='2.5' transform='rotate(30 66 16)'/></g></svg>");
}
@media (prefers-color-scheme: dark) {
  [data-kit]:not([data-theme='light']) {
    color-scheme: dark;
    --bx-ground: #111318;
    --bx-surface: #191c25;
    --bx-inset: #20242f;
    --bx-stage: #0d0f16;
    --bx-stage-fg: #f4f5fa;
    --bx-stage-fg2: rgba(244, 245, 250, 0.62);
    --bx-stage-line: rgba(244, 245, 250, 0.12);
    --bx-ink: #f1f2f7;
    --bx-ink-2: #a7acbb;
    --bx-ink-3: #9098aa;
    --bx-ink-rgb: 241, 242, 247;
    --bx-line: rgba(241, 242, 247, 0.12);
    --bx-line-strong: rgba(241, 242, 247, 0.26);
    --bx-line-ink: #f1f2f7;
    --bx-accent: #6d8bff;
    --bx-accent-deep: #5a7af8;
    --bx-accent-soft: rgba(109, 139, 255, 0.16);
    --bx-accent-rgb: 109, 139, 255;
    --bx-on-accent: #0d1020;
    --bx-sun: #ffd84d;
    --bx-sun-deep: #ffc93a;
    --bx-sun-soft: rgba(255, 216, 77, 0.16);
    --bx-up: #3ed47a;
    --bx-up-soft: rgba(62, 212, 122, 0.14);
    --bx-up-rgb: 62, 212, 122;
    --bx-down: #ff6b5e;
    --bx-down-soft: rgba(255, 107, 94, 0.14);
    --bx-down-rgb: 255, 107, 94;
    --bx-warn: #ffc857;
    --bx-warn-soft: rgba(255, 200, 87, 0.14);
    --bx-focus: #8aa6ff;
    --bx-accent-text: #8aa6ff;
    --bx-grain-blend: screen;
    --bx-stage-accent: #6d8bff;
    --bx-stage-up: #3ed47a;
    --bx-stage-down: #ff6b5e;
    --bx-stage-warn: #ffc857;
    --bx-scrim: rgba(0, 0, 0, 0.58);
    --bx-skeleton: rgba(241, 242, 247, 0.08);
    --bx-skeleton-hi: rgba(241, 242, 247, 0.16);
    --bx-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.28);
    --bx-shadow-2: 0 2px 6px rgba(0, 0, 0, 0.35), 0 18px 48px rgba(0, 0, 0, 0.45);
    --bx-shadow-overlay: 0 24px 64px rgba(0, 0, 0, 0.6);
    --bx-grain-opacity: 0.07;
    --bx-ruling: repeating-linear-gradient(
      to bottom,
      transparent 0 27px,
      rgba(241, 242, 247, 0.07) 27px 28px
    );
    --bx-dots: radial-gradient(rgba(241, 242, 247, 0.12) 0.8px, transparent 0.9px);
    --bx-paws-opacity: 0.05;
    --bx-paws-opacity: 0.05;
  }
}
[data-kit][data-theme='dark'] {
  color-scheme: dark;
  --bx-ground: #111318;
  --bx-surface: #191c25;
  --bx-inset: #20242f;
  --bx-stage: #0d0f16;
  --bx-stage-fg: #f4f5fa;
  --bx-stage-fg2: rgba(244, 245, 250, 0.62);
  --bx-stage-line: rgba(244, 245, 250, 0.12);
  --bx-ink: #f1f2f7;
  --bx-ink-2: #a7acbb;
  --bx-ink-3: #9098aa;
  --bx-ink-rgb: 241, 242, 247;
  --bx-line: rgba(241, 242, 247, 0.12);
  --bx-line-strong: rgba(241, 242, 247, 0.26);
  --bx-line-ink: #f1f2f7;
  --bx-accent: #6d8bff;
  --bx-accent-deep: #5a7af8;
  --bx-accent-soft: rgba(109, 139, 255, 0.16);
  --bx-accent-rgb: 109, 139, 255;
  --bx-on-accent: #0d1020;
  --bx-sun: #ffd84d;
  --bx-sun-deep: #ffc93a;
  --bx-sun-soft: rgba(255, 216, 77, 0.16);
  --bx-up: #3ed47a;
  --bx-up-soft: rgba(62, 212, 122, 0.14);
  --bx-up-rgb: 62, 212, 122;
  --bx-down: #ff6b5e;
  --bx-down-soft: rgba(255, 107, 94, 0.14);
  --bx-down-rgb: 255, 107, 94;
  --bx-warn: #ffc857;
  --bx-warn-soft: rgba(255, 200, 87, 0.14);
  --bx-focus: #8aa6ff;
  --bx-accent-text: #8aa6ff;
  --bx-grain-blend: screen;
  --bx-stage-accent: #6d8bff;
  --bx-stage-up: #3ed47a;
  --bx-stage-down: #ff6b5e;
  --bx-stage-warn: #ffc857;
  --bx-scrim: rgba(0, 0, 0, 0.58);
  --bx-skeleton: rgba(241, 242, 247, 0.08);
  --bx-skeleton-hi: rgba(241, 242, 247, 0.16);
  --bx-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.28);
  --bx-shadow-2: 0 2px 6px rgba(0, 0, 0, 0.35), 0 18px 48px rgba(0, 0, 0, 0.45);
  --bx-shadow-overlay: 0 24px 64px rgba(0, 0, 0, 0.6);
  --bx-grain-opacity: 0.07;
  --bx-ruling: repeating-linear-gradient(
    to bottom,
    transparent 0 27px,
    rgba(241, 242, 247, 0.07) 27px 28px
  );
  --bx-dots: radial-gradient(rgba(241, 242, 247, 0.12) 0.8px, transparent 0.9px);
}

/* ---- reduced motion: OS query and the visible toggle behave identically ---- */
@media (prefers-reduced-motion: reduce) {
  [data-kit] {
    --bx-dur-micro: 0.01ms;
    --bx-dur-fast: 0.01ms;
    --bx-dur-enter: 0.01ms;
    --bx-dur-hero: 0.01ms;
    --bx-dur-exit: 0.01ms;
  }
  /* Transitions go to 0s (none at all), not 0.01ms: every element's default `transition-property`
     is `all`, so a non-zero duration would turn an inherited `visibility` flip into a real
     transition and an opening overlay's children would still be hidden when focus moves in.
     Animations keep 0.01ms so `animationend` still fires (one-shot replays clear on it). */
  [data-kit] *,
  [data-kit] *::before,
  [data-kit] *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}
[data-kit][data-motion='off'] {
  --bx-dur-micro: 0.01ms;
  --bx-dur-fast: 0.01ms;
  --bx-dur-enter: 0.01ms;
  --bx-dur-hero: 0.01ms;
  --bx-dur-exit: 0.01ms;
}
[data-kit][data-motion='off'] *,
[data-kit][data-motion='off'] *::before,
[data-kit][data-motion='off'] *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0s !important;
  transition-delay: 0s !important;
  scroll-behavior: auto !important;
}
/* the hold gate is information, not decoration: its fill keeps the real hold length */
[data-kit][data-motion='off'] .bk-hold[data-holding='true']::before {
  transition-duration: var(--hold-ms, 900ms) !important;
}
@media (prefers-reduced-motion: reduce) {
  .bk-hold[data-holding='true']::before {
    transition-duration: var(--hold-ms, 900ms) !important;
  }
}

/* =============================================================================
   Base
   ============================================================================= */
/* Base, scoped to the kit wrapper. Element rules use :where([data-kit]) so they carry element
   specificity only (they must lose to every .bk-* class rule, exactly as the taster's bare
   element rules did); Tailwind's layered preflight already zeroes margins/borders/paddings. */
:where([data-kit]),
:where([data-kit]) *,
:where([data-kit]) *::before,
:where([data-kit]) *::after {
  box-sizing: border-box;
}
[data-kit] {
  background: var(--bx-ground);
  color: var(--bx-ink);
  font: 400 15px/1.5 var(--bx-font-ui);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
[data-kit][data-ground='false'] {
  background: transparent;
}
:where([data-kit]) [hidden] {
  display: none !important;
}
:where([data-kit]) img {
  display: block;
  max-width: 100%;
}
:where([data-kit]) button,
:where([data-kit]) input,
:where([data-kit]) select {
  font: inherit;
  color: inherit;
}
:where([data-kit]) button {
  cursor: pointer;
}
:where([data-kit]) :is(h1, h2, h3, h4, p) {
  margin: 0;
}
:where([data-kit]) a {
  color: var(--bx-accent);
  text-decoration: none;
}
:where([data-kit]) a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
[data-kit] :focus-visible {
  outline: var(--bx-stroke-focus) solid var(--bx-focus);
  outline-offset: 2px;
  border-radius: 6px;
}
[data-kit] .bk-wall:focus-visible {
  outline-offset: -3px;
}
.bk-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
:where([data-kit]) svg.lucide {
  width: 18px;
  height: 18px;
  stroke-width: 1.9;
  flex: 0 0 auto;
}

/* =============================================================================
   Type & numbers
   ============================================================================= */
.bk-h1 {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.75rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.bk-h2 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.bk-h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.bk-h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
}
.bk-body {
  font-size: 0.9375rem;
  color: var(--bx-ink-2);
  max-width: 62ch;
}
.bk-small {
  font-size: 0.8125rem;
  color: var(--bx-ink-2);
}
.bk-micro {
  font-size: 0.75rem;
  color: var(--bx-ink-3);
  font-weight: 500;
}
.bk-ink {
  color: var(--bx-ink);
}
.bk-ink-2 {
  color: var(--bx-ink-2);
}
.bk-ink-3 {
  color: var(--bx-ink-3);
}

/* Every number goes through .bk-num. Tabular so a live value never reflows its row. */
.bk-num {
  font-family: var(--bx-font-num);
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings:
    'tnum' 1,
    'lnum' 1;
  font-weight: 500;
  letter-spacing: -0.01em;
  direction: ltr;
  unicode-bidi: isolate;
}
.bk-num--xl {
  font-size: 2.5rem;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.bk-num--lg {
  font-size: 1.75rem;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.bk-num--md {
  font-size: 1.125rem;
  line-height: 1.2;
}
.bk-num--sm {
  font-size: 0.875rem;
  line-height: 1.2;
}
.bk-num--xs {
  font-size: 0.75rem;
  line-height: 1.2;
}

/* Unit tags: REAL money is a solid tag, FANTASY is a hollow tag. Never colour alone. */
.bk-unit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 18px;
  padding: 0 6px;
  border-radius: 6px;
  font: 600 0.6875rem/1 var(--bx-font-ui);
  letter-spacing: 0.02em;
  vertical-align: middle;
  white-space: nowrap;
  margin-inline-start: 0.3em;
  position: relative;
  top: -0.08em;
}
.bk-unit--real {
  background: var(--bx-ink);
  color: var(--bx-surface);
}
.bk-unit--fantasy {
  background: transparent;
  color: var(--bx-ink-2);
  border: var(--bx-stroke-control) solid var(--bx-line-strong);
}
.bk-unit--power {
  background: transparent;
  color: var(--bx-sun-deep);
  border: var(--bx-stroke-control) solid var(--bx-sun-deep);
}
.bk-unit svg.lucide {
  width: 11px;
  height: 11px;
  stroke-width: 2.4;
}

/* Estimate marker: a word and a glyph, never only a tint. */
.bk-est {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 7px 0 6px;
  border-radius: 6px;
  background: var(--bx-warn-soft);
  color: var(--bx-warn);
  font: 600 0.6875rem/1 var(--bx-font-ui);
  letter-spacing: 0.01em;
  white-space: nowrap;
  vertical-align: middle;
}
.bk-est svg.lucide {
  width: 12px;
  height: 12px;
  stroke-width: 2.4;
}
.bk-num--est::before {
  content: '≈';
  font-weight: 400;
  margin-inline-end: 0.12em;
  color: var(--bx-ink-3);
}

/* Signed deltas: sign is always in the text. */
.bk-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.bk-delta[data-dir='up'] {
  color: var(--bx-up);
}
.bk-delta[data-dir='down'] {
  color: var(--bx-down);
}
.bk-delta[data-dir='flat'] {
  color: var(--bx-ink-3);
}
.bk-delta svg.lucide {
  width: 14px;
  height: 14px;
  stroke-width: 2.6;
}

/* P&L pill */
.bk-pnl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px 0 8px;
  border-radius: var(--bx-r-pill);
  font-weight: 600;
  white-space: nowrap;
  transition:
    background var(--bx-dur-fast),
    color var(--bx-dur-fast);
}
.bk-pnl[data-dir='up'] {
  background: var(--bx-up-soft);
  color: var(--bx-up);
}
.bk-pnl[data-dir='down'] {
  background: var(--bx-down-soft);
  color: var(--bx-down);
}
.bk-pnl[data-dir='flat'] {
  background: var(--bx-inset);
  color: var(--bx-ink-2);
}
.bk-pnl svg.lucide {
  width: 14px;
  height: 14px;
  stroke-width: 2.6;
}
.bk-pnl--lg {
  height: 36px;
  padding: 0 14px 0 10px;
  font-size: 1.0625rem;
}

/* Price flash: a bloom behind the number in the direction of the tick */
.bk-flash {
  position: relative;
  display: inline-block;
  border-radius: 6px;
  padding: 0 0.12em;
  margin: 0 -0.12em;
}

/* Odometer: each digit is a strip of 0-9 rolled by --d */
.bk-odo {
  display: inline-flex;
  align-items: baseline;
  overflow: hidden;
  line-height: 1;
  vertical-align: bottom;
  box-sizing: content-box;
}
.bk-odo__col,
.bk-odo__sep {
  flex: 0 0 auto;
}
.bk-odo__col {
  display: inline-block;
  height: 1em;
  overflow: hidden;
  position: relative;
}
.bk-odo__strip {
  display: flex;
  flex-direction: column;
  transform: translateY(calc(var(--d, 0) * -1em));
  transition: transform var(--bx-dur-hero) var(--bx-ease-roll);
  will-change: transform;
}
.bk-odo__strip span {
  display: block;
  height: 1em;
  line-height: 1;
}
.bk-odo__sep {
  display: inline-block;
  height: 1em;
  line-height: 1;
}
.bk-odo__col[data-new='true'] {
  animation: bk-odo-in var(--bx-dur-enter) var(--bx-ease-out);
}
@keyframes bk-odo-in {
  from {
    opacity: 0;
    transform: translateX(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* =============================================================================
   Layout & chrome (taster only, reusable)
   ============================================================================= */
.bk-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bx-surface) 84%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: var(--bx-stroke) solid var(--bx-line);
}
.bk-topbar__in {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.bk-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--bx-ink);
  font-size: 1.0625rem;
  white-space: nowrap;
}
.bk-wordmark:hover {
  text-decoration: none;
}
.bk-wordmark img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.bk-topbar__nav {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin: 0 auto;
  min-width: 0;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    #000 12px,
    #000 calc(100% - 12px),
    transparent
  );
  mask-image: linear-gradient(
    to right,
    transparent,
    #000 12px,
    #000 calc(100% - 12px),
    transparent
  );
  padding: 0 12px;
}
.bk-topbar__nav::-webkit-scrollbar {
  display: none;
}
@media (max-width: 699px) {
  .bk-topbar__nav {
    display: none;
  }
}
.bk-topbar__nav a {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--bx-ink-2);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}
.bk-topbar__nav a:hover {
  color: var(--bx-ink);
  background: var(--bx-inset);
  text-decoration: none;
}
.bk-topbar__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
  flex: 0 0 auto;
}
.bk-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 16px 96px;
  position: relative;
}
@media (min-width: 900px) {
  .bk-page {
    padding: 36px 24px 120px;
  }
}
/* phone frame: the frame becomes the scroll container, so fixed overlays are frame-relative */

.bk-section {
  margin-top: 56px;
  scroll-margin-top: 72px;
}
.bk-section__head {
  display: grid;
  gap: 6px;
  margin-bottom: 20px;
  max-width: 70ch;
}
.bk-section__kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--bx-accent);
}
.bk-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  align-items: start;
}
.bk-grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}
.bk-demo[data-in='true'] {
  animation: bk-drop-in 380ms var(--bx-ease-out) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes bk-drop-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.bk-demo {
  background: var(--bx-surface);
  border: var(--bx-stroke) solid var(--bx-line);
  border-radius: var(--bx-r-card);
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-content: start;
  min-width: 0;
}
.bk-demo__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bx-ink);
  flex-wrap: wrap;
  row-gap: 6px;
}
.bk-demo__label .bk-tag {
  margin-inline-start: auto;
}
.bk-demo__label > .bk-btn {
  margin-inline-start: auto;
}
.bk-demo__label .bk-tag ~ .bk-btn {
  margin-inline-start: 0;
}
.bk-demo__note {
  font-size: 0.8125rem;
  color: var(--bx-ink-3);
}
.bk-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.bk-row--between {
  justify-content: space-between;
}
.bk-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}
.bk-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  background: var(--bx-inset);
  color: var(--bx-ink-2);
}
.bk-tag--example {
  background: var(--bx-sun-soft);
  color: var(--bx-sun-deep);
}
.bk-tag--proposal {
  background: var(--bx-accent-soft);
  color: var(--bx-accent-text);
}
.bk-code {
  font:
    500 0.75rem/1.5 ui-monospace,
    'SF Mono',
    Menlo,
    Consolas,
    monospace;
  background: var(--bx-inset);
  border-radius: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  color: var(--bx-ink-2);
  white-space: pre;
}
.bk-kbd {
  display: inline-block;
  font: 600 0.6875rem/1 var(--bx-font-num);
  padding: 3px 5px;
  border-radius: 5px;
  border: 1px solid var(--bx-line-strong);
  border-bottom-width: 2px;
  color: var(--bx-ink-2);
}

/* Hero */
.bk-hero {
  display: grid;
  gap: 24px;
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .bk-hero {
    grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
    gap: 40px;
  }
}
.bk-hero__copy {
  display: grid;
  gap: 10px;
  align-content: center;
}
.bk-hero__card {
  position: relative;
  background: var(--bx-surface);
  border: var(--bx-stroke) solid var(--bx-line);
  border-radius: var(--bx-r-card);
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  box-shadow: var(--bx-shadow-1);
  overflow: hidden;
}
.bk-hero__card > * {
  min-width: 0;
}
.bk-hero__card::before,
.bk-card--board::before {
  content: '';
  position: absolute;
  inset: -40px;
  background: var(--bx-paws);
  background-size: 84px 84px;
  opacity: var(--bx-paws-opacity);
  pointer-events: none;
  animation: bk-drift 80s linear infinite;
}
.bk-card--board {
  position: relative;
  overflow: hidden;
}
.bk-card--board > * {
  position: relative;
}
@keyframes bk-drift {
  to {
    transform: translate(84px, 84px);
  }
}
.bk-hero__card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bx-grain);
  opacity: var(--bx-grain-opacity);
  pointer-events: none;
  mix-blend-mode: var(--bx-grain-blend);
}
.bk-hero__bork {
  position: absolute;
  right: 12px;
  top: -4px;
  width: 84px;
  height: 84px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(22, 26, 38, 0.18));
}
.bk-hero__firm {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-inline-end: 88px;
}
@media (max-width: 599px) {
  .bk-hero__firm {
    padding-inline-end: 0;
  }
  .bk-hero__bork {
    width: 64px;
    height: 64px;
    right: 10px;
    top: 60px;
  }
}

/* =============================================================================
   Surfaces
   ============================================================================= */
.bk-card {
  background: var(--bx-surface);
  border: var(--bx-stroke) solid var(--bx-line);
  border-radius: var(--bx-r-card);
  padding: 16px;
  min-width: 0;
}
.bk-card--hover {
  transition:
    border-color var(--bx-dur-fast),
    box-shadow var(--bx-dur-fast);
}
.bk-card--hover:hover {
  border-color: var(--bx-line-strong);
  box-shadow: var(--bx-shadow-1);
}
.bk-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  margin-bottom: 12px;
}
.bk-card__title {
  font-weight: 600;
  font-size: 0.9375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.bk-card__spacer {
  flex: 1 1 auto;
}
.bk-well {
  background: var(--bx-inset);
  border-radius: 12px;
  padding: 12px 14px;
}
.bk-divider {
  height: var(--bx-stroke);
  background: var(--bx-line);
  border: 0;
  margin: 0;
}
.bk-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
}
.bk-stat {
  background: var(--bx-inset);
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 74px;
  display: grid;
  align-content: space-between;
  gap: 6px;
  min-width: 0;
  container-type: inline-size;
}
.bk-stat--wide {
  grid-column: 1 / -1;
}
.bk-stat__label {
  font-size: 0.75rem;
  color: var(--bx-ink-3);
  font-weight: 500;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
}
.bk-stat__value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}
.bk-stat__value .bk-num {
  white-space: nowrap;
  max-width: 100%;
}
/* a value never truncates: the size steps down with the tile, and a 9-digit value takes a --wide tile */
.bk-stat__value .bk-num--lg {
  font-size: clamp(1.125rem, 12cqw, 1.75rem);
}

/* =============================================================================
   Buttons
   ============================================================================= */
.bk-btn {
  --face: var(--bx-surface);
  --face-hover: var(--bx-inset);
  --edge: var(--bx-line-strong);
  --fg: var(--bx-ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  min-width: 6.5em;
  max-width: 100%;
  border-radius: var(--bx-r-btn);
  border: var(--bx-stroke-control) solid var(--edge);
  background: var(--face);
  color: var(--fg);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  vertical-align: middle;
  transition:
    background var(--bx-dur-micro),
    border-color var(--bx-dur-micro),
    color var(--bx-dur-micro),
    transform var(--bx-dur-micro),
    box-shadow var(--bx-dur-micro),
    opacity var(--bx-dur-fast);
}
.bk-btn:hover {
  background: var(--face-hover);
}
.bk-btn__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.bk-btn svg.lucide {
  width: 17px;
  height: 17px;
}
/* Shiny + pressed: the gloss and the lip are derived from the CURRENT face (--f), so the lip is
   always darker than the body at rest, on hover and in dark mode. Pressed = lip collapses, face
   drops 2px, an inset shadow reads as "pushed in", the gloss goes. Release punches back. */
.bk-btn {
  --f: var(--face);
  --gloss: 16%;
  --lip: 24%;
  --lip-h: 3px;
  background-color: var(--f);
  background-image: linear-gradient(
    180deg,
    color-mix(in srgb, var(--f), #fff var(--gloss)) 0%,
    color-mix(in srgb, var(--f), #fff calc(var(--gloss) / 4)) 46%,
    var(--f) 100%
  );
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--f), #fff calc(var(--gloss) * 1.6)),
    inset 0 calc(var(--lip-h) * -1) 0 color-mix(in srgb, var(--f), #000 var(--lip));
}
.bk-btn:hover,
.bk-btn.is-hover {
  --f: var(--face-hover);
  background: none;
  background-color: var(--f);
  background-image: linear-gradient(
    180deg,
    color-mix(in srgb, var(--f), #fff var(--gloss)) 0%,
    color-mix(in srgb, var(--f), #fff calc(var(--gloss) / 4)) 46%,
    var(--f) 100%
  );
}
.bk-btn--primary {
  --face: var(--bx-accent);
  --face-hover: var(--bx-accent-deep);
  --edge: var(--bx-accent-deep);
  --fg: var(--bx-on-accent);
}
.bk-btn--secondary,
.bk-btn--danger {
  --gloss: 6%;
  --lip: 10%;
  --lip-h: 2px;
}
.bk-btn--secondary:hover,
.bk-btn--secondary.is-hover,
.bk-btn--danger:hover,
.bk-btn--danger.is-hover {
  --f: var(--face-hover);
}
.bk-btn--claim {
  --gloss: 14%;
  --lip: 40%;
}
.bk-btn--ghost,
.bk-btn--ghost:hover,
.bk-btn--ghost.is-hover {
  background-image: none;
  box-shadow: none;
}
.bk-btn:active,
.bk-btn[data-state='pressed'],
.bk-btn.is-pressed {
  transform: scale(0.975);
  background-image: none;
  box-shadow:
    inset 0 2px 4px color-mix(in srgb, var(--f), #000 34%),
    inset 0 0 0 1px color-mix(in srgb, var(--f), #000 12%);
}
.bk-btn--ghost:active,
.bk-btn--ghost.is-pressed {
  box-shadow: inset 0 1px 3px rgba(var(--bx-ink-rgb), 0.12);
}
.bk-btn[data-state='busy'],
.bk-btn[data-state='done'],
.bk-btn[data-state='success'],
.bk-btn[data-reason],
.bk-btn:disabled {
  background-image: none;
  box-shadow: none;
}
.bk-btn[data-punch] {
  animation: bk-punch 260ms var(--bx-ease-punch);
}
@keyframes bk-punch {
  0% {
    transform: scale(0.975);
  }
  55% {
    transform: scale(1.03);
  }
  100% {
    transform: scale(1);
  }
}
.bk-btn--primary:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 2px 8px rgba(var(--bx-accent-rgb), 0.35);
}
.bk-btn--secondary {
  --face: var(--bx-surface);
  --face-hover: var(--bx-inset);
  --edge: var(--bx-line-strong);
}
.bk-btn--ghost {
  --face: transparent;
  --face-hover: var(--bx-inset);
  --edge: transparent;
}
.bk-btn--danger {
  --face: var(--bx-surface);
  --face-hover: var(--bx-down-soft);
  --edge: var(--bx-down);
  --fg: var(--bx-down);
}
.bk-btn--danger[data-solid] {
  --face: var(--bx-down);
  --face-hover: color-mix(in srgb, var(--bx-down) 85%, #000);
  --edge: transparent;
  --fg: #fff;
}
/* Claim: real money moves. Solid ink, like the real-money unit tag. */
.bk-btn--claim {
  --face: var(--bx-ink);
  --face-hover: color-mix(in srgb, var(--bx-ink) 86%, var(--bx-surface));
  --edge: var(--bx-ink);
  --fg: var(--bx-surface);
}
.bk-btn--claim .bk-btn__amt {
  font-family: var(--bx-font-num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  font-weight: 600;
}
.bk-btn--sm {
  height: 36px;
  padding: 0 14px;
  font-size: 0.875rem;
  min-width: 5em;
  border-radius: 9px;
}
.bk-btn--sm svg.lucide {
  width: 15px;
  height: 15px;
}
.bk-btn--lg {
  height: 52px;
  padding: 0 22px;
  font-size: 1rem;
  min-width: 8em;
  border-radius: 12px;
}
.bk-btn--block {
  width: 100%;
}
.bk-btn--icon {
  width: 44px;
  min-width: 44px;
  padding: 0;
}
.bk-btn--icon.bk-btn--sm {
  width: 36px;
  min-width: 36px;
}
.bk-btn--pill {
  border-radius: var(--bx-r-pill);
}
/* busy: spinner replaces the leading icon; size locked by JS for the run */
.bk-btn__spin {
  display: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: bk-spin 0.8s linear infinite;
}
.bk-btn[data-state='busy'] {
  pointer-events: none;
}
.bk-btn[data-state='busy'] .bk-btn__spin {
  display: inline-block;
}
.bk-btn[data-state='busy'] > svg.lucide:first-child,
.bk-btn[data-state='busy'] .bk-btn__spin + svg.lucide {
  display: none;
}
.bk-btn[data-state='success'] {
  --face: var(--bx-up);
  --face-hover: var(--bx-up);
  --edge: var(--bx-up);
  --fg: #fff;
  animation: bk-settle var(--bx-dur-enter) var(--bx-ease-spring);
}
.bk-btn[data-state='done'] {
  --face: var(--bx-up-soft);
  --face-hover: var(--bx-up-soft);
  --edge: var(--bx-up);
  --fg: var(--bx-up);
  pointer-events: none;
}
.bk-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.bk-btn[data-reason] {
  --face: repeating-linear-gradient(135deg, var(--bx-inset) 0 6px, var(--bx-surface) 6px 12px);
  --edge: var(--bx-line);
  --fg: var(--bx-ink-3);
  cursor: not-allowed;
  pointer-events: none;
}
.bk-btn-reason {
  display: grid;
  gap: 6px;
  max-width: 100%;
}
.bk-btn-reason__text {
  font-size: 0.75rem;
  color: var(--bx-ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@keyframes bk-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes bk-settle {
  0% {
    transform: scale(0.96);
  }
  60% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}
/* hold to confirm */
.bk-hold {
  --p: 0;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.bk-hold::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.22);
  transform-origin: left;
  transform: scaleX(var(--p));
}
.bk-hold[data-holding='true']::before {
  transition: transform var(--hold-ms, 900ms) linear;
  transform: scaleX(1);
}
.bk-hold[data-holding='false']::before {
  transition: transform var(--bx-dur-exit) var(--bx-ease-in);
  transform: scaleX(0);
}
.bk-hold__hint {
  font-weight: 500;
  opacity: 0.85;
  font-size: 0.8125rem;
}
.bk-hold[data-armed='true'] {
  box-shadow: 0 0 0 3px rgba(var(--bx-accent-rgb), 0.28);
}
.bk-hold[data-reason] {
  --face: repeating-linear-gradient(135deg, var(--bx-inset) 0 6px, var(--bx-surface) 6px 12px);
  --edge: var(--bx-line);
  --fg: var(--bx-ink-3);
}
/* settle ring: one restrained ripple on confirm */
.bk-ring {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  border: 2px solid var(--bx-up);
  opacity: 0;
  pointer-events: none;
}
.bk-ring[data-go='true'] {
  animation: bk-ring 0.6s var(--bx-ease-out);
}
@keyframes bk-ring {
  0% {
    opacity: 0.9;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(12);
  }
}

/* =============================================================================
   Chips, pills, tabs, segments
   ============================================================================= */
.bk-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--bx-r-pill);
  background: var(--bx-inset);
  color: var(--bx-ink-2);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  max-width: 14em;
  border: var(--bx-stroke-control) solid transparent;
}
.bk-chip > span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.bk-chip svg.lucide {
  width: 14px;
  height: 14px;
}
.bk-chip--outline {
  background: transparent;
  border-color: var(--bx-line-strong);
}
.bk-chip--accent {
  background: var(--bx-accent-soft);
  color: var(--bx-accent-text);
}
.bk-chip--up {
  background: var(--bx-up-soft);
  color: var(--bx-up);
}
.bk-chip--down {
  background: var(--bx-down-soft);
  color: var(--bx-down);
}
.bk-chip--sun {
  background: var(--bx-sun-soft);
  color: var(--bx-sun-deep);
}
.bk-chip--kind {
  font-family: var(--bx-font-num);
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 0.75rem;
}
/* tappable chip: 44px hit box via padding-box, 32px visual */
button.bk-chip {
  cursor: pointer;
  height: 34px;
  min-height: 34px;
  transition:
    background var(--bx-dur-micro),
    border-color var(--bx-dur-micro),
    color var(--bx-dur-micro),
    transform var(--bx-dur-micro);
}
button.bk-chip:hover {
  border-color: var(--bx-line-strong);
}
button.bk-chip:active,
button.bk-chip.is-pressed {
  transform: scale(0.97);
}
button.bk-chip[aria-pressed='true'] {
  background: var(--bx-ink);
  color: var(--bx-surface);
  border-color: var(--bx-ink);
  box-shadow:
    0 0 0 2px var(--bx-surface),
    0 0 0 3.5px rgba(var(--bx-ink-rgb), 0.28);
}
button.bk-chip[data-pop],
.bk-asset[data-pop] {
  animation: bk-pop 260ms var(--bx-ease-punch);
}
@keyframes bk-pop {
  0% {
    transform: scale(0.94);
  }
  60% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}
.bk-chip--pick {
  padding-inline-start: 6px;
}
.bk-chip--pick .bk-glyph {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 0.625rem/1 var(--bx-font-num);
  background: var(--bx-surface);
  color: var(--bx-ink);
}
button.bk-chip[aria-pressed='true'] .bk-glyph {
  background: var(--bx-surface);
  color: var(--bx-ink);
}
/* freshness */
.bk-fresh {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 10px 0 8px;
  border-radius: var(--bx-r-pill);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  border: var(--bx-stroke-control) solid transparent;
}
.bk-fresh::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.bk-fresh[data-state='live'] {
  background: var(--bx-up-soft);
  color: var(--bx-up);
}
.bk-fresh[data-state='live']::before {
  animation: bk-pulse 2s ease-in-out infinite;
}
.bk-fresh[data-state='stale'] {
  background: var(--bx-warn-soft);
  color: var(--bx-warn);
}
.bk-fresh[data-state='closed'] {
  background: var(--bx-inset);
  color: var(--bx-ink-2);
}
.bk-fresh[data-state='closed']::before {
  background: transparent;
  border: 1.5px solid currentColor;
  box-sizing: border-box;
}
.bk-fresh--on-stage[data-state='live'] {
  background: rgba(244, 245, 250, 0.08);
  color: var(--bx-stage-up);
}
.bk-fresh--on-stage[data-state='stale'] {
  background: rgba(244, 245, 250, 0.08);
  color: var(--bx-stage-warn);
}
.bk-stage .bk-delta[data-dir='up'] {
  color: var(--bx-stage-up);
}
.bk-stage .bk-delta[data-dir='down'] {
  color: var(--bx-stage-down);
}
.bk-stage .bk-delta[data-dir='flat'] {
  color: var(--bx-stage-fg2);
}
.bk-chart__grad--up stop {
  stop-color: var(--bx-stage-accent);
}
.bk-chart__grad--down stop {
  stop-color: var(--bx-stage-down);
}
.bk-fresh--on-stage[data-state='closed'] {
  background: rgba(244, 245, 250, 0.12);
  color: var(--bx-stage-fg2);
}
@keyframes bk-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(var(--bx-up-rgb), 0.5);
  }
  60% {
    box-shadow: 0 0 0 5px rgba(var(--bx-up-rgb), 0);
  }
}
/* segmented control: one sliding indicator, injected by mountIndicator */
.bk-seg {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 2px;
  padding: 3px;
  border-radius: 11px;
  background: var(--bx-inset);
  isolation: isolate;
}
.bk-seg__btn {
  position: relative;
  z-index: 1;
  height: 38px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  color: var(--bx-ink-2);
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: color var(--bx-dur-fast);
}
.bk-seg__btn[aria-pressed='true'] {
  color: var(--bx-ink);
}
.bk-seg__btn svg.lucide {
  width: 15px;
  height: 15px;
}
.bk-seg__btn > span {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.bk-seg__ind {
  pointer-events: none;
  position: absolute;
  top: 3px;
  height: calc(100% - 6px);
  left: 0;
  width: 0;
  border-radius: 8px;
  background: var(--bx-surface);
  box-shadow:
    0 1px 2px rgba(22, 26, 38, 0.12),
    0 0 0 var(--bx-stroke) var(--bx-line);
  transition:
    left 260ms var(--bx-ease-out),
    width 260ms var(--bx-ease-out);
  z-index: 0;
}
.bk-seg--sm .bk-seg__btn {
  height: 30px;
  font-size: 0.8125rem;
  padding: 0 10px;
}
.bk-seg--on-stage {
  background: rgba(244, 245, 250, 0.08);
}
.bk-seg--on-stage .bk-seg__btn {
  color: var(--bx-stage-fg2);
}
.bk-seg--on-stage .bk-seg__btn[aria-pressed='true'] {
  color: var(--bx-stage-fg);
}
.bk-seg--on-stage .bk-seg__ind {
  background: rgba(244, 245, 250, 0.14);
  box-shadow: none;
}
/* tabs: underline indicator, one element travels */
.bk-tabs {
  position: relative;
  display: flex;
  gap: 4px;
  border-bottom: var(--bx-stroke) solid var(--bx-line);
  overflow-x: auto;
  scrollbar-width: none;
}
.bk-tabs::-webkit-scrollbar {
  display: none;
}
.bk-tab {
  height: 44px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--bx-ink-2);
  font-weight: 600;
  font-size: 0.9375rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px 8px 0 0;
  transition: color var(--bx-dur-fast);
  flex: 0 0 auto;
}
.bk-tab:hover {
  color: var(--bx-ink);
}
.bk-tab[aria-selected='true'] {
  color: var(--bx-ink);
}
.bk-tabs__ind {
  pointer-events: none;
  position: absolute;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--bx-accent);
  left: 0;
  width: 0;
  transition:
    left 260ms var(--bx-ease-out),
    width 260ms var(--bx-ease-out);
}
.bk-tab .bk-count {
  font-family: var(--bx-font-num);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bx-inset);
  color: var(--bx-ink-2);
}

/* =============================================================================
   Inputs
   ============================================================================= */
.bk-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.bk-field__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bx-ink-2);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.bk-field__hint {
  font-size: 0.75rem;
  color: var(--bx-ink-3);
}
.bk-field__hint--error {
  color: var(--bx-down);
}
.bk-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 12px;
  border-radius: var(--bx-r-input);
  border: var(--bx-stroke-control) solid var(--bx-line-strong);
  background: var(--bx-surface);
  transition:
    border-color var(--bx-dur-fast),
    box-shadow var(--bx-dur-fast);
  min-width: 0;
}
.bk-input-wrap:focus-within {
  border-color: var(--bx-accent);
  box-shadow: 0 0 0 3px rgba(var(--bx-accent-rgb), 0.18);
}
.bk-input-wrap:has(.bk-input[aria-invalid='true']) {
  border-color: var(--bx-down);
}
.bk-input-wrap svg.lucide {
  color: var(--bx-ink-3);
  width: 16px;
  height: 16px;
}
.bk-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  height: 100%;
  font-size: 0.9375rem;
}
.bk-input--num {
  font-family: var(--bx-font-num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  font-weight: 500;
  font-size: 1.0625rem;
}
.bk-input::placeholder {
  color: var(--bx-ink-3);
}
.bk-input-wrap__unit {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--bx-ink-3);
  flex: 0 0 auto;
}
/* amount stepper */
.bk-amount {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.bk-amount__quick {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 6px;
}
.bk-quick {
  height: 40px;
  min-width: 44px;
  border-radius: 10px;
  border: var(--bx-stroke-control) solid var(--bx-line-strong);
  background: var(--bx-surface);
  color: var(--bx-ink-2);
  font: 600 0.8125rem/1 var(--bx-font-num);
  font-variant-numeric: tabular-nums;
  transition:
    background var(--bx-dur-micro),
    border-color var(--bx-dur-micro),
    color var(--bx-dur-micro),
    transform var(--bx-dur-micro);
  white-space: nowrap;
  padding: 0 4px;
}
.bk-quick > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bk-quick:hover {
  background: var(--bx-inset);
  color: var(--bx-ink);
}
.bk-quick:active,
.bk-quick.is-pressed {
  transform: scale(0.96);
}
.bk-quick[aria-pressed='true'] {
  background: var(--bx-ink);
  color: var(--bx-surface);
  border-color: var(--bx-ink);
}
/* slider */
.bk-slider {
  --pct: 0%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  background: transparent;
  margin: 0;
  cursor: pointer;
  min-width: 0;
}
.bk-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--bx-accent) var(--pct), var(--bx-inset) var(--pct));
}
.bk-slider::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: var(--bx-inset);
}
.bk-slider::-moz-range-progress {
  height: 6px;
  border-radius: 3px;
  background: var(--bx-accent);
}
.bk-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -8px;
  border-radius: 50%;
  background: var(--bx-surface);
  border: var(--bx-stroke-control) solid var(--bx-accent);
  box-shadow: 0 1px 3px rgba(22, 26, 38, 0.18);
  transition: transform var(--bx-dur-micro);
}
.bk-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bx-surface);
  border: var(--bx-stroke-control) solid var(--bx-accent);
  box-shadow: 0 1px 3px rgba(22, 26, 38, 0.18);
}
.bk-slider:active::-webkit-slider-thumb {
  transform: scale(1.12);
}
.bk-slider--sun::-webkit-slider-runnable-track {
  background: linear-gradient(to right, var(--bx-sun) var(--pct), var(--bx-inset) var(--pct));
}
.bk-slider--sun::-webkit-slider-thumb {
  border-color: var(--bx-sun-deep);
}
/* allocation rows */
.bk-alloc {
  display: grid;
  gap: 4px;
}
.bk-alloc__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4.2em;
  align-items: center;
  gap: 12px;
}
.bk-alloc__row .bk-slider {
  grid-column: 1;
}
.bk-alloc__head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  grid-column: 1 / -1;
  margin-bottom: -6px;
}
.bk-alloc__name {
  font-weight: 600;
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.bk-alloc__pct {
  text-align: right;
  font-size: 1rem;
}
.bk-alloc__remain {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bx-inset);
  font-size: 0.8125rem;
  color: var(--bx-ink-2);
  transition:
    background var(--bx-dur-fast),
    color var(--bx-dur-fast);
}
.bk-alloc__remain[data-ok='true'] {
  background: var(--bx-up-soft);
  color: var(--bx-up);
}
.bk-alloc__remain[data-ok='false'][data-over='true'] {
  background: var(--bx-down-soft);
  color: var(--bx-down);
}
.bk-alloc__bar {
  height: 6px;
  border-radius: 3px;
  background: var(--bx-inset);
  overflow: hidden;
  display: flex;
}
.bk-alloc__bar i {
  display: block;
  height: 100%;
  transition: flex-basis var(--bx-dur-hero) var(--bx-ease-move);
  flex: 0 0 var(--w, 0%);
  background: var(--c, var(--bx-accent));
}
/* switch */
.bk-switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  cursor: pointer;
}
.bk-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.bk-switch__track {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: var(--bx-line-strong);
  transition: background var(--bx-dur-fast);
  flex: 0 0 auto;
}
.bk-switch__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(22, 26, 38, 0.25);
  transition: translate var(--bx-dur-fast) var(--bx-ease-spring);
}
.bk-switch input:checked + .bk-switch__track {
  background: var(--bx-accent);
}
.bk-switch input:checked + .bk-switch__track::after {
  translate: 18px 0;
}
.bk-switch input:focus-visible + .bk-switch__track {
  outline: var(--bx-stroke-focus) solid var(--bx-focus);
  outline-offset: 2px;
}
.bk-switch__label {
  font-weight: 500;
  font-size: 0.9375rem;
}
/* tooltip */
.bk-tip-wrap {
  position: relative;
  display: inline-flex;
}
.bk-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translate(-50%, 4px);
  background: var(--bx-ink);
  color: var(--bx-surface);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 9px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity var(--bx-dur-fast),
    transform var(--bx-dur-fast) var(--bx-ease-out);
  z-index: 5;
  max-width: 240px;
}
.bk-tip-wrap:hover .bk-tip,
.bk-tip-wrap:focus-within .bk-tip {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* =============================================================================
   Trading primitives
   ============================================================================= */
/* Chart stage: the one dark surface. Grain lives here. */
.bk-stage {
  position: relative;
  background: var(--bx-stage);
  color: var(--bx-stage-fg);
  border-radius: var(--bx-r-card);
  padding: 16px;
  overflow: hidden;
  isolation: isolate;
  min-width: 0;
}
.bk-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bx-grain);
  opacity: 0.06;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
}
.bk-stage > * {
  position: relative;
  z-index: 1;
}
.bk-stage__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}
.bk-stage__asset {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.bk-stage__ticker {
  font: 600 0.8125rem/1 var(--bx-font-num);
  letter-spacing: 0.04em;
  color: var(--bx-stage-fg2);
}
.bk-stage__price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.bk-stage__tools {
  margin-inline-start: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.bk-chart {
  position: relative;
  margin-top: 10px;
  height: 220px;
  outline: none;
  border-radius: 10px;
  touch-action: pan-y;
}
.bk-chart:focus-visible {
  outline: var(--bx-stroke-focus) solid var(--bx-focus);
  outline-offset: 4px;
}
.bk-chart > svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.bk-chart__line {
  fill: none;
  stroke: var(--bx-stage-accent);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.bk-chart[data-dir='down'] .bk-chart__line {
  stroke: var(--bx-stage-down);
}
.bk-chart__area {
  fill: url(#bkAreaUp);
  opacity: 0.9;
}
.bk-chart[data-dir='down'] .bk-chart__area {
  fill: url(#bkAreaDown);
}
.bk-chart__grid line {
  stroke: var(--bx-stage-line);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}
.bk-chart__cross {
  opacity: 0;
  transition: opacity var(--bx-dur-fast);
  pointer-events: none;
}
.bk-chart[data-scrub='true'] .bk-chart__cross {
  opacity: 1;
}
.bk-chart__cross line {
  stroke: rgba(244, 245, 250, 0.5);
  stroke-width: 1;
}
.bk-chart__dot {
  fill: var(--bx-stage);
  stroke: var(--bx-stage-accent);
  stroke-width: 2;
  r: 4;
}
.bk-chart[data-dir='down'] .bk-chart__dot {
  stroke: var(--bx-stage-down);
}
.bk-chart__pill {
  position: absolute;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--bx-stage-fg);
  color: var(--bx-stage);
  font: 600 0.6875rem/1 var(--bx-font-num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--bx-dur-fast);
}
.bk-chart[data-scrub='true'] .bk-chart__pill {
  opacity: 1;
}
.bk-chart__pill--time {
  bottom: -22px;
  transform: translateX(-50%);
}
.bk-chart__pill--price {
  right: -4px;
  transform: translateY(-50%);
}
.bk-chart__last {
  position: absolute;
  right: -4px;
  transform: translateY(-50%);
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--bx-stage-accent);
  color: #0d1020;
  font: 600 0.6875rem/1 var(--bx-font-num);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
  transition: top var(--bx-dur-enter) var(--bx-ease-out);
}
.bk-chart[data-dir='down'] .bk-chart__last {
  background: var(--bx-stage-down);
  color: #0d1020;
}
.bk-chart__last::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  width: 10px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.bk-chart__tick {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bx-stage-accent);
  transform: translate(-50%, -50%);
}
.bk-chart[data-live='true'] .bk-chart__tick {
  animation: bk-tick 2s var(--bx-ease-out) infinite;
}
.bk-chart[data-dir='down'] .bk-chart__tick {
  background: var(--bx-stage-down);
}
@keyframes bk-tick {
  0% {
    box-shadow: 0 0 0 0 rgba(244, 245, 250, 0.45);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(244, 245, 250, 0);
  }
}
.bk-chart__marker {
  cursor: pointer;
}
.bk-chart__marker circle {
  fill: var(--bx-stage);
  stroke-width: 2;
  transition: r var(--bx-dur-fast) var(--bx-ease-spring);
}
.bk-chart__marker[data-side='buy'] circle {
  stroke: var(--bx-stage-up);
}
.bk-chart__marker[data-side='sell'] circle {
  stroke: var(--bx-stage-down);
}
.bk-chart__marker:focus-visible {
  outline: none;
}
.bk-chart__marker:focus-visible circle {
  stroke-width: 3;
  r: 7;
}
.bk-chart__marker:hover circle,
.bk-chart__marker:focus circle {
  r: 7;
}
.bk-chart__marker text {
  font: 700 8px var(--bx-font-num);
  fill: var(--bx-stage-fg);
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}
.bk-chart__closed {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(13, 15, 22, 0.4);
  backdrop-filter: blur(1px);
  border-radius: 10px;
}
.bk-chart__closed svg.lucide {
  width: 16px;
  height: 16px;
}
.bk-chart__closed span {
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(244, 245, 250, 0.1);
  border: 1px solid rgba(244, 245, 250, 0.14);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bx-stage-fg);
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.bk-stage__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 28px;
  flex-wrap: wrap;
  color: var(--bx-stage-fg2);
  font-size: 0.75rem;
}
/* sparkline */
.bk-spark {
  display: block;
  width: 100%;
  height: 36px;
  overflow: visible;
}
.bk-spark path {
  fill: none;
  stroke: var(--bx-ink-3);
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.bk-spark[data-dir='up'] path {
  stroke: var(--bx-accent);
}
.bk-spark[data-dir='down'] path {
  stroke: var(--bx-down);
}
.bk-spark .bk-spark__area {
  stroke: none;
  fill: currentColor;
  opacity: 0.09;
}
.bk-spark[data-dir='up'] .bk-spark__area {
  fill: var(--bx-accent);
}
.bk-spark[data-dir='down'] .bk-spark__area {
  fill: var(--bx-down);
}
.bk-spark--draw path {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: bk-draw 1.1s var(--bx-ease-out) forwards;
}
@keyframes bk-draw {
  to {
    stroke-dashoffset: 0;
  }
}
/* donut */
.bk-donut {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}
.bk-donut svg {
  width: 112px;
  height: 112px;
  transform: rotate(-90deg);
}
.bk-donut circle {
  fill: none;
  stroke-width: 12;
  transition:
    stroke-dasharray var(--bx-dur-hero) var(--bx-ease-move),
    stroke-dashoffset var(--bx-dur-hero) var(--bx-ease-move);
}
.bk-donut__track {
  stroke: var(--bx-inset);
}
.bk-donut__legend {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.bk-donut__item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  min-width: 0;
}
.bk-donut__item i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--c);
}
.bk-donut__item b {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bk-donut__center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  line-height: 1;
  gap: 3px;
}
/* Power meter */
.bk-power {
  display: grid;
  gap: 8px;
}
.bk-power__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.bk-power__track {
  height: 10px;
  border-radius: 5px;
  background: var(--bx-inset);
  overflow: hidden;
  position: relative;
}
.bk-power__fill {
  height: 100%;
  width: var(--w, 0%);
  border-radius: 5px;
  background: linear-gradient(90deg, var(--bx-sun-deep), var(--bx-sun));
  transition: width var(--bx-dur-hero) var(--bx-ease-out);
  position: relative;
}
.bk-power__fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bx-dots);
  background-size: 5px 5px;
  opacity: 0.35;
  mix-blend-mode: multiply;
}
.bk-power__share {
  font-size: 0.8125rem;
  color: var(--bx-ink-2);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
/* countdown ring */
.bk-ring-clock {
  display: inline-grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.bk-ring-clock svg {
  width: 56px;
  height: 56px;
  transform: rotate(-90deg);
}
.bk-ring-clock circle {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
}
.bk-ring-clock__track {
  stroke: var(--bx-inset);
}
.bk-ring-clock__fill {
  stroke: var(--bx-accent);
  transition: stroke-dashoffset 1s linear;
}
.bk-ring-clock[data-urgent='true'] .bk-ring-clock__fill {
  stroke: var(--bx-down);
}
.bk-ring-clock__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.bk-ring-clock__label {
  font-size: 0.75rem;
  color: var(--bx-ink-3);
  font-weight: 500;
}
/* rank list with FLIP */
.bk-ranks {
  display: grid;
  gap: 4px;
  position: relative;
}
.bk-rank {
  display: grid;
  grid-template-columns: 28px 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 10px;
  border-radius: 12px;
  background: var(--bx-surface);
  border: var(--bx-stroke) solid transparent;
}
.bk-rank[data-you='true'] {
  background: var(--bx-accent-soft);
  border-color: rgba(var(--bx-accent-rgb), 0.35);
  position: sticky;
  bottom: 0;
  top: 0;
  z-index: 1;
}
.bk-rank__pos {
  font-family: var(--bx-font-num);
  font-weight: 600;
  color: var(--bx-ink-2);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.bk-rank__pos[data-medal='1'] {
  color: var(--bx-sun-deep);
}
.bk-rank__name {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.bk-rank__name b {
  font-weight: 600;
  font-size: 0.9375rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bk-rank__name small {
  font-size: 0.75rem;
  color: var(--bx-ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bk-rank__end {
  display: grid;
  gap: 2px;
  justify-items: end;
}
.bk-rank__move {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font: 600 0.6875rem/1 var(--bx-font-num);
}
.bk-rank__move[data-dir='none'] {
  visibility: hidden;
}
.bk-rank__move[data-dir='up'] {
  color: var(--bx-up);
}
.bk-rank__move[data-dir='down'] {
  color: var(--bx-down);
}
.bk-rank__move[data-dir='flat'] {
  color: var(--bx-ink-3);
}
.bk-rank__move svg.lucide {
  width: 12px;
  height: 12px;
  stroke-width: 3;
}
.bk-ranks__gap {
  text-align: center;
  color: var(--bx-ink-3);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  padding: 2px 0;
}
/* rival mini-card */
.bk-rival {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  border: var(--bx-stroke) solid var(--bx-line);
  background: var(--bx-surface);
  min-width: 0;
}
.bk-rival__name {
  font-weight: 600;
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bk-rival__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--bx-ink-3);
  min-width: 0;
}
.bk-rival__gap {
  font-family: var(--bx-font-num);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.bk-rival__gap[data-dir='up'] {
  color: var(--bx-up);
}
.bk-rival__gap[data-dir='down'] {
  color: var(--bx-down);
}
/* candle stickers: original sprites, never recoloured, bob only */
.bk-candle {
  position: absolute;
  width: auto;
  height: 34px;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 2px 2px rgba(22, 26, 38, 0.2));
  animation: bk-bob 4s ease-in-out infinite;
}
.bk-candle--2 {
  animation-delay: -1.2s;
}
@keyframes bk-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

/* =============================================================================
   Social primitives
   ============================================================================= */
.bk-avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bx-inset);
  flex: 0 0 auto;
}
.bk-avatar img {
  width: 82%;
  height: 82%;
  object-fit: contain;
  border-radius: 50%;
}
.bk-avatar--sm {
  width: 32px;
  height: 32px;
}
.bk-avatar--lg {
  width: 64px;
  height: 64px;
}
.bk-avatar--xl {
  width: 88px;
  height: 88px;
}
.bk-avatar[data-ring] {
  padding: 2px;
}
.bk-avatar[data-ring]::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 2px;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  background: var(--bx-line-strong);
}
.bk-avatar[data-ring='active']::before {
  background: var(--bx-up);
}
.bk-avatar[data-ring='rare']::before {
  background: conic-gradient(from 180deg, var(--bx-sun), var(--bx-accent), var(--bx-sun));
}
.bk-avatar[data-ring='inactive']::before {
  background: repeating-conic-gradient(var(--bx-line-strong) 0 8deg, transparent 8deg 16deg);
}
.bk-avatar[data-ring='inactive'] img {
  filter: grayscale(1);
  opacity: 0.6;
}
.bk-avatar__dot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--bx-surface);
  background: var(--bx-up);
}
/* floor feed */
.bk-floor {
  display: grid;
  gap: 0;
}
.bk-move {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows var(--bx-dur-enter) var(--bx-ease-out);
}
.bk-move[data-enter='true'] {
  grid-template-rows: 0fr;
}
.bk-move__in {
  min-height: 0;
  overflow: hidden;
}
.bk-move__row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 12px 0;
  border-bottom: var(--bx-stroke) solid var(--bx-line);
  transition:
    opacity var(--bx-dur-enter) var(--bx-ease-out),
    transform var(--bx-dur-enter) var(--bx-ease-out);
}
.bk-move[data-enter='true'] .bk-move__row {
  opacity: 0;
  transform: translateY(-6px);
}
.bk-move__text {
  display: grid;
  gap: 4px;
  min-width: 0;
  font-size: 0.875rem;
}
.bk-move__text b {
  font-weight: 600;
}
.bk-move__side {
  font-weight: 600;
}
.bk-move__side[data-side='buy'] {
  color: var(--bx-up);
}
.bk-move__side[data-side='sell'] {
  color: var(--bx-down);
}
.bk-move__tag {
  font-size: 0.8125rem;
  color: var(--bx-ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.bk-move__time {
  font-size: 0.75rem;
  color: var(--bx-ink-3);
  white-space: nowrap;
}
.bk-move__react {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}
.bk-react {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 9px;
  border-radius: var(--bx-r-pill);
  border: var(--bx-stroke-control) solid var(--bx-line);
  background: var(--bx-surface);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--bx-ink-2);
  transition:
    border-color var(--bx-dur-micro),
    background var(--bx-dur-micro),
    transform var(--bx-dur-micro);
}
.bk-react:hover {
  border-color: var(--bx-line-strong);
}
.bk-react:active,
.bk-react.is-pressed {
  transform: scale(0.94);
}
.bk-react[aria-pressed='true'] {
  background: var(--bx-accent-soft);
  border-color: rgba(var(--bx-accent-rgb), 0.4);
  color: var(--bx-accent-text);
}
.bk-react .bk-count {
  font-family: var(--bx-font-num);
  font-variant-numeric: tabular-nums;
}
.bk-burst {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
}
.bk-burst i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--bx-sun);
  animation: bk-burst 0.55s var(--bx-ease-out) forwards;
}
.bk-burst i:nth-child(2n) {
  background: var(--bx-accent);
}
@keyframes bk-burst {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.2);
    opacity: 0;
  }
}
/* streak / combo badge */
.bk-streak {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px 0 8px;
  border-radius: var(--bx-r-pill);
  background: var(--bx-sun-soft);
  color: var(--bx-sun-deep);
  font-weight: 600;
  font-size: 0.8125rem;
  white-space: nowrap;
}
.bk-streak svg.lucide {
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
}
.bk-combo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px 0 8px;
  border-radius: 10px;
  border: var(--bx-stroke-control) solid var(--bx-line-strong);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  max-width: 100%;
}
.bk-combo > span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.bk-combo__bonus {
  font-family: var(--bx-font-num);
  color: var(--bx-sun-deep);
}
.bk-combo .bk-tag,
.bk-streak .bk-tag {
  height: 16px;
  padding: 0 5px;
  font-size: 0.625rem;
}
.bk-combo[data-undiscovered] {
  border-style: dashed;
  color: var(--bx-ink-3);
}
/* receipt retired in round 4: the trade card (.bk-tcard) replaces it */

/* =============================================================================
   Feedback
   ============================================================================= */
.bk-toasts {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 8px;
  z-index: 60;
  pointer-events: none;
  justify-items: center;
}
.bk-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 380px);
  min-height: 48px;
  padding: 8px 8px 8px 14px;
  border-radius: 12px;
  background: var(--bx-ink);
  color: var(--bx-surface);
  box-shadow: var(--bx-shadow-2);
  font-size: 0.875rem;
  font-weight: 500;
  animation: bk-toast-in var(--bx-dur-enter) var(--bx-ease-out);
}
.bk-toast[data-leaving='true'] {
  animation: bk-toast-out var(--bx-dur-exit) var(--bx-ease-in) forwards;
}
.bk-toast span {
  flex: 1 1 auto;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bk-toast svg.lucide {
  width: 16px;
  height: 16px;
}
.bk-toast--up svg.lucide:first-child {
  color: var(--bx-up);
}
.bk-toast--down svg.lucide:first-child {
  color: var(--bx-down);
}
.bk-toast--warn svg.lucide:first-child {
  color: var(--bx-sun);
}
.bk-toast__x {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  display: grid;
  place-items: center;
  opacity: 0.75;
}
.bk-toast__x:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}
@keyframes bk-toast-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes bk-toast-out {
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}
.bk-alert {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: var(--bx-stroke) solid var(--bx-line);
  background: var(--bx-surface);
  font-size: 0.875rem;
}
.bk-alert__title {
  font-weight: 600;
}
.bk-alert__body {
  color: var(--bx-ink-2);
}
.bk-alert--warn {
  background: var(--bx-warn-soft);
  border-color: transparent;
}
.bk-alert--warn svg.lucide {
  color: var(--bx-warn);
}
.bk-alert--down {
  background: var(--bx-down-soft);
  border-color: transparent;
}
.bk-alert--down svg.lucide {
  color: var(--bx-down);
}
.bk-alert--info svg.lucide {
  color: var(--bx-accent);
}
.bk-skel {
  position: relative;
  overflow: hidden;
  background: var(--bx-skeleton);
  border-radius: 8px;
}
.bk-skel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--bx-skeleton-hi), transparent);
  transform: translateX(-100%);
  animation: bk-shimmer 1.6s var(--bx-ease-move) infinite;
}
@keyframes bk-shimmer {
  to {
    transform: translateX(100%);
  }
}
.bk-empty {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
  padding: 28px 18px;
  border-radius: 14px;
  border: 1.5px dashed var(--bx-line-strong);
}
.bk-empty svg.lucide {
  width: 26px;
  height: 26px;
  color: var(--bx-ink-3);
  stroke-width: 1.6;
}
.bk-empty__title {
  font-weight: 600;
}
.bk-empty__body {
  font-size: 0.875rem;
  color: var(--bx-ink-2);
  max-width: 32ch;
}

/* =============================================================================
   Overlays
   ============================================================================= */
.bk-scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bx-scrim);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--bx-dur-exit) var(--bx-ease-in);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.bk-scrim:not([data-open='true']) {
  visibility: hidden;
  transition:
    opacity var(--bx-dur-exit) var(--bx-ease-in),
    visibility 0s linear var(--bx-dur-exit);
}
.bk-scrim[data-open='true'] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-duration: var(--bx-dur-enter);
}
/* modal: fixed anatomy head / body / foot */
.bk-modal {
  position: fixed;
  z-index: 51;
  left: 50%;
  top: 50%;
  width: min(calc(100% - 32px), 440px);
  max-height: min(86dvh, 720px);
  transform: translate(-50%, -50%) scale(0.985, 0.94);
  opacity: 0;
  pointer-events: none;
  background: var(--bx-surface);
  color: var(--bx-ink);
  border-radius: var(--bx-r-sheet);
  border: var(--bx-stroke) solid var(--bx-line);
  box-shadow: var(--bx-shadow-overlay);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  transition:
    opacity var(--bx-dur-exit) var(--bx-ease-in),
    transform var(--bx-dur-exit) var(--bx-ease-in);
}
.bk-modal:not([data-open='true']) {
  visibility: hidden;
  transition:
    opacity var(--bx-dur-exit) var(--bx-ease-in),
    transform var(--bx-dur-exit) var(--bx-ease-in),
    visibility 0s linear var(--bx-dur-exit);
}
.bk-modal[data-open='true'] {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
  transition:
    opacity var(--bx-dur-enter) var(--bx-ease-out),
    transform var(--bx-dur-enter) var(--bx-ease-spring);
}
.bk-modal__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 12px 22px;
  min-height: 64px;
}
.bk-modal__title {
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bk-modal__close {
  margin-inline-start: auto;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 0;
  /* red-tinted face, red glyph: the shared close control (D-057 amendment 2026-09-30) */
  background: var(--bx-down-soft);
  color: var(--bx-down);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  transition:
    background var(--bx-dur-fast),
    transform var(--bx-dur-micro) var(--bx-ease-out);
}
.bk-modal__close svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.4;
}
.bk-modal__close:hover {
  background: rgba(var(--bx-down-rgb), 0.2);
}
.bk-modal__close:active {
  background: rgba(var(--bx-down-rgb), 0.28);
  transform: scale(0.94);
}
.bk-modal__body {
  padding: 0 22px 8px;
  overflow: auto;
  display: grid;
  gap: 12px;
  align-content: start;
  color: var(--bx-ink-2);
  font-size: 0.9375rem;
}
.bk-modal__foot {
  display: flex;
  gap: 8px;
  padding: 12px 16px 16px;
  justify-content: flex-end;
}
.bk-modal__foot .bk-btn {
  flex: 1 1 0;
  min-width: 0;
}
@media (min-width: 600px) {
  .bk-modal__foot .bk-btn {
    flex: 0 0 auto;
  }
}
/* drawer: bottom sheet on phone, docked panel on desktop */
.bk-drawer {
  position: fixed;
  z-index: 51;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(92dvh, 720px);
  background: var(--bx-surface);
  color: var(--bx-ink);
  border-radius: var(--bx-r-sheet) var(--bx-r-sheet) 0 0;
  border: var(--bx-stroke) solid var(--bx-line);
  border-bottom: 0;
  box-shadow: var(--bx-shadow-overlay);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  transform-origin: 50% 100%;
  transform: translateY(104%) scaleX(0.97);
  transition: transform var(--bx-dur-exit) var(--bx-ease-in);
  pointer-events: none;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bk-drawer:not([data-open='true']) {
  visibility: hidden;
  transition:
    transform var(--bx-dur-exit) var(--bx-ease-in),
    visibility 0s linear var(--bx-dur-exit);
}
.bk-drawer[data-open='true'] {
  transform: translateY(0);
  pointer-events: auto;
  transition: transform 420ms var(--bx-ease-sheet);
}
.bk-drawer__handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--bx-line-strong);
  margin: 10px auto 0;
}
.bk-drawer__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 8px 20px;
}
.bk-drawer__title {
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}
.bk-drawer__body {
  padding: 4px 20px 12px;
  overflow: auto;
  display: grid;
  gap: 16px;
  align-content: start;
}
.bk-drawer__foot {
  padding: 10px 20px 16px;
  border-top: var(--bx-stroke) solid var(--bx-line);
  display: grid;
  gap: 8px;
  background: var(--bx-surface);
}
@media (min-width: 900px) {
  .bk-drawer {
    left: auto;
    top: 0;
    bottom: 0;
    width: 400px;
    max-height: none;
    border-radius: 0;
    border: 0;
    border-left: var(--bx-stroke) solid var(--bx-line);
    transform: translateX(104%);
  }
  .bk-drawer[data-open='true'] {
    transform: translateX(0);
  }
  .bk-drawer__handle {
    display: none;
  }
  .bk-drawer__head {
    padding-top: 22px;
  }
  .bk-drawer {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
}
.bk-drawer .bk-modal__close {
  margin-inline-start: auto;
}
/* Overlay back layer: the brand paw tile, slowly scrolling behind the panel's content. One
   element clips, its pseudo-element moves by exactly one tile (transform only), so the loop is
   seamless and stays on the compositor. Decoration: it stops while the panel is closed and under
   reduced motion, and never takes a pointer event. */
.bk-modal,
.bk-drawer {
  isolation: isolate;
}
.bk-pawback {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}
.bk-pawback::before {
  content: '';
  position: absolute;
  inset: -84px;
  background: var(--bx-paws);
  background-size: 84px 84px;
  opacity: var(--bx-paws-panel-opacity, 0.05);
  animation: bk-drift 48s linear infinite;
}
/* `fall`: scrolls straight down and is gone 60% of the way down the panel */
.bk-pawback[data-variant='fall'] {
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 16%, transparent 60%);
  mask-image: linear-gradient(to bottom, black 0%, black 16%, transparent 60%);
}
.bk-pawback[data-variant='fall']::before {
  opacity: calc(var(--bx-paws-panel-opacity, 0.05) * 2);
  animation: bk-pawfall 14s linear infinite;
}
@keyframes bk-pawfall {
  to {
    transform: translateY(84px);
  }
}
[data-open]:not([data-open='true']) > .bk-pawback[data-variant]::before,
[data-kit][data-motion='off'] .bk-pawback[data-variant]::before {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .bk-pawback[data-variant]::before {
    animation: none;
  }
}
.bk-scroller {
  scrollbar-width: none;
  scrollbar-gutter: auto;
  -ms-overflow-style: none;
  overscroll-behavior: contain;
}
.bk-scroller::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.bk-scroller__thumb {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 3px;
  width: 3px;
  height: 24px;
  border-radius: 2px;
  background: rgba(var(--bx-ink-rgb), 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms var(--bx-ease-out);
  will-change: transform, opacity;
}
.bk-scroller__thumb[data-show='true'] {
  opacity: 1;
  transition-duration: 120ms;
}
/* trade ticket internals */
.bk-ticket__asset {
  --fl: 0px;
  --fr: 28px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 20px;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    #000 var(--fl),
    #000 calc(100% - var(--fr)),
    transparent
  );
  mask-image: linear-gradient(
    to right,
    transparent,
    #000 var(--fl),
    #000 calc(100% - var(--fr)),
    transparent
  );
}
.bk-ticket__asset[data-scrolled='true'] {
  --fl: 28px;
}
.bk-ticket__asset[data-end='true'] {
  --fr: 0px;
}
.bk-ticket__asset::-webkit-scrollbar {
  display: none;
}
.bk-carousel {
  position: relative;
  margin: 0 -20px;
  min-width: 0;
}
.bk-carousel__track {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scrollbar-gutter: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 48px;
}
.bk-carousel__track::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.bk-carousel__track > * {
  scroll-snap-align: start;
  flex: 0 0 auto;
}
.bk-carousel__track[data-scrolled='true'] {
  --fl: 60px;
}
.bk-carousel__track[data-end='false'] {
  --fr: 60px;
}
.bk-carousel__track {
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    transparent calc(var(--fl) * 0.55),
    #000 var(--fl),
    #000 calc(100% - var(--fr)),
    transparent calc(100% - var(--fr) * 0.55),
    transparent
  );
  mask-image: linear-gradient(
    to right,
    transparent,
    transparent calc(var(--fl) * 0.55),
    #000 var(--fl),
    #000 calc(100% - var(--fr)),
    transparent calc(100% - var(--fr) * 0.55),
    transparent
  );
}
.bk-carousel__arrow {
  position: absolute;
  z-index: 2;
  top: calc(50% - 16px);
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: var(--bx-stroke) solid var(--bx-line);
  background: var(--bx-surface);
  color: var(--bx-ink-2);
  display: grid;
  place-items: center;
  box-shadow: 0 1px 3px rgba(var(--bx-ink-rgb), 0.12);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 160ms var(--bx-ease-out),
    transform 120ms var(--bx-ease-out),
    color 120ms,
    background-color 120ms;
}
.bk-carousel__arrow--prev {
  left: 10px;
}
.bk-carousel__arrow--next {
  right: 10px;
}
.bk-carousel__arrow::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
}
.bk-carousel__arrow svg {
  width: 18px;
  height: 18px;
}
.bk-carousel__arrow[data-show='true'] {
  opacity: 1;
  pointer-events: auto;
}
.bk-carousel__arrow:hover {
  color: var(--bx-ink);
  background: var(--bx-inset);
}
.bk-carousel__arrow:active {
  transform: scale(0.88);
}
.bk-carousel__arrow:focus-visible {
  outline: 2px solid var(--bx-focus);
  outline-offset: 2px;
}
.bk-ticket__preview {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bx-inset);
}
.bk-ticket__preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--bx-ink-2);
}
.bk-ticket__preview-row b {
  color: var(--bx-ink);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.bk-ticket__confirm {
  position: relative;
  overflow: hidden;
}
.bk-ticket__confirm::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bx-grain);
  opacity: 0.08;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.bk-lock {
  overflow: hidden !important;
  padding-right: var(--bx-gutter, 0px);
}

/* =============================================================================
   Composed flow (stepper)
   ============================================================================= */
.bk-steps {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 6px;
}
.bk-step {
  display: grid;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--bx-ink-3);
  font-weight: 500;
}
.bk-step::before {
  content: '';
  height: 3px;
  border-radius: 2px;
  background: var(--bx-inset);
  transition: background var(--bx-dur-fast);
}
.bk-step[data-state='done']::before,
.bk-step[data-state='current']::before {
  background: var(--bx-accent);
}
.bk-step[data-state='current'] {
  color: var(--bx-ink);
}
.bk-step span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bk-flow {
  display: grid;
  gap: 16px;
  max-width: 640px;
}
.bk-steps {
  max-width: 640px;
}
.bk-flow__panel {
  display: grid;
  gap: 14px;
}
.bk-flow__panel[data-enter] {
  animation: bk-panel-in var(--bx-dur-enter) var(--bx-ease-out);
}
@keyframes bk-panel-in {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.bk-flow__foot {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.bk-asset-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
}
.bk-asset {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  border: var(--bx-stroke-control) solid var(--bx-line);
  background: var(--bx-surface);
  text-align: left;
  min-height: 56px;
  transition:
    border-color var(--bx-dur-micro),
    background var(--bx-dur-micro),
    transform var(--bx-dur-micro);
}
.bk-asset:hover {
  border-color: var(--bx-line-strong);
}
.bk-asset:active,
.bk-asset.is-pressed {
  transform: scale(0.98);
}
.bk-asset[aria-pressed='true'] {
  border-color: var(--bx-accent);
  background: var(--bx-accent-soft);
  box-shadow:
    0 0 0 2px var(--bx-surface),
    0 0 0 3.5px rgba(var(--bx-accent-rgb), 0.3);
}
.bk-asset .bk-glyph {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font: 700 0.6875rem/1 var(--bx-font-num);
  background: var(--bx-inset);
  color: var(--bx-ink);
}
.bk-asset__t {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.bk-asset__t b {
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bk-asset__t small {
  font-size: 0.75rem;
  color: var(--bx-ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 44px hit boxes: controls whose visual height is under 44px extend their hit area with a
   pseudo-element. Pointer events land on the pseudo, so the target is really 44px tall. */
button.bk-chip,
.bk-quick,
.bk-react,
.bk-toast__x,
.bk-modal__close,
.bk-seg__btn,
.bk-topbar__nav a,
.bk-wordmark,
.bk-btn--sm:not(.bk-hold) {
  position: relative;
}
button.bk-chip::before,
.bk-quick::before,
.bk-react::before,
.bk-toast__x::before,
.bk-modal__close::before,
.bk-seg__btn::before,
.bk-topbar__nav a::before,
.bk-wordmark::before,
.bk-btn--sm:not(.bk-hold)::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% - 22px);
  height: 44px;
}
/* standalone icon-shaped controls also widen to 44px; adjacent segment/quick items keep their own width so they never steal a neighbour's hit */
.bk-btn.bk-btn--icon::before,
.bk-toast__x::before,
.bk-modal__close::before {
  left: min(0px, calc(50% - 22px));
  right: min(0px, calc(50% - 22px));
}

/* =============================================================================
   Edge-case helpers
   ============================================================================= */
.bk-trunc {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.bk-clamp2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bk-swatches {
  display: grid;
  gap: 10px 8px;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
}
.bk-swatch {
  display: grid;
  gap: 6px;
  font-size: 0.6875rem;
  color: var(--bx-ink-3);
}
.bk-swatch i {
  display: block;
  height: 44px;
  border-radius: 10px;
  border: var(--bx-stroke) solid var(--bx-line);
  background: var(--sw);
}
.bk-swatch b {
  color: var(--bx-ink);
  font-weight: 600;
  font-size: 0.75rem;
}
.bk-swatch code {
  font-family: var(--bx-font-num);
  font-size: 0.625rem;
  letter-spacing: 0;
}
.bk-curve {
  height: 44px;
  border-radius: 10px;
  background: var(--bx-inset);
  position: relative;
  overflow: hidden;
}
.bk-curve i {
  position: absolute;
  top: 50%;
  left: 8px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border-radius: 50%;
  background: var(--bx-accent);
  transition: transform 900ms var(--e);
}
.bk-curve[data-go='true'] i {
  transform: translateX(calc(100cqw - 32px));
}
.bk-curve {
  container-type: inline-size;
}
.bk-tex {
  height: 64px;
  border-radius: 12px;
  border: var(--bx-stroke) solid var(--bx-line);
  position: relative;
  overflow: hidden;
  background: var(--bx-surface);
}
.bk-tex--grain::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bx-grain);
  opacity: calc(var(--bx-grain-opacity) * 3);
  mix-blend-mode: var(--bx-grain-blend);
}
.bk-tex--ruling {
  background-image: var(--bx-ruling);
}
.bk-tex--dots {
  background-image: var(--bx-dots);
  background-size: 6px 6px;
}

/* =============================================================================
   Round 3: game-feel layer, tick primitive, candles, allocation tools, toy effects
   ============================================================================= */
/* dark theme paws must be light: re-declare the pattern with light ink in both dark blocks */
@media (prefers-color-scheme: dark) {
  [data-kit]:not([data-theme='light']) {
    --bx-paws-panel-opacity: 0.04;
    --bx-paws: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'><g fill='%23F1F2F7'><path transform='translate(12 10) scale(.9)' d='M12 3.5c-1.4 0-2.5 1.6-2.5 3.5S10.6 10.5 12 10.5s2.5-1.6 2.5-3.5S13.4 3.5 12 3.5zM6 6c-1.2 0-2.2 1.4-2.2 3.1S4.8 12 6 12s2.2-1.3 2.2-2.9S7.2 6 6 6zm12 0c-1.2 0-2.2 1.4-2.2 3.1S16.8 12 18 12s2.2-1.3 2.2-2.9S19.2 6 18 6zm-6 6.5c-3.2 0-6 2.8-6 5.4 0 1.7 1.3 2.6 2.7 2.6 1.1 0 2-.7 3.3-.7s2.2.7 3.3.7c1.4 0 2.7-.9 2.7-2.6 0-2.6-2.8-5.4-6-5.4z'/><path transform='translate(50 48) rotate(-25) scale(.75)' d='M12 3.5c-1.4 0-2.5 1.6-2.5 3.5S10.6 10.5 12 10.5s2.5-1.6 2.5-3.5S13.4 3.5 12 3.5zM6 6c-1.2 0-2.2 1.4-2.2 3.1S4.8 12 6 12s2.2-1.3 2.2-2.9S7.2 6 6 6zm12 0c-1.2 0-2.2 1.4-2.2 3.1S16.8 12 18 12s2.2-1.3 2.2-2.9S19.2 6 18 6zm-6 6.5c-3.2 0-6 2.8-6 5.4 0 1.7 1.3 2.6 2.7 2.6 1.1 0 2-.7 3.3-.7s2.2.7 3.3.7c1.4 0 2.7-.9 2.7-2.6 0-2.6-2.8-5.4-6-5.4z'/><rect x='58' y='14' width='16' height='5' rx='2.5' transform='rotate(30 66 16)'/></g></svg>");
  }
}
[data-kit][data-theme='dark'] {
  --bx-paws-panel-opacity: 0.04;
  --bx-paws: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'><g fill='%23F1F2F7'><path transform='translate(12 10) scale(.9)' d='M12 3.5c-1.4 0-2.5 1.6-2.5 3.5S10.6 10.5 12 10.5s2.5-1.6 2.5-3.5S13.4 3.5 12 3.5zM6 6c-1.2 0-2.2 1.4-2.2 3.1S4.8 12 6 12s2.2-1.3 2.2-2.9S7.2 6 6 6zm12 0c-1.2 0-2.2 1.4-2.2 3.1S16.8 12 18 12s2.2-1.3 2.2-2.9S19.2 6 18 6zm-6 6.5c-3.2 0-6 2.8-6 5.4 0 1.7 1.3 2.6 2.7 2.6 1.1 0 2-.7 3.3-.7s2.2.7 3.3.7c1.4 0 2.7-.9 2.7-2.6 0-2.6-2.8-5.4-6-5.4z'/><path transform='translate(50 48) rotate(-25) scale(.75)' d='M12 3.5c-1.4 0-2.5 1.6-2.5 3.5S10.6 10.5 12 10.5s2.5-1.6 2.5-3.5S13.4 3.5 12 3.5zM6 6c-1.2 0-2.2 1.4-2.2 3.1S4.8 12 6 12s2.2-1.3 2.2-2.9S7.2 6 6 6zm12 0c-1.2 0-2.2 1.4-2.2 3.1S16.8 12 18 12s2.2-1.3 2.2-2.9S19.2 6 18 6zm-6 6.5c-3.2 0-6 2.8-6 5.4 0 1.7 1.3 2.6 2.7 2.6 1.1 0 2-.7 3.3-.7s2.2.7 3.3.7c1.4 0 2.7-.9 2.7-2.6 0-2.6-2.8-5.4-6-5.4z'/><rect x='58' y='14' width='16' height='5' rx='2.5' transform='rotate(30 66 16)'/></g></svg>");
}

/* ---- tick primitive: colour pulse (500ms) + punch/dip (260ms), transform only ---- */
[data-kit] [data-tick] {
  transform-origin: 50% 60%;
  will-change: transform;
}
.bk-num[data-tick]:not(.bk-odo),
.bk-flash[data-tick],
.bk-count[data-tick] {
  display: inline-block;
}
.bk-odo[data-tick] {
  display: inline-flex;
}
/* scoped prefix: the port's `[data-kit] [data-tick]` rules carry one more attribute than the
   taster's bare `[data-tick]`, so the odometer's colour-only tick needs it too to win */
[data-kit] .bk-odo[data-tick='up'] {
  animation: bk-tick-color-up 500ms var(--bx-ease-out);
}
[data-kit] .bk-odo[data-tick='down'] {
  animation: bk-tick-color-down 500ms var(--bx-ease-out);
}
[data-kit] [data-tick='up'] {
  animation:
    bk-tick-color-up 500ms var(--bx-ease-out),
    bk-tick-punch 260ms var(--bx-ease-punch);
}
[data-kit] [data-tick='down'] {
  animation:
    bk-tick-color-down 500ms var(--bx-ease-out),
    bk-tick-dip 260ms var(--bx-ease-punch);
}
@keyframes bk-tick-color-up {
  0%,
  25% {
    color: var(--bx-up);
  }
  100% {
    color: var(--tick-base, currentColor);
  }
}
@keyframes bk-tick-color-down {
  0%,
  25% {
    color: var(--bx-down);
  }
  100% {
    color: var(--tick-base, currentColor);
  }
}
.bk-stage [data-tick='up'] {
  animation-name: bk-tick-color-stage-up, bk-tick-punch;
}
.bk-stage [data-tick='down'] {
  animation-name: bk-tick-color-stage-down, bk-tick-dip;
}
@keyframes bk-tick-color-stage-up {
  0%,
  25% {
    color: var(--bx-stage-up);
  }
  100% {
    color: var(--tick-base, currentColor);
  }
}
@keyframes bk-tick-color-stage-down {
  0%,
  25% {
    color: var(--bx-stage-down);
  }
  100% {
    color: var(--tick-base, currentColor);
  }
}
@keyframes bk-tick-punch {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes bk-tick-dip {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}
/* the pill ticks as a whole; its icon keeps its own colour */
.bk-pnl[data-tick] {
  transform-origin: 50% 50%;
}
/* reduced motion: the colour pulse stays (it carries meaning), the scale goes */
[data-kit][data-motion='off'] [data-tick='up'] {
  animation: bk-tick-color-up 500ms var(--bx-ease-out) !important;
}
[data-kit][data-motion='off'] [data-tick='down'] {
  animation: bk-tick-color-down 500ms var(--bx-ease-out) !important;
}
[data-kit][data-motion='off'] .bk-stage [data-tick='up'] {
  animation: bk-tick-color-stage-up 500ms var(--bx-ease-out) !important;
}
[data-kit][data-motion='off'] .bk-stage [data-tick='down'] {
  animation: bk-tick-color-stage-down 500ms var(--bx-ease-out) !important;
}
@media (prefers-reduced-motion: reduce) {
  [data-kit] [data-tick='up'] {
    animation: bk-tick-color-up 500ms var(--bx-ease-out) !important;
  }
  [data-kit] [data-tick='down'] {
    animation: bk-tick-color-down 500ms var(--bx-ease-out) !important;
  }
  .bk-stage [data-tick='up'] {
    animation: bk-tick-color-stage-up 500ms var(--bx-ease-out) !important;
  }
  .bk-stage [data-tick='down'] {
    animation: bk-tick-color-stage-down 500ms var(--bx-ease-out) !important;
  }
}

/* ---- toy effects (each answers an action; all collapse under reduced motion) ---- */
/* switch knob, indicators, locks, pips, reactions, tier chip, steppers and Next now use bx.jiggle (WAAPI) */
.bk-candle[data-hop] {
  animation: bk-hop 420ms var(--bx-ease-punch);
}
@keyframes bk-hop {
  0% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-7px) rotate(-3deg);
  }
  100% {
    transform: translateY(0);
  }
}
.bk-hero__bork:hover,
.bk-tcard__art:hover img,
.bk-profile__top .bk-avatar:hover img {
  animation: bk-wiggle 460ms var(--bx-ease-out);
}
@keyframes bk-wiggle {
  0% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(-5deg);
  }
  55% {
    transform: rotate(4deg);
  }
  80% {
    transform: rotate(-2deg);
  }
  100% {
    transform: rotate(0);
  }
}
.bk-paws {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 3;
}
.bk-paws svg {
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  fill: var(--bx-sun-deep);
  animation: bk-paw 720ms var(--bx-ease-out) both;
}
.bk-paws svg:nth-child(2n) {
  fill: var(--bx-accent);
}
@keyframes bk-paw {
  0% {
    transform: translate(0, 0) rotate(0) scale(0.4);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(1);
    opacity: 0;
  }
}
@keyframes bk-toast-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  70% {
    transform: translateY(-2px) scale(1.01);
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---- chart: layers, candles, OHLC pill ---- */
.bk-chart__layer {
  transition: opacity var(--bx-dur-hero) var(--bx-ease-out);
}
.bk-chart[data-view='candles'] .bk-chart__layer--line {
  pointer-events: none;
}
.bk-chart__candle line {
  stroke-width: 1.2;
}
.bk-chart__candle rect {
  stroke: none;
}
.bk-chart__candle[data-dir='up'] line,
.bk-chart__candle[data-dir='up'] rect {
  stroke: var(--bx-stage-up);
  fill: var(--bx-stage-up);
}
.bk-chart__candle[data-dir='down'] line,
.bk-chart__candle[data-dir='down'] rect {
  stroke: var(--bx-stage-down);
  fill: var(--bx-stage-down);
}
.bk-chart__candle rect {
  fill-opacity: 1;
}
.bk-chart__pill--ohlc {
  left: 0;
  top: -2px;
  display: flex;
  gap: 8px;
  padding: 4px 8px;
  font-weight: 500;
}
.bk-chart__pill--ohlc span {
  opacity: 0.7;
}
.bk-chart__pill--ohlc b {
  opacity: 1;
  font-weight: 600;
  margin-inline-start: 2px;
}
.bk-chart[data-scrub='true'] .bk-chart__pill--ohlc:not([hidden]) {
  opacity: 1;
}

/* ---- allocation tools ---- */
.bk-alloc__head .bk-alloc__lock {
  margin-inline-start: auto;
  width: 32px;
  height: 28px;
  border-radius: 8px;
  border: var(--bx-stroke-control) solid transparent;
  background: transparent;
  color: var(--bx-ink-3);
  display: grid;
  place-items: center;
  position: relative;
}
.bk-alloc__lock::before {
  content: '';
  position: absolute;
  left: min(0px, calc(50% - 22px));
  right: min(0px, calc(50% - 22px));
  top: calc(50% - 22px);
  height: 44px;
}
.bk-alloc__lock svg.lucide {
  width: 14px;
  height: 14px;
}
.bk-alloc__lock:hover {
  color: var(--bx-ink);
  background: var(--bx-inset);
}
.bk-alloc__lock[aria-pressed='true'] {
  color: var(--bx-accent-text);
  background: var(--bx-accent-soft);
}
.bk-slider:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.bk-alloc__tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
}
.bk-switch--sm {
  min-height: 44px;
}
.bk-switch--sm .bk-switch__label {
  font-size: 0.875rem;
}
.bk-switch--sm .bk-micro {
  display: block;
  font-weight: 400;
}
.bk-alloc__pct[data-tick] {
  display: inline-block;
}

/* =============================================================================
   Round 4: playful set, tiers, moves, trade/profile cards, the wall
   ============================================================================= */
/* ---- playful: indicators land with a squash, tiles jiggle, sliders squish, badges bounce ---- */
.bk-tab[data-pop],
.bk-modal__close[data-pop] {
  animation: bk-pop 240ms var(--bx-ease-punch);
}
[data-kit] [data-jiggle] {
  animation: bk-jiggle 340ms var(--bx-ease-punch);
}
@keyframes bk-jiggle {
  0% {
    transform: scale(0.96) rotate(0);
  }
  30% {
    transform: scale(1.05) rotate(-2deg);
  }
  60% {
    transform: scale(1.02) rotate(1.5deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}
[data-kit] [data-shake] {
  animation: bk-shake 300ms var(--bx-ease-out);
}
@keyframes bk-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}
.bk-slider::-webkit-slider-thumb {
  transition: transform var(--bx-dur-micro) var(--bx-ease-punch);
}
.bk-slider:active::-webkit-slider-thumb {
  transform: scale(1.18, 0.86);
}
.bk-toast {
  animation-name: bk-toast-in;
}
@keyframes bk-toast-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98, 1.02);
  }
  60% {
    transform: translateY(-2px) scale(1.02, 0.96);
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.bk-moves__pip[data-pop-out] i {
  animation: bk-pip-out 340ms var(--bx-ease-punch) both;
}
@keyframes bk-pip-out {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.3);
    opacity: 1;
  }
  100% {
    transform: scale(0.2);
    opacity: 0;
  }
}

/* ---- Power tiers (example thresholds) ---- */
.bk-power__fill {
  position: relative;
  overflow: hidden;
}
.bk-power[data-tier='low'] .bk-power__fill {
  background: linear-gradient(90deg, #6f7c99, #96a3c2);
}
.bk-power[data-tier='mid'] .bk-power__fill {
  background: linear-gradient(90deg, var(--bx-accent), #27b3b0);
}
.bk-power[data-tier='high'] .bk-power__fill {
  background: linear-gradient(90deg, #e0a400, var(--bx-sun) 60%, #ffe99a);
}
.bk-power__fill[data-shine]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(255, 255, 255, 0.75) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  animation: bk-shine 650ms var(--bx-ease-out);
}
@keyframes bk-shine {
  to {
    transform: translateX(120%);
  }
}
.bk-power__tier {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px 0 8px;
  border-radius: var(--bx-r-pill);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.bk-power__tier svg.lucide {
  width: 13px;
  height: 13px;
  stroke-width: 2.4;
}
.bk-power[data-tier='low'] .bk-power__tier {
  background: var(--bx-inset);
  color: var(--bx-ink-2);
}
.bk-power[data-tier='mid'] .bk-power__tier {
  background: var(--bx-accent-soft);
  color: var(--bx-accent-text);
}
.bk-power[data-tier='high'] .bk-power__tier {
  background: var(--bx-sun-soft);
  color: var(--bx-sun-deep);
}
.bk-power__hint {
  font-size: 0.75rem;
  color: var(--bx-ink-3);
}
/* tinted card borders for reward / Power / rank cards: 1.5px self-colour, with a faint outer ring */
.bk-demo--tint {
  border: var(--bx-stroke-control) solid color-mix(in srgb, var(--tint), var(--bx-line) 45%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tint), transparent 90%);
}

/* ---- daily moves (Proposal · Q64) ---- */
.bk-moves {
  display: grid;
  gap: 10px;
}
.bk-moves__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.bk-moves__label {
  font-weight: 600;
  font-size: 0.875rem;
}
.bk-moves__count {
  font-size: 0.875rem;
  color: var(--bx-ink-2);
}
.bk-moves__pips {
  display: flex;
  gap: 8px;
}
.bk-moves__pip {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: var(--bx-stroke-control) solid var(--bx-line-strong);
  background: var(--bx-inset);
  display: grid;
  place-items: center;
  transition:
    border-color var(--bx-dur-fast),
    background var(--bx-dur-fast);
}
.bk-moves__pip i {
  width: 16px;
  height: 16px;
  border-radius: 6px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--bx-accent), #fff 22%),
    var(--bx-accent)
  );
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--bx-accent), #000 24%);
  display: block;
}
.bk-moves__pip[data-spent='true'] {
  border-style: dashed;
  background: transparent;
}
.bk-moves__pip[data-spent='true'] i {
  opacity: 0;
  transform: scale(0.2);
}
.bk-moves[data-left='0'] .bk-moves__pips {
  opacity: 0.7;
}
.bk-moves__empty {
  padding: 18px 14px;
}

/* ---- pick tiles (toy tiles: mark, name, tiny sparkline, check badge) ---- */
.bk-asset--tile {
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 4px 10px;
  padding: 12px;
  min-height: 96px;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  --face: var(--bx-surface);
}
.bk-asset--tile .bk-asset__mark {
  grid-row: 1;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font: 700 0.75rem/1 var(--bx-font-num);
  background: var(--bx-inset);
  color: var(--bx-ink);
  transition:
    background var(--bx-dur-fast),
    color var(--bx-dur-fast);
}
.bk-asset--tile .bk-asset__t {
  grid-row: 1;
}
.bk-asset--tile .bk-asset__spark {
  grid-column: 1 / -1;
  grid-row: 2;
  height: 26px;
}
.bk-asset--tile .bk-asset__spark path {
  stroke-width: 1.5;
}
.bk-asset__check {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bx-surface);
  color: var(--bx-accent);
  display: grid;
  place-items: center;
  transform: scale(0);
  opacity: 0;
}
.bk-asset__check svg.lucide {
  width: 13px;
  height: 13px;
  stroke-width: 3;
}
.bk-asset--tile[aria-pressed='true'] {
  background: var(--bx-accent);
  border-color: var(--bx-accent-deep);
  color: var(--bx-on-accent);
  box-shadow:
    0 0 0 2px var(--bx-surface),
    0 0 0 3.5px rgba(var(--bx-accent-rgb), 0.35),
    inset 0 -3px 0 color-mix(in srgb, var(--bx-accent), #000 22%);
}
.bk-asset--tile[aria-pressed='true'] .bk-asset__mark {
  background: rgba(255, 255, 255, 0.22);
  color: var(--bx-on-accent);
}
.bk-asset--tile[aria-pressed='true'] .bk-asset__t b,
.bk-asset--tile[aria-pressed='true'] .bk-asset__t small {
  color: var(--bx-on-accent);
}
.bk-asset--tile[aria-pressed='true'] .bk-asset__spark path {
  stroke: var(--bx-on-accent);
  opacity: 0.85;
}
.bk-asset--tile[aria-pressed='true'] .bk-asset__check {
  animation: bk-badge-in 360ms var(--bx-ease-punch) both;
}
@keyframes bk-badge-in {
  0% {
    transform: scale(0) rotate(-30deg);
    opacity: 0;
  }
  60% {
    transform: scale(1.25) rotate(6deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}
[data-kit][data-theme='dark'] .bk-asset--tile[aria-pressed='true'] .bk-asset__mark {
  background: rgba(13, 16, 32, 0.22);
}
/* ---- pour step ---- */
.bk-pour {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}
@media (min-width: 600px) {
  .bk-pour {
    grid-template-columns: minmax(0, 1fr) 180px;
  }
}
.bk-donut--big svg,
.bk-donut--big > div {
  width: 136px;
  height: 136px;
}
.bk-donut--big {
  grid-template-columns: 136px minmax(0, 1fr);
}
.bk-pour__power {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 14px;
  background: var(--bx-sun-soft);
  border: var(--bx-stroke-control) solid color-mix(in srgb, var(--bx-sun-deep), transparent 55%);
}
.bk-alloc--pour .bk-alloc__row {
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--c), var(--bx-surface) 92%);
  border: var(--bx-stroke) solid color-mix(in srgb, var(--c), var(--bx-line) 60%);
}
.bk-alloc__swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--c);
  display: inline-block;
  flex: 0 0 auto;
}
.bk-alloc--pour .bk-slider::-webkit-slider-runnable-track {
  background: linear-gradient(to right, var(--c) var(--pct), var(--bx-inset) var(--pct));
  height: 10px;
  border-radius: 5px;
}
.bk-alloc--pour .bk-slider::-webkit-slider-thumb {
  margin-top: -8px;
  width: 26px;
  height: 26px;
  border-color: var(--c);
}
.bk-alloc--pour .bk-alloc__pct {
  font-size: 1.125rem;
  font-weight: 600;
}
.bk-alloc--pour .bk-alloc__tools {
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--bx-inset);
}
@property --bk-mx {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 50%;
}
@property --bk-my {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 50%;
}
@property --bk-rx {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
@property --bk-ry {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

/* ---- trade card (.bk-tcard) — sizes in em so the wall can shrink it ---- */
.bk-tcard {
  --tw: 260px;
  position: relative;
  width: var(--tw);
  font-size: calc(var(--tw) / 260 * 1rem);
  aspect-ratio: 5 / 7;
  border-radius: 1em;
  background: var(--bx-surface);
  color: var(--bx-ink);
  transform: perspective(900px) rotateX(var(--bk-rx, 0deg)) rotateY(var(--bk-ry, 0deg));
  transform-style: preserve-3d;
  transition:
    transform 320ms var(--bx-ease-out),
    box-shadow 320ms;
  box-shadow: var(--bx-shadow-1);
  isolation: isolate;
  overflow: hidden;
}
.bk-tcard {
  transition:
    --bk-mx 300ms var(--bx-ease-out),
    --bk-my 300ms var(--bx-ease-out),
    --bk-rx 300ms var(--bx-ease-out),
    --bk-ry 300ms var(--bx-ease-out),
    box-shadow 320ms;
  backface-visibility: hidden;
}
.bk-tcard[data-active='true'] {
  transition:
    --bk-mx 70ms linear,
    --bk-my 70ms linear,
    --bk-rx 70ms linear,
    --bk-ry 70ms linear,
    box-shadow 320ms;
  box-shadow: var(--bx-shadow-2);
  will-change: transform;
}
.bk-tcard__frame,
.bk-tcard__in,
.bk-tcard__glare,
.bk-tcard__foil,
.bk-tcard__back {
  backface-visibility: hidden;
}
.bk-tcard__in {
  transform: translateZ(1px);
}
.bk-tcard__glare {
  transform: translateZ(2px);
}
.bk-tcard__foil {
  transform: translateZ(3px);
}
.bk-tcard__frame {
  transform: translateZ(4px);
}
.bk-tcard__back {
  transform: translateZ(5px);
}
.bk-tcard__frame {
  position: absolute;
  inset: 0;
  border-radius: 1em;
  padding: 0.22em;
  pointer-events: none;
  z-index: 3;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  background: var(--bx-line-strong);
}
.bk-tcard[data-rarity='rare'] .bk-tcard__frame {
  background: linear-gradient(160deg, var(--bx-accent), #27b3b0);
}
.bk-tcard[data-rarity='holo'] .bk-tcard__frame {
  background: conic-gradient(
    from 210deg at var(--bk-mx, 50%) var(--bk-my, 50%),
    #ff6b8b,
    #ffd84d,
    #5ee2a0,
    #58c7ff,
    #b58bff,
    #ff6b8b
  );
}
.bk-tcard__in {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 0.5em;
  padding: 0.8em;
  z-index: 1;
}
.bk-tcard__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
  min-width: 0;
}
.bk-tcard__firm {
  display: flex;
  align-items: center;
  gap: 0.5em;
  min-width: 0;
}
.bk-tcard__firm b {
  font-size: 0.8125em;
  display: block;
}
.bk-tcard__firm small {
  font-size: 0.6875em;
  color: var(--bx-ink-3);
  display: block;
}
.bk-tcard__art {
  position: relative;
  border-radius: 0.7em;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 0;
  background:
    radial-gradient(
      120% 90% at 50% 100%,
      color-mix(in srgb, var(--bx-accent), transparent 78%),
      transparent 60%
    ),
    linear-gradient(
      180deg,
      var(--bx-inset),
      color-mix(in srgb, var(--bx-inset), var(--bx-surface) 40%)
    );
}
.bk-tcard[data-kind='crypto'] .bk-tcard__art {
  background:
    radial-gradient(
      120% 90% at 50% 100%,
      color-mix(in srgb, #27b3b0, transparent 78%),
      transparent 60%
    ),
    linear-gradient(180deg, var(--bx-inset), var(--bx-surface));
}
.bk-tcard[data-kind='meme'] .bk-tcard__art {
  background:
    radial-gradient(
      120% 90% at 50% 100%,
      color-mix(in srgb, var(--bx-sun), transparent 70%),
      transparent 60%
    ),
    linear-gradient(180deg, var(--bx-inset), var(--bx-surface));
}
.bk-tcard__art img {
  width: 62%;
  max-height: 82%;
  object-fit: contain;
  filter: drop-shadow(0 0.4em 0.6em rgba(22, 26, 38, 0.22));
}
.bk-tcard__title {
  position: absolute;
  left: 0.6em;
  bottom: 0.5em;
  font-size: 0.6875em;
  font-weight: 600;
  color: var(--bx-ink-2);
  background: color-mix(in srgb, var(--bx-surface), transparent 20%);
  padding: 0.2em 0.6em;
  border-radius: 999px;
}
.bk-tcard__body {
  display: grid;
  gap: 0.25em;
}
.bk-tcard__pnl {
  font-size: 1.75em;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}
.bk-tcard__pnl[data-dir='up'] {
  color: var(--bx-up);
}
.bk-tcard__pnl[data-dir='down'] {
  color: var(--bx-down);
}
.bk-tcard__line {
  font-size: 0.8125em;
  font-weight: 600;
  line-height: 1.3;
}
.bk-tcard__row {
  display: flex;
  justify-content: space-between;
  gap: 0.6em;
  font-size: 0.6875em;
  color: var(--bx-ink-2);
  align-items: baseline;
}
.bk-tcard__row b {
  color: var(--bx-ink);
  font-weight: 500;
  white-space: nowrap;
}
.bk-tcard__row .bk-est,
.bk-tcard__row .bk-unit {
  font-size: 0.9em;
  height: 1.6em;
}
.bk-tcard__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5em;
  padding-top: 0.4em;
  border-top: var(--bx-stroke) solid var(--bx-line);
}
.bk-tcard__rarity {
  font-size: 0.625em;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bx-ink-3);
}
.bk-tcard[data-rarity='holo'] .bk-tcard__rarity {
  color: var(--bx-accent-text);
}
.bk-tcard[data-rarity='rare'] .bk-tcard__rarity {
  color: var(--bx-accent-text);
}
.bk-tcard__foot .bk-tag {
  font-size: 0.625em;
  height: 1.7em;
}
/* glare + foil: transform/opacity/background-position only */
.bk-tcard__glare {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    farthest-corner circle at var(--bk-mx, 50%) var(--bk-my, 50%),
    rgba(255, 255, 255, 0.55) 8%,
    rgba(255, 255, 255, 0.15) 32%,
    rgba(0, 0, 0, 0.08) 80%
  );
  mix-blend-mode: overlay;
  transition: opacity 320ms;
}
.bk-tcard__foil {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(255, 107, 139, 0.45) 36%,
    rgba(255, 216, 77, 0.45) 44%,
    rgba(94, 226, 160, 0.45) 52%,
    rgba(88, 199, 255, 0.45) 60%,
    rgba(181, 139, 255, 0.45) 68%,
    transparent 84%
  );
  background-size: 220% 220%;
  background-position: calc(var(--bk-mx, 50%) * 1.4) calc(var(--bk-my, 50%) * 1.4);
  mix-blend-mode: color-dodge;
  filter: brightness(0.9) contrast(1.4);
  transition: opacity 320ms;
}
.bk-tcard[data-rarity='holo'] .bk-tcard__foil {
  opacity: 0.35;
}
.bk-tcard[data-rarity='holo'] .bk-tcard__glare {
  opacity: 0.55;
}
.bk-tcard[data-rarity='rare'] .bk-tcard__glare {
  opacity: 0.3;
}
.bk-tcard[data-active='true'][data-rarity='holo'] .bk-tcard__foil {
  opacity: 0.7;
}
.bk-tcard[data-active='true'][data-rarity='holo'] .bk-tcard__glare {
  opacity: 0.8;
}
.bk-tcard[data-deal] {
  animation: bk-deal 520ms var(--bx-ease-punch);
}
@keyframes bk-deal {
  0% {
    transform: perspective(900px) translateY(-18px) rotateX(24deg) scale(0.96);
    opacity: 0;
  }
  60% {
    transform: perspective(900px) translateY(3px) rotateX(-3deg) scale(1.01);
    opacity: 1;
  }
  100% {
    transform: perspective(900px) rotateX(0) scale(1);
  }
}
.bk-tcard-stage {
  display: grid;
  justify-items: start;
  padding: 6px 0 8px;
}
/* Reduced motion drops the decorative tilt. On the wall the card's own `transform` is its
   position (StickerWall writes translate + rotate), so wall cards are exempt: their tilt is
   already zero under reduced motion and wiping the transform would stack every card at 0,0. */
[data-kit][data-motion='off'] .bk-tcard:not(.bk-wall__card) {
  transform: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .bk-tcard:not(.bk-wall__card) {
    transform: none !important;
  }
}

/* ---- profile card ---- */
.bk-profile-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}
.bk-profile {
  --tier: var(--bx-line-strong);
  border-radius: 16px;
  background: var(--bx-surface);
  border: var(--bx-stroke-control) solid color-mix(in srgb, var(--tier), var(--bx-line) 40%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tier), transparent 88%);
  padding: 14px;
  display: grid;
  gap: 12px;
  min-width: 0;
}
.bk-profile[data-tier='legend'] {
  --tier: var(--bx-sun-deep);
}
.bk-profile[data-tier='pro'] {
  --tier: var(--bx-accent);
}
.bk-profile[data-tier='pup'] {
  --tier: #7c8aa6;
}
.bk-profile__top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.bk-profile__id {
  display: grid;
  gap: 1px;
  min-width: 0;
  flex: 1 1 auto;
}
.bk-profile__id b {
  font-weight: 600;
}
.bk-profile__id small {
  font-size: 0.75rem;
  color: var(--bx-ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bk-profile__tier {
  font-weight: 600;
  color: var(--bx-ink-2);
}
.bk-profile__stats {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr) minmax(0, 0.9fr);
  gap: 8px;
}
.bk-profile__stats > div {
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 10px;
  background: var(--bx-inset);
  min-width: 0;
  overflow: hidden;
}
.bk-profile__stats b {
  font-weight: 600;
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.bk-profile__stats b[data-dir='up'] {
  color: var(--bx-up);
}
.bk-profile__stickers {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 6px 4px;
  border-radius: 12px;
  background: repeating-linear-gradient(
    45deg,
    transparent 0 6px,
    color-mix(in srgb, var(--bx-line), transparent 55%) 6px 7px
  );
}
.bk-sticker {
  --rot: 0deg;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--bx-surface);
  border: 2px solid var(--bx-line-ink);
  box-shadow: 0 2px 0 rgba(var(--bx-ink-rgb), 0.25);
  transform: rotate(var(--rot));
  transition:
    transform 220ms var(--bx-ease-punch),
    box-shadow 220ms;
  cursor: default;
}
.bk-sticker svg {
  width: 20px;
  height: 20px;
  fill: var(--bx-sun-deep);
}
.bk-sticker[data-tone='accent'] svg {
  fill: var(--bx-accent);
}
.bk-sticker[data-tone='ink'] svg {
  fill: var(--bx-ink);
}
.bk-sticker--img img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.bk-sticker:hover {
  transform: rotate(calc(var(--rot) - 8deg)) translateY(-3px) scale(1.06);
  box-shadow: 0 6px 10px rgba(var(--bx-ink-rgb), 0.25);
}
.bk-profile__slot {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 2px dashed var(--bx-line-strong);
}
.bk-profile__foot {
  display: flex;
  justify-content: flex-end;
}

/* ---- the wall ---- */
.bk-wall-wrap {
  display: grid;
  gap: 10px;
}
.bk-wall__bar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.bk-wall__hint {
  margin-inline-start: auto;
}
.bk-wall {
  position: relative;
  height: 440px;
  border-radius: var(--bx-r-card);
  overflow: hidden;
  border: var(--bx-stroke-control) solid color-mix(in srgb, var(--bx-sun-deep), var(--bx-line) 60%);
  background-color: #f1e9d8;
  background-image: radial-gradient(120% 100% at 50% 0%, rgba(255, 255, 255, 0.5), transparent 60%);
  touch-action: none;
  cursor: grab;
  outline-offset: -3px;
}
.bk-wall::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bx-grain);
  opacity: 0.28;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 0;
}
.bk-wall__desk {
  z-index: 1;
}
.bk-wall[data-dragging='true'] {
  cursor: grabbing;
}
[data-kit][data-theme='dark'] .bk-wall {
  background-color: #2b2721;
  background-image: none;
}
[data-kit][data-theme='dark'] .bk-wall::before {
  mix-blend-mode: screen;
  opacity: 0.22;
}
@media (prefers-color-scheme: dark) {
  [data-kit]:not([data-theme='light']) .bk-wall {
    background-color: #2b2721;
    background-image: none;
  }
  [data-kit]:not([data-theme='light']) .bk-wall::before {
    mix-blend-mode: screen;
    opacity: 0.22;
  }
}
.bk-wall__desk {
  position: absolute;
  left: 0;
  top: 0;
  width: 2400px;
  height: 1500px;
  transform-origin: 0 0;
  will-change: transform;
}
.bk-wall__card {
  position: absolute;
  left: 0;
  top: 0;
  cursor: grab;
  transition:
    box-shadow 120ms var(--bx-ease-out),
    filter 120ms var(--bx-ease-out);
}
.bk-wall .bk-tcard {
  --tw: 200px;
}
.bk-wall__card[data-lift='true'] {
  cursor: grabbing;
  box-shadow: 0 18px 40px rgba(22, 26, 38, 0.35);
  filter: brightness(1.02);
}
.bk-wall__card[data-settle] {
  animation: bk-settle-card 320ms var(--bx-ease-punch);
}
@keyframes bk-settle-card {
  0% {
    scale: 1.03;
  }
  60% {
    scale: 0.985;
  }
  100% {
    scale: 1;
  }
}
.bk-wall__card[data-drop] {
  animation: bk-drop 720ms var(--bx-ease-punch);
}
@keyframes bk-drop {
  0% {
    translate: 0 -360px;
    opacity: 0;
  }
  55% {
    translate: 0 10px;
    opacity: 1;
  }
  75% {
    translate: 0 -6px;
  }
  100% {
    translate: 0 0;
  }
}
.bk-wall .bk-tcard {
  transition:
    transform 0s,
    box-shadow 120ms var(--bx-ease-out),
    filter 120ms var(--bx-ease-out);
}
.bk-wall .bk-tcard[data-active='true'] {
  transition: none;
}
.bk-tcard__back {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-content: center;
  gap: 0.4em;
  text-align: center;
  padding: 1em;
  background: var(--bx-ink);
  color: var(--bx-surface);
  border-radius: 1em;
  font-size: 0.8125em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms var(--bx-ease-out);
}
.bk-tcard__back .bk-tag {
  justify-self: center;
}
.bk-tcard[data-flipped='true'] .bk-tcard__back {
  opacity: 1;
}
.bk-tcard[data-flipped='true'] {
  animation: bk-flip 420ms var(--bx-ease-out);
}
@keyframes bk-flip {
  0% {
    transform: perspective(900px) rotateY(0);
  }
  50% {
    transform: perspective(900px) rotateY(90deg) scale(0.98);
  }
  100% {
    transform: perspective(900px) rotateY(0);
  }
}
.bk-wsticker {
  width: 132px;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--bx-surface);
  border: 2px solid var(--bx-line-ink);
  box-shadow: 0 3px 0 rgba(var(--bx-ink-rgb), 0.22);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
}
.bk-wsticker b {
  font-weight: 600;
  min-width: 0;
}
.bk-wsticker small {
  color: var(--bx-ink-3);
  font-family: var(--bx-font-num);
}
.bk-wall__list {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  justify-items: center;
  padding: 6px 0;
}
.bk-wall__list .bk-tcard {
  --tw: 200px;
}
.bk-wall__pinflow {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: var(--bx-stroke-control) solid var(--bx-line-strong);
  background: var(--bx-surface);
}
@media (max-width: 599px) {
  .bk-wall {
    height: 400px;
  }
  .bk-wall__hint {
    display: none;
  }
}

/* ---- round 5: jiggle demo row ---- */
.bk-alloc__lock,
button.bk-moves__pip,
button.bk-power__tier {
  position: relative;
}
button.bk-moves__pip::before,
button.bk-power__tier::before {
  content: '';
  position: absolute;
  left: min(0px, calc(50% - 22px));
  right: min(0px, calc(50% - 22px));
  top: calc(50% - 22px);
  height: 44px;
}
.bk-jiggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
}
.bk-jiggle-row > * {
  flex: 0 0 auto;
}
.bk-jiggle-row .bk-seg {
  min-width: 150px;
}
.bk-jiggle-row .bk-moves__pips {
  gap: 6px;
}
.bk-jiggle-row .bk-amount__quick {
  grid-auto-columns: 48px;
}
.bk-jiggle-row .bk-power__tier {
  cursor: pointer;
  border: 0;
}
.bk-jiggle-row .bk-power__tier[data-tier='mid'] {
  background: var(--bx-accent-soft);
  color: var(--bx-accent-text);
}
.bk-jiggle-row .bk-power__tier[data-tier='high'] {
  background: var(--bx-sun-soft);
  color: var(--bx-sun-deep);
}
.bk-wall img,
.bk-tcard img,
.bk-profile img,
.bk-sticker img,
.bk-asset img,
.bk-hero__bork,
.bk-avatar img,
.bk-candle,
.bk-wsticker img,
.bk-tcard__art,
.bk-sticker {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.bk-wall,
.bk-wall__card,
.bk-wsticker,
.bk-asset,
.bk-profile__stickers {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.bk-tcard__back,
.bk-tcard__stats {
  user-select: text;
  -webkit-user-select: text;
}
.bk-wall__card {
  transition:
    box-shadow 200ms,
    filter 200ms;
}
.bk-tcard__in {
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 0.45em;
  padding: 0.7em;
}
.bk-tcard__pattern {
  position: absolute;
  inset: 0;
  border-radius: 1em;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}
.bk-tcard[data-rarity='common'] .bk-tcard__pattern {
  background: var(--bx-paws);
  background-size: 64px 64px;
  opacity: 0.35;
}
.bk-tcard {
  --kind: var(--bx-accent);
}
.bk-tcard[data-kind='crypto'] {
  --kind: #27b3b0;
}
.bk-tcard[data-kind='meme'] {
  --kind: var(--bx-sun-deep);
}
.bk-tcard[data-rarity='rare'] .bk-tcard__pattern {
  background:
    repeating-linear-gradient(
      45deg,
      color-mix(in srgb, var(--kind), transparent 86%) 0 1px,
      transparent 1px 9px
    ),
    repeating-linear-gradient(
      -45deg,
      color-mix(in srgb, var(--kind), transparent 88%) 0 1px,
      transparent 1px 9px
    );
  opacity: 1;
}
.bk-tcard[data-rarity='holo'] .bk-tcard__pattern {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.22) 0 1.5px, transparent 1.5px 8px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.16) 0 1.5px, transparent 1.5px 8px),
    linear-gradient(
      135deg,
      rgba(255, 107, 139, 0.1),
      rgba(255, 216, 77, 0.1),
      rgba(94, 226, 160, 0.1),
      rgba(88, 199, 255, 0.1),
      rgba(181, 139, 255, 0.1)
    );
  opacity: 0.9;
}
[data-kit][data-theme='dark'] .bk-tcard[data-rarity='holo'] .bk-tcard__pattern {
  opacity: 0.5;
}
.bk-tcard__head,
.bk-tcard__window,
.bk-tcard__stats,
.bk-tcard__foot {
  position: relative;
  z-index: 1;
}
.bk-tcard__head {
  display: flex;
  align-items: center;
  gap: 0.5em;
  min-width: 0;
  padding: 0.35em 0.5em;
  margin: -0.15em -0.15em 0;
  border-radius: 0.7em;
  background: color-mix(in srgb, var(--kind), var(--bx-surface) 88%);
}
.bk-tcard__firm {
  display: grid;
  gap: 0;
  min-width: 0;
  flex: 1 1 auto;
}
.bk-tcard__firm b {
  font-size: 0.8125em;
}
.bk-tcard__firm small {
  font-size: 0.6875em;
  color: var(--bx-ink-3);
}
.bk-tcard__emblem {
  display: grid;
  place-items: center;
  line-height: 1;
  width: 2.6em;
  height: 2.6em;
  border-radius: 0.7em;
  background: var(--kind);
  color: #fff;
  flex: 0 0 auto;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}
.bk-tcard__emblem b {
  font: 700 0.625em/1 var(--bx-font-num);
  letter-spacing: 0.02em;
}
.bk-tcard__emblem small {
  font: 600 0.5em/1 var(--bx-font-ui);
  opacity: 0.85;
  margin-top: 0.3em;
}
[data-kit][data-theme='dark'] .bk-tcard[data-kind='meme'] .bk-tcard__emblem {
  color: #0d1020;
}
.bk-tcard__window {
  position: relative;
  border-radius: 0.7em;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 0;
  border: 2px solid color-mix(in srgb, var(--kind), var(--bx-surface) 60%);
  box-shadow: inset 0 0 0 1px var(--bx-surface);
  background:
    radial-gradient(
      120% 90% at 50% 100%,
      color-mix(in srgb, var(--kind), transparent 74%),
      transparent 60%
    ),
    linear-gradient(
      180deg,
      var(--bx-inset),
      color-mix(in srgb, var(--bx-inset), var(--bx-surface) 40%)
    );
}
.bk-tcard__window img {
  width: 58%;
  max-height: 80%;
  object-fit: contain;
  filter: drop-shadow(0 0.4em 0.6em rgba(22, 26, 38, 0.22));
}
.bk-tcard__ribbon {
  position: absolute;
  left: -2em;
  top: 1.6em;
  transform: rotate(-35deg);
  width: 10em; /* band centre sits inside the window's clip so the whole word shows */
  text-align: center;
  font: 700 0.5625em/1.9 var(--bx-font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #3a2a00;
  background: linear-gradient(180deg, #ffe99a, var(--bx-sun));
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3em;
}
.bk-tcard__ribbon svg.lucide {
  width: 1.1em;
  height: 1.1em;
  stroke-width: 2.4;
}
.bk-tcard__stats {
  display: grid;
  gap: 0.3em;
}
.bk-tcard__grid {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.15em;
}
.bk-tcard__grid > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5em;
  font-size: 0.6875em;
}
.bk-tcard__grid dt {
  color: var(--bx-ink-2);
}
.bk-tcard__grid dd {
  margin: 0;
  color: var(--bx-ink);
  font-weight: 500;
  white-space: nowrap;
}
.bk-tcard__grid .bk-est,
.bk-tcard__grid .bk-unit {
  font-size: 0.9em;
  height: 1.6em;
}
.bk-tcard__foot {
  border-top: 0;
  padding-top: 0.3em;
  gap: 0.4em;
}
.bk-tcard__tag {
  height: 1.7em;
  font-size: 0.6em;
}
.bk-tcard[data-top='true'] {
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--bx-sun), transparent 20%),
    0 10px 30px color-mix(in srgb, var(--bx-sun-deep), transparent 60%),
    var(--bx-shadow-2);
}
.bk-tcard-stage .bk-tcard[data-top='true'] {
  translate: 0 -4px;
}
.bk-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bk-ambient__desk {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
  opacity: 0.55;
  filter: blur(5px) saturate(0.85);
  transform: scale(0.9);
  animation: bk-ambient-drift 120s ease-in-out infinite alternate;
  transition:
    opacity 420ms var(--bx-ease-out),
    filter 420ms var(--bx-ease-out),
    transform 420ms var(--bx-ease-out);
}
.bk-ambient__desk > * {
  position: absolute;
  left: 0;
  top: 0;
}
[data-kit][data-theme='dark'] .bk-ambient__desk {
  opacity: 0.35;
}
@keyframes bk-ambient-drift {
  from {
    translate: 0 0;
  }
  to {
    translate: -90px -50px;
  }
}
.bk-ambient[data-paused='true'] .bk-ambient__desk {
  animation-play-state: paused;
}
.bk-ambient__scrim {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bx-ground) 82%, transparent);
  transition: opacity 420ms var(--bx-ease-out);
}
.bk-ambient-page {
  position: relative;
  z-index: 1;
  transition: opacity 320ms var(--bx-ease-in);
}
.bk-page {
  background: transparent;
}
.bk-ambient__bar {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 3;
  display: flex;
  gap: 10px;
  align-items: center;
}
.bk-ambient-host[data-wall='open'] .bk-ambient {
  pointer-events: auto;
  z-index: 45;
}
.bk-ambient-host[data-wall='open'] .bk-ambient__desk {
  opacity: 0;
}
.bk-ambient-host[data-wall='open'] .bk-ambient__scrim {
  opacity: 0;
}
.bk-ambient-host[data-wall='open'] .bk-ambient-page,
.bk-ambient-host[data-wall='open'] .bk-topbar {
  opacity: 0;
  pointer-events: none;
}
.bk-wall-wrap[data-mode='full'] {
  position: absolute;
  inset: 0;
  gap: 0;
  animation: bk-wall-in 420ms var(--bx-ease-out);
}
.bk-wall-wrap[data-mode='full'] .bk-wall__bar {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 3;
  background: color-mix(in srgb, var(--bx-surface) 88%, transparent);
  backdrop-filter: blur(10px);
  padding: 8px;
  border-radius: 12px;
}
.bk-wall-wrap[data-mode='full'] .bk-wall {
  position: absolute;
  inset: 0;
  height: auto;
  border-radius: 0;
  border: 0;
}
.bk-wall-wrap[data-mode='full'] .bk-wall__list {
  position: absolute;
  inset: 72px 16px 16px;
  overflow: auto;
}
.bk-wall-wrap[data-mode='full'] .bk-wall__pinflow {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 3;
  width: min(420px, calc(100% - 32px));
}
@keyframes bk-wall-in {
  from {
    opacity: 0.4;
    transform: scale(0.92);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}
[data-kit][data-motion='off'] .bk-ambient__desk {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .bk-ambient__desk {
    animation: none;
  }
}
.bk-textarea {
  height: auto;
  padding: 10px 12px;
  border-radius: var(--bx-r-input);
  border: var(--bx-stroke-control) solid var(--bx-line-strong);
  background: var(--bx-surface);
  resize: vertical;
  min-height: 64px;
  font-size: 0.9375rem;
  line-height: 1.4;
  width: 100%;
}
.bk-textarea:focus {
  outline: none;
  border-color: var(--bx-accent);
  box-shadow: 0 0 0 3px rgba(var(--bx-accent-rgb), 0.18);
}
.bk-micro[data-full='true'] .bk-num {
  color: var(--bx-down);
}
.bk-ticket__tags {
  gap: 6px;
}
.bk-note {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.bk-note__text {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--bx-ink-2);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.bk-note[data-expanded='true'] .bk-note__text {
  -webkit-line-clamp: unset;
  display: block;
}
.bk-note__more {
  align-self: start;
  justify-self: start;
  border: 0;
  background: none;
  padding: 0;
  color: var(--bx-accent-text);
  font: 600 0.8125rem/1.4 var(--bx-font-ui);
  cursor: pointer;
  position: relative;
}
.bk-note__more::before {
  content: '';
  position: absolute;
  left: -6px;
  right: -6px;
  top: -6px;
  bottom: -6px;
}
.bk-note__more:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.bk-move__label {
  height: 20px;
  font-size: 0.625rem;
  vertical-align: middle;
  margin-inline-start: 4px;
}
.bk-move__note {
  margin-top: 2px;
}
.bk-tcard__note .bk-note__text {
  color: color-mix(in srgb, var(--bx-surface), transparent 20%);
  text-align: left;
}
.bk-tcard__note .bk-note__more {
  color: #9db3ff;
}
.bk-chart__bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.bk-chart[data-social='off'] .bk-chart__bubbles {
  display: none;
}
.bk-bubble {
  position: absolute;
  width: 44px;
  height: 32px;
  margin: -16px 0 0 -22px; /* 44 wide; 32 tall = the column spacing (BUBBLE_SPACING), so stacked bubbles never steal each other's hit */
  padding: 0;
  border: 0;
  background: none;
  pointer-events: auto;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition:
    opacity var(--bx-dur-fast),
    transform var(--bx-dur-fast) var(--bx-ease-punch);
}
.bk-bubble__face {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--bx-stage-up);
  background: var(--bx-stage);
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.bk-bubble img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}
.bk-bubble[data-side='sell'] .bk-bubble__face {
  border-color: var(--bx-stage-down);
}
.bk-bubble__arrow {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  font-size: 8px;
  line-height: 14px;
  text-align: center;
  font-style: normal;
  background: var(--bx-stage-up);
  color: #0d1020;
  font-weight: 700;
}
.bk-bubble[data-side='sell'] .bk-bubble__arrow {
  background: var(--bx-stage-down);
}
.bk-bubble:hover,
.bk-bubble:focus-visible,
.bk-bubble[aria-expanded='true'] {
  transform: scale(1.18);
  z-index: 2;
}
.bk-bubble:focus-visible {
  outline: none;
}
.bk-bubble:focus-visible .bk-bubble__face {
  outline: 2px solid var(--bx-focus);
  outline-offset: 2px;
}
.bk-bubble[data-dim='true'] {
  opacity: 0.3;
}
/* A dimmed bubble stays a live target: hovering or focusing it brings it back. */
.bk-bubble[data-dim='true']:hover,
.bk-bubble[data-dim='true']:focus-visible {
  opacity: 1;
}
.bk-bubble-more {
  position: absolute;
  margin: -12px 0 0 -14px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  border: 0;
  background: var(--bx-stage-fg);
  color: var(--bx-stage);
  font: 700 0.625rem/20px var(--bx-font-num);
  pointer-events: auto;
  cursor: pointer;
}
.bk-bubble-more::before {
  content: '';
  position: absolute;
  inset: -12px 0 -8px; /* grows upward, and down to the top bubble's hit box (32px below the chip's centre) */
}
.bk-bubble-pop {
  position: absolute;
  z-index: 5;
  width: 240px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bx-surface);
  color: var(--bx-ink);
  border: var(--bx-stroke) solid var(--bx-line);
  box-shadow: var(--bx-shadow-2);
  display: grid;
  gap: 6px;
  font-size: 0.8125rem;
  animation: bk-pop-in 160ms var(--bx-ease-out);
}
@keyframes bk-pop-in {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.bk-bubble-pop__head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.bk-bubble-pop__head b {
  font-weight: 600;
  display: block;
}
.bk-bubble-pop__row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--bx-ink-2);
}
.bk-bubble-pop__row b {
  color: var(--bx-ink);
  font-weight: 500;
}
.bk-bubble-pop .bk-delta[data-dir='up'] {
  color: var(--bx-up);
}
.bk-bubble-pop .bk-delta[data-dir='down'] {
  color: var(--bx-down);
}
.bk-bubble-more {
  min-width: 26px;
}
.bk-bubble-more::before {
  inset: -21px -9px -3px;
}
.bk-bubble-more:hover,
.bk-bubble-more:focus-visible {
  transform: scale(1.1);
}
.bk-bubble-more:focus-visible {
  outline: 2px solid var(--bx-focus);
  outline-offset: 2px;
}
.bk-tmodal-scrim {
  z-index: 53;
}
.bk-tmodal {
  z-index: 54;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr);
}
.bk-portal-host:has(.bk-drawer[data-open='true'], .bk-modal[data-open='true'])
  .bk-dock[data-state='dock'] {
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 160ms var(--bx-ease-in),
    transform 160ms var(--bx-ease-in),
    visibility 0s linear 160ms;
}
.bk-tmodal .bk-modal__head {
  gap: 8px;
}
.bk-tmodal .bk-modal__title {
  white-space: normal;
  line-height: 1.25;
}
.bk-tmodal__back {
  margin-inline-start: -8px !important;
}
.bk-tmodal__view {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}
.bk-tmodal__pane {
  grid-area: 1 / 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 22px 22px;
  transition:
    transform 300ms var(--bx-ease-sheet),
    opacity 220ms var(--bx-ease-out),
    visibility 0s;
}
.bk-tmodal__pane[data-away] {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition:
    transform 300ms var(--bx-ease-sheet),
    opacity 160ms linear,
    visibility 0s linear 300ms;
}
.bk-tmodal__pane--detail[data-away] {
  transform: translateX(36%);
}
.bk-tmodal__pane--list[data-away] {
  transform: translateX(-20%);
}
.bk-tmodal[data-mode='single'] .bk-tmodal__pane--list {
  display: none;
}
.bk-tmodal__filters {
  display: flex;
  gap: 6px;
  padding: 2px 0 10px;
  position: sticky;
  top: 0;
  background: var(--bx-surface);
  z-index: 1;
}
.bk-tmodal__rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.bk-trow {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 60px;
  padding: 8px 8px;
  margin: 0 -8px;
  width: calc(100% + 16px);
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--bx-ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background var(--bx-dur-micro);
}
.bk-trow:hover {
  background: var(--bx-inset);
}
.bk-trow:active {
  transform: scale(0.985);
}
.bk-trow__main {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.bk-trow__top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 0.875rem;
}
.bk-trow__top b {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.bk-trow__note {
  font-size: 0.75rem;
  color: var(--bx-ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bk-trow__right {
  display: grid;
  justify-items: end;
  gap: 4px;
  font-size: 0.8125rem;
}
.bk-trow__right .bk-chip {
  height: 22px;
  padding: 0 8px;
  font-size: 0.6875rem;
}
.bk-side {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--bx-r-pill);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  flex: none;
}
.bk-side[data-side='buy'] {
  background: var(--bx-up-soft);
  color: var(--bx-up);
}
.bk-side[data-side='sell'] {
  background: var(--bx-down-soft);
  color: var(--bx-down);
}
.bk-tmodal .bk-delta[data-dir='up'] {
  color: var(--bx-up);
}
.bk-tmodal .bk-delta[data-dir='down'] {
  color: var(--bx-down);
}
.bk-tdetail {
  display: grid;
  gap: 14px;
  padding-top: 2px;
}
.bk-tdetail__who {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.bk-tdetail__who > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.bk-tdetail__who b {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--bx-ink);
}
.bk-tdetail__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--bx-ink-3);
}
.bk-tdetail__note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bx-inset);
  color: var(--bx-ink);
  font-size: 0.9375rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bk-tdetail__note[data-empty] {
  color: var(--bx-ink-3);
  font-style: italic;
}
@media (max-width: 599px) {
  .bk-tmodal {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: auto;
    max-height: 88dvh;
    border-radius: var(--bx-r-sheet) var(--bx-r-sheet) 0 0;
    border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transform: translateY(104%);
    opacity: 1;
  }
  .bk-tmodal .bk-modal__title {
    font-size: 1.0625rem;
  }
  .bk-tmodal[data-open='true'] {
    transform: translateY(0);
    transition: transform 420ms var(--bx-ease-sheet);
  }
  .bk-tmodal:not([data-open='true']) {
    transition:
      transform var(--bx-dur-exit) var(--bx-ease-in),
      visibility 0s linear var(--bx-dur-exit);
  }
}
@property --bk-dock-tint {
  syntax: '<color>';
  inherits: true;
  initial-value: #8f5e00;
}
.bk-page {
  padding-bottom: 204px;
}
@media (min-width: 900px) {
  .bk-page {
    padding-bottom: 212px;
  }
}
.bk-dock {
  --dock-w: min(calc(100% - 24px), 392px);
  --panel-w: min(calc(100% - 24px), 420px);
  --bk-dock-tint: var(--bx-warn);
  position: fixed;
  z-index: 52;
  left: 0;
  right: 0;
  margin-inline: auto;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  width: var(--dock-w);
  border-radius: 24px;
  overflow: clip;
  color: var(--bx-ink);
  background: color-mix(in srgb, var(--bx-surface) 90%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: var(--bx-stroke-control) solid color-mix(in srgb, var(--bx-accent), var(--bx-line) 72%);
  box-shadow:
    0 1px 2px rgba(var(--bx-ink-rgb), 0.06),
    0 10px 24px -6px rgba(var(--bx-ink-rgb), 0.16),
    0 28px 56px -18px rgba(var(--bx-accent-rgb), 0.3);
  transition:
    --bk-dock-tint 480ms var(--bx-ease-out),
    opacity 220ms var(--bx-ease-out),
    transform 220ms var(--bx-ease-out);
}
.bk-dock[data-perf='up'] {
  --bk-dock-tint: var(--bx-up);
}
.bk-dock[data-perf='down'] {
  --bk-dock-tint: var(--bx-down);
}
.bk-dock[data-perf='flat'] {
  --bk-dock-tint: var(--bx-warn);
}
.bk-dock[data-perf='holo'] {
  --bk-dock-tint: var(--bx-accent);
}
.bk-dock[data-state='panel'],
.bk-dock[data-state='moving'] {
  background: var(--bx-surface);
  box-shadow: var(--bx-shadow-overlay);
}
.bk-dock[data-state='panel'] {
  width: var(--panel-w);
}
.bk-dock[data-state='panel'] .bk-dock__bar {
  display: none;
}
.bk-dock[data-state='moving'] .bk-dock__bar,
.bk-dock[data-state='moving'] .bk-dock__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin-inline: auto;
}
.bk-dock[data-state='moving'] .bk-dock__panel {
  pointer-events: none;
}
.bk-dock__bar {
  display: grid;
  padding: 10px 12px 12px;
}
.bk-dock__top {
  display: grid;
  justify-items: center;
  will-change: opacity, transform;
}
.bk-dock__status {
  justify-self: stretch;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  font-size: 0.75rem;
  line-height: 1.2;
  color: var(--bx-ink-3);
}
.bk-dock__perf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--bx-ink-2);
  white-space: nowrap;
}
.bk-dock__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bk-dock-tint);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bk-dock-tint), transparent 82%);
  flex: none;
}
.bk-dock[data-perf='holo'] .bk-dock__dot {
  background: conic-gradient(#ff6b8b, #ffd84d, #5ee2a0, #58c7ff, #b58bff, #ff6b8b);
  box-shadow: 0 0 0 3px rgba(181, 139, 255, 0.18);
}
.bk-dock__pnl {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 600;
  white-space: nowrap;
}
.bk-dock__pnl svg.lucide {
  width: 12px;
  height: 12px;
  stroke-width: 2.6;
}
.bk-dock__pnl[data-dir='up'] {
  color: var(--bx-up);
}
.bk-dock__pnl[data-dir='down'] {
  color: var(--bx-down);
}
.bk-dock__pnl[data-dir='flat'] {
  color: var(--bx-ink-3);
  font-weight: 500;
}
.bk-dock__tag {
  margin-inline-start: auto;
  flex: none;
}
.bk-dock__tokens {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 10px 0 7px;
}
.bk-token {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: none;
  background: var(--bx-inset);
  box-shadow:
    inset 0 2px 4px rgba(var(--bx-ink-rgb), 0.2),
    inset 0 -1px 0 rgba(255, 255, 255, 0.55);
}
.bk-token::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--bk-dock-tint);
  -webkit-mask: radial-gradient(
    closest-side,
    transparent calc(100% - 3px),
    #000 calc(100% - 2.5px)
  );
  mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
}
.bk-token > i {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  display: block;
  background:
    radial-gradient(
      circle at 34% 28%,
      rgba(255, 255, 255, 0.95) 0 1.5px,
      rgba(255, 255, 255, 0) 3px
    ),
    radial-gradient(
      120% 120% at 30% 18%,
      color-mix(in srgb, var(--bx-accent), #fff 42%) 0%,
      var(--bx-accent) 50%,
      color-mix(in srgb, var(--bx-accent), #000 26%) 100%
    );
  box-shadow:
    inset 0 -2.5px 0 color-mix(in srgb, var(--bx-accent), #000 34%),
    inset 0 1.5px 0 color-mix(in srgb, var(--bx-accent), #fff 50%),
    0 2px 4px -1px rgba(var(--bx-accent-rgb), 0.6);
  transition:
    transform 240ms var(--bx-ease-out),
    opacity 200ms linear;
}
.bk-token > i::after {
  content: '';
  position: absolute;
  left: 22%;
  right: 22%;
  top: 9%;
  height: 34%;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
}
.bk-token[data-spent='true'] > i {
  transform: scale(0.25);
  opacity: 0;
}
.bk-token[data-pop-out] > i {
  animation: bk-token-pop 360ms var(--bx-ease-out) both;
}
@keyframes bk-token-pop {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  30% {
    transform: scale(1.22);
    opacity: 1;
  }
  100% {
    transform: scale(0.25);
    opacity: 0;
  }
}
.bk-dock[data-perf='holo'] .bk-token::before {
  background: conic-gradient(
    from var(--bk-spin, 0deg),
    #ff6b8b,
    #ffd84d,
    #5ee2a0,
    #58c7ff,
    #b58bff,
    #ff6b8b
  );
  animation: bk-spin-ring 3s linear infinite;
}
@property --bk-spin {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
@keyframes bk-spin-ring {
  to {
    --bk-spin: 360deg;
  }
}
.bk-dock__count {
  font-size: 0.8125rem;
  color: var(--bx-ink-3);
  white-space: nowrap;
  padding-bottom: 10px;
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.bk-dock__count b {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--bx-ink);
}
.bk-dock__count strong {
  font-weight: 600;
  color: var(--bx-ink-2);
}
.bk-dock__count .bk-num {
  color: var(--bx-ink-2);
}
.bk-dock__cta {
  --gloss: 26%;
  --lip: 34%;
  --lip-h: 4px;
  width: 100%;
  height: 56px;
  border-radius: 16px;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  gap: 10px;
  overflow: hidden;
  isolation: isolate;
  will-change: opacity;
}
.bk-dock__cta:not(:disabled):not([data-reason]) {
  background-image: linear-gradient(
    180deg,
    color-mix(in srgb, var(--f), #fff var(--gloss)) 0%,
    color-mix(in srgb, var(--f), #fff calc(var(--gloss) / 3)) 48%,
    var(--f) 52%,
    color-mix(in srgb, var(--f), #000 6%) 100%
  );
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--f), #fff 46%),
    inset 0 calc(var(--lip-h) * -1) 0 color-mix(in srgb, var(--f), #000 var(--lip)),
    0 1px 2px rgba(var(--bx-ink-rgb), 0.14),
    0 10px 20px -8px rgba(var(--bx-accent-rgb), 0.7);
}
.bk-dock__cta:not(:disabled):not([data-reason]):active,
.bk-dock__cta.is-pressed {
  transform: scale(0.965);
  background-image: linear-gradient(180deg, color-mix(in srgb, var(--f), #000 8%), var(--f));
  box-shadow:
    inset 0 3px 6px color-mix(in srgb, var(--f), #000 38%),
    inset 0 0 0 1px color-mix(in srgb, var(--f), #000 14%),
    0 1px 2px rgba(var(--bx-ink-rgb), 0.14);
}
.bk-dock__cta > svg.lucide {
  width: 20px;
  height: 20px;
  stroke-width: 2.4;
}
.bk-dock__cta > * {
  position: relative;
  z-index: 1;
}
.bk-dock__cta > :not(.bk-dock__sheen) {
  opacity: var(--lbl, 1);
}
.bk-dock__sheen {
  position: absolute !important;
  inset: 0;
  z-index: 0 !important;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    transparent 30%,
    color-mix(in srgb, var(--f), #fff 60%) 48%,
    color-mix(in srgb, var(--f), #fff 30%) 52%,
    transparent 70%
  );
  opacity: 0.45;
  transform: translateX(-110%);
  animation: bk-dock-sheen 6.4s var(--bx-ease-move) 1.6s infinite;
}
@keyframes bk-dock-sheen {
  0% {
    transform: translateX(-110%);
  }
  16%,
  100% {
    transform: translateX(110%);
  }
}
.bk-dock__cta:disabled .bk-dock__sheen,
.bk-dock__cta[data-reason] .bk-dock__sheen {
  display: none;
}
[data-kit][data-motion='off'] .bk-dock__sheen {
  animation: none;
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .bk-dock__sheen {
    animation: none;
    opacity: 0;
  }
}
.bk-dock__cta-out,
.bk-dock__cta [data-lucide='clock'],
.bk-dock__cta svg.lucide-clock {
  display: none;
}
.bk-dock__cta[data-reason] {
  opacity: 1;
  height: 56px;
}
.bk-dock__cta[data-reason] .bk-dock__cta-in,
.bk-dock__cta[data-reason] svg.lucide-arrow-left-right {
  display: none;
}
.bk-dock__cta[data-reason] .bk-dock__cta-out {
  display: grid;
  justify-items: center;
  gap: 3px;
  line-height: 1.1;
}
.bk-dock__cta[data-reason] svg.lucide-clock {
  display: inline-block;
  width: 18px;
  height: 18px;
}
.bk-dock__cta-out small {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: none;
  color: var(--bx-ink-3);
}
.bk-dock__cta-out span {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--bx-ink-2);
}
.bk-dock__panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: min(calc(100dvh - 88px - env(safe-area-inset-bottom, 0px)), 720px);
  min-height: 0;
}
.bk-dock__panel .bk-drawer__head {
  padding: 16px 12px 6px 20px;
}
.bk-dock__slot {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
}
.bk-dock__slot .bk-drawer__body {
  padding: 4px 20px 12px;
  overflow: auto;
}
.bk-dock__slot .bk-drawer__foot {
  padding: 10px 12px 12px;
  background: transparent;
}
.bk-dock__slot .bk-ticket__cancel {
  display: none;
}
.bk-dock__slot .bk-ticket__confirm {
  height: 56px;
  border-radius: 16px;
  font-size: 1rem;
}
.bk-dock[data-state='moving'] .bk-dock__slot .bk-drawer__body {
  overflow: hidden;
}
.bk-dock__slot {
  position: relative;
}
.bk-dock__slot .bk-drawer__body {
  --ft: 0px;
  --fb: 0px;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent,
    #000 var(--ft),
    #000 calc(100% - var(--fb)),
    transparent
  );
  mask-image: linear-gradient(
    to bottom,
    transparent,
    #000 var(--ft),
    #000 calc(100% - var(--fb)),
    transparent
  );
}
.bk-dock__slot .bk-drawer__body[data-scrolled='true'] {
  --ft: 18px;
}
.bk-dock__slot .bk-drawer__body[data-more='true'] {
  --fb: 18px;
}
@media (max-width: 380px) {
  .bk-dock__tokens {
    gap: 10px;
  }
  .bk-token {
    width: 32px;
    height: 32px;
  }
  .bk-dock__status {
    gap: 6px;
  }
}
[data-kit][data-motion='off'] .bk-dock[data-perf='holo'] .bk-token::before {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .bk-dock[data-perf='holo'] .bk-token::before {
    animation: none;
  }
}
.bk-portal-host:has(.bk-dock) .bk-toasts {
  bottom: calc(var(--bx-dock-h, 0px) + 24px + env(safe-area-inset-bottom, 0px));
}
/* =============================================================================
   Port additions (apps/web only; not in the taster). Keep this section short.
   ============================================================================= */
/* Overlays portal into a body-level host that carries the kit attributes; it has no box of its own. */
.bk-portal-host {
  position: static;
  display: contents;
}
/* Owner amendment v4.1: no native image drag or selection on any portrait, sticker or card art. */
.bk-img {
  -webkit-user-drag: none;
  user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.bk-tcard img,
.bk-tcard__art,
.bk-tcard__frame,
.bk-tcard__foil,
.bk-tcard__glare,
.bk-sticker,
.bk-sticker *,
.bk-wsticker img,
.bk-asset--tile *,
.bk-avatar,
.bk-avatar * {
  -webkit-user-drag: none;
  user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
/* Card body/back text stays selectable — except while a wall drag is active (`body[data-dragging]`,
   the taster's stamp; `.bk-drag-active` is the same gate), so a fast pointer never starts a selection. */
body[data-dragging='true'],
body[data-dragging='true'] *,
body.bk-drag-active,
body.bk-drag-active * {
  user-select: none !important;
  -webkit-user-select: none !important;
}
/* Checkbox (kept on the switch's tokens; the taster has none). */
.bk-check {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  cursor: pointer;
}
.bk-check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.bk-check__box {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: var(--bx-stroke-control) solid var(--bx-line-strong);
  background: var(--bx-surface);
  display: grid;
  place-items: center;
  color: var(--bx-surface);
  flex: 0 0 auto;
  transition:
    background var(--bx-dur-fast),
    border-color var(--bx-dur-fast);
}
.bk-check__box svg.lucide {
  width: 14px;
  height: 14px;
  stroke-width: 3;
  opacity: 0;
  transition: opacity var(--bx-dur-micro);
}
.bk-check input:checked + .bk-check__box {
  background: var(--bx-ink);
  border-color: var(--bx-ink);
}
.bk-check input:checked + .bk-check__box svg.lucide {
  opacity: 1;
}
.bk-check input:focus-visible + .bk-check__box {
  outline: var(--bx-stroke-focus) solid var(--bx-focus);
  outline-offset: 2px;
}
/* The showcase page scrolls inside the app shell's <main>; overlays lock this box, not <body>. */
.bk-scroll-host {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: clip;
  width: 100%;
}
/* Slice D (sticker wall): on the desk the card's own `transform` is its position, so the flip turns with the individual `rotate`/`scale` properties instead of replacing `transform` (which would jump the card to 0,0 for 420ms). */
.bk-wall__card.bk-tcard[data-flipped='true'] {
  animation-name: bk-flip-wall;
}
@keyframes bk-flip-wall {
  0% {
    rotate: y 0deg;
  }
  50% {
    rotate: y 90deg;
    scale: 0.98;
  }
  100% {
    rotate: y 0deg;
  }
}
/* v5: the taster stamps three dark tweaks on `:root[data-theme='dark']` only; the kit also applies
   them under the system-dark query so system-dark renders exactly like stamped dark (Tokens rule). */
@media (prefers-color-scheme: dark) {
  [data-kit]:not([data-theme='light']) .bk-tcard[data-rarity='holo'] .bk-tcard__pattern {
    opacity: 0.5;
  }
  [data-kit]:not([data-theme='light']) .bk-tcard[data-kind='meme'] .bk-tcard__emblem {
    color: #0d1020;
  }
  [data-kit]:not([data-theme='light']) .bk-ambient__desk {
    opacity: 0.35;
  }
}
/* v5: the ambient host wraps the page; the desk layer is fixed behind it. The showcase scroll box
   keeps a stable gutter (the taster's `html { scrollbar-gutter: stable }`). */
.bk-ambient-host {
  position: relative;
  isolation: isolate;
}
.bk-scroll-host {
  scrollbar-gutter: stable;
}
/* Review fixes (2026-09-28). The flipped card's back is the live face: it takes the pointer
   (its note's more/less), the front is hidden from assistive tech (TradeCard toggles aria/inert). */
.bk-tcard[data-flipped='true'] .bk-tcard__back {
  pointer-events: auto;
}
/* A failed confirm's sentence under the hold (caller copy), in the down tone. */
.bk-btn-reason__text[data-tone='down'] {
  color: var(--bx-down);
}
/* The floor's own Proposal tag (the feed is always tagged, wherever it is placed). */
.bk-floor__proposal {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 6px;
}
/* Inline countdown for pills (`CountdownRing size="sm"`): a 20px ring, the time beside it. */
.bk-ring-clock--sm {
  grid-template-columns: 20px auto;
  gap: 6px;
}
.bk-ring-clock--sm svg {
  width: 20px;
  height: 20px;
}
.bk-ring-clock--sm circle {
  stroke-width: 8;
}
.bk-ring-clock--sm .bk-ring-clock__text {
  display: block;
}
/* `ButtonLink` is an anchor with the button face: no underline. */
a.bk-btn {
  text-decoration: none;
}
/* `variant="link"`: an inline text action in the accent, no face, still a 44px hit height. */
.bk-btn--link {
  --face: transparent;
  --face-hover: transparent;
  --edge: transparent;
  --fg: var(--bx-accent);
  min-width: 0;
  padding: 0 4px;
  box-shadow: none;
  background-image: none;
}
.bk-btn--link:hover .bk-btn__label,
.bk-btn--link:focus-visible .bk-btn__label {
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* `Switch labelPosition="start"`: label first, track last; `block` spreads them across the row. */
.bk-switch--start {
  flex-direction: row-reverse;
  justify-content: flex-end;
}
.bk-switch--block {
  display: flex;
  width: 100%;
}
.bk-switch--start.bk-switch--block {
  justify-content: space-between;
}
