/* Race tab — an event board, not a generic leaderboard table. */
body.on-race .workspace{width:100%!important;max-width:none!important;margin:0!important;min-height:0!important}
body.on-race .columns{display:block!important;height:100%!important;min-height:0!important;overflow:hidden!important;background:#0a0a0d!important}
body.on-race .columns>.chat{display:none!important}
body.on-race #racePage{display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-width:none!important;padding:0!important;overflow:hidden!important;background:transparent!important}

#racePage .race-champ-wrap{display:flex!important;width:100%!important;height:100%!important;min-height:0!important;max-width:none!important;margin:0!important;padding:0 2px 2px!important;gap:14px!important;color:#f1eef4;font-family:Manrope,"Segoe UI",system-ui,sans-serif}
#racePage .race-hud{display:grid;grid-template-columns:minmax(240px,1.15fr) minmax(190px,.8fr) minmax(190px,.8fr) minmax(175px,.72fr);align-items:stretch;min-height:96px;border:1px solid #28252e;border-radius:10px;background:#101015;overflow:hidden}
#racePage .race-hud>div{display:flex;min-width:0;flex-direction:column;justify-content:center;padding:17px 23px;border-right:1px solid #28252e}
#racePage .race-hud>div:last-child{border-right:0}
#racePage .race-hud p,#racePage .race-hud span{margin:0;color:#8b7e9b;font:800 8px/1 "DM Mono",monospace;letter-spacing:.14em}
#racePage .race-hud-event h2{margin:7px 0 0;color:#f3f0f5;font:800 24px/1 "Space Grotesk",sans-serif;letter-spacing:-.045em}
#racePage .race-hud-pool b{display:flex;align-items:center;gap:6px;margin-top:7px;color:#f5f2f7;font:800 27px/1 "Space Grotesk",sans-serif;letter-spacing:-.05em}
#racePage .race-hud-pool .g-coin{width:21px;height:21px}
#racePage .race-hud-count b{margin-top:7px;color:#d1c1eb;font:800 22px/1 "Space Grotesk",sans-serif;letter-spacing:-.04em;white-space:nowrap}
#racePage .race-hud-rank{align-items:flex-end;text-align:right}
#racePage .race-hud-rank>b{margin-top:4px;color:#c5a6ea;font:800 31px/.9 "Space Grotesk",sans-serif;letter-spacing:-.06em}
#racePage .race-hud-rank small{display:flex;align-items:center;gap:4px;margin-top:6px;color:#89828e;font:700 9px/1 "DM Mono",monospace;white-space:nowrap}
#racePage .race-hud-rank .g-coin{width:12px;height:12px}

#racePage .race-arena{display:grid;grid-template-columns:minmax(0,1fr) 344px;flex:1;min-height:0;gap:14px}
#racePage .race-podium-stage{position:relative;min-width:0;min-height:0;overflow:hidden;border:1px solid #28252e;border-radius:12px;background:radial-gradient(80% 85% at 50% 100%,rgba(132,96,191,.09),transparent 58%),linear-gradient(145deg,#121117,#0d0c10 74%)}
#racePage .race-podium-stage:before{content:"";position:absolute;inset:50px 0 0;background:linear-gradient(90deg,transparent 0,rgba(255,255,255,.018) 50%,transparent 100%);pointer-events:none}
#racePage .race-podium-stage>header{position:relative;z-index:2;display:flex;align-items:center;justify-content:space-between;height:54px;padding:0 22px;border-bottom:1px solid #28252e}
#racePage .race-podium-stage>header span{display:flex;align-items:center;gap:7px;color:#efebf2;font:800 11px/1 "DM Mono",monospace;letter-spacing:.12em}
#racePage .race-podium-stage>header span i{width:6px;height:6px;border-radius:50%;background:#4ed393;box-shadow:0 0 8px rgba(78,211,147,.6)}
#racePage .race-podium-stage>header small{color:#817a87;font:700 8px/1 "DM Mono",monospace;letter-spacing:.1em}
#racePage .race-podium-grid{position:relative;z-index:1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));height:calc(100% - 54px);min-height:0;padding:16px 20px 0;gap:11px;align-items:center}
#racePage .race-podium-racer{position:relative;z-index:1;display:flex;min-width:0;min-height:0;align-items:center;flex-direction:column;justify-content:flex-end;padding:28px 20px 27px;text-align:center}
#racePage .race-podium-racer:before{content:"";position:absolute;z-index:-1;right:0;bottom:0;left:0;height:63%;border:1px solid #2b2732;border-bottom:0;border-radius:9px 9px 0 0;background:linear-gradient(180deg,rgba(255,255,255,.025),rgba(255,255,255,.005))}
#racePage .race-podium-racer-1{padding-bottom:32px}
#racePage .race-podium-racer-1:before{height:78%;border-color:rgba(233,189,73,.35);background:linear-gradient(180deg,rgba(233,189,73,.1),rgba(233,189,73,.018) 82%)}
#racePage .race-podium-racer-2:before{height:67%;border-color:rgba(185,192,201,.25)}
#racePage .race-podium-racer-3:before{height:56%;border-color:rgba(185,120,70,.28)}
#racePage .race-podium-place{position:absolute;z-index:2;top:18px;left:18px;display:grid;place-items:center;width:29px;height:29px;border-radius:50%;background:#2a2730;color:#bab4c0;font:800 13px/1 "Space Grotesk",sans-serif}
#racePage .race-podium-racer-1 .race-podium-place{background:#e9bd49;color:#251d0b}
#racePage .race-podium-racer-2 .race-podium-place{background:#b9c0c9;color:#1c1f23}
#racePage .race-podium-racer-3 .race-podium-place{background:#b97846;color:#281a0f}
#racePage .race-podium-avatar{display:grid;place-items:center;margin-bottom:15px}
#racePage .race-podium-avatar .pg-av,#racePage .race-podium-avatar .race-open-avatar{width:79px!important;height:79px!important;border:2px solid #514b57!important;border-radius:50%!important;background:#1a1820;object-fit:cover}
#racePage .race-podium-racer-1 .race-podium-avatar .pg-av{width:102px!important;height:102px!important;border-color:#e9bd49!important;box-shadow:0 0 0 5px rgba(233,189,73,.08),0 10px 28px rgba(0,0,0,.38)}
#racePage .race-podium-racer-2 .race-podium-avatar .pg-av{border-color:#b9c0c9!important}
#racePage .race-podium-racer-3 .race-podium-avatar .pg-av{border-color:#b97846!important}
#racePage .race-podium-avatar .race-open-avatar{display:grid;place-items:center;border-style:dashed!important;color:#968fa0;font:800 29px/1 "Space Grotesk",sans-serif}
#racePage .race-podium-person{min-width:0}
#racePage .race-podium-person b{display:block;overflow:hidden;color:#f2eff4;font:800 16px/1.1 "Space Grotesk",sans-serif;text-overflow:ellipsis;white-space:nowrap}
#racePage .race-podium-racer-1 .race-podium-person b{font-size:20px}
#racePage .race-podium-person small{display:block;margin-top:6px;color:#89828f;font:700 9px/1 "DM Mono",monospace}
#racePage .race-champ-tag{display:inline-flex;align-items:center;margin-left:6px;padding:3px 4px;border:1px solid #48414d;border-radius:3px;color:#918a98;font:800 7px/1 "DM Mono",monospace;font-style:normal;letter-spacing:.08em;vertical-align:2px}
#racePage .race-podium-reward{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;margin-top:17px}
#racePage .race-podium-reward .race-prize-item{width:48px!important;height:48px!important;flex:none;object-fit:contain;filter:drop-shadow(0 5px 8px rgba(0,0,0,.45))}
#racePage .race-podium-racer-1 .race-podium-reward .race-prize-item{width:57px!important;height:57px!important}
#racePage .race-podium-reward>span{min-width:0;text-align:left}
#racePage .race-podium-reward small{display:block;color:#857d8a;font:800 7px/1 "DM Mono",monospace;letter-spacing:.1em}
#racePage .race-podium-reward b{display:block;overflow:hidden;max-width:130px;margin-top:5px;color:#dcd7e1;font:800 10px/1.1 "Space Grotesk",sans-serif;text-overflow:ellipsis;white-space:nowrap}
#racePage .race-podium-meter{display:flex;align-items:center;gap:9px;width:100%;margin-top:18px}
#racePage .race-podium-meter>i{flex:1;height:5px;overflow:hidden;border-radius:999px;background:#292630}
#racePage .race-podium-meter>i span{display:block;height:100%;border-radius:inherit;background:#877b9c}
#racePage .race-podium-racer-1 .race-podium-meter>i span{background:#e9bd49}
#racePage .race-podium-racer-2 .race-podium-meter>i span{background:#b9c0c9}
#racePage .race-podium-racer-3 .race-podium-meter>i span{background:#b97846}
#racePage .race-podium-meter>b{display:flex;align-items:center;gap:4px;min-width:60px;color:#bcb6c1;font:800 10px/1 "Space Grotesk",sans-serif;white-space:nowrap}
#racePage .race-podium-meter .g-coin{width:12px;height:12px}

#racePage .race-chasing{display:flex;min-height:0;flex-direction:column;overflow:hidden;border:1px solid #28252e;border-radius:12px;background:#101015}
#racePage .race-chasing>header{display:flex;align-items:center;justify-content:space-between;min-height:54px;padding:0 19px;border-bottom:1px solid #28252e}
#racePage .race-chasing>header span{color:#eeebf1;font:800 11px/1 "DM Mono",monospace;letter-spacing:.1em}
#racePage .race-chasing>header small{color:#817a87;font:700 8px/1 "DM Mono",monospace;letter-spacing:.08em}
#racePage .race-cutoff{margin:15px;padding:15px;border:1px solid #302c36;border-radius:7px;background:linear-gradient(135deg,rgba(140,87,238,.08),rgba(140,87,238,.015))}
#racePage .race-cutoff span{display:block;color:#9588a8;font:800 8px/1 "DM Mono",monospace;letter-spacing:.12em}
#racePage .race-cutoff b{display:flex;align-items:center;gap:5px;margin-top:8px;color:#e7dff4;font:800 25px/1 "Space Grotesk",sans-serif;letter-spacing:-.05em}
#racePage .race-cutoff .g-coin{width:18px;height:18px}
#racePage .race-cutoff small{display:block;margin-top:8px;color:#817a87;font:600 9px/1.35 Manrope,"Segoe UI",sans-serif}
#racePage .race-chaser-list{display:grid;gap:0;margin-top:auto}
#racePage .race-chaser{display:grid;grid-template-columns:29px 47px minmax(0,1fr);align-items:center;gap:9px;min-height:82px;padding:0 16px;border-top:1px solid #28252e}
#racePage .race-chaser-place{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#292630;color:#aaa3af;font:800 12px/1 "Space Grotesk",sans-serif}
#racePage .race-chaser>.pg-av,#racePage .race-chaser>.race-open-avatar{width:45px!important;height:45px!important;border:1px solid #514b57!important;border-radius:50%!important;background:#1a1820;object-fit:cover}
#racePage .race-chaser>.race-open-avatar{display:grid;place-items:center;border-style:dashed!important;color:#968fa0;font:800 19px/1 "Space Grotesk",sans-serif}
#racePage .race-chaser-person{min-width:0}
#racePage .race-chaser-person b{display:block;overflow:hidden;color:#e9e6ec;font:800 13px/1.1 "Space Grotesk",sans-serif;text-overflow:ellipsis;white-space:nowrap}
#racePage .race-chaser-person small{display:block;overflow:hidden;margin-top:5px;color:#827b87;font:700 8px/1 "DM Mono",monospace;letter-spacing:.04em;text-overflow:ellipsis;white-space:nowrap}
#racePage .race-chaser-meter{grid-column:3;display:flex;align-items:center;margin-top:-14px}
#racePage .race-chaser-meter i{width:100%;height:4px;overflow:hidden;border-radius:999px;background:#292630}
#racePage .race-chaser-meter i span{display:block;height:100%;border-radius:inherit;background:#776b89}
#racePage .race-chaser-total{display:none}

@media(max-width:1150px){
  body.on-race .columns{height:auto!important;overflow:visible!important}
  body.on-race #racePage{height:auto!important;overflow:visible!important}
  #racePage .race-champ-wrap{height:auto!important;min-height:0!important;padding-bottom:24px!important}
  #racePage .race-hud{grid-template-columns:repeat(2,minmax(0,1fr))}
  #racePage .race-hud>div:nth-child(2){border-right:0}
  #racePage .race-hud>div:nth-child(n+3){border-top:1px solid #28252e}
  #racePage .race-arena{grid-template-columns:1fr}
  #racePage .race-podium-stage{min-height:550px}
  #racePage .race-chasing{min-height:270px}
  #racePage .race-chaser-list{grid-template-columns:1fr 1fr}
  #racePage .race-chaser{border-top:1px solid #28252e}
  #racePage .race-chaser+.race-chaser{border-left:1px solid #28252e}
}

/* No secondary backdrop between the event board and fixed chat rail. */
@media(min-width:851px){
  body.on-race .columns,
  body.on-affiliates .columns,
  html.gf-scale body.on-race .columns,
  html.gf-scale body.on-affiliates .columns{
    gap:0!important;
    background:#101015!important;
  }
}

/* Affiliates has a fixed chat rail, so reserve that space before the dashboard
   lays out its cards. This keeps the two lower panels inside the actual page. */
@media(min-width:851px){
  body.on-affiliates .columns,
  html.gf-scale body.on-affiliates .columns{
    display:block!important;
    width:calc(100% - 400px)!important;
    max-width:calc(100% - 400px)!important;
    margin:0!important;
  }
  body.on-affiliates #affiliatesPage,
  html.gf-scale body.on-affiliates #affiliatesPage{
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    box-sizing:border-box!important;
  }
}

/* Keep affiliate currency on the same clean balance-purple system. */
#affiliatesPage .aff-ref-values small{color:#c6a6ff!important}
#affiliatesPage .aff-ref-values small .g-coin{filter:drop-shadow(0 0 5px rgba(165,107,255,.45))!important}

/* Affiliate dashboard final pass: reserve the fixed chat rail and use the balance purple everywhere. */
:root{--gf-balance-purple:#a56bff;--gf-balance-purple-light:#c6a6ff;--gf-balance-purple-deep:#7e4fd0}
@media(min-width:851px){
  body.on-affiliates #affiliatesPage,
  html.gf-scale body.on-affiliates #affiliatesPage{
    width:calc(100% - 400px)!important;
    max-width:calc(100% - 400px)!important;
    margin-right:400px!important;
  }
}
#affiliatesPage .aff-dashboard{padding:24px clamp(22px,2.2vw,38px) 30px!important;gap:18px!important}
#affiliatesPage .aff-main-hero{border-color:rgba(165,107,255,.24)!important;background:linear-gradient(112deg,rgba(31,25,46,.92),rgba(18,16,27,.92) 62%,rgba(20,17,29,.94))!important}
#affiliatesPage .aff-main-hero:after{background:radial-gradient(circle,rgba(165,107,255,.16),transparent 66%)!important}
#affiliatesPage .aff-hero-copy>p,#affiliatesPage .aff-claim-card>span,#affiliatesPage .aff-stat-grid article>span,#affiliatesPage .aff-panel header span{color:#b99ce9!important}
#affiliatesPage .aff-hero-copy h2 span,#affiliatesPage .aff-claim-card>b,#affiliatesPage .aff-stat-grid article>b:has(.g-coin),#affiliatesPage .aff-earnings-panel header>b,#affiliatesPage .aff-ref-values b{color:var(--gf-balance-purple)!important}
#affiliatesPage .aff-link-shell button,#affiliatesPage .aff-claim-btn,#affiliatesPage .aff-referrals-panel header button{background:var(--gf-balance-purple)!important;color:#17121e!important}
#affiliatesPage .aff-main-hero .g-coin,#affiliatesPage .aff-stat-grid .g-coin,#affiliatesPage .aff-panel .g-coin{filter:drop-shadow(0 0 6px rgba(165,107,255,.42))!important}
#affiliatesPage .aff-bottom-grid{grid-template-columns:minmax(0,1fr) minmax(390px,.98fr)!important;gap:18px!important;min-height:366px!important}
#affiliatesPage .aff-panel{padding:24px 26px!important;border-color:rgba(165,107,255,.18)!important;background:linear-gradient(145deg,rgba(25,22,35,.94),rgba(14,13,20,.94))!important}
#affiliatesPage .aff-panel header h3{font-size:22px!important}
#affiliatesPage .aff-earnings-meta{display:flex;flex-direction:column;align-items:flex-end;gap:12px}
#affiliatesPage .aff-range-tabs{display:flex;align-items:center;gap:4px;padding:4px;border:1px solid rgba(165,107,255,.2);border-radius:8px;background:rgba(8,7,13,.65)}
#affiliatesPage .aff-range-tabs button{min-width:41px;padding:7px 8px;border:0;border-radius:5px;background:transparent;color:#938aa2;cursor:pointer;font:800 9px/1 "DM Mono",monospace;letter-spacing:.06em;transition:background .16s ease,color .16s ease,box-shadow .16s ease}
#affiliatesPage .aff-range-tabs button[aria-pressed="true"]{background:var(--gf-balance-purple);color:#17121e;box-shadow:0 2px 10px rgba(165,107,255,.28)}
#affiliatesPage .aff-range-tabs button:hover{color:#f7f1ff}
#affiliatesPage .aff-earnings-panel header>b{color:var(--gf-balance-purple)!important;font-size:19px!important}
#affiliatesPage .aff-earnings-panel header>b small{color:#c4b1e5!important}
#affiliatesPage .aff-chart{height:190px!important;margin-top:24px!important;gap:14px!important;border-bottom-color:rgba(198,166,255,.16)!important}
#affiliatesPage .aff-chart i{width:min(34px,100%)!important;background:linear-gradient(180deg,#c9abff,#7e4fd0)!important;box-shadow:0 0 19px rgba(165,107,255,.2)!important}
#affiliatesPage .aff-chart>div:nth-child(6) i{background:linear-gradient(180deg,#d8c3ff,#9a66ec)!important;box-shadow:0 0 20px rgba(165,107,255,.26)!important}
#affiliatesPage .aff-chart span{color:#b3a6c0!important;font-size:9px!important}
#affiliatesPage .aff-earnings-panel footer{margin-top:18px!important;color:#b0a5be!important;font-size:11px!important}
#affiliatesPage .aff-earnings-panel footer>b{color:#a56bff!important}
#affiliatesPage .aff-referrals-panel ul{margin-top:18px!important}
#affiliatesPage .aff-referrals-panel li{padding:16px 0!important;border-top-color:rgba(198,166,255,.13)!important}
#affiliatesPage .aff-ref-user{gap:13px!important}
#affiliatesPage .aff-ref-user>span{flex-basis:38px!important;width:38px!important;height:38px!important;border-color:rgba(165,107,255,.52)!important;background:rgba(165,107,255,.13)!important;color:#d9c8ff!important;font-size:14px!important}
#affiliatesPage .aff-ref-user>div{gap:5px!important}
#affiliatesPage .aff-ref-user b{font-size:14px!important;color:#f5f0fb!important}
#affiliatesPage .aff-ref-user small,#affiliatesPage .aff-ref-values small{color:#aaa0b8!important;font-size:10px!important}
#affiliatesPage .aff-ref-values{gap:7px!important}
#affiliatesPage .aff-ref-values b{color:var(--gf-balance-purple)!important;font-size:13px!important}
#affiliatesPage .aff-ref-values b .g-coin,#affiliatesPage .aff-ref-values small .g-coin{width:14px!important;height:14px!important}
@media(max-width:1050px){
  body.on-affiliates #affiliatesPage,html.gf-scale body.on-affiliates #affiliatesPage{width:100%!important;max-width:none!important;margin-right:0!important}
  #affiliatesPage .aff-bottom-grid{grid-template-columns:1fr!important}
}

/* Event views share the normal chat, but its frame must be tied to the viewport —
   otherwise a tall race board can push the composer below the screen. */
@media(min-width:851px){
  body.on-race .columns,
  body.on-affiliates .columns,
  html.gf-scale body.on-race .columns,
  html.gf-scale body.on-affiliates .columns{
    gap:0!important;
    background:#101015!important;
  }
  body.on-race .columns>.chat,
  body.on-affiliates .columns>.chat,
  html.gf-scale body.on-race .columns>.chat,
  html.gf-scale body.on-affiliates .columns>.chat{
    position:fixed!important;
    top:118px!important;
    right:0!important;
    bottom:0!important;
    width:400px!important;
    height:auto!important;
    max-height:none!important;
    display:grid!important;
    grid-template-rows:auto minmax(0,1fr) auto!important;
    z-index:10!important;
  }
  body.on-race .columns>.chat .chat-head,
  body.on-affiliates .columns>.chat .chat-head,
  html.gf-scale body.on-race .columns>.chat .chat-head,
  html.gf-scale body.on-affiliates .columns>.chat .chat-head{grid-row:1!important}
  body.on-race .columns>.chat .messages,
  body.on-affiliates .columns>.chat .messages,
  html.gf-scale body.on-race .columns>.chat .messages,
  html.gf-scale body.on-affiliates .columns>.chat .messages{
    grid-row:2!important;
    min-height:0!important;
    height:auto!important;
    overflow-y:auto!important;
  }
  body.on-race .columns>.chat form,
  body.on-affiliates .columns>.chat form,
  html.gf-scale body.on-race .columns>.chat form,
  html.gf-scale body.on-affiliates .columns>.chat form{
    grid-row:3!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 56px!important;
    min-height:88px!important;
    margin:0!important;
  }
}

/* Keep the event header compact: event + prize pool start together on the left,
   while the countdown keeps the right edge clean. */
#racePage .race-stage-header{grid-template-columns:auto auto minmax(0,1fr)!important;column-gap:28px!important}
#racePage .race-stage-title{grid-column:1!important;justify-self:start!important;text-align:left!important}
#racePage .race-stage-stats>span:first-child{grid-column:2!important;justify-self:start!important;text-align:left!important}
#racePage .race-stage-stats>span:first-child b{justify-content:flex-start!important}
#racePage .race-stage-stats>span:last-child{grid-column:3!important;justify-self:end!important;text-align:right!important}
@media(max-width:850px){
  #racePage .race-stage-header{grid-template-columns:minmax(0,1fr) auto!important;column-gap:14px!important}
  #racePage .race-stage-stats>span:first-child{grid-column:2!important}
  #racePage .race-stage-stats>span:last-child{display:none!important}
}

/* Final affiliate canvas: the lower analytics live on the page, not in two cut-off cards. */
@media(min-width:851px){
  body.on-affiliates .workspace,
  html.gf-scale body.on-affiliates .workspace{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
  }
  body.on-affiliates .columns,
  html.gf-scale body.on-affiliates .columns{
    display:block!important;
    width:calc(100% - 400px)!important;
    max-width:calc(100% - 400px)!important;
    height:100%!important;
    margin:0!important;
  }
  body.on-affiliates #affiliatesPage,
  html.gf-scale body.on-affiliates #affiliatesPage{
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
  }
}
#affiliatesPage .aff-dashboard{
  background:transparent!important;
}
#affiliatesPage .aff-bottom-grid{
  grid-template-columns:minmax(0,1.05fr) minmax(440px,.95fr)!important;
  gap:64px!important;
  min-height:380px!important;
  background:transparent!important;
}
#affiliatesPage .aff-bottom-grid::before,
#affiliatesPage .aff-bottom-grid::after,
#affiliatesPage .aff-panel{
  background:transparent!important;
  box-shadow:none!important;
}
#affiliatesPage .aff-panel{
  min-height:380px!important;
  border:0!important;
  border-radius:0!important;
}
#affiliatesPage .aff-earnings-panel{
  padding-left:0!important;
  padding-right:0!important;
  border:0!important;
}
#affiliatesPage .aff-referrals-panel{
  padding-left:0!important;
  padding-right:0!important;
  border:0!important;
}
#affiliatesPage .aff-panel header{
  min-height:72px!important;
  padding-bottom:14px!important;
  border-bottom:0!important;
}

/* Referral numbers stay sharp; reserve glow for the main balance only. */
#affiliatesPage .aff-ref-values .g-coin{
  filter:none!important;
  opacity:.72!important;
}
#affiliatesPage .aff-ref-values small,
#affiliatesPage .aff-ref-values b{
  color:#b8b0c2!important;
  text-shadow:none!important;
}
#affiliatesPage .aff-ref-values b{color:#ae8df1!important}

/* A soft footer replaces the old hard dark strip. */
#affiliatesPage .aff-earnings-panel footer{
  margin-top:20px!important;
  padding:13px 0!important;
  border-top:1px solid rgba(165,107,255,.16)!important;
  background:linear-gradient(90deg,rgba(165,107,255,.07),transparent 62%)!important;
  color:#b8aacf!important;
}
#affiliatesPage .aff-earnings-panel footer>b{
  color:#c7a6ff!important;
  text-shadow:0 0 12px rgba(165,107,255,.18)!important;
}

/* Time ranges are individual controls, with a clear but restrained active state. */
#affiliatesPage .aff-range-tabs{
  gap:6px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
}
#affiliatesPage .aff-range-tabs button{
  min-width:46px!important;
  padding:9px 10px!important;
  border:1px solid transparent!important;
  border-radius:5px!important;
  background:transparent!important;
  color:#9e93ac!important;
}
#affiliatesPage .aff-range-tabs button:hover{
  border-color:rgba(165,107,255,.38)!important;
  background:rgba(165,107,255,.1)!important;
  color:#eee6ff!important;
}
#affiliatesPage .aff-range-tabs button[aria-pressed="true"]{
  border-color:rgba(202,174,255,.72)!important;
  background:linear-gradient(135deg,#b084ff,#8e5aef)!important;
  color:#17121e!important;
  box-shadow:0 4px 14px rgba(165,107,255,.2)!important;
}

/* Hover or keyboard-focus a bar to read its exact earnings. */
#affiliatesPage .aff-chart-day{position:relative!important;cursor:default}
#affiliatesPage .aff-chart-day>i{
  height:var(--h)!important;
  transition:filter .16s ease,transform .16s ease!important;
}
#affiliatesPage .aff-chart-day>b{
  position:absolute!important;
  z-index:3!important;
  bottom:calc(var(--h) + 14px)!important;
  left:50%!important;
  display:flex!important;
  align-items:center!important;
  gap:4px!important;
  padding:7px 9px!important;
  border:1px solid rgba(198,166,255,.45)!important;
  border-radius:5px!important;
  background:#17131f!important;
  box-shadow:0 10px 22px rgba(0,0,0,.32)!important;
  color:#e9dfff!important;
  font:800 10px/1 "Space Grotesk",sans-serif!important;
  opacity:0!important;
  pointer-events:none!important;
  transform:translate(-50%,6px)!important;
  transition:opacity .16s ease,transform .16s ease!important;
  white-space:nowrap!important;
}
#affiliatesPage .aff-chart-day>b .g-coin{width:13px!important;height:13px!important;filter:none!important;opacity:.82!important}
#affiliatesPage .aff-chart-day:hover>b,
#affiliatesPage .aff-chart-day:focus>b{opacity:1!important;transform:translate(-50%,0)!important}
#affiliatesPage .aff-chart-day:hover>i,
#affiliatesPage .aff-chart-day:focus>i{filter:brightness(1.16)!important;transform:translateY(-3px)!important}

/* The analytics area uses the exact Inventory canvas, never a second gray surface. */
body.on-affiliates #affiliatesPage,
body.on-affiliates #affiliatesPage .aff-dashboard,
body.on-affiliates #affiliatesPage .aff-bottom-grid,
body.on-affiliates #affiliatesPage .aff-panel,
body.on-affiliates #affiliatesPage .aff-earnings-panel,
body.on-affiliates #affiliatesPage .aff-referrals-panel{
  background-color:#121118!important;
  background-image:none!important;
}
body.on-affiliates #affiliatesPage .aff-bottom-grid::before,
body.on-affiliates #affiliatesPage .aff-bottom-grid::after{
  content:none!important;
  display:none!important;
}

/* Compact Roblox-style referral paging. */
#affiliatesPage .aff-ref-pager{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:5px!important;
  margin-top:18px!important;
  padding-top:13px!important;
  border-top:1px solid rgba(165,107,255,.13)!important;
}
#affiliatesPage .aff-ref-pager button{
  display:grid!important;
  width:28px!important;
  height:28px!important;
  place-items:center!important;
  padding:0!important;
  border:1px solid rgba(165,107,255,.26)!important;
  border-radius:4px!important;
  background:#17131f!important;
  color:#bba8d8!important;
  cursor:pointer!important;
  font:800 11px/1 "DM Mono",monospace!important;
  transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease!important;
}
#affiliatesPage .aff-ref-pager button:hover:not(:disabled){
  border-color:rgba(190,157,255,.72)!important;
  background:#241b34!important;
  color:#f0e8ff!important;
  transform:translateY(-1px)!important;
}
#affiliatesPage .aff-ref-pager button.is-active{
  border-color:#b88aff!important;
  background:linear-gradient(135deg,#b084ff,#8956e9)!important;
  color:#17121e!important;
  box-shadow:0 3px 10px rgba(165,107,255,.18)!important;
}
#affiliatesPage .aff-ref-pager button:disabled{opacity:.32!important;cursor:default!important}

/* Affiliates: use the whole page up to live chat. The lower data lives on the
   canvas; only the four quick stats are cards. */
@media(min-width:851px){
  body.on-affiliates .columns,
  html.gf-scale body.on-affiliates .columns{
    display:block!important;
    width:calc(100% - 400px)!important;
    max-width:calc(100% - 400px)!important;
    margin:0!important;
  }
  body.on-affiliates #affiliatesPage,
  html.gf-scale body.on-affiliates #affiliatesPage{
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    box-sizing:border-box!important;
  }
}
#affiliatesPage .aff-dashboard{gap:20px!important}
#affiliatesPage .aff-stat-grid{gap:12px!important}
#affiliatesPage .aff-stat-grid article{
  min-height:124px!important;
  padding:20px 22px!important;
  border:1px solid rgba(165,107,255,.23)!important;
  border-top:2px solid rgba(165,107,255,.64)!important;
  border-radius:4px!important;
  background:linear-gradient(145deg,rgba(31,24,43,.72),rgba(17,15,24,.82))!important;
  box-shadow:inset 0 1px 0 rgba(222,205,255,.05)!important;
}
#affiliatesPage .aff-bottom-grid{
  grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr)!important;
  gap:0!important;
  min-height:420px!important;
  background:radial-gradient(65% 96% at 14% 15%,rgba(165,107,255,.06),transparent 68%)!important;
}
#affiliatesPage .aff-panel{
  min-height:420px!important;
  padding:24px 28px 18px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
#affiliatesPage .aff-earnings-panel{
  padding-left:0!important;
  border-right:1px solid rgba(165,107,255,.16)!important;
}
#affiliatesPage .aff-referrals-panel{padding-right:0!important}
#affiliatesPage .aff-panel header{
  min-height:72px!important;
  padding-bottom:18px!important;
  border-bottom:1px solid rgba(198,166,255,.15)!important;
}
#affiliatesPage .aff-panel header h3{font-size:25px!important}
#affiliatesPage .aff-chart{height:220px!important;margin-top:28px!important}
#affiliatesPage .aff-chart i{width:min(38px,100%)!important}
#affiliatesPage .aff-referrals-panel ul{margin-top:4px!important}
#affiliatesPage .aff-referrals-panel li{min-height:62px!important;padding:16px 0!important}
@media(max-width:1050px){
  #affiliatesPage .aff-bottom-grid{grid-template-columns:1fr!important}
  #affiliatesPage .aff-earnings-panel{padding-right:0!important;border-right:0!important;border-bottom:1px solid rgba(165,107,255,.16)!important}
  #affiliatesPage .aff-referrals-panel{padding-left:0!important}
}
@media(max-width:700px){
  #racePage .race-hud{display:block}
  #racePage .race-hud>div{min-height:74px;border-right:0!important;border-bottom:1px solid #28252e}
  #racePage .race-hud>div:last-child{border-bottom:0}
  #racePage .race-hud-rank{align-items:flex-start;text-align:left}
  #racePage .race-podium-stage{min-height:630px}
  #racePage .race-podium-stage>header{padding:0 13px}
  #racePage .race-podium-stage>header small{display:none}
  #racePage .race-podium-grid{padding:12px 7px 0;gap:5px}
  #racePage .race-podium-racer{padding:22px 6px 16px}
  #racePage .race-podium-racer-1{padding-bottom:18px}
  #racePage .race-podium-place{top:12px;left:9px;width:24px;height:24px;font-size:11px}
  #racePage .race-podium-avatar .pg-av,#racePage .race-podium-avatar .race-open-avatar{width:55px!important;height:55px!important}
  #racePage .race-podium-racer-1 .race-podium-avatar .pg-av{width:72px!important;height:72px!important}
  #racePage .race-podium-person b,#racePage .race-podium-racer-1 .race-podium-person b{font-size:12px}
  #racePage .race-podium-person small{font-size:7px}
  #racePage .race-podium-reward{display:block;margin-top:11px}
  #racePage .race-podium-reward .race-prize-item,#racePage .race-podium-racer-1 .race-podium-reward .race-prize-item{width:39px!important;height:39px!important}
  #racePage .race-podium-reward>span{display:none}
  #racePage .race-podium-meter{display:none}
  #racePage .race-chaser-list{grid-template-columns:1fr}
  #racePage .race-chaser+.race-chaser{border-left:0}
}

/* Desktop race uses the normal site split again: event on the left, live chat on the right. */
@media(min-width:851px){
  body.on-race .columns{display:grid!important;grid-template-columns:minmax(0,1fr) clamp(300px,23vw,430px)!important;grid-template-rows:minmax(0,1fr)!important;gap:20px!important;height:100%!important;min-height:0!important;overflow:hidden!important;align-items:stretch!important}
  body.on-race #racePage{display:block!important;grid-column:1!important;grid-row:1!important;min-width:0!important;height:100%!important;min-height:0!important;overflow:hidden!important}
  body.on-race .columns>.chat{display:flex!important;grid-column:2!important;grid-row:1!important;align-self:stretch!important;width:auto!important;height:100%!important;min-height:0!important;max-height:none!important}
}
#racePage .race-podium-grid{align-items:start!important;padding-top:38px!important}
#racePage .race-podium-racer{align-self:start!important}
#racePage .race-stage-header{height:62px!important;padding:0 22px!important}
#racePage .race-stage-title{display:flex;min-width:0;flex-direction:column;gap:5px}
#racePage .race-stage-title>span{display:block!important;color:#eeebf1!important;font:800 10px/1 "DM Mono",monospace!important;letter-spacing:.13em!important}
#racePage .race-stage-title>small{color:#827b87!important;font:700 8px/1 "DM Mono",monospace!important;letter-spacing:.08em!important}
#racePage .race-stage-stats{display:flex;align-items:center;gap:18px;margin-left:auto}
#racePage .race-stage-stats>span{display:block!important;padding-left:18px;border-left:1px solid #28252e;color:inherit!important}
#racePage .race-stage-stats>span:first-child{border-left:0}
#racePage .race-stage-stats small{display:block!important;color:#807987!important;font:800 7px/1 "DM Mono",monospace!important;letter-spacing:.1em!important}
#racePage .race-stage-stats b{display:flex;align-items:center;gap:4px;margin-top:5px;color:#d7d0e0;font:800 13px/1 "Space Grotesk",sans-serif;letter-spacing:-.025em;white-space:nowrap}
#racePage .race-stage-stats .g-coin{width:13px;height:13px}
@media(max-width:850px){
  #racePage .race-stage-stats>span:first-child{display:none!important}
  #racePage .race-stage-stats{gap:9px}
  #racePage .race-stage-stats>span{padding-left:9px}
}

/* Final event polish: real chat beside the stage, higher contrast, and no placeholder side panel. */
@media(min-width:851px){
  html.gf-scale body.on-race .columns{display:grid!important;grid-template-columns:minmax(0,1fr) clamp(300px,23vw,430px)!important;grid-template-rows:minmax(0,1fr)!important;gap:20px!important;height:100%!important;min-height:0!important;overflow:hidden!important}
  html.gf-scale body.on-race #racePage{grid-column:1!important;grid-row:1!important;min-width:0!important;height:100%!important;min-height:0!important;overflow:hidden!important}
  html.gf-scale body.on-race .columns>.chat{display:flex!important;grid-column:2!important;grid-row:1!important;align-self:stretch!important;width:auto!important;height:100%!important;min-height:0!important;max-height:none!important}
}
#racePage .race-arena{grid-template-columns:minmax(0,1fr)!important}
#racePage .race-podium-stage{border-color:#34303a!important;background:radial-gradient(50% 72% at 50% 40%,rgba(233,189,73,.09),transparent 62%),radial-gradient(32% 48% at 15% 46%,rgba(185,192,201,.055),transparent 70%),radial-gradient(32% 48% at 86% 50%,rgba(185,120,70,.07),transparent 70%),linear-gradient(145deg,#141219,#0d0c10 78%)!important}
#racePage .race-podium-stage:before{inset:63px 0 0!important;background:repeating-linear-gradient(90deg,transparent 0 118px,rgba(255,255,255,.018) 118px 119px),linear-gradient(180deg,transparent 0 68%,rgba(0,0,0,.18) 100%)!important}
#racePage .race-podium-stage:after{content:"WAGER RACE";position:absolute;right:24px;bottom:18px;color:rgba(255,255,255,.025);font:800 clamp(52px,9vw,150px)/.8 "Space Grotesk",sans-serif;letter-spacing:-.09em;pointer-events:none}
#racePage .race-stage-header{height:74px!important;border-bottom-color:#34303a!important}
#racePage .race-stage-title{gap:7px!important}
#racePage .race-stage-title>span{color:#f2eef6!important;font-size:12px!important;letter-spacing:.15em!important}
#racePage .race-stage-title>small{color:#aaa1b0!important;font-size:9px!important;letter-spacing:.1em!important}
#racePage .race-stage-stats{gap:24px!important}
#racePage .race-stage-stats>span{padding-left:24px!important;border-left-color:#34303a!important}
#racePage .race-stage-stats small{color:#9e94aa!important;font-size:8px!important}
#racePage .race-stage-stats b{margin-top:7px!important;color:#f0ebf4!important;font-size:16px!important}
#racePage .race-stage-stats>span:first-child b{color:#f0c94e!important}
#racePage .race-stage-stats>span:last-child b{color:#d6b7ff!important;font-size:21px!important}
#racePage .race-podium-grid{align-items:start!important;padding:42px 28px 0!important;gap:18px!important}
#racePage .race-podium-racer{align-self:start!important;height:390px!important;justify-content:center!important;padding:34px 25px 26px!important}
#racePage .race-podium-racer:before{height:100%!important;border-color:#39343f!important;border-radius:12px 12px 0 0!important;background:linear-gradient(180deg,rgba(255,255,255,.038),rgba(255,255,255,.006) 75%)!important}
#racePage .race-podium-racer-1{height:440px!important;margin-top:0!important;padding-bottom:33px!important}
#racePage .race-podium-racer-1:before{border-color:rgba(233,189,73,.7)!important;background:linear-gradient(180deg,rgba(233,189,73,.18),rgba(233,189,73,.035) 68%,rgba(233,189,73,.015))!important;box-shadow:inset 0 1px 0 rgba(255,233,161,.17),0 22px 70px rgba(233,189,73,.055)!important}
#racePage .race-podium-racer-2{margin-top:35px!important}
#racePage .race-podium-racer-2:before{border-color:rgba(185,192,201,.52)!important;background:linear-gradient(180deg,rgba(185,192,201,.11),rgba(185,192,201,.018) 72%)!important}
#racePage .race-podium-racer-3{margin-top:67px!important}
#racePage .race-podium-racer-3:before{border-color:rgba(185,120,70,.58)!important;background:linear-gradient(180deg,rgba(185,120,70,.13),rgba(185,120,70,.02) 72%)!important}
#racePage .race-podium-place{top:16px!important;left:16px!important;width:34px!important;height:34px!important;font-size:15px!important;box-shadow:0 4px 15px rgba(0,0,0,.3)}
#racePage .race-podium-avatar{margin-bottom:17px!important}
#racePage .race-podium-avatar .pg-av,#racePage .race-podium-avatar .race-open-avatar{width:88px!important;height:88px!important;border-width:2px!important}
#racePage .race-podium-racer-1 .race-podium-avatar .pg-av{width:118px!important;height:118px!important;box-shadow:0 0 0 6px rgba(233,189,73,.1),0 15px 38px rgba(0,0,0,.42)!important}
#racePage .race-podium-person b{color:#f4f0f6!important;font-size:20px!important;letter-spacing:-.035em!important}
#racePage .race-podium-racer-1 .race-podium-person b{font-size:26px!important}
#racePage .race-podium-person small{margin-top:8px!important;color:#b1a9b6!important;font-size:11px!important;letter-spacing:.025em!important}
#racePage .race-podium-reward{margin-top:21px!important;gap:11px!important}
#racePage .race-podium-reward .race-prize-item{width:61px!important;height:61px!important}
#racePage .race-podium-racer-1 .race-podium-reward .race-prize-item{width:78px!important;height:78px!important}
#racePage .race-podium-reward small{color:#a89fab!important;font-size:8px!important}
#racePage .race-podium-reward b{max-width:160px!important;margin-top:6px!important;color:#f0ebf3!important;font-size:13px!important}
#racePage .race-podium-meter{margin-top:22px!important}
#racePage .race-podium-meter>i{height:7px!important;background:#302c35!important}
#racePage .race-podium-meter>b{color:#d8d1dd!important;font-size:12px!important}
@media(max-width:1150px){#racePage .race-podium-racer{height:350px!important}#racePage .race-podium-racer-1{height:395px!important}}

/* High-contrast event finish — no grid lines, no tiny split-stat header. */
#racePage .race-podium-stage{border-color:#3a3443!important;background:radial-gradient(56% 76% at 50% 42%,rgba(255,203,91,.12),transparent 65%),radial-gradient(36% 50% at 11% 52%,rgba(189,209,230,.09),transparent 72%),radial-gradient(36% 52% at 88% 53%,rgba(225,139,78,.1),transparent 72%),linear-gradient(150deg,#17131d 0%,#0d0c11 82%)!important}
#racePage .race-podium-stage:before{inset:86px 0 0!important;background:radial-gradient(74% 55% at 50% 100%,rgba(0,0,0,.36),transparent 74%)!important}
#racePage .race-podium-stage:after{right:30px!important;bottom:98px!important;color:rgba(255,255,255,.035)!important}
#racePage .race-stage-header{height:86px!important;padding:0 28px!important;border-bottom-color:#393440!important;background:linear-gradient(90deg,rgba(255,255,255,.025),rgba(255,255,255,.005))}
#racePage .race-stage-title>span{color:#fffaff!important;font:800 16px/1 "Space Grotesk",sans-serif!important;letter-spacing:-.025em!important}
#racePage .race-stage-title>small{color:#c1b9c9!important;font:700 10px/1.3 Manrope,"Segoe UI",sans-serif!important;letter-spacing:.035em!important}
#racePage .race-stage-stats{gap:34px!important}
#racePage .race-stage-stats>span{padding-left:0!important;border-left:0!important}
#racePage .race-stage-stats small{color:#9f94ad!important;font:800 8px/1 "DM Mono",monospace!important;letter-spacing:.12em!important}
#racePage .race-stage-stats b{margin-top:8px!important;color:#faf6fc!important;font:800 19px/1 "Space Grotesk",sans-serif!important;letter-spacing:-.045em!important}
#racePage .race-stage-stats>span:first-child b{color:#ffd166!important;text-shadow:0 0 20px rgba(255,209,102,.14)}
#racePage .race-stage-stats .g-coin{width:16px!important;height:16px!important}
#racePage .race-podium-grid{height:calc(100% - 178px)!important;padding:32px 32px 0!important;background:radial-gradient(84% 44% at 50% 94%,rgba(255,213,114,.04),transparent 76%)}
#racePage .race-podium-racer-1:before{border-color:rgba(255,209,102,.82)!important;background:linear-gradient(180deg,rgba(255,209,102,.22),rgba(223,160,42,.055) 70%,rgba(255,209,102,.018))!important;box-shadow:inset 0 1px 0 rgba(255,245,201,.22),0 28px 80px rgba(255,190,59,.085)!important}
#racePage .race-podium-racer-2:before{border-color:rgba(210,222,238,.72)!important;background:linear-gradient(180deg,rgba(210,222,238,.16),rgba(168,186,210,.03) 72%)!important}
#racePage .race-podium-racer-3:before{border-color:rgba(234,150,89,.74)!important;background:linear-gradient(180deg,rgba(234,150,89,.17),rgba(199,101,45,.035) 72%)!important}
#racePage .race-podium-racer-1 .race-podium-avatar .pg-av{border-color:#ffd166!important;box-shadow:0 0 0 7px rgba(255,209,102,.12),0 16px 42px rgba(0,0,0,.46)!important}
#racePage .race-podium-racer-2 .race-podium-avatar .pg-av{border-color:#d2deee!important;box-shadow:0 0 0 4px rgba(210,222,238,.075)!important}
#racePage .race-podium-racer-3 .race-podium-avatar .pg-av{border-color:#ea9659!important;box-shadow:0 0 0 4px rgba(234,150,89,.075)!important}
#racePage .race-podium-racer-1 .race-podium-place{background:#ffd166!important;color:#31230c!important}
#racePage .race-podium-racer-2 .race-podium-place{background:#d2deee!important;color:#202733!important}
#racePage .race-podium-racer-3 .race-podium-place{background:#ea9659!important;color:#351b0d!important}
#racePage .race-podium-person b{color:#fffaff!important}
#racePage .race-podium-person small{color:#d0c8d5!important;font:700 11px/1 Manrope,"Segoe UI",sans-serif!important}
#racePage .race-podium-reward small{color:#c5bccc!important;font-size:9px!important}
#racePage .race-podium-reward b{color:#fffaff!important;font-size:14px!important}
#racePage .race-podium-racer-1 .race-podium-meter>i span{background:linear-gradient(90deg,#e4aa3d,#ffd166)!important}
#racePage .race-podium-racer-2 .race-podium-meter>i span{background:linear-gradient(90deg,#8ba0bb,#d2deee)!important}
#racePage .race-podium-racer-3 .race-podium-meter>i span{background:linear-gradient(90deg,#b25e32,#ea9659)!important}

#racePage .race-my-position{position:absolute;z-index:4;right:22px;bottom:16px;left:22px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;min-height:80px;padding:12px 20px;border:1px solid #403847;border-radius:10px;background:linear-gradient(100deg,rgba(25,20,31,.96),rgba(16,14,20,.94));box-shadow:0 14px 36px rgba(0,0,0,.28)}
#racePage .race-my-player{display:flex;align-items:center;gap:11px;min-width:0}
#racePage .race-my-player .pg-av{width:48px!important;height:48px!important;border:1px solid #b68cff!important;border-radius:50%!important;background:#201929;object-fit:cover;box-shadow:0 0 0 4px rgba(182,140,255,.08)}
#racePage .race-my-player>span{min-width:0}
#racePage .race-my-player small,#racePage .race-my-rank span,#racePage .race-my-wager span{display:block;color:#ab9bbb;font:800 8px/1 "DM Mono",monospace;letter-spacing:.12em}
#racePage .race-my-player b{display:block;overflow:hidden;margin-top:6px;color:#fffaff;font:800 15px/1 "Space Grotesk",sans-serif;text-overflow:ellipsis;white-space:nowrap}
#racePage .race-my-rank{padding:0 38px;border-right:1px solid #403847;border-left:1px solid #403847;text-align:center}
#racePage .race-my-rank b{display:block;margin-top:4px;color:#d7b9ff;font:800 31px/.9 "Space Grotesk",sans-serif;letter-spacing:-.07em;text-shadow:0 0 20px rgba(215,185,255,.16)}
#racePage .race-my-wager{justify-self:end;text-align:right}
#racePage .race-my-wager b{display:flex;align-items:center;justify-content:flex-end;gap:5px;margin-top:7px;color:#f5eff8;font:800 14px/1 "Space Grotesk",sans-serif}
#racePage .race-my-wager .g-coin{width:15px;height:15px}
@media(max-width:850px){
  #racePage .race-stage-header{height:78px!important;padding:0 14px!important}
  #racePage .race-stage-title>small{display:none!important}
  #racePage .race-stage-stats{gap:13px!important}
  #racePage .race-stage-stats b{font-size:14px!important}
  #racePage .race-podium-grid{height:calc(100% - 168px)!important;padding:24px 10px 0!important}
  #racePage .race-my-position{right:10px;bottom:10px;left:10px;grid-template-columns:minmax(0,1fr) auto;padding:11px 13px}
  #racePage .race-my-wager{display:none}
  #racePage .race-my-rank{padding:0 0 0 16px;border-top:0;border-right:0}
}

/* Rank sits immediately beneath the three podium spots; keep the event panel clean and squared. */
@media(min-width:851px){
  html.gf-scale body.on-race .columns{gap:0!important}
  html.gf-scale body.on-race .columns>.chat{border-left:1px solid #34303a!important;border-top:1px solid #34303a!important;border-right:1px solid #34303a!important;border-bottom:1px solid #34303a!important;border-radius:0!important}
  html.gf-scale body.on-race #racePage{padding-right:0!important}
}
#racePage .race-podium-stage{border-radius:5px!important;background:#101015!important}
#racePage .race-stage-header{height:82px!important;padding:0 27px!important;border-bottom-color:#35303b!important;border-radius:4px 4px 0 0!important;background:#17141c!important;box-shadow:inset 0 -2px 0 rgba(255,209,102,.12)}
#racePage .race-stage-title>span{font-size:17px!important;letter-spacing:-.03em!important}
#racePage .race-stage-title>small{color:#c5bdca!important;font-size:10px!important}
#racePage .race-stage-stats{gap:30px!important}
#racePage .race-stage-stats b{font-size:20px!important}
#racePage .race-stage-stats>span:first-child b{color:#ffd166!important}
#racePage .race-podium-stage:before{inset:82px 0 0!important;background:radial-gradient(58% 52% at 50% 62%,rgba(255,209,102,.055),transparent 72%)!important}
#racePage .race-podium-stage:after{bottom:18px!important;color:rgba(255,255,255,.018)!important}
#racePage .race-podium-grid{height:auto!important;min-height:0!important;padding:28px 32px 0!important;background:transparent!important}
#racePage .race-podium-racer{height:382px!important;background:#15141a!important}
#racePage .race-podium-racer:before{height:100%!important;border-color:#393440!important;background:#17161d!important;box-shadow:inset 0 2px 0 rgba(255,255,255,.035)!important}
#racePage .race-podium-racer-1{height:424px!important;background:#201b14!important}
#racePage .race-podium-racer-1:before{border-color:#e5b84f!important;background:#211c14!important;box-shadow:inset 0 2px 0 rgba(255,231,161,.15),0 16px 42px rgba(0,0,0,.24)!important}
#racePage .race-podium-racer-2{background:#171a22!important}
#racePage .race-podium-racer-2:before{border-color:#c7d2e2!important;background:#1a1d25!important}
#racePage .race-podium-racer-3{background:#211714!important}
#racePage .race-podium-racer-3:before{border-color:#dc8c4f!important;background:#241914!important}
#racePage .race-podium-racer-1 .race-podium-person b{color:#ffe7a3!important}
#racePage .race-podium-racer-2 .race-podium-person b{color:#e7edf5!important}
#racePage .race-podium-racer-3 .race-podium-person b{color:#ffc18f!important}
#racePage .race-my-position{position:relative!important;right:auto!important;bottom:auto!important;left:auto!important;z-index:3!important;width:auto!important;min-height:88px!important;margin:18px 32px 24px!important;border-color:#49414f!important;border-radius:5px!important;background:#17141c!important;box-shadow:inset 3px 0 #a976e8,0 12px 28px rgba(0,0,0,.22)!important}
#racePage .race-my-player small,#racePage .race-my-rank span,#racePage .race-my-wager span{color:#c1a9df!important;font-size:9px!important}
#racePage .race-my-player b{font-size:17px!important}
#racePage .race-my-rank b{color:#e0c4ff!important;font-size:35px!important}
#racePage .race-my-wager b{font-size:15px!important;color:#fffaff!important}
@media(max-width:850px){
  #racePage .race-podium-grid{height:auto!important;padding:22px 10px 0!important}
  #racePage .race-my-position{position:relative!important;right:auto!important;bottom:auto!important;left:auto!important;margin:14px 10px 18px!important}
}

/* Race header: make the pool the centered hero stat rather than a side detail. */
#racePage .race-stage-header{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;
  align-items:center!important;
  background:#18151c!important;
  box-shadow:inset 0 -1px 0 rgba(255,211,106,.25),inset 0 1px 0 rgba(255,255,255,.025)!important;
}
#racePage .race-stage-stats{display:contents!important}
#racePage .race-stage-stats>span{padding:0!important;border:0!important}
#racePage .race-stage-stats>span:first-child{grid-column:2;justify-self:center;text-align:center}
#racePage .race-stage-stats>span:last-child{grid-column:3;justify-self:end;text-align:right}
#racePage .race-stage-stats>span:first-child small{color:#c4ad7c!important}
#racePage .race-stage-stats>span:first-child b{justify-content:center;color:#ffd36b!important;text-shadow:0 0 18px rgba(255,201,81,.15)!important}
#racePage .race-stage-stats>span:last-child small{color:#aaa2b1!important}
#racePage .race-stage-stats>span:last-child b{color:#eee9f3!important;font-size:19px!important}
#racePage .race-stage-title>span{color:#f6f2f8!important}
#racePage .race-stage-title>small{color:#aca4b3!important}

/* Keep the real composer visible at the bottom of chat in event views. */
html.gf-scale body.on-race .columns>.chat,
html.gf-scale body.on-affiliates .columns>.chat,
body.on-race .columns>.chat,
body.on-affiliates .columns>.chat{
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  background:#121117!important;
}
html.gf-scale body.on-race .chat .messages,
html.gf-scale body.on-affiliates .chat .messages,
body.on-race .chat .messages,
body.on-affiliates .chat .messages{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
}
html.gf-scale body.on-race .chat form,
html.gf-scale body.on-affiliates .chat form,
body.on-race .chat form,
body.on-affiliates .chat form{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 66px!important;
  flex:0 0 68px!important;
  min-height:68px!important;
  margin:0!important;
  padding:10px!important;
  gap:8px!important;
  border-top:1px solid #38313f!important;
  background:#17141c!important;
}
html.gf-scale body.on-race .chat input,
html.gf-scale body.on-affiliates .chat input,
body.on-race .chat input,
body.on-affiliates .chat input{
  display:block!important;
  visibility:visible!important;
  min-width:0!important;
  width:100%!important;
  height:46px!important;
  padding:0 13px!important;
  border:1px solid #403648!important;
  border-radius:4px!important;
  outline:0!important;
  background:#0e0d12!important;
  color:#f5f1f7!important;
  font:600 12px Manrope,"Segoe UI",sans-serif!important;
}
html.gf-scale body.on-race .chat input::placeholder,
html.gf-scale body.on-affiliates .chat input::placeholder,
body.on-race .chat input::placeholder,
body.on-affiliates .chat input::placeholder{color:#958b9e!important;opacity:1!important}
html.gf-scale body.on-race .chat form button,
html.gf-scale body.on-affiliates .chat form button,
body.on-race .chat form button,
body.on-affiliates .chat form button{
  display:grid!important;
  place-items:center!important;
  min-width:0!important;
  height:46px!important;
  border:1px solid #a976e8!important;
  border-radius:4px!important;
  background:#8b5ed0!important;
  color:#fff!important;
  font:800 10px "DM Mono",monospace!important;
  letter-spacing:.08em!important;
  box-shadow:0 6px 18px rgba(112,67,180,.2)!important;
}
html.gf-scale body.on-race .chat form button:hover,
html.gf-scale body.on-affiliates .chat form button:hover,
body.on-race .chat form button:hover,
body.on-affiliates .chat form button:hover{background:#9b6ce0!important}

/* The event panes otherwise make chat content as tall as its messages. Lock it to the viewport so the composer never falls below the fold. */
@media(min-width:851px){
  html.gf-scale body.on-race .columns>.chat,
  html.gf-scale body.on-affiliates .columns>.chat,
  body.on-race .columns>.chat,
  body.on-affiliates .columns>.chat{
    position:sticky!important;
    top:0!important;
    align-self:start!important;
    height:calc(100dvh - 108px)!important;
    min-height:0!important;
    max-height:calc(100dvh - 108px)!important;
  }
  html.gf-scale body.on-race .chat form,
  html.gf-scale body.on-affiliates .chat form,
  body.on-race .chat form,
  body.on-affiliates .chat form{
    order:3!important;
    margin-top:auto!important;
  }
}

/* Global profile rank is an icon beside the username — never a second noisy line. */
#racePage .race-podium-person b{display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;overflow:visible!important}
#racePage .race-global-rank{display:block!important;width:25px!important;height:25px!important;flex:0 0 25px!important;margin:0!important;object-fit:contain!important;filter:drop-shadow(0 2px 4px rgba(0,0,0,.45))!important}
#racePage .race-podium-wager{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:4px!important;white-space:nowrap!important}
#racePage .race-podium-wager .g-coin{width:18px!important;height:18px!important;flex:0 0 18px!important}
#racePage .race-podium-wager strong{color:#f6f1f8!important;font:800 16px/1 "Space Grotesk",sans-serif!important;letter-spacing:-.04em!important}
#racePage .race-podium-wager em{color:#a69cab!important;font:800 8px/1 "DM Mono",monospace!important;letter-spacing:.1em!important;font-style:normal!important}
#racePage .race-podium-reward small{letter-spacing:.14em!important}

/* Currency is one GodlyFlip-purple system throughout the race. */
#racePage .race-stage-stats>span:first-child small{color:#c59aed!important}
#racePage .race-stage-stats>span:first-child b{color:#c98dff!important;text-shadow:0 0 20px rgba(185,132,242,.34)!important}
#racePage .race-podium-wager strong,#racePage .race-my-wager b,#racePage .race-podium-meter>b{color:#cfa3ff!important;text-shadow:0 0 14px rgba(177,110,241,.2)!important}
#racePage .race-podium-wager em{color:#b7a3c9!important}
#racePage .race-podium-wager .g-coin,#racePage .race-my-wager .g-coin,#racePage .race-stage-stats>span:first-child .g-coin,#racePage .race-podium-meter .g-coin{filter:drop-shadow(0 0 5px rgba(186,123,250,.6))!important}

/* Hovering a racer clearly lights up that exact profile without losing the podium hierarchy. */
#racePage .race-podium-racer,#racePage .race-podium-racer:before,#racePage .race-podium-avatar .pg-av,#racePage .race-podium-person b,#racePage .race-global-rank,#racePage .race-my-player,#racePage .race-my-player .pg-av{transition:transform .18s ease,filter .18s ease,box-shadow .18s ease,border-color .18s ease,color .18s ease,background .18s ease!important}
#racePage .race-podium-avatar,#racePage .race-podium-person,#racePage .race-my-player{cursor:pointer!important}
#racePage .race-podium-racer:hover{z-index:5!important}
#racePage .race-podium-racer:hover:before{border-color:#bd83f5!important;background:#211b2b!important;box-shadow:inset 0 1px 0 rgba(244,226,255,.16),0 0 0 1px rgba(189,131,245,.22),0 16px 42px rgba(122,67,184,.28)!important}
#racePage .race-podium-racer:hover .race-podium-avatar .pg-av{transform:translateY(-3px) scale(1.035)!important;border-color:#d6adff!important;box-shadow:0 0 0 6px rgba(189,131,245,.18),0 0 30px rgba(166,98,236,.48)!important}
#racePage .race-podium-racer:hover .race-podium-person b{color:#f0dcff!important;text-shadow:0 0 18px rgba(202,145,255,.32)!important}
#racePage .race-podium-racer:hover .race-global-rank{transform:scale(1.1)!important;filter:drop-shadow(0 0 8px rgba(199,137,255,.85))!important}
#racePage .race-podium-grid:has(.race-podium-racer:hover) .race-podium-racer:not(:hover){filter:brightness(.72) saturate(.8)!important}
#racePage .race-my-player:hover{color:#f3e5ff!important;background:#211a2a!important;box-shadow:inset 3px 0 #c28af8,0 0 0 1px rgba(194,138,248,.22),0 12px 28px rgba(104,57,159,.24)!important}
#racePage .race-my-player:hover .pg-av{transform:scale(1.06)!important;border-color:#dbb9ff!important;box-shadow:0 0 0 4px rgba(194,138,248,.17),0 0 22px rgba(170,100,238,.42)!important}

/* Prize values are explicit, so the reward feels like a real top-three payout. */
#racePage .race-prize-value{display:flex!important;align-items:center!important;gap:4px!important;margin-top:7px!important;color:#cfa3ff!important;font:800 11px/1 "Space Grotesk",sans-serif!important;letter-spacing:-.02em!important;font-style:normal!important}
#racePage .race-prize-value .g-coin{width:14px!important;height:14px!important;filter:drop-shadow(0 0 5px rgba(186,123,250,.6))!important}

/* Keep hover feedback on the profile itself, never the whole podium block. */
#racePage .race-podium-racer:hover:before{box-shadow:inset 0 2px 0 rgba(255,255,255,.035)!important}
#racePage .race-podium-racer-1:hover:before{border-color:#e5b84f!important;background:#211c14!important}
#racePage .race-podium-racer-2:hover:before{border-color:#d4dfec!important;background:#1a1d25!important}
#racePage .race-podium-racer-3:hover:before{border-color:#e5a06a!important;background:#241914!important}
#racePage .race-podium-grid:has(.race-podium-racer:hover) .race-podium-racer:not(:hover){filter:none!important}
#racePage .race-podium-racer:hover .race-podium-avatar .pg-av,#racePage .race-podium-racer:hover .race-podium-person b,#racePage .race-podium-racer:hover .race-global-rank{transform:none!important;filter:none!important;text-shadow:none!important}
#racePage .race-podium-racer .race-podium-avatar:hover .pg-av{transform:translateY(-3px) scale(1.045)!important;border-color:#d6adff!important;box-shadow:0 0 0 6px rgba(189,131,245,.18),0 0 30px rgba(166,98,236,.48)!important}
#racePage .race-podium-racer .race-podium-person:hover b{color:#f0dcff!important;text-shadow:0 0 18px rgba(202,145,255,.38)!important}
#racePage .race-podium-racer .race-podium-person:hover .race-global-rank{transform:scale(1.1)!important;filter:drop-shadow(0 0 8px rgba(199,137,255,.85))!important}

/* Stronger medal palette: true gold, clean silver, and a warm bronze instead of brown. */
#racePage .race-podium-racer-1 .race-podium-place{background:#f3c95c!important;color:#382607!important;box-shadow:0 4px 16px rgba(243,201,92,.28)!important}
#racePage .race-podium-racer-2 .race-podium-place{background:#d9e4f1!important;color:#26313d!important;box-shadow:0 4px 16px rgba(217,228,241,.2)!important}
#racePage .race-podium-racer-3 .race-podium-place{background:#e59a64!important;color:#3b1e0d!important;box-shadow:0 4px 16px rgba(229,154,100,.23)!important}
#racePage .race-podium-racer-2 .race-podium-avatar .pg-av{border-color:#d9e4f1!important}
#racePage .race-podium-racer-3 .race-podium-avatar .pg-av{border-color:#e59a64!important}
#racePage .race-podium-racer-2 .race-podium-person b{color:#edf4fb!important}
#racePage .race-podium-racer-3 .race-podium-person b{color:#ffc299!important}
#racePage .race-podium-wager em{font:700 10px/1 Manrope,"Segoe UI",sans-serif!important;letter-spacing:0!important;text-transform:none!important}

/* Buttons preserve the exact podium styling, while making only each profile interactive. */
#racePage button.race-podium-avatar,
#racePage button.race-podium-person,
#racePage button.race-my-player{appearance:none;border:0;background:transparent;color:inherit;font:inherit;padding:0}
#racePage button.race-podium-avatar,
#racePage button.race-podium-person,
#racePage button.race-my-player{cursor:pointer!important}
#racePage button.race-podium-avatar:focus-visible,
#racePage button.race-podium-person:focus-visible,
#racePage button.race-my-player:focus-visible{outline:2px solid #cfa3ff;outline-offset:5px}

/* Podium finishes: three distinct premium materials, without touching the page or stadium background. */
#racePage .race-podium-racer-1:before{
  border-color:rgba(255,211,91,.9)!important;
  background:radial-gradient(78% 42% at 50% -4%,rgba(255,224,136,.2),transparent 74%),linear-gradient(180deg,#272111 0%,#1d180f 54%,#121216 100%)!important;
  box-shadow:inset 0 1px 0 rgba(255,244,207,.22),inset 0 -28px 48px rgba(0,0,0,.12),0 24px 74px rgba(222,157,39,.11)!important;
}
#racePage .race-podium-racer-2:before{
  border-color:rgba(208,224,244,.8)!important;
  background:radial-gradient(78% 42% at 50% -4%,rgba(211,229,255,.16),transparent 74%),linear-gradient(180deg,#1d2531 0%,#171d27 54%,#121216 100%)!important;
  box-shadow:inset 0 1px 0 rgba(237,247,255,.16),inset 0 -28px 48px rgba(0,0,0,.12),0 24px 64px rgba(116,154,201,.08)!important;
}
#racePage .race-podium-racer-3:before{
  border-color:rgba(239,154,91,.84)!important;
  background:radial-gradient(78% 42% at 50% -4%,rgba(255,179,118,.16),transparent 74%),linear-gradient(180deg,#2a1d18 0%,#211714 54%,#121216 100%)!important;
  box-shadow:inset 0 1px 0 rgba(255,217,180,.15),inset 0 -28px 48px rgba(0,0,0,.12),0 24px 64px rgba(187,92,41,.085)!important;
}
#racePage .race-podium-racer-1 .race-podium-meter>i{background:#3b3019!important}
#racePage .race-podium-racer-2 .race-podium-meter>i{background:#29313d!important}
#racePage .race-podium-racer-3 .race-podium-meter>i{background:#3a2925!important}
#racePage .race-podium-racer-1 .race-podium-meter>i span{background:linear-gradient(90deg,#d99f30,#ffe08a)!important;box-shadow:0 0 14px rgba(255,204,89,.22)}
#racePage .race-podium-racer-2 .race-podium-meter>i span{background:linear-gradient(90deg,#8eaac9,#e3f0ff)!important;box-shadow:0 0 14px rgba(179,211,245,.18)}
#racePage .race-podium-racer-3 .race-podium-meter>i span{background:linear-gradient(90deg,#bc683a,#ffc08c)!important;box-shadow:0 0 14px rgba(240,135,75,.18)}
#racePage .race-podium-racer-1 .race-podium-reward b{color:#fff0bf!important}
#racePage .race-podium-racer-2 .race-podium-reward b{color:#eff7ff!important}
#racePage .race-podium-racer-3 .race-podium-reward b{color:#ffd1ae!important}
#racePage .race-podium-racer-1 .race-podium-reward .race-prize-item{filter:drop-shadow(0 8px 12px rgba(255,190,47,.18))!important}
#racePage .race-podium-racer-2 .race-podium-reward .race-prize-item{filter:drop-shadow(0 8px 12px rgba(157,194,232,.15))!important}
#racePage .race-podium-racer-3 .race-podium-reward .race-prize-item{filter:drop-shadow(0 8px 12px rgba(238,132,67,.15))!important}

/* Your position is a real status card, not a thin leftover row under the podium. */
#racePage .race-my-position{
  position:relative!important;
  isolation:isolate;
  min-height:126px!important;
  margin:24px 32px 30px!important;
  padding:18px 22px!important;
  border:1px solid rgba(183,132,243,.52)!important;
  border-radius:18px!important;
  background:radial-gradient(46% 145% at 0% 50%,rgba(159,95,230,.18),transparent 72%),radial-gradient(35% 100% at 100% 50%,rgba(111,64,167,.12),transparent 75%),linear-gradient(110deg,#211a2a 0%,#17141e 47%,#121117 100%)!important;
  box-shadow:inset 1px 0 0 rgba(234,211,255,.14),inset 0 1px 0 rgba(255,255,255,.055),0 19px 38px rgba(0,0,0,.29),0 0 34px rgba(126,69,191,.09)!important;
}
#racePage .race-my-position:before{
  content:"";
  position:absolute;
  z-index:-1;
  inset:8px;
  border:1px solid rgba(213,173,255,.09);
  border-radius:12px;
  background:linear-gradient(90deg,rgba(255,255,255,.025),transparent 31%,transparent 69%,rgba(255,255,255,.018));
  pointer-events:none;
}
#racePage .race-my-player{padding:11px 14px!important;border-radius:13px!important}
#racePage .race-my-player .pg-av{width:64px!important;height:64px!important;border-color:#caa2ff!important;box-shadow:0 0 0 5px rgba(180,117,250,.13),0 0 22px rgba(153,83,226,.18)!important}
#racePage .race-my-player b{display:flex!important;align-items:center;gap:7px;margin-top:7px!important;font-size:20px!important}
#racePage .race-my-player .race-global-rank{width:23px!important;height:23px!important;flex:0 0 23px!important}
#racePage .race-my-player small,#racePage .race-my-rank span,#racePage .race-my-wager span{color:#c9aadf!important;font-size:9px!important}
#racePage .race-my-rank{min-width:178px;padding:12px 38px!important;border:1px solid rgba(208,165,255,.18)!important;border-radius:13px!important;background:linear-gradient(180deg,rgba(180,113,255,.12),rgba(104,58,153,.045))!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.08)!important}
#racePage .race-my-rank b{margin-top:6px!important;color:#e6cfff!important;font-size:48px!important;text-shadow:0 0 24px rgba(194,126,255,.3)!important}
#racePage .race-my-wager{padding:12px 14px!important;border-radius:13px!important}
#racePage .race-my-wager b{margin-top:8px!important;font-size:19px!important}
#racePage .race-my-player:hover{background:rgba(198,142,255,.09)!important;box-shadow:inset 0 0 0 1px rgba(211,168,255,.18)!important}
@media(max-width:850px){
  #racePage .race-my-position{min-height:102px!important;margin:16px 10px 20px!important;padding:12px!important;border-radius:14px!important}
  #racePage .race-my-player{padding:7px!important}
  #racePage .race-my-player .pg-av{width:50px!important;height:50px!important}
  #racePage .race-my-player b{font-size:16px!important}
  #racePage .race-my-rank{min-width:auto;padding:8px 14px!important}
  #racePage .race-my-rank b{font-size:34px!important}
}

/* Final podium color pass: clean metal finishes over one shared obsidian base. */
#racePage .race-podium-racer-1:before,
#racePage .race-podium-racer-1:hover:before{
  border-color:#ffd86c!important;
  background:radial-gradient(76% 52% at 50% -5%,rgba(255,231,157,.29),transparent 68%),radial-gradient(70% 82% at 100% 118%,rgba(210,142,30,.14),transparent 76%),linear-gradient(142deg,#292416 0%,#1a1817 56%,#111116 100%)!important;
  box-shadow:inset 0 1px 0 rgba(255,247,218,.3),inset 0 -34px 58px rgba(0,0,0,.15),0 24px 74px rgba(230,171,48,.14)!important;
}
#racePage .race-podium-racer-2:before,
#racePage .race-podium-racer-2:hover:before{
  border-color:#cbdff6!important;
  background:radial-gradient(76% 52% at 50% -5%,rgba(222,239,255,.22),transparent 68%),radial-gradient(70% 82% at 100% 118%,rgba(91,144,207,.13),transparent 76%),linear-gradient(142deg,#202a37 0%,#171c25 56%,#111116 100%)!important;
  box-shadow:inset 0 1px 0 rgba(240,248,255,.24),inset 0 -34px 58px rgba(0,0,0,.15),0 24px 74px rgba(107,159,221,.1)!important;
}
#racePage .race-podium-racer-3:before,
#racePage .race-podium-racer-3:hover:before{
  border-color:#ffae73!important;
  background:radial-gradient(76% 52% at 50% -5%,rgba(255,193,143,.22),transparent 68%),radial-gradient(70% 82% at 100% 118%,rgba(191,71,42,.13),transparent 76%),linear-gradient(142deg,#2a1d1c 0%,#1c171a 56%,#111116 100%)!important;
  box-shadow:inset 0 1px 0 rgba(255,226,202,.22),inset 0 -34px 58px rgba(0,0,0,.15),0 24px 74px rgba(214,100,54,.1)!important;
}
#racePage .race-podium-racer-1 .race-podium-place{background:linear-gradient(145deg,#ffe394,#e8b849)!important;color:#3e2b0a!important;box-shadow:0 5px 20px rgba(255,205,81,.35)!important}
#racePage .race-podium-racer-2 .race-podium-place{background:linear-gradient(145deg,#eef7ff,#b8d1ec)!important;color:#253244!important;box-shadow:0 5px 20px rgba(177,211,244,.26)!important}
#racePage .race-podium-racer-3 .race-podium-place{background:linear-gradient(145deg,#ffd0a8,#df8752)!important;color:#47200e!important;box-shadow:0 5px 20px rgba(244,143,78,.25)!important}
#racePage .race-podium-racer-1 .race-podium-avatar .pg-av{border-color:#ffe08a!important;box-shadow:0 0 0 7px rgba(255,209,92,.15),0 0 33px rgba(239,181,55,.2)!important}
#racePage .race-podium-racer-2 .race-podium-avatar .pg-av{border-color:#d7eaff!important;box-shadow:0 0 0 6px rgba(179,215,248,.1),0 0 28px rgba(112,167,226,.15)!important}
#racePage .race-podium-racer-3 .race-podium-avatar .pg-av{border-color:#ffc08d!important;box-shadow:0 0 0 6px rgba(255,164,104,.1),0 0 28px rgba(211,97,53,.14)!important}
#racePage .race-podium-racer-1 .race-podium-person b{color:#fff1bf!important}
#racePage .race-podium-racer-2 .race-podium-person b{color:#f0f8ff!important}
#racePage .race-podium-racer-3 .race-podium-person b{color:#ffd0ac!important}
#racePage .race-podium-racer-1 .race-podium-meter>i{background:#40341d!important}
#racePage .race-podium-racer-2 .race-podium-meter>i{background:#2d3948!important}
#racePage .race-podium-racer-3 .race-podium-meter>i{background:#422d2b!important}
#racePage .race-podium-racer-1 .race-podium-meter>i span{background:linear-gradient(90deg,#e5ae3e,#ffe49b)!important}
#racePage .race-podium-racer-2 .race-podium-meter>i span{background:linear-gradient(90deg,#93b8dd,#e6f3ff)!important}
#racePage .race-podium-racer-3 .race-podium-meter>i span{background:linear-gradient(90deg,#c86c3c,#ffd0a6)!important}

/* The prize pool is the event's headline number. */
#racePage .race-stage-stats>span:first-child{padding:6px 26px 7px!important;border-radius:12px!important;background:radial-gradient(70% 120% at 50% 100%,rgba(177,110,241,.16),transparent 72%)!important}
#racePage .race-stage-stats>span:first-child small{font-size:9px!important;letter-spacing:.15em!important}
#racePage .race-stage-stats>span:first-child b{gap:7px!important;margin-top:7px!important;font-size:30px!important;line-height:.95!important;text-shadow:0 0 26px rgba(185,132,242,.42)!important}
#racePage .race-stage-stats>span:first-child .g-coin{width:23px!important;height:23px!important}
@media(max-width:850px){
  #racePage .race-stage-stats>span:first-child{padding:0!important;background:none!important}
  #racePage .race-stage-stats>span:first-child b{font-size:22px!important}
  #racePage .race-stage-stats>span:first-child .g-coin{width:18px!important;height:18px!important}
}

/* Race keeps the real chat, just as a slimmer side rail so the event owns more room. */
@media(min-width:851px){
  body.on-race .columns,
  html.gf-scale body.on-race .columns{grid-template-columns:minmax(0,1fr) clamp(260px,18vw,300px)!important}
}

/* The event header already says Weekly Wager Race, so remove the duplicate page title and watermark. */
body.on-race .page-title h1{display:none!important}
body.on-race .page-title p{margin:0!important}
html.gf-scale body.on-race .workspace{grid-template-rows:46px minmax(0,1fr)!important}
html.gf-scale body.on-race .page-title{height:46px!important;min-height:46px!important;align-self:center!important;padding-bottom:0!important}
#racePage .race-podium-stage:after{content:none!important}

/* Never let the chat composer flex off the bottom of the Race screen. */
@media(min-width:851px){
  body.on-race .columns>.chat,
  html.gf-scale body.on-race .columns>.chat{
    display:grid!important;
    grid-template-rows:auto minmax(0,1fr) auto!important;
    align-self:stretch!important;
    min-height:0!important;
    overflow:hidden!important;
  }
  body.on-race .columns>.chat .chat-head,
  html.gf-scale body.on-race .columns>.chat .chat-head{grid-row:1;flex:none!important}
  body.on-race .columns>.chat .messages,
  html.gf-scale body.on-race .columns>.chat .messages{
    grid-row:2;
    min-height:0!important;
    height:auto!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
  }
  body.on-race .columns>.chat form,
  html.gf-scale body.on-race .columns>.chat form{
    display:grid!important;
    grid-row:3;
    grid-template-columns:minmax(0,1fr) 46px!important;
    min-height:62px!important;
    margin:0!important;
    order:initial!important;
    flex:none!important;
  }
  body.on-race .columns>.chat form input,
  body.on-race .columns>.chat form button,
  html.gf-scale body.on-race .columns>.chat form input,
  html.gf-scale body.on-race .columns>.chat form button{min-height:44px!important}
}

/* Race + Affiliates deliberately use the same proven chat shell as Coinflip, Jackpot, and Inventory. */
@media(min-width:851px){
  body.on-race .workspace,
  body.on-affiliates .workspace,
  html.gf-scale body.on-race .workspace,
  html.gf-scale body.on-affiliates .workspace{
    height:calc(100dvh - 72px)!important;
    min-height:0!important;
    overflow:hidden!important;
  }
  body.on-race .columns,
  body.on-affiliates .columns,
  html.gf-scale body.on-race .columns,
  html.gf-scale body.on-affiliates .columns{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 400px!important;
    grid-template-rows:minmax(0,1fr)!important;
    gap:16px!important;
    height:100%!important;
    min-height:0!important;
    overflow:hidden!important;
    align-items:stretch!important;
  }
  body.on-race .columns>.chat,
  body.on-affiliates .columns>.chat,
  html.gf-scale body.on-race .columns>.chat,
  html.gf-scale body.on-affiliates .columns>.chat{
    position:static!important;
    display:flex!important;
    flex-direction:column!important;
    grid-column:2!important;
    grid-row:1!important;
    width:auto!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    align-self:stretch!important;
    overflow:hidden!important;
  }
  body.on-race .columns>.chat .messages,
  body.on-affiliates .columns>.chat .messages,
  html.gf-scale body.on-race .columns>.chat .messages,
  html.gf-scale body.on-affiliates .columns>.chat .messages{
    flex:1 1 auto!important;
    min-height:0!important;
    height:auto!important;
    overflow-y:auto!important;
  }
  body.on-race .columns>.chat form,
  body.on-affiliates .columns>.chat form,
  html.gf-scale body.on-race .columns>.chat form,
  html.gf-scale body.on-affiliates .columns>.chat form{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 56px!important;
    flex:0 0 88px!important;
    min-height:88px!important;
    margin:0!important;
    order:initial!important;
  }
}

/* Affiliates is deliberately one full canvas beside chat, unlike the legacy
   grid that reserved a second, empty 400px column. */
@media(min-width:851px){
  body.on-affiliates .workspace,
  html.gf-scale body.on-affiliates .workspace{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
  }
  body.on-affiliates .columns,
  html.gf-scale body.on-affiliates .columns{
    display:block!important;
    width:calc(100% - 400px)!important;
    max-width:calc(100% - 400px)!important;
    height:100%!important;
    margin:0!important;
  }
  body.on-affiliates #affiliatesPage,
  html.gf-scale body.on-affiliates #affiliatesPage{
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
  }
}

/* Blend the two data areas into the page rather than tinting a hard rectangle. */
#affiliatesPage .aff-dashboard{background:radial-gradient(80% 70% at 48% 92%,rgba(165,107,255,.035),transparent 76%)!important}
#affiliatesPage .aff-bottom-grid{gap:58px!important;background:transparent!important}
#affiliatesPage .aff-earnings-panel{border-right:0!important}
#affiliatesPage .aff-referrals-panel{padding-left:0!important}
#affiliatesPage .aff-referrals-panel header{align-items:center!important}
#affiliatesPage .aff-referrals-panel header button{
  min-height:34px!important;
  padding:0 15px!important;
  border:1px solid rgba(165,107,255,.5)!important;
  border-radius:6px!important;
  background:rgba(165,107,255,.12)!important;
  color:#cbb0ff!important;
  box-shadow:0 0 14px rgba(165,107,255,.08)!important;
}

/* Keep affiliate values crisp: token glow is useful for a balance, noisy in a table. */
#affiliatesPage .aff-ref-values .g-coin{filter:none!important;opacity:.9!important}
#affiliatesPage .aff-ref-values small,#affiliatesPage .aff-ref-values b{text-shadow:none!important}
#affiliatesPage .aff-dashboard{background:transparent!important}
#affiliatesPage .aff-bottom-grid,
#affiliatesPage .aff-bottom-grid::before,
#affiliatesPage .aff-bottom-grid::after,
#affiliatesPage .aff-panel{background:transparent!important;box-shadow:none!important}
#affiliatesPage .aff-panel header{border-bottom:0!important}
#affiliatesPage .aff-earnings-panel footer{
  margin-top:20px!important;
  padding:13px 0!important;
  border-top:1px solid rgba(165,107,255,.18)!important;
  background:linear-gradient(90deg,rgba(165,107,255,.08),transparent 64%)!important;
  color:#bba8d9!important;
}
#affiliatesPage .aff-earnings-panel footer>b{color:#c6a6ff!important;text-shadow:0 0 10px rgba(165,107,255,.18)!important}

/* Each time range gets compact pills instead of one dark rounded container. */
#affiliatesPage .aff-range-tabs{gap:6px!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important}
#affiliatesPage .aff-range-tabs button{
  min-width:44px!important;
  padding:9px 10px!important;
  border:1px solid transparent!important;
  border-radius:5px!important;
  color:#a398b1!important;
}
#affiliatesPage .aff-range-tabs button:hover{border-color:rgba(165,107,255,.38)!important;background:rgba(165,107,255,.1)!important;color:#e6dcff!important}
#affiliatesPage .aff-range-tabs button[aria-pressed="true"]{border-color:rgba(202,174,255,.72)!important;background:linear-gradient(135deg,#b084ff,#8e5aef)!important;color:#17121e!important;box-shadow:0 4px 14px rgba(165,107,255,.2)!important}

/* Hover or keyboard-focus any bar to see exactly what it earned. */
#affiliatesPage .aff-chart-day{position:relative;cursor:default}
#affiliatesPage .aff-chart-day>i{height:var(--h)!important;transition:filter .16s ease,transform .16s ease!important}
#affiliatesPage .aff-chart-day>b{
  position:absolute;
  z-index:3;
  bottom:calc(var(--h) + 14px);
  left:50%;
  display:flex;
  align-items:center;
  gap:4px;
  padding:7px 9px;
  border:1px solid rgba(198,166,255,.45);
  border-radius:5px;
  background:#17131f;
  box-shadow:0 10px 22px rgba(0,0,0,.32);
  color:#e9dfff;
  font:800 10px/1 "Space Grotesk",sans-serif;
  opacity:0;
  pointer-events:none;
  transform:translate(-50%,6px);
  transition:opacity .16s ease,transform .16s ease;
  white-space:nowrap;
}
#affiliatesPage .aff-chart-day>b .g-coin{width:13px!important;height:13px!important;filter:none!important}
#affiliatesPage .aff-chart-day:hover>b,#affiliatesPage .aff-chart-day:focus>b{opacity:1;transform:translate(-50%,0)}
#affiliatesPage .aff-chart-day:hover>i,#affiliatesPage .aff-chart-day:focus>i{filter:brightness(1.16);transform:translateY(-3px)}

/* Race canvas blends into the site instead of ending as one large outlined box. */
#racePage .race-podium-stage{
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
#racePage .race-podium-stage:before{
  content:none!important;
}
#racePage .race-stage-header{
  border-bottom:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

/* Race + Affiliates use the exact Inventory canvas: a quiet top blend over #121118. */
html.gf-scale body.on-race main:not(#gfCanvasLock),
html.gf-scale body.on-affiliates main:not(#gfCanvasLock),
body.on-race main:not(#gfCanvasLock),
body.on-affiliates main:not(#gfCanvasLock){
  background:linear-gradient(180deg,#15131a 0%,#121118 34%,#121118 100%)!important;
}
html.gf-scale:has(body.on-race:not(#gfCanvasLock)),
html.gf-scale:has(body.on-affiliates:not(#gfCanvasLock)),
html.gf-scale body.on-race:not(#gfCanvasLock),
html.gf-scale body.on-affiliates:not(#gfCanvasLock),
body.on-race:not(#gfCanvasLock),
body.on-affiliates:not(#gfCanvasLock){
  background:#121118!important;
  background-image:none!important;
}
@media(min-width:851px){
  body.on-race .columns,
  body.on-affiliates .columns,
  html.gf-scale body.on-race .columns,
  html.gf-scale body.on-affiliates .columns{background:transparent!important}
}

/* Affiliates — creator dashboard, on the same quiet canvas as Inventory. */
html.gf-scale body.on-affiliates #affiliatesPage:not(#gfAffiliateCanvas),
body.on-affiliates #affiliatesPage:not(#gfAffiliateCanvas){
  display:block!important;
  height:100%!important;
  min-height:0!important;
  padding:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  background:transparent!important;
}
#affiliatesPage .aff-dashboard{position:relative;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:16px;width:100%;min-height:100%;padding:20px clamp(18px,2.1vw,34px) 28px;color:#f2eff6;font-family:Manrope,"Segoe UI",system-ui,sans-serif}
#affiliatesPage .aff-dashboard *{box-sizing:border-box}
#affiliatesPage .aff-main-hero{position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,.42fr);gap:28px;min-height:224px;padding:28px 32px;overflow:hidden;border:1px solid rgba(160,133,205,.22);border-radius:15px;background:linear-gradient(112deg,rgba(35,29,49,.76),rgba(20,18,28,.78) 60%,rgba(23,20,31,.88));box-shadow:inset 0 1px rgba(255,255,255,.035),0 16px 38px rgba(0,0,0,.14)}
#affiliatesPage .aff-main-hero:after{content:"";position:absolute;right:-8%;bottom:-120%;width:580px;height:580px;border-radius:50%;background:radial-gradient(circle,rgba(141,96,235,.14),transparent 66%);pointer-events:none}
#affiliatesPage .aff-hero-copy{position:relative;z-index:1;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;min-width:0}
#affiliatesPage .aff-hero-copy>p,#affiliatesPage .aff-hero-copy>small{margin:0}
#affiliatesPage .aff-hero-copy>p{color:#b99be4;font:800 10px/1 "DM Mono",monospace;letter-spacing:.16em}
#affiliatesPage .aff-hero-copy h2{margin:11px 0 9px;color:#fbf8ff;font:800 clamp(30px,3.3vw,49px)/.98 "Space Grotesk",sans-serif;letter-spacing:-.055em}
#affiliatesPage .aff-hero-copy h2 span{color:#b891f3}
#affiliatesPage .aff-hero-copy>small{max-width:565px;color:#aba3b6;font:600 13px/1.55 Manrope,"Segoe UI",sans-serif}
#affiliatesPage .aff-link-shell{display:flex;align-items:center;gap:11px;width:min(100%,610px);margin-top:22px;padding:8px 9px 8px 15px;border:1px solid rgba(205,187,231,.18);border-radius:10px;background:rgba(8,8,12,.42)}
#affiliatesPage .aff-link-shell>div{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px}
#affiliatesPage .aff-link-shell span{color:#8b8195;font:800 8px/1 "DM Mono",monospace;letter-spacing:.13em}
#affiliatesPage .aff-link-shell b{overflow:hidden;color:#ede9f2;font:700 13px/1.25 Manrope,"Segoe UI",sans-serif;text-overflow:ellipsis;white-space:nowrap}
#affiliatesPage .aff-link-shell button,#affiliatesPage .aff-claim-btn,#affiliatesPage .aff-referrals-panel header button{border:0;cursor:pointer;color:#17121e;font:800 10px/1 "DM Mono",monospace;letter-spacing:.08em;transition:transform .18s ease,filter .18s ease}
#affiliatesPage .aff-link-shell button{flex:0 0 auto;padding:13px 14px;border-radius:7px;background:#b896ee}
#affiliatesPage .aff-link-shell button:hover,#affiliatesPage .aff-claim-btn:hover,#affiliatesPage .aff-referrals-panel header button:hover{filter:brightness(1.08);transform:translateY(-1px)}
#affiliatesPage .aff-claim-card{position:relative;z-index:1;display:flex;min-width:0;flex-direction:column;justify-content:center;align-items:flex-start;padding:8px 0 8px 30px;border-left:1px solid rgba(195,165,240,.28)}
#affiliatesPage .aff-claim-card>span,#affiliatesPage .aff-stat-grid article>span,#affiliatesPage .aff-panel header span,#affiliatesPage .aff-dashboard-foot>span{color:#a99aba;font:800 9px/1 "DM Mono",monospace;letter-spacing:.14em}
#affiliatesPage .aff-claim-card>b{display:flex;align-items:center;gap:7px;margin-top:9px;color:#d5b2ff;font:800 34px/1 "Space Grotesk",sans-serif;letter-spacing:-.055em}
#affiliatesPage .aff-claim-card>b .g-coin{width:22px;height:22px}
#affiliatesPage .aff-claim-card>small{margin-top:8px;color:#948b9d;font:600 11px/1.4 Manrope,"Segoe UI",sans-serif}
#affiliatesPage .aff-claim-btn{margin-top:17px;padding:13px 15px;border-radius:7px;background:#d5b2ff}
#affiliatesPage .aff-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}
#affiliatesPage .aff-stat-grid article{min-width:0;padding:18px 20px;border:1px solid rgba(176,160,197,.14);border-radius:11px;background:rgba(18,17,25,.6)}
#affiliatesPage .aff-stat-grid article>b{display:flex;align-items:center;gap:6px;margin-top:11px;color:#f0edf3;font:800 25px/1 "Space Grotesk",sans-serif;letter-spacing:-.045em}
#affiliatesPage .aff-stat-grid article>b .g-coin{width:18px;height:18px}
#affiliatesPage .aff-stat-grid article>small{display:block;margin-top:8px;overflow:hidden;color:#8f8799;font:600 11px/1.25 Manrope,"Segoe UI",sans-serif;text-overflow:ellipsis;white-space:nowrap}
#affiliatesPage .aff-bottom-grid{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(340px,.92fr);gap:16px;min-height:300px}
#affiliatesPage .aff-panel{min-width:0;padding:22px 23px;border:1px solid rgba(176,160,197,.16);border-radius:13px;background:linear-gradient(145deg,rgba(25,22,34,.86),rgba(15,14,20,.78))}
#affiliatesPage .aff-panel header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
#affiliatesPage .aff-panel header h3{margin:7px 0 0;color:#f5f1f8;font:800 19px/1 "Space Grotesk",sans-serif;letter-spacing:-.035em}
#affiliatesPage .aff-earnings-panel header>b{display:flex;align-items:center;gap:5px;color:#c7a5f5;font:800 17px/1 "Space Grotesk",sans-serif;white-space:nowrap}
#affiliatesPage .aff-earnings-panel header>b .g-coin{width:15px;height:15px}
#affiliatesPage .aff-earnings-panel header>b small{color:#8d8298;font:700 9px/1 "DM Mono",monospace;letter-spacing:.06em}
#affiliatesPage .aff-chart{display:grid;grid-template-columns:repeat(7,1fr);align-items:end;gap:12px;height:170px;margin-top:20px;padding:0 4px 2px;border-bottom:1px solid rgba(205,190,225,.12)}
#affiliatesPage .aff-chart>div{display:flex;min-width:0;height:100%;flex-direction:column;justify-content:flex-end;align-items:center;gap:8px}
#affiliatesPage .aff-chart i{display:block;width:min(31px,100%);height:var(--h);min-height:10px;border-radius:5px 5px 2px 2px;background:linear-gradient(180deg,#b995ef,#7551af);box-shadow:0 0 18px rgba(160,117,239,.14)}
#affiliatesPage .aff-chart>div:nth-child(6) i{background:linear-gradient(180deg,#efd378,#b78245);box-shadow:0 0 19px rgba(236,194,95,.18)}
#affiliatesPage .aff-chart span{color:#827887;font:800 8px/1 "DM Mono",monospace;letter-spacing:.05em}
#affiliatesPage .aff-earnings-panel footer{display:flex;align-items:center;justify-content:space-between;margin-top:15px;color:#8f8799;font:700 10px/1 "DM Mono",monospace;letter-spacing:.04em}
#affiliatesPage .aff-earnings-panel footer>b{color:#89cfad}
#affiliatesPage .aff-referrals-panel header button{padding:10px 11px;border-radius:6px;background:#c7a5f5}
#affiliatesPage .aff-referrals-panel ul{display:flex;flex-direction:column;gap:0;margin:15px 0 0;padding:0;list-style:none}
#affiliatesPage .aff-referrals-panel li{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 0;border-top:1px solid rgba(209,198,225,.09)}
#affiliatesPage .aff-ref-user{display:flex;align-items:center;min-width:0;gap:10px}
#affiliatesPage .aff-ref-user>span{display:grid;flex:0 0 31px;width:31px;height:31px;place-items:center;border:1px solid rgba(194,166,242,.32);border-radius:50%;background:rgba(163,122,235,.12);color:#d9c7f7;font:800 12px/1 "Space Grotesk",sans-serif}
#affiliatesPage .aff-ref-user>div{display:flex;min-width:0;flex-direction:column;gap:4px}
#affiliatesPage .aff-ref-user b{overflow:hidden;color:#e9e5ef;font:700 12px/1 Manrope,"Segoe UI",sans-serif;text-overflow:ellipsis;white-space:nowrap}
#affiliatesPage .aff-ref-user small,#affiliatesPage .aff-ref-values small{color:#847b8d;font:600 9px/1.25 "DM Mono",monospace}
#affiliatesPage .aff-ref-values{display:flex;flex:0 0 auto;flex-direction:column;align-items:flex-end;gap:5px}
#affiliatesPage .aff-ref-values b{display:flex;align-items:center;gap:4px;color:#cbb0f5;font:800 11px/1 "Space Grotesk",sans-serif}
#affiliatesPage .aff-ref-values b .g-coin,#affiliatesPage .aff-ref-values small .g-coin{width:12px;height:12px}
#affiliatesPage .aff-dashboard-foot{display:flex;align-items:center;gap:9px;padding:0 3px;color:#8f8697;font:600 10px/1.3 Manrope,"Segoe UI",sans-serif}
#affiliatesPage .aff-dashboard-foot>b{color:#d8d1e1;font:800 11px/1 "DM Mono",monospace;letter-spacing:.04em}
@media(max-width:1050px){#affiliatesPage .aff-main-hero{grid-template-columns:1fr;gap:20px}#affiliatesPage .aff-claim-card{padding:20px 0 0;border-top:1px solid rgba(195,165,240,.22);border-left:0}#affiliatesPage .aff-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#affiliatesPage .aff-bottom-grid{grid-template-columns:1fr}}
@media(max-width:620px){#affiliatesPage .aff-dashboard{padding:14px 12px 24px;gap:12px}#affiliatesPage .aff-main-hero{padding:22px 18px;border-radius:12px}#affiliatesPage .aff-link-shell{align-items:stretch;flex-direction:column}#affiliatesPage .aff-link-shell button{width:100%}#affiliatesPage .aff-stat-grid{grid-template-columns:1fr 1fr;gap:8px}#affiliatesPage .aff-stat-grid article{padding:15px 14px}#affiliatesPage .aff-stat-grid article>b{font-size:21px}#affiliatesPage .aff-panel{padding:18px 16px}#affiliatesPage .aff-chart{gap:7px;height:142px}#affiliatesPage .aff-bottom-grid{min-height:0}#affiliatesPage .aff-dashboard-foot{flex-wrap:wrap}}

/* Final event-chat viewport lock: the composer must always stay at the screen edge. */
@media(min-width:851px){
  body.on-race .columns,
  body.on-affiliates .columns,
  html.gf-scale body.on-race .columns,
  html.gf-scale body.on-affiliates .columns{
    gap:0!important;
    background:transparent!important;
  }
  body.on-race .columns>.chat,
  body.on-affiliates .columns>.chat,
  html.gf-scale body.on-race .columns>.chat,
  html.gf-scale body.on-affiliates .columns>.chat{
    position:fixed!important;
    top:118px!important;
    right:0!important;
    bottom:0!important;
    width:400px!important;
    height:auto!important;
    max-height:none!important;
    display:grid!important;
    grid-template-rows:auto minmax(0,1fr) auto!important;
    z-index:10!important;
  }
  body.on-race .columns>.chat .chat-head,
  body.on-affiliates .columns>.chat .chat-head,
  html.gf-scale body.on-race .columns>.chat .chat-head,
  html.gf-scale body.on-affiliates .columns>.chat .chat-head{grid-row:1!important}
  body.on-race .columns>.chat .messages,
  body.on-affiliates .columns>.chat .messages,
  html.gf-scale body.on-race .columns>.chat .messages,
  html.gf-scale body.on-affiliates .columns>.chat .messages{
    grid-row:2!important;
    min-height:0!important;
    height:auto!important;
    overflow-y:auto!important;
  }
  body.on-race .columns>.chat form,
  body.on-affiliates .columns>.chat form,
  html.gf-scale body.on-race .columns>.chat form,
  html.gf-scale body.on-affiliates .columns>.chat form{
    grid-row:3!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 56px!important;
    min-height:88px!important;
    margin:0!important;
  }
}

/* Respect the shared Hide chat control after every Race/Affiliates rail rule. */
@media(min-width:851px){
  body.gf-chat-hidden.on-race .columns,
  html.gf-scale body.gf-chat-hidden.on-race .columns{
    display:block!important;
    grid-template-columns:none!important;
    width:100%!important;
    max-width:none!important;
    gap:0!important;
  }
  body.gf-chat-hidden.on-race #racePage,
  html.gf-scale body.gf-chat-hidden.on-race #racePage,
  body.gf-chat-hidden.on-affiliates .columns,
  html.gf-scale body.gf-chat-hidden.on-affiliates .columns{
    width:100%!important;
    max-width:none!important;
  }
  body.gf-chat-hidden.on-race .columns>.chat,
  body.gf-chat-hidden.on-affiliates .columns>.chat,
  html.gf-scale body.gf-chat-hidden.on-race .columns>.chat,
  html.gf-scale body.gf-chat-hidden.on-affiliates .columns>.chat{
    display:none!important;
  }
}
