/* ============================================================
   Games Music Player — shared styles (inline jukebox + embed).
   Built on ArekUI Brutalist tokens (--ar-*). No new design tokens.
   ============================================================ */

/* --- Shell (reused from player) ------------------------------ */

.shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(16px, 2vw, 28px) clamp(14px, 3vw, 40px) 64px;
}

.masthead {
  border-top: 3px solid var(--ar-base-content);
  padding-top: 14px;
  margin-bottom: clamp(18px, 2vw, 26px);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.masthead h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  font-weight: 700;
}

.masthead .mark {
  color: var(--ar-accent);
}

.meta {
  text-align: right;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ar-gray-600);
}

.meta p {
  margin: 0 0 6px;
}

.meta p:last-child {
  margin-bottom: 0;
}

.meta .meta-accent {
  color: var(--ar-base-content);
}

/* Precache bar */

.precache {
  margin-top: 8px;
}

.precache-track {
  width: 220px;
  height: 10px;
  border: 2px solid var(--ar-base-content);
  background: var(--ar-base-100);
}

.precache-fill {
  height: 100%;
  width: 0;
  background: var(--ar-accent);
}

.install-hint {
  font-size: 0.625rem;
  color: var(--ar-gray-600);
}

/* --- Deck: transport row ------------------------------------- */

.cabinet {
  border: 2px solid var(--ar-base-content);
  background: var(--ar-base-100);
  padding: clamp(14px, 1.8vw, 22px);
}

.deck {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.5vw, 18px);
  flex-wrap: wrap;
}

#play-button {
  min-width: 96px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--ar-base-content);
  height: 22px;
  margin: 0;
}

.time-display {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
  min-width: 108px;
  text-align: right;
}

.vol-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ar-gray-600);
}

.vol-group input {
  width: 110px;
}

/* --- Now playing: the stamp ---------------------------------- */

.now-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  border-top: 1px solid var(--ar-base-content);
  padding-top: 14px;
}

.now-label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ar-gray-600);
}

.now-title {
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
}

.now-artist {
  font-size: 0.8125rem;
  color: var(--ar-gray-600);
}

/* Scope: the transport waveform IS the seek control. The ink trace is
   the scrubber — pointer down/drag seeks, the accent playhead marks the
   position, and the canvas carries role="slider" so it stays fully
   keyboard operable (arrows, PageUp/PageDown, Home/End). The element is
   never animated by keyframes — the analyser is the truth. */
.now-scope {
  flex: 1 1 260px;
  min-width: 200px;
  height: 44px;
  cursor: pointer;
  touch-action: none;
}

.now-scope:focus-visible {
  outline: 2px dashed var(--ar-base-content);
  outline-offset: 3px;
}

.now-license {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ar-gray-600);
  text-align: right;
  max-width: 240px;
}

/* --- Track list: ruled rows ---------------------------------- */

.track-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.track {
  display: flex;
  align-items: baseline;
  gap: 14px;
  width: 100%;
  text-align: left;
  border: 0;
  border-top: 1px solid var(--ar-base-content);
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 12px 4px;
  cursor: pointer;
}

.track:hover,
.track:focus-visible {
  background: var(--ar-base-200);
}

.track .fig {
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 2.4em;
  color: var(--ar-gray-600);
}

.track .name {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.track .artist {
  font-size: 0.75rem;
  color: var(--ar-gray-600);
}

.track.is-current .name,
.track.is-current .fig {
  color: var(--ar-base-100);
}

.track.is-current {
  background: var(--ar-accent);
  color: var(--ar-base-100);
}

.track.is-current .artist {
  color: var(--ar-base-100);
}

.track .state {
  margin-left: auto;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Library credits at end of track list */

.library-credits {
  border-top: 1px solid var(--ar-base-content);
  padding: 12px 4px;
  font-size: 0.625rem;
  color: var(--ar-gray-600);
  text-align: center;
}

.library-credits a {
  color: var(--ar-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.library-credits a:hover {
  color: var(--ar-base-content);
}

/* --- Global focus visible ------------------------------------ */

:focus-visible {
  outline: 2px solid var(--ar-base-content);
  outline-offset: 2px;
}

/* --- Reduced motion ------------------------------------------ */

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

/* --- Selection ----------------------------------------------- */

::selection {
  background: var(--ar-base-content);
  color: var(--ar-base-100);
}