/* Dedicated racing entry point, retaining the existing race engine and dialogs. */
/* Keep the footer at the bottom of short race landing pages, without using
   fixed positioning or affecting the full-length race track. */
body.race-standalone {
  height: auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body.race-standalone > main {
  flex: 1 0 auto;
  width: 100%;
}

.race-standalone .hero.game-home,.race-standalone .home-catalog,.race-standalone .features.home-guide {display:none!important}
.race-standalone .home-skip-link {display:none}
.race-standalone .race-page-hero {position:relative;box-sizing:border-box;isolation:isolate;max-width:1180px;margin:35px auto 25px;padding:64px clamp(25px,7vw,100px);border:1px solid #b9d1c6;border-radius:23px;background:linear-gradient(113deg,#163d43,#285e56);color:#f5f8ea;box-shadow:0 20px 50px #1b4e4531;overflow:hidden}
.race-standalone .race-page-hero::after {content:'♞';position:absolute;right:9%;top:-78px;font-size:clamp(200px,26vw,370px);line-height:1.5;color:#edcf8563;z-index:-1;transform:rotate(-11deg)}
.race-standalone .race-page-eyebrow {color:#e7d49e;font:750 14px/1.6 system-ui,sans-serif;letter-spacing:.025em}
.race-standalone .race-page-hero h1 {color:#fff9e7;line-height:1.12;font-size:clamp(35px,5.5vw,67px);letter-spacing:-.045em;margin:18px 0 14px}
.race-standalone .race-page-hero p {font-size:clamp(15px,2vw,19px);color:#dbebe3;max-width:590px;line-height:1.8;word-break:keep-all}
.race-standalone .race-page-actions {display:flex;flex-wrap:wrap;gap:12px;margin-top:30px;align-items:center}
.race-standalone .race-page-actions button,.race-standalone .race-page-actions a {min-height:49px;padding:13px 20px;border-radius:11px;font:800 14px system-ui,sans-serif;text-decoration:none;box-sizing:border-box;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.race-standalone .race-page-primary {background:#edce86;color:#193834;border:1px solid #edce86}
.race-standalone .race-page-secondary,.race-standalone .race-page-back {background:#315d58;color:#f8f7e9;border:1px solid #a1b7a7}
.race-standalone .race-page-actions :focus-visible {outline:3px solid #ffec9f;outline-offset:3px}
.race-standalone .race-page-primary:hover {background:#fff0bf}
.race-standalone .race-page-secondary:hover,.race-standalone .race-page-back:hover {background:#427870}
@media(max-width:700px){
  .race-standalone .race-page-hero {margin:14px 14px 16px;padding:24px 20px;border-radius:18px}
  .race-standalone .race-page-hero h1 {font-size:clamp(26px,7vw,34px);margin:10px 0 8px}
  .race-standalone .race-page-hero p {font-size:13.5px;line-height:1.6}
  .race-standalone .race-page-hero::after{opacity:.24;right:-10%;top:-48px;font-size:180px}
  .race-standalone .race-page-actions {display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:18px}
  .race-standalone .race-page-actions .race-page-primary {grid-column:1 / -1;width:100%;min-height:44px}
  .race-standalone .race-page-actions .race-page-secondary,.race-standalone .race-page-actions .race-page-back {width:100%;min-height:40px;padding:9px 12px;font-size:13px}
}

.race-standalone .race-page-features {max-width:1180px;margin:0 auto 42px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;padding:0 2px;box-sizing:border-box;counter-reset:race-step}
.race-standalone .race-page-features article {position:relative;padding:22px 24px;min-width:0;border-radius:16px;border:1px solid #d5e2dd;background:#fff;color:#24413e;box-shadow:0 6px 24px #1d38390c;counter-increment:race-step}
.race-standalone .race-page-features article::before {content:"0" counter(race-step);display:inline-grid;place-items:center;min-width:30px;height:26px;padding:0 8px;margin-bottom:8px;border-radius:8px;background:#e4f1ec;color:#1f5a4f;font:800 12px/1 system-ui,sans-serif}
.race-standalone .race-page-features h2 {color:#1e413f;font-size:16.5px;line-height:1.4;font-weight:800;letter-spacing:-.02em;margin:0 0 6px}
.race-standalone .race-page-features p {font-size:13px;line-height:1.68;color:#526b68;margin:0;word-break:keep-all}
@media(max-width:700px){
  .race-standalone .race-page-features {grid-template-columns:1fr;margin:0 14px 28px;padding:0;gap:10px}
  .race-standalone .race-page-features article {display:grid;grid-template-columns:34px minmax(0,1fr);column-gap:12px;row-gap:4px;align-items:start;padding:14px 16px;border-radius:14px}
  .race-standalone .race-page-features article::before {grid-column:1;grid-row:1 / 3;width:34px;height:34px;margin:0;padding:0;border-radius:10px;font-size:13px}
  .race-standalone .race-page-features h2 {grid-column:2;grid-row:1;font-size:15px;margin:0}
  .race-standalone .race-page-features p {grid-column:2;grid-row:2;font-size:12.5px;line-height:1.55}
}

/* Once the race starts, replace the dedicated landing content with the race
   itself. The legacy shared race controller already hides the homepage hero,
   but did not know about these two sections introduced by /race/. */
.race-standalone.race-in-progress .race-page-hero,
.race-standalone.race-in-progress .race-page-features {display:none!important;}
.race-standalone.race-in-progress main {display:block;}
.race-standalone.race-in-progress #raceTrack {margin:0;min-height:calc(100dvh - 60px);}


/* The center race-title link must remain clickable at mobile breakpoints.
   The shared header deliberately disables pointer events on generic titles. */
@media(max-width:650px){
  body.race-standalone .site-header.unified-site-header .logo {pointer-events:auto;}
}
