/* Playlist shelf. Shares tokens and the .act / .sr-only / .kind styles with ../style.css. */
.page { display: flex; height: 100%; min-height: 420px; overflow: hidden; }
.stage { position: relative; flex: 1; min-width: 0; min-height: 0; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; outline: none; }
.stage canvas.hot { cursor: pointer; }
.stage .status { position: absolute; left: 20px; right: 20px; bottom: 14px; margin: 0; font-size: 12px; text-align: center; min-height: 1.5em; pointer-events: none; }
.page:not(.live) .stage { display: none; }

/* ---------------------------------------------------------------- plain grid (no WebGL) + keyboard route */
.shelf-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 18px 14px; align-content: start; padding: 54px 20px 20px;
  flex: 1; min-width: 0; overflow: auto; }
.page.live .shelf-list { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; padding: 0; }
.page.live .shelf-list:focus-within { z-index: 5; left: 12px; top: 12px; width: min(420px, calc(100vw - 24px)); height: auto; max-height: calc(100% - 24px); clip: auto; white-space: normal;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; background: var(--bg); border: 1px solid var(--line); padding: 12px; overflow: auto; }
.shelf-list button { appearance: none; background: none; border: 0; padding: 0; margin: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; display: grid; gap: 7px; }
.shelf-list img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #e4e4e6; border: 1px solid var(--line); }
.shelf-list span { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; line-height: 1.35; }
.shelf-list button[aria-current="true"] span { font-weight: 700; }

/* ---------------------------------------------------------------- player panel */
.player { width: min(400px, 100%); flex: none; border-left: 1px solid var(--line); padding: 46px 28px 22px; overflow: auto; background: var(--bg); }
.player-nav { display: flex; align-items: baseline; gap: 14px; margin: 0 0 6px; }
.player-nav .kind { margin: 0; flex: 1; }
.player .arrow { font-size: 16px; line-height: 1; padding: 2px 4px; }
.player h2 { margin: 0 0 16px; font: 400 24px/1.1 var(--display); text-transform: uppercase; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.player .embed { margin: 0 0 16px; min-height: 352px; }
.player .embed iframe { display: block; width: 100%; height: 352px; border: 0; border-radius: 12px; }
.player-actions { display: flex; gap: 20px; align-items: center; }
.player-actions .primary { font-weight: 700; border-bottom-color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .player:not([hidden]) { animation: slide .25s cubic-bezier(.2, .8, .2, 1); }
  @keyframes slide { from { opacity: 0; transform: translateX(12px); } }
}

@media (max-width: 720px) {
  .page { flex-direction: column; }
  .player { width: 100%; max-height: 58%; border-left: 0; border-top: 1px solid var(--line); padding: 18px 20px 16px; }
  .player h2 { font-size: 20px; }
  .player .embed, .player .embed iframe { min-height: 152px; height: 152px; }
  @media (prefers-reduced-motion: no-preference) { @keyframes slide { from { opacity: 0; transform: translateY(12px); } } }
}
