/* Leaderboard (templates/drobo/leaderboard_v2.html), built from Magic UI components ported to plain CSS, light and dark.
   Shared tokens and pieces (cards, Border Beam, Magic Card, Blur Fade, Number Ticker, chips) are in css/drobo-ui.css;
   the leaderboard's own components are here:
     Particles (canvas, js) · Animated Gradient Text · Avatar Circles · Avatar with a glow ring · Neon Gradient Card ·
     Sparkles Text (js) · medal borders · Animated Circular Progress Bar · Animated List · Confetti (js)
   Moving borders are kept to one: #1's gold neon. Silver, bronze, the viewer's own row and the join card have still borders.
   The global prefers-reduced-motion rule in drobo-ui.css stops every animation here; the js skips particles,
   sparkles and confetti. */

/* ── Signed out: no sidebar, a slim public bar ───────────────────────────── */
.ui-shell.lb-public { grid-template-columns: minmax(0, 1fr); }
.lb-public .ui-inset { margin: .5rem; }
.lb-bar { padding: 0 .9rem 0 1.1rem; }
.lb-bar__brand { display: inline-flex; align-items: center; flex: 0 0 auto; text-decoration: none; }
body.ui-app .lb-bar__logo { width: auto; max-width: none; height: 1.9rem; }

.lb-medal {
  display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; font-size: .75rem; font-weight: 750; line-height: 1;
  color: var(--medal-ink); background: linear-gradient(145deg, var(--medal-hi), var(--medal-lo)); border-radius: 50%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 1px 2px rgba(0, 0, 0, .12), 0 0 0 3px color-mix(in srgb, var(--medal-lo) 16%, transparent);
  font-variant-numeric: tabular-nums;
}
.lb-you-tag {
  flex: 0 0 auto; padding: .12rem .45rem; font-size: .625rem; font-style: normal; font-weight: 700; line-height: 1.3; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ui-primary); background: var(--ui-primary-soft);
  border: 1px solid color-mix(in srgb, var(--ui-primary) 28%, transparent); border-radius: 999px;
}

/* ── Hero (shared pieces are in css/drobo-ui.css: particles, gradient text, avatar circles) ── */
.lb-hero .ui-pill .lb-hero__trophy { color: #d97706; }
html[data-theme="dark"] .lb-hero .ui-pill .lb-hero__trophy { color: #fbbf24; }
.lb-hero .ui-chip .lb-hero__discord { color: #5865f2; }
html[data-theme="dark"] .lb-hero .ui-chip .lb-hero__discord { color: #8b93ff; }

/* ── Avatar: a photo, or the initial on a gradient; optional glow ring ───── */
.lb-av {
  --sz: 2.5rem; --ring-a: var(--ui-primary); --ring-b: var(--ui-violet);
  position: relative; isolation: isolate; display: inline-grid; flex: 0 0 auto; width: var(--sz); height: var(--sz);
  font-size: calc(var(--sz) * .4); font-weight: 700; line-height: 1; border-radius: 50%;
}
.lb-av > b, .lb-av > img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; box-sizing: border-box; }
.lb-av > b {
  display: grid; place-items: center; font-weight: inherit; color: #fff;
  background: linear-gradient(135deg, var(--a1, #3b82f6), var(--a2, #8b5cf6)); box-shadow: 0 0 0 1px var(--ui-border);
}
.lb-av > img { object-fit: cover; background: #fff; box-shadow: 0 0 0 1px var(--ui-border); animation: lb-photo-in .5s var(--ui-ease) both; }
@keyframes lb-photo-in { from { opacity: 0; filter: blur(4px); } }
.lb-av.is-you:not([data-medal]) { --a1: var(--ui-primary); --a2: var(--ui-violet); }
.lb-av[data-medal] { --ring-a: var(--medal-lo); --ring-b: var(--medal-hi); }
.lb-av[data-medal] > b { color: var(--medal-ink); background: linear-gradient(145deg, var(--medal-hi), var(--medal-lo)); }
.lb-av--row { --sz: 2.6rem; }
.lb-av--row[data-medal] > b, .lb-av--row[data-medal] > img { box-shadow: 0 0 0 2px var(--ui-card), 0 0 0 3.5px var(--medal-lo); }
.lb-av--circle { --sz: 2.25rem; }
.lb-av--circle > b, .lb-av--circle > img { box-shadow: 0 0 0 2.5px var(--ui-panel); }
.lb-av--podium { --sz: 4.25rem; }
.lb-av--you { --sz: 4.25rem; }
/* Glow ring: a slowly turning conic ring with a soft glow behind, a gap of card colour between it and the photo. */
.lb-av--ring > b, .lb-av--ring > img { box-shadow: 0 0 0 3px var(--ui-card); }
.lb-av--ring::before {
  content: ""; position: absolute; inset: -5px; z-index: -1; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--ring-a), var(--ring-b), var(--ring-a), var(--ring-b), var(--ring-a));
  animation: lb-spin 7s linear infinite;
}
.lb-av--ring::after {
  content: ""; position: absolute; inset: -12px; z-index: -2; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--ring-a) 60%, transparent) 30%, transparent 70%); filter: blur(10px); opacity: .7;
}
@keyframes lb-spin { to { transform: rotate(360deg); } }
.lb-av--open { color: var(--ui-faint); border: 1.5px dashed var(--ui-border-strong); font-size: 1.3rem; place-items: center; box-sizing: border-box; }

/* ── Podium ──────────────────────────────────────────────────────────────── */
.lb-podium {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr) minmax(0, 1fr); grid-template-areas: "second first third";
  align-items: end; gap: 1.1rem; margin: 0 0 1.25rem; padding: 0; list-style: none;
}
.lb-podium__slot { position: relative; isolation: isolate; min-width: 0; }
.lb-podium__slot[data-medal="1"] { grid-area: first; }
.lb-podium__slot[data-medal="2"] { grid-area: second; }
.lb-podium__slot[data-medal="3"] { grid-area: third; }
.lb-podium__card {
  --step: 2.25rem;
  display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: 1.9rem 1.25rem 0; text-align: center;
  background: radial-gradient(120% 75% at 50% 0%, color-mix(in srgb, var(--medal-lo) 13%, transparent), transparent 72%), var(--ui-card);
}
.lb-podium__card[data-medal="1"] { --step: 4.25rem; padding-top: 2.6rem; }
.lb-podium__card[data-medal="2"] { --step: 3rem; }
/* Medal borders: silver and bronze sit in a still, medal-coloured edge (#1 wears the gold neon below). */
.lb-podium__card:not(.is-open):is([data-medal="2"], [data-medal="3"]) { border-color: color-mix(in srgb, var(--medal-lo) 60%, var(--ui-border)); }
.lb-podium__card.is-you { box-shadow: 0 0 0 3px var(--ui-primary-soft); }
.lb-podium__who { display: grid; justify-items: center; gap: .85rem; width: 100%; min-width: 0; }
.lb-podium__face { position: relative; display: grid; place-items: center; }
.lb-podium__card[data-medal="1"] .lb-av--podium { --sz: 5.25rem; }
.lb-podium__crown {
  position: absolute; top: -1.75rem; left: 50%; z-index: 2; font-size: 1.5rem; color: #f59e0b;
  transform: translateX(-50%) rotate(-10deg); filter: drop-shadow(0 2px 5px rgba(245, 158, 11, .5));
}
.lb-podium__name { display: flex; align-items: center; justify-content: center; gap: .4rem; max-width: 100%; min-width: 0; font-size: .9375rem; font-weight: 650; color: var(--ui-fg); }
.lb-podium__card[data-medal="1"] .lb-podium__name { font-size: 1.0625rem; }
.lb-podium__label { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-podium__sales {
  margin-top: .55rem; font-size: 1.6rem; font-weight: 700; letter-spacing: -.035em; line-height: 1.15; color: var(--ui-fg);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.lb-podium__card[data-medal="1"] .lb-podium__sales { font-size: 2rem; }
.lb-podium__orders { font-size: .8125rem; color: var(--ui-muted); }
/* The step each card stands on: taller for a higher place, the place number on it. */
.lb-podium__step {
  position: relative; align-self: stretch; display: grid; place-items: center; height: var(--step); margin: 1.2rem -1.25rem 0;
  background:
    radial-gradient(color-mix(in srgb, var(--medal-lo) 32%, transparent) 1px, transparent 1.5px) 0 0 / 11px 11px,
    linear-gradient(180deg, color-mix(in srgb, var(--medal-lo) 20%, transparent), color-mix(in srgb, var(--medal-lo) 4%, transparent));
  border-top: 1px solid color-mix(in srgb, var(--medal-lo) 38%, transparent);
  border-radius: 0 0 calc(var(--ui-radius) - 1px) calc(var(--ui-radius) - 1px);
}
.lb-podium__step span { font-size: calc(var(--step) * .5); font-weight: 800; line-height: 1; letter-spacing: -.04em; color: color-mix(in srgb, var(--medal) 75%, transparent); }
.lb-podium__card.is-open { background: var(--ui-subtle); border-style: dashed; box-shadow: none; }
.lb-podium__card.is-open .lb-podium__name { color: var(--ui-muted); font-weight: 500; }
.lb-podium__card.is-open .lb-podium__sales { color: var(--ui-faint); }
.lb-podium__card.is-open .lb-podium__step { opacity: .55; }

/* #1: Magic UI "Neon Gradient Card", calmed: an all-gold border whose light drifts slowly, a soft glow behind. */
.lb-neon { --neon-a: #f59e0b; --neon-b: #fcd34d; --neon-size: 1.5px; }
.lb-neon > .lb-podium__card { border-color: transparent; }
.lb-neon::before, .lb-neon::after {
  content: ""; position: absolute; inset: calc(-1 * var(--neon-size)); border-radius: calc(var(--ui-radius) + var(--neon-size)); pointer-events: none;
  background: linear-gradient(0deg, var(--neon-a), var(--neon-b)); background-size: 100% 200%; animation: lb-neon 8s ease-in-out infinite alternate;
}
.lb-neon::before { z-index: -1; }
.lb-neon::after { z-index: -2; filter: blur(18px); opacity: .16; }
html[data-theme="dark"] .lb-neon::after { opacity: .26; }
@keyframes lb-neon { 0% { background-position: 0% 0%; } 100% { background-position: 0% 100%; } }

/* Magic UI "Sparkles Text": little stars that come and go round #1's name (placed by the js). */
.lb-sparkles { position: relative; display: inline-flex; min-width: 0; max-width: 100%; }
.lb-sparkle {
  position: absolute; z-index: 2; left: var(--x); top: var(--y); width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  color: var(--c); pointer-events: none; animation: lb-sparkle 1.8s ease-in-out var(--d) infinite both;
}
@keyframes lb-sparkle { 0% { opacity: 0; transform: scale(0) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(75deg); } 100% { opacity: 0; transform: scale(0) rotate(150deg); } }

/* ── Your rank: Magic Card, avatar, Animated Circular Progress Bar ───────── */
.lb-you { margin-bottom: 1.25rem; padding-bottom: 0; }
.lb-you.is-top { background: radial-gradient(55% 140% at 0% 0%, color-mix(in srgb, #f59e0b 7%, transparent), transparent 70%), var(--ui-card); }
.lb-you .ui-card__sub strong { font-weight: 600; color: var(--ui-fg-2); }
.lb-status--gold { gap: .3rem; color: #b45309; background: color-mix(in srgb, #f59e0b 9%, var(--ui-card)); border-color: color-mix(in srgb, #f59e0b 38%, var(--ui-border)); }
.lb-status--gold .ti { font-size: .85rem; }
html[data-theme="dark"] .lb-status--gold { color: #fbbf24; }
.lb-you__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1.1fr); margin: 0 -1.25rem; border-top: 1px solid var(--ui-border); }
.lb-you__grid.is-waiting { grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); }
.lb-you__cell { display: flex; align-items: center; gap: 1.1rem; min-width: 0; margin: 0; padding: 1.35rem 1.25rem; }
.lb-you__cell + .lb-you__cell { border-left: 1px solid var(--ui-border); }
.lb-you__who { display: grid; gap: .15rem; min-width: 0; }
.lb-you__name { display: flex; align-items: center; gap: .4rem; min-width: 0; font-size: .8125rem; font-weight: 600; color: var(--ui-fg-2); }
.lb-you__name > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-you__num, .lb-you__gap { font-size: 2.1rem; font-weight: 700; letter-spacing: -.04em; line-height: 1.1; color: var(--ui-fg); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-you__gap { font-size: 1.6rem; }
.lb-you__num.is-medal { background: linear-gradient(160deg, var(--medal-lo) 10%, var(--medal) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lb-you__line { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .45rem; margin: .1rem 0 0; font-size: .875rem; }
.lb-you__line b { font-weight: 650; color: var(--ui-fg); font-variant-numeric: tabular-nums; }
.lb-you__line small { flex: 1 0 100%; font-size: .75rem; color: var(--ui-faint); }
.lb-you__gapcopy { display: grid; gap: .15rem; min-width: 0; }
.lb-you__label { font-size: .75rem; font-weight: 500; color: var(--ui-muted); }
.lb-you__text { margin: .1rem 0 0; font-size: .8125rem; line-height: 1.5; color: var(--ui-muted); }
.lb-you__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: center; gap: 1.1rem 1.25rem; }
.lb-you__facts div { display: grid; gap: .15rem; min-width: 0; }
.lb-you__facts dt { display: flex; align-items: center; gap: .35rem; font-size: .75rem; color: var(--ui-muted); }
.lb-you__facts dt .ti { font-size: .9rem; color: var(--ui-faint); }
.lb-you__facts dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .45rem; margin: 0; font-size: .9375rem; font-weight: 600; color: var(--ui-fg); font-variant-numeric: tabular-nums; }
.lb-you__ship { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 500; color: var(--ui-warn); }
.lb-you__waiting { flex-wrap: wrap; justify-content: space-between; }
.lb-you__waiting > div { display: grid; flex: 1 1 18rem; gap: .2rem; }
.lb-you__waiting strong { font-size: .875rem; font-weight: 600; color: var(--ui-fg); }
.lb-you__waiting p { margin: 0; font-size: .8125rem; line-height: 1.55; color: var(--ui-muted); }

/* Name and photo on the board (a switch; the viewer's own rows follow as it saves) */
.lb-name {
  display: flex; align-items: center; gap: .75rem 1rem; margin: 0 -1.25rem; padding: .95rem 1.25rem; background: var(--ui-subtle);
  border-top: 1px solid var(--ui-border); border-radius: 0 0 calc(var(--ui-radius) - 1px) calc(var(--ui-radius) - 1px);
}
.lb-name__icon { display: grid; place-items: center; flex: 0 0 auto; width: 2.1rem; height: 2.1rem; font-size: 1.05rem; color: var(--ui-primary); background: var(--ui-primary-soft); border-radius: 9px; }
.lb-name__text { display: grid; flex: 1 1 auto; gap: .1rem; min-width: 0; }
.lb-name__text label { font-size: .8125rem; font-weight: 600; color: var(--ui-fg); cursor: pointer; }
.lb-name__text small { max-width: 84ch; font-size: .75rem; line-height: 1.5; color: var(--ui-muted); }
.lb-name__state { flex: 0 0 auto; font-size: .75rem; color: var(--ui-muted); white-space: nowrap; }
.lb-name__state b { font-weight: 600; color: var(--ui-fg); }
.lb-switch { position: relative; flex: 0 0 auto; width: 2.5rem; height: 1.45rem; }
.lb-switch input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.lb-switch i { position: absolute; inset: 0; background: color-mix(in srgb, var(--ui-fg) 16%, transparent); border-radius: 999px; transition: background .2s; }
.lb-switch i::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.45rem - 4px); height: calc(1.45rem - 4px); background: #fff; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .22s var(--ui-ease);
}
.lb-switch input:checked + i { background: var(--ui-primary); }
.lb-switch input:checked + i::after { transform: translateX(1.05rem); }
.lb-switch input:focus-visible + i { outline: 1.5px solid var(--ui-focus); outline-offset: 2px; }
.lb-switch input:disabled { cursor: progress; }
.lb-switch input:disabled + i { opacity: .6; }

/* ── Ranking: Magic UI "Animated List" ───────────────────────────────────── */
.lb-board { margin-bottom: 1.25rem; }
.lb-list { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.lb-row {
  position: relative; isolation: isolate; display: grid; grid-template-columns: 2rem auto minmax(0, 1fr) auto; align-items: center; gap: .85rem;
  min-height: 4rem; padding: .6rem 1.1rem .6rem .7rem; box-sizing: border-box; background: var(--ui-card);
  border: 1px solid var(--ui-border); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 12px -6px rgba(16, 24, 40, .1);
  transition: transform .25s var(--ui-ease), box-shadow .25s var(--ui-ease), border-color .2s;
}
html[data-theme="dark"] .lb-row { background: var(--ui-subtle); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03); }
.lb-row:hover { transform: translateY(-1px); border-color: var(--ui-border-strong); box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 10px 22px -10px rgba(16, 24, 40, .22); }
.lb-row::before {  /* sales against #1, as a soft fill */
  content: ""; position: absolute; z-index: -1; inset: 0 auto 0 0; width: var(--share, 0%); border-radius: 13px; transform-origin: left;
  background: linear-gradient(90deg, var(--ui-primary-soft), color-mix(in srgb, var(--ui-primary) 2%, transparent));
}
.lb-row[data-medal]::before { background: linear-gradient(90deg, color-mix(in srgb, var(--medal-lo) 18%, transparent), color-mix(in srgb, var(--medal-lo) 3%, transparent)); }
/* The viewer's own row: a still primary outline. */
.lb-row.is-you { border-color: color-mix(in srgb, var(--ui-primary) 60%, var(--ui-border)); box-shadow: 0 0 0 3px var(--ui-primary-soft); }
html[data-theme="dark"] .lb-row.is-you { box-shadow: 0 0 0 3px var(--ui-primary-soft); }
/* Rows arrive one after another, blurring in (the card is revealed by js/drobo-ui.js; --n = row order). */
.ui-js .lb-board .lb-row { opacity: 0; }
.ui-js .lb-board.is-in .lb-row { opacity: 1; animation: lb-list-in .65s cubic-bezier(.2, .9, .3, 1.1) both; animation-delay: calc(var(--n, 0) * 110ms + 150ms); }
.ui-js .lb-board.is-in .lb-row::before { animation: lb-grow 1s var(--ui-ease) both; animation-delay: calc(var(--n, 0) * 110ms + 400ms); }
@keyframes lb-list-in { from { opacity: 0; filter: blur(8px); transform: translateY(-14px) scale(.96); } }
@keyframes lb-grow { from { transform: scaleX(0); } }
.lb-row__place { display: grid; place-items: center; font-size: .875rem; font-weight: 650; color: var(--ui-muted); font-variant-numeric: tabular-nums; }
.lb-row__body { display: grid; gap: .1rem; min-width: 0; }
.lb-row__name { display: flex; align-items: center; gap: .45rem; min-width: 0; font-size: .9rem; font-weight: 600; color: var(--ui-fg); }
.lb-row__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row__meta { font-size: .75rem; color: var(--ui-muted); font-variant-numeric: tabular-nums; }
.lb-row__sales { font-size: 1rem; font-weight: 650; letter-spacing: -.01em; color: var(--ui-fg); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Places still open, the viewer's own unranked row, the note */
.lb-open { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: .6rem; padding: .75rem .9rem; border: 1px dashed var(--ui-border-strong); border-radius: 14px; }
.lb-open__seats { display: flex; flex-wrap: wrap; gap: .35rem; }
.lb-open__seats i {
  display: grid; place-items: center; width: 1.7rem; height: 1.7rem; font-size: .6875rem; font-style: normal; font-weight: 600; color: var(--ui-faint);
  border: 1px dashed var(--ui-border-strong); border-radius: 50%; font-variant-numeric: tabular-nums;
}
.lb-open p { margin: 0; font-size: .8125rem; color: var(--ui-muted); }
.lb-open strong { font-weight: 600; color: var(--ui-fg-2); }
.lb-mine { margin-top: 1rem; padding-top: .85rem; border-top: 1px dashed var(--ui-border-strong); }
.lb-mine__label { display: flex; align-items: center; gap: .4rem; margin: 0 0 .5rem .15rem; font-size: .75rem; font-weight: 500; color: var(--ui-muted); }
.lb-mine__label .ti { font-size: .9rem; }
.lb-note {
  display: flex; gap: .55rem; margin: 1.1rem -1.25rem -1.25rem; padding: .85rem 1.25rem; font-size: .75rem; line-height: 1.6; color: var(--ui-muted);
  background: var(--ui-subtle); border-top: 1px solid var(--ui-border); border-radius: 0 0 calc(var(--ui-radius) - 1px) calc(var(--ui-radius) - 1px);
}
.lb-note .ti { flex: 0 0 auto; margin-top: .1rem; font-size: .95rem; color: var(--ui-faint); }
.lb-note p { margin: 0; max-width: 110ch; }
.lb-empty strong { font-size: .9375rem; font-weight: 600; color: var(--ui-fg); }
.lb-empty .lb-empty__icon { color: #d97706; }
html[data-theme="dark"] .lb-empty .lb-empty__icon { color: #fbbf24; }

/* ── Signed out: join, a still card with a faint primary edge ────────────── */
.lb-join {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; padding: 1.75rem 2rem;
  border-color: color-mix(in srgb, var(--ui-primary) 28%, var(--ui-border));
}
.lb-join > :not(.ui-dots) { position: relative; z-index: 1; }
.lb-join .lb-join__dots {
  border-radius: inherit;
  -webkit-mask-image: radial-gradient(ellipse 55% 130% at 100% 50%, #000 15%, transparent 70%);
  mask-image: radial-gradient(ellipse 55% 130% at 100% 50%, #000 15%, transparent 70%);
}
.lb-join__copy { display: grid; justify-items: start; gap: .5rem; flex: 1 1 28rem; min-width: 0; }
.lb-join h2 { margin: 0; font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: 650; letter-spacing: -.03em; line-height: 1.2; color: var(--ui-fg); }
.lb-join p { margin: 0; max-width: 62ch; font-size: .875rem; line-height: 1.6; color: var(--ui-muted); }
.lb-join__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }

/* Confetti (js): one burst for a top-three viewer, once per visit. */
.lb-confetti { position: fixed; inset: 0; z-index: 70; width: 100vw; height: 100vh; pointer-events: none; }

/* ── Smaller screens ─────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .lb-you__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-you__facts { grid-column: 1 / -1; border-left: 0 !important; border-top: 1px solid var(--ui-border); }
  .lb-you__grid.is-waiting { grid-template-columns: minmax(0, 1fr); }
  .lb-you__grid.is-waiting .lb-you__cell + .lb-you__cell { border-left: 0; border-top: 1px solid var(--ui-border); }
}
@media (max-width: 900px) {
  .lb-hero__meta { align-items: flex-start; }
  .lb-hero__chips { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .lb-podium { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "first first" "second third"; gap: .85rem .75rem; }
  .lb-podium__card { padding: 1.5rem .85rem 0; }
  .lb-podium__card[data-medal="1"] { --step: 2.75rem; padding-top: 2.4rem; }
  .lb-podium__card[data-medal="2"] { --step: 2.25rem; }
  .lb-podium__card[data-medal="3"] { --step: 1.75rem; }
  .lb-podium__step { margin: 1rem -.85rem 0; }
  .lb-av--podium { --sz: 3.4rem; }
  .lb-podium__card[data-medal="1"] .lb-av--podium { --sz: 4.5rem; }
  .lb-podium__name { font-size: .875rem; }
  .lb-podium__sales { font-size: 1.2rem; }
  .lb-podium__card[data-medal="1"] .lb-podium__sales { font-size: 1.7rem; }
  .lb-podium__orders { font-size: .75rem; }
  .lb-row { grid-template-columns: 1.6rem auto minmax(0, 1fr) auto; gap: .65rem; padding: .55rem .8rem .55rem .5rem; }
  .lb-av--row { --sz: 2.3rem; }
  .lb-you .ui-card__head { flex-wrap: wrap; }
  .lb-you__grid { grid-template-columns: minmax(0, 1fr); }
  .lb-you__cell + .lb-you__cell { border-left: 0; border-top: 1px solid var(--ui-border); }
  .lb-av--you { --sz: 3.6rem; }
  .lb-you .ui-gauge { width: 5.75rem; height: 5.75rem; }
  .lb-name { flex-wrap: wrap; }
  .lb-name__text { flex: 1 1 calc(100% - 3.1rem); }
  .lb-name__state { margin-left: 3.1rem; }
  .lb-switch { margin-left: auto; }
  .lb-join { padding: 1.4rem 1.25rem; }
  .lb-join__actions { width: 100%; }
  .lb-join__actions .ui-btn { flex: 1 1 auto; }
}
@media (max-width: 640px) {
  .lb-public .ui-inset { margin: 0; }
  .lb-bar { padding: 0 .6rem 0 .9rem; }
  body.ui-app .lb-bar__logo { height: 1.6rem; }
  .lb-bar .ui-topbar__end { gap: .25rem; }
  .lb-hero__chips { gap: .4rem; }
  .lb-hero .ui-chip { gap: .35rem; padding: 0 .55rem; font-size: .7rem; }
}
@media (max-width: 380px) {
  .lb-bar .ui-btn--ghost { display: none; }  /* the join card below has Log in too */
}
