{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "leaderboard-table",
  "title": "Leaderboard",
  "description": "Leaderboard is a production-ready tables component from BJORK UI, packaged for shadcn registries.",
  "dependencies": [
    "clsx",
    "framer-motion",
    "next-themes",
    "tailwind-merge"
  ],
  "files": [
    {
      "path": "components/bjork-ui/tables/leaderboard-table.tsx",
      "content": "\"use client\";\n\nimport {\n  useEffect,\n  useId,\n  useMemo,\n  useRef,\n  useState,\n  useSyncExternalStore,\n  type KeyboardEvent,\n} from \"react\";\nimport { LayoutGroup, motion, useReducedMotion } from \"framer-motion\";\nimport { useTheme } from \"next-themes\";\nimport { cn } from \"@/lib/utils\";\nimport { useElementSize } from \"../_core/canvas\";\nimport {\n  type BjorkTableThemeMode,\n  getBjorkSignalPalette,\n  getBjorkTablePalette,\n  useBjorkTableIsDark,\n} from \"./table-theme\";\n\nexport type LeaderboardPeriod = \"week\" | \"month\" | \"all\";\n\nexport interface LeaderboardEntry {\n  id: string;\n  handle: string;\n  /** Team, crew or region shown under the handle. */\n  team: string;\n  score: number;\n  /** Rank at the end of the previous period. `null` marks a new entrant. */\n  previousRank: number | null;\n  /** Win rate between 0 and 1. */\n  winRate: number;\n  /** Positive for a win streak, negative for a losing streak. */\n  streak: number;\n}\n\nexport interface LeaderboardTableProps {\n  /** Entries for every period. Used when `entries` is not passed. */\n  entriesByPeriod?: Partial<Record<LeaderboardPeriod, LeaderboardEntry[]>>;\n  /** Entries for the active period when you fetch them yourself in `onPeriodChange`. */\n  entries?: LeaderboardEntry[];\n  currentUserId?: string;\n  defaultPeriod?: LeaderboardPeriod;\n  /** Controlled period. */\n  period?: LeaderboardPeriod;\n  onPeriodChange?: (period: LeaderboardPeriod) => void;\n  title?: string;\n  scoreLabel?: string;\n  /** Height of the scrolling list. The current user's row pins to its bottom edge. */\n  maxHeight?: number;\n  loading?: boolean;\n  className?: string;\n  theme?: BjorkTableThemeMode;\n  enableAnimations?: boolean;\n}\n\nconst PERIODS: { value: LeaderboardPeriod; label: string }[] = [\n  { value: \"week\", label: \"Week\" },\n  { value: \"month\", label: \"Month\" },\n  { value: \"all\", label: \"All time\" },\n];\n\ntype Seed = [id: string, handle: string, team: string];\n\nconst PLAYERS: Seed[] = [\n  [\"p01\", \"quietfox\", \"Harbor · EU West\"],\n  [\"p02\", \"lune.ash\", \"Kestrel · NA East\"],\n  [\"p03\", \"t.varga\", \"Ninefold · EU Central\"],\n  [\"p04\", \"okapi_runs\", \"Harbor · Africa\"],\n  [\"p05\", \"brindle\", \"Saltmarsh · NA West\"],\n  [\"p06\", \"r.ilunga\", \"Kestrel · Africa\"],\n  [\"p07\", \"kestrel9\", \"Kestrel · APAC\"],\n  [\"p08\", \"nori.k\", \"Ninefold · APAC\"],\n  [\"p09\", \"halcyon_d\", \"Saltmarsh · EU West\"],\n  [\"p10\", \"pebbleworks\", \"Harbor · NA East\"],\n  [\"p11\", \"s.amadi\", \"Ninefold · Africa\"],\n  [\"p12\", \"fernwhistle\", \"Saltmarsh · APAC\"],\n  [\"p13\", \"ivo.petrak\", \"Kestrel · EU Central\"],\n  [\"p14\", \"driftwood\", \"Harbor · NA West\"],\n  [\"p15\", \"moth_lantern\", \"Ninefold · NA East\"],\n  [\"p16\", \"c.oyelaran\", \"Saltmarsh · Africa\"],\n];\n\nfunction build(\n  rows: [id: string, score: number, previousRank: number | null, winRate: number, streak: number][]\n): LeaderboardEntry[] {\n  return rows.map(([id, score, previousRank, winRate, streak]) => {\n    const seed = PLAYERS.find((player) => player[0] === id)!;\n    return { id, handle: seed[1], team: seed[2], score, previousRank, winRate, streak };\n  });\n}\n\nexport const LEADERBOARD_TABLE_SAMPLE: Record<LeaderboardPeriod, LeaderboardEntry[]> = {\n  week: build([\n    [\"p02\", 4_812, 4, 0.81, 7],\n    [\"p01\", 4_655, 1, 0.77, 3],\n    [\"p07\", 4_390, 2, 0.74, -1],\n    [\"p05\", 4_204, 9, 0.71, 5],\n    [\"p03\", 4_118, 3, 0.69, 2],\n    [\"p09\", 3_960, null, 0.72, 4],\n    [\"p06\", 3_874, 5, 0.66, -2],\n    [\"p12\", 3_702, 8, 0.64, 1],\n    [\"p08\", 3_655, 6, 0.63, -1],\n    [\"p04\", 3_511, 7, 0.6, 2],\n    [\"p11\", 3_390, 13, 0.61, 3],\n    [\"p10\", 3_247, 10, 0.58, -3],\n    [\"p15\", 3_110, 12, 0.57, 1],\n    [\"p14\", 2_986, 17, 0.55, 2],\n    [\"p13\", 2_874, 11, 0.52, -1],\n    [\"p16\", 2_701, 14, 0.5, -2],\n  ]),\n  month: build([\n    [\"p01\", 18_420, 1, 0.76, 3],\n    [\"p07\", 17_865, 3, 0.73, -1],\n    [\"p02\", 17_310, 2, 0.78, 7],\n    [\"p03\", 16_902, 6, 0.7, 2],\n    [\"p06\", 15_744, 4, 0.67, -2],\n    [\"p05\", 15_120, 5, 0.69, 5],\n    [\"p08\", 14_655, 7, 0.64, -1],\n    [\"p04\", 14_212, 12, 0.62, 2],\n    [\"p12\", 13_870, 8, 0.63, 1],\n    [\"p10\", 13_402, 9, 0.59, -3],\n    [\"p13\", 12_955, 10, 0.56, -1],\n    [\"p09\", 12_611, 15, 0.7, 4],\n    [\"p11\", 12_240, 11, 0.6, 3],\n    [\"p15\", 11_906, 16, 0.57, 1],\n    [\"p14\", 11_480, 14, 0.55, 2],\n    [\"p16\", 10_932, 13, 0.51, -2],\n  ]),\n  all: build([\n    [\"p07\", 212_480, 1, 0.71, -1],\n    [\"p01\", 208_115, 2, 0.74, 3],\n    [\"p03\", 196_702, 3, 0.68, 2],\n    [\"p02\", 188_940, 5, 0.75, 7],\n    [\"p06\", 181_366, 4, 0.66, -2],\n    [\"p08\", 176_020, 6, 0.63, -1],\n    [\"p10\", 169_455, 7, 0.6, -3],\n    [\"p13\", 163_810, 8, 0.57, -1],\n    [\"p04\", 158_200, 10, 0.61, 2],\n    [\"p05\", 154_675, 9, 0.66, 5],\n    [\"p12\", 149_930, 11, 0.62, 1],\n    [\"p16\", 141_208, 12, 0.53, -2],\n    [\"p11\", 137_644, 14, 0.59, 3],\n    [\"p15\", 131_290, 13, 0.56, 1],\n    [\"p14\", 126_875, 15, 0.54, 2],\n    [\"p09\", 98_412, null, 0.69, 4],\n  ]),\n};\n\nconst subscribeNoop = () => () => {};\n\n// False during SSR and hydration, true afterwards.\nfunction useMounted() {\n  return useSyncExternalStore(subscribeNoop, () => true, () => false);\n}\n\nfunction initials(handle: string) {\n  const parts = handle.split(/[._\\-\\d]+/).filter(Boolean);\n  if (parts.length >= 2) return (parts[0][0] + parts[1][0]).toUpperCase();\n  return handle.slice(0, 2).toUpperCase();\n}\n\nconst numberFormat = new Intl.NumberFormat(\"en-US\");\n\nexport function LeaderboardTable({\n  entriesByPeriod = LEADERBOARD_TABLE_SAMPLE,\n  entries: entriesOverride,\n  currentUserId = \"p14\",\n  defaultPeriod = \"month\",\n  period: controlledPeriod,\n  onPeriodChange,\n  title = \"Season 4 ladder\",\n  scoreLabel = \"Points\",\n  maxHeight = 520,\n  loading = false,\n  className,\n  theme = \"auto\",\n  enableAnimations = true,\n}: LeaderboardTableProps) {\n  const mounted = useMounted();\n  const { resolvedTheme } = useTheme();\n  const forcedTheme = theme === \"auto\" ? undefined : theme;\n  const detectedIsDark = useBjorkTableIsDark(resolvedTheme, forcedTheme);\n  const isDark = !mounted && theme === \"auto\" ? true : detectedIsDark;\n  const palette = getBjorkTablePalette(isDark);\n  const shouldReduceMotion = useReducedMotion();\n  const shouldAnimate = enableAnimations && !shouldReduceMotion;\n\n  const [uncontrolledPeriod, setUncontrolledPeriod] = useState<LeaderboardPeriod>(defaultPeriod);\n  const period = controlledPeriod ?? uncontrolledPeriod;\n  const [instant, setInstant] = useState(false);\n  const [hasMountedRows, setHasMountedRows] = useState(false);\n  const rootRef = useRef<HTMLDivElement>(null);\n  const scrollRef = useRef<HTMLDivElement>(null);\n  const userRowRef = useRef<HTMLTableRowElement>(null);\n  const [userPinned, setUserPinned] = useState(false);\n  const { width: rootWidth } = useElementSize(rootRef);\n  const layout = rootWidth > 0 && rootWidth < 560 ? \"narrow\" : \"wide\";\n  const uid = useId();\n  const tabRefs = useRef<(HTMLButtonElement | null)[]>([]);\n\n  const ranked = useMemo(() => {\n    const source = entriesOverride ?? entriesByPeriod[period] ?? [];\n    return [...source]\n      .sort((a, b) => b.score - a.score)\n      .map((entry, index) => ({ ...entry, rank: index + 1 }));\n  }, [entriesOverride, entriesByPeriod, period]);\n\n  const leaderScore = ranked[0]?.score ?? 0;\n  const hasUser = ranked.some((entry) => entry.id === currentUserId);\n\n  useEffect(() => {\n    const timer = window.setTimeout(() => setHasMountedRows(true), 900);\n    return () => window.clearTimeout(timer);\n  }, []);\n\n  // A sticky row is \"pinned\" while it sits clipped against the bottom edge.\n  useEffect(() => {\n    const row = userRowRef.current;\n    const root = scrollRef.current;\n    if (!row || !root || typeof IntersectionObserver === \"undefined\") return;\n    const observer = new IntersectionObserver(\n      ([entry]) => {\n        const rootTop = entry.rootBounds?.top ?? 0;\n        setUserPinned(entry.intersectionRatio < 1 && entry.boundingClientRect.top > rootTop);\n      },\n      { root, rootMargin: \"0px 0px -1px 0px\", threshold: [0, 1] }\n    );\n    observer.observe(row);\n    return () => observer.disconnect();\n  }, [hasUser, period, ranked.length, loading]);\n\n  const selectPeriod = (next: LeaderboardPeriod, fromKeyboard: boolean) => {\n    setInstant(fromKeyboard);\n    if (controlledPeriod === undefined) setUncontrolledPeriod(next);\n    onPeriodChange?.(next);\n  };\n\n  const onTabKey = (event: KeyboardEvent<HTMLButtonElement>, index: number) => {\n    let next = -1;\n    if (event.key === \"ArrowRight\") next = (index + 1) % PERIODS.length;\n    if (event.key === \"ArrowLeft\") next = (index - 1 + PERIODS.length) % PERIODS.length;\n    if (event.key === \"Home\") next = 0;\n    if (event.key === \"End\") next = PERIODS.length - 1;\n    if (next < 0) return;\n    event.preventDefault();\n    selectPeriod(PERIODS[next].value, true);\n    tabRefs.current[next]?.focus();\n  };\n\n  const strongText = isDark ? \"text-[#ededed]\" : \"text-[#171717]\";\n  const surface = isDark ? \"bg-[#111]\" : \"bg-[#fffcf6]\";\n  const headerSurface = isDark ? \"bg-[#181818]\" : \"bg-[#fbf7ef]\";\n  const podiumSurface = isDark ? \"bg-[#151515]\" : \"bg-[#fcf8f1]\";\n  const userSurface = isDark ? \"bg-[#1a1512]\" : \"bg-[#fbf1e8]\";\n  const focusRing = \"outline-none focus-visible:ring-2 focus-visible:ring-[#ec5c13]/50\";\n  const headerLabel = \"text-[11px] font-medium uppercase tracking-[0.08em]\";\n  const green = getBjorkSignalPalette(\"green\", isDark);\n  const red = getBjorkSignalPalette(\"red\", isDark);\n  const orange = getBjorkSignalPalette(\"orange\", isDark);\n  const neutral = getBjorkSignalPalette(\"neutral\", isDark);\n  const wide = layout === \"wide\";\n  const animateLayout = shouldAnimate && !instant;\n  const periodLabel = PERIODS.find((p) => p.value === period)?.label ?? \"\";\n\n  const renderChange = (entry: (typeof ranked)[number]) => {\n    if (entry.previousRank === null) {\n      return (\n        <span className={cn(\"inline-flex rounded-[6px] border px-1.5 py-[1px] text-[11px] font-medium\", orange.bgColor, orange.borderColor, orange.textColor)}>\n          New<span className=\"sr-only\"> entrant</span>\n        </span>\n      );\n    }\n    const delta = entry.previousRank - entry.rank;\n    if (delta === 0) {\n      return (\n        <span className={cn(\"text-[12px]\", neutral.textColor)}>\n          <span aria-hidden=\"true\">—</span>\n          <span className=\"sr-only\">No change</span>\n        </span>\n      );\n    }\n    const up = delta > 0;\n    const tone = up ? green : red;\n    return (\n      <span className={cn(\"inline-flex items-center gap-0.5 text-[12px] font-medium tabular-nums\", tone.textColor)}>\n        <span aria-hidden=\"true\" className=\"text-[10px]\">{up ? \"▲\" : \"▼\"}</span>\n        <span aria-hidden=\"true\">{Math.abs(delta)}</span>\n        <span className=\"sr-only\">\n          {up ? \"Up\" : \"Down\"} {Math.abs(delta)} {Math.abs(delta) === 1 ? \"place\" : \"places\"}\n        </span>\n      </span>\n    );\n  };\n\n  const renderRank = (rank: number, isUser: boolean) => {\n    if (rank <= 3) {\n      return (\n        <span\n          className={cn(\n            \"inline-flex size-6 items-center justify-center rounded-full border text-[12px] font-semibold tabular-nums\",\n            rank === 1\n              ? cn(palette.accentBg, palette.accentBorder, palette.accent)\n              : isDark\n                ? \"border-[#2c2c2c] bg-[#1d1d1d] text-[#ededed]/80\"\n                : \"border-[#e6dccb] bg-[#f5eee2] text-[#171717]/75\"\n          )}\n        >\n          {rank}\n        </span>\n      );\n    }\n    return (\n      <span className={cn(\"inline-flex w-6 justify-center text-[13px] tabular-nums\", isUser ? palette.accent : palette.secondaryText)}>\n        {rank}\n      </span>\n    );\n  };\n\n  const cellBase = cn(\"border-b px-3\", palette.divider);\n\n  return (\n    <div ref={rootRef} className={cn(\"mx-auto w-full max-w-[880px]\", className)}>\n      <div className={cn(\"relative overflow-hidden rounded-[18px] border\", palette.container)}>\n        <div className={cn(\"flex flex-wrap items-center justify-between gap-3 border-b px-4 py-3\", palette.divider)}>\n          <div className=\"min-w-0\">\n            <p className={cn(\"text-[13px] font-medium\", palette.primaryText)}>{title}</p>\n            <p className={cn(\"text-[12px] tabular-nums\", palette.secondaryText)}>\n              {ranked.length} players · {periodLabel.toLowerCase()}\n            </p>\n          </div>\n          <div\n            role=\"tablist\"\n            aria-label=\"Leaderboard period\"\n            className={cn(\"inline-flex rounded-[10px] border p-0.5\", palette.divider, palette.mutedSurface)}\n          >\n            {PERIODS.map((option, index) => {\n              const selected = option.value === period;\n              return (\n                <button\n                  key={option.value}\n                  ref={(node) => {\n                    tabRefs.current[index] = node;\n                  }}\n                  type=\"button\"\n                  role=\"tab\"\n                  id={`${uid}-tab-${option.value}`}\n                  aria-selected={selected}\n                  aria-controls={`${uid}-panel`}\n                  tabIndex={selected ? 0 : -1}\n                  onClick={(event) => selectPeriod(option.value, event.detail === 0)}\n                  onKeyDown={(event) => onTabKey(event, index)}\n                  className={cn(\n                    \"relative rounded-[8px] px-3 py-1 text-[12.5px] font-medium transition-colors\",\n                    focusRing,\n                    selected ? strongText : palette.secondaryText\n                  )}\n                >\n                  {selected && (\n                    <motion.span\n                      layoutId={animateLayout ? `${uid}-period-pill` : undefined}\n                      transition={{ type: \"spring\", stiffness: 520, damping: 40 }}\n                      aria-hidden=\"true\"\n                      className={cn(\n                        \"absolute inset-0 rounded-[8px] border\",\n                        isDark ? \"border-[#2a2a2a] bg-[#202020]\" : \"border-[#eadfce] bg-[#fffcf6] shadow-[var(--bjork-shadow-soft)]\"\n                      )}\n                    />\n                  )}\n                  <span className=\"relative\">{option.label}</span>\n                </button>\n              );\n            })}\n          </div>\n        </div>\n\n        <div\n          ref={scrollRef}\n          id={`${uid}-panel`}\n          role=\"tabpanel\"\n          aria-labelledby={`${uid}-tab-${period}`}\n          tabIndex={0}\n          className={cn(\"relative overflow-auto overscroll-contain\", focusRing, \"focus-visible:ring-inset\")}\n          style={{ maxHeight }}\n        >\n          <table className=\"w-full table-fixed border-separate border-spacing-0\">\n            <caption className=\"sr-only\">\n              {title}, {periodLabel} rankings{hasUser ? \". Your row stays pinned to the bottom while scrolled away.\" : \"\"}\n            </caption>\n            <colgroup>\n              <col style={{ width: wide ? 64 : 44 }} />\n              <col style={{ width: wide ? 72 : 52 }} />\n              <col />\n              <col style={{ width: wide ? 200 : 84 }} />\n              {wide && <col style={{ width: 92 }} />}\n              {wide && <col style={{ width: 84 }} />}\n            </colgroup>\n            <thead>\n              <tr className={palette.header}>\n                {[\n                  { label: \"Rank\", align: \"text-center\" },\n                  { label: wide ? \"Change\" : \"+/−\", align: \"text-left\", sr: \"Rank change\" },\n                  { label: \"Player\", align: \"text-left\" },\n                  { label: scoreLabel, align: \"text-right\" },\n                  ...(wide\n                    ? [\n                        { label: \"Win rate\", align: \"text-right\" },\n                        { label: \"Streak\", align: \"text-right\" },\n                      ]\n                    : []),\n                ].map((column) => (\n                  <th\n                    key={column.label}\n                    scope=\"col\"\n                    className={cn(\n                      \"sticky top-0 z-20 border-b px-3 py-2.5\",\n                      headerSurface,\n                      palette.divider,\n                      headerLabel,\n                      column.align\n                    )}\n                  >\n                    {column.sr ? (\n                      <>\n                        <span aria-hidden=\"true\">{column.label}</span>\n                        <span className=\"sr-only\">{column.sr}</span>\n                      </>\n                    ) : (\n                      column.label\n                    )}\n                  </th>\n                ))}\n              </tr>\n            </thead>\n            <LayoutGroup id={uid}>\n              <tbody aria-busy={loading || undefined}>\n                {loading\n                  ? Array.from({ length: 8 }, (_, row) => (\n                      <tr key={row}>\n                        <td className={cn(cellBase, \"py-3\")}>\n                          <span className={cn(\"mx-auto block size-6 animate-pulse rounded-full motion-reduce:animate-none\", palette.mutedSurface)} />\n                        </td>\n                        <td className={cn(cellBase, \"py-3\")}>\n                          <span className={cn(\"block h-2.5 w-6 animate-pulse rounded-full motion-reduce:animate-none\", palette.mutedSurface)} />\n                        </td>\n                        <td className={cn(cellBase, \"py-3\")}>\n                          <span className=\"flex items-center gap-2.5\">\n                            <span className={cn(\"size-8 shrink-0 animate-pulse rounded-full motion-reduce:animate-none\", palette.mutedSurface)} />\n                            <span className={cn(\"block h-2.5 animate-pulse rounded-full motion-reduce:animate-none\", palette.mutedSurface)} style={{ width: `${40 + ((row * 23) % 40)}%` }} />\n                          </span>\n                        </td>\n                        <td className={cn(cellBase, \"py-3\")}>\n                          <span className={cn(\"ml-auto block h-2.5 w-16 animate-pulse rounded-full motion-reduce:animate-none\", palette.mutedSurface)} />\n                        </td>\n                        {wide && (\n                          <>\n                            <td className={cn(cellBase, \"py-3\")}>\n                              <span className={cn(\"ml-auto block h-2.5 w-9 animate-pulse rounded-full motion-reduce:animate-none\", palette.mutedSurface)} />\n                            </td>\n                            <td className={cn(cellBase, \"py-3\")}>\n                              <span className={cn(\"ml-auto block h-2.5 w-7 animate-pulse rounded-full motion-reduce:animate-none\", palette.mutedSurface)} />\n                            </td>\n                          </>\n                        )}\n                      </tr>\n                    ))\n                  : ranked.map((entry, index) => {\n                      const isUser = entry.id === currentUserId;\n                      const podium = entry.rank <= 3;\n                      const share = leaderScore > 0 ? entry.score / leaderScore : 0;\n                      const rowSurface = isUser ? userSurface : podium ? podiumSurface : surface;\n                      const stickyCell = isUser\n                        ? cn(\n                            \"sticky bottom-0 z-10\",\n                            \"before:pointer-events-none before:absolute before:inset-x-0 before:bottom-full before:h-5 before:bg-gradient-to-t before:to-transparent before:transition-opacity before:duration-200\",\n                            isDark ? \"before:from-[rgba(0,0,0,0.45)]\" : \"before:from-[rgba(66,52,33,0.09)]\",\n                            userPinned\n                              ? cn(\"before:opacity-100\", isDark ? \"border-t border-t-[#2e241e]\" : \"border-t border-t-[#eadbc9]\")\n                              : \"before:opacity-0\"\n                          )\n                        : \"\";\n                      const td = cn(cellBase, \"py-2.5\", rowSurface, stickyCell);\n                      return (\n                        <motion.tr\n                          key={entry.id}\n                          ref={isUser ? userRowRef : undefined}\n                          layout={animateLayout ? \"position\" : false}\n                          initial={shouldAnimate && !hasMountedRows ? { opacity: 0, y: 8 } : false}\n                          animate={{ opacity: 1, y: 0 }}\n                          transition={{\n                            layout: { type: \"spring\", stiffness: 380, damping: 36, mass: 0.8 },\n                            opacity: { duration: 0.24, delay: hasMountedRows ? 0 : index * 0.03 },\n                            y: { type: \"spring\", stiffness: 420, damping: 32, delay: hasMountedRows ? 0 : index * 0.03 },\n                          }}\n                          aria-current={isUser ? \"true\" : undefined}\n                          className=\"group/row\"\n                        >\n                          <td className={cn(td, !isUser && \"relative\", \"text-center\")}>\n                            {isUser && (\n                              <span aria-hidden=\"true\" className={cn(\"absolute inset-y-1.5 left-0 w-[3px] rounded-r-full\", isDark ? \"bg-[#d86a2c]\" : \"bg-[#bd4514]\")} />\n                            )}\n                            {renderRank(entry.rank, isUser)}\n                          </td>\n                          <td className={td}>{renderChange(entry)}</td>\n                          <th scope=\"row\" className={cn(td, \"text-left font-normal\")}>\n                            <span className=\"flex min-w-0 items-center gap-2.5\">\n                              <span\n                                aria-hidden=\"true\"\n                                className={cn(\n                                  \"inline-flex size-8 shrink-0 items-center justify-center rounded-full border text-[11px] font-semibold tracking-tight\",\n                                  isUser\n                                    ? cn(palette.accentBg, palette.accentBorder, palette.accent)\n                                    : isDark\n                                      ? \"border-[#2a2a2a] bg-[#1b1b1b] text-[#ededed]/62\"\n                                      : \"border-[#eadfce] bg-[#f8f2e7] text-[#171717]/60\"\n                                )}\n                              >\n                                {initials(entry.handle)}\n                              </span>\n                              <span className=\"min-w-0\">\n                                <span className=\"flex min-w-0 items-center gap-1.5\">\n                                  <span className={cn(\"truncate text-[13px] font-medium\", strongText, !isUser && \"opacity-90\")}>\n                                    {entry.handle}\n                                  </span>\n                                  {isUser && (\n                                    <span className={cn(\"shrink-0 rounded-[5px] px-1 py-[1px] text-[11px] font-medium uppercase tracking-[0.06em]\", palette.accentBg, palette.accent)}>\n                                      You\n                                    </span>\n                                  )}\n                                </span>\n                                <span className={cn(\"block truncate text-[11.5px]\", palette.secondaryText)}>\n                                  {entry.team}\n                                </span>\n                              </span>\n                            </span>\n                          </th>\n                          <td className={cn(td, \"text-right\")}>\n                            <span className=\"flex items-center justify-end gap-3\">\n                              {wide && (\n                                <span\n                                  aria-hidden=\"true\"\n                                  className={cn(\"relative h-1 w-[72px] shrink-0 overflow-hidden rounded-full\", isDark ? \"bg-[#ededed]/8\" : \"bg-[#171717]/8\")}\n                                >\n                                  <motion.span\n                                    className={cn(\n                                      \"absolute inset-y-0 left-0 origin-left rounded-full\",\n                                      entry.rank === 1 || isUser\n                                        ? isDark\n                                          ? \"bg-[#d86a2c]\"\n                                          : \"bg-[#bd4514]\"\n                                        : isDark\n                                          ? \"bg-[#ededed]/38\"\n                                          : \"bg-[#171717]/34\"\n                                    )}\n                                    style={{ width: \"100%\" }}\n                                    initial={false}\n                                    animate={{ scaleX: share }}\n                                    transition={animateLayout ? { type: \"spring\", stiffness: 260, damping: 32 } : { duration: 0 }}\n                                  />\n                                </span>\n                              )}\n                              <span className={cn(\"text-[13px] font-medium tabular-nums\", strongText)}>\n                                {numberFormat.format(entry.score)}\n                              </span>\n                            </span>\n                            {wide && <span className=\"sr-only\">, {Math.round(share * 100)}% of the leader</span>}\n                            {!wide && (\n                              <span className={cn(\"block text-[11.5px] tabular-nums\", palette.secondaryText)}>\n                                {Math.round(entry.winRate * 100)}% wins\n                              </span>\n                            )}\n                          </td>\n                          {wide && (\n                            <>\n                              <td className={cn(td, \"text-right text-[13px] tabular-nums\", palette.primaryText)}>\n                                {(entry.winRate * 100).toFixed(1)}%\n                              </td>\n                              <td className={cn(td, \"text-right\")}>\n                                <span\n                                  className={cn(\n                                    \"text-[12.5px] font-medium tabular-nums\",\n                                    entry.streak >= 3 ? green.textColor : entry.streak < 0 ? red.textColor : palette.primaryText\n                                  )}\n                                >\n                                  <span aria-hidden=\"true\">{entry.streak >= 0 ? \"W\" : \"L\"}{Math.abs(entry.streak)}</span>\n                                  <span className=\"sr-only\">\n                                    {Math.abs(entry.streak)} {entry.streak >= 0 ? \"win\" : \"loss\"} streak\n                                  </span>\n                                </span>\n                              </td>\n                            </>\n                          )}\n                        </motion.tr>\n                      );\n                    })}\n              </tbody>\n            </LayoutGroup>\n          </table>\n          {!loading && ranked.length === 0 && (\n            <div className=\"flex flex-col items-center gap-1 px-6 py-14 text-center\">\n              <p className={cn(\"text-[14px] font-medium\", palette.primaryText)}>No rankings yet</p>\n              <p className={cn(\"text-[13px]\", palette.secondaryText)}>Scores for this period appear after the first match.</p>\n            </div>\n          )}\n        </div>\n      </div>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "@components/bjork-ui/tables/leaderboard-table.tsx"
    },
    {
      "path": "lib/utils.ts",
      "content": "import { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs))\n}\n",
      "type": "registry:lib",
      "target": "@lib/utils.ts"
    },
    {
      "path": "components/bjork-ui/_core/canvas.ts",
      "content": "\"use client\";\n\nimport { useEffect, useState, type RefObject } from \"react\";\nimport { isCoarsePointer } from \"./loop\";\n\n// Caps DPR at 1.5 on coarse pointers and 2 otherwise.\nexport function defaultMaxDpr(): number {\n  return isCoarsePointer() ? 1.5 : 2;\n}\n\n// Sets the backing size for a CSS box and returns the DPR used.\nexport function sizeCanvas(\n  canvas: HTMLCanvasElement,\n  cssW: number,\n  cssH: number,\n  maxDpr: number = defaultMaxDpr(),\n): number {\n  const dpr = Math.min(typeof window !== \"undefined\" ? window.devicePixelRatio || 1 : 1, maxDpr);\n  canvas.width = Math.max(1, Math.round(cssW * dpr));\n  canvas.height = Math.max(1, Math.round(cssH * dpr));\n  canvas.style.width = `${cssW}px`;\n  canvas.style.height = `${cssH}px`;\n  return dpr;\n}\n\n// Rounded size of an element, kept current with a ResizeObserver.\nexport function useElementSize(ref: RefObject<HTMLElement | null>): { width: number; height: number } {\n  const [size, setSize] = useState({ width: 0, height: 0 });\n\n  useEffect(() => {\n    const el = ref.current;\n    if (!el || typeof ResizeObserver === \"undefined\") return;\n    const observer = new ResizeObserver((entries) => {\n      const box = entries[0]?.contentRect;\n      if (!box) return;\n      const width = Math.round(box.width);\n      const height = Math.round(box.height);\n      setSize((prev) => (prev.width === width && prev.height === height ? prev : { width, height }));\n    });\n    observer.observe(el);\n    return () => observer.disconnect();\n  }, [ref]);\n\n  return size;\n}\n",
      "type": "registry:component",
      "target": "@components/bjork-ui/_core/canvas.ts"
    },
    {
      "path": "components/bjork-ui/_core/loop.ts",
      "content": "\"use client\";\n\nimport { useCallback, useEffect, useMemo, useRef, type RefObject } from \"react\";\n\nexport interface VisibleLoopOptions {\n  enabled?: boolean;\n  fpsCap?: number;\n  rootMargin?: string;\n}\n\n/**\n * Runs `frame(dt, t)` on requestAnimationFrame while the element is near the viewport,\n * the tab is visible and `enabled` is not false. Return `false` from `frame` to go idle\n * until `wake()` is called. Writes `data-loop` on the element: running, idle or paused.\n */\nexport function useVisibleLoop(\n  ref: RefObject<HTMLElement | null>,\n  frame: (dt: number, t: number) => boolean | void,\n  opts?: VisibleLoopOptions,\n): { wake: () => void } {\n  const enabled = opts?.enabled !== false;\n  const fpsCap = opts?.fpsCap ?? 0;\n  const rootMargin = opts?.rootMargin ?? \"96px\";\n\n  const frameRef = useRef(frame);\n  useEffect(() => {\n    frameRef.current = frame;\n  }, [frame]);\n\n  const wakeRef = useRef<() => void>(() => {});\n  const wake = useCallback(() => wakeRef.current(), []);\n\n  useEffect(() => {\n    const el = ref.current;\n    if (!el || typeof window === \"undefined\") return;\n\n    let wants = true; // false once the frame callback returns false\n    let inView = false;\n    let raf = 0;\n    let last = 0;\n    let t = 0;\n    const minFrame = fpsCap > 0 ? 1000 / fpsCap : 0;\n\n    const canRun = () => enabled && inView && document.visibilityState === \"visible\";\n    const stop = () => {\n      if (raf) cancelAnimationFrame(raf);\n      raf = 0;\n    };\n\n    const update = () => {\n      if (!enabled) {\n        stop();\n        el.dataset.loop = \"paused\";\n        return;\n      }\n      if (!wants) {\n        stop();\n        el.dataset.loop = \"idle\";\n        return;\n      }\n      if (!canRun()) {\n        stop();\n        el.dataset.loop = \"paused\";\n        return;\n      }\n      el.dataset.loop = \"running\";\n      if (!raf) {\n        last = performance.now();\n        raf = requestAnimationFrame(tick);\n      }\n    };\n\n    const tick = (now: number) => {\n      raf = 0;\n      if (!canRun() || !wants) {\n        update();\n        return;\n      }\n      const elapsed = now - last;\n      if (minFrame && elapsed < minFrame - 0.5) {\n        raf = requestAnimationFrame(tick);\n        return;\n      }\n      last = now;\n      const dt = Math.min(0.05, Math.max(0, elapsed / 1000));\n      t += dt;\n      const keep = frameRef.current(dt, t);\n      if (keep === false) {\n        wants = false;\n        update();\n        return;\n      }\n      raf = requestAnimationFrame(tick);\n    };\n\n    const observer = new IntersectionObserver(\n      ([entry]) => {\n        inView = entry.isIntersecting;\n        update();\n      },\n      { rootMargin },\n    );\n    observer.observe(el);\n\n    const onVisibility = () => update();\n    document.addEventListener(\"visibilitychange\", onVisibility);\n\n    wakeRef.current = () => {\n      wants = true;\n      update();\n    };\n\n    update();\n\n    return () => {\n      stop();\n      observer.disconnect();\n      document.removeEventListener(\"visibilitychange\", onVisibility);\n      wakeRef.current = () => {};\n    };\n  }, [ref, enabled, fpsCap, rootMargin]);\n\n  return useMemo(() => ({ wake }), [wake]);\n}\n\n// matchMedia based check. False on the server.\nexport function isCoarsePointer(): boolean {\n  if (typeof window === \"undefined\" || typeof window.matchMedia !== \"function\") return false;\n  return window.matchMedia(\"(pointer: coarse)\").matches;\n}\n",
      "type": "registry:component",
      "target": "@components/bjork-ui/_core/loop.ts"
    },
    {
      "path": "components/bjork-ui/tables/table-theme.ts",
      "content": "import { useEffect, useState } from \"react\";\n\nexport type BjorkTableThemeMode = \"light\" | \"dark\" | \"auto\";\n\nexport function useBjorkTableIsDark(\n  resolvedTheme?: string,\n  forcedTheme?: Exclude<BjorkTableThemeMode, \"auto\">\n) {\n  const [documentTheme, setDocumentTheme] = useState<\"light\" | \"dark\" | null>(null);\n  const [previewTheme, setPreviewTheme] = useState<\"light\" | \"dark\" | null>(null);\n  // Server and first client render must agree, otherwise React keeps the\n  // server-rendered (dark) classes when the real theme resolves to light.\n  const [mounted, setMounted] = useState(false);\n\n  useEffect(() => {\n    setMounted(true);\n    const syncDocumentTheme = () => {\n      const root = document.documentElement;\n      const searchParams = new URLSearchParams(window.location.search);\n      const theme = searchParams.get(\"theme\");\n\n      setPreviewTheme(theme === \"light\" || theme === \"dark\" ? theme : null);\n\n      setDocumentTheme(\n        root.classList.contains(\"light\")\n          ? \"light\"\n          : root.classList.contains(\"dark\")\n            ? \"dark\"\n            : null\n      );\n    };\n\n    syncDocumentTheme();\n\n    const observer = new MutationObserver(syncDocumentTheme);\n    observer.observe(document.documentElement, {\n      attributes: true,\n      attributeFilter: [\"class\"],\n    });\n\n    return () => observer.disconnect();\n  }, []);\n\n  const activeTheme =\n    forcedTheme ?? previewTheme ?? documentTheme ?? (mounted ? resolvedTheme : undefined);\n\n  return activeTheme !== \"light\";\n}\n\nexport function getBjorkTablePalette(isDark: boolean) {\n  return {\n    container: isDark\n      ? \"border-[#1c1c1c] bg-[#121212] shadow-[inset_0_7px_14px_rgba(255,255,255,0.03),inset_0_0.5px_0.5px_rgba(255,255,255,0.06),0_14px_20px_-6px_rgba(0,0,0,0.45)]\"\n      : \"border-[#f5ede2] bg-[#fffcf6] shadow-[inset_0_7px_14px_rgba(88,72,49,0.045),inset_0_0.5px_0.5px_rgba(255,255,255,0.92),inset_1px_0_0_rgba(88,72,49,0.026),inset_-1px_0_0_rgba(255,255,255,0.68),0_14px_22px_-9px_rgba(66,52,33,0.11)]\",\n    header: isDark\n      ? \"border-[#232323] bg-[#181818] text-[#ededed]/42\"\n      : \"border-[#f1e8dc] bg-[#fbf7ef] text-[#171717]/60\",\n    row: isDark\n      ? \"border-[#232323] hover:bg-[#181818]/70\"\n      : \"border-[#f1e8dc] hover:bg-[#f8f2e7]/72\",\n    selectedRow: isDark\n      ? \"border-[#2a2a2a] bg-[#181818]\"\n      : \"border-[#eadfce] bg-[#f8f2e7]\",\n    control: isDark\n      ? \"border-[#232323] bg-[#181818] text-[#ededed]/70 hover:bg-[#202020] shadow-[inset_0_1px_0_rgba(255,255,255,0.045)]\"\n      : \"border-[#eadfce] bg-[#fffcf6] text-[#171717]/68 shadow-[var(--bjork-shadow-soft)] hover:bg-[#f8f2e7]\",\n    menu: isDark\n      ? \"border-[#232323] bg-[#181818] text-[#ededed]/76 shadow-[inset_0_1px_0_rgba(255,255,255,0.055),inset_0_12px_24px_rgba(255,255,255,0.018),0_22px_42px_-22px_rgba(0,0,0,0.9)]\"\n      : \"border-[#eadfce] bg-[#fffcf6] text-[#171717]/76 shadow-[inset_0_1px_0_rgba(88,72,49,0.04),inset_0_12px_24px_rgba(88,72,49,0.022),0_22px_44px_-26px_rgba(66,52,33,0.22)]\",\n    menuItem: isDark ? \"hover:bg-[#232323]\" : \"hover:bg-[#f8f2e7]\",\n    menuActive: isDark ? \"bg-[#232323]\" : \"bg-[#f8f2e7]\",\n    divider: isDark ? \"border-[#232323]\" : \"border-[#f1e8dc]\",\n    primaryText: isDark ? \"text-[#ededed]/90\" : \"text-[#171717]/86\",\n    secondaryText: isDark ? \"text-[#ededed]/38\" : \"text-[#171717]/60\",\n    mutedSurface: isDark ? \"bg-[#181818]\" : \"bg-[#f8f2e7]\",\n    popover: isDark ? \"bg-[#111] text-[#ededed]\" : \"bg-[#fffcf6] text-[#171717]\",\n    accent: isDark ? \"text-[#d86a2c]\" : \"text-[#bd4514]\",\n    accentBg: isDark ? \"bg-[#ec5c13]/12\" : \"bg-[#ec5c13]/14\",\n    accentBorder: isDark ? \"border-[#ec5c13]/24\" : \"border-[#bd4514]/22\",\n    checkboxAccent: isDark ? \"#d86a2c\" : \"#bd4514\",\n  };\n}\n\nexport function getBjorkSignalPalette(\n  tone: \"green\" | \"red\" | \"orange\" | \"neutral\",\n  isDark: boolean\n) {\n  const palettes = {\n    green: {\n      bgColor: isDark ? \"bg-[#3e6f52]/18\" : \"bg-[#dce8dc]\",\n      borderColor: isDark ? \"border-[#5f9f78]/28\" : \"border-[#bad0bd]\",\n      textColor: isDark ? \"text-[#77b58b]\" : \"text-[#47785c]\",\n      dotColor: isDark ? \"bg-[#77b58b]\" : \"bg-[#47785c]\",\n      color: isDark ? \"#77b58b\" : \"#47785c\",\n    },\n    red: {\n      bgColor: isDark ? \"bg-[#87463f]/18\" : \"bg-[#eadad5]\",\n      borderColor: isDark ? \"border-[#c46a61]/28\" : \"border-[#d7bcb4]\",\n      textColor: isDark ? \"text-[#cf7c72]\" : \"text-[#9d5149]\",\n      dotColor: isDark ? \"bg-[#cf7c72]\" : \"bg-[#9d5149]\",\n      color: isDark ? \"#cf7c72\" : \"#9d5149\",\n    },\n    orange: {\n      bgColor: isDark ? \"bg-[#ec5c13]/14\" : \"bg-[#ead9cb]\",\n      borderColor: isDark ? \"border-[#ec5c13]/28\" : \"border-[#d5b59f]\",\n      textColor: isDark ? \"text-[#d86a2c]\" : \"text-[#9f4317]\",\n      dotColor: isDark ? \"bg-[#d86a2c]\" : \"bg-[#9f4317]\",\n      color: isDark ? \"#d86a2c\" : \"#9f4317\",\n    },\n    neutral: {\n      bgColor: isDark ? \"bg-[#ededed]/8\" : \"bg-[#ded7ca]\",\n      borderColor: isDark ? \"border-[#ededed]/14\" : \"border-[#cfc6b7]\",\n      textColor: isDark ? \"text-[#ededed]/58\" : \"text-[#171717]/60\",\n      dotColor: isDark ? \"bg-[#ededed]/45\" : \"bg-[#171717]/42\",\n      color: isDark ? \"#a3a3a3\" : \"#706b62\",\n    },\n  } as const;\n\n  return palettes[tone];\n}\n",
      "type": "registry:component",
      "target": "@components/bjork-ui/tables/table-theme.ts"
    }
  ],
  "cssVars": {
    "light": {
      "bjork-bg": "#f7f3ea",
      "bjork-surface": "#fffcf6",
      "bjork-surface-muted": "rgba(250, 246, 237, 0.94)",
      "bjork-surface-hover": "#f5efe3",
      "bjork-surface-active": "#efe7d8",
      "bjork-panel": "#f8f2e7",
      "bjork-menu": "rgba(255, 252, 246, 0.98)",
      "bjork-field": "rgba(255, 252, 246, 0.96)",
      "bjork-field-muted": "rgba(248, 242, 231, 0.82)",
      "bjork-field-inset": "rgba(239, 231, 216, 0.72)",
      "bjork-error-bg": "#fff0e8",
      "bjork-text": "#171717",
      "bjork-text-strong": "rgba(23, 23, 23, 0.9)",
      "bjork-text-medium": "rgba(23, 23, 23, 0.78)",
      "bjork-text-muted": "rgba(23, 23, 23, 0.68)",
      "bjork-text-soft": "rgba(23, 23, 23, 0.62)",
      "bjork-text-faint": "rgba(23, 23, 23, 0.22)",
      "bjork-inverted-text": "#fff8f0",
      "bjork-border": "#eee6db",
      "bjork-border-muted": "#f5ede2",
      "bjork-border-strong": "#e1d7c8",
      "bjork-thumb": "#a49b8e",
      "bjork-track": "#ded6ca",
      "bjork-accent": "#ec7d43",
      "bjork-accent-hover": "#f0935f",
      "bjork-accent-soft": "rgba(236, 125, 67, 0.1)",
      "bjork-accent-muted": "rgba(236, 125, 67, 0.2)",
      "bjork-accent-badge": "rgba(236, 125, 67, 0.16)",
      "bjork-accent-badge-foreground": "#8d421d",
      "bjork-accent-foreground": "#3f2112",
      "bjork-accent-fill": "#ec7d43",
      "bjork-accent-fill-hover": "#f0935f",
      "bjork-shadow-surface": "inset 0 7px 14px rgba(88, 72, 49, 0.045), inset 0 0.5px 0.5px rgba(255, 255, 255, 0.92), inset 1px 0 0 rgba(88, 72, 49, 0.026), inset -1px 0 0 rgba(255, 255, 255, 0.68), 0 14px 22px -9px rgba(66, 52, 33, 0.11)",
      "bjork-shadow-soft": "inset 0 1px 0 rgba(88, 72, 49, 0.045), inset 0 0.5px 0.5px rgba(255, 255, 255, 0.86)",
      "bjork-shadow-panel": "inset 0 1px 0 rgba(88, 72, 49, 0.04), inset 1px 0 0 rgba(88, 72, 49, 0.024), inset -1px 0 0 rgba(255, 255, 255, 0.64), 0 18px 38px -30px rgba(66, 52, 33, 0.2)",
      "bjork-shadow-menu": "inset 0 1px 0 rgba(88, 72, 49, 0.04), inset 0 12px 24px rgba(88, 72, 49, 0.022), inset 1px 0 0 rgba(88, 72, 49, 0.024), inset -1px 0 0 rgba(255, 255, 255, 0.62), 0 22px 44px -26px rgba(66, 52, 33, 0.22)",
      "bjork-shadow-inset": "inset 0 1px 10px rgba(88, 72, 49, 0.12), inset 0 0.5px 0.5px rgba(255, 255, 255, 0.72)",
      "bjork-ring-offset": "#f7f3ea"
    },
    "dark": {
      "bjork-bg": "#111111",
      "bjork-surface": "#121212",
      "bjork-surface-muted": "rgba(22, 22, 22, 0.92)",
      "bjork-surface-hover": "#161616",
      "bjork-surface-active": "#202020",
      "bjork-panel": "#0d0d0d",
      "bjork-menu": "rgba(18, 18, 18, 0.98)",
      "bjork-field": "rgba(18, 18, 18, 0.95)",
      "bjork-field-muted": "rgba(18, 18, 18, 0.55)",
      "bjork-field-inset": "rgba(9, 9, 9, 0.75)",
      "bjork-error-bg": "#130d0a",
      "bjork-text": "#ededed",
      "bjork-text-strong": "rgba(237, 237, 237, 0.9)",
      "bjork-text-medium": "rgba(237, 237, 237, 0.72)",
      "bjork-text-muted": "rgba(237, 237, 237, 0.6)",
      "bjork-text-soft": "rgba(237, 237, 237, 0.5)",
      "bjork-text-faint": "rgba(237, 237, 237, 0.22)",
      "bjork-inverted-text": "#080808",
      "bjork-border": "#232323",
      "bjork-border-muted": "#1c1c1c",
      "bjork-border-strong": "#343434",
      "bjork-thumb": "#626262",
      "bjork-track": "#090909",
      "bjork-accent": "#ec5c13",
      "bjork-accent-hover": "#f07832",
      "bjork-accent-soft": "rgba(236, 92, 19, 0.12)",
      "bjork-accent-muted": "rgba(236, 92, 19, 0.24)",
      "bjork-accent-badge": "#b84a12",
      "bjork-accent-badge-foreground": "#fff2ea",
      "bjork-accent-foreground": "#fff2ea",
      "bjork-accent-fill": "#b84a12",
      "bjork-accent-fill-hover": "#a84a14",
      "bjork-shadow-surface": "inset 0 7px 14px rgba(255, 255, 255, 0.03), inset 0 0.5px 0.5px rgba(255, 255, 255, 0.06), 0 14px 20px -6px rgba(0, 0, 0, 0.45)",
      "bjork-shadow-soft": "inset 0 1px 0 rgba(255, 255, 255, 0.045)",
      "bjork-shadow-panel": "inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 18px 36px -28px rgba(0, 0, 0, 0.9)",
      "bjork-shadow-menu": "inset 0 1px 0 rgba(255, 255, 255, 0.055), inset 0 12px 24px rgba(255, 255, 255, 0.018), inset 0 -18px 26px rgba(0, 0, 0, 0.24), 0 22px 42px -22px rgba(0, 0, 0, 0.9)",
      "bjork-shadow-inset": "inset 0 1px 10px rgba(0, 0, 0, 0.45)",
      "bjork-ring-offset": "#080808"
    }
  },
  "css": {
    ".bjork-range": {
      "box-shadow": "inset 0 1px 1px rgba(255, 255, 255, 0.04), 0 0 14px rgba(189, 69, 20, 0.06)"
    },
    ".bjork-range::-webkit-slider-thumb": {
      "appearance": "none",
      "width": "16px",
      "height": "8px",
      "border": "0",
      "border-radius": "999px",
      "background": "var(--bjork-thumb)",
      "box-shadow": "inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.42)"
    },
    ".bjork-range::-moz-range-thumb": {
      "width": "16px",
      "height": "8px",
      "border": "0",
      "border-radius": "999px",
      "background": "var(--bjork-thumb)",
      "box-shadow": "inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.42)"
    },
    ".bjork-layered-button-accent, .bjork-layered-button-raised": {
      "position": "relative",
      "isolation": "isolate",
      "appearance": "none",
      "overflow": "hidden",
      "border": "0",
      "border-radius": "13px",
      "box-shadow": "inset 0 1px 0 #ffffff38, 0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a",
      "transition": "filter 150ms ease-out, box-shadow 150ms ease-out"
    },
    ".bjork-layered-button-accent::after, .bjork-layered-button-raised::after": {
      "position": "absolute",
      "inset": "0",
      "pointer-events": "none",
      "content": "\"\"",
      "border": "1.5px solid transparent",
      "border-radius": "inherit",
      "background": "linear-gradient(#ffffffb8, #0000003d 41% 75%, #ffffff47) border-box",
      "mix-blend-mode": "overlay",
      "-webkit-mask-image": "linear-gradient(#000, #000), linear-gradient(#000, #000)",
      "mask-image": "linear-gradient(#000, #000), linear-gradient(#000, #000)",
      "-webkit-mask-clip": "padding-box, border-box",
      "mask-clip": "padding-box, border-box",
      "-webkit-mask-origin": "padding-box, border-box",
      "mask-origin": "padding-box, border-box",
      "-webkit-mask-composite": "xor",
      "mask-composite": "exclude"
    },
    ".bjork-layered-button-accent": {
      "color": "oklch(100% 0 0)",
      "text-shadow": "0 -1px #00000040",
      "background": "radial-gradient(ellipse at -20px top, rgba(255, 255, 255, 0.14), transparent), linear-gradient(180deg, #ec5c13 0%, #ec5c13 62%, color-mix(in oklab, #ec5c13 84%, black 16%) 100%)"
    },
    ".bjork-layered-button-raised": {
      "color": "oklch(100% 0 0)",
      "text-shadow": "0 -1px #00000026",
      "background": "radial-gradient(ellipse at -20px top, #ffffff38, #fff0), linear-gradient(180deg, oklch(0.1881 0.006 265), oklch(0.5493 0.0081 265))"
    },
    ".dark .bjork-layered-button-raised": {
      "color": "oklch(0.2574 0.0056 265)",
      "text-shadow": "0 -1px #00000026",
      "background": "radial-gradient(ellipse at -20px top, #ffffff38, #fff0), linear-gradient(180deg, color-mix(in oklab, oklch(0.9674 0.0013 265) 80%, oklch(0.2574 0.0056 265) 20%), color-mix(in oklab, oklch(0.669 0.0107 265) 80%, oklch(0.2574 0.0056 265) 20%))"
    },
    "@media (hover: hover)": {
      ".bjork-layered-button-accent:hover": {
        "filter": "brightness(1.08) saturate(1.04)"
      },
      ".bjork-layered-button-raised:hover": {
        "filter": "brightness(1.08) contrast(0.9)"
      }
    }
  },
  "meta": {
    "collection": "Tables",
    "registryUrl": "https://ui.isaiahbjork.com/leaderboard-table.json",
    "installCommand": "npx shadcn@latest add https://ui.isaiahbjork.com/leaderboard-table.json"
  },
  "type": "registry:component"
}