:root {
  --bg: #0a0b10;
  --panel: #13151b;
  --well: #1c1f27;
  --ink: #f2f3f7;
  --soft: rgba(242, 243, 247, 0.56);
  --faint: rgba(242, 243, 247, 0.3);
  --line: rgba(242, 243, 247, 0.09);
  --accent: #39d6a4;
  --low: #f6ae3d;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: radial-gradient(110% 70% at 50% -10%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 62%), var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 14px;
}

.tp { position: relative; width: min(300px, 100%); padding: 14px 16px 12px; border-radius: 26px; background: linear-gradient(180deg, #171920, var(--panel)); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 30px 54px -30px rgba(0, 0, 0, 0.9); }

.tp__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tp__titles h1 { font-size: 15px; line-height: 20px; font-weight: 700; letter-spacing: -0.01em; }
.tp__state { height: 16px; overflow: hidden; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--low); transition: color 0.4s ease; }
.tp.is-good .tp__state { color: var(--accent); }
.tp__state span { display: block; }
.tp__units { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: 84px; height: 30px; padding: 3px; border-radius: 11px; background: var(--well); box-shadow: inset 0 0 0 1px var(--line); }
.tp__units button { position: relative; border: 0; border-radius: 8px; background: transparent; color: var(--soft); font: inherit; font-size: 12px; font-weight: 660; cursor: pointer; outline: none; transition: color 0.25s ease; -webkit-tap-highlight-color: transparent; }
.tp__units button[aria-pressed="true"] { color: var(--ink); }
.tp__units button:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.tp__thumb { position: absolute; left: 3px; top: 3px; width: 39px; height: 24px; border-radius: 8px; background: #2c303b; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 8px -4px rgba(0, 0, 0, 0.6); }

/* the car from above, drawn in lines; the tyres sit under the body's edges */
.tp__arena { position: relative; height: min(196px, 50vh); margin-top: 8px; }
.tp__car { position: absolute; left: 50%; top: 0; height: 100%; aspect-ratio: 140 / 200; transform: translateX(-50%); overflow: visible; }
.tp__body { fill: #1d2029; stroke: rgba(242, 243, 247, 0.34); stroke-width: 1.300; stroke-linejoin: round; }
.tp__glass { fill: rgba(242, 243, 247, 0.07); stroke: rgba(242, 243, 247, 0.22); stroke-width: 1; stroke-linejoin: round; }
.tp__line { fill: none; stroke: rgba(242, 243, 247, 0.14); stroke-width: 1; stroke-linecap: round; }
.tp__tyre { fill: color-mix(in srgb, var(--tone, var(--accent)) 30%, #14161c); stroke: var(--tone, var(--accent)); stroke-width: 1.400; cursor: pointer; transition: fill 0.4s ease, stroke 0.4s ease; }
.tp__ring { fill: none; stroke: var(--tone, var(--accent)); stroke-width: 1.200; opacity: 0; pointer-events: none; }
[data-tyre].is-low { --tone: var(--low); }

.tp__read { position: absolute; display: grid; gap: 1px; padding: 4px 8px; border: 0; border-radius: 11px; background: transparent; color: var(--ink); font: inherit; cursor: pointer; outline: none; transition: background-color 0.2s ease; -webkit-tap-highlight-color: transparent; }
.tp__read--l { left: -6px; text-align: left; }
.tp__read--r { right: -6px; text-align: right; }
.tp__read--f { top: 15%; }
.tp__read--b { top: 64%; }
.tp__read b { display: block; height: 24px; overflow: hidden; font-size: 20px; line-height: 24px; font-weight: 740; font-stretch: 94%; letter-spacing: -0.02em; transition: color 0.4s ease; }
.tp__read b span { display: block; }
.tp__read i { font-style: normal; font-size: 10.500px; line-height: 14px; font-weight: 580; color: var(--faint); white-space: nowrap; }
.tp__read.is-low b { color: var(--low); }
.tp__read.is-over { background: rgba(242, 243, 247, 0.07); }
.tp__read:focus-visible { box-shadow: 0 0 0 2px var(--ink); }

.tp__note { height: 17px; margin-top: 6px; overflow: hidden; text-align: center; font-size: 12px; line-height: 17px; font-weight: 560; color: var(--soft); white-space: nowrap; }
.tp__note span { display: block; }

.tp__say { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #f2f3f7; stroke: #13151b; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.6)); z-index: 5; }
