/* Preserve the existing garage controls; make their layout fit the viewport. */
.garage-shell .garage-main {
  min-width: 0;
}
.garage-shell .collection-strip {
  min-width: 0;
}
@media (min-width: 1600px) {
  .garage-shell .collection-strip {
    right: 380px;
  }
}
@media (max-height: 580px) and (min-width: 560px) {
  .garage-shell .topbar {
    height: 44px;
    gap: 15px;
  }
  .garage-shell .brand {
    font-size: 28px;
    min-width: 78px;
  }
  .garage-shell .brand span {
    font-size: 5px;
    letter-spacing: 1px;
    margin-top: 3px;
  }
  .garage-shell .level {
    width: 26px;
    height: 26px;
    font-size: 19px;
  }
  .garage-shell .player-info b,
  .garage-shell .current-car b {
    font-size: 10px;
  }
  .garage-shell .player-info > span,
  .garage-shell .progression {
    display: none;
  }
  .garage-shell .player-strip {
    gap: 8px;
  }
  .garage-shell .wallet b {
    font-size: 18px;
  }
  .garage-shell .topnav {
    height: 33px;
    min-height: 33px;
    gap: 0;
  }
  .garage-shell .topnav button {
    font-size: 12px;
    padding: 0 12px;
  }
  .garage-shell .topnav button:first-child {
    padding-left: 0;
  }
  .garage-shell .topnav button::after {
    bottom: 3px;
  }
  .garage-shell .nav-right {
    display: none;
  }
  .garage-shell .garage-main {
    padding-top: 8px;
    overflow: hidden;
  }
  .garage-shell .garage-title .eyebrow {
    font-size: 6px;
    margin: 0 0 5px;
  }
  .garage-shell .garage-title h1 {
    font-size: 29px;
    line-height: 1;
    margin: 0 0 5px;
  }
  .garage-shell .garage-title h1 br {
    display: none;
  }
  .garage-shell .garage-title h1 em {
    margin-left: 5px;
  }
  .garage-shell .garage-title > p {
    font-size: 8px;
    margin: 4px 0;
    max-width: 240px;
  }
  .garage-shell .garage-title .car-specialty {
    font-size: 7px;
  }
  .garage-shell .garage-panel {
    position: absolute;
    margin: 0;
    width: clamp(210px, 29vw, 250px);
    top: 9px;
    bottom: 7px;
    padding: 12px 14px;
  }
  .garage-shell .panel-title {
    font-size: 13px;
    padding-bottom: 9px;
  }
  .garage-shell .spec-grid {
    gap: 9px;
    padding: 12px 0;
  }
  .garage-shell .spec-grid strong {
    font-size: 19px;
  }
  .garage-shell .collection-strip {
    right: calc(clamp(210px, 29vw, 250px) + 14px);
    bottom: 3px;
    height: 75px;
    gap: 6px;
    padding: 3px 0 4px;
  }
  .garage-shell .collection-car {
    flex-basis: 91px;
    padding-bottom: 3px;
  }
  .garage-shell .collection-car img {
    height: 31px;
  }
  .garage-shell .collection-car span {
    font-size: 5px;
    line-height: 1;
    margin: 3px 6px 0;
    letter-spacing: 0.3px;
  }
  .garage-shell .collection-car b {
    font-size: 11px;
    line-height: 1.05;
    margin-top: 2px;
  }
  .garage-shell .collection-car small {
    font-size: 5px;
    line-height: 1;
    margin: 3px 6px 0;
  }
  .garage-shell .orbit-tip {
    left: 0;
    top: auto;
    bottom: 81px;
    font-size: 6px;
  }
  .garage-shell .orbit-tip kbd {
    font-size: 6px;
  }
  .garage-shell .menu-footer {
    height: 26px;
    min-height: 26px;
    font-size: 6px;
  }
  .garage-shell .menu-footer kbd {
    font-size: 6px;
  }
}
@media (max-width: 700px) and (max-aspect-ratio: 5/4) {
  .garage-shell .garage-main {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-top: 18px;
    padding-bottom: 18px;
  }
  .garage-shell .garage-title {
    flex: none;
    order: 0;
  }
  .garage-shell .collection-strip {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    order: 1;
    flex: none;
    width: 100%;
    margin-top: 240px;
  }
  .garage-shell .garage-panel {
    order: 2;
    flex: none;
    margin-top: 12px;
  }
  .garage-shell .orbit-tip {
    top: 250px;
    bottom: auto;
  }
}

/* Keep each scrollable menu inside the available viewport. */
.menu-shell {
  overflow: hidden;
}
.menu-shell > :is(.page-main, .garage-main) {
  min-width: 0;
  min-height: 0;
}
