/**
 * Compact layout for phones and narrow windows.
 * Activated by the is-compact class (width <= 900) and by the media query.
 */

@media (max-width: 900px) {
  html,
  body {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
  }
}

.is-compact,
.is-compact body {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  touch-action: manipulation;
}

.is-compact .page_main__GlU4n {
  height: 100%;
  height: 100dvh;
  padding: 0;
  align-items: stretch;
  justify-content: flex-start;
}

.is-compact .page_logoContainer__S8bF9 {
  padding: max(10px, env(safe-area-inset-top)) 16px 0 max(14px, env(safe-area-inset-left));
}

.is-compact .page_logoContainer__S8bF9 img {
  width: 84px;
}

.is-compact .appLayout {
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  gap: 0;
}

.is-compact .rightPanel {
  order: 1;
  flex: 1;
  min-width: 0;
  width: 100%;
  height: auto;
  overflow: hidden;
}

.is-compact .diskContainer {
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100dvh - 210px);
  transform: none;
  overflow: hidden;
}

.is-compact .disk {
  position: absolute;
  width: 2000px;
  height: 2000px;
  left: calc(var(--disk-x, 50%) - 1000px);
  top: calc(var(--disk-y, 42%) - 1000px);
  transition: none;
}

.is-compact .disk::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--ring-size, 120px) * 2);
  height: calc(var(--ring-size, 120px) * 2);
  margin-left: calc(var(--ring-size, 120px) * -1);
  margin-top: calc(var(--ring-size, 120px) * -1);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 18px rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.is-compact .diskContainer::after {
  content: '';
  position: absolute;
  z-index: 6;
  left: var(--disk-x, 50%);
  top: calc(var(--disk-y, 42%) + var(--ring-size, 120px));
  width: 8px;
  height: 8px;
  margin-left: -4px;
  margin-top: -4px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.16);
  pointer-events: none;
}

.is-compact .leftPanel {
  order: 2;
  width: 100%;
  max-width: none;
  z-index: 20;
  gap: 0;
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
  background: #0e0808;
}

.is-compact .footerContainer {
  display: none;
}

.is-compact .musicPlayerModal {
  width: 100%;
  max-width: none;
  height: auto;
  padding: 14px 14px 10px;
  border-radius: 18px;
}

.is-compact .musicPlayerModal > div[style*='height:18px'] {
  display: none;
}

.is-compact .musicPlayerHeaderBeforeRoll {
  width: 100%;
  max-width: 100%;
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.35;
  white-space: normal;
  justify-content: flex-start;
  text-align: left;
}

.is-compact .musicPlayerTitle {
  width: 100%;
  max-width: 100%;
  margin-bottom: 12px !important;
  font-size: 18px !important;
  line-height: 1.3;
}

.is-compact .outerMusicPlayerControls {
  width: 100%;
  gap: 8px;
  margin-bottom: 8px;
  justify-content: space-between;
}

.is-compact .musicPlayerControls {
  gap: 10px;
}

.is-compact .soundButton,
.is-compact .diceButton,
.is-compact .prevSongButton,
.is-compact .nextSongButton {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  flex: 0 0 44px;
  background-color: rgba(255, 255, 255, 0.1);
}

.is-compact .playPauseButton {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
}

.is-compact .musicPlayerProgress {
  height: 28px;
  margin: 0;
  background: transparent;
  box-shadow: none;
}

.is-compact .musicPlayerProgress::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 10px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.32);
}

.is-compact .musicPlayerProgressBar {
  top: 10px;
  height: 8px;
  min-height: 8px;
  border-radius: 4px;
}

.is-compact .disk {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.is-compact .genreItem {
  font-size: 15px;
  background: transparent;
  border-radius: 0;
}

@media (prefers-reduced-motion: reduce) {
  .disk,
  .genreItem,
  .playPauseButton,
  .diceButton {
    transition: none;
  }
}
