/* A game gets the viewport, not the flex space left over after inserted content.
   Keep normal document flow so any in-page ads remain visible and scrollable.
   Google retains control of its overlay/anchor positioning and dimensions. */
.player-page {
  --player-header-height: 52px;
  display: block;
  height: auto;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: auto;
}

.player-page .player-main {
  flex: none;
  width: 100%;
  height: calc(100vh - var(--player-header-height));
  height: calc(100dvh - var(--player-header-height));
}

.player-loading__card {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(88vw, 320px);
  padding: 24px;
  text-align: center;
}

.player-loading__art {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 12px 30px #0005;
}

.player-loading__title {
  font: 800 22px/1.2 Outfit, sans-serif;
}

.player-loading__spinner {
  width: 27px;
  height: 27px;
  border: 3px solid #ffffff55;
  border-top-color: #ffdc34;
  border-radius: 50%;
  animation: player-spin .8s linear infinite;
}

.player-loading__status {
  min-height: 1.4em;
  color: #e0e8fa;
  font-size: 14px;
  font-weight: 600;
}

.player-loading__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.player-loading__actions[hidden] { display: none; }

.player-loading__actions button {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #ffffff88;
  border-radius: 10px;
  background: #ffffff17;
  color: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.player-loading__actions button:focus-visible {
  outline: 3px solid #ffdc34;
  outline-offset: 2px;
}

@keyframes player-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .player-loading__spinner { animation: none; }
}

@media (max-height: 430px) {
  .player-loading__card { gap: 8px; padding: 8px; }
  .player-loading__art { width: 56px; height: 56px; border-radius: 12px; }
  .player-loading__title { font-size: 18px; }
}

@media (max-width: 700px) {
  .player-page {
    --player-header-height: 0px;
  }
}
