/* Streckenflug 3D – Grundgestaltung. Farben über Variablen anpassbar (--s3-accent, --s3-bg, --s3-fg). */
.s3 { --s3-accent: #ffb000; --s3-bg: #10151f; --s3-fg: #fff; --s3-panel: rgba(10, 14, 22, .62); position: relative; font: 14px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--s3-fg); }
.s3-stage { position: relative; aspect-ratio: 16 / 9; background: var(--s3-bg); border-radius: 14px; overflow: hidden; }
.s3-gl, .s3-gl canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.s3-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.s3-lab { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 5px; pointer-events: auto; cursor: pointer; white-space: nowrap;
  margin: -14px 0 0 -12px; padding: 3px 9px 3px 4px; border-radius: 99px; background: var(--s3-panel); backdrop-filter: blur(4px); font-size: 12px; font-weight: 600; }
.s3-lab i { font-style: normal; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--s3-accent); color: #111; font-size: 11px; }
.s3-lab.s3-info { opacity: .8; }
.s3-hud { position: absolute; left: 14px; top: 12px; right: 14px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; text-shadow: 0 1px 6px rgba(0, 0, 0, .55); }
.s3-title b { display: block; font-size: clamp(16px, 2.4vw, 24px); }
.s3-title span { font-size: 12px; opacity: .9; }
.s3-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.s3-stats span { background: var(--s3-panel); border-radius: 9px; padding: 3px 9px; font-size: 12px; text-shadow: none; }
.s3-stats b { font-size: 15px; }
.s3-stats .s3-next { background: var(--s3-accent); color: #111; font-weight: 600; }
.s3-halt { position: absolute; right: 14px; bottom: 14px; max-width: 60%; display: flex; gap: 10px; align-items: center; background: var(--s3-panel); backdrop-filter: blur(6px); padding: 9px 14px; border-radius: 12px; border-left: 4px solid var(--s3-accent); }
.s3-halt i { font-style: normal; font-size: 22px; }
.s3-halt b { display: block; font-size: 16px; }
.s3-halt span { font-size: 12px; opacity: .9; }
.s3-sponsor { position: absolute; left: 14px; bottom: 14px; background: rgba(255, 255, 255, .92); color: #222; border-radius: 10px; padding: 6px 12px; font-size: 12px; font-weight: 600; }
.s3-cover { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 14, 22, .55); backdrop-filter: blur(3px); text-align: center; }
.s3-cover b { display: block; font-size: 16px; }
.s3-cover span { font-size: 12px; opacity: .8; }
.s3-profile { display: block; width: 100%; height: 90px; margin-top: 8px; cursor: pointer; }
.s3-bar { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.s3-bar input[type=range] { flex: 1; accent-color: var(--s3-accent); }
.s3-bar button, .s3-bar select { font: inherit; border-radius: 99px; border: 1px solid rgba(127, 127, 127, .45); padding: 6px 12px; background: transparent; color: inherit; cursor: pointer; }
.s3-bar select option { color: #111; }
.s3-play { min-width: 44px; background: var(--s3-accent) !important; color: #111 !important; border: 0 !important; font-weight: 700; }
.s3-bar select { min-width: 0; max-width: 42%; }
@media (max-width: 640px) {
  .s3-stage { aspect-ratio: 4 / 3; }
  .s3-hud { left: 10px; top: 8px; right: 10px; gap: 4px; }
  .s3-title span { display: none; }
  .s3-stats { gap: 4px; } .s3-stats span { font-size: 11px; padding: 2px 7px; } .s3-stats b { font-size: 13px; } .s3-stats .s3-next { display: none; }
  .s3-halt { left: 8px; right: 8px; bottom: 8px; max-width: none; padding: 6px 10px; gap: 8px; }
  .s3-halt i { font-size: 17px; } .s3-halt b { font-size: 14px; } .s3-halt span { font-size: 11px; }
  .s3-lab { font-size: 11px; } .s3-sponsor { display: none; }
  .s3-bar { gap: 6px; } .s3-bar button, .s3-bar select { padding: 6px 9px; font-size: 12px; }
}
.s3 [hidden] { display: none !important; }

/* Selbst fahren */
.s3-drive { background: var(--s3-panel) !important; }
.s3-drive-ui { position: absolute; inset: 0; pointer-events: none; }
.s3-speedo { position: absolute; right: 14px; top: 12px; min-width: 96px; text-align: center; background: var(--s3-panel); backdrop-filter: blur(6px); border-radius: 12px; padding: 6px 12px; border-bottom: 3px solid var(--s3-accent); }
.s3-speedo b { display: block; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.s3-speedo span { font-size: 11px; opacity: .8; }
.s3-warn { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); background: #c8402f; color: #fff; font-weight: 700; padding: 6px 14px; border-radius: 99px; }
.s3-pedals { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 12px; pointer-events: none; }
.s3-pedals button { pointer-events: auto; font: 600 13px/1 system-ui, sans-serif; color: #fff; border: 1px solid rgba(255,255,255,.35); background: var(--s3-panel); backdrop-filter: blur(6px); border-radius: 14px; padding: 16px 20px; touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; }
.s3-pedals .s3-gas { background: var(--s3-accent); color: #111; border: 0; padding: 22px 26px; }
.s3-pedals .s3-brake { padding: 22px 22px; }
.s3-pedals .s3-auto { align-self: center; border-radius: 99px; padding: 8px 14px; font-size: 12px; }
.s3-pedals .s3-auto[aria-pressed="true"] { background: var(--s3-accent); color: #111; }
.s3-keys { position: absolute; left: 50%; bottom: 74px; transform: translateX(-50%); margin: 0; font-size: 11px; opacity: .75; white-space: nowrap; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.s3-drive-ui ~ .s3-halt, .s3-stage:has(.s3-drive-ui) .s3-halt, .s3-stage:has(.s3-drive-ui) .s3-sponsor { display: none; }
@media (pointer: coarse) { .s3-keys { display: none; } }
.s3:has(.s3-drive-ui) .s3-play, .s3:has(.s3-drive-ui) .s3-t { display: none; }
.s3:has(.s3-drive-ui) .s3-bar { justify-content: flex-end; }
@media (max-width: 640px) {
  .s3-speedo { top: 8px; right: 8px; min-width: 64px; padding: 4px 8px; } .s3-speedo b { font-size: 22px; }
  .s3-stage:has(.s3-drive-ui) .s3-stats { display: none; }
  .s3-pedals { bottom: 8px; padding: 0 8px; } .s3-pedals button { padding: 12px 14px; } .s3-pedals .s3-gas { padding: 16px 20px; } .s3-pedals .s3-brake { padding: 16px 16px; }
}

/* Anhalten & Aussicht */
.s3-mid { display: flex; flex-direction: column; gap: 6px; align-items: center; align-self: center; }
.s3-pedals .s3-halt-b { border-radius: 99px; padding: 9px 14px; font-size: 12px; background: rgba(255,255,255,.9); color: #111; border: 0; }
.s3-peaks { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.s3-peak { position: absolute; left: 0; top: 0; white-space: nowrap; transform-origin: 0 0; text-shadow: 0 1px 3px rgba(0,0,0,.8); font-size: 12px; line-height: 1.15; padding-bottom: 14px; translate: -50% -100%; text-align: center; }
.s3-peak::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 1px; height: 12px; background: rgba(255,255,255,.8); }
.s3-peak b { display: block; font-weight: 600; }
.s3-peak span { font-size: 10px; opacity: .85; }
.s3-view-hint { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); background: var(--s3-panel); padding: 6px 12px; border-radius: 99px; font-size: 12px; }
@media (max-width: 640px) { .s3-peak { font-size: 10px; } .s3-peak span { display: none; } .s3-pedals .s3-halt-b { padding: 7px 10px; font-size: 11px; } }
.s3-reload { margin-top: 12px; font: 600 14px system-ui, sans-serif; padding: 10px 18px; border-radius: 99px; border: 0; background: var(--s3-accent); color: #111; cursor: pointer; }

/* Selbst lenken, Rückwärtsgang */
.s3-side { display: flex; gap: 8px; align-items: flex-end; pointer-events: none; }
.s3-side button { pointer-events: auto; }
.s3-pedals .s3-left, .s3-pedals .s3-right { padding: 18px 18px; font-size: 18px; }
.s3-row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.s3-pedals .s3-man, .s3-pedals .s3-rev { border-radius: 99px; padding: 8px 12px; font-size: 12px; }
.s3-pedals .s3-man[aria-pressed="true"], .s3-pedals .s3-rev[aria-pressed="true"] { background: var(--s3-accent); color: #111; }
.s3-gear { font-style: normal; font-weight: 700; }
.s3-keys { bottom: 96px; }
@media (max-width: 640px) {
  .s3-pedals .s3-left, .s3-pedals .s3-right { padding: 14px 12px; font-size: 15px; }
  .s3-pedals .s3-brake { padding: 14px 10px; } .s3-pedals .s3-gas { padding: 14px 14px; }
  .s3-side { gap: 5px; } .s3-pedals .s3-man, .s3-pedals .s3-rev, .s3-pedals .s3-auto { padding: 6px 8px; font-size: 10px; }
  .s3-pedals .s3-halt-b { padding: 6px 8px; font-size: 10px; }
}
@media (max-width: 640px) {
  .s3-pedals { flex-wrap: wrap; row-gap: 6px; }
  .s3-mid { order: -1; flex: 1 0 100%; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 5px; }
  .s3-row { flex-wrap: nowrap; gap: 5px; }
}

/* Aussicht: gehen, Drohne, Höhe */
.s3-ausbar { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); display: flex; gap: 6px; align-items: center; pointer-events: auto; background: var(--s3-panel); backdrop-filter: blur(6px); border-radius: 99px; padding: 5px 8px; }
.s3-ausbar button { font: 600 12px/1 system-ui, sans-serif; color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.35); border-radius: 99px; padding: 7px 11px; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.s3-ausbar button[aria-pressed="true"] { background: var(--s3-accent); color: #111; border-color: transparent; }
.s3-hoehe { font-size: 11px; opacity: .85; white-space: nowrap; }
.s3-hoehe:empty { display: none; }
.s3-stage:has(.s3-ausbar:not([hidden])) .s3-hud { display: none; }
@media (max-width: 640px) { .s3-ausbar { top: 6px; padding: 4px 6px; gap: 4px; } .s3-ausbar button { padding: 6px 8px; font-size: 11px; } }
.s3-ausbar button { white-space: nowrap; }
.s3-stage:has(.s3-ausbar:not([hidden])) .s3-speedo, .s3-stage:has(.s3-ausbar:not([hidden])) .s3-row, .s3-stage:has(.s3-ausbar:not([hidden])) .s3-keys { display: none; }

/* Fahrknöpfe: Pfeile statt Text; auf dem Handy feste Anordnung (Lenkung links nebeneinander, Bremse/Gas rechts nebeneinander) */
.s3-pedals .s3-gas, .s3-pedals .s3-brake { font-size: 20px; line-height: 1; min-width: 58px; }
@media (max-width: 640px) {
  .s3-pedals { display: grid; grid-template-columns: auto 1fr auto; align-items: end; row-gap: 6px; column-gap: 8px; }
  .s3-mid { grid-column: 1 / -1; grid-row: 1; order: 0; }
  .s3-pedals > .s3-side { grid-row: 2; flex-wrap: nowrap; gap: 6px; }
  .s3-pedals > .s3-side:first-child { grid-column: 1; }
  .s3-pedals > .s3-side:last-child { grid-column: 3; }
  .s3-pedals .s3-left, .s3-pedals .s3-right, .s3-pedals .s3-gas, .s3-pedals .s3-brake { width: 54px; height: 50px; min-width: 0; padding: 0; font-size: 18px; display: grid; place-items: center; }
  .s3-ausbar { z-index: 3; }
}
