@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Nunito:wght@600;700;800;900;1000&display=swap');

:root {
  --paper: #fbfaf4;
  --ink: #34364a;
  --blue: #5965e9;
  --blue-dark: #3f49c9;
  --line: #e2e1d9;
  --pink: #f5c4d5;
  --yellow: #ffe79b;
  --green: #d1e8d6;
  --mint: #6cc49d;
  --font: 'DM Sans', sans-serif;
  --round: 'Nunito', 'Trebuchet MS', sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  background: var(--paper);
  background-image: radial-gradient(#77765c19 .8px, transparent .8px);
  background-size: 14px 14px;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; }
button:hover:not(:disabled) { filter: brightness(.985); }
[hidden] { display: none !important; }

.site-header {
  max-width: 1320px;
  margin: auto;
  padding: 25px 48px 21px;
  display: flex;
  align-items: center;
  gap: 25px;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: flex;
  align-items: center;
  font-family: var(--round);
  font-size: 31px;
  letter-spacing: -1.8px;
  line-height: 1;
  font-weight: 1000;
  text-decoration: none;
  color: var(--ink);
}
.wordmark > span:not(.checker), .wordmark i { color: var(--blue); }
.wordmark i { font-style: normal; transform: rotate(10deg); margin-left: 2px; }
.checker {
  display: inline-block;
  width: 24px;
  height: 24px;
  background: repeating-conic-gradient(var(--ink) 0 25%, transparent 0 50%) 0 0 / 12px 12px;
  transform: rotate(-9deg);
  border-radius: 2px;
  flex-shrink: 0;
}
.logo-checker { margin-right: 11px; }
.header-note { margin-left: auto; font-family: var(--round); font-weight: 800; font-size: 14px; color: #777986; }
.icon-button { border: 1px solid #ddded9; background: #fff; width: 38px; height: 38px; border-radius: 50%; font-size: 24px; position: relative; }
.sound-slash { position: absolute; left: 13px; top: 4px; font-size: 26px; }

main { max-width: 1160px; margin: auto; padding: 30px 30px 0; }
.intro { text-align: center; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 1.8px; display: flex; justify-content: center; align-items: center; gap: 10px; color: #737783; }
.eyebrow > span { height: 1px; width: 17px; background: #babcbd; }
h1 { font-family: var(--round); font-size: clamp(36px, 4.4vw, 57px); font-weight: 1000; letter-spacing: -2.5px; margin: 9px 0 5px; line-height: 1.15; }
h1 em { font-style: normal; color: var(--blue); position: relative; white-space: nowrap; }
h1 em::after { content: ''; position: absolute; width: 98%; height: 7px; background: var(--yellow); bottom: 2px; left: 0; z-index: -1; transform: rotate(-2deg); }
.intro p { margin: 0; color: #777985; font-size: 16px; line-height: 1.6; }

.steps { display: flex; align-items: center; justify-content: center; gap: 13px; margin: 24px 0 26px; }
.step { display: flex; align-items: center; gap: 8px; font-family: var(--round); font-size: 14px; font-weight: 800; color: #93949d; }
.step b { width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: #ebebe7; }
.step.active { color: var(--ink); }
.step.active b { background: var(--blue); color: #fff; }
.step.done b { background: var(--green); color: #34594b; }
.step-dash { height: 1px; background: #d9d9d2; width: 37px; }

.draw-layout { display: grid; grid-template-columns: minmax(0, 1fr) 282px; column-gap: 24px; row-gap: 22px; }
.drawing-card { background: #fff; border: 2px solid var(--ink); border-radius: 19px; box-shadow: 5px 6px 0 #dcdef6; overflow: hidden; align-self: start; }
.card-top { display: flex; justify-content: space-between; align-items: center; padding: 17px 21px; border-bottom: 1px solid #edede7; height: 67px; }
h2 { font-family: var(--round); font-weight: 900; font-size: 17px; margin: 0; }
.pencil { font-size: 26px; vertical-align: -2px; display: inline-block; line-height: 1; margin-right: 6px; }
.timer { display: flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 9px; background: #f2f3fc; font-size: 14px; color: var(--blue); min-width: 72px; justify-content: center; }
.timer > span:first-child { font-size: 23px; margin-right: 3px; }
.timer b { font-size: 20px; font-family: var(--round); font-weight: 900; min-width: 20px; text-align: center; }
.timer.urgent { background: #ffe8e7; color: #bb434d; }
.canvas-wrap { position: relative; aspect-ratio: 840 / 360; background-image: radial-gradient(#d6d7e0 1px, transparent 1px); background-size: 22px 22px; isolation: isolate; }
.canvas-wrap canvas { width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; }
.canvas-hint { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; pointer-events: none; text-align: center; padding: 20px; }
.hint-pencil { font-size: 56px; line-height: 1; color: #a8add2; transform: rotate(-10deg); margin-bottom: 7px; }
.canvas-hint strong { font-family: var(--round); font-size: 22px; letter-spacing: -.5px; color: #72758b; font-weight: 800; }
.canvas-hint > span:not(.hint-pencil) { font-size: 14px; color: #818396; }
.canvas-hint small { font-size: 12px; color: #a0a2ae; margin-top: 10px; }
.paper-label { position: absolute; bottom: 16px; left: 22px; font-family: var(--round); font-size: 12px; font-weight: 600; color: #9a9dab; pointer-events: none; }
.toolbar { min-height: 67px; padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; gap: 14px; border-top: 1px solid #edede7; background: #fff; }
.colors { display: flex; gap: 10px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #fff; background: var(--ink); box-shadow: 0 0 0 1px #ddd; }
.swatch.selected { box-shadow: 0 0 0 2px var(--ink); }
.edit-tools { display: flex; gap: 16px; }
.tool-button { border: 0; background: none; padding: 4px 0; font-size: 13px; display: flex; align-items: center; gap: 5px; font-weight: 500; }
.tool-button > span { font-size: 21px; line-height: 1; }
.tool-button:disabled { opacity: .35; }
.pit-card { border: 1px solid #dedfd9; border-radius: 17px; padding: 20px; background: #f1f4e9; position: relative; align-self: stretch; }
.pit-title { display: flex; align-items: center; justify-content: space-between; }
.pit-title h2 { font-size: 15px; }
.star { font-size: 25px; color: #9eae71; line-height: 1; }
.preview-box { height: 154px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.crew-art { width: 100%; height: 135px; object-fit: contain; mix-blend-mode: multiply; }
.preview-box canvas { width: 100%; height: 123px; object-fit: contain; }
.preview-caption { font-size: 12px; color: #7a826c; text-align: center; margin-top: -5px; }
.race-plan { border-top: 1px dashed #cbd1bd; padding-top: 14px; margin-top: 5px; display: flex; flex-direction: column; gap: 12px; }
.race-plan > div { display: flex; gap: 10px; align-items: flex-start; }
.plan-number { font-family: var(--round); font-size: 12px; font-weight: 900; color: #909c79; line-height: 22px; }
.race-plan p { margin: 0; }
.race-plan strong { font-family: var(--round); font-size: 14px; font-weight: 900; display: block; }
.race-plan p span { font-size: 12px; display: block; color: #7a806e; margin-top: 3px; line-height: 1.5; }
.sticky-note { font-family: var(--round); font-weight: 800; font-size: 14px; line-height: 1.45; background: #ffe9a8; border: 1px solid #ebd69c; margin: 21px -6px -30px 9px; padding: 11px 17px; box-shadow: 1px 3px 0 #d7dbca; transform: rotate(-3deg); position: relative; }
.sticky-note > span { position: absolute; right: 20px; bottom: 8px; font-size: 32px; transform: rotate(14deg); }
.draw-bottom { grid-column: 1; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.draw-bottom p { font-size: 13px; color: #7c7f8b; max-width: 300px; line-height: 1.5; }

.primary-button { background: var(--blue); color: #fff; font-family: var(--round); font-weight: 900; border: 2px solid var(--ink); border-radius: 12px; box-shadow: 3px 4px 0 var(--ink); font-size: 18px; padding: 13px 28px; display: flex; align-items: center; justify-content: center; gap: 12px; white-space: nowrap; transition: transform .12s, box-shadow .12s; min-height: 53px; }
.primary-button span { font-size: 23px; line-height: 1; }
.primary-button:disabled { background: #dce0f9; color: #9099d4; border-color: #adb4df; box-shadow: 3px 4px 0 #d2d5e9; }
.primary-button:active:not(:disabled), .primary-button.pressed { transform: translate(3px, 3px); box-shadow: 0 1px 0 var(--ink); }

/* The race is intentionally a separate visual world: bright, deep, and arcade-like. */
body.race-mode { background: #252943; overflow-x: hidden; }
body.race-mode .site-header { max-width: 1380px; color: #fff; border-color: #ffffff26; padding-top: 16px; padding-bottom: 14px; }
body.race-mode .wordmark { color: #fff; }
body.race-mode .checker { --ink: #fff; }
body.race-mode .header-note { color: #c9cbed; }
body.race-mode .icon-button { background: #ffffff18; color: #fff; border-color: #ffffff33; }
body.race-mode main { max-width: 1380px; padding-top: 15px; }
body.race-mode .intro { display: none; }
body.race-mode .steps { margin: 0 0 13px; }
body.race-mode .step { color: #aeb2d0; }
body.race-mode .step.active { color: #fff; }
body.race-mode .step.done { color: #bfe9cf; }
body.race-mode .step-dash { background: #ffffff2d; }
body.race-mode footer { display: none; }

.race-screen { border: 2px solid #272a43; background: #fff; border-radius: 20px; box-shadow: 8px 9px 0 #14172a; overflow: hidden; }
.race-top { height: 54px; padding: 0 21px; display: flex; align-items: center; justify-content: space-between; background: #fdfcf7; border-bottom: 2px solid var(--ink); font-family: var(--round); font-weight: 900; }
.race-tag { display: flex; align-items: center; gap: 11px; font-size: 12px; letter-spacing: .8px; }
.race-tag .checker { width: 20px; height: 20px; background-size: 10px 10px; --ink: #34364a; }
.race-clock { font-variant-numeric: tabular-nums; font-size: 16px; min-width: 58px; text-align: right; }
.kart-stage { position: relative; background: #8ed7f3; overflow: hidden; aspect-ratio: 1100 / 620; min-height: 360px; }
#raceCanvas { display: block; width: 100%; height: 100%; touch-action: none; }
.race-hud { position: absolute; z-index: 3; color: #fff; text-shadow: 0 2px 0 #34364a; font-family: var(--round); pointer-events: none; }
.hud-position { left: 20px; top: 15px; display: flex; align-items: baseline; gap: 7px; }
.hud-position strong { font-size: clamp(37px, 5vw, 61px); line-height: 1; font-style: italic; letter-spacing: -3px; }
.hud-position span { font-weight: 900; font-size: 15px; }
.hud-lap { right: 19px; top: 16px; background: #30334dda; border: 2px solid #fff; border-radius: 11px; padding: 7px 12px; display: flex; align-items: center; gap: 9px; box-shadow: 2px 3px 0 #272a43; text-shadow: none; }
.hud-lap > span { font-size: 11px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; }
.hud-lap strong { font-size: 18px; }
.hud-speed { right: 22px; bottom: 21px; display: flex; flex-direction: column; align-items: flex-end; }
.hud-speed strong { font-size: clamp(31px, 4vw, 48px); line-height: .85; font-style: italic; letter-spacing: -2px; }
.hud-speed span { font-size: 11px; font-weight: 1000; letter-spacing: 1.2px; }
.track-progress { position: absolute; z-index: 4; left: 50%; top: 17px; width: min(34%, 300px); height: 10px; transform: translateX(-50%); border: 2px solid #fff; border-radius: 999px; background: #252943aa; overflow: hidden; box-shadow: 0 2px 0 #34364a; }
.track-progress span { display: block; height: 100%; width: 0; background: var(--yellow); transition: width .18s linear; }
.drift-meter { position: absolute; left: 20px; bottom: 20px; z-index: 3; width: 145px; color: #fff; font-family: var(--round); font-size: 10px; font-weight: 1000; letter-spacing: 1px; text-shadow: 0 2px 0 #34364a; pointer-events: none; opacity: .72; transition: opacity .15s; }
.drift-meter.active { opacity: 1; }
.drift-meter i { margin-top: 5px; display: block; height: 10px; border: 2px solid #fff; border-radius: 999px; background: #252943a8; overflow: hidden; box-shadow: 0 2px 0 #34364a; }
.drift-meter b { display: block; height: 100%; width: 0; background: #ffb1da; transition: width .08s linear; }
.race-callout { position: absolute; left: 50%; top: 23%; transform: translate(-50%, -50%) rotate(-2deg) scale(.9); z-index: 5; pointer-events: none; opacity: 0; padding: 8px 18px; background: var(--yellow); color: var(--ink); border: 2px solid var(--ink); border-radius: 11px; box-shadow: 3px 4px 0 var(--ink); font-family: var(--round); font-size: clamp(16px, 2.4vw, 27px); font-weight: 1000; white-space: nowrap; }
.race-callout.show { animation: callout 1.25s ease both; }
.countdown-overlay { position: absolute; inset: 0; background: #292b4b55; backdrop-filter: blur(2px); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 6; color: #fff; }
.countdown-overlay > span { font-family: var(--round); font-weight: 1000; font-size: clamp(90px, 16vw, 176px); line-height: .9; transform: rotate(-6deg); text-shadow: 7px 7px 0 #34364a, 11px 11px 0 var(--yellow); }
.countdown-overlay p { font-family: var(--round); font-weight: 900; font-size: clamp(14px, 2vw, 20px); margin: 29px 0 0; text-shadow: 0 2px 0 #34364a; }
.race-bottom { padding: 15px 18px; display: flex; justify-content: space-between; align-items: center; gap: 18px; background: #fdfcf7; border-top: 2px solid var(--ink); }
.race-instructions strong { font-family: var(--round); font-size: 15px; font-weight: 900; }
.race-instructions p { font-size: 12px; color: #747887; margin: 6px 0 0; }
kbd { display: inline-block; border: 1px solid #cfd1dc; border-bottom: 3px solid #cfd1dc; border-radius: 5px; padding: 0 5px; margin-right: 2px; font-family: inherit; background: #fff; color: #555a76; font-size: 11px; }
.touch-controls { display: flex; align-items: center; gap: 10px; }
.steer-controls { display: flex; gap: 6px; }
.drive-button { height: 50px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; box-shadow: 2px 3px 0 var(--ink); font-family: var(--round); font-weight: 1000; user-select: none; -webkit-user-select: none; }
.drive-button.pressed, .drive-button:active { transform: translate(2px, 2px); box-shadow: none; }
.steer-button { width: 50px; font-size: 23px; }
.drift-button { padding: 0 14px; background: var(--pink); font-size: 12px; }
.drift-button span { font-size: 20px; margin-right: 3px; }
.pedal { background: var(--yellow); color: var(--ink); min-width: 202px; height: 52px; font-size: 14px; touch-action: none; user-select: none; -webkit-user-select: none; }
.pedal.pressed { background: #ffda6d; }

.result-screen { position: relative; isolation: isolate; overflow: hidden; border: 2px solid var(--ink); border-radius: 19px; box-shadow: 6px 6px 0 #dde0f4; background: #fff; text-align: center; padding: 28px 30px 33px; display: flex; align-items: center; flex-direction: column; }
.result-badge { background: var(--yellow); border: 2px solid var(--ink); border-radius: 50%; width: 70px; height: 70px; display: grid; place-items: center; font-family: var(--round); font-weight: 1000; font-size: 27px; transform: rotate(-8deg); box-shadow: 3px 3px 0 #f0d071; }
.result-screen > img { width: 220px; height: 115px; object-fit: contain; margin-top: 6px; }
.result-screen h2 { font-size: 29px; letter-spacing: -1px; margin: 4px 0 8px; }
.result-screen > p { margin: 0; color: #787d8c; font-size: 15px; }
.podium { display: flex; gap: 12px; margin: 23px 0; flex-wrap: wrap; justify-content: center; }
.podium > span { font-family: var(--round); font-size: 14px; padding: 8px 14px; border: 1px solid #e1e2e8; border-radius: 9px; background: #f7f7f9; }
.podium > span.winner { background: #fff4c8; border-color: #e6d997; }
.podium b { margin-right: 6px; }
.confetti { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.confetti i { position: absolute; width: 8px; height: 15px; border-radius: 2px; opacity: .65; animation: confetti-fall 3.5s ease-out forwards; }

footer { display: flex; justify-content: center; align-items: center; gap: 14px; font-family: var(--round); font-size: 12px; color: #8d8e96; text-align: center; padding: 30px 0 24px; }
.mini-star { color: #bdc29e; font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

@keyframes confetti-fall { from { transform: translateY(-70px) rotate(0); } to { transform: translateY(480px) rotate(340deg); opacity: 0; } }
@keyframes callout { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(-4deg) scale(.72); } 16%, 72% { opacity: 1; transform: translate(-50%, -50%) rotate(-2deg) scale(1); } 100% { opacity: 0; transform: translate(-50%, -70%) rotate(2deg) scale(.96); } }

@media (min-width: 1400px) {
  main { padding-top: 28px; }
  .site-header { padding-top: 30px; padding-bottom: 25px; }
  body.race-mode main { padding-top: 15px; }
}

@media (max-width: 850px) {
  .site-header { padding: 21px 25px; }
  .draw-layout { grid-template-columns: minmax(0, 1fr) 236px; gap: 20px; }
  .pit-card { padding: 16px; }
  .toolbar { padding: 14px; }
  .colors { gap: 8px; }
  .edit-tools { gap: 10px; }
  .primary-button { padding: 13px 21px; }
  .sticky-note { padding-left: 12px; font-size: 13px; }
  .kart-stage { min-height: 340px; }
  .race-instructions { display: none; }
  .race-bottom { justify-content: center; }
}

@media (max-width: 620px) {
  .site-header { padding: 17px 18px; }
  .wordmark { font-size: 25px; }
  .header-note { display: none; }
  .icon-button { width: 35px; height: 35px; margin-left: auto; }
  main { padding: 25px 14px 0; }
  h1 { font-size: 36px; letter-spacing: -1.8px; }
  .intro p { font-size: 14px; }
  .eyebrow { font-size: 9px; letter-spacing: 1.15px; }
  .steps { margin: 19px 0 21px; gap: 8px; }
  .step { font-size: 12px; gap: 5px; }
  .step-dash { width: 19px; }
  .draw-layout { display: flex; flex-direction: column; }
  .drawing-card { border-radius: 16px; box-shadow: 4px 5px 0 #dcdef6; }
  .card-top { padding: 13px 15px; height: 58px; }
  .card-top h2 { font-size: 15px; }
  .canvas-wrap { aspect-ratio: 1.38; }
  .canvas-hint strong { font-size: 17px; }
  .canvas-hint small, .paper-label { display: none; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 13px; }
  .colors { justify-content: center; }
  .swatch { width: 29px; height: 29px; }
  .edit-tools { justify-content: center; }
  .pit-card { order: 3; margin-top: 5px; }
  .preview-box { height: 130px; }
  .crew-art { height: 110px; }
  .race-plan { display: none; }
  .sticky-note { display: none; }
  .draw-bottom { order: 2; display: flex; flex-direction: column; align-items: stretch; gap: 7px; }
  .draw-bottom p { text-align: center; margin: 0; max-width: none; }
  .draw-bottom .primary-button { width: 100%; }
  body.race-mode .site-header { padding: 10px 15px 9px; }
  body.race-mode main { padding: 8px 7px 0; }
  body.race-mode .steps { display: none; }
  .race-screen { border-radius: 13px; box-shadow: 4px 5px 0 #14172a; }
  .race-top { height: 44px; padding: 0 12px; }
  .race-tag { font-size: 9px; letter-spacing: .45px; }
  .race-tag .checker { width: 16px; height: 16px; background-size: 8px 8px; }
  .race-clock { font-size: 13px; }
  .kart-stage { aspect-ratio: auto; height: min(56vh, 430px); min-height: 320px; }
  .hud-position { left: 11px; top: 10px; }
  .hud-position strong { font-size: 38px; }
  .hud-position span { font-size: 11px; }
  .hud-lap { top: 10px; right: 10px; padding: 5px 8px; gap: 6px; }
  .hud-lap > span { font-size: 9px; }
  .hud-lap strong { font-size: 14px; }
  .hud-speed { right: 11px; bottom: 13px; }
  .hud-speed strong { font-size: 30px; }
  .track-progress { top: 12px; width: 27%; }
  .drift-meter { left: 11px; bottom: 12px; width: 105px; }
  .race-bottom { padding: 11px 9px 13px; gap: 7px; }
  .touch-controls { width: 100%; justify-content: center; gap: 6px; }
  .steer-controls { gap: 4px; }
  .drive-button { height: 48px; }
  .steer-button { width: 45px; }
  .drift-button { padding: 0 10px; font-size: 10px; }
  .drift-button span { display: none; }
  .pedal { min-width: 0; flex: 1; max-width: 150px; font-size: 11px; padding: 8px 10px; }
  .pedal span { font-size: 18px; }
  .result-screen { padding: 25px 14px 29px; }
  .result-screen h2 { font-size: 25px; }
  .result-screen > p { font-size: 14px; }
  .podium { gap: 7px; }
  .podium > span { font-size: 12px; padding: 7px 9px; }
  .result-screen .primary-button { font-size: 17px; }
  footer { font-size: 12px; gap: 10px; padding: 28px 0 23px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* During the race, the circuit becomes the page instead of sitting inside it. */
body.race-mode {
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}
body.race-mode .site-header,
body.race-mode .intro,
body.race-mode .steps,
body.race-mode footer { display: none; }
body.race-mode main {
  width: 100%;
  max-width: none;
  height: 100dvh;
  margin: 0;
  padding: 0;
}
body.race-mode .race-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  width: 100vw;
  height: 100dvh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #8ed7f3;
  isolation: isolate;
}
body.race-mode .kart-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
}
body.race-mode .race-top {
  position: absolute;
  z-index: 8;
  top: 0;
  left: 0;
  right: 0;
  height: 62px;
  padding: 0 24px 9px;
  color: #fff;
  border: 0;
  background: linear-gradient(180deg, #252943e8 0%, #25294391 58%, transparent 100%);
  text-shadow: 0 2px 0 #252943;
  pointer-events: none;
}
body.race-mode .race-top .checker { --ink: #fff; }
body.race-mode .race-bottom {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 18px;
  width: min(920px, calc(100% - 32px));
  padding: 10px 12px;
  transform: translateX(-50%);
  border: 2px solid var(--ink);
  border-radius: 17px;
  background: #fdfcf7ed;
  box-shadow: 4px 5px 0 #14172acc;
  backdrop-filter: blur(8px);
}
body.race-mode .hud-position { top: 72px; }
body.race-mode .hud-lap { top: 72px; }
body.race-mode .track-progress { top: 25px; }
body.race-mode .hud-speed { bottom: 118px; }
body.race-mode .drift-meter { bottom: 118px; }

@media (max-width: 620px) {
  body.race-mode .race-top {
    height: 52px;
    padding: 0 11px 7px;
  }
  body.race-mode .race-tag { display: none; }
  body.race-mode .race-bottom {
    bottom: 8px;
    width: calc(100% - 14px);
    padding: 8px 7px;
    border-radius: 14px;
  }
  body.race-mode .kart-stage {
    height: 100%;
    min-height: 0;
  }
  body.race-mode .hud-position { top: 57px; }
  body.race-mode .hud-lap { top: 57px; }
  body.race-mode .track-progress { top: 20px; width: 24%; }
  body.race-mode .hud-speed { bottom: 91px; }
  body.race-mode .drift-meter { bottom: 91px; }
}
