/* ==========================================================
   ЭМОЦИИ 2 — стили интерфейса
   ========================================================== */

:root {
  --bg: #070a0c;
  --bg2: #0c1114;
  --panel: #11171b;
  --panel2: #161e23;
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .16);
  --text: #eef3f6;
  --muted: #93a2ab;
  --dim: #5f6d75;
  --accent: #ff7a18;
  --accent2: #ffb15c;
  --cyan: #48d7ff;
  --green: #7ee07a;
  --red: #ff5a52;
  --radius: 18px;
  --font: "Segoe UI", system-ui, -apple-system, "Roboto", "Helvetica Neue", Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

body {
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }

h1, h2, h3, p { margin: 0; }

#app { position: fixed; inset: 0; }

.screen {
  position: fixed;
  inset: 0;
  display: none;
  overflow: hidden;
}

.screen.is-active { display: block; }

/* ==========================================================
   ГАРАЖ
   ========================================================== */

#garage.is-active {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr);
  align-items: center;
  gap: clamp(20px, 3vw, 56px);
  padding: calc(34px + var(--safe-t)) clamp(20px, 4.6vw, 82px) calc(58px + var(--safe-b));
  overflow-y: auto;
  overflow-x: hidden;
  background: #080b0d;
}

.garage-scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(90% 70% at 68% 32%, rgba(255, 122, 24, .10), transparent 62%),
    radial-gradient(80% 60% at 88% 18%, rgba(72, 215, 255, .08), transparent 60%),
    linear-gradient(180deg, #0b1114 0%, #080c0f 58%, #060809 100%);
}

.garage-3d {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.garage-scrim {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 9, 11, .92) 0%, rgba(6, 9, 11, .70) 34%, rgba(6, 9, 11, .10) 58%, rgba(6, 9, 11, .38) 100%),
    linear-gradient(180deg, rgba(6, 9, 11, .55) 0%, transparent 22%, transparent 72%, rgba(6, 9, 11, .82) 100%);
}

.scene-wall {
  position: absolute;
  inset: 0 0 38% 0;
  background:
    radial-gradient(120% 90% at 72% 10%, rgba(72, 215, 255, .10), transparent 55%),
    radial-gradient(90% 70% at 20% 20%, rgba(255, 122, 24, .08), transparent 60%),
    linear-gradient(180deg, #0e1418 0%, #0b1013 62%, #090c0e 100%);
}

.scene-wall::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .5;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 7px);
  background-size: 64px 64px, 64px 64px, 100% 100%;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .35) 85%, transparent 100%);
}

.scene-glow {
  position: absolute;
  left: 12%;
  top: 6%;
  width: 70vw;
  height: 58vh;
  background: radial-gradient(closest-side, rgba(255, 140, 40, .16), transparent 70%);
  filter: blur(30px);
}

.scene-floor {
  position: absolute;
  inset: 62% 0 0 0;
  background:
    radial-gradient(90% 100% at 50% 0%, rgba(255, 122, 24, .07), transparent 60%),
    linear-gradient(180deg, #0b0f12 0%, #070a0c 100%);
  border-top: 1px solid rgba(255, 255, 255, .06);
}

.scene-floor::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 90px 56px;
  transform: perspective(340px) rotateX(58deg) scale(1.5) translateY(-12%);
  transform-origin: top center;
  opacity: .35;
}

.scene-stripes {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(62% - 14px);
  height: 28px;
  background: repeating-linear-gradient(90deg, #ff7a18 0 34px, #161b1f 34px 68px);
  opacity: .16;
  filter: blur(1px);
}

.scene-lamp {
  position: absolute;
  top: 0;
  width: 3px;
  height: 26vh;
  background: linear-gradient(180deg, rgba(72, 215, 255, .9), rgba(72, 215, 255, .05));
  box-shadow: 0 0 26px 4px rgba(72, 215, 255, .25);
  opacity: .5;
}

.scene-lamp.lamp-a { left: 62%; }
.scene-lamp.lamp-b { left: 88%; height: 18vh; opacity: .3; }

.garage-content {
  position: relative;
  z-index: 2;
  max-width: 660px;
  padding: 6px 0;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: .22em;
  font-weight: 700;
  color: var(--accent2);
  text-transform: uppercase;
}

.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 122, 24, .15), 0 0 18px rgba(255, 122, 24, .8);
  animation: pulse 2.4s ease-in-out infinite;
}

.brand-ver {
  padding: 2px 7px;
  border: 1px solid var(--line2);
  border-radius: 6px;
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--muted);
  margin-left: 2px;
}

.brand h1 {
  font-size: clamp(44px, 6.4vw, 92px);
  line-height: .92;
  font-weight: 900;
  letter-spacing: -.035em;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 0 12px 40px rgba(0, 0, 0, .6);
}

.brand h1 span {
  background: linear-gradient(96deg, #ffd7a8, var(--accent) 42%, #ff5e02 78%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-sub {
  margin-top: 14px;
  max-width: 480px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.menu {
  display: grid;
  gap: 9px;
  margin-top: clamp(22px, 3.4vh, 38px);
  max-width: 530px;
}

.menu-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  padding: 13px 16px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(26, 34, 39, .92), rgba(14, 19, 22, .92));
  color: var(--text);
  text-align: left;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.menu-btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16%;
  bottom: 16%;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity .16s ease;
}

.menu-btn:hover,
.menu-btn:focus-visible {
  transform: translateX(5px);
  border-color: rgba(255, 122, 24, .45);
  background: linear-gradient(180deg, rgba(38, 46, 51, .95), rgba(18, 24, 28, .95));
  outline: none;
}

.menu-btn:hover::before,
.menu-btn:focus-visible::before { opacity: 1; }

.menu-btn.is-primary {
  border-color: rgba(255, 122, 24, .36);
  background:
    linear-gradient(100deg, rgba(255, 122, 24, .20), rgba(255, 122, 24, .05) 62%),
    linear-gradient(180deg, rgba(28, 35, 40, .95), rgba(15, 20, 23, .95));
  box-shadow: 0 18px 46px -26px rgba(255, 122, 24, .8), inset 0 1px 0 rgba(255, 255, 255, .06);
}

.menu-btn.is-primary::before { opacity: 1; }

.menu-btn.is-danger:hover { border-color: rgba(255, 90, 82, .45); }
.menu-btn.is-danger:hover::before { background: var(--red); }

.menu-ico {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  font-size: 19px;
  line-height: 1;
}

.menu-btn.is-primary .menu-ico {
  background: rgba(255, 122, 24, .14);
  border-color: rgba(255, 122, 24, .35);
}

.menu-text { display: grid; gap: 3px; min-width: 0; }
.menu-text b { font-size: 16.5px; font-weight: 700; letter-spacing: .01em; }
.menu-text small { font-size: 12.5px; color: var(--muted); line-height: 1.35; }

.menu-arrow {
  margin-left: auto;
  font-size: 26px;
  line-height: 1;
  color: var(--dim);
  transition: transform .16s ease, color .16s ease;
}

.menu-btn:hover .menu-arrow { transform: translateX(3px); color: var(--accent2); }

.garage-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: clamp(18px, 3vh, 30px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  max-width: 530px;
}

.meta-item { display: grid; gap: 3px; }
.meta-item span {
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
}
.meta-item b {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.garage-side {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 16px;
  align-content: center;
  max-width: 460px;
  justify-self: end;
  width: 100%;
}

.map-card {
  position: relative;
  border: 1px solid var(--line2);
  border-radius: 20px;
  overflow: hidden;
  background: #0a0f12;
  box-shadow: 0 30px 70px -30px #000, inset 0 1px 0 rgba(255, 255, 255, .06);
}

.map-card-head,
.map-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(9, 13, 16, .75);
}

.map-card-head { border-bottom: 1px solid var(--line); }
.map-card-foot { border-top: 1px solid var(--line); letter-spacing: .05em; text-transform: none; font-size: 11px; }

.map-card canvas { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; background: #123a49; }

.bike-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(120% 100% at 20% 0%, rgba(72, 215, 255, .09), transparent 60%),
    linear-gradient(180deg, rgba(18, 25, 29, .9), rgba(10, 14, 17, .92));
  padding: 12px 16px 14px;
  overflow: hidden;
}

.bike-blueprint {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .55));
  animation: float 6s ease-in-out infinite;
}

.bike-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.bike-3d-tag {
  padding: 3px 8px;
  border: 1px solid rgba(72, 215, 255, .3);
  border-radius: 7px;
  background: rgba(72, 215, 255, .08);
  color: var(--cyan);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .12em;
}

.bike-card-foot { display: grid; gap: 3px; margin-top: 10px; }
.bike-name { font-weight: 800; letter-spacing: .08em; font-size: 13px; }
.bike-spec { font-size: 11px; color: var(--dim); letter-spacing: .04em; }

.garage-foot {
  position: fixed;
  left: clamp(20px, 4.6vw, 82px);
  right: clamp(20px, 4.6vw, 82px);
  bottom: calc(16px + var(--safe-b));
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 10.5px;
  color: var(--dim);
  letter-spacing: .04em;
}

.foot-keys { color: #7d8b94; }

/* ==========================================================
   КНОПКИ И ПОЛЯ
   ========================================================== */

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: .02em;
  border: 1px solid transparent;
  transition: transform .14s ease, filter .14s ease, background .14s ease, border-color .14s ease;
}

.btn-primary {
  color: #23150a;
  background: linear-gradient(180deg, #ffa351, var(--accent));
  box-shadow: 0 14px 30px -14px rgba(255, 122, 24, .75), inset 0 1px 0 rgba(255, 255, 255, .4);
}

.btn-primary:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }

.btn-ghost {
  background: rgba(255, 255, 255, .045);
  border-color: var(--line2);
  color: var(--text);
}

.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .085); }

.btn-ghost.danger { color: #ff9a94; border-color: rgba(255, 90, 82, .3); }

.btn-primary:disabled,
.btn-ghost:disabled { opacity: .4; cursor: not-allowed; }

.btn-primary.wide,
.btn-ghost.wide { width: 100%; }

.btn-mini {
  margin-top: 7px;
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid var(--line2);
  background: rgba(255, 255, 255, .05);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.btn-mini:hover { color: var(--text); background: rgba(255, 255, 255, .1); }

.stack { display: grid; gap: 9px; margin-top: 18px; }
.stack.row { grid-template-columns: 1fr 1fr; display: grid; }
.stack.row.end { justify-content: end; }
.row { display: flex; align-items: center; }
.row.gap { gap: 8px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(10, 15, 18, .55);
  color: var(--text);
  font-size: 15px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
  transition: background .14s ease, border-color .14s ease;
}

.icon-btn:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .24); }

/* ==========================================================
   ОВЕРЛЕИ И МОДАЛКИ
   ========================================================== */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-top: calc(24px + var(--safe-t));
  padding-bottom: calc(24px + var(--safe-b));
  background: rgba(4, 7, 9, .66);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}

.overlay.is-open { opacity: 1; visibility: visible; }

.modal {
  position: relative;
  width: min(520px, 100%);
  max-height: 88dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px;
  border-radius: 24px;
  border: 1px solid var(--line2);
  background:
    radial-gradient(120% 110% at 18% 0%, rgba(255, 122, 24, .10), transparent 55%),
    linear-gradient(180deg, #151c21, #0d1215 72%);
  box-shadow: 0 40px 100px -30px #000, inset 0 1px 0 rgba(255, 255, 255, .07);
  transform: translateY(12px) scale(.985);
  transition: transform .22s cubic-bezier(.2, .8, .2, 1);
}

.overlay.is-open .modal { transform: none; }

.modal.wide-modal { width: min(760px, 100%); }

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
}

.modal-close:hover { background: rgba(255, 255, 255, .1); color: var(--text); }

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent2);
}

.modal h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.05;
}

.modal-sub {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.hint {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--dim);
}

.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.mode-card {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 18px 17px 16px;
  border-radius: 16px;
  border: 1px solid var(--line2);
  background: linear-gradient(180deg, rgba(33, 42, 48, .72), rgba(16, 22, 26, .72));
  text-align: left;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.mode-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 122, 24, .45);
  background: linear-gradient(180deg, rgba(45, 55, 61, .85), rgba(19, 26, 30, .85));
}

.mode-card.is-accent {
  border-color: rgba(255, 122, 24, .32);
  background:
    linear-gradient(160deg, rgba(255, 122, 24, .16), transparent 70%),
    linear-gradient(180deg, rgba(35, 44, 50, .8), rgba(16, 22, 26, .8));
}

.mode-ico { font-size: 26px; line-height: 1; margin-bottom: 4px; }
.mode-card b { font-size: 17px; font-weight: 800; }
.mode-card small { font-size: 12px; line-height: 1.45; color: var(--muted); }
.mode-go { margin-top: 8px; font-size: 12.5px; font-weight: 700; color: var(--accent2); }
.mode-record { font-size: 11px; color: var(--dim); }
.mode-record b { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* поля */

.field { display: grid; gap: 7px; margin-top: 16px; }
.field label { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; color: var(--muted); }

input[type="text"],
input[type="range"],
input:not([type]),
select,
textarea {
  width: 100%;
  border-radius: 11px;
  border: 1px solid var(--line2);
  background: rgba(6, 10, 12, .72);
  color: var(--text);
  padding: 11px 13px;
  font-size: 14px;
  outline: none;
  transition: border-color .14s ease, box-shadow .14s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(255, 122, 24, .6);
  box-shadow: 0 0 0 3px rgba(255, 122, 24, .12);
}

textarea {
  min-height: 84px;
  resize: vertical;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
  word-break: break-all;
  user-select: text;
  -webkit-user-select: text;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), #ffb15c) 0 / var(--fill, 45%) 100% no-repeat, rgba(255, 255, 255, .12);
  box-shadow: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff4e6;
  border: 3px solid var(--accent);
  box-shadow: 0 0 12px rgba(255, 122, 24, .7);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff4e6;
  border: 3px solid var(--accent);
}

/* настройки */

.setting { display: grid; gap: 9px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setting:last-of-type { border-bottom: 0; }
.setting-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.setting-head label,
.toggle-row label { font-size: 13.5px; font-weight: 600; }
.setting-head output { font-size: 12px; color: var(--accent2); font-variant-numeric: tabular-nums; }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.toggle-row > div { display: grid; gap: 3px; }
.toggle-row small { font-size: 11.5px; color: var(--dim); line-height: 1.4; }

.switch {
  appearance: none;
  -webkit-appearance: none;
  width: 46px;
  height: 27px;
  flex: 0 0 46px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .13);
  border: 1px solid var(--line2);
  position: relative;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #dfe8ee;
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), background .16s ease;
}

.switch:checked { background: var(--accent); border-color: var(--accent); }
.switch:checked::after { transform: translateX(19px); background: #fff6ec; }

.single-day-night { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(6, 10, 12, .6);
}

.segmented button {
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.segmented button.is-active {
  background: rgba(255, 122, 24, .16);
  color: var(--accent2);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 24, .35);
}

.mp-invite { margin-top: 14px; }
.mp-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.modal input[type="url"] { width: 100%; border-radius: 11px; border: 1px solid var(--line2); background: rgba(6, 10, 12, .72); color: var(--text); padding: 8px 10px; font: inherit; }

.mp-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 13px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  font-size: 12px;
  color: var(--muted);
}

.mp-status.is-ok { color: #b8f0b4; border-color: rgba(126, 224, 122, .3); background: rgba(126, 224, 122, .08); }
.mp-status.is-err { color: #ffb4ae; border-color: rgba(255, 90, 82, .3); background: rgba(255, 90, 82, .08); }
.mp-status.is-wait { color: var(--accent2); border-color: rgba(255, 122, 24, .3); }

.mp-players { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }

.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
}

.player-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px currentColor;
}

.player-chip.me { color: var(--accent2); border-color: rgba(255, 122, 24, .3); }

/* ==========================================================
   ИГРА / HUD
   ========================================================== */

#game { background: #0a1f28; }

#cv {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline: none;
  background: #0a1f28;
}

#fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 2;
  touch-action: none;
}

.hud {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

.hud button { pointer-events: auto; }

.hud-top {
  position: absolute;
  top: calc(12px + var(--safe-t));
  left: calc(14px + var(--safe-l));
  right: calc(14px + var(--safe-r));
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.hud-mode {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 6px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(8, 12, 15, .72), rgba(8, 12, 15, .45));
  border: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hud-mode span {
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent2);
  white-space: nowrap;
}

.hud-mode strong {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .02em;
  color: #fff;
}

.hud-progress {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(8, 12, 15, .55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hud-progress span { font-size: 9px; letter-spacing: .16em; color: var(--dim); }
.hud-progress b { font-size: 14px; color: #fff; }

.hud-right { display: flex; gap: 8px; margin-left: auto; }

.hud-map {
  position: absolute;
  top: calc(70px + var(--safe-t));
  right: calc(14px + var(--safe-r));
  width: 200px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(6, 12, 15, .65);
  box-shadow: 0 14px 40px -16px #000;
  pointer-events: none;
}

.hud-map canvas { display: block; width: 100%; height: auto; }

.hud-speed {
  position: absolute;
  left: calc(20px + var(--safe-l));
  bottom: calc(20px + var(--safe-b));
  display: grid;
  gap: 6px;
  width: 168px;
  padding: 12px 14px 11px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(180deg, rgba(9, 14, 17, .78), rgba(9, 14, 17, .55));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px -22px #000;
}

.speed-num { display: flex; align-items: baseline; gap: 7px; }
.speed-num span {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: .9;
  color: #fff;
  text-shadow: 0 0 26px rgba(255, 122, 24, .25);
}
.speed-num small { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.nitro {
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .12);
  overflow: hidden;
}

.nitro i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #1eb4e8, var(--cyan) 55%, #b4f4ff);
  box-shadow: 0 0 10px rgba(72, 215, 255, .7);
  transform-origin: left;
  transition: transform .08s linear;
}

.surface {
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}

.speed-place {
  color: var(--accent2);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.touch-ui { display: none; }

.joystick {
  position: absolute;
  left: calc(20px + var(--safe-l));
  bottom: calc(24px + var(--safe-b));
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .16);
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, .07), rgba(6, 10, 12, .5));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
  touch-action: none;
  z-index: 8;
}

.joy-ring {
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, .13);
}

.joy-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 32%, #ffd0a3, var(--accent) 62%, #c94800);
  box-shadow: 0 8px 22px rgba(255, 122, 24, .35), inset 0 1px 0 rgba(255, 255, 255, .5);
  will-change: transform;
}

.pedals {
  position: absolute;
  right: calc(18px + var(--safe-r));
  bottom: calc(24px + var(--safe-b));
  display: flex;
  align-items: flex-end;
  gap: 10px;
  z-index: 8;
}

.pedal {
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  background: rgba(10, 15, 18, .6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
  touch-action: none;
  transition: transform .06s ease, filter .06s ease;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .65);
}

.pedal.is-down { transform: scale(.94); filter: brightness(1.35); }

.pedal-gas {
  width: 92px;
  height: 92px;
  background: radial-gradient(circle at 50% 40%, rgba(126, 224, 122, .34), rgba(20, 46, 26, .62) 70%);
  border-color: rgba(126, 224, 122, .55);
  box-shadow: 0 10px 30px -10px rgba(126, 224, 122, .35);
}

.pedal-brake {
  width: 66px;
  height: 66px;
  font-size: 9px;
  background: radial-gradient(circle at 50% 40%, rgba(255, 90, 82, .28), rgba(42, 18, 18, .62) 70%);
  border-color: rgba(255, 90, 82, .45);
}

.pedal-nitro {
  width: 52px;
  height: 52px;
  font-size: 10px;
  color: #9beeff;
  background: radial-gradient(circle at 50% 40%, rgba(72, 215, 255, .24), rgba(9, 30, 38, .62) 70%);
  border-color: rgba(72, 215, 255, .45);
}

.pedal-light,
.pedal-drift {
  position: absolute;
  bottom: calc(100% + 8px);
  width: 48px;
  height: 48px;
  font-size: 9px;
}

.pedal-light { right: 0; }
.pedal-drift { right: 56px; }
.pedal-drift.is-down { color: #ffdfbe; border-color: #ff9b55; background: rgba(105, 49, 23, .86); }
.pedal-light[aria-pressed="true"] { color: #fff1b8; border-color: #ffc85c; background: rgba(92, 66, 22, .86); }

.mp-quick {
  position: absolute;
  top: calc(300px + var(--safe-t));
  right: calc(14px + var(--safe-r));
  display: none;
  gap: 6px;
  z-index: 7;
}

.mp-quick.is-on { display: flex; }

.mp-quick button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(8, 13, 16, .6);
  font-size: 15px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
}

.mp-chat {
  position: absolute;
  left: calc(20px + var(--safe-l));
  bottom: calc(178px + var(--safe-b));
  display: grid;
  gap: 5px;
  max-width: 240px;
}

.mp-chat .msg {
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(8, 13, 16, .72);
  border: 1px solid rgba(255, 255, 255, .12);
  font-size: 11.5px;
  color: var(--muted);
  animation: fadeUp .2s ease;
}

.mp-chat .msg b { color: var(--accent2); margin-right: 5px; }

/* ---------- горизонтальный режим на телефоне ---------- */

.rotate-gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(70% 60% at 50% 38%, rgba(255, 122, 24, .12), transparent 62%),
    radial-gradient(60% 50% at 70% 70%, rgba(72, 215, 255, .08), transparent 70%),
    #06090b;
  text-align: center;
}

body.is-playing.need-landscape .rotate-gate { display: flex; }

.rotate-card {
  max-width: 430px;
  padding: 26px 24px 22px;
  border: 1px solid var(--line2);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(17, 24, 29, .92), rgba(8, 12, 15, .96));
  box-shadow: 0 40px 90px -40px #000, inset 0 1px 0 rgba(255, 255, 255, .07);
}

.rotate-card .eyebrow { justify-content: center; display: inline-flex; }
.rotate-card h2 { margin: 10px 0 8px; font-size: 26px; }
.rotate-card p { margin: 0 auto; max-width: 330px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.rotate-card .btn-primary { margin-top: 18px; }
.rotate-note { margin-top: 14px !important; font-size: 11px !important; color: var(--dim) !important; }

.rotate-phone {
  position: relative;
  width: 58px;
  height: 100px;
  margin: 0 auto 18px;
  border: 2px solid rgba(255, 255, 255, .5);
  border-radius: 12px;
  background: linear-gradient(180deg, #1b252b, #0c1114);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 14px 30px -16px #000;
  animation: turnPhone 3.2s ease-in-out infinite;
}

.rotate-phone::after {
  content: "";
  position: absolute;
  inset: 8px 5px;
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(255, 122, 24, .5), rgba(255, 122, 24, .05) 60%, rgba(72, 215, 255, .18));
}

.rotate-phone-notch {
  position: absolute;
  left: 50%;
  top: 4px;
  width: 14px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .35);
  transform: translateX(-50%);
}

@keyframes turnPhone {
  0%, 16% { transform: rotate(0deg); }
  46%, 78% { transform: rotate(90deg); }
  96%, 100% { transform: rotate(0deg); }
}

/* мини-итоги в паузе */

.mini-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  font-size: 12px;
  color: var(--muted);
}

.mini-stats b { color: var(--text); font-weight: 700; }

/* результат */

.modal.result { text-align: center; }
.modal.result .eyebrow { margin-bottom: 6px; }
.result-time {
  margin: 16px 0 4px;
  font-size: clamp(38px, 7vw, 58px);
  font-weight: 900;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff, #ffc48a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.result-delta { min-height: 18px; font-size: 13px; color: var(--muted); }
.result-delta b { color: var(--green); }
.result-delta .slow { color: var(--red); }
.result-detail { margin-top: 12px; font-size: 12px; color: var(--dim); line-height: 1.6; }
.modal.result .stack.row { margin-top: 22px; }

.modal.bye { text-align: center; }
.modal.bye h2 { margin-bottom: 8px; }

/* ==========================================================
   ПРОГРЕСС: ПОПУЛЯРНОСТЬ, КОМБО, ТРЮКИ
   ========================================================== */

[hidden] { display: none !important; }

.meta-item.is-pop b { color: #ffd37a; }

.hud-pop {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 211, 122, .28);
  background: linear-gradient(180deg, rgba(42, 31, 12, .74), rgba(17, 14, 8, .5));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hud-pop span { color: #ffd37a; font-size: 12px; line-height: 1; }
.hud-pop b { font-size: 15px; font-weight: 800; color: #ffe7bc; letter-spacing: .01em; }

.hud-combo {
  position: absolute;
  left: 50%;
  bottom: calc(48px + var(--safe-b));
  transform: translateX(-50%);
  width: 200px;
  display: grid;
  gap: 5px;
  text-align: center;
  z-index: 6;
}

.combo-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
  opacity: 0;
  transition: opacity .18s ease;
}

.hud-combo.is-on .combo-row { opacity: 1; }

.combo-row span {
  font-size: 9px;
  letter-spacing: .18em;
  color: var(--dim);
}

.combo-row b {
  font-size: 17px;
  font-weight: 900;
  color: #ffcf7d;
  text-shadow: 0 0 18px rgba(255, 122, 24, .5);
}

.combo-bar {
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .14);
  overflow: hidden;
  opacity: 0;
  transition: opacity .18s ease;
}

.hud-combo.is-on .combo-bar { opacity: 1; }

.combo-bar i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 3px;
  transform-origin: left;
  background: linear-gradient(90deg, #ff7a18, #ffd37a);
  box-shadow: 0 0 10px rgba(255, 122, 24, .7);
}

.combo-trick {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  min-height: 22px;
  opacity: 0;
  transform: translateY(7px) scale(.94);
  transition: opacity .18s ease, transform .18s ease;
}

.combo-trick.is-on {
  opacity: 1;
  transform: none;
  animation: trickPop .34s cubic-bezier(.2, 1.5, .4, 1);
}

.combo-trick b {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .08em;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .6);
}

.combo-trick span {
  font-size: 15px;
  font-weight: 800;
  color: #ffd37a;
}

.combo-trick i {
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  color: var(--green);
}

@keyframes trickPop {
  0% { transform: scale(.7); opacity: 0; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: none; opacity: 1; }
}

/* ==========================================================
   МАГАЗИН И ТЮНИНГ
   ========================================================== */

.shop-modal {
  width: min(820px, 100%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.shop-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-right: 44px;
}

.shop-head h2 { font-size: clamp(24px, 3vw, 30px); }

.wallet {
  display: grid;
  gap: 2px;
  padding: 8px 15px;
  border-radius: 13px;
  border: 1px solid rgba(255, 211, 122, .32);
  background: linear-gradient(180deg, rgba(46, 34, 13, .62), rgba(13, 11, 8, .55));
  text-align: right;
  flex: 0 0 auto;
}

.wallet span {
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
}

.wallet b {
  font-size: 20px;
  font-weight: 900;
  color: #ffe0a8;
  font-variant-numeric: tabular-nums;
}

.shop-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}

.shop-tab {
  padding: 9px 18px;
  margin-bottom: -1px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 700;
}

.shop-tab.is-active { color: var(--accent2); border-bottom-color: var(--accent); }

.shop-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  max-height: min(56dvh, 520px);
  padding: 14px 4px 4px 0;
  margin-top: 2px;
}

.shop-pane { display: none; }
.shop-pane.is-active { display: block; animation: fadeUp .22s ease; }

.shop-bikes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 12px;
}

.gear-category { margin: 12px 0 20px; }
.gear-category > h3 { margin: 0 0 8px; font-size: 15px; }

.bike-tile {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line2);
  background: linear-gradient(180deg, rgba(31, 39, 45, .78), rgba(14, 19, 23, .8));
}

.bike-tile.is-current {
  border-color: rgba(255, 122, 24, .55);
  box-shadow: 0 0 0 1px rgba(255, 122, 24, .18), 0 18px 40px -26px rgba(255, 122, 24, .55);
  background:
    linear-gradient(160deg, rgba(255, 122, 24, .12), transparent 62%),
    linear-gradient(180deg, rgba(33, 42, 48, .8), rgba(14, 19, 23, .82));
}

.bike-tile.is-locked { opacity: .86; }

.bike-tile-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bike-tile-top > div { min-width: 0; flex: 1; display: grid; gap: 2px; }

.bike-tile-top h3 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .03em;
  line-height: 1.1;
}

.bike-swatch {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 4px 12px -4px #000;
}

.bike-tier {
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--dim);
}

.bike-flag {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .1em;
  color: #ffd9a8;
  background: rgba(255, 122, 24, .18);
  border: 1px solid rgba(255, 122, 24, .4);
}

.bike-flag.is-own {
  color: #b8f0b4;
  background: rgba(126, 224, 122, .12);
  border-color: rgba(126, 224, 122, .32);
}

.bike-desc {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
  min-height: 52px;
}

.stat-bars { display: grid; gap: 5px; }

.stat-bar {
  display: grid;
  grid-template-columns: 74px 1fr 26px;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--dim);
}

.stat-bar i {
  display: block;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .1);
  overflow: hidden;
}

.stat-bar i b {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #2f7fd4, #48d7ff);
}

.stat-bar em {
  font-style: normal;
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.bike-tile-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
}

.bike-pp {
  font-size: 12px;
  font-weight: 700;
  color: #ffe0a8;
}

.buy-btn {
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: linear-gradient(180deg, #ffa351, var(--accent));
  color: #23150a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
  transition: filter .14s ease, transform .14s ease;
}

.buy-btn:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.buy-btn:disabled { opacity: .38; cursor: not-allowed; }

.buy-btn.ghost {
  background: rgba(255, 255, 255, .06);
  border-color: var(--line2);
  color: var(--text);
}

.bike-state {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--muted);
}

.bike-state.is-current { color: var(--accent2); }

.tune-bike {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 14px;
  border: 1px solid var(--line2);
  background: rgba(255, 255, 255, .04);
}

.tune-bike-ico {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .25);
}

.tune-bike-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.tune-bike-text b { font-size: 14px; font-weight: 800; }
.tune-bike-text span { font-size: 10.5px; color: var(--dim); }
.tune-bike-pop { font-size: 12.5px; font-weight: 800; color: #ffe0a8; white-space: nowrap; }

.tune-list { display: grid; gap: 10px; }

.tune-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(28, 36, 41, .7), rgba(13, 18, 21, .7));
}

.tune-card.is-max { opacity: .78; }

.tune-ico {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  font-size: 16px;
}

.tune-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.tune-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tune-head b { font-size: 13.5px; font-weight: 800; }
.tune-head span { font-size: 10px; color: var(--dim); white-space: nowrap; }
.tune-main p { font-size: 11px; color: var(--muted); line-height: 1.4; }

.tune-dots { display: flex; gap: 4px; margin-top: 2px; }
.tune-dots i {
  width: 18px;
  height: 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .13);
}
.tune-dots i.on { background: linear-gradient(90deg, #ff7a18, #ffd37a); }

/* ==========================================================
   АДАПТИВ
   ========================================================== */

@media (max-width: 1180px) {
  .garage-side { max-width: 400px; }
  .bike-card { display: none; }
}

@media (max-width: 980px) {
  .garage-scene {
    position: relative;
    inset: auto;
    z-index: 0;
    height: clamp(210px, 33vh, 300px);
    margin: 14px 0 2px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background:
      radial-gradient(90% 80% at 60% 20%, rgba(255, 122, 24, .12), transparent 62%),
      linear-gradient(180deg, #0b1114 0%, #080c0f 70%, #060809 100%);
  }
  .garage-3d { opacity: 1; }
  .garage-scrim {
    background: linear-gradient(180deg, rgba(6, 9, 11, .18) 0%, rgba(6, 9, 11, 0) 42%, rgba(6, 9, 11, .5) 100%);
  }
  #garage.is-active {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 26px;
    padding-bottom: calc(92px + var(--safe-b));
  }
  .garage-content { max-width: none; }
  .garage-side {
    max-width: 560px;
    justify-self: start;
    grid-template-columns: 1fr;
  }
  .map-card { max-width: 520px; }
  .garage-foot { display: none; }
}

@media (max-width: 640px) {
  #garage.is-active { padding: calc(24px + var(--safe-t)) 16px calc(28px + var(--safe-b)); gap: 20px; }
  .brand h1 { font-size: clamp(38px, 11vw, 56px); }
  .brand-sub { font-size: 12.5px; }
  .menu { margin-top: 20px; }
  .menu-btn { padding: 11px 13px; gap: 12px; }
  .menu-ico { width: 38px; height: 38px; flex-basis: 38px; font-size: 17px; }
  .menu-text b { font-size: 15.5px; }
  .menu-text small { font-size: 11.5px; }
  .garage-3d { opacity: 1; }
  .garage-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 14px;
    max-width: none;
    padding: 12px 14px;
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(8, 11, 14, .72);
    backdrop-filter: blur(7px);
  }
  .garage-meta .meta-item { min-width: 0; }
  .garage-meta .meta-item span { font-size: 9px; letter-spacing: .12em; }
  .garage-meta .meta-item b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .garage-side { margin-top: 4px; }
  .garage-foot { display: none; }
  .modal { padding: 22px 18px; border-radius: 20px; max-height: 92dvh; }
  .mode-grid { grid-template-columns: 1fr; }
  .stack.row { grid-template-columns: 1fr; }
  .modal.wide-modal { width: 100%; }
  .overlay { padding: 12px; }
  .mp-quick { top: calc(258px + var(--safe-t)); }
  .shop-bikes { grid-template-columns: 1fr; }
  .shop-scroll { max-height: 58dvh; }
  .shop-head { gap: 10px; }
  .shop-head h2 { font-size: 22px; }
  .shop-modal { padding: 20px 14px 16px; }
  .wallet { padding: 7px 10px; }
  .wallet b { font-size: 17px; }
  .bike-desc { min-height: 0; }
  .tune-card { flex-wrap: wrap; }
  .tune-main { flex-basis: calc(100% - 46px); }
  .tune-card .buy-btn { margin-left: 46px; }
}

@media (max-width: 900px) {
  .hud-map { width: 150px; top: calc(64px + var(--safe-t)); }
  .mp-quick { top: calc(232px + var(--safe-t)); }
  .hud-speed { width: 132px; padding: 9px 11px 9px; }
  .speed-num span { font-size: 32px; }
}

@media (max-height: 800px) {
  .garage-foot { display: none; }
  #garage.is-active { padding-bottom: calc(34px + var(--safe-b)); }
  .garage-meta { margin-top: 14px; padding-top: 12px; }
}

@media (max-height: 560px) and (orientation: landscape) {
  #garage.is-active {
    align-items: center;
    align-content: center;
    grid-template-columns: minmax(0, 1.02fr) minmax(260px, .98fr);
    gap: 22px;
    padding: calc(14px + var(--safe-t)) calc(20px + var(--safe-r)) calc(14px + var(--safe-b)) calc(20px + var(--safe-l));
  }
  .brand h1 { font-size: clamp(30px, 5vw, 50px); }
  .brand-sub { display: none; }
  .brand-row { margin-bottom: 6px; }
  .menu { margin-top: 8px; gap: 6px; max-width: 470px; }
  .menu-btn { padding: 7px 11px; gap: 11px; }
  .menu-ico { width: 34px; height: 34px; flex-basis: 34px; font-size: 16px; border-radius: 9px; }
  .menu-text b { font-size: 15.5px; }
  .menu-text small { display: none; }
  .menu-arrow { font-size: 22px; }
  .garage-meta { margin-top: 8px; padding-top: 7px; gap: 6px 16px; max-width: 470px; }
  .garage-meta .meta-item:nth-child(5) { display: none; }
  .garage-meta .meta-item span { font-size: 9px; letter-spacing: .13em; }
  .garage-meta .meta-item b { font-size: 14px; }
  .garage-content { max-width: none; }

  /* на телефоне в горизонтали 3D-витрина снова становится фоном */
  .garage-scene {
    position: fixed;
    inset: 0;
    z-index: -1;
    height: auto;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  .garage-3d { opacity: .9; }
  .garage-scrim {
    background:
      linear-gradient(90deg, rgba(6, 9, 11, .95) 0%, rgba(6, 9, 11, .78) 38%, rgba(6, 9, 11, .18) 64%, rgba(6, 9, 11, .5) 100%),
      linear-gradient(180deg, rgba(6, 9, 11, .5) 0%, transparent 26%, transparent 70%, rgba(6, 9, 11, .85) 100%);
  }
  .garage-side { max-width: 340px; justify-self: end; align-self: start; align-content: start; gap: 12px; }
  .map-card { display: none; }
  .bike-card { display: block; padding: 10px 14px 12px; }
  .garage-foot { display: none; }
  .hud-map { width: 132px; }
  .mp-quick { top: calc(206px + var(--safe-t)); }
  .modal { max-height: 94dvh; }
  .shop-modal { max-height: 96dvh; padding: 14px 16px 12px; }
  .shop-modal .eyebrow,
  .shop-modal .modal-sub,
  .shop-modal .hint { display: none; }
  .shop-head { padding-right: 40px; }
  .shop-head h2 { font-size: 21px; }
  .wallet { padding: 6px 12px; }
  .wallet b { font-size: 16px; }
  .shop-tabs { margin-top: 7px; }
  .shop-tab { padding: 8px 16px; font-size: 13px; }
  .shop-scroll { flex: 0 0 auto; max-height: 62dvh; padding-top: 10px; }
  .shop-bikes { gap: 10px; }
  .bike-tile { padding: 11px; gap: 7px; }
}

@media (max-height: 340px) and (orientation: landscape) {
  #garage.is-active {
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 16px;
    padding: calc(10px + var(--safe-t)) calc(14px + var(--safe-r)) calc(10px + var(--safe-b)) calc(14px + var(--safe-l));
  }
  .brand-row { margin-bottom: 4px; }
  .brand-ver { display: none; }
  .menu { margin-top: 6px; gap: 5px; }
  .menu-btn { padding: 6px 10px; gap: 10px; }
  .menu-ico { width: 30px; height: 30px; flex-basis: 30px; font-size: 14px; border-radius: 8px; }
  .menu-text b { font-size: 14.5px; }
  .garage-meta { margin-top: 6px; padding-top: 5px; gap: 6px 16px; }
  .garage-meta .meta-item:nth-child(3),
  .garage-meta .meta-item:nth-child(4) { display: none; }
  .garage-meta .meta-item span { font-size: 8.5px; }
  .garage-meta .meta-item b { font-size: 13px; }
  .garage-side { max-width: 230px; }
  .bike-card { padding: 8px 11px 9px; }
  .bike-card-head { padding-bottom: 6px; font-size: 9px; letter-spacing: .12em; }
  .bike-name { font-size: 12px; }
  .bike-spec { font-size: 10px; }
}

@media (pointer: coarse) {
  .touch-ui { display: block; }
  .hud-speed {
    left: calc(12px + var(--safe-l));
    top: calc(74px + var(--safe-t));
    bottom: auto;
    transform: none;
    width: 118px;
    padding: 8px 11px 9px;
    text-align: left;
  }
  .speed-num { justify-content: flex-start; }
  .speed-num span { font-size: 30px; }
  .speed-num small { font-size: 8px; }
  .surface { font-size: 8px; }
  .mp-chat { bottom: calc(160px + var(--safe-b)); }
  .hud-map { width: 144px; }
}

@media (max-width: 400px) {
  .joystick { width: 116px; height: 116px; left: 12px; }
  .joy-knob { width: 50px; height: 50px; margin: -25px 0 0 -25px; }
  .pedal-gas { width: 80px; height: 80px; }
  .pedal-brake { width: 58px; height: 58px; }
  .pedal-nitro { width: 46px; height: 46px; }
  .pedals { gap: 7px; right: 12px; }
  .hud-map { width: 126px; }
  .hud-pop { padding: 5px 9px; }
  .hud-pop b { font-size: 13px; }
  .garage-meta { gap: 8px 16px; }
}

body.has-touch .touch-ui { display: block; }
body.has-touch #btnFullscreen { display: none; }

@media (orientation: landscape) {
  body.has-touch .hud-combo {
    left: calc(158px + var(--safe-l));
    right: calc(240px + var(--safe-r));
    bottom: calc(12px + var(--safe-b));
    width: auto;
    max-width: 230px;
    margin-inline: auto;
    transform: none;
  }
  body.has-touch .combo-row b { font-size: 15px; }
  body.has-touch .combo-trick { flex-wrap: wrap; gap: 2px 6px; }
  body.has-touch .combo-trick b,
  body.has-touch .combo-trick span { font-size: 13px; }
}

/* ==========================================================
   АНИМАЦИИ
   ========================================================== */

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ==========================================================
   ГЛАВНЫЙ ЭКРАН — как в первой «ЭМОЦИИ»:
   сцена на весь экран, минимум панелей, меню слева,
   подсказки снизу, большая кнопка старта справа.
   Блок стоит после адаптива, чтобы перекрыть старую сетку гаража.
   ========================================================== */

:root {
  --menu-amber: #ffc21c;
  --menu-amber-2: #ffd863;
  --menu-ink: #17130a;
}

#garage.is-active {
  display: block;
  padding: 0;
  overflow: hidden;
  background: #070a0c;
}

.garage-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
}

.garage-scrim {
  background:
    linear-gradient(90deg, rgba(6, 8, 10, .68) 0%, rgba(6, 8, 10, .28) 24%, rgba(6, 8, 10, 0) 46%, rgba(6, 8, 10, .22) 100%),
    linear-gradient(180deg, rgba(6, 8, 10, .62) 0%, rgba(6, 8, 10, .05) 24%, rgba(6, 8, 10, 0) 62%, rgba(6, 8, 10, .72) 100%);
}

/* ---------- логотип по центру сверху ---------- */

.menu-logo {
  position: absolute;
  top: calc(16px + var(--safe-t));
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 9px;
  pointer-events: none;
  filter: drop-shadow(0 3px 14px rgba(0, 0, 0, .75));
}

.logo-bolt {
  width: 22px;
  height: 22px;
  fill: var(--menu-amber);
  filter: drop-shadow(0 0 9px rgba(255, 194, 28, .55));
}

.logo-word {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: .22em;
  color: var(--menu-amber);
  text-transform: uppercase;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .8);
}

/* ---------- правый верх: популярность и настройки ---------- */

.menu-topright {
  position: absolute;
  top: calc(14px + var(--safe-t));
  right: calc(18px + var(--safe-r));
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill-icon,
.menu-pop {
  height: 46px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, .13);
  background: rgba(12, 13, 15, .72);
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
}

.menu-pop {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  color: var(--menu-amber);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pill-icon {
  width: 46px;
  display: grid;
  place-items: center;
  color: #d9dee2;
  transition: border-color .15s ease, color .15s ease, transform .1s ease;
}

.pill-icon svg,
.rail-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.pill-icon:hover { border-color: var(--menu-amber); color: var(--menu-amber); }
.pill-icon:active { transform: scale(.95); }

/* ---------- меню слева ---------- */

.menu-rail {
  position: absolute;
  left: calc(22px + var(--safe-l));
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  display: grid;
  gap: 10px;
  justify-items: start;
}

.rail-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 204px;
  padding: 13px 22px 13px 17px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, .15);
  background: rgba(11, 12, 14, .72);
  color: #eef1f3;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: left;
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
  transition: border-color .15s ease, color .15s ease, background .15s ease, transform .1s ease;
}

.rail-btn:hover,
.rail-btn:focus-visible {
  border-color: rgba(255, 194, 28, .72);
  color: var(--menu-amber);
  background: rgba(20, 21, 22, .82);
  outline: none;
}

.rail-btn:active { transform: scale(.97); }

/* ---------- описание и клавиши снизу по центру ---------- */

.menu-info {
  position: absolute;
  left: 50%;
  bottom: calc(30px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 5;
  width: min(560px, 52vw);
  text-align: center;
  pointer-events: none;
}

.menu-desc {
  font-size: 12.5px;
  line-height: 1.45;
  color: #cfd4cc;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .95);
  margin-bottom: 8px;
}

.menu-keys {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  justify-content: center;
  gap: 6px;
}

.menu-keys span {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .11);
  background: rgba(10, 11, 13, .72);
  color: #a9b2b6;
  font-size: 10.5px;
  letter-spacing: .03em;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.menu-keys b {
  color: var(--menu-amber);
  font-weight: 700;
}

.keys-touch { display: none; }

@media (pointer: coarse) {
  .keys-pc { display: none; }
  .keys-touch { display: grid; grid-template-columns: repeat(2, max-content); }
  .rail-btn { font-size: 14px; min-width: 190px; }
}

/* Настоящая сенсорная техника может не отдавать pointer: coarse
   (например, при эмуляции), поэтому дублируем по классу на body. */
body.has-touch .keys-pc { display: none; }
body.has-touch .keys-touch { display: grid; grid-template-columns: repeat(2, max-content); }
.android-app .keys-pc { display: none; }
.android-app .keys-touch { display: grid; grid-template-columns: repeat(2, max-content); }

/* ---------- большая кнопка старта ---------- */

.menu-go {
  position: absolute;
  right: calc(26px + var(--safe-r));
  bottom: calc(26px + var(--safe-b));
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 19px 38px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, var(--menu-amber-2), var(--menu-amber));
  color: var(--menu-ink);
  font: inherit;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  filter: drop-shadow(0 10px 26px rgba(0, 0, 0, .55));
  transition: filter .15s ease, transform .1s ease, background .15s ease;
}

.menu-go svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.menu-go:hover {
  background: linear-gradient(180deg, #ffe27c, #ffcd3d);
  filter: drop-shadow(0 12px 30px rgba(255, 194, 28, .35));
}

.menu-go:active { transform: scale(.98); }

/* ---------- байк и рекорд слева снизу ---------- */

.menu-bikeinfo {
  position: absolute;
  left: calc(22px + var(--safe-l));
  bottom: calc(26px + var(--safe-b));
  z-index: 5;
  display: grid;
  gap: 3px;
  max-width: 300px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .9);
  pointer-events: none;
}

.menu-bikeinfo > b {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .09em;
}

.menu-bikeinfo > span {
  font-size: 11px;
  color: #98a3aa;
  letter-spacing: .03em;
}

.menu-record b { color: #d5dde1; font-weight: 700; }

/* ---------- карта острова ---------- */

.menu-map {
  position: absolute;
  top: calc(82px + var(--safe-t));
  left: calc(22px + var(--safe-l));
  z-index: 4;
  width: clamp(150px, 13vw, 196px);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(9, 12, 15, .78);
  box-shadow: 0 18px 46px -20px #000;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.menu-map canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  background: #123a49;
}

.menu-map-foot {
  display: grid;
  gap: 2px;
  padding: 6px 2px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, .09);
  color: #c3ccd1;
  font-size: 9.5px;
  line-height: 1.25;
  letter-spacing: .04em;
}

#garage3d { pointer-events: auto; touch-action: none; }
#garage3d.is-rotatable { cursor: grab; }
#garage3d.is-rotating { cursor: grabbing; }

/* ---------- адаптив ---------- */

@media (max-width: 1100px) {
  .menu-map {
    left: auto;
    right: calc(16px + var(--safe-r));
    width: clamp(100px, 17vw, 152px);
  }
  .menu-rail { left: calc(16px + var(--safe-l)); }
  .menu-bikeinfo { left: calc(16px + var(--safe-l)); }
}

@media (max-height: 620px) and (orientation: landscape) {
  .menu-logo { top: calc(8px + var(--safe-t)); }
  .logo-word { font-size: 17px; letter-spacing: .18em; }
  .logo-bolt { width: 18px; height: 18px; }

  .menu-topright { top: calc(7px + var(--safe-t)); right: calc(12px + var(--safe-r)); }
  .pill-icon { width: 38px; height: 38px; }
  .menu-pop { height: 38px; padding: 0 9px; font-size: 13px; }

  .menu-rail {
    left: calc(12px + var(--safe-l));
    gap: 7px;
  }
  .rail-btn {
    min-width: 176px;
    padding: 9px 15px 9px 12px;
    gap: 9px;
    font-size: 12.5px;
    border-radius: 11px;
  }
  .rail-btn svg { width: 16px; height: 16px; }

  .menu-desc { display: none; }
  .menu-info { width: min(430px, 46vw); bottom: calc(12px + var(--safe-b)); }
  .menu-keys span { font-size: 9px; padding: 3px 7px; }

  .menu-go {
    right: calc(14px + var(--safe-r));
    bottom: calc(12px + var(--safe-b));
    padding: 13px 24px;
    font-size: 13.5px;
    gap: 9px;
  }
  .menu-go svg { width: 17px; height: 17px; }

  .menu-bikeinfo { bottom: calc(12px + var(--safe-b)); max-width: 240px; }
  .menu-bikeinfo > b { font-size: 12.5px; }
  .menu-bikeinfo > span { font-size: 9.5px; }
  .menu-record { display: none; }
  .menu-map {
    top: calc(53px + var(--safe-t));
    left: auto;
    right: calc(12px + var(--safe-r));
    width: clamp(84px, 15vw, 132px);
  }
  .menu-map-foot { padding: 4px 2px; font-size: 9px; }
}

@media (max-height: 400px) and (orientation: landscape) {
  .menu-rail { gap: 5px; }
  .rail-btn { min-width: 160px; padding: 7px 13px 7px 10px; font-size: 11.5px; }
  .menu-bikeinfo { display: none; }
  .menu-info { width: min(360px, 42vw); }
  .keys-pc span:nth-child(n+4) { display: none; }
}

@media (max-width: 480px) and (orientation: portrait) {
  .menu-logo { left: calc(12px + var(--safe-l)); transform: none; }
  .logo-word { font-size: 17px; letter-spacing: .18em; }
  .menu-topright { right: calc(12px + var(--safe-r)); gap: 6px; }
  .pill-icon { width: 38px; height: 38px; }
  .menu-pop { height: 38px; padding: 0 9px; font-size: 13px; }
}

/* Компактные окна на телефоне в горизонтальном режиме. */
@media (pointer: coarse) and (orientation: landscape) and (max-height: 540px) {
  .overlay {
    padding: calc(8px + var(--safe-t)) calc(12px + var(--safe-r))
      calc(8px + var(--safe-b)) calc(12px + var(--safe-l));
  }
  .overlay .modal {
    max-height: calc(100dvh - var(--safe-t) - var(--safe-b) - 16px);
    padding: 14px 16px;
    border-radius: 16px;
    touch-action: pan-y;
  }
  .modal.wide-modal { width: min(640px, 100%); }
  .modal .modal-close { top: 7px; right: 8px; width: 40px; height: 40px; }
  .modal .eyebrow { margin-bottom: 4px; font-size: 9px; }
  .modal h2 { font-size: 22px; padding-right: 40px; }
  .modal .modal-sub { margin-top: 5px; font-size: 12px; line-height: 1.35; }
  .mode-grid { gap: 8px; margin-top: 10px; }
  .mode-card { gap: 3px; padding: 9px 10px; border-radius: 12px; }
  .mode-ico { font-size: 18px; margin-bottom: 2px; }
  .mode-card > b { font-size: 14px; }
  .mode-card small { font-size: 11px; line-height: 1.3; }
  .mode-go { margin-top: 3px; }
  .single-day-night { margin-top: 8px; padding-top: 7px; }

  .modal .field { gap: 4px; margin-top: 8px; }
  .modal .field input:not([type]), .modal .field textarea { padding: 7px 10px; }
  .mp-invite { margin-top: 8px; }
  .modal .btn-primary, .modal .btn-ghost { min-height: 38px; padding: 7px 12px; font-size: 13px; }
  .modal .mp-status { margin-top: 6px; padding: 5px 8px; }
  .modal .stack { margin-top: 8px; }
  .modal .mp-players:empty { display: none; }
  .modal .setting { padding: 8px 0; }
  .shop-modal h2 { padding-right: 0; }
  .shop-modal .shop-scroll { flex: 1 1 auto; min-height: 0; max-height: none; }
}
.overlay button:focus, .overlay input:focus, .overlay select:focus, #garage button:focus {
  outline: 2px solid #ffd457;
  outline-offset: 3px;
}

#app .is-pad-selected {
  outline: 3px solid #fff3dd;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px #ff8a3440, 0 0 18px #ff8a3466;
}
