/* Меню «Бешеных горок» (700 x 372) — вид из кабины. Сверху лобовое стекло: в нём едет твоя машина по твоей трассе,
   на зеркале заднего вида — название. Снизу приборная панель: тахометр «Поехали», датчики мощи и дальности, клавиши. */
.dm { --amber: #ffb21a; --red: #ff3f50;
  --profile-top: 8px; --avatar-size: 38px; --dash-bottom-padding: 10px; --dash-key-height: 68px;
  position: absolute; inset: 0; overflow: hidden; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; font-weight: 800; color: #fff; }
.dm button { font: inherit; color: inherit; padding: 0; border: 0; background: none; }
.dm button * { pointer-events: none; }
.dm-bg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
/* стекло: тёмные стойки по краям и блик */
.dm-glass { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .13) 38%, rgba(255, 255, 255, 0) 46%),
    linear-gradient(90deg, #0d0e12 0, #0d0e12 8px, rgba(13, 14, 18, 0) 34px, rgba(13, 14, 18, 0) calc(100% - 34px), #0d0e12 calc(100% - 8px));
  box-shadow: inset 0 26px 30px -18px rgba(0, 0, 0, .7); }
/* верх: профиль, зеркало, счётчики */
.dm-top { position: absolute; left: 14px; right: 14px; top: var(--profile-top); height: 50px; display: flex; align-items: flex-start; justify-content: space-between; }
.dm .dm-me { width: 200px; text-align: left; display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 26px;
  background: linear-gradient(155deg, #345c80, #172c48 48%, #0c192c); border: 2px solid #5a83a4;
  box-shadow: inset 0 1px 0 #dbf1ff77, inset 0 -3px 0 #0a1528a0, 0 3px 0 #0a1525, 0 5px 9px #07132075; }
.dm-me:active { transform: translateY(2px); }
.dm-ava { position: relative; width: var(--avatar-size); height: var(--avatar-size); flex-shrink: 0; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 36% 20%, #ffb06e, #d75228 56%, #88201b); border: 2px solid #ffc376;
  box-shadow: inset 0 1px 0 #ffe9caa0, 0 0 0 2px #0b1728, 0 2px 4px #02070f; font-size: 19px; font-weight: 900; text-shadow: 0 1px 2px #000; }
.dm-ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dm-mev { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dm-mev span { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-mev small { font-size: 10px; color: #bad9ed; font-weight: 700; } .dm-mev em { font-style: normal; color: var(--amber); font-weight: 900; }
.dm-xp { display: block; height: 5px; border-radius: 3px; background: #080f1d; box-shadow: inset 0 1px 2px #000, 0 1px 0 #8ab9de45; overflow: hidden; }
.dm-xp b { display: block; height: 100%; background: linear-gradient(90deg, #ffd23a, var(--amber)); transform-origin: 0 50%; transform: scaleX(0); }
.dm-cnts { width: 200px; display: flex; gap: 6px; justify-content: flex-end; }
.dm .dm-cnt { --cnt-face: #554029; --cnt-edge: #b78b52; --cnt-value: #ffe3a5;
  position: relative; height: 36px; padding: 0 10px 0 6px; display: flex; align-items: center; gap: 5px; border-radius: 11px;
  background: linear-gradient(154deg, var(--cnt-face), #15263a 80%); border: 2px solid var(--cnt-edge);
  box-shadow: inset 0 1px 0 #f3faff6a, inset 0 -3px 0 #0813229c, 0 3px 0 #081322, 0 5px 9px #0713227d;
  font-size: 15px; font-variant-numeric: tabular-nums; color: var(--cnt-value); text-shadow: 0 1px 2px #000; }
.dm .dm-cnt[data-act="road"] { --cnt-face: #254b68; --cnt-edge: #6ba7c7; --cnt-value: #c2f2ff; }
.dm-cnt svg { filter: drop-shadow(0 2px 2px #070e18); }
.dm-cnt:active { transform: translateY(2px); }
.sbadge { position: absolute; right: -6px; top: -7px; width: 18px; height: 18px; border-radius: 9px; background: var(--red); border: 2px solid #fff; color: #fff; font-style: normal;
  font-size: 11px; display: none; align-items: center; justify-content: center; text-shadow: none; }
/* навигатор: куда едем */
.dm-nav { position: absolute; left: 50%; top: 62px; transform: translateX(-50%); display: flex; align-items: center; gap: 7px; white-space: nowrap; padding: 4px 12px; border-radius: 14px;
  background: rgba(14, 16, 21, .72); font-size: 13px; }
.dm-nav span { color: #8fa0b5; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; }
.dm-nav b { color: #fff; } .dm-nav i { font-style: normal; color: #9fe3ff; font-size: 11px; }
.dm-nav em { font-style: normal; display: none; padding: 1px 7px; border-radius: 8px; background: linear-gradient(#ff7ac8, #c41a7a); font-size: 11px; }
.dm-nav em.on { display: inline-block; }
/* Между нижним краем аватара с учётом рамки и отступа профиля и верхом клавиши «Гараж». */
.dm-side { --side-button-size: 38px; position: absolute; z-index: 3; left: 16px;
  top: calc(var(--profile-top) + 6px + var(--avatar-size)); bottom: calc(var(--dash-bottom-padding) + var(--dash-key-height));
  display: grid; grid-template-columns: repeat(2, var(--side-button-size)); align-content: center; gap: 7px; pointer-events: none; }
.dm .dm-sb { position: relative; width: var(--side-button-size); height: var(--side-button-size); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; pointer-events: auto;
  color: #e5f6ff; background: radial-gradient(ellipse at 37% 8%, #75c5ff, #398be1 42%, #2055a2 77%, #153b77);
  border: 2px solid #133869; box-shadow: inset 0 1px 2px #b5e7ffae, inset 0 -3px 5px #1335659c, 0 3px 0 #10284c, 0 4px 7px #0a182a80; }
.dm-sb::before { content: ""; position: absolute; top: 3px; left: 8px; right: 8px; height: 6px; border-radius: 50%;
  background: linear-gradient(#dcf6ff80, #dcf6ff08); pointer-events: none; }
.dm-sb svg { filter: drop-shadow(0 1px 1px #133869); }
.dm-sb.off { opacity: .45; }
.dm-sb:active { transform: translateY(2px) scale(.97); }
/* приборная панель */
.dm-dash { position: absolute; left: 0; right: 0; bottom: 0; height: 112px; padding: 0 14px var(--dash-bottom-padding); display: flex; align-items: flex-end; justify-content: space-between;
  background: radial-gradient(ellipse at 50% 0%, #314963, #14263a 52%, #081422 92%);
  border-top: 3px solid #385871; box-shadow: inset 0 2px 0 #7fa7c760, inset 0 -9px 16px #040a15bb, 0 -3px 0 #0b1726, 0 -10px 20px #06101970;
  border-radius: 40% 40% 0 0 / 22px 22px 0 0; }
.dm-dash::before { content: ""; position: absolute; inset: 8px 14px 6px; border-radius: 14px; pointer-events: none;
  background: repeating-linear-gradient(45deg, #a7cbe209 0 2px, transparent 2px 5px); box-shadow: inset 0 -1px 0 #7399b33d; }
.dm-keys { position: relative; display: flex; gap: 8px; }
.dm .dm-key { position: relative; width: 72px; height: var(--dash-key-height); padding-top: 5px; border-radius: 13px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: radial-gradient(ellipse at 40% 0%, var(--key-face), var(--key-depth) 75%);
  border: 2px solid var(--key-edge); color: #f2f8ff; font-size: 11px; font-weight: 900; line-height: 1.15; text-shadow: 0 1px 2px #020815;
  box-shadow: inset 0 1px 0 #ecfaff70, inset 0 -4px 0 #050e2060, 0 4px 0 #081321, 0 6px 9px #060c177d;
  transition: transform .08s, box-shadow .08s; }
.dm-key::after { content: ""; position: absolute; left: 17px; right: 17px; top: 5px; height: 3px; border-radius: 2px; background: var(--led); box-shadow: 0 0 7px var(--led); pointer-events: none; }
.dm-key-icon { display: grid; place-items: center; width: 34px; height: 31px; border: 1px solid #d7efff50; border-radius: 9px;
  background: linear-gradient(#050c1999, #101d2b55); box-shadow: inset 0 1px 3px #020915bd, 0 1px 0 #daeaff36; }
.dm-key-icon svg { filter: drop-shadow(0 2px 2px #050a13); }
.dm .dm-key:active { transform: translateY(3px); box-shadow: inset 0 1px 0 #ecfaff70, inset 0 -2px 0 #050e2060, 0 1px 0 #081321; }
.k-gar { --key-face: #386482; --key-depth: #143149; --key-edge: #648da9; --led: #ffbc79; }
.k-shop { --key-face: #6b478b; --key-depth: #302047; --key-edge: #9a6fc4; --led: #f3a5fb; }
.k-q { --key-face: #366c60; --key-depth: #1a3c38; --key-edge: #639d85; --led: #baf890; }
.k-chest { --key-face: #45556d; --key-depth: #243248; --key-edge: #71849e; --led: #9cb5d1; }
.k-chest.ready { --key-face: #7a552f; --key-depth: #47301f; --key-edge: #bd8b4e; --led: #ffe298; }
.k-chest.ready::after { animation: dmpulse 1.8s ease-in-out infinite; }
#m-chest-t { font-variant-numeric: tabular-nums; }
.dm-key em { position: absolute; right: -6px; top: -7px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; display: none; align-items: center; justify-content: center;
  background: var(--red); border: 2px solid #fff; color: #fff; font-style: normal; font-size: 11px; }
/* круглые датчики */
.dm .dm-gauge { --g-led: #ffd082; --g-metal: #c69a66; --g-face: #473c36; --g-chip-top: #5e452a;
  position: relative; width: 86px; height: 86px; margin-bottom: 16px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: radial-gradient(ellipse at 38% 14%, var(--g-face), #0b1829 72%) padding-box,
    linear-gradient(149deg, #eefbff, var(--g-metal) 31%, #23354b 55%, var(--g-metal) 80%, #1a2b42) border-box;
  border: 3px solid transparent; box-shadow: inset 0 0 0 1px #090f1c, 0 0 0 2px #0b1627, 0 5px 0 #08111d, 0 8px 12px #04091385;
  transition: transform .08s, box-shadow .08s; }
.dm .dm-gauge.g2 { --g-led: #8fe5ff; --g-metal: #80b8d5; --g-face: #244862; --g-chip-top: #224d6c; }
.dm-gauge > svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(135deg); }
.g-bg, .g-arc { fill: none; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 160 999; }
.g-bg { stroke: #81a5c048; }
.g-arc { stroke: var(--g-led); stroke-dasharray: 0 999; filter: drop-shadow(0 0 2px var(--g-led)); transition: stroke-dasharray .6s; }
.dm-gauge b { font-size: 21px; line-height: 1; color: var(--g-led); font-variant-numeric: tabular-nums; text-shadow: 0 2px 3px #030816; }
#dm-cupv { font-size: 16px; }
.dm-gauge i { font-style: normal; font-size: 10px; color: #c8deec; max-width: 67px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-gauge .g-ic { color: var(--g-led); filter: drop-shadow(0 1px 2px #050b18); }
.dm .dm-gauge:active { transform: translateY(4px); box-shadow: inset 0 0 0 1px #090f1c, 0 0 0 2px #0b1627, 0 1px 0 #08111d, 0 3px 6px #04091385; }
.g-chip { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); padding: 3px 8px; border-radius: 10px;
  border: 1px solid var(--g-metal); background: linear-gradient(var(--g-chip-top), #0f1d30);
  color: var(--g-led); font-size: 11px; font-weight: 900; line-height: 1.1; white-space: nowrap;
  box-shadow: inset 0 1px 0 #dcefff43, 0 2px 0 #08111d; }
/* тахометр — главная кнопка */
.dm-tacho { position: relative; width: 156px; height: 156px; margin-bottom: 45px; border-radius: 50%;
  box-shadow: 0 0 0 3px #08101d, 0 7px 0 #05060a, 0 12px 18px #0008, 0 0 22px #53c6ff44; transition: transform .08s; }
.dm-tacho svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.t-scale { fill: none; stroke: #69daff; stroke-width: 2.3; stroke-linecap: round; filter: drop-shadow(0 0 2px #4ac7ffb0); }
.t-redline { stroke: #ff714e; filter: drop-shadow(0 0 2px #ff5635a0); }
.t-tick { stroke: #ecfaff; stroke-width: 2.6; stroke-linecap: round; }
.t-tick.s { stroke: #8ebad4; stroke-width: 1.5; }
.t-tick.r { stroke: #ff987b; }
.t-num { fill: #e0f5ff; font-size: 10px; font-weight: 900; text-anchor: middle; }
.t-num.r { fill: #ffae91; }
.t-unit { fill: #a5c8df; font-size: 6px; font-weight: 800; letter-spacing: .7px; text-anchor: middle; }
.t-needle { transform-origin: 75px 75px; transform: rotate(-120deg); animation: dmidle 2.4s ease-in-out infinite; }
.t-needle path { stroke: #772721; stroke-width: .6; filter: drop-shadow(0 0 3px #ff7a4daa); }
.dm-tacho:active .t-needle { animation: none; transform: rotate(100deg); transition: transform .15s; }
.t-go { position: absolute; left: 0; right: 0; bottom: 30px; line-height: 0; text-align: center; filter: drop-shadow(0 1px 5px #ff791d73); }
.t-car { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 20px);
  padding: 0 4px 1px; border-radius: 3px; background: #000; color: #ffe14a; font-size: 9px; line-height: 11px; font-weight: 900;
  letter-spacing: .25px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes dmidle { 0%, 100% { transform: rotate(-112deg); } 45% { transform: rotate(-100deg); } 55% { transform: rotate(-106deg); } }
@keyframes dmpulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.25); } }
.dm-player-counts { position: absolute; left: 50%; bottom: 5px; z-index: 2; transform: translateX(-50%); display: grid; gap: 3px; }
.dm .dm-online { display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 15px; border-radius: 14px; background: #15261c; border: 2px solid #7ee836; font-size: 15px; color: #e5ffd4;
  white-space: nowrap; box-shadow: inset 0 2px 0 #ffffff25, 0 3px 0 #07100b, 0 0 12px #7ee83638; }
.dm-online i { width: 8px; height: 8px; border-radius: 50%; background: #a7fa63; box-shadow: 0 0 8px #7ee836; }
.dm-online b { min-width: 20px; color: #a7fa63; text-align: center; font-variant-numeric: tabular-nums; }
.dm button.dm-online { cursor: pointer; }
.dm button.dm-online:active { background: #254735; transform: translateY(2px); }
.dm .dm-online.dm-player-total b { color: #ffdda0; }
.dm-title { width: 296px; height: 102px; margin-top: -4px; object-fit: contain; pointer-events: none; filter: drop-shadow(0 3px 5px #0b203b69); }
/* плашка трассы: в одну строку, длинное название сокращается многоточием, ничего не вылезает */
.dm-nav { top: 113px; max-width: 420px; padding: 4px 6px 4px 10px; border: 2px solid rgba(255, 255, 255, .14); }
.dm-nav b { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dm-nav span, .dm-nav i, .dm-nav em { flex-shrink: 0; }
/* «Улучшаем вместе» — справа под счётчиками */
/* «Улучшаем вместе» и «Играть с друзьями» — колонкой справа под счётчиками: вторая всегда под первой, сколько бы та ни заняла по высоте */
.dm-rbtns { position: absolute; right: 14px; top: 52px; z-index: 2; display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.dm-ideas { position: relative; display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 7px !important; border-radius: 12px;
  background: linear-gradient(#2fd6c0, #138a7c) !important; border: 2px solid #0a0b0e !important; box-shadow: 0 3px 0 #0a0b0e, 0 0 12px rgba(47, 214, 192, .35); font-size: 11px; line-height: 1.1; text-align: left; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.dm-ideas:active { transform: translateY(2px); }
/* «Играть с друзьями» — того же вида, фиолетовая */
.dm-friends { position: relative; display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 7px !important; border-radius: 12px;
  background: linear-gradient(#b06aff, #6a2ad8) !important; border: 2px solid #0a0b0e !important; box-shadow: 0 3px 0 #0a0b0e, 0 0 12px rgba(176, 106, 255, .4); font-size: 11px; line-height: 1.1; text-align: left; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.dm-friends:active { transform: translateY(2px); }
.dm-tacho::before { content: ""; position: absolute; inset: -5px; border-radius: 50%; pointer-events: none; border: 2px solid #b9ff86;
  box-shadow: 0 0 11px #9dff7299, inset 0 0 6px #95ff695e; animation: tachopulse 2.1s ease-out infinite; }
@keyframes tachopulse { 0% { transform: scale(.98); opacity: .82; } 100% { transform: scale(1.1); opacity: 0; } }
.dm-tacho:active { transform: translateY(4px); }
@media (prefers-reduced-motion: reduce) { .dm-tacho::before, .t-needle, .k-chest.ready::after { animation: none; } }
.t-go svg { position: static !important; width: 104px !important; height: auto !important; display: inline-block; }
