html, body { margin: 0; height: 100%; overflow: hidden; background: #000; color: #fff; font: 13px system-ui, sans-serif; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; overscroll-behavior: none; }
[hidden] { display: none !important; }
#app, #app canvas { position: fixed; inset: 0; display: block; }
#touch { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 5; }
pre, #modus, #stumm, #banner, #quelle { text-shadow: 0 0 3px #000, 0 0 3px #000, 0 1px 2px #000; pointer-events: none; margin: 0; font-family: system-ui, sans-serif; }
#hud { position: fixed; left: calc(16px + env(safe-area-inset-left)); top: calc(12px + env(safe-area-inset-top)); font-size: 20px; line-height: 1.3; z-index: 3; }
#modus { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); font-size: 22px; color: #ffbf33; z-index: 3; }
#karte { position: fixed; right: calc(16px + env(safe-area-inset-right)); bottom: 58px; z-index: 3; pointer-events: none; }
#hilfe { position: fixed; left: 12px; bottom: 10px; font-size: 13px; line-height: 1.4; z-index: 3; }
#quelle { position: fixed; right: 12px; bottom: 10px; font-size: 13px; z-index: 3; }
#quelle a { color: #fff; pointer-events: auto; }
#quelle span { display: block; text-align: right; }
#stumm { position: fixed; right: 12px; bottom: 46px; font-size: 15px; z-index: 3; }
#banner { position: fixed; left: 50%; top: 130px; transform: translateX(-50%); font-size: 34px; text-align: center; white-space: nowrap; opacity: 0; transition: opacity .3s; z-index: 4; }
#blitz { position: fixed; inset: 0; opacity: 0; pointer-events: none; z-index: 2; }
#laden { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #15181c; z-index: 10; padding: 24px; text-align: center; }
#laden h1 { margin: 0 0 8px; font-size: 30px; font-weight: 600; }
#laden p { margin: 0; color: #bbb; font-size: 15px; }
#drehen { display: none; position: fixed; inset: 0; align-items: center; justify-content: center; background: rgba(0, 0, 0, .78); font-size: 20px; z-index: 8; pointer-events: none; }

#renninfo { position: fixed; right: calc(16px + env(safe-area-inset-right)); top: calc(12px + env(safe-area-inset-top)); font-size: 24px; text-align: right; z-index: 3; }
#rennmitte { position: fixed; left: 50%; top: 120px; transform: translateX(-50%); font-size: 56px; text-align: center; z-index: 4; }
#rennmenue { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .45); z-index: 9; padding: 16px; }
#rennmenue > div { width: min(1000px, 100%); max-height: 100%; overflow: auto; background: #20242a; border-radius: 10px; padding: 18px; box-sizing: border-box; touch-action: pan-y; }
#rennmenue h2 { margin: 0 0 12px; font-size: 26px; font-weight: 600; text-align: center; }
#rennmenue p { color: #bbb; font-size: 16px; }
#rennliste button { display: block; width: 100%; min-height: 58px; margin-top: 10px; font: 20px system-ui, sans-serif; color: #fff; background: #3a4048; border: 0; border-radius: 8px; cursor: pointer; touch-action: manipulation; }
#rennliste button:active { background: #55606c; }
#rennspalten { display: flex; gap: 18px; align-items: flex-start; }
#rennliste { flex: 1; min-width: 0; }
#rennliste button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 6px 12px; }
#rennliste button img { width: 46px; height: 46px; flex: none; border-radius: 4px; }
#rennliste button.gewaehlt { color: #74ff8c; outline: 2px solid #74ff8c; }
#rennvorschau { width: 340px; flex: none; margin-top: 10px; }
#rennvorschau img { display: block; width: 100%; aspect-ratio: 1; border-radius: 8px; background: #2c3138; }
#rennvorschau p { color: #fff; font-size: 19px; white-space: pre-line; margin: 10px 0; }
#rennvorschau button { display: block; width: 100%; min-height: 58px; font: 22px system-ui, sans-serif; color: #fff; background: #2f7a44; border: 0; border-radius: 8px; cursor: pointer; touch-action: manipulation; }
@media (max-width: 700px) { #rennspalten { flex-direction: column-reverse; } #rennvorschau { width: 100%; } #rennvorschau img { width: min(100%, 300px); margin: 0 auto; } }

.mobil #hilfe { display: none; }
.mobil #hud { font-size: 14px; left: calc(10px + env(safe-area-inset-left)); top: calc(6px + env(safe-area-inset-top)); line-height: 1.25; }
.mobil #karte { left: calc(10px + env(safe-area-inset-left)); right: auto; top: calc(78px + env(safe-area-inset-top)); bottom: auto; }
.mobil #modus { top: 70px; font-size: 18px; }
.mobil #stumm { right: auto; left: 50%; bottom: auto; top: 62px; transform: translateX(-50%); font-size: 13px; }
.mobil #quelle { font-size: 9px; right: 8px; bottom: 2px; }
.mobil #quelle span { display: inline; }
.mobil #quelle span + span::before { content: ' · '; }
.mobil #stumm { display: none; }   /* steht auf der Taste unter „Mehr“ */
.mobil #banner { font-size: 20px; top: 90px; }
.mobil #renninfo { font-size: 14px; top: calc(62px + env(safe-area-inset-top)); }
.mobil #rennmitte { font-size: 36px; top: 90px; }
.hochkant #drehen { display: flex; }

#rennbestenliste { margin: 10px 0; font: 15px/1.5 ui-monospace, Menlo, monospace; color: #ddd; white-space: pre; overflow-x: auto; text-shadow: none; pointer-events: auto; }
#namensdialog { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .55); z-index: 10; padding: 16px; }
#namensdialog[hidden] { display: none; }
#namensdialog form { width: min(460px, 100%); background: #20242a; border-radius: 10px; padding: 18px; box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; font-family: system-ui, sans-serif; }
#namensdialog h2 { margin: 0; font-size: 22px; font-weight: 600; }
#namensdialog label { color: #bbb; font-size: 14px; line-height: 1.4; }
#namensdialog input { font: 20px system-ui, sans-serif; padding: 10px; border-radius: 8px; border: 1px solid #55606c; background: #111418; color: #fff; }
#namensdialog p { margin: 0; min-height: 1.2em; color: #ff9c8f; font-size: 14px; }
#namensdialog form > div { display: flex; gap: 10px; flex-wrap: wrap; }
#namensdialog button { flex: 1 1 auto; min-height: 48px; font: 18px system-ui, sans-serif; color: #fff; background: #3a4048; border: 0; border-radius: 8px; cursor: pointer; }
#namensdialog button[type="submit"] { background: #2f8f4e; }
