/* ==========================================================================
   Paper Mogul Sports — the site shell.

   One sports-site look for two destinations: The League (public) and a Cup
   (private event). Rides on the tokens in app.css (--bg --panel --panel-2
   --line --ink --ink-2 --accent --good --bad). This file owns the top bar, the
   scores strip, the scoreboard hero, the standings table, and the cup
   components — the whole ESPN-style grammar, in one place.
   ========================================================================== */

/* -- The one top bar ------------------------------------------------------- */
.sitebar {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--panel) 94%, #000);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 14px -8px rgba(0, 0, 0, .7);
}
.sitebar__in {
  /* One width for the whole site — see --wrap-max in app.css. This used to be
     a per-page --bar-max, which is how the bar and the content came to disagree. */
  display: flex; align-items: stretch; gap: 4px;
  max-width: var(--wrap-max); margin: 0 auto; padding: 0 18px;
}
.sitebar__brand {
  display: flex; align-items: center; gap: 11px; text-decoration: none;
  color: var(--ink); font-weight: 800; padding: 8px 16px 8px 0; white-space: nowrap;
}
.sitebar__brand img { height: 40px; width: auto; display: block; }
.sitebar__brand span { font-size: 16px; letter-spacing: -.01em; }
.sitebar__chip {
  font: 800 9.5px/1 ui-monospace, monospace; letter-spacing: .16em;
  color: #180c02; background: var(--accent); padding: 4px 7px; border-radius: 5px;
}
.sitebar__nav { display: flex; align-items: stretch; gap: 0; overflow-x: auto; scrollbar-width: none; }
.sitebar__nav::-webkit-scrollbar { display: none; }
.sitebar__nav a {
  display: flex; align-items: center; padding: 0 15px; text-decoration: none;
  color: var(--ink-2); font-weight: 700; font-size: 13.5px; white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.sitebar__nav a:hover { color: var(--ink); }
.sitebar__nav a.is-active { color: var(--ink); border-bottom-color: var(--accent); }
.sitebar__right { display: flex; align-items: center; gap: 10px; margin-left: auto; padding-left: 10px; }
.sitebar__wallet { font: 700 13px ui-monospace, monospace; color: var(--ink); text-decoration: none; }
.sitebar__wallet small { color: var(--ink-2); font-weight: 600; margin-left: 3px; }
.sitebar__wallet .sitebar__debt { color: var(--bad); }

/* On a phone the bar is one row too many: brand + nav + wallet/bell/avatar do
   not fit across, and .sitebar__nav has overflow-x:auto — which resolves its
   flex min-width to 0, so in a squeezed row it collapses to nothing and the
   whole nav disappears. (The "overflow is a licence to collapse" trap again.)
   So below this width the bar wraps and the nav takes its own full-width row,
   still the ESPN-style horizontally-scrolling strip it is on desktop. */
@media (max-width: 860px) {
  .sitebar__in { flex-wrap: wrap; align-items: center; padding: 0 12px; }
  .sitebar__brand { padding: 8px 10px 8px 0; }
  .sitebar__brand img { height: 34px; }
  .sitebar__right { padding-left: 0; }
  .sitebar__nav {
    order: 3; flex: 1 0 100%; width: 100%;
    border-top: 1px solid var(--line);
  }
  .sitebar__nav a { padding: 11px 14px; border-bottom-width: 3px; }
}

/* -- The bank (profile) ---------------------------------------------------- */
.bank { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 4px 0 14px; }
.bank__stat { border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); padding: 12px 14px; }
.bank__k { font: 700 10px ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.bank__v { font: 800 1.3rem ui-monospace, monospace; margin-top: 4px; }
.bank__v--debt { color: var(--bad); }
.bank__v--net { color: var(--accent-2); }
.bank__forms { display: flex; flex-wrap: wrap; gap: 10px; }
.bank__forms form { display: flex; gap: 6px; align-items: center; }
.bank__forms input { width: 110px; }
@media (max-width: 520px) { .bank { grid-template-columns: 1fr; } }
.lender { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: var(--panel-2); }
.lender__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.lender__apr { font: 700 12px ui-monospace, monospace; color: var(--accent-2); white-space: nowrap; }

/* -- The notification bell ------------------------------------------------- */
.notifbell { position: relative; }
.notifbell > summary { list-style: none; cursor: pointer; font-size: 17px; padding: 5px 7px; border-radius: 8px; position: relative; }
.notifbell > summary::-webkit-details-marker { display: none; }
.notifbell > summary:hover { background: #ffffff10; }
.notifbell__dot { position: absolute; top: -1px; right: -1px; background: var(--live); color: #fff; font: 800 9px/1 ui-monospace, monospace; padding: 2px 4px; border-radius: 8px; min-width: 14px; text-align: center; }
.notifbell__panel { position: absolute; right: 0; top: calc(100% + 8px); width: 320px; max-width: 90vw; background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; box-shadow: var(--shadow); z-index: 80; overflow: hidden; }
.notifbell__head { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.notifbell__clear { background: none; border: none; color: var(--ink-2); font: 600 12px var(--sans); cursor: pointer; padding: 0; }
.notifbell__clear:hover { color: var(--accent); }
.notifbell__list { max-height: 340px; overflow-y: auto; scrollbar-width: thin; }
.notifbell__item { display: block; padding: 10px 14px; border-bottom: 1px solid #1b2637; text-decoration: none; color: var(--ink); }
.notifbell__item:hover { background: #ffffff06; }
.notifbell__item.is-unread { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.notifbell__text { display: block; font-size: 13px; line-height: 1.4; }
.notifbell__time { display: block; color: var(--ink-3); font-size: 11px; margin-top: 2px; }
.notifbell__empty { padding: 18px 14px; color: var(--ink-3); font-size: 13px; text-align: center; }
.notifbell__all { display: block; text-align: center; padding: 10px; font-weight: 700; font-size: 13px; color: var(--accent); border-top: 1px solid var(--line); text-decoration: none; }

/* -- Notifications page rows ----------------------------------------------- */
.notifrow { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-top: 1px solid var(--line-soft); text-decoration: none; color: var(--ink); }
.notifrow:first-of-type { border-top: 0; }
.notifrow:hover { background: #ffffff05; }
.notifrow.is-unread { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.notifrow__icon { font-size: 20px; line-height: 1.2; flex: none; }
.notifrow__body { display: flex; flex-direction: column; }
.notifrow__text { font-size: 14px; }
.notifrow__time { color: var(--ink-3); font-size: 11.5px; margin-top: 2px; }

/* -- The win popup --------------------------------------------------------- */
.winpop[hidden] { display: none; }
.winpop { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; }
.winpop__scrim { position: absolute; inset: 0; background: rgba(3, 5, 10, .72); }
.winpop__card { position: relative; text-align: center; background: var(--panel); border: 1px solid var(--accent); border-radius: 18px; padding: 30px 28px; box-shadow: 0 0 60px -10px color-mix(in srgb, var(--accent) 60%, transparent); max-width: 90vw; width: 380px; animation: winpop-in .3s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes winpop-in { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.winpop__emoji { font-size: 64px; animation: winpop-pop .6s ease both; }
@keyframes winpop-pop { 0% { transform: scale(0) rotate(-20deg); } 60% { transform: scale(1.3) rotate(10deg); } 100% { transform: scale(1) rotate(0); } }
.winpop__text { font-size: 18px; font-weight: 800; margin: 12px 0 20px; text-wrap: balance; }
.winpop__burst { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 18px; }
.confetti { position: absolute; top: -10px; width: 8px; height: 12px; border-radius: 2px; animation: confetti-fall linear forwards; }
@keyframes confetti-fall { to { transform: translateY(360px) rotate(540deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .winpop__card, .winpop__emoji, .confetti { animation: none; }
}
.sitebar__exit {
  color: var(--ink-2); text-decoration: none; font-size: 12.5px; font-weight: 700;
  border: 1px solid var(--line); padding: 5px 10px; border-radius: 7px;
}
.sitebar__exit:hover { border-color: var(--accent); color: var(--ink); }
.sitebar__live {
  display: inline-flex; align-items: center; gap: 6px; font: 800 11px ui-monospace, monospace;
  letter-spacing: .1em; color: var(--bad); text-decoration: none;
}
.sitebar__live i { width: 7px; height: 7px; border-radius: 50%; background: var(--bad); animation: pmpulse 1.4s infinite; }
@keyframes pmpulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

/* -- The scores strip: the heartbeat, and it rolls like a ticker ----------- */
.scores { overflow: hidden; padding: 4px 2px 12px; }
.scores__track { display: flex; gap: 10px; width: max-content; }
/* The cards are rendered twice, so translating the track by half its width
   loops seamlessly. Pauses on hover/focus so a moving card is still clickable. */
.scores--rolling .scores__track { animation: scores-roll 70s linear infinite; }
.scores--rolling:hover .scores__track,
.scores--rolling:focus-within .scores__track { animation-play-state: paused; }
@keyframes scores-roll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .scores { overflow-x: auto; scrollbar-width: thin; }
  .scores--rolling .scores__track { animation: none; }
  .scores__dupe { display: none; }
}
.scorecard {
  flex: 0 0 auto; width: 190px; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: 11px; background: var(--panel); padding: 11px 13px;
  transition: border-color .15s, transform .15s;
}
.scorecard:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); transform: translateY(-1px); }
.scorecard__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.scorecard__state { font: 800 10px ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.scorecard--live .scorecard__state { color: var(--bad); }
.scorecard--final .scorecard__state { color: var(--good); }
.scorecard__state i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 4px; }
.scorecard--live .scorecard__state i { animation: pmpulse 1.4s infinite; }
.scorecard__sport { font: 700 10px ui-monospace, monospace; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.scorecard__name { font-weight: 700; font-size: 13.5px; line-height: 1.25; }
.scorecard__meta { color: var(--ink-2); font-size: 12px; margin-top: 4px; }
.scores__empty { color: var(--ink-2); font-size: 13px; padding: 8px 2px 14px; }

/* The viewer's own row, wherever they appear in a list (leaderboard rail). */
.entrant--you { background: color-mix(in srgb, var(--accent) 9%, transparent); border-radius: 8px; }

/* -- The scoreboard hero --------------------------------------------------- */
.scoreboard { margin-bottom: 16px; }
.hero-slate {
  aspect-ratio: 16 / 9; width: 100%;
  border: 1px solid var(--line); border-radius: 14px;
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--accent) 12%, var(--panel)), var(--panel));
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 24px;
}
.hero-slate__eyebrow { font: 700 11px ui-monospace, monospace; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); }
.hero-slate__title { font-size: clamp(1.4rem, 4vw, 2.4rem); font-weight: 800; margin: 0; text-wrap: balance; }
.hero-slate__meta { color: var(--ink-2); font-size: 14px; }
.hero-slate__count { font: 800 clamp(2rem, 8vw, 3.4rem)/1 ui-monospace, monospace; color: var(--accent); margin-top: 6px; font-variant-numeric: tabular-nums; }

/* IMPORTANT: the television is a fixed hero everywhere. It never shrinks or
   sticks on scroll — that sticky-shrink was the janky thing the whole site was
   doing. The panel is plain flow, full width, 16:9, and you scroll back up to
   watch, like any scoreboard. */
.broadcast, .broadcast--sticky { position: static !important; }

/* -- The commit rail follows you down a long market ------------------------ *
 * The bet slip lives in the right rail; a long market column used to scroll it
 * clean off the top, so you'd pick a price and the "Commit" window was nowhere
 * on screen. On desktop the rail now sticks below the top bar and scrolls
 * internally if it's taller than the viewport, so the slip is always in view.
 * On a phone the grid is one column and it just flows. */
@media (min-width: 1024px) {
  .eventgrid__rail {
    position: sticky; top: 70px; align-self: start;
    max-height: calc(100vh - 86px); overflow-y: auto; scrollbar-width: thin;
  }
  /* Nothing in here may shrink.
   *
   * The rail is a column flex container with a max-height, so the moment its
   * content is taller than the viewport its items are asked to give up space.
   * Most refuse: a flex item's min-height is `auto`, which means "no smaller
   * than my content". But that only holds while `overflow` is visible — an item
   * with `overflow: hidden` has min-height resolve to ZERO and is free to
   * collapse to nothing.
   *
   * The advert is the one element in this rail with `overflow: hidden`, so it
   * absorbed the whole overflow on its own and drew as a 48px sliver with the
   * logo cut in half. Nothing errored. It quietly volunteered.
   *
   * The rail scrolls, so no child of it should ever be shrinking to fit — and
   * this is written as `> *` rather than as a fix to the advert, because the
   * next element in here with a hidden overflow would do exactly the same
   * thing and look exactly as broken. */
  .eventgrid__rail > * { flex: 0 0 auto; }
}

/* -- The bet-slip wizard --------------------------------------------------- *
 * A pick opens a focused slip instead of two competing forms in a rail you
 * have to scroll to. A centred modal on desktop, a bottom-sheet on mobile, one
 * toggle for bet-chips vs free-call, and a back button to change the pick. */
.betsheet[hidden] { display: none; }
.betsheet { position: fixed; inset: 0; z-index: 200; display: flex; }
.betsheet__scrim { position: absolute; inset: 0; background: rgba(3, 5, 10, .66); }
.betsheet__panel {
  position: relative; margin: auto; width: min(440px, calc(100% - 24px));
  background: var(--panel); border: 1px solid var(--line2); border-radius: 16px;
  padding: 18px; box-shadow: var(--shadow); max-height: 90vh; overflow-y: auto;
}
.betsheet__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.betsheet__back { background: none; border: 1px solid var(--line2); color: var(--ink-2); border-radius: 8px; padding: 7px 12px; font-weight: 700; cursor: pointer; font-size: 13px; }
.betsheet__back:hover { color: var(--ink); border-color: var(--accent); }
.betsheet__pick { margin-left: auto; text-align: right; font-size: 14px; }
.betsheet__pick [data-selection-label] { font-weight: 700; }
.betsheet__pick [data-selection-odds] { color: var(--good); margin-left: 8px; font-weight: 800; }
.betsheet__toggle { display: flex; gap: 4px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 4px; margin-bottom: 16px; }
.betsheet__toggle button { flex: 1; background: none; border: none; color: var(--ink-2); font-weight: 700; padding: 10px; border-radius: 7px; cursor: pointer; font-size: 13.5px; }
.betsheet__toggle button.is-on { background: var(--accent); color: #180c02; }
.betsheet__pane[hidden] { display: none; }
body.betsheet-open { overflow: hidden; }

@media (max-width: 720px) {
  .betsheet__panel {
    margin: auto 0 0; width: 100%; max-height: 90vh;
    border-radius: 18px 18px 0 0;
    padding: 18px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    animation: betsheet-up .22s cubic-bezier(.2, .7, .2, 1);
  }
  @keyframes betsheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
}

/* -- Phase banner (schedule / manager) ------------------------------------- */
.cupnow { display: grid; grid-template-columns: 1fr auto; gap: 16px 22px; align-items: center; padding: 18px 22px; margin-bottom: 18px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 14px; background: linear-gradient(100deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 62%), var(--panel); }
.cupnow__phase { font: 700 11px/1 ui-monospace, monospace; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.cupnow__head { font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 800; margin: 0; }
.cupnow__detail { color: var(--ink-2); margin: 5px 0 0; font-size: 14.5px; }
.cupnow__side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cupnow__until { font: 600 12px ui-monospace, monospace; color: var(--ink-2); }
.cupnow--card { border-left-color: var(--good); }
.cupnow--card .cupnow__phase { color: var(--good); }
@media (max-width: 620px) { .cupnow { grid-template-columns: 1fr; } .cupnow__side { align-items: flex-start; } }

/* -- Now / next strip ------------------------------------------------------ */
.nownext { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.nownext__cell { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 12px 16px; }
.nownext__k { font: 700 10px ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.nownext__v { font-weight: 700; font-size: 14.5px; }
.nownext__cell .btn { margin-left: auto; }
.nownext__tag { font: 700 10px ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-left: 6px; }
.nownext__tag.is-live { color: var(--bad); }
@media (max-width: 620px) { .nownext { grid-template-columns: 1fr; } }

/* -- The duel meter / conference standings --------------------------------- */
.duel { margin: 4px 0 6px; }
.duel__bar { display: flex; height: 24px; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); background: var(--panel-2); }
.duel__seg { height: 100%; min-width: 2px; background: var(--c, var(--accent)); transition: width .6s cubic-bezier(.2,.7,.2,1); }
.duel__legend { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.duel__team { display: flex; align-items: center; gap: 8px; }
.duel__swatch { width: 12px; height: 12px; border-radius: 3px; background: var(--c, var(--accent)); flex: none; }
.duel__name { font-weight: 800; }
.duel__pts { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.duel__lead { font: 700 11px ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.duel__scores { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.duel__score { display: flex; align-items: center; gap: 9px; }
.duel__sname { font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: 15px; }
.duel__big { font: 800 28px/1 ui-monospace, monospace; }

.confgrid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.conf { border: 1px solid var(--line); border-top: 3px solid var(--c, var(--accent)); border-radius: 12px; background: var(--panel); padding: 16px 18px; }
.conf__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.conf__name { font-size: 1.15rem; font-weight: 800; color: var(--c, var(--ink)); }
.conf__pts { font: 800 1.1rem ui-monospace, monospace; }
.conf__team { display: grid; grid-template-columns: 24px 1fr auto auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
.conf__team:first-of-type { border-top: 0; }
.conf__crest { width: 22px; height: 22px; display: inline-flex; }
.conf__tname { font-weight: 600; font-size: 13.5px; }
.conf__mgr { color: var(--ink-2); font-size: 12px; }
.conf__tpts { font-variant-numeric: tabular-nums; font-weight: 700; }

/* -- Race rows (schedule / today) ------------------------------------------ */
.cardrow { display: grid; grid-template-columns: 62px 1fr auto; gap: 14px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.cardrow:first-of-type { border-top: 0; }
.cardrow__when { font: 700 12px ui-monospace, monospace; text-align: center; padding: 6px 0; border-radius: 8px; background: var(--panel-2); color: var(--ink-2); }
.cardrow--live .cardrow__when { background: var(--bad); color: #fff; }
.cardrow--done .cardrow__when { background: transparent; color: var(--good); }
.cardrow__name { font-weight: 700; font-size: 14px; }
.cardrow__meta { color: var(--ink-2); font-size: 12px; }
.cardrow__badge { font: 700 11px ui-monospace, monospace; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }

/* -- Manager view: squad + lineup ------------------------------------------ */
.squad { display: grid; gap: 10px; }
.pick { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); cursor: pointer; }
.pick:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick--on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.pick__box { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line); display: grid; place-items: center; }
.pick--on .pick__box { background: var(--accent); border-color: var(--accent); }
.pick__box::after { content: "✓"; opacity: 0; font-size: 13px; color: #180c02; font-weight: 900; }
.pick--on .pick__box::after { opacity: 1; }
.pick__name { font-weight: 700; }
.pick__meta { color: var(--ink-2); font-size: 12px; }
.formdots { display: inline-flex; gap: 3px; vertical-align: middle; }
.formdot { width: 9px; height: 9px; border-radius: 50%; background: var(--panel-2); display: inline-block; border: 1px solid var(--line); }
.formdot--win { background: var(--good); border-color: var(--good); }
.formdot--pod { background: color-mix(in srgb, var(--good) 55%, var(--panel-2)); }
.formdot--mid { background: var(--ink-2); }
.formdot--back { background: var(--panel-2); }
.formdot--dnf { background: var(--bad); border-color: var(--bad); }
.pickcount { font: 700 12px ui-monospace, monospace; color: var(--ink-2); padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; }
.pickcount--full { color: var(--good); border-color: var(--good); }

/* -- Your move CTA --------------------------------------------------------- */
.yourmove { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding: 16px 20px; text-decoration: none; color: inherit; border: 1px solid var(--accent); border-radius: 14px; background: linear-gradient(100deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%), var(--panel); }
.yourmove__k { font: 700 10px ui-monospace, monospace; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.yourmove__t { font-weight: 800; font-size: 1.05rem; margin-top: 3px; }
.yourmove__d { color: var(--ink-2); font-size: 13px; margin-top: 2px; }

/* -- Setup / builder helpers (carried from cup.css) ------------------------ */
.cupsetup__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; }
.cupsetup .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.cupsetup .field > span { font-size: 12px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.cupsetup .field input, .cupsetup .field select { width: 100%; }
.step { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); margin-bottom: 16px; overflow: hidden; }
.step__head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.step__no { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 800 14px ui-monospace, monospace; background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line); }
.step--done .step__no { background: var(--good); color: #06251a; border-color: var(--good); }
.step--now .step__no { background: var(--accent); color: #180c02; border-color: var(--accent); }
.step__title { font-size: 1.1rem; font-weight: 800; margin: 0; }
.step__sub { color: var(--ink-2); font-size: 12.5px; margin: 2px 0 0; }
.step__tag { margin-left: auto; font: 700 11px ui-monospace, monospace; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.step--now .step__tag { color: var(--accent); }
.step--done .step__tag { color: var(--good); }
.step__body { padding: 4px 20px 18px; }
.invitebox { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.invitebox code { flex: 1; min-width: 200px; padding: 9px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; font-size: 13px; word-break: break-all; }
.buildteam { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.chiplist { display: flex; flex-wrap: wrap; gap: 6px; }
.teamtick { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 13px; }
.teamtick input { accent-color: var(--accent); }

/* -- Showrunner remote (commissioner) -------------------------------------- */
.showrunner { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.showrunner form { display: inline; }

/* -- Sport segmented control (League board) -------------------------------- */
.sportseg { display: inline-flex; gap: 4px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px; align-items: center; flex-wrap: wrap; }
.sportseg a { display: inline-flex; align-items: center; padding: 6px 13px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: 13px; }
.sportseg a:hover { color: var(--ink); background: #ffffff0a; }
/* Active state is a ring, NOT a colour-inverting filter — the logos are colour
   cut-outs and inverting them turned the selected one into a solid blob. */
.sportseg a.is-on { background: color-mix(in srgb, var(--accent) 20%, var(--panel-2)); box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--ink); }
.sportseg img { height: 36px; width: auto; display: block; }

/* ── Shared: a quiet inline link, and a small variant ───────────────────── */
.link { color: var(--accent); text-decoration: none; font-weight: 700; }
.link:hover { text-decoration: underline; }
.link--sm { font-size: 12.5px; }

/* ── Achievements — the badge wall ──────────────────────────────────────── */
.achscore { font: 800 26px ui-monospace, monospace; color: var(--ink); }
.achscore .muted { font-size: 15px; }
.achbar { height: 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; margin: 4px 0 6px; }
.achbar__fill { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; transition: width .6s cubic-bezier(.2,.8,.3,1); }
.achbar__label { font-size: 13px; margin: 0 0 22px; }

.achsection { margin-bottom: 26px; }
.achsection__head { display: flex; align-items: center; gap: 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); margin: 0 0 12px; }
.achpip { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.achpip--t1 { background: var(--ink-3); }
.achpip--t2 { background: var(--accent); }
.achpip--t3 { background: #4aa3ff; }
.achpip--t4 { background: var(--accent-2); }
.achpip--t5 { background: #b26bff; }

.achgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.achcard { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); position: relative; overflow: hidden; }
.achcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ink-3); }
.achcard--t2::before { background: var(--accent); }
.achcard--t3::before { background: #4aa3ff; }
.achcard--t4::before { background: var(--accent-2); }
.achcard--t5::before { background: #b26bff; }
.achcard.is-locked { opacity: .6; }
.achcard.is-locked::before { opacity: .35; }
.achcard.is-earned { background: color-mix(in srgb, var(--accent) 6%, var(--panel-2)); border-color: color-mix(in srgb, var(--accent) 25%, var(--line)); }
.achcard.is-earned.achcard--t4 { background: color-mix(in srgb, var(--accent-2) 8%, var(--panel-2)); border-color: color-mix(in srgb, var(--accent-2) 30%, var(--line)); }
.achcard.is-earned.achcard--t5 { background: color-mix(in srgb, #b26bff 10%, var(--panel-2)); border-color: color-mix(in srgb, #b26bff 35%, var(--line)); }
.achcard__icon { font-size: 26px; line-height: 1; flex: none; filter: saturate(1.1); }
.achcard.is-locked .achcard__icon { filter: grayscale(1) opacity(.8); }
.achcard__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.achcard__name { font-size: 14px; color: var(--ink); }
.achcard__desc { font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.achcard__foot { margin-top: 3px; }
.achcard__got { font: 700 11px ui-monospace, monospace; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.achcard--t4 .achcard__got, .achcard--t5 .achcard__got { color: var(--accent-2); }
.achcard__rarity { font: 600 11px ui-monospace, monospace; color: var(--ink-3); }

/* ── Profile: the wallet/context switcher ───────────────────────────────── */
.ctxbar { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; margin: 6px 0 2px; }
.ctxbar__lead { align-self: center; font: 700 10px ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-right: 2px; }
.ctxtab { display: flex; flex-direction: column; gap: 2px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); text-decoration: none; min-width: 120px; }
.ctxtab:hover { border-color: var(--line-soft); }
.ctxtab.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel-2)); }
.ctxtab__label { font: 700 13px var(--sans); color: var(--ink); }
.ctxtab__sub { font: 600 11px ui-monospace, monospace; color: var(--ink-3); }
.ctxtab.is-on .ctxtab__sub { color: var(--accent); }

/* ── Cup Stats — hero cards, the side battle, weekend bars ───────────────── */
.statcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 4px 0 18px; }
.statcard { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-left: 3px solid var(--sc, var(--accent)); border-radius: 12px; background: var(--panel-2); text-decoration: none; }
.statcard:hover { background: color-mix(in srgb, var(--sc, var(--accent)) 8%, var(--panel-2)); }
.statcard__icon { font-size: 20px; line-height: 1; }
.statcard__label { font: 700 10px ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }
.statcard__name { font-size: 16px; color: var(--ink); }
.statcard__sub { font-size: 12px; color: var(--ink-2); }

.sidebattle { padding: 14px 16px; }
.sidebattle__head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 8px; gap: 10px; }
.sidebattle__head .muted { font: 700 10px ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; }
.sidebattle__bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--panel-2); border: 1px solid var(--line); }
.sidebattle__a, .sidebattle__b { display: block; height: 100%; transition: width .5s ease; }

.wkcell { display: flex; flex-direction: column; gap: 5px; min-width: 120px; }
.wkbar { height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.wkbar span { display: block; height: 100%; border-radius: 999px; }

/* ── Event header: which cup / qualifier this is ──────────────────────────── */
.cupflag { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.cupflag__cup { font: 800 12px ui-monospace, monospace; letter-spacing: .04em; color: var(--accent); }
.cupflag__kind { font: 800 10px ui-monospace, monospace; letter-spacing: .12em; padding: 3px 8px; border-radius: 999px; }
.cupflag__kind--qual { color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.cupflag__kind--card { color: var(--good); background: color-mix(in srgb, var(--good) 16%, transparent); border: 1px solid color-mix(in srgb, var(--good) 45%, transparent); }
.cupflag__night { font: 700 10px ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

/* ── Fake business website (/sponsor/{slug}) ──────────────────────────────── *
 * A framed "browser window" of the business's own site, painted in ITS colours
 * (--paper/--ink/--brand set inline per brand), so all 24 look distinct. It is
 * deliberately its own little world and does not use the app's dark tokens. */
.shop {
  --line-b: color-mix(in srgb, var(--ink) 14%, transparent);
  background: var(--paper); color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.4);
  font-family: "Inter", system-ui, sans-serif;
}
.shop__bar { display: flex; align-items: center; gap: 18px; padding: 12px 20px; border-bottom: 2px solid var(--brand); background: color-mix(in srgb, var(--paper) 86%, #fff); }
.shop__logo { height: 46px; width: auto; }
.shop__barnav { display: flex; gap: 18px; margin-left: auto; font-weight: 700; font-size: 13px; opacity: .8; }
.shop__barnav span { cursor: default; }
.shop__cta { background: var(--brand); color: #fff; text-decoration: none; font-weight: 800; padding: 9px 16px; border-radius: 8px; font-size: 13px; white-space: nowrap; box-shadow: 0 2px 0 color-mix(in srgb, var(--ink) 40%, transparent); }
.shop__cta--big { padding: 12px 22px; font-size: 15px; }
.shop__ribbon { background: var(--brand); color: #fff; text-align: center; font-weight: 700; font-size: 13px; padding: 7px 12px; letter-spacing: .02em; }
.shop__ribbon b { font-weight: 900; }

.shop__hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; padding: 40px 32px; align-items: center; background: linear-gradient(120deg, color-mix(in srgb, var(--brand) 12%, var(--paper)), var(--paper) 70%); }
.shop__name { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.02; margin: 0 0 8px; font-weight: 800; letter-spacing: -.01em; }
.shop__tag { font-size: 1.15rem; font-weight: 700; margin: 0 0 10px; color: var(--brand); }
.shop__premise { font-size: .95rem; opacity: .8; margin: 0 0 18px; max-width: 46ch; }
.shop__herobtns { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.shop__rating { font-weight: 800; color: var(--brand); }
.shop__rating small { color: var(--ink); opacity: .6; font-weight: 600; }
.shop__promises { list-style: none; margin: 0; padding: 16px 18px; background: color-mix(in srgb, var(--paper) 80%, #fff); border: 1px solid var(--line-b); border-radius: 12px; font-size: 13.5px; font-weight: 600; }
.shop__promises li { padding: 5px 0; }

.shop__section { padding: 34px 32px; border-top: 1px solid var(--line-b); }
.shop__sechead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.shop__sechead h2 { font-family: Georgia, serif; font-size: 1.5rem; margin: 0; }
.shop__sechead span { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; opacity: .55; font-weight: 700; }

.shop__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.prod { display: flex; flex-direction: column; gap: 6px; background: color-mix(in srgb, var(--paper) 70%, #fff); border: 1px solid var(--line-b); border-radius: 12px; padding: 16px; }
.prod__code { font: 700 10px ui-monospace, monospace; letter-spacing: .08em; opacity: .5; }
.prod__name { font-weight: 800; font-size: 15px; line-height: 1.2; }
.prod__blurb { font-size: 12.5px; opacity: .72; flex: 1; }
.prod__foot { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 6px; }
.prod__price { font-weight: 900; font-size: 17px; color: var(--brand); }
.prod__price s { color: var(--ink); opacity: .45; font-weight: 600; font-size: 13px; }
.prod__stock { font: 700 10px ui-monospace, monospace; text-transform: uppercase; letter-spacing: .06em; opacity: .6; }
.prod__stock.is-low { color: #c0392b; opacity: 1; }
.prod__add { margin-top: 8px; background: none; border: 1.5px solid var(--brand); color: var(--brand); font-weight: 800; border-radius: 8px; padding: 8px; font-size: 12.5px; cursor: not-allowed; opacity: .85; }
.shop__note { font-size: 12px; opacity: .6; margin: 18px 0 0; }

.shop__revgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.rev { margin: 0; background: color-mix(in srgb, var(--paper) 70%, #fff); border: 1px solid var(--line-b); border-radius: 12px; padding: 18px; }
.rev__stars { color: var(--brand); font-size: 15px; letter-spacing: 2px; margin-bottom: 8px; }
.rev blockquote { margin: 0 0 10px; font-size: 14px; font-style: italic; line-height: 1.5; }
.rev figcaption { font-size: 12.5px; font-weight: 700; opacity: .7; }

.shop__contactgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.shop__addr { font-size: 14px; line-height: 1.8; margin: 0 0 16px; }
.shop__team { display: flex; align-items: center; gap: 9px; text-decoration: none; color: inherit; font-weight: 700; font-size: 14px; padding: 6px 0; }
.shop__team small { opacity: .55; font-weight: 600; }
.shop__teamdot { width: 12px; height: 12px; border-radius: 3px; flex: none; }

.shop__footer { background: color-mix(in srgb, var(--ink) 90%, #000); color: color-mix(in srgb, var(--paper) 80%, #fff); padding: 22px 32px; }
.shop__smallprint { font-size: 11.5px; opacity: .7; margin-bottom: 10px; font-style: italic; }
.shop__legal { font-size: 11.5px; opacity: .6; }
.shop__legal a { color: inherit; font-weight: 700; }

@media (max-width: 720px) {
  .shop__hero, .shop__contactgrid { grid-template-columns: 1fr; }
  .shop__barnav { display: none; }
}

/* -- The allowance popup ---------------------------------------------------
   Built on .winpop so the scrim, the entrance and the confetti are the ones
   already on the page. What it adds is an itemised list, because "you were
   granted $1,750" with no breakdown is a number somebody has to take on
   trust — and half the point of collecting it by hand is seeing what it was
   for. Wider than the win card for the same reason. */
.allowpop__card { width: 440px; text-align: left; }
.allowpop .winpop__emoji { font-size: 48px; text-align: center; }
.allowpop__kicker { font: 700 10px ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); text-align: center; }
.allowpop__head { font-size: 22px; font-weight: 800; margin: 4px 0 14px; text-align: center; text-wrap: balance; }
.allowpop__list { list-style: none; margin: 0 0 16px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.allowpop__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 12px; }
.allowpop__row + .allowpop__row { border-top: 1px solid var(--line); }
.allowpop__what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.allowpop__where { font: 700 10px ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2); }
.allowpop__detail { font-size: 12px; color: var(--ink-2); }
.allowpop__amt { font: 800 15px ui-monospace, monospace; color: var(--good); white-space: nowrap; }
.allowpop__take { width: 100%; justify-content: center; font-size: 15px; padding: 11px 18px; }
.allowpop__note { font-size: 12px; color: var(--ink-2); text-align: center; margin: 10px 0 0; }

/* -- The ledger ------------------------------------------------------------
   The main column now, not the sidebar. A bank statement is the thing you came
   to read; the borrowing is a shop you visit occasionally, which is what a
   sidebar is for. */
.ledger { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ledger th { font: 700 10px ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ledger td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ledger tr:last-child td { border-bottom: 0; }
.ledger__icon { width: 1%; padding-right: 0; font-size: 15px; }
.ledger__what b { font-weight: 700; }
.ledger__when { font-size: 11.5px; color: var(--ink-2); margin-top: 2px; }
.ledger__where { font-size: 11.5px; color: var(--accent-2); font-weight: 700; }
.ledger__delta, .ledger__bal { text-align: right; font: 700 13.5px ui-monospace, monospace; white-space: nowrap; }
.ledger__delta--up { color: var(--good); }
.ledger__delta--down { color: var(--bad); }
/* The running balance is a reference column, not a headline — it should read
   as the thin grey figure down the side of a statement. */
.ledger__bal { color: var(--ink-2); font-weight: 600; }
.ledger tr:hover td { background: color-mix(in srgb, var(--panel-2) 60%, transparent); }
@media (max-width: 640px) {
  .ledger__when, .ledger__icon { display: none; }
  .ledger td, .ledger th { padding: 8px 8px; }
}

/* The filter chips above the statement. */
.ledgerfilter { display: flex; flex-wrap: wrap; gap: 6px; }
.ledgerfilter a { font: 700 11px ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); text-decoration: none; }
.ledgerfilter a:hover { border-color: var(--accent); color: var(--ink); }
.ledgerfilter a.is-on { background: var(--accent); border-color: var(--accent); color: #06080d; }

/* The bank's own sidebar — narrower than .split's, because borrowing is a
   short list of names and rates and does not want the width. */
.banksplit { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 1023px) { .banksplit { grid-template-columns: 1fr; } }
.allowpop__later { background: none; border: 0; padding: 0; margin-left: 6px; font: inherit; color: var(--ink-2); text-decoration: underline; cursor: pointer; }
.allowpop__later:hover { color: var(--ink); }

/* -- Wallets ---------------------------------------------------------------
   A player has more than one purse and until now only one of them was ever on
   screen. The tabs are drawn only when there IS more than one, because a
   switcher with a single option is a control that does nothing. */
.wallettabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.wallettab {
  display: flex; flex-direction: column; gap: 1px; min-width: 150px;
  padding: 9px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel-2); text-decoration: none; color: inherit;
}
.wallettab:hover { border-color: var(--accent); }
.wallettab.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel-2)); }
.wallettab__k { font: 700 10px ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.wallettab.is-on .wallettab__k { color: var(--accent); }
.wallettab__v { font: 800 1.05rem ui-monospace, monospace; }
.wallettab__s { font-size: 11px; color: var(--ink-3, var(--ink-2)); }

/* The top bar's wallet, when it is a cup purse rather than the bankroll. The
   name is the whole point — a balance with no account on it is the fault this
   fixes, not a decoration. */
.sitebar__wallet--purse { border-color: var(--accent-2); }
.sitebar__purse {
  display: block; font: 700 9px ui-monospace, monospace; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent-2); line-height: 1.2;
}

/* -- The bets page ---------------------------------------------------------- */
.bank__sub { font-size: 11.5px; color: var(--ink-2); margin-top: 3px; }
.betlist td { vertical-align: top; }
.betchip {
  display: inline-block; font: 700 9.5px ui-monospace, monospace; letter-spacing: .09em;
  text-transform: uppercase; padding: 2px 7px; border-radius: 999px; border: 1px solid currentColor;
}
.betchip--open { color: var(--accent-2); }
.betchip--won  { color: var(--good); }
.betchip--lost { color: var(--bad); }
.betchip--void { color: var(--ink-2); }
@media (max-width: 640px) {
  .betlist th:nth-child(4), .betlist td:nth-child(4) { display: none; }
}
