/* =====================================================================
   Turbo Kart 8, Oberfläche im Stil von Mario Kart 8 Deluxe
   Schrift: M PLUS Rounded 1c (Rodin-ähnlich), schräge Ziffern mit Verlauf,
   helle Menütafeln, pulsierender gelber Cursor, runde Tastensymbole
   ===================================================================== */
@font-face { font-family: 'MPR'; font-weight: 700; src: url('../assets/fonts/mplus-rounded-700.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'MPR'; font-weight: 800; src: url('../assets/fonts/mplus-rounded-800.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'MPR'; font-weight: 900; src: url('../assets/fonts/mplus-rounded-900.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'MPR'; font-weight: 700; src: url('../assets/fonts/mplus-rounded-ext-700.woff2') format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF; font-display: swap; }
@font-face { font-family: 'MPR'; font-weight: 800; src: url('../assets/fonts/mplus-rounded-ext-800.woff2') format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF; font-display: swap; }
@font-face { font-family: 'MPR'; font-weight: 900; src: url('../assets/fonts/mplus-rounded-ext-900.woff2') format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF; font-display: swap; }

:root {
  --font: 'MPR', 'Arial Rounded MT Bold', 'Segoe UI', Arial, sans-serif;
  --ink: #0d1a3a;
  --txt: #2a2e3d;
  --sel: #ffd400;
  --sel2: #ff9800;
  --navy: #10265c;
  --panel: linear-gradient(180deg, #ffffff 0%, #eef5fc 55%, #d9e8f6 100%);
  --btn: linear-gradient(180deg, #ffffff 0%, #f1f4f8 55%, #dde3eb 100%);
  --gold: linear-gradient(180deg, #fff6a8 0%, #ffd22e 45%, #ff9f0a 100%);
  --silver: linear-gradient(180deg, #ffffff 0%, #d9e3ec 50%, #93a4b6 100%);
  --bronze: linear-gradient(180deg, #ffe0c2 0%, #f39a5b 50%, #b35a26 100%);
  --bluegrad: linear-gradient(180deg, #e2f7ff 0%, #6fd3ff 45%, #1f86e8 100%);
  --redgrad: linear-gradient(180deg, #ffe0dc 0%, #ff6a55 45%, #d41f1f 100%);
  --greengrad: linear-gradient(180deg, #eaffd8 0%, #7fe05a 45%, #25a13a 100%);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b1636; color: var(--txt); font-family: var(--font); font-weight: 800; user-select: none; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#hud { position: fixed; inset: 0; pointer-events: none; }
#flash { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
#flash.on { animation: flash 0.6s ease-out; }
@keyframes flash { 0% { opacity: 0.95; } 100% { opacity: 0; } }
#vignette { position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(ellipse at 62% 50%, rgba(8, 20, 60, 0) 30%, rgba(8, 20, 60, 0.7) 100%), linear-gradient(90deg, rgba(8, 26, 80, 0.55), rgba(8, 26, 80, 0) 50%); }
body.menu #vignette { opacity: 1; }

/* Schräge Schrift mit Verlauf + dicker Kontur (wie MK-Ziffern). JS setzt data-text = Textinhalt. */
.gt { position: relative; display: inline-block; transform: skewX(-9deg); color: transparent; }
.gt::before { content: attr(data-text); position: absolute; left: 0; top: 0; white-space: pre; color: var(--ink); -webkit-text-stroke: var(--st, 10px) var(--ink);
  text-shadow: 0 var(--sh, 5px) 0 var(--ink); }
.gt::after { content: attr(data-text); position: absolute; left: 0; top: 0; white-space: pre; color: transparent;
  background: var(--g, var(--gold)); -webkit-background-clip: text; background-clip: text; -webkit-text-stroke: calc(var(--st, 10px) * 0.22) rgba(255, 255, 255, 0.9); }

kbd { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 9px; margin: 0 2px; font-family: var(--font); font-weight: 900; font-size: 0.8em;
  color: #fff; background: #414b66; border-radius: 999px; box-shadow: inset 0 -3px 0 rgba(0,0,0,0.35), 0 0 0 2px rgba(255,255,255,0.85); }

/* ============ Bildschirme ============ */
#ui { position: fixed; inset: 0; pointer-events: none; }
.screen { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: safe center; gap: 18px;
  padding: 100px 32px 74px; overflow-y: auto; pointer-events: auto; }
.screen.active { display: flex; animation: screenIn 0.25s ease-out; }
@keyframes screenIn { from { opacity: 0; transform: scale(1.02); } to { opacity: 1; transform: none; } }
.screen.solid { background: radial-gradient(ellipse at 50% 40%, #1f4fa8 0%, #0b1636 75%); }
.screen.overlay { background: rgba(6, 16, 45, 0.55); }

.bar { position: absolute; top: 26px; left: 0; padding: 8px 54px 10px 36px; border-radius: 0 60px 60px 0;
  background: linear-gradient(180deg, #2a55b8 0%, #163579 60%, #0f2759 100%); box-shadow: 0 6px 18px rgba(0,0,0,0.4), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -4px 0 rgba(0,0,0,0.25); }
.bar::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 12px; background: linear-gradient(180deg, #fff17a, #ffc400); }
.bar h1 { margin: 0; font-weight: 900; font-size: clamp(24px, 3vw, 36px); color: #fff; letter-spacing: 0.5px; display: flex; align-items: center; gap: 14px;
  text-shadow: 0 3px 0 rgba(0,0,0,0.35); font-style: italic; }
.hints { position: fixed; bottom: 0; left: 0; right: 0; display: flex; justify-content: flex-end; align-items: center; gap: 28px; padding: 10px 30px; pointer-events: none; z-index: 2;
  background: linear-gradient(0deg, rgba(8, 20, 60, 0.9), rgba(8, 20, 60, 0.5)); color: #fff; font-size: 15px; font-weight: 900; }
.hints span:nth-child(2) kbd { background: #2fae3f; }
.hints span:nth-child(3) kbd { background: #d9342b; }

/* ============ Logo ============ */
.title-wrap { display: flex; flex-direction: column; align-items: center; margin-top: -30px; }
.logo { font-family: var(--font); font-weight: 900; font-size: clamp(34px, 11.5vw, 150px); line-height: 0.95; display: flex; align-items: center; gap: 0.12em; transform: rotate(-4deg); }
.logo span { display: inline-block; }
.logo .l1, .logo .l2 { --st: 0.12em; --sh: 0.067em; }
.logo .l1 { --g: var(--gold); }
.logo .l2 { --g: var(--redgrad); }
.logo .l3 { color: #fff; background: var(--bluegrad); border-radius: 50%; width: 1.2em; height: 1.2em; display: grid; place-items: center; font-size: 0.85em;
  box-shadow: 0 0 0 8px #fff, 0 0 0 16px var(--ink), 0 12px 0 16px var(--ink); -webkit-text-stroke: 8px var(--ink); paint-order: stroke fill; }
.logo.small { font-size: 58px; }
.logo.small .l1, .logo.small .l2 { --st: 10px; --sh: 6px; }
.logo.small .l3 { box-shadow: 0 0 0 5px #fff, 0 0 0 10px var(--ink); -webkit-text-stroke: 5px var(--ink); }
.subtitle { margin-top: 18px; font-weight: 900; font-size: 32px; letter-spacing: 14px; color: #fff; padding: 2px 18px 2px 32px; border-radius: 999px;
  background: var(--redgrad); box-shadow: 0 0 0 4px #fff, 0 0 0 8px var(--ink); transform: rotate(-4deg); text-shadow: 0 3px 0 rgba(0,0,0,0.3); font-style: italic; }
.press { margin-top: 44px; font-family: var(--font); font-weight: 900; font-size: 26px; color: #fff; background: none; border: 0; cursor: pointer;
  text-shadow: 0 3px 0 var(--ink), 0 0 12px rgba(0,0,0,0.5); animation: blink 1.4s ease-in-out infinite; }
.press kbd { font-size: 20px; height: 34px; min-width: 34px; }
@keyframes blink { 50% { opacity: 0.35; } }
.footer { position: absolute; bottom: 18px; color: rgba(255, 255, 255, 0.85); font-size: 13px; font-weight: 700; }

/* ============ Laden ============ */
.load-box { display: flex; flex-direction: column; align-items: center; gap: 34px; }
.load-bar { width: 440px; max-width: 80vw; height: 22px; border-radius: 999px; overflow: hidden; background: rgba(0,0,0,0.35); box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ink); }
.load-bar i { display: block; height: 100%; width: 0; transition: width 0.2s; background: repeating-linear-gradient(-45deg, #ffe45c 0 14px, #ffbf00 14px 28px); }
.load-txt { color: #fff; font-size: 16px; }
.load-tip { width: 560px; max-width: 86vw; display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,0.95); color: var(--navy);
  border-radius: 16px; padding: 10px 16px; box-shadow: 0 4px 0 rgba(0,0,0,0.25); font-weight: 800; font-size: 15px; line-height: 1.35; min-height: 48px; }
.load-tip b { flex: none; background: var(--redgrad); color: #fff; font-style: italic; padding: 3px 10px; border-radius: 10px; text-shadow: 0 2px 0 rgba(0,0,0,0.3); }

/* ============ Buttons ============ */
@keyframes cursorGlow {
  0%, 100% { box-shadow: 0 0 0 3px #fff, 0 0 0 7px var(--sel), 0 0 18px 6px rgba(255, 212, 0, 0.6), 0 6px 14px rgba(0,0,0,0.3); }
  50% { box-shadow: 0 0 0 3px #fff, 0 0 0 7px var(--sel2), 0 0 28px 10px rgba(255, 160, 0, 0.75), 0 6px 14px rgba(0,0,0,0.3); }
}
.btn { font-family: var(--font); font-weight: 900; font-size: 17px; color: var(--txt); background: var(--btn); border: 0; border-radius: 18px; padding: 11px 24px; cursor: pointer; outline: none;
  position: relative; box-shadow: 0 4px 0 rgba(15, 30, 70, 0.3), 0 6px 14px rgba(0, 0, 0, 0.25), inset 0 2px 0 #fff; transition: transform 0.1s ease-out; }
.btn:hover, .btn:focus-visible, .btn.focus { background: linear-gradient(180deg, #ffffff 0%, #fffbe0 100%); transform: scale(1.04); animation: cursorGlow 1.1s ease-in-out infinite; z-index: 1; }
.btn:active { transform: scale(0.98); }
.btn.big { font-size: 22px; padding: 13px 36px; }
.btn.tiny { font-size: 12px; padding: 4px 12px; border-radius: 10px; }
.btn.go { background: var(--greengrad); color: #fff; text-shadow: 0 2px 0 rgba(0, 60, 0, 0.45); }
.btn.go:hover, .btn.go:focus-visible { background: linear-gradient(180deg, #f2ffe6 0%, #93ec6c 45%, #2fb244 100%); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; animation: none; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg-btn { padding: 5px 14px; font-size: 14px; border-radius: 12px; box-shadow: 0 3px 0 rgba(15, 30, 70, 0.28), inset 0 2px 0 #fff; }
.seg-btn.active { background: linear-gradient(180deg, #7fd8ff 0%, #2f96f0 50%, #1767cf 100%); color: #fff; text-shadow: 0 2px 0 rgba(0,0,40,0.35); }
.row { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.ico { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; }
.ico svg, .ico img { width: 100%; height: 100%; }
.ico img, .desc-ico img { object-fit: contain; display: block; filter: drop-shadow(0 2px 1px rgba(10, 30, 70, 0.25)); }
select, input:not([type]), input[type="text"], .code-input {
  font-family: var(--font); font-weight: 900; font-size: 16px; padding: 7px 12px; border-radius: 12px; border: 0; background: #fff; color: var(--txt); outline: none;
  box-shadow: inset 0 0 0 2px #c3cedd, inset 0 3px 4px rgba(0,0,0,0.08); }
select:focus, input:focus { box-shadow: inset 0 0 0 3px var(--sel), 0 0 12px rgba(255,212,0,0.55); background: #fffdf0; }
.code-input { width: 124px; text-transform: uppercase; text-align: center; letter-spacing: 5px; }
.panel { background: var(--panel); border-radius: 26px; padding: 18px 22px; display: flex; flex-direction: column; gap: 12px; max-width: 95vw;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.6), 0 12px 30px rgba(0, 0, 0, 0.4); }
.panel h3 { margin: 0; font-weight: 900; font-size: 22px; display: flex; gap: 10px; align-items: center; color: var(--navy); font-style: italic; }
.panel h3 small { font-size: 13px; opacity: 0.6; font-style: normal; }

/* ============ Hauptmenü ============ */
.main-layout { display: flex; gap: 60px; align-items: center; width: min(1100px, 100%); justify-content: space-between; }
.menu-list { display: flex; flex-direction: column; gap: 13px; align-items: flex-start; }
.player-count { display: flex; align-items: center; gap: 12px; color: #fff; margin-bottom: 6px; text-shadow: 0 2px 4px rgba(0,0,0,0.6); }
.player-count .lbl { font-weight: 900; font-size: 20px; font-style: italic; }
.btn.item { display: flex; align-items: center; gap: 14px; width: 390px; padding: 9px 22px 9px 10px; border-radius: 22px; }
.btn.item b { font-weight: 900; font-size: 25px; color: var(--txt); font-style: italic; }
.btn.item .ico { width: 52px; height: 52px; border-radius: 50%; padding: 8px; background: linear-gradient(180deg, #e7f6ff, #b9dcf7); box-shadow: inset 0 -3px 0 rgba(0,0,0,0.12); }
.btn.item:hover, .btn.item:focus-visible { transform: scale(1.05) translateX(10px); }
.menu-small { display: flex; gap: 10px; margin-top: 8px; }
.small-item { display: flex; align-items: center; gap: 8px; font-size: 15px; padding: 7px 14px; }
.small-item .ico { width: 26px; height: 26px; }
.desc-card { width: 360px; background: var(--panel); border-radius: 28px; padding: 26px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.6), 0 12px 30px rgba(0, 0, 0, 0.4); }
.desc-ico { width: 120px; height: 120px; }
.desc-ico svg, .desc-ico img { width: 100%; height: 100%; }
.desc-card h2 { margin: 6px 0 0; font-weight: 900; font-size: 30px; color: var(--navy); font-style: italic; }
.desc-card p { margin: 0; font-size: 15px; line-height: 1.55; font-weight: 700; color: #3c4560; }

/* ============ Fahrerwahl ============ */
.char-layout { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; justify-content: center; }
.char-grid { display: grid; grid-template-columns: repeat(4, 104px); gap: 10px; padding: 12px; border-radius: 26px; background: rgba(8, 26, 80, 0.55); box-shadow: inset 0 0 0 3px rgba(255,255,255,0.25); }
.char-card { width: 104px; height: 120px; padding: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 18px;
  background: var(--c); background-image: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.5), rgba(255,255,255,0) 62%); }
.char-card:hover, .char-card:focus-visible { background: var(--c); background-image: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.6), rgba(255,255,255,0) 62%); }
.char-card img { position: absolute; inset: 0 0 24px 0; width: 100%; height: calc(100% - 24px); object-fit: cover; }
.char-card .nm { position: relative; background: rgba(10, 24, 64, 0.88); color: #fff; font-weight: 900; font-size: 15px; padding: 3px 0 4px; }
.char-card .cls { position: absolute; top: 5px; right: 6px; font-size: 10px; font-weight: 900; background: rgba(255,255,255,0.92); border-radius: 999px; padding: 0 6px; }
.char-card.sel { animation: cursorGlow 1.1s ease-in-out infinite; }
.char-card.sel .nm { background: var(--gold); color: var(--ink); }
.char-card.taken { filter: grayscale(1) brightness(0.65); }
.char-side { width: 560px; align-items: stretch; gap: 10px; padding: 14px 18px; }
.turntable { position: relative; border-radius: 18px; overflow: hidden; background: radial-gradient(ellipse at 50% 85%, #ffffff 0%, #d7ecff 40%, #7fb9ec 100%);
  box-shadow: inset 0 0 0 3px rgba(20, 40, 90, 0.15); }
#preview { width: 100%; height: 210px; display: block; }
.char-name { position: absolute; left: 14px; top: 8px; font-weight: 900; font-size: 32px; font-style: italic; color: #fff; text-shadow: 0 3px 0 rgba(10, 30, 80, 0.6), 0 0 10px rgba(0,0,0,0.25); }
.parts { display: flex; flex-direction: column; gap: 8px; }
.part-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; font-size: 14px; }
.part-row > span { font-weight: 900; font-size: 17px; min-width: 88px; color: var(--navy); font-style: italic; }
.part-row .seg { justify-content: flex-end; gap: 5px; }
.part-row .seg-btn { font-size: 12px; padding: 3px 8px; }
.part-row > span b { display: block; font-size: 12px; font-style: normal; color: #4c5a78; font-weight: 800; white-space: nowrap; }
.seg.tiles { flex-wrap: nowrap; gap: 4px; }
.part-tile { width: 56px; height: 40px; padding: 0; border: 0; border-radius: 9px; cursor: pointer; position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #e4eefa 100%); box-shadow: 0 2px 0 rgba(15, 30, 70, 0.25), inset 0 0 0 2px #c5d3e6; transition: transform 0.12s; }
.part-tile img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.part-tile:hover, .part-tile:focus-visible { transform: translateY(-2px); outline: none; box-shadow: 0 3px 0 rgba(15, 30, 70, 0.3), inset 0 0 0 3px #ffcf3a; }
.part-tile.active { background: linear-gradient(180deg, #bfeaff 0%, #6cc0ff 100%); box-shadow: 0 2px 0 rgba(15, 30, 70, 0.3), inset 0 0 0 3px #1767cf; }
.part-tile.active::after { content: ''; position: absolute; right: -3px; top: -3px; width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0 20%, #ffd54f 30%, #f2a900 100%); box-shadow: 0 1px 2px rgba(0,0,0,0.4); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 16px; font-size: 12px; font-weight: 900; }
.stat { display: grid; grid-template-columns: 104px 1fr; align-items: center; gap: 6px; }
.stat .bar6 { height: 14px; border-radius: 999px; background: #cfd9e6; overflow: hidden; position: relative; box-shadow: inset 0 2px 3px rgba(0,0,0,0.2); }
.stat .bar6 i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, #fff27a, #ffc107 60%, #ff9800); transition: width 0.25s; border-radius: 999px; }
.stat .bar6::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(16.66% - 2px), rgba(255,255,255,0.9) calc(16.66% - 2px) 16.66%); }

/* ============ Strecken ============ */
.course-top { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; align-items: center; }
.opts-inline { display: flex; gap: 12px; flex-wrap: wrap; }
.mirrored img[data-thumb] { transform: scaleX(-1); }
.seg-btn.mirror-btn { font-style: italic; }
.opts-inline label { display: flex; gap: 8px; align-items: center; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.6); font-size: 15px; font-weight: 900; }
.cups, .tracks { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; max-width: 1200px; }
.cup { width: 300px; padding: 14px 16px 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; border-radius: 26px; background: var(--panel); }
.cup img.trophy { width: 120px; height: 120px; object-fit: contain; }
.cup .cn { font-weight: 900; font-size: 26px; color: var(--navy); font-style: italic; display: flex; align-items: center; gap: 6px; }
.cup .cn img.em { width: 1.4em; height: 1.4em; object-fit: contain; filter: drop-shadow(0 2px 0 rgba(0,0,0,0.2)); }
.cup .ct { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; }
.cup .ct div { font-size: 11px; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.cup .ct img { width: 100%; height: 56px; object-fit: cover; display: block; }
.cup .ct span { display: block; padding: 2px 5px; }
.tracks { gap: 14px; max-width: 1230px; }
.track { width: 158px; padding: 0 0 9px; display: flex; flex-direction: column; align-items: stretch; gap: 3px; overflow: hidden; border-radius: 20px; }
.track .thumb { height: 92px; background: #0b1636; display: grid; place-items: center; overflow: hidden; flex: none; }
.track .thumb img, .track .thumb canvas { width: 100%; height: 100%; object-fit: cover; }
.track .tn { font-weight: 900; font-size: 15px; padding: 3px 8px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--navy); font-style: italic; }
.track small { font-size: 12px; opacity: 0.7; padding: 0 10px; }
.track .rec { font-size: 12px; color: #c62828; padding: 0 10px; }

/* ============ Online / Lobby ============ */
.online-panel { width: 640px; }
.field { display: flex; gap: 12px; align-items: center; font-weight: 900; font-size: 18px; color: var(--navy); }
.field input { flex: 1; }
.or { opacity: 0.6; }
.room-list { display: flex; flex-direction: column; gap: 6px; min-height: 60px; font-weight: 700; }
.room { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; padding: 7px 12px; border-radius: 14px; box-shadow: 0 2px 6px rgba(0,0,0,0.15); }
.status { color: #c62828; min-height: 20px; }
.lobby-layout { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.players { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
.lobby-players-panel { width: min(620px, 94vw); }
.players li { display: flex; align-items: center; gap: 8px; background: #fff; padding: 3px 8px 3px 3px; border-radius: 12px; box-shadow: 0 2px 5px rgba(0,0,0,0.15); min-width: 0; height: 44px; }
.players li.me { box-shadow: 0 0 0 3px #ffcf3a, 0 2px 5px rgba(0,0,0,0.15); }
.players li img { width: 38px; height: 38px; border-radius: 10px; background: var(--c); flex: none; }
.players li .pn { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.players li .pn b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.players li small { font-weight: 700; opacity: 0.65; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.players li.empty { background: rgba(255,255,255,0.45); box-shadow: inset 0 0 0 2px rgba(120,140,170,0.35); }
.players li.empty .pn b { color: #7d8aa3; font-weight: 800; font-size: 13px; font-style: italic; }
.players li .slot { width: 38px; height: 38px; border-radius: 10px; background: repeating-linear-gradient(45deg, #dfe6f0 0 6px, #eef2f7 6px 12px); flex: none; }
h3 .count { font-size: 14px; background: var(--navy); color: #fff; padding: 1px 9px; border-radius: 999px; font-style: normal; vertical-align: middle; }
.players .tag { margin-left: auto; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #cfd6e0; flex: none; }
.players .tag.ready { background: var(--greengrad); color: #fff; }
.players .tag.host { background: var(--gold); }
.code { background: #fff; color: var(--navy); padding: 0 14px; border-radius: 12px; letter-spacing: 6px; text-shadow: none; font-style: normal; box-shadow: inset 0 -3px 0 rgba(0,0,0,0.15); }
.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.settings label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 900; color: var(--navy); }
.settings select:disabled { opacity: 0.6; }
.chat { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.chat-log { height: 96px; overflow-y: auto; background: #fff; border-radius: 12px; padding: 6px 10px; font-size: 13px; font-weight: 700; color: #33405c;
  box-shadow: inset 0 0 0 2px #c5d3e6; line-height: 1.35; }
.chat-log em { color: #8a96ad; font-weight: 700; }
.chat-log b { color: var(--navy); }
.chat-log .me b { color: #1767cf; }
.chat-quick { display: flex; flex-wrap: wrap; gap: 5px; }
.chat-in { display: flex; gap: 6px; }
.chat-in input { flex: 1; min-width: 0; font-family: var(--font); font-weight: 700; font-size: 14px; padding: 6px 10px; border-radius: 10px; border: 2px solid #c5d3e6; }

/* ============ Ergebnisse (MK-Tabelle) ============ */
.res-layout { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; align-items: flex-start; }
.board { display: flex; flex-direction: column; gap: 5px; min-width: 440px; }
.board .cap { font-weight: 900; font-size: 22px; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.6); margin-bottom: 4px; font-style: italic; }
.rrow { display: grid; grid-template-columns: 54px 46px 1fr auto auto; align-items: center; gap: 10px; border-radius: 999px 18px 18px 999px; padding: 3px 16px 3px 3px;
  background: linear-gradient(180deg, #ffffff 0%, #e4f1fc 60%, #c9dff2 100%); box-shadow: 0 3px 8px rgba(0,0,0,0.3), inset 0 2px 0 #fff; animation: rowIn 0.35s backwards; }
.rrow .pl { font-weight: 900; font-size: 24px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-style: italic;
  background: linear-gradient(180deg, #5e7fb8, #2c4a86); text-shadow: 0 2px 0 rgba(0,0,0,0.35); }
.rrow.p1 .pl { background: var(--gold); color: #6b3c00; text-shadow: 0 1px 0 #fff6b0; }
.rrow.p2 .pl { background: var(--silver); color: #3a4656; text-shadow: 0 1px 0 #fff; }
.rrow.p3 .pl { background: var(--bronze); color: #fff; }
.rrow img { width: 42px; height: 42px; border-radius: 12px; background: var(--c); }
.rrow .nm { font-size: 17px; font-weight: 900; }
.rrow .tm { font-variant-numeric: tabular-nums; font-size: 15px; opacity: 0.75; }
.rrow .pt { font-weight: 900; font-size: 20px; min-width: 44px; text-align: right; color: var(--navy); }
.rrow .plus { color: #1f9e34; font-size: 15px; }
.rrow.me { background: linear-gradient(180deg, #fffbe0 0%, #ffe45c 60%, #ffc400 100%); }
@keyframes rowIn { from { opacity: 0; transform: translateX(-50px); } }

.podium { display: flex; align-items: flex-end; gap: 16px; height: 390px; }
.podium .step { width: 190px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.podium .step img.pt { width: 120px; height: 120px; border-radius: 22px; background: var(--c); box-shadow: 0 0 0 4px #fff, 0 6px 16px rgba(0,0,0,0.45); }
.podium .step img.tr { width: 84px; height: 84px; object-fit: contain; margin-top: -32px; filter: drop-shadow(0 4px 4px rgba(0,0,0,0.45)); }
.podium .block { width: 100%; border-radius: 16px 16px 0 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 8px;
  box-shadow: inset 0 -8px 0 rgba(0,0,0,0.15), inset 0 3px 0 rgba(255,255,255,0.6), 0 8px 20px rgba(0,0,0,0.4); }
.podium .block .gt { font-size: 62px; font-weight: 900; --st: 9px; --sh: 4px; }
.podium .s1 .block { height: 190px; background: linear-gradient(180deg, #fff3a0, #ffc400); }
.podium .s2 .block { height: 130px; background: linear-gradient(180deg, #ffffff, #b8c6d4); }
.podium .s3 .block { height: 90px; background: linear-gradient(180deg, #ffd2b0, #e0823f); }
.podium .who { font-weight: 900; font-size: 20px; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.7); margin: 8px 0; text-align: center; }
.podium-msg { width: 100%; text-align: center; font-weight: 900; font-size: 30px; color: #fff; text-shadow: 0 3px 6px rgba(0,0,0,0.6); font-style: italic; }

.pause-card { background: var(--panel); border-radius: 28px; padding: 20px 40px 28px; display: flex; flex-direction: column; gap: 14px; align-items: center;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.6), 0 12px 30px rgba(0, 0, 0, 0.45); }
.pause-card h2 { font-weight: 900; font-size: 40px; margin: 0 0 6px; color: var(--navy); font-style: italic; }
.pause-card .btn.item { width: 300px; justify-content: center; }
.options label { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-width: 400px; font-size: 17px; font-weight: 900; color: var(--navy); }
.options input[type="range"] { accent-color: #1f86e8; width: 200px; }
.options input[type="checkbox"] { accent-color: #1f86e8; width: 22px; height: 22px; }
.keys { border-collapse: collapse; font-size: 14px; }
.keys th, .keys td { border-bottom: 2px solid #d3deea; padding: 6px 10px; text-align: left; }
.keys th { font-weight: 900; font-size: 15px; color: var(--navy); }
.keys kbd { color: var(--txt); background: #fff; box-shadow: inset 0 -3px 0 rgba(0,0,0,0.15), 0 0 0 2px #b8c5d6; }
.tips { font-size: 14px; line-height: 1.65; max-width: 780px; font-weight: 700; }
.t-blue { color: #1e7be0; } .t-orange { color: #f07a00; } .t-purple { color: #a23ae0; }

/* ============ HUD ============ */
.hud-view { position: absolute; overflow: hidden; font-family: var(--font); font-weight: 900; --s: 1; color: #fff; }
.hud-view.small { --s: 0.62; }
.hud-view .gt { --st: calc(9px * var(--s)); --sh: calc(4px * var(--s)); }
.hud-item { position: absolute; left: calc(22px * var(--s)); top: calc(18px * var(--s)); width: calc(108px * var(--s)); height: calc(108px * var(--s)); border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(90, 110, 160, 0.75) 0%, rgba(20, 30, 60, 0.8) 70%);
  box-shadow: 0 0 0 calc(5px * var(--s)) #fff, 0 0 0 calc(9px * var(--s)) var(--ink), inset 0 calc(-4px * var(--s)) 0 rgba(0,0,0,0.3); display: grid; place-items: center; }
.hud-item::after { content: ''; position: absolute; right: calc(-34px * var(--s)); top: calc(-4px * var(--s)); width: calc(40px * var(--s)); height: calc(40px * var(--s)); border-radius: 50%;
  background: rgba(20, 30, 60, 0.7); box-shadow: 0 0 0 calc(3px * var(--s)) #fff, 0 0 0 calc(6px * var(--s)) var(--ink); }
.hud-item-inner { width: 76%; height: 76%; display: grid; place-items: center; }
.hud-item-inner img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 0 rgba(0,0,0,0.35)); }
.hud-item-inner.rolling img { filter: blur(1.5px); transform: scale(0.9); }
.hud-item-inner.got { animation: pop 0.3s; }
@keyframes pop { 0% { transform: scale(1.8); } 100% { transform: scale(1); } }
.hud-item-count { position: absolute; right: calc(-12px * var(--s)); bottom: calc(-10px * var(--s)); font-size: calc(28px * var(--s)); }
.hud-time { position: absolute; right: calc(20px * var(--s)); top: calc(14px * var(--s)); font-size: calc(30px * var(--s)); font-variant-numeric: tabular-nums; }
.hud-time .gt { --g: linear-gradient(180deg, #ffffff, #dfe9f5); }
.hud-bottom-left { position: absolute; left: calc(22px * var(--s)); bottom: calc(18px * var(--s)); display: flex; align-items: flex-end; gap: calc(22px * var(--s)); }
.hud-coins { display: flex; align-items: center; gap: calc(4px * var(--s)); font-size: calc(40px * var(--s)); }
.hud-coins img { width: calc(42px * var(--s)); height: calc(42px * var(--s)); filter: drop-shadow(0 3px 0 var(--ink)); }
.hud-coins .gt { --g: var(--gold); }
.hud-coins.max .gt { --g: linear-gradient(180deg, #fff, #ffe45c); }
.hud-lap { display: flex; align-items: baseline; gap: calc(6px * var(--s)); font-size: calc(40px * var(--s)); }
.hud-lap small { font-size: 0.42em; letter-spacing: 1px; color: #fff; text-shadow: 0 2px 0 var(--ink), 0 0 4px var(--ink); transform: skewX(-9deg); }
.hud-lap .gt { --g: linear-gradient(180deg, #ffffff, #cfe3f7); }
.hud-lap .ico { width: 1em; height: 1em; }
.hud-place { position: absolute; right: calc(28px * var(--s)); bottom: calc(4px * var(--s)); line-height: 1; transition: transform 0.15s; display: flex; align-items: baseline; }
.hud-place .gt.n { font-size: calc(136px * var(--s)); --st: calc(14px * var(--s)); --sh: calc(7px * var(--s)); }
.hud-place .gt.s { font-size: calc(50px * var(--s)); margin-left: calc(4px * var(--s)); }
.hud-place.p1 .gt { --g: var(--gold); } .hud-place.p2 .gt { --g: var(--silver); } .hud-place.p3 .gt { --g: var(--bronze); } .hud-place.p4 .gt { --g: var(--bluegrad); }
.hud-place.bump { transform: scale(1.25); }
.hud-map { position: absolute; right: calc(12px * var(--s)); top: 50%; transform: translateY(-50%); width: calc(200px * var(--s)); height: calc(200px * var(--s)); }
.hud-msg { position: absolute; left: 0; right: 0; top: 28%; text-align: center; opacity: 0; transform: scale(0.4); transition: opacity 0.2s, transform 0.2s; }
.hud-msg .gt { font-size: calc(104px * var(--s)); --st: calc(14px * var(--s)); --sh: calc(7px * var(--s)); }
.hud-msg.show { opacity: 1; transform: scale(1); }
.hud-msg.count .gt { font-size: calc(170px * var(--s)); --g: var(--gold); }
.hud-msg.go .gt { font-size: calc(170px * var(--s)); --g: var(--greengrad); }
.hud-msg.final .gt { --g: var(--redgrad); }
.hud-msg.lap .gt { --g: var(--bluegrad); }
.hud-msg.finish .gt { font-size: calc(140px * var(--s)); --g: var(--gold); }
.hud-sub { position: absolute; left: 0; right: 0; top: 55%; text-align: center; opacity: 0; transition: opacity 0.2s; }
.hud-sub .gt { font-size: calc(34px * var(--s)); --g: linear-gradient(180deg, #ffffff, #ffe27a); }
.hud-sub.show { opacity: 1; }
.hud-hint { position: absolute; left: 50%; bottom: calc(26px * var(--s)); transform: translate(-50%, 10px); opacity: 0; transition: opacity 0.3s, transform 0.3s;
  background: rgba(10, 22, 58, 0.72); color: #fff; font-weight: 800; font-size: calc(17px * var(--s)); padding: calc(6px * var(--s)) calc(14px * var(--s));
  border-radius: 999px; white-space: nowrap; pointer-events: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35); }
.hud-hint kbd { font-size: 0.85em; height: 1.6em; min-width: 1.6em; }
.hud-hint.show { opacity: 1; transform: translate(-50%, 0); }
.hud-wrong { position: absolute; left: 0; right: 0; top: 17%; text-align: center; display: none; animation: blink 0.6s infinite; }
.hud-wrong .gt { font-size: calc(46px * var(--s)); --g: var(--redgrad); }
.hud-wrong.show { display: block; }
.hud-back { position: absolute; left: 0; right: 0; bottom: calc(22px * var(--s)); text-align: center; display: none; font-size: calc(24px * var(--s)); }
.hud-back.show { display: block; }
.hud-player { position: absolute; left: 50%; top: calc(10px * var(--s)); transform: translateX(-50%); font-size: calc(22px * var(--s)); background: var(--bluegrad); padding: 0 16px; border-radius: 999px;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ink); text-shadow: 0 2px 0 var(--ink); font-style: italic; }
.hud-player:empty { display: none; }
.hud-speed { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.25s;
  background: repeating-conic-gradient(from 0deg at 50% 55%, rgba(255,255,255,0.0) 0deg 4deg, rgba(255,255,255,0.12) 4deg 4.5deg);
  -webkit-mask: radial-gradient(ellipse at 50% 55%, transparent 38%, #000 75%); mask: radial-gradient(ellipse at 50% 55%, transparent 38%, #000 75%); }
.hud-speed.on { opacity: 1; animation: speedlines 0.25s linear infinite; }
@keyframes speedlines { 50% { transform: scale(1.03); } }

#fps { position: fixed; left: 50%; bottom: 4px; transform: translateX(-50%); font: 12px monospace; color: #0f0; pointer-events: none; text-shadow: 1px 1px 0 #000; }
#toast { position: fixed; left: 50%; top: 24px; transform: translateX(-50%); background: var(--panel); border-radius: 999px; padding: 9px 22px; font-weight: 900; color: var(--navy);
  box-shadow: 0 0 0 3px #fff, 0 8px 20px rgba(0,0,0,0.35); display: none; z-index: 10; pointer-events: none; }
#toast.show { display: block; }

#touch { position: fixed; inset: auto 0 0 0; height: 45vh; display: none; pointer-events: none; z-index: 5; }
#touch.show { display: block; }
#touch button { pointer-events: auto; font-family: var(--font); font-weight: 900; color: #fff; background: rgba(15, 30, 70, 0.45); border: 4px solid rgba(255,255,255,0.85); border-radius: 50%; touch-action: none; user-select: none; -webkit-user-select: none; }
#touch button.on { background: rgba(255, 212, 0, 0.75); color: var(--ink); }
#touch .t-left { position: absolute; left: 14px; bottom: 24px; display: flex; gap: 14px; }
#touch .t-left button { width: 84px; height: 84px; font-size: 34px; }
#touch .t-right { position: absolute; right: 14px; bottom: 20px; width: 220px; height: 220px; }
#touch .t-right button { position: absolute; width: 78px; height: 78px; font-size: 15px; }
#touch .t-drift { right: 0; bottom: 60px; width: 96px !important; height: 96px !important; }
#touch .t-item { right: 110px; bottom: 120px; }
#touch .t-brake { right: 110px; bottom: 10px; font-size: 26px !important; }
#touch .t-pause { right: 10px; bottom: 170px; width: 52px !important; height: 52px !important; }
/* Neigungssteuerung aktiv: Pfeiltasten ausblenden */
body.tilt-on #touch .t-left { display: none; }

@media (max-width: 900px) {
  .main-layout { flex-direction: column; gap: 20px; }
  .desc-card { display: none; }
  .btn.item { width: min(390px, 86vw); }
  .btn.item b { font-size: 21px; }
  .char-grid { grid-template-columns: repeat(4, 76px); }
  .char-card { width: 76px; height: 92px; }
  .char-side { width: min(560px, 92vw); }
  .board { min-width: 0; width: 92vw; }
  .hints { display: none; }
}

/* Titelkarte der Strecke im Intro */
.intro-card { position: absolute; left: 0; bottom: 60px; padding: 14px 70px 16px 40px; border-radius: 0 80px 80px 0; color: #fff; font-family: var(--font); font-weight: 900;
  background: linear-gradient(180deg, #2a55b8 0%, #163579 60%, #0f2759 100%); box-shadow: 0 8px 24px rgba(0,0,0,0.45), inset 0 2px 0 rgba(255,255,255,0.25);
  display: flex; flex-direction: column; gap: 2px; animation: cardIn 0.5s cubic-bezier(.2,1.4,.4,1) both; pointer-events: none; }
.intro-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 14px; background: linear-gradient(180deg, #fff17a, #ffc400); }
.intro-card small { font-size: 18px; opacity: 0.9; font-style: italic; }
.intro-card b { font-size: 46px; font-style: italic; text-shadow: 0 3px 0 rgba(0,0,0,0.35); }
.intro-card i { font-size: 13px; opacity: 0.65; font-style: normal; }
.intro-card.out { animation: cardOut 0.4s ease-in both; }
@keyframes cardIn { from { transform: translateX(-110%); } to { transform: none; } }
@keyframes cardOut { to { transform: translateX(-110%); opacity: 0; } }
.stand-list { position: relative; }
.stand-list .rrow { position: absolute; left: 0; right: 0; transition: top 0.7s cubic-bezier(.3,1.2,.4,1); }
.stand-list .rrow.moved .pt { animation: ptPop 0.7s; }
@keyframes ptPop { 30% { transform: scale(1.35); color: #1f9e34; } }

/* Siegerehrung: 3D-Szene im Hintergrund, Namensschilder unten */
#screen-podium { justify-content: flex-end; padding-bottom: 40px; }
.podium { height: auto; align-items: stretch; gap: 18px; flex-wrap: wrap; justify-content: center; }
.plate { display: grid; grid-template-columns: 58px 64px 1fr 60px; align-items: center; gap: 10px; min-width: 300px; padding: 6px 14px 6px 8px; border-radius: 999px 22px 22px 999px;
  background: var(--panel); box-shadow: 0 0 0 4px rgba(255,255,255,0.7), 0 10px 26px rgba(0,0,0,0.4); animation: rowIn 0.5s backwards; }
.plate.p1 { order: 2; transform: translateY(-14px) scale(1.08); background: linear-gradient(180deg, #fffbe0 0%, #ffe45c 60%, #ffc400 100%); animation-delay: 0.6s; }
.plate.p2 { order: 1; animation-delay: 0.3s; }
.plate.p3 { order: 3; animation-delay: 0s; }
.plate .pn .gt { font-size: 52px; --st: 9px; --sh: 4px; }
.plate img.pt { width: 60px; height: 60px; border-radius: 16px; background: var(--c); box-shadow: 0 0 0 3px #fff; }
.plate .who { font-weight: 900; font-size: 20px; color: var(--navy); display: flex; flex-direction: column; font-style: italic; }
.plate .who small { font-size: 13px; opacity: 0.7; font-style: normal; }
.plate img.tr { width: 56px; height: 56px; object-fit: contain; }
/* Pfeil-Symbole (CSS, unabhängig von der Schrift) */
.ar { display: inline-block; width: 0; height: 0; border: 5px solid transparent; vertical-align: middle; margin: 0 1px; }
.ar-u { border-bottom: 8px solid currentColor; border-top-width: 0; }
.ar-d { border-top: 8px solid currentColor; border-bottom-width: 0; }
.ar-l { border-right: 8px solid currentColor; border-left-width: 0; }
.ar-r { border-left: 8px solid currentColor; border-right-width: 0; }
.ar.big { border-width: 14px; }
.ar-u.big { border-bottom-width: 22px; border-top-width: 0; }
.ar-d.big { border-top-width: 22px; border-bottom-width: 0; }
.ar-l.big { border-right-width: 22px; border-left-width: 0; }
.ar-r.big { border-left-width: 22px; border-right-width: 0; }
.controls-panel { gap: 8px; padding: 14px 20px; }
.controls-panel .keys th, .controls-panel .keys td { padding: 4px 10px; }
.controls-panel .tips { font-size: 13px; line-height: 1.5; margin: 4px 0; }

/* ============ Handy & Touch ============ */
body:not(.touch) .t-only, body.touch .k-only { display: none; }
#rotate-hint { position: fixed; left: 50%; top: 24%; transform: translateX(-50%); z-index: 6; display: none; pointer-events: none; white-space: nowrap;
  background: rgba(10, 22, 58, 0.75); color: #fff; font-weight: 800; font-size: 13px; padding: 5px 12px; border-radius: 999px; box-shadow: 0 0 0 2px rgba(255,255,255,0.35);
  animation: hintOut 0.6s 6s forwards; }
@keyframes hintOut { to { opacity: 0; } }
@media (orientation: portrait) { body.touch-race #rotate-hint { display: block; } }

/* Touch-Tasten im Rennen: HUD-Elemente aus dem Weg räumen */
body.touch-race .hud-bottom-left { bottom: auto; top: calc(142px * var(--s)); }
body.touch-race .hud-place { bottom: auto; top: calc(46px * var(--s)); right: calc(18px * var(--s)); }
body.touch-race .hud-place .gt.n { font-size: calc(110px * var(--s)); }
body.touch-race .hud-map { right: auto; left: calc(14px * var(--s)); top: calc(200px * var(--s)); transform: none; width: calc(170px * var(--s)); height: calc(170px * var(--s)); }
body.touch-race .intro-card { bottom: auto; top: 30%; }

/* Hochkant (schmale Handys) */
@media (max-width: 600px) {
  .screen { padding: 84px 14px 24px; gap: 14px; }
  .bar { top: 14px; padding: 6px 30px 8px 24px; }
  .subtitle { font-size: 22px; letter-spacing: 8px; }
  .press { font-size: 20px; margin-top: 30px; }
  .footer { left: 14px; right: 14px; text-align: center; font-size: 11px; }
  .main-layout { align-items: stretch; }
  .menu-list { align-items: stretch; width: 100%; }
  .btn.item { width: 100%; }
  .btn.item:hover, .btn.item:focus-visible { transform: scale(1.02); }
  .menu-small { flex-wrap: wrap; justify-content: center; }
  .player-count { justify-content: center; }
  .char-grid { grid-template-columns: repeat(4, 1fr); width: 100%; gap: 6px; padding: 8px; }
  .char-card { width: auto; height: 84px; }
  .char-side { width: 100%; padding: 10px 12px; }
  #preview { height: 150px; }
  .part-row { flex-direction: column; align-items: stretch; gap: 4px; }
  .part-row > span { display: flex; gap: 8px; align-items: baseline; }
  .seg.tiles { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
  #seg-wheel.tiles, #seg-glider.tiles { grid-template-columns: repeat(7, 1fr); }
  .part-tile { width: auto; height: auto; aspect-ratio: 1.4; }
  .stats { grid-template-columns: 1fr; }
  .cup { width: 100%; }
  .track { width: calc(50% - 9px); }
  .track .thumb { height: 90px; }
  .players { grid-template-columns: 1fr; }
  .plate { min-width: 0; width: 100%; }
  .load-tip { font-size: 13px; }
  .intro-card { max-width: 94vw; padding: 8px 30px 10px 22px; }
  .intro-card small { font-size: 13px; }
  .intro-card b { font-size: 26px; }
}

/* Quer auf dem Handy (wenig Höhe) */
@media (max-height: 500px) {
  .screen { padding: 62px 16px 12px; gap: 10px; }
  .bar { top: 8px; padding: 4px 34px 6px 26px; }
  .bar h1 { font-size: 22px; }
  .hints { display: none; }
  .title-wrap { margin-top: 0; }
  .subtitle { font-size: 20px; letter-spacing: 8px; margin-top: 10px; }
  .press { margin-top: 18px; font-size: 20px; }
  .footer { bottom: 8px; font-size: 11px; }
  .main-layout { flex-direction: row; gap: 18px; align-items: center; justify-content: center; }
  .menu-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: stretch; }
  .player-count, .menu-small { grid-column: 1 / -1; margin: 0; }
  .menu-small { margin-top: 2px; justify-content: flex-start; }
  .btn.item { width: auto; min-width: 0; padding: 5px 14px 5px 6px; gap: 10px; border-radius: 18px; }
  .btn.item b { font-size: 18px; }
  .btn.item .ico { width: 38px; height: 38px; padding: 6px; }
  .btn.item:hover, .btn.item:focus-visible { transform: scale(1.03); }
  .desc-card { display: flex; width: 230px; padding: 14px; gap: 4px; }
  .desc-ico { width: 64px; height: 64px; }
  .desc-card h2 { font-size: 20px; }
  .desc-card p { font-size: 12px; line-height: 1.4; }
  .char-layout { flex-wrap: nowrap; gap: 12px; }
  .char-grid { grid-template-columns: repeat(4, 64px); gap: 6px; padding: 8px; }
  .char-card { width: 64px; height: 76px; }
  .char-card .nm { font-size: 12px; padding: 2px 0 3px; }
  .char-card img { inset: 0 0 19px 0; height: calc(100% - 19px); }
  .char-side { width: min(460px, 56vw); padding: 8px 12px; gap: 6px; }
  #preview { height: 78px; }
  .char-name { font-size: 20px; top: 4px; }
  .parts { gap: 4px; }
  .part-row > span { font-size: 13px; min-width: 70px; }
  .part-row > span b { font-size: 10px; }
  .part-tile { width: 40px; height: 28px; }
  .stats { gap: 1px 12px; font-size: 10px; }
  .stat { grid-template-columns: 90px 1fr; }
  .stat .bar6 { height: 10px; }
  #char-ok { padding: 6px; font-size: 18px; }
  .cup { width: 250px; padding: 10px 12px 12px; gap: 4px; }
  .cup img.trophy { width: 60px; height: 60px; }
  .cup .cn { font-size: 20px; }
  .cup .ct img { height: 40px; }
  .track { width: 140px; }
  .track .thumb { height: 70px; }
  .track .tn { font-size: 12px; white-space: normal; padding: 2px 6px 0; }
  .track small { font-size: 10px; padding: 0 6px; }
  .intro-card { padding: 8px 40px 10px 26px; }
  .intro-card small { font-size: 13px; }
  .intro-card b { font-size: 28px; }
  .load-box { gap: 16px; }
  .logo.small { font-size: 40px; }
}
