/* Zweitakt - zweitakt.herrsack.de
 * The screen follows Hill Climb Racing: tank and screws top left, distance
 * top centre, pause top right, two pedals at the bottom with the dials in
 * between. Hardly any text.
 */

@font-face {
  font-family: "Baloo 2";
  src: url("assets/baloo2.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --gruen: #3f7a5a;
  --text: #2b1d14;
  --text-leise: #5e4b3b;
  --karte: rgba(255, 250, 238, 0.96);
  --akzent: #e0702e;
  --fokus: #e0702e;
  --rot: #c8352b;
  --schatten: 0 2px 3px rgba(0, 0, 0, 0.35);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.symbole { position: absolute; width: 0; height: 0; overflow: hidden; }

html, body { height: 100%; margin: 0; }

body {
  font-family: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  color: var(--text);
  background: linear-gradient(#8fc3e8, #6e5236);
  display: grid;
  place-items: center;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

.rahmen {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  background: #8fc3e8;
}

@media (min-width: 900px) and (min-height: 620px) {
  .rahmen {
    width: min(1280px, calc(100vw - 48px));
    height: min(760px, calc(100vh - 48px));
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  }
}

.buehne { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ansicht { position: absolute; inset: 0; }
.icon { width: 1.2em; height: 1.2em; flex: none; }

body.touch .nur-tasten, body:not(.touch) .nur-touch { display: none; }

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 0.35em;
  border-radius: 6px;
  border: 1px solid rgba(43, 29, 20, 0.3);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.8em;
  line-height: 1.4;
  text-align: center;
}

/* --- buttons ---------------------------------------------------------- */
.knopf {
  font: inherit;
  font-weight: 800;
  font-size: 20px;
  padding: 10px 24px;
  border: 0;
  border-radius: 999px;
  background: #fff8ea;
  color: var(--text);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2);
  cursor: pointer;
}
.knopf.haupt { background: var(--akzent); color: #fff; }
.knopf:hover { filter: brightness(1.05); }
.knopf:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2); }
.knopf:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid var(--fokus); outline-offset: 3px; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }

/* --- screw counter (title and ride) ------------------------------------ */
.zaehler {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: 800;
  font-size: 24px;
  color: #fff;
  text-shadow: var(--schatten);
  font-variant-numeric: tabular-nums;
}

/* --- title ------------------------------------------------------------ */
.titel { display: grid; place-items: start center; padding-top: clamp(40px, 10vh, 110px); background: rgba(30, 40, 30, 0.12); }
.titel-zaehler {
  position: absolute;
  top: 12px;
  left: max(16px, env(safe-area-inset-left));
  padding: 4px 14px 2px 10px;
  border-radius: 999px;
  background: rgba(40, 30, 20, 0.35);
}
.titel-mitte { text-align: center; }
.spielname {
  margin: 0 0 18px;
  font-size: clamp(48px, 9vw, 96px);
  font-weight: 800;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.01em;
  text-shadow: 0 4px 0 var(--gruen), 0 8px 18px rgba(0, 0, 0, 0.3);
}
.knopf.los {
  font-size: 34px;
  padding: 14px 56px 10px;
  background: var(--akzent);
  color: #fff;
  box-shadow: 0 5px 0 #a24a17, 0 10px 24px rgba(0, 0, 0, 0.25);
}
/* track choice: a row of cards as in the model */
.karten {
  display: flex; gap: 14px; justify-content: safe center; margin: 0 0 20px; padding: 6px 12px 10px;
  max-width: 100vw; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin;
}
.karten > * { flex: 0 0 auto; scroll-snap-align: center; }
.streckenkarte {
  position: relative;
  width: clamp(130px, 17vw, 200px);
  padding: 6px 6px 8px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 250, 238, 0.92);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18);
  font: inherit;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: transform 0.1s;
}
.streckenkarte[aria-checked="true"] { outline: 4px solid var(--akzent); outline-offset: 0; transform: translateY(-4px); }
.streckenkarte canvas { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 11px; }
.streckenkarte .name { display: block; margin-top: 4px; font-weight: 800; font-size: 19px; line-height: 1.1; }
.streckenkarte .info { display: flex; justify-content: center; align-items: center; gap: 4px; min-height: 1.4em; font-weight: 700; font-size: 15px; color: var(--text-leise); }
.streckenkarte.zu canvas { filter: grayscale(0.7) brightness(0.75); }
.streckenkarte .schloss { position: absolute; top: 18%; left: 50%; width: 38px; height: 38px; transform: translateX(-50%); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); }
.knopf.los[data-preis] { display: inline-flex; align-items: center; gap: 10px; }
.knopf.los:disabled { background: #9a8f84; box-shadow: 0 5px 0 #6f665e; cursor: not-allowed; }
.zurueck {
  position: absolute;
  left: 16px;
  bottom: 12px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  opacity: 0.9;
  text-shadow: var(--schatten);
}
.zurueck:hover { opacity: 1; text-decoration: underline; }

/* --- ride: HUD ----------------------------------------------------------- */
.spiel { touch-action: none; }
.hud-links {
  position: absolute;
  top: 12px;
  left: max(14px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: auto auto;
  gap: 6px 10px;
  align-items: center;
  justify-items: start;
}
.tank { display: flex; align-items: center; gap: 6px; font-size: 22px; }
.tank-balken {
  width: clamp(120px, 18vw, 200px);
  height: 18px;
  border-radius: 9px;
  background: rgba(40, 30, 20, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.85);
  overflow: hidden;
}
.tank-fuellung {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 7px;
  background: linear-gradient(#8fd06a, #4f9a3a);
  transition: width 0.15s linear;
}
.tank.knapp .tank-fuellung { background: linear-gradient(#ff8a6b, var(--rot)); animation: blinken 0.5s steps(2) infinite; }
.tank.voll .tank-balken { animation: aufblitzen 0.5s ease-out; }
@keyframes blinken { 50% { opacity: 0.35; } }
@keyframes aufblitzen { 0% { box-shadow: 0 0 0 6px rgba(255, 240, 150, 0.9); } 100% { box-shadow: 0 0 0 0 rgba(255, 240, 150, 0); } }
.hud-links .zaehler { grid-column: 1; }

.hahn {
  grid-row: 1;
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 6px;
  border: 0;
  border-radius: 999px;
  background: #fff3c4;
  font: inherit;
  font-weight: 800;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(255, 230, 120, 0.9);
  animation: pochen 0.6s ease-in-out infinite;
}
.hahn kbd { font-size: 14px; }
@keyframes pochen { 50% { transform: scale(1.12); box-shadow: 0 0 0 8px rgba(255, 230, 120, 0); } }

.weite {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-weight: 800;
  font-size: 34px;
  color: #fff;
  text-shadow: var(--schatten);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.pausenknopf {
  position: absolute;
  top: 10px;
  right: max(12px, env(safe-area-inset-right));
  width: 48px;
  height: 48px;
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(40, 30, 20, 0.35);
  cursor: pointer;
}
.pausenknopf span { width: 6px; height: 20px; border-radius: 2px; background: #fff; }
body.regler .pausenknopf, body.regler .tank, body.regler .hahn, body.regler .pedal { display: none; }

/* trick messages */
.meldungen {
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
}
.meldung {
  font-weight: 800;
  font-size: 30px;
  color: #fff3c4;
  white-space: nowrap;
  text-shadow: 0 3px 0 rgba(60, 35, 15, 0.8), 0 0 10px rgba(0, 0, 0, 0.25);
  animation: meldung 1.5s ease-out forwards;
}
.meldung .plus { margin-left: 10px; color: #fff; }
@keyframes meldung {
  0% { opacity: 0; transform: scale(0.6); }
  12% { opacity: 1; transform: scale(1.08); }
  20% { transform: scale(1); }
  75% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-16px); }
}

/* pedals, as in the model: brake bottom left, gas bottom right */
.pedal {
  position: absolute;
  bottom: max(14px, env(safe-area-inset-bottom));
  width: 84px;
  height: 104px;
  border-radius: 14px 14px 10px 10px;
  background:
    repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.22) 0 6px, transparent 6px 14px) 12px 14px / calc(100% - 24px) calc(100% - 28px) no-repeat,
    linear-gradient(#9aa0a6, #6a7077);
  border: 3px solid rgba(40, 36, 32, 0.6);
  box-shadow: 0 6px 0 rgba(40, 36, 32, 0.5);
  opacity: 0.85;
  pointer-events: none;
  transition: transform 0.05s, box-shadow 0.05s;
}
.pedal-links { left: max(14px, env(safe-area-inset-left)); width: 96px; height: 76px; }
.pedal-rechts { right: max(14px, env(safe-area-inset-right)); }
.pedal.an { transform: translateY(5px) scaleY(0.95); box-shadow: 0 1px 0 rgba(40, 36, 32, 0.5); filter: brightness(1.15); }
.pedal kbd { position: absolute; top: -12px; right: -10px; font-weight: 800; }

/* --- title buttons ------------------------------------------------------- */
.los-reihe { display: flex; gap: 14px; justify-content: center; align-items: center; }
.knopf.rund { width: 56px; height: 56px; padding: 0; display: grid; place-items: center; border-radius: 50%; background: rgba(40, 30, 20, 0.45); color: #fff; font-size: 30px; line-height: 1; }
.knopf.rund .icon { width: 28px; height: 28px; }
.nur-vorleser { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- garage: moped on the stand, bars right, parts below ------------------ */
.garage {
  display: grid;
  grid-template-columns: 1fr minmax(250px, 330px);
  grid-template-rows: auto 1fr auto auto;
  gap: 10px 14px;
  padding: 12px max(14px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
}
.garage-oben { grid-column: 1; grid-row: 1; display: flex; gap: 12px; align-items: center; }
.zurueck-knopf { width: 46px; height: 46px; font-size: 34px; padding-bottom: 4px; }
/* moped choice: arrows around the name, above the moped */
.mopedwahl { display: flex; align-items: center; gap: 8px; margin-left: auto; margin-right: auto; }
.mopedwahl .pfeil { width: 40px; height: 40px; font-size: 18px; padding: 0; }
.rad-name { min-width: 6.5em; text-align: center; font-size: 26px; font-weight: 800; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); }
/* a moped not owned yet: only its bars and the price */
.garage.vorschau .teile, .garage.vorschau .stufen, .garage.vorschau .einstellungen, .garage.vorschau #empfohlen { display: none; }
.karte.werte { grid-column: 2; grid-row: 1 / 3; align-self: start; min-width: 0; max-width: none; padding: 12px 16px; text-align: left; }
.werte-strecke { margin: 0 0 4px; font-weight: 800; color: var(--text-leise); font-size: 15px; }
.balkenliste { list-style: none; margin: 0; padding: 0; }
.balkenliste li { display: grid; grid-template-columns: 98px 1fr; align-items: center; gap: 8px; margin: 5px 0; font-weight: 700; font-size: 15px; }
.balken { position: relative; height: 14px; border-radius: 7px; background: #e3dccb; overflow: hidden; }
.balken .voll { position: absolute; inset: 0 auto 0 0; border-radius: 7px; background: #e0702e; transition: width 0.3s ease-out; }
.balken .delta { position: absolute; top: 0; bottom: 0; transition: left 0.2s, width 0.2s; }
.balken .delta.besser { background: #5aa84a; }
.balken .delta.schlechter { background: repeating-linear-gradient(45deg, #c8352b 0 4px, #e0675c 4px 8px); }
.einstellungen { margin: 10px 0 8px; display: grid; gap: 6px; }
.einstellung { display: grid; grid-template-columns: 98px 1fr; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.kerben { display: flex; border-radius: 999px; overflow: hidden; background: #e3dccb; }
.kerben button { flex: 1; border: 0; padding: 4px 0; font: inherit; font-size: 13px; font-weight: 700; color: var(--text-leise); background: transparent; cursor: pointer; }
.kerben button[aria-checked="true"] { background: var(--gruen); color: #fff; }

.stufen { grid-column: 1; grid-row: 3; display: flex; gap: 10px; align-items: stretch; justify-content: center; flex-wrap: wrap; }
.stufe {
  min-width: 108px;
  padding: 8px 12px 6px;
  border: 0;
  border-radius: 14px;
  background: var(--karte);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18);
  font: inherit;
  color: var(--text);
  cursor: pointer;
  text-align: center;
}
.stufe .name { display: block; font-weight: 800; font-size: 17px; }
.stufe .stand { display: flex; justify-content: center; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; color: var(--text-leise); min-height: 1.4em; }
.stufe.drin { background: #e3f0d9; }
.stufe[aria-pressed="true"] { outline: 3px solid var(--akzent); }
.stufe .zu { opacity: 0.6; }
.stufe-aktion { align-self: center; }
.stufe-aktion:disabled { background: #9a8f84; color: #fff; cursor: default; }

.teile { grid-column: 1; grid-row: 4; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.teil {
  position: relative;
  width: 76px;
  padding: 6px 3px 5px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 250, 238, 0.92);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2);
  font: inherit;
  color: var(--text);
  cursor: pointer;
}
.teil .icon { width: 34px; height: 34px; display: block; margin: 0 auto; }
.teil .name { display: block; font-size: 12px; font-weight: 800; line-height: 1.2; margin-top: 2px; }
.teil .punkte { display: flex; justify-content: center; gap: 3px; margin-top: 3px; }
.teil .punkte i { width: 7px; height: 7px; border-radius: 50%; background: #d5ccb8; }
.teil .punkte i.hat { background: #8a9097; }
.teil .punkte i.drin { background: var(--akzent); }
.teil[aria-selected="true"] { outline: 3px solid var(--akzent); transform: translateY(-3px); }
.garage-los { grid-column: 2; grid-row: 3 / 5; align-self: end; justify-self: end; }

@media (max-height: 520px), (max-width: 760px) {
  .garage { grid-template-columns: 1fr 232px; gap: 6px 10px; padding-top: 8px; }
  .karte.werte { grid-row: 1 / 4; padding: 6px 10px; border-radius: 16px; }
  .werte-strecke { font-size: 13px; margin: 0; }
  .einstellungen { margin: 4px 0; gap: 3px; }
  .kerben button { font-size: 11px; padding: 2px 0; }
  .garage-los { grid-row: 4; }
  .balkenliste li, .einstellung { grid-template-columns: 74px 1fr; font-size: 12px; margin: 2px 0; }
  .balken { height: 10px; }
  .teile { gap: 3px; flex-wrap: nowrap; justify-content: safe center; overflow-x: auto; scrollbar-width: none; padding-bottom: 3px; }
  .teile::-webkit-scrollbar { display: none; }
  .teil { flex: 0 0 auto; }
  .rad-name { font-size: 19px; min-width: 5.5em; }
  .mopedwahl .pfeil { width: 32px; height: 32px; font-size: 14px; }
  .teil { width: 45px; padding: 4px 0 3px; }
  .teil .icon { width: 24px; height: 24px; }
  .teil .name { font-size: 8.5px; letter-spacing: -0.02em; }
  .stufen { gap: 6px; }
  .stufe { min-width: 62px; padding: 4px 6px 3px; }
  .stufe.lackstufe { min-width: 52px; }
  .lackstufe .text { display: none; }
  .lackstufe .farbfleck { width: 1.3em; height: 1.3em; margin: 0; }
  .stufe .name { font-size: 13px; }
  .stufe .stand { font-size: 12px; }
  .stufe-aktion { font-size: 16px; padding: 6px 12px; }
  .garage-los { font-size: 24px; padding: 6px 30px 4px; }
}

/* --- pause and end ------------------------------------------------------- */
.schicht { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(25, 20, 15, 0.35); z-index: 20; }
.karte {
  min-width: min(88vw, 320px);
  max-width: min(92vw, 440px);
  padding: 20px 28px;
  border-radius: 22px;
  background: var(--karte);
  box-shadow: 0 10px 30px rgba(20, 15, 10, 0.35);
  text-align: center;
}
.karte h2 { margin: 0; font-size: 32px; line-height: 1.1; }
.ende-titel { color: var(--rot); }
.ende-weite { margin: 6px 0 10px; font-size: 52px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.neu-rekord {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #f2c230;
  font-size: 18px;
  vertical-align: middle;
}
.ende-liste { list-style: none; margin: 0 auto; padding: 0; max-width: 260px; font-size: 18px; }
.ende-liste li { display: flex; justify-content: space-between; padding: 2px 0; color: var(--text-leise); }
.ende-liste li span:last-child { font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.ende-summe { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 32px; font-weight: 800; }

@media (max-width: 640px), (max-height: 460px) {
  .weite { font-size: 26px; }
  .zaehler { font-size: 20px; }
  .pedal { width: 70px; height: 86px; }
  .pedal-links { width: 80px; height: 62px; }
  .meldung { font-size: 24px; }
  .ende-weite { font-size: 40px; }
}

@media (max-height: 460px) {
  .titel { padding-top: 10px; }
  .spielname { font-size: 40px; margin-bottom: 8px; }
  .knopf.los { font-size: 24px; padding: 6px 36px 4px; }
  .karten { margin-bottom: 10px; gap: 10px; }
  .streckenkarte { width: 120px; padding: 4px 4px 5px; }
  .streckenkarte .name { font-size: 16px; }
  .streckenkarte .info { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .hahn, .tank.knapp .tank-fuellung, .tank.voll .tank-balken { animation: none; }
  .meldung { animation: meldung-ruhig 1.5s linear forwards; }
  @keyframes meldung-ruhig { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
}

/* paint swatch in front of the colour's name */
.farbfleck { display: inline-block; width: 0.9em; height: 0.9em; border-radius: 50%; margin-right: 5px; vertical-align: -0.1em; box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.35); }

/* sound and motion switches (title and pause), sources of the recordings */
.schalter { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.schalter .knopf.mini { font-size: 14px; padding: 5px 12px; }
/* on the title the switches sit in the top right corner, away from the moped */
.titel-schalter { position: absolute; top: 16px; right: 16px; margin: 0; z-index: 2; }
.quellen { margin: 12px 0 0; font-size: 11px; line-height: 1.35; color: var(--text-leise); max-width: 30em; }
@media (max-height: 520px), (max-width: 760px) {
  .schalter .knopf.mini { font-size: 12px; padding: 3px 9px; }
}

/* leaderboard: the entry on the end card and the list per track (step 9) */
.eintrag { margin: 6px 0 4px; text-align: left; }
.eintrag label { display: block; margin-bottom: 6px; font-weight: 700; }
.eintrag-zeile { display: flex; gap: 8px; }
.eintrag-zeile input { flex: 1; min-width: 0; padding: 8px 12px; border: 2px solid rgba(47, 42, 36, 0.25); border-radius: 12px; font: inherit; }
.eintrag-info { min-height: 1.2em; margin: 6px 0 0; font-size: 15px; font-weight: 600; }
.eintrag-info.fehler { color: #c0392b; }
.eintrag-info.gut { color: #2e7d32; }
.knopf.klein { font-size: 17px; padding: 8px 16px; }
.schicht.oben { z-index: 30; }
.bestenliste-karte { max-height: 92vh; overflow-y: auto; }
.bestenliste-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bestenliste-kopf h2 { margin: 0; min-width: 7em; }
.bestenliste-kopf .pfeil { width: 40px; height: 40px; font-size: 16px; padding: 0; }
.liste { margin: 8px 0 14px; padding: 0; list-style: none; min-width: min(80vw, 340px); }
.liste li { display: flex; gap: 10px; padding: 4px 10px; border-radius: 10px; }
.liste li:nth-child(odd) { background: rgba(240, 219, 166, 0.45); }
.liste li.du { background: #ffe08a; font-weight: 800; }
.liste .platz { width: 2em; text-align: right; }
.liste .name { flex: 1; text-align: left; }
.liste .wert { font-weight: 700; }
@media (max-height: 520px) {
  .liste li { padding: 2px 10px; font-size: 14px; }
  .bestenliste-kopf .pfeil { width: 32px; height: 32px; }
}

/* phones held sideways: while the name is asked, the small counts make room */
.eintrag-info:empty { display: none; }
@media (max-height: 460px) {
  .ende-karte:has(#eintrag:not([hidden])) .ende-liste { display: none; }
  .ende-karte { max-height: 96vh; overflow-y: auto; }
}

/* barn finds in the garage: the five parts and where they lie */
.fundliste { margin-top: 8px; border-top: 2px dashed #e3dccb; padding-top: 6px; }
.fund-titel { margin: 0 0 4px; font-weight: 800; color: #9a5a2e; }
.fund-teile { list-style: none; margin: 0; padding: 0; }
.fund-teile li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 700; margin: 2px 0; }
.fund-teile .fund-wo { color: var(--text-leise); font-weight: 600; }
.fund-teile li.da .fund-name { color: #3f7a5a; }
@media (max-height: 520px), (max-width: 760px) {
  .fund-teile li { font-size: 12px; margin: 0; }
  .fundliste { margin-top: 4px; padding-top: 3px; }
}

/* time trial (step 10): no tank in the HUD, the time in its place of the distance */
.spiel.zeitfahren .tank, .spiel.zeitfahren .hahn, .spiel.zeitfahren .hud-links .zaehler { display: none; }
.ende-sterne { margin: -4px 0 6px; font-size: 40px; line-height: 1; letter-spacing: 4px; color: #f2c230; text-shadow: 0 2px 0 #b5892a; }
.ende-neu { margin: 6px 0 0; font-weight: 800; color: #3f7a5a; font-size: 15px; }

/* the course list */
.kurse-karte { width: min(680px, 94vw); max-width: none; max-height: 94vh; overflow-y: auto; }
.kurse-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.kurse-kopf h2 { margin: 0; }
.kurse-summe { margin: 0; display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 20px; }
.kurse-summe .icon { width: 26px; height: 26px; }
.kurse-liste { display: grid; gap: 6px; margin-bottom: 12px; }
.kurs-zeile { display: grid; grid-template-columns: 110px repeat(3, 1fr); gap: 6px; align-items: center; }
.kurs-strecke { font-weight: 800; text-align: left; }
.kurs {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 6px; align-items: center; white-space: nowrap;
  padding: 5px 8px; border: 0; border-radius: 12px; background: #fffaf0; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18);
  font: inherit; color: var(--text); cursor: pointer; text-align: left;
}
.kurs:disabled { opacity: 0.5; cursor: default; box-shadow: none; }
.kurs:focus-visible { outline: 3px solid #e0702e; }
.kurs-nr { font-size: 12px; font-weight: 700; color: var(--text-leise); }
.kurs-sterne { grid-row: 1 / 3; grid-column: 2; justify-self: end; font-size: 20px; color: #f2c230; letter-spacing: 1px; }
.kurs-zeit { font-size: 13px; font-weight: 800; }
@media (max-height: 460px) {
  .kurse-karte { padding: 8px 12px; }
  .kurse-liste { gap: 3px; margin-bottom: 6px; }
  .kurs-zeile { grid-template-columns: 86px repeat(3, 1fr); gap: 4px; font-size: 13px; }
  .kurs { padding: 2px 6px; }
  .kurs-sterne { font-size: 15px; }
  .kurs-zeit, .kurs-nr { font-size: 11px; }
  .ende-sterne { font-size: 30px; margin-bottom: 2px; }
}

/* the race for two (step 11): two pictures, top and bottom, a strip per player */
.renn-hud, .renn-pedal, .renn-ziel { display: none; }
.rennen-modus .buehne { height: 50%; }
.rennen-modus .buehne2 { top: 50%; border-top: 3px solid #2b1d14; }
.rennen-modus .spiel .hud-links, .rennen-modus .spiel .weite, .rennen-modus #pedal-bremse, .rennen-modus #pedal-gas { display: none; }
.rennen-modus .renn-hud {
  position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px;
  padding: 4px 12px; border-radius: 14px; background: rgba(255, 250, 238, 0.85); font-weight: 800; font-size: 15px;
}
.rennen-modus .renn-oben { top: 8px; }
.rennen-modus .renn-unten { top: calc(50% + 8px); }
.renn-name kbd { font-size: 11px; margin-left: 4px; }
.renn-bahn { position: relative; width: 160px; height: 8px; border-radius: 4px; background: #e3dccb; }
.renn-punkt { position: absolute; top: -3px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #e0702e; left: 0; }
.renn-unten .renn-punkt { background: #2f6fae; }
.renn-zeit { min-width: 4.2em; text-align: right; font-variant-numeric: tabular-nums; }
.rennen-modus .renn-ziel:not([hidden]) {
  display: block; position: absolute; left: 50%; transform: translate(-50%, -50%); margin: 0;
  font-size: 40px; font-weight: 800; color: #fff; text-shadow: 0 3px 0 var(--gruen), 0 6px 14px rgba(0, 0, 0, 0.3);
}
.renn-ziel-1 { top: 25%; }
.renn-ziel-2 { top: 75%; }
.countdown:not([hidden]) {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); margin: 0; z-index: 3;
  font-size: 110px; font-weight: 800; color: #fff; text-shadow: 0 5px 0 #c6382e, 0 10px 24px rgba(0, 0, 0, 0.35);
}
body.touch .rennen-modus .renn-pedal { display: block; width: 74px; height: 64px; }
.renn-pedal.oben { top: calc(50% - 76px); bottom: auto; }
.renn-pedal.unten { bottom: 12px; }
.renn-pedal.links { left: 14px; }
.renn-pedal.rechts { right: 14px; left: auto; }
@media (max-height: 460px) {
  .rennen-modus .renn-hud { font-size: 12px; padding: 2px 8px; gap: 6px; }
  .renn-bahn { width: 90px; }
  .countdown:not([hidden]) { font-size: 70px; }
  .rennen-modus .renn-ziel:not([hidden]) { font-size: 26px; }
}

/* the race setup */
.rennen-karte { width: min(560px, 94vw); max-width: none; }
.rennen-karte h2 { margin: 0 0 4px; }
.rennen-text { margin: 0 0 10px; color: var(--text-leise); font-weight: 600; }
.rennen-wahl { display: grid; grid-template-columns: 1fr auto 11em auto; align-items: center; gap: 8px; margin: 6px 0; }
.rennen-label { font-weight: 800; text-align: left; }
.rennen-label kbd { font-size: 11px; margin-left: 4px; }
.rennen-wert { font-weight: 800; text-align: center; }
.rennen-wahl .pfeil { width: 36px; height: 36px; font-size: 14px; padding: 0; }
@media (max-height: 460px) {
  .rennen-karte { padding: 10px 16px; }
  .rennen-text { margin-bottom: 4px; font-size: 13px; }
  .rennen-wahl { margin: 2px 0; grid-template-columns: 1fr auto 9em auto; }
}
