/* Tempo Line's cinematic kit: Outfit, ink, cream, mint and flat pill controls.
   Brand values come from the game's src/ui/next/tokens.css. Shared character
   pages use the same world; the homepage card opts in independently. */
@font-face {
  font-family: Outfit;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/outfit-latin-wght-normal.woff2') format('woff2');
}
.tl, .tl-game {
  color-scheme: dark;
  --bg: #071b1d;
  --surface: #0c2629;
  --surface-2: #113237;
  --ink: #fff8ea;
  --ink-dim: #e5d5b5;
  --line: rgb(255 248 234 / .22);
  --accent: #74ddb3;
  --accent-2: #9debc9;
  --link: #c2f3dd;
  --focus: #74ddb3;
  --on-accent: #0c2629;
  --shadow: 0 16px 40px rgb(0 0 0 / .18);
  --radius: 24px;
  --font: Outfit, ui-rounded, system-ui, sans-serif;
  font-family: var(--font);
}
.tl .hero {
  background: var(--surface);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.tl .hero::before, .tl .hero::after { display: none; }
.tl .hero .wrap { grid-template-columns: minmax(0, 1fr); padding-bottom: 4rem; }
.tl .hero-copy { text-shadow: none; }
.tl .hero a { color: var(--ink); }
.tl .hero--tempo { background: var(--bg); }
.tl .hero--tempo .wrap { position: relative; min-height: 680px; align-content: space-between; padding-bottom: 5rem; }
.tl .hero--tempo .hero-copy { max-width: 35rem; }
.tl-hero-art {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scaleX(-1);
}
.tl .hero--tempo::before {
  display: block;
  inset: 0;
  height: auto;
  opacity: 1;
  clip-path: none;
  background: linear-gradient(90deg, #071b1d 0%, rgb(7 27 29 / .92) 30%, rgb(7 27 29 / .15) 70%), linear-gradient(0deg, #071b1d, transparent 30%, transparent 78%, rgb(7 27 29 / .9));
}
.tl-wordmark { margin: 0 0 1.5rem; line-height: 1; }
.tl-wordmark img { display: block; width: min(100%, 470px); }
.tl .hero--tempo .lede { font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
.tl .hero-copy > p:not(.lede) { color: var(--ink-dim); }
.tl .btn, .tl-game .btn {
  background: var(--ink);
  color: var(--on-accent);
  box-shadow: 0 8px 24px rgb(7 27 29 / .4);
  font-weight: 700;
  transition: background 120ms ease, transform 120ms ease;
}
.tl .hero a.btn { color: var(--on-accent); }
.tl .btn:hover, .tl-game .btn:hover { background: #fbefd6; filter: none; }
.tl .btn:active, .tl-game .btn:active { transform: scale(.975); }
.tl .btn--ghost, .tl .hero a.btn--ghost, .tl-game .btn--ghost {
  color: var(--ink);
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.tl .btn--ghost:hover, .tl-game .btn--ghost:hover { background: rgb(255 248 234 / .1); }
.tl .badge, .tl-game .badge { border: 1px solid var(--line); color: var(--ink-dim); }
.tl h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700; letter-spacing: -.02em; }
.tl h3 { font-weight: 700; }
.tl .card { box-shadow: none; padding: 1.5rem; }
.tl .card p, .tl .shots figcaption { color: var(--ink-dim); }
.tl .levels li { background: var(--surface); border-radius: 20px; }
.tl .levels .art { border-radius: 12px; }
.tl .credit { border-left-width: 3px; }
.tl .shots img { border-radius: 20px; box-shadow: none; }
.tl .shots { gap: 1.25rem; }
.tl .nav a[aria-current='page'] { text-decoration-color: var(--accent); }
.tl-eyebrow { margin: 0 0 .75rem; color: var(--accent); font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.tl-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.5rem; }
.tl-section-head h2, .tl-section-head p:last-child { margin-bottom: 0; }
.tl-section-head > a { min-height: 44px; display: inline-flex; align-items: center; }
.tl-game { background: var(--surface); color: var(--ink); border-color: var(--line); }
.tl-game .chips li { background: var(--surface-2); }
.cast-preview { padding: 1.5rem; border-radius: 24px; margin-block: 2rem; }
.game .tl-card-wordmark { width: 200px; height: auto; max-width: 100%; border-radius: 0; box-shadow: none; }
.game .tl-card-portrait { display: block; width: 96px; height: 96px; overflow: hidden; border-radius: 22px; background: #18424a; }
.game .tl-card-portrait img { display: block; width: 128%; height: auto; max-width: none; transform: translateX(-11%); border-radius: 0; box-shadow: none; }
@media (min-width: 640px) { .game .tl-card-portrait { width: 128px; height: 128px; border-radius: 28px; } }
.character-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.character-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  overflow: hidden;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--ink);
  font-family: Outfit, system-ui, sans-serif;
}
.character-poster { display: block; aspect-ratio: 32 / 25; overflow: hidden; background: #00464d; }
.character-poster img { display: block; width: 100%; height: auto; }
.character-poster--portrait { aspect-ratio: 4 / 3; }
.character-poster--portrait img { width: var(--poster-scale, 100%); margin-inline: auto; clip-path: inset(0 0 var(--poster-trim, 25%) 0); }
.character-poster--brio { --poster-scale: 96%; --poster-trim: 21%; }
.character-poster--tempo, .character-poster--drift { --poster-scale: 96%; --poster-trim: 22%; }
.character-poster--quill { --poster-scale: 93%; --poster-trim: 20.5%; }
.character-poster--torque { --poster-scale: 90%; --poster-trim: 17.5%; }
.character-poster--art { aspect-ratio: 4 / 3; }
.character-poster--art img { height: 100%; object-fit: cover; }
.character-card__copy { padding: 1.5rem; }
.character-status { display: inline-block; margin: 0 0 .75rem; padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 999px; color: var(--accent); font-size: .8rem; font-weight: 600; line-height: 1.4; }
.character-card h3 { font-size: 2rem; letter-spacing: -.02em; }
.character-card p { color: var(--ink-dim); margin-bottom: 1rem; }
.character-card .btn { padding-inline: 1rem; }
.character-hero .wrap { align-items: center; }
.tl .character-hero .wrap { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); padding-bottom: 3rem; }
.character-hero .nav { grid-column: 1 / -1; }
.character-hero h1 { font-size: clamp(3.5rem, 8vw, 6rem); font-weight: 800; letter-spacing: -.04em; }
.character-hero .lede { font-size: 1.6rem; font-weight: 500; }
.character-portrait { margin: 0; justify-self: center; width: min(100%, 440px); }
.character-portrait .character-poster { border-radius: 24px; border: 1px solid var(--line); }
.character-portrait figcaption { margin-top: .75rem; color: var(--ink-dim); font-size: .875rem; }
.character-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.5rem 0 0; }
.character-facts > div { padding: 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.character-facts dt { color: var(--ink-dim); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.character-facts dd { margin: .5rem 0 0; font-size: 1.15rem; font-weight: 700; }
.character-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.character-gallery figure { margin: 0; }
.character-gallery img { display: block; width: 100%; border-radius: 20px; background: var(--surface); }
.character-gallery figcaption { color: var(--ink-dim); margin-top: .75rem; }
.character-gallery--game { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.character-gallery .character-model img { aspect-ratio: 1; object-fit: contain; padding: 1rem; }
.character-turnaround { margin: 1.5rem 0 0; }
.character-turnaround img { width: 100%; height: auto; display: block; border-radius: 20px; }
.character-turnaround figcaption { margin-top: .75rem; color: var(--ink-dim); }
.character-links { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
@media (max-width: 899px) {
  .character-grid { grid-template-columns: 1fr; }
  .tl .hero--tempo .wrap { min-height: 760px; padding-bottom: 3rem; }
  .tl-hero-art { object-position: 28% 50%; }
  .tl .hero--tempo::before { background: linear-gradient(0deg, #071b1d 0%, rgb(7 27 29 / .93) 33%, rgb(7 27 29 / .12) 65%, rgb(7 27 29 / .7) 100%); }
  .tl .hero--tempo .hero-copy { align-self: end; }
  .tl-wordmark img { width: min(100%, 340px); }
}
@media (max-width: 639px) {
  .tl .character-hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .character-portrait { grid-row: 2; width: min(100%, 340px); }
  .character-hero .hero-copy { grid-row: 3; }
  .character-facts, .character-gallery { grid-template-columns: 1fr; }
  .character-card__copy { padding: 1.25rem; }
  .character-card h3 { font-size: 1.7rem; }
  .character-card p { font-size: 1rem; }
  .game .tl-card-wordmark { width: 165px; }
  .tl .hero--tempo .wrap { min-height: 820px; }
  .tl-hero-art { object-position: center 25%; }
}
@media (prefers-reduced-motion: reduce) {
  .tl .btn, .tl-game .btn { transition: none; }
  .tl .btn:active, .tl-game .btn:active { transform: none; }
}

/* ===== Character pages for both games (template: characters/sable/) =====================================================
   Every class below is used only on the character pages, so nothing else on the site changes. Section order on a page:
   hero (.character-hero, .character-games), about (.character-facts), In 3D (.character-3d, .character-stage, .character-spec),
   In Tempo Line (.character-play, .character-wear, .character-phones), In Razaki Racers (.character-racer), where to find
   (.character-where) and next (.character-next). Razaki Racers' accent inside the teal page takes its values from the body.rr
   block at the end of style.css: navy plates, gold, slanted number plates, buttons with a solid lip, flat colours. */
.tl {
  --rr-night: #0e1130;
  --rr-row: #1b2050;
  --rr-gold: #ffc42e;
  --rr-gold-edge: #a86a00;
  --rr-lav: #e4e8ff;
  --rr-lav-edge: #6b75bb;
  --rr-dim: #b9c0f0;
}

/* Concept posters of the revived characters: scale and label trim measured per poster (see the tl-play manifest). */
.character-poster--sable, .character-poster--zip, .character-poster--woolly { --poster-scale: 97%; --poster-trim: 22.5%; }
.character-poster--buzz { --poster-scale: 100%; --poster-trim: 25%; }
.character-poster--bun { --poster-scale: 102.5%; --poster-trim: 27%; }

/* Hero: the two games the character is in, a teal pill and a slanted Racers plate. */
.character-games { display: flex; flex-wrap: wrap; gap: .5rem .6rem; list-style: none; padding: 0; margin: 0 0 1.25rem; }
.character-games li { display: inline-flex; align-items: center; gap: .4rem; margin: 0; min-height: 2rem; padding: .2rem .85rem; font-size: .85rem; font-weight: 700; line-height: 1.2; }
.character-games .character-games__tl { border-radius: 999px; color: var(--accent-2); background: rgb(116 221 179 / .12); box-shadow: inset 0 0 0 1px rgb(116 221 179 / .4); }
.character-games .character-games__rr { padding-inline: 1rem 1.15rem; background: var(--rr-row); color: #fff; font-style: italic; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; clip-path: polygon(.45rem 0, 100% 0, calc(100% - .45rem) 100%, 0 100%); }
.character-games__rr b { color: var(--rr-gold); font-weight: 900; }

/* In 3D: the high-resolution render of the in-game model, the showpiece. A band across the page; the render stands on a
   lit stage with a soft teal glow and a floor ring. --floor (on .character-stage, or on the frame in the hero) is where the
   model meets the ground, as a percentage of the picture's height without the % sign: 95 for most renders (the default),
   less for a render that stands on its own shadow disc or ends higher (Sable 85, Buzz 89, Woolly and Bleep 91, Bubbles 94). */
main section.character-3d { padding-block: clamp(2.5rem, 7vw, 5rem); }
.character-3d {
  border-block: 1px solid var(--line);
  background: radial-gradient(60% 70% at 72% 50%, rgb(116 221 179 / .07), transparent 70%), linear-gradient(180deg, #081d20, #0b2629 50%, #081d20);
}
.character-3d__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.character-3d__head p:last-child { margin-bottom: 0; }
.character-stage { margin: 0; }
.character-stage__frame {
  --floor-y: calc(3% + var(--floor, 95) * .88%);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: radial-gradient(95% 80% at 50% 0%, #16444c 0%, #0d2c30 55%, #092224 100%);
}
.character-stage__frame::after {
  content: '';
  position: absolute;
  z-index: -2;
  inset: 4% 8% 14%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(116 221 179 / .32), rgb(116 221 179 / .1) 55%, transparent);
  animation: character-glow 6s ease-in-out infinite alternate;
}
.character-stage__frame::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: 9%;
  right: 9%;
  top: calc(var(--floor-y) - 8%);
  height: 16%;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, transparent 95%, rgb(116 221 179 / .3) 97%, transparent 99.5%),
    radial-gradient(closest-side, rgb(2 14 15 / .75), rgb(2 14 15 / .4) 45%, transparent 72%),
    radial-gradient(closest-side, rgb(116 221 179 / .12), transparent);
}
.character-stage__frame img { position: absolute; left: 6%; top: 3%; display: block; width: 88%; height: auto; }
.character-stage--flip .character-stage__frame img { transform: scaleX(-1); }
/* Where a page has no concept art, the hero picture is the 3D render on the same stage, and the In 3D section
   keeps its words and the spec list but not a second copy of the picture (.character-3d--no-stage). */
.character-portrait--3d { width: min(100%, 500px); }
.character-portrait--3d .character-stage__frame { border-radius: 28px; }
.character-stage figcaption { margin-top: .85rem; color: var(--ink-dim); font-size: .92rem; line-height: 1.5; }
.character-spec { margin: .5rem 0 0; }
.character-spec > div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem; padding-block: .8rem; border-top: 1px solid var(--line); }
.character-spec > div:last-child { border-bottom: 1px solid var(--line); }
.character-spec dt { padding-top: .2rem; color: var(--accent); font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.character-spec dd { margin: 0; }
.character-3d__grid > .character-turnaround { grid-column: 1 / -1; margin-top: 2.5rem; }
@keyframes character-glow { from { opacity: .7; } to { opacity: 1; } }
@media (min-width: 900px) {
  .character-3d__grid { grid-template-columns: minmax(0, 4.4fr) minmax(0, 7.6fr); grid-template-areas: 'head stage' 'spec stage'; gap: 0 clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
  .character-3d__head { grid-area: head; align-self: end; }
  .character-stage { grid-area: stage; }
  .character-spec { grid-area: spec; align-self: start; margin-top: 1.75rem; }
  .character-3d--no-stage .character-3d__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-areas: 'head spec'; align-items: start; }
  .character-3d--no-stage .character-3d__head { align-self: start; }
  .character-3d--no-stage .character-spec { margin-top: .4rem; }
}

/* In Tempo Line: how they move, what you can change, two phone captures. */
.character-play { display: grid; gap: 2rem; }
.character-play h3 { margin: 1.75rem 0 0; font-size: 1.3rem; }
.character-wear { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0 0; }
.character-wear > div { padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.character-wear dt { color: var(--accent); font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.character-wear dd { margin: .35rem 0 0; color: var(--ink-dim); font-size: .98rem; line-height: 1.45; }
.character-note { margin: 1.25rem 0 0; color: var(--ink-dim); font-size: .95rem; }
.character-phones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.character-phones figure { margin: 0; }
.character-phones img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 18px 40px rgb(0 0 0 / .35); }
.character-phones figcaption { margin-top: .6rem; color: var(--ink-dim); font-size: .9rem; }
/* .character-play--no-phones: a character with no current phone captures; the words take the whole width and the four tiles
   sit in one row. */
@media (min-width: 900px) {
  .character-play--no-phones .character-wear { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .character-play:not(.character-play--no-phones) { grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
  .character-phones figure:nth-child(2) { margin-top: 3rem; }
}

/* In Razaki Racers: the other world of the same cast. A navy plate with a chequered strip, the kart picture cut on a slant
   (as on the Razaki Racers page), the racer's number on a slanted plate in their own kart paint (--paint and --on, set on
   the panel), heavy italic capitals and gold buttons with a solid lip. */
.character-racer {
  position: relative;
  display: grid;
  gap: 1.75rem;
  align-items: center;
  overflow: hidden;
  padding: calc(14px + clamp(1.5rem, 4vw, 2.75rem)) clamp(1.1rem, 4vw, 2.75rem) clamp(1.75rem, 4vw, 2.75rem);
  background: var(--rr-row);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 0 var(--rr-night);
}
.character-racer::before, .character-where__card--rr::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 14px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14'%3E%3Cpath fill='%230e1130' d='M0 0h7v7H0zM14 0h7v7h-7zM7 7h7v7H7zM21 7h7v7h-7z'/%3E%3C/svg%3E") repeat-x left top / 28px 14px;
}
.character-racer__media { display: grid; gap: 1.25rem; }
.character-racer__kart { margin: 0; }
.character-racer__kart img { display: block; width: 100%; height: auto; clip-path: polygon(7% 0, 100% 0, 93% 100%, 0 100%); }
.character-racer__tag { display: inline-block; margin: 0 0 .9rem; padding: .25rem 1.1rem .25rem .85rem; background: var(--rr-gold); color: var(--rr-night); font-size: .78rem; font-style: italic; font-weight: 900; letter-spacing: .08em; line-height: 1.4; text-transform: uppercase; clip-path: polygon(.4rem 0, 100% 0, calc(100% - .4rem) 100%, 0 100%); }
.tl .character-racer h2 { margin-bottom: 1.1rem; color: #fff; font-size: clamp(1.7rem, 4.4vw, 2.4rem); font-style: italic; font-weight: 900; letter-spacing: .01em; text-transform: uppercase; }
.character-racer__id { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-bottom: 1.4rem; }
.character-racer__plate { display: inline-flex; align-items: baseline; gap: .35rem; margin: 0 0 0 .35rem; padding: .3rem 1.1rem .4rem .9rem; background: var(--paint, var(--rr-night)); color: var(--on, #fff); border: 3px solid #fff; box-shadow: 5px 5px 0 var(--rr-night); transform: skewX(-12deg); font-size: 2.6rem; font-style: italic; font-weight: 900; line-height: 1; }
.character-racer__plate small { font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.character-racer__stats { display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; margin: 0; }
.character-racer__stats dt { color: var(--rr-dim); font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.character-racer__stats dd { display: flex; align-items: center; gap: .5rem; margin: .2rem 0 0; font-size: 1.1rem; font-style: italic; font-weight: 900; letter-spacing: .03em; text-transform: uppercase; }
.character-racer__stats i { flex: none; width: 1rem; height: 1rem; background: var(--paint, var(--rr-night)); border: 2px solid #fff; transform: skewX(-12deg); }
.character-racer__bars { display: grid; gap: .55rem; margin: 0; padding-inline: 4% 7%; }
.character-racer__bars > div { display: grid; grid-template-columns: 7.25rem minmax(0, 1fr); align-items: center; gap: .75rem; }
.character-racer__bars dt { color: var(--rr-dim); font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.character-racer__bars dd { display: grid; grid-template-columns: minmax(0, 1fr) 4.5rem; align-items: center; gap: .75rem; margin: 0; font-size: .85rem; font-style: italic; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.character-racer__bar { display: block; height: .7rem; background: rgb(255 255 255 / .14); transform: skewX(-12deg); }
.character-racer__bar i { display: block; width: calc(var(--bar, .55) * 100%); height: 100%; background: var(--rr-gold); }
.character-racer__blurb { margin: 0 0 1.25rem; padding: .85rem 1.1rem; background: var(--rr-night); border-left: 5px solid var(--rr-gold); border-radius: 4px; }
.character-racer__blurb blockquote { margin: 0; }
.character-racer__blurb p { margin: 0; font-size: 1.08rem; font-weight: 600; }
.character-racer__blurb figcaption { margin-top: .35rem; color: var(--rr-dim); font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.character-racer__copy > p:not(.character-racer__tag) { color: var(--rr-lav); }
.character-racer .actions { margin-top: 1.5rem; }
.character-racer :focus-visible, .character-where__card--rr :focus-visible { outline-color: var(--rr-gold); }
.tl .character-racer .btn, .tl .character-where__card--rr .btn {
  margin-bottom: 5px;
  border-radius: 8px;
  background: var(--rr-gold);
  color: var(--rr-night);
  font-style: italic;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
  box-shadow: 0 5px 0 var(--rr-gold-edge);
}
.tl .character-racer .btn:hover, .tl .character-where__card--rr .btn:hover { background: #ffd04d; }
.tl .character-racer .btn:active, .tl .character-where__card--rr .btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--rr-gold-edge); }
.tl .character-racer .btn--ghost { background: var(--rr-lav); box-shadow: 0 5px 0 var(--rr-lav-edge); }
.tl .character-racer .btn--ghost:hover { background: #fff; }
.tl .character-racer .btn--ghost:active { box-shadow: 0 2px 0 var(--rr-lav-edge); }
@media (min-width: 900px) {
  .character-racer { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 3.25rem); }
}

/* Where to find them: one card per game, each in its game's own look. */
.character-where { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1rem; margin-top: 1.25rem; }
.character-where__card { position: relative; display: flex; flex-direction: column; align-items: flex-start; overflow: hidden; padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; }
.character-where__card h3 { display: flex; align-items: center; min-height: 2.75rem; margin: 0 0 .75rem; }
.character-where__wordmark { display: block; width: 150px; height: auto; }
.character-where__status { margin: 0 0 .5rem; color: var(--accent); font-weight: 700; }
.character-where__card p:not(.character-where__status) { color: var(--ink-dim); }
.character-where__card .btn { margin-top: auto; }
.character-where__card--rr { padding-top: calc(14px + 1.5rem); background: var(--rr-row); border-color: transparent; border-radius: 12px; box-shadow: 0 5px 0 var(--rr-night); }
.character-where__card--rr .character-where__status { color: var(--rr-gold); font-style: italic; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.character-where__card--rr p:not(.character-where__status) { color: var(--rr-lav); }
.tl .character-where__rr-mark { flex-direction: column; align-items: flex-start; justify-content: center; color: var(--rr-gold); font-size: 1.85rem; font-style: italic; font-weight: 900; letter-spacing: -.01em; line-height: 1; text-transform: uppercase; -webkit-text-stroke: .1em var(--rr-night); paint-order: stroke fill; }
.character-where__rr-mark span { display: block; margin: 0 0 .2em .1em; padding: .18em .3em .18em .5em; background: var(--rr-night); color: #fff; font-size: .4em; letter-spacing: .32em; -webkit-text-stroke: 0; }

/* Next: the next character in the cast order, with a small look at their 3D render. */
.character-next { display: grid; gap: 1.25rem; align-items: center; }
.character-next__art { display: grid; place-items: center; width: 9rem; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgb(116 221 179 / .26), rgb(116 221 179 / .07) 70%, transparent); }
.character-next__art img { display: block; width: 86%; height: auto; }
.character-next__art--flip img { transform: scaleX(-1); }
.character-next .character-links { margin-top: 1.25rem; }
.character-next__copy p:not(.tl-eyebrow) { margin-bottom: 0; }
@media (min-width: 640px) {
  .character-next { grid-template-columns: 12rem minmax(0, 1fr); gap: 2.5rem; max-width: 52rem; }
  .character-next__art { width: 12rem; }
}

/* Tablets (one column, but wide): keep the stage, the phones and the kart from filling the whole screen. */
@media (min-width: 640px) and (max-width: 899px) {
  .character-3d .character-stage { width: min(100%, 38rem); margin-inline: auto; }
  .character-phones { max-width: 34rem; }
  .character-racer__media { max-width: 36rem; }
}
@media (max-width: 639px) {
  .character-3d .character-stage__frame { margin-inline: -16px; border-radius: 0; border-inline: 0; }
  .character-racer__bars { padding-inline: 0; }
  .character-racer__bars > div { grid-template-columns: 6.5rem minmax(0, 1fr); }
  .character-racer__bars dd { grid-template-columns: minmax(0, 1fr) 3.5rem; }
  .character-facts, .character-wear { grid-template-columns: minmax(0, 1fr); gap: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
  .character-facts > div, .character-wear > div { display: grid; grid-template-columns: 6.75rem minmax(0, 1fr); align-items: baseline; gap: 1rem; padding: .9rem 1.1rem; background: none; border: 0; border-radius: 0; }
  .character-facts > div + div, .character-wear > div + div { border-top: 1px solid var(--line); }
  .character-facts dd, .character-wear dd { margin: 0; }
  .character-facts dd { font-size: 1.05rem; }
}

/* The characters directory (characters/): the eighteen, Tempo first, in a grid of three (two on tablets,
   one on phones), buttons level along the bottom. */
.character-intro { max-width: 40rem; margin: 0 0 1.75rem; color: var(--ink-dim); }
.character-grid--cast { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.character-grid--cast .character-card { grid-template-rows: auto 1fr; }
.character-grid--cast .character-card__copy { display: flex; flex-direction: column; align-items: flex-start; }
.character-grid--cast .character-card__copy .btn { margin-top: auto; }
.character-card .character-status { margin-bottom: .75rem; color: var(--accent); }
.character-grid--cast .character-card h3 { margin-bottom: .5rem; font-size: 1.7rem; }
@media (min-width: 640px) {
  .character-grid--cast { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .character-grid--cast .character-card--lead { grid-column: 1 / -1; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-rows: auto; align-items: center; }
  .character-grid--cast .character-card--lead .character-card__copy { padding: clamp(1.5rem, 4vw, 2.75rem); }
  .character-grid--cast .character-card--lead h3 { font-size: clamp(2.4rem, 5vw, 3.4rem); }
  .character-grid--cast .character-card--lead .character-card__copy p:not(.character-status) { font-size: 1.15rem; }
}
@media (min-width: 1000px) {
  .character-grid--cast { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* The eight racers that are only in Razaki Racers: the Racers plate, with their portraits where a kart picture goes. */
.character-racer--more .character-racer__media { align-self: center; }
.character-faces { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem .75rem; margin: 0; padding: 0; list-style: none; }
.character-faces li { min-width: 0; margin: 0; }
.character-faces img { display: block; width: 100%; height: auto; clip-path: polygon(9% 0, 100% 0, 91% 100%, 0 100%); }
.character-faces p { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .4rem; margin: .5rem 0 0; color: #fff; font-size: .8rem; font-style: italic; font-weight: 900; letter-spacing: .03em; line-height: 1.2; text-transform: uppercase; }
.character-faces b { display: inline-block; min-width: 1.7em; padding: .08em .4em; background: var(--paint, var(--rr-night)); color: var(--on, #fff); border: 2px solid #fff; text-align: center; transform: skewX(-12deg); }
@media (max-width: 639px) {
  .character-faces { gap: .9rem .5rem; }
  .character-faces p { gap: .15rem .3rem; font-size: .68rem; letter-spacing: 0; }
  .character-faces b { min-width: 1.6em; padding-inline: .3em; border-width: 1.5px; }
}

/* The Tempo Line page's cast: all eighteen as a compact grid of 3D renders (img/character-<slug>-3d-480.webp), each a link to the profile. */
.character-roster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 0; padding: 0; list-style: none; }
.character-roster li { display: flex; margin: 0; }
.character-roster a { display: flex; flex: 1; flex-direction: column; align-items: center; gap: .1rem; padding: .5rem .4rem .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; color: var(--ink); text-align: center; text-decoration: none; transition: border-color 120ms ease, transform 120ms ease; }
.character-roster a:hover { border-color: var(--accent); transform: translateY(-2px); }
.character-roster__art { display: block; width: 100%; aspect-ratio: 1; border-radius: 14px; background: radial-gradient(closest-side, rgb(116 221 179 / .24), rgb(116 221 179 / .06) 72%, transparent); }
.character-roster img { display: block; width: 100%; height: auto; }
.character-roster b { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
.character-roster small { color: var(--ink-dim); font-size: .82rem; line-height: 1.3; }
@media (min-width: 760px) {
  .character-roster { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .character-stage__frame::after { animation: none; }
  .tl .character-racer .btn:active, .tl .character-where__card--rr .btn:active { transform: none; }
  .character-roster a { transition: none; }
  .character-roster a:hover { transform: none; }
}
/* ===== End of the character pages block ===== */

/* Current game renders retain their whole silhouette on profile cards. */
.character-poster--model { aspect-ratio: 1; background: radial-gradient(closest-side, rgb(116 221 179 / .15), transparent); }
.character-poster--model img { width: 100%; height: 100%; object-fit: contain; }

/* ===== Song pages: tempo-line/levels/<id>/ (one per level) and tempo-line/levels/ (the list), written by tools/build-site.mjs ===== */
/* The header takes the level's own colours (--art, the gradient of its card in the game) under the ink, so every page has its level's light and the words stay readable. */
.tl .song-hero { background: linear-gradient(180deg, rgb(7 27 29 / .62), rgb(7 27 29 / .9)), var(--art, var(--bg)); }
.tl .song-hero .wrap { padding-bottom: 2.5rem; }
.tl .song-hero .hero-copy { max-width: 46rem; }
.tl .song-hero h1 { font-size: clamp(2.1rem, 7vw, 3.6rem); font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.tl .song-hero .lede { color: var(--ink); }
.song-crumbs a { color: var(--accent); }
.tl .hero .song-crumbs a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .2em; }
/* The player: the game's song page in a frame, 16:9 on a wide screen and taller on a phone. It never fills the screen, so a finger can always scroll the page past it. */
.tl .song-play { margin-top: 2rem; }
.song-player { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 78vh; border-radius: var(--radius); overflow: hidden; background: #071b1d var(--art); box-shadow: var(--shadow); border: 1px solid var(--line); }
.song-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 639px) {
  .song-player { aspect-ratio: 4 / 5; max-height: 68svh; border-radius: 18px; }
}
/* A phone held sideways (844 x 390): the 16:9 player would take nearly all of the height, and a swipe that starts on it never reaches the page. Shorter, so a good band of page is left to scroll by. */
@media (max-height: 500px) and (orientation: landscape) {
  .song-player { max-height: 62svh; }
}
.song-play__under { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; margin-top: 1rem; }
.song-play__under p { margin: 0; flex: 1 1 18rem; }
.song-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.song-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1rem; margin: 1rem 0 0; }
.song-facts div { margin: 0; }
.song-facts dt { color: var(--ink-dim); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.song-facts dd { margin: .1rem 0 0; font-weight: 600; }
.song-shot { margin: 1.5rem 0 0; }
.song-shot img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.song-shot figcaption { margin-top: .5rem; color: var(--ink-dim); font-size: .95rem; }
.song-neighbours { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: .75rem; margin-bottom: 1.5rem; }
.song-next { display: grid; gap: .15rem; padding: 1rem 1.25rem; border-radius: 20px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; background: linear-gradient(90deg, rgb(12 38 41 / .96) 40%, rgb(12 38 41 / .55)), var(--art); transition: border-color 120ms ease; }
.song-next:hover { border-color: var(--accent); }
.song-next small { color: var(--accent); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.song-next b { font-size: 1.2rem; }
.song-next span { color: var(--ink-dim); font-size: .95rem; }
.song-list strong { white-space: normal; }
.song-list strong a { color: var(--ink); }
.tl .song-get { margin-bottom: 1rem; }
/* Google's "Get it on Google Play" badge, as Google supplies it (its clear space is inside the picture): about 50 px of badge on a phone, a little more on a wide screen. */
.play-badge { display: inline-block; line-height: 0; border-radius: 12px; }
.play-badge img { display: block; width: auto; height: 72px; }
@media (max-width: 639px) {
  .play-badge img { height: 64px; }
}
.play-badge:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.song-get .actions { margin-top: 1rem; }
.song-legal { margin: 1rem 0 0; color: var(--ink-dim); font-size: .8rem; }
@media (prefers-reduced-motion: reduce) {
  .song-next { transition: none; }
}
/* ===== End of the song pages block ===== */
