.tilebox .card::after,.tilebox:hover .card b::after{content:none}
.tilebox .card:focus-visible{outline:2px solid white;outline-offset:2px}
@media(hover:hover) and (pointer:fine){
.tilebox{transition:transform .3s ease}
.tilebox:hover{z-index:5;transform:scale(1.04255) translateY(-4px)}
.tilebox .card b{transition:transform .3s ease;transform:translateY(2px)}
.tilebox:hover .card b{transform:translateY(0);color:white;background:linear-gradient(transparent,#17132ef5 75%)}
.track{padding:8px 4px 4px}
}
@media(prefers-reduced-motion:reduce){.tilebox,.tilebox:hover,.tilebox .card b{transition:none;transform:none}}

.rail .row{align-items:center;flex-wrap:wrap}
.rail-actions,.rail-actions span{display:inline-flex;align-items:center;gap:6px}
.rail-actions{margin-inline-start:auto}
.rail-actions [hidden]{display:none}
.rail-actions a,.rail-actions button{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;height:32px;border:1px solid #e4dcef;border-radius:8px;color:#492c77}
.rail .rail-actions a{background:#f2eafb;padding:0 9px;gap:4px}
.rail-actions button{width:31px;padding:0;background:white;cursor:pointer}
.rail-actions button:disabled{opacity:.45;cursor:default}
.track{scrollbar-width:none;scroll-snap-type:x mandatory;overscroll-behavior-inline:contain;scroll-padding-inline:4px}
.track::-webkit-scrollbar{display:none}
.track>.tilebox{scroll-snap-align:start}

.chips a{transition:background-color .15s,color .15s}
.chips a:is(:hover,:focus-visible,:active){text-decoration:none}
@media (hover:hover) and (pointer:fine){
  .chips a:hover{background:#e8e2f5;color:#332e62;box-shadow:none}
}
.chips a:focus-visible{outline:2px solid white;outline-offset:-3px;background:#383260;color:white}
.chips a:active{background:#e2dcf1;color:#332e62;box-shadow:none}
@media (prefers-reduced-motion:reduce){.chips a{transition:none}}

.rail .row{margin:12px 0 0}.shelf-title{display:flex;align-items:center;gap:9px}.shelf-title h2{margin:0;font-size:17px;line-height:1.2}.shelf-title small{display:inline-flex;align-items:center;padding:3px 8px;border-radius:12px;background:#422f58;color:#fff;font:600 12px/1.25 system-ui;white-space:nowrap;font-variant-numeric:tabular-nums}.shelf-title i{flex:none;width:32px;height:32px;border-radius:8px;background:#eee8fa;color:#463765;display:grid;place-items:center;font-style:normal}.shelf-title img{width:23px;height:23px;border-radius:5px;object-fit:cover}
.rail .track{--visible:12;--space:9px;gap:var(--space);grid-auto-columns:calc((100% - (var(--visible) - 1)*var(--space))/var(--visible));padding-inline:0;scroll-padding-inline:0}
@media(max-width:1599px){.rail .track{--visible:10}}@media(max-width:1250px){.rail .track{--visible:8}}@media(max-width:950px){.rail .track{--visible:6}}@media(max-width:650px){.rail .track{--visible:3;--space:6px}.shelf-title h2{font-size:15px}.shelf-title i{width:28px;height:28px}.shelf-title img{width:20px;height:20px}.rail .row{gap:4px}.shelf-title{gap:7px}}

.arena{display:grid;grid-template-columns:minmax(120px,180px) minmax(0,1fr) minmax(120px,180px);gap:14px}
.stage,.adslot{border-radius:12px}.stage{background:radial-gradient(ellipse at 70% 25%,#61517c,#292540 80%);display:flex;align-items:center;justify-content:center;gap:24px;padding:16px;min-height:clamp(300px,33vw,490px);box-sizing:border-box}.stage img{width:clamp(110px,13vw,196px);border-radius:10px}.stage h1{color:white;margin:0 0 12px}.playlink{display:inline-block;background:#ffda67;color:#302942;padding:9px 16px;border-radius:7px;font-weight:bold}
.adslot{background:#f5f2f8;color:#71677b;text-align:center;font:12px/34px Arial}.mobilead{display:none}
.details{box-sizing:border-box;margin:24px auto;max-width:1040px;background:#fbf9ff;color:#302b52;border-radius:12px;padding:24px;display:grid;grid-template-columns:2fr 1fr;gap:24px}.details p{line-height:1.55}.details aside{background:#efeaf8;border-radius:9px;padding:12px}.details h2,.details h3{margin:0;color:#302b52}
#sort{border:0;border-radius:7px;padding:6px;color:#332e62}.arena~h2{margin:16px 0 8px}
@media(max-width:780px){.arena{display:block}.arena .adslot{display:none}.mobilead{display:block;height:65px;margin:12px 0}.stage{min-height:245px}.details{grid-template-columns:1fr}}
@media(max-width:480px){.stage{flex-direction:column;text-align:center;gap:10px}.row h1{font-size:20px}}
.game-layout{display:grid;grid-template-columns:minmax(120px,180px) clamp(124px,11vw,208px) minmax(0,1fr) clamp(124px,11vw,208px) minmax(120px,180px);gap:clamp(8px,.8vw,16px);align-items:start}
.left-ad,.right-ad{align-self:stretch}.placement{height:100%;min-height:52px;background:#faf9fb;border-radius:10px;text-align:center;color:#766f80;overflow:hidden}.placement span{display:block;background:#efebf2;font:12px/27px system-ui}
.sidegames-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.game-center{min-width:0}.race-stage{position:relative;isolation:isolate;overflow:hidden;display:grid;place-items:center;min-height:clamp(380px,35vw,635px);padding:20px;box-sizing:border-box;color:white;background:radial-gradient(ellipse at 78% 16%,#5a457c 0,transparent 55%),linear-gradient(135deg,#24264a,#3b3157 70%,#312643);border-radius:12px}.course{position:absolute;inset:0;width:100%;height:100%;z-index:-1}.playlink{font-size:15px;padding:10px 17px;line-height:1.3}.player-tools{display:flex;gap:6px;margin-top:7px}.player-tools a,.player-tools button{border:0;border-radius:7px;color:#352b53;background:#f4edf9;padding:6px 9px;font:700 12px/1.2 inherit;font-family:inherit;font-size:12px;font-weight:bold;cursor:pointer}.player-tools #expand{margin-left:auto}.player-tools [aria-pressed=true]{background:#ffda67}.race-stage:fullscreen{border-radius:0;height:100%}#how-to{scroll-margin-top:80px}.game-guide{margin-top:28px}
@media(min-width:781px) and (max-width:1199px){.game-layout{grid-template-columns:110px minmax(0,1fr) 110px}.left-ad{grid-area:1/1}.right-ad{grid-area:1/3}.game-center{grid-area:1/2}.related,.latest{grid-column:1/-1}.sidegames-grid{grid-template-columns:repeat(6,minmax(0,128px))}}
@media(max-width:780px){.game-layout{display:flex;flex-direction:column;gap:12px}.game-center,.right-ad,.sidegames{width:100%}.game-center{order:0}.left-ad{display:none}.right-ad{order:1}.right-ad .placement{height:64px}.related{order:2}.latest{order:3}.sidegames-grid{grid-template-columns:repeat(3,minmax(0,136px))}.race-stage{min-height:240px}.game-guide{margin-top:18px}}
.actionbar,.actiongroup,.jumpbar{display:flex;align-items:center;flex-wrap:wrap;gap:5px}.actionbar{margin-top:7px;justify-content:space-between}.actiongroup>* , .jumpbar>a,.jumpbar summary{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:6px 8px;min-height:32px;border:1px solid #e4dcef;border-radius:7px;background:#f1eaf9;color:#403257;font:700 12px/1.2 system-ui;text-decoration:none}.actiongroup button,.jumpbar summary{cursor:pointer}.actiongroup .playcount{background:white;gap:3px}.actiongroup [aria-pressed=true]{background:#ffdb71;color:#302942}.actionbar [hidden]{display:none}.actionbar svg,.reader svg{flex:none}
.reader{max-width:1120px;margin:28px auto}.reader h2,.reader h3,.reader h4{margin:0}.reader h2{font-size:clamp(20px,2vw,26px)}.jumpbar{padding:10px 0;border-bottom:1px solid var(--reading-side-border)}.jumpbar details{position:relative}.jumpbar summary::after{content:'⌄'}.jumpbar details>div{position:absolute;z-index:5;min-width:165px;background:#fff;border:1px solid #e4dcef;border-radius:8px;padding:6px}.jumpbar details a{display:block;padding:6px;color:#423065}.guidecolumns{display:grid;grid-template-columns:minmax(0,1fr) minmax(200px,245px);gap:clamp(20px,4vw,65px);margin-top:16px}.reader h3,.reader dt{display:flex;gap:8px;align-items:center}.reader h3 svg{background:#443974;border-radius:7px;padding:7px;box-sizing:content-box}.reader h3{font-size:20px}.reader h4{margin-top:14px}.reader [id]{scroll-margin-top:82px}.guidecolumns aside{align-self:start;background:var(--reading-side-background);border-radius:12px;padding:16px}.guidecolumns aside h3{font-size:16px}.reader dl{margin:12px 0 0}.reader dl div{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 0;border-top:1px solid var(--reading-side-border);font-size:13px}.reader dt svg{background:transparent}.reader dd{margin:0;font-weight:700;text-align:right}.reader dd a{color:var(--reading-link);text-decoration:underline}
@media(max-width:780px){.guidecolumns{grid-template-columns:1fr;gap:8px}.actionbar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}.actiongroup{display:contents}.actiongroup>*{padding-inline:3px;font-size:11px}.jumpbar details>div{right:0}.reader{margin-top:16px}}

#facts{border:1px solid var(--reading-side-border)}
#facts svg{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;color:var(--reading-link)}
#facts h3 svg{width:19px;height:19px}
#facts dd{min-width:0;overflow-wrap:anywhere}
#facts .game-facts-categories{display:grid;gap:8px}
#facts .game-facts-categories dd{display:flex;flex-wrap:wrap;gap:5px;text-align:left}
#facts .game-facts-categories a{max-width:100%;padding:3px 7px;border:1px solid var(--reading-side-border);border-radius:6px;background:#443974;text-decoration:none}
#facts .game-facts-categories a:hover,#facts .game-facts-categories a:focus-visible{text-decoration:underline}
.race-stage.in-game{background:#171426;padding:0}.in-game>.launch,.in-game>.course{display:none}.in-game iframe{position:absolute;left:50%;width:800px;height:550px;max-width:none;border:0;transform-origin:center}.race-stage.viewport-game,.race-stage:fullscreen{position:fixed;inset:0;z-index:9999;width:100%;height:100%;height:100dvh;min-height:0;border-radius:0}.game-open{overflow:hidden}.leave-player{position:absolute;z-index:1;right:max(6px,env(safe-area-inset-right));top:max(4px,env(safe-area-inset-top));min-height:36px;border:0;border-radius:7px;padding:4px 12px;background:white;color:#352b53;font-weight:bold}
@media(min-width:1200px){
  .game-layout{grid-template-areas:"adleft related stage latest adright" ". . actions . ." ". . guide . .";row-gap:8px}
  .game-center{display:contents}.race-stage{grid-area:stage;align-self:stretch;min-height:320px}
  .left-ad{grid-area:adleft}.right-ad{grid-area:adright}.related{grid-area:related}.latest{grid-area:latest}
  .actionbar{grid-area:actions;margin:0}.reader{grid-area:guide;width:100%;max-width:none;margin:12px 0 28px}
}
@media(max-width:1199px){.game-layout>.reader{grid-column:1/-1;width:100%;order:4}}
@media(max-width:780px){.sidegames .tilebox:nth-child(n+10){display:none}}

.race-stage.is-playing { padding: 0; background: #171426; }
.race-stage.is-playing > .course, .race-stage .launch[hidden], .game-exit[hidden] { display: none; }
.race-stage > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.race-stage > .player-loading { inset-block-start: var(--game-bar-height, 0px); pointer-events: none; }
.race-stage.is-expanded, .race-stage:fullscreen { position: fixed; inset: 0; z-index: 9999; width: 100%; height: 100dvh; min-height: 0; border-radius: 0; }
.game-immersive { overflow: hidden; }
.game-exit { position: absolute; z-index: 1; right: max(6px, env(safe-area-inset-right)); top: max(4px, env(safe-area-inset-top)); padding: 7px 12px; border: 0; border-radius: 7px; background: white; color: #352b53; font-weight: 700; cursor: pointer; }
.actiongroup img { flex: none; }
.reader { min-width: 0; }

.launch {
  display: grid; grid-template-columns: clamp(96px, 11vw, 112px) minmax(0, 1fr);
  align-items: center; width: min(100%, 780px); gap: clamp(14px, 2vw, 24px);
}
.launch::before {
  content: ''; position: absolute; z-index: -1; inset: -24px; pointer-events: none;
  background: radial-gradient(ellipse at 85% 30%, #6b4e76, transparent 65%), linear-gradient(120deg, #24213e, #393054);
}
.game-art {
  display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain;
  border: 1px solid #ffffff24; border-radius: 12px; box-shadow: 0 12px 30px #17132966;
}
.launch-copy { min-width: 0; }
.launch .series { color: #e3d8f5; font-size: 13px; font-weight: 700; }
.launch h1 {
  max-inline-size: 24ch; margin: 6px 0 12px; color: #fff;
  font-size: clamp(24px, 3vw, 43px); line-height: 1.1; letter-spacing: -.025em;
  text-wrap: balance; overflow-wrap: anywhere;
}
.launch-stats { display: flex; flex-wrap: wrap; gap: 7px 12px; margin: 0 0 16px; padding: 0; list-style: none; font-size: .86rem; color: #f2ecff; }
.launch-stats li { display: inline-flex; align-items: center; gap: 5px; }
.launch-stats li + li { padding-inline-start: 12px; border-inline-start: 1px solid #e0cff55c; }
.launch-stats :is(img, svg), .launch-play-icon { flex: none; width: 17px; height: 17px; }
.launch-stats img, .launch-actions [data-game-controls] img { filter: brightness(0) invert(1); }
.launch .playlink { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.launch button.playlink { border: 0; font-family: inherit; cursor: pointer; }
.launch .playlink[aria-busy=true] { cursor: progress; }
.launch-play-spinner, .launch-play-wait, .playlink[aria-busy=true] :is(.launch-play-icon, .launch-play-label) { display: none; }
.playlink[aria-busy=true] .launch-play-wait { display: inline; }
.playlink[aria-busy=true] .launch-play-spinner {
  display: inline-block; width: 14px; height: 14px; box-sizing: border-box;
  border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%;
  animation: launch-play-spin .75s linear infinite;
}
@keyframes launch-play-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .playlink .launch-play-spinner { animation: none; } }
.race-stage > .player-loading [data-game-retry] { pointer-events: auto; }

@media (max-width: 480px) {
  .launch { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 12px; text-align: center; }
  .launch .game-art { width: clamp(88px, 23vw, 96px); }
  .launch h1 { margin-inline: auto; font-size: clamp(21px, 5.8vw, 26px); }
  .launch .launch-actions, .launch-stats { justify-content: center; }
}
.actiongroup img { filter: brightness(0) saturate(100%) invert(19%) sepia(24%) saturate(1576%) hue-rotate(222deg); }
.placement span { color: #60576b; }
.game-guide-side { display: grid; align-content: start; gap: 12px; min-width: 0; }
@media (min-width: 781px) {
  .guidecolumns { grid-template-columns: minmax(0, 1fr) minmax(200px, min(36%, 280px)); gap: 22px; }
}
.launch-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.game-preview-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 40px; padding: 5px 8px; border: 1px solid #ffffff85; border-radius: 8px;
  background: #10091d46; color: #fff; font: 750 .78rem/1.3 system-ui; cursor: pointer;
}
.game-preview-button svg { flex: none; width: 15px; height: 15px; }
.game-preview-button:hover { background: #ffffff20; }
.game-preview-button:focus-visible { outline: 2px solid #ffe490; outline-offset: 3px; }
.launch-actions .game-preview-button {
  min-height: 46px; padding: 8px clamp(12px, 1.4vw, 20px); gap: 8px; font-size: .92rem; text-align: center;
  box-sizing: border-box; text-decoration: none;
}
.race-stage.is-previewing .launch { visibility: hidden; }
.game-preview-panel {
  position: absolute; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr);
  gap: 8px; padding: 10px; background: #100b1b;
}
.game-preview-panel[hidden], .game-preview-button[hidden] { display: none; }
.game-preview-panel [data-close-preview] { justify-self: end; }
.game-preview-panel video { display: block; width: 100%; height: 100%; object-fit: contain; background: #100b1b; }
.game-preview-error { margin-top: 8px; font-size: 13px; }

html:has(.external-game-overlay[open]) { overflow: hidden; }
.external-game-overlay {
  box-sizing: border-box; width: min(1320px, calc(100% - 24px)); height: min(900px, calc(100dvh - 24px));
  max-width: none; max-height: none; overflow: hidden; margin: auto; padding: 0;
  border: 1px solid #8e7fae; border-radius: 12px; background: #171426; color: white;
}
.external-game-overlay[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.external-game-overlay::backdrop { background: #160d25d9; }
.game-overlay-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 5px 8px 5px 12px; background: #312e61;
}
.game-overlay-bar > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.game-overlay-bar button {
  flex: none; min-height: 44px; padding: 4px 10px; border: 1px solid #dfd4ec; border-radius: 8px;
  background: #f5f1ff; color: #332e62; font: 700 13px system-ui; cursor: pointer;
}
.game-overlay-bar button:hover { background: #eee5fa; }
.game-overlay-bar button:focus-visible { outline: 2px solid #ffda67; outline-offset: 2px; }
.game-overlay-surface { position: relative; min-height: 0; overflow: hidden; }
.game-overlay-surface > iframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 780px) {
  .external-game-overlay {
    width: 100%; height: 100dvh; border: 0; border-radius: 0;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  }
}

@media (min-width: 781px) and (max-width: 1199px) {
  .game-layout {
    grid-template-areas:
      "left-ad player right-ad"
      ". actions ."
      ". guide ."
      "related related related"
      "latest latest latest";
    row-gap: 8px;
  }
  .game-center { display: contents; }
  .race-stage { grid-area: player; }
  .left-ad { grid-area: left-ad; }
  .right-ad { grid-area: right-ad; }
  .actionbar { grid-area: actions; margin: 0; }
  .game-layout > .reader { grid-area: guide; margin: 12px 0; order: 0; }
  .related { grid-area: related; }
  .latest { grid-area: latest; }
  .sidegames-grid { grid-template-columns: repeat(6, minmax(0, 136px)); }
}

.game-layout { --game-stage-height: clamp(320px, 82vw, 400px); }
@media (min-width: 1200px) {
  .game-layout-without-ads {
    grid-template-columns: clamp(124px, 11vw, 208px) minmax(0, 1fr) clamp(124px, 11vw, 208px);
    grid-template-areas: "related stage latest" ". actions ." ". guide .";
  }
}
@media (min-width: 781px) and (max-width: 1199px) {
  .game-layout-without-ads {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "player" "actions" "guide" "related" "latest";
  }
}
/* Reserve the outer box independently of the game and its pre-roll. */
.race-stage { align-self: start; width: 100%; min-height: 0; }
.race-stage:not(.is-expanded, :fullscreen) {
  height: var(--game-stage-height);
  min-height: var(--game-stage-height);
  max-height: var(--game-stage-height);
}

@media (min-width: 781px) {
  .game-layout {
    --game-stage-height: clamp(440px, 68svh, 650px);
    grid-template-rows: var(--game-stage-height);
  }
}
@media (max-width: 780px) {
  .game-center:has(.race-stage:is(.is-expanded, :fullscreen)) { padding-top: var(--game-stage-height); }
}

.sidegames-heading { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-bottom: 6px; }
.sidegames-heading h2 { margin: 0; color: #fff; font-size: 15px; line-height: 1.15; }
.sidegames-more {
  display: inline-flex; flex: none; align-items: center; gap: 3px; min-height: 44px; padding: 0 8px;
  border: 1px solid #ffffff60; border-radius: 6px; background: #443974; color: #f5f1ff;
  font-size: 12px; font-weight: 700; text-decoration: none;
}
.sidegames-more:hover { background: #352d60; text-decoration: none; }
.sidegames-more:focus-visible { outline: 2px solid #ffda67; outline-offset: 2px; }
.sidegames-more svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sidegames .card::after {
  content: ''; position: absolute; inset: auto 0 0; z-index: 1; height: 34px;
  background: linear-gradient(transparent, #17132ef2); box-shadow: none; opacity: 1; pointer-events: none;
}
.sidegames .tilebox .card b {
  bottom: 3px; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  padding: 0 4px; background: none; font-size: 10px; font-weight: 650; line-height: 1.15; text-wrap: wrap; transform: none;
}
@media (max-width: 780px) {
  .sidegames .tilebox .card b { font-size: 10.5px; }
}
@media (min-width: 1200px) {
  .sidegames { display: flex; flex-direction: column; align-self: stretch; min-height: 0; container: game-shelf / size; }
  .sidegames-heading { min-height: 27px; margin: 0; }
  .sidegames-more { min-height: 24px; padding-inline: 5px; font-size: 11px; }
  .sidegames-grid {
    --visible-rows: 4;
    flex: 1; min-height: 0; grid-template-rows: repeat(var(--visible-rows), minmax(0, 1fr));
  }
  .sidegames-grid > .tilebox { min-height: 0; }
  .sidegames-grid > .tilebox:nth-child(n+9) { display: none; }
  .sidegames .tilebox:hover { transform: none; }
  .sidegames .card { height: 100%; aspect-ratio: auto; }
  .sidegames .card:focus-visible { outline-offset: -3px; }
}
@container game-shelf (max-width: 155px) {
  .sidegames-heading h2 { font-size: 13px; }
  .sidegames-more svg { display: none; }
}
@container game-shelf (min-height: 530px) {
  .sidegames-grid { --visible-rows: 5; }
  .sidegames-grid > .tilebox:nth-child(n+9):nth-child(-n+10) { display: block; }
}
@container game-shelf (min-height: 640px) {
  .sidegames-grid { --visible-rows: 6; }
  .sidegames-grid > .tilebox:nth-child(n+9):nth-child(-n+12) { display: block; }
}
.actionbar {
  position: relative; display: flex; align-items: flex-start; gap: 8px; padding: 8px;
  container-type: inline-size;
  border: 1px solid #ffffff24; border-radius: 10px; background: #312951;
}
.actionbar .actiongroup { display: flex; flex-wrap: wrap; gap: 6px; }
.actionbar .activity-group { flex: none; }
.actionbar .tools-group { justify-content: flex-end; margin-inline-start: auto; min-width: 0; }
.actionbar .actiongroup > * {
  min-height: 42px; gap: 6px; padding-inline: 10px; border-color: #dfd4ec;
  background: #faf7ff; color: #30214f; font-size: 13px; text-decoration: none;
}
.actionbar .actiongroup b { font-variant-numeric: tabular-nums; }
.actionbar .actiongroup :is(button, a):hover { background: #ece3fb; }
.actionbar .actiongroup [aria-pressed=true],
.actionbar .actiongroup [aria-pressed=true]:hover { background: #ffda67; border-color: #ffda67; color: #30214f; }
.actionbar [data-favorite][aria-pressed=true] svg { fill: currentColor; }
.actionbar button[aria-disabled=true], :is(.actionbar, #sharebox) button[aria-busy=true] { cursor: wait; }
.actionbar :is(button, a):focus-visible { outline: 2px solid #ffda67; outline-offset: 2px; }
.action-feedback {
  position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.action-icon { position: relative; display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; }
[data-action-state=loading] .action-icon > * { visibility: hidden; }
[data-action-state=loading] .action-icon::after {
  content: ''; position: absolute; inset: 1px; box-sizing: border-box; border: 2px solid currentColor;
  border-block-end-color: transparent; border-inline-end-color: transparent;
  border-radius: 50%; animation: game-action-spin .6s linear infinite;
}
@keyframes game-action-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  [data-action-state=loading] .action-icon::after { animation: none; }
}
:is(.actionbar .actiongroup, #sharebox) button[data-action-state=success]:not([aria-pressed=true]) {
  background: #e0f3e7; border-color: #a8d4b8; color: #245537;
}
:is(.actionbar .actiongroup, #sharebox) button[data-action-state=error] {
  background: #fae9ed; border-color: #e8b8c5; color: #842c43;
}
#how-to:focus { outline: 2px solid #775aaa; outline-offset: 4px; border-radius: 3px; }
#sharebox {
  box-sizing: border-box; width: min(380px, calc(100% - 24px)); padding: 16px;
  max-height: calc(100dvh - 24px); overflow: auto; overscroll-behavior: contain;
  border: 1px solid #e5dbef; border-radius: 14px; background: #f9f5ff; color: #30214f;
}
#sharebox::backdrop { background: #160d25ad; }
.share-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.share-heading h3 { margin: 0; font-size: 18px; }
.share-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#sharebox :is(a, button) {
  display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-height: 44px;
  padding: 6px 8px; border: 1px solid #d7c8e8; border-radius: 8px; background: #fff;
  color: inherit; font: 700 13px/1.3 system-ui; text-decoration: none; cursor: pointer;
}
#sharebox :is(a, button):where(:hover) { background: #eee5fa; }
#sharebox :is(a, button, input):focus-visible { outline: 2px solid #70539a; outline-offset: 2px; }
.share-heading button { width: 44px; flex: none; }
#sharebox svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#sharebox input { box-sizing: border-box; width: 100%; margin-top: 10px; padding: 7px; border: 1px solid #d7c8e8; border-radius: 6px; font: inherit; }
#sharebox [data-share-feedback] { margin: 8px 0 0; font-size: 13px; }
#sharebox [data-share-feedback]:empty { margin: 0; }

@container (max-width: 745px) {
  .actionbar .actiongroup > * { padding-inline: 6px; font-size: 12px; }
  .actionbar .vote-caption {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
}
@media (max-width: 780px) {
  .actionbar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  .actionbar .activity-group { grid-column: span 2; }
  .actionbar .playcount { width: 100%; text-align: center; }
  .actionbar .tools-group { display: contents; }
  .actionbar .tools-group > * { grid-column: span 3; }
  .actionbar .tools-group > [data-vote] { grid-column: span 2; }
  .actionbar .actiongroup > * { min-height: 44px; }
}
.game-fullscreen-bar { position: absolute; inset: 0 0 auto; z-index: 1; pointer-events: none; }
.game-fullscreen-logo { display: none; }
.game-fullscreen-bar .game-exit { pointer-events: auto; }

.video-preroll {
  position: absolute; inset: 0; z-index: 1; display: grid; grid-template-rows: auto minmax(0, 1fr);
  background: #171426; color: #fff; border-radius: inherit; overflow: hidden; contain: layout paint;
}
.video-preroll p { margin: 0; padding: 8px 12px; font: 600 13px system-ui; }
.video-preroll--wg { grid-template-rows: minmax(0, 1fr); }
.video-preroll--wg > p {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.video-preroll :is(video, iframe) { display: block; width: 100%; height: 100%; border: 0; }
.video-preroll video { object-fit: contain; }
.wg-preroll-container { position: relative; width: 100%; height: 100%; min-width: 0; min-height: 0; overflow: hidden; }
/* WGPlayer sets an inline pixel height on the wrapper around its splash and video. */
.wg-preroll-container [id^="wgAd"] { height: 100% !important; }
.race-stage:has(.video-preroll) .game-fullscreen-bar { z-index: 2; }
@media (max-width: 767px) {
  .race-stage:is(:fullscreen, .is-expanded) .video-preroll { top: var(--game-bar-height, 48px); }
}

.game-ad-unit { display: grid; justify-items: center; }
.game-ad-unit > .game-ad-desktop { display: inline-block; width: 160px; height: 600px; }
.game-ad-unit > .game-ad-compact { display: inline-block; width: 120px; height: 240px; }
.game-ad-unit > .game-ad-mobile { display: inline-block; width: 300px; height: 250px; }
.game-ad-demo {
  display: grid; place-items: center; box-sizing: border-box; margin: 0;
  width: 160px; height: 600px; border: 1px dashed #c6b8da; background: #f0eaf7;
  color: #453861; font: 600 13px system-ui;
}
.game-ad-demo.game-ad-compact { width: 120px; height: 240px; }
.game-ad-demo[hidden] { display: none; }

@media (max-width: 780px) {
  .right-ad { container-type: inline-size; }
  .right-ad .game-ad-demo { width: 300px; height: 250px; }
  @container (min-width: 300px) {
    .right-ad .placement:has(.game-ad-unit) { height: 277px; }
  }
}

@media (pointer: coarse), (max-width: 767px) {
  .race-stage:is(.is-expanded, :fullscreen) {
    --game-bar-height: calc(48px + env(safe-area-inset-top, 0px));
  }
  .race-stage:is(.is-expanded, :fullscreen) .game-fullscreen-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
    height: var(--game-bar-height);
    padding: env(safe-area-inset-top, 0px) max(8px, env(safe-area-inset-right, 0px)) 0 max(8px, env(safe-area-inset-left, 0px));
    background: #312e61;
  }
  .race-stage:is(.is-expanded, :fullscreen) .game-fullscreen-logo {
    display: grid; align-items: center; max-width: 32vw; min-height: 44px;
    padding: 0; border: 0; border-radius: 6px; background: transparent; pointer-events: auto; cursor: pointer;
  }
  .game-fullscreen-logo img {
    display: block; box-sizing: content-box; width: min(108px, calc(32vw - 12px));
    height: auto; padding: 3px 6px; border-radius: 6px; background: #fff;
  }
  .game-fullscreen-logo:focus-visible { outline: 2px solid #ffda67; outline-offset: 2px; }
  .race-stage:is(.is-expanded, :fullscreen) .game-exit:not([hidden]) {
    position: static; min-height: 36px; padding-inline: 8px; font-size: 12px;
  }
  .race-stage:is(.is-expanded, :fullscreen) > iframe {
    top: var(--game-bar-height); height: calc(100% - var(--game-bar-height));
  }
}
