/* Kindred Spirit — persistent tape-deck player dock */
.ks-dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; justify-content: center;
  padding: 0 8px 8px; pointer-events: none;
  background: linear-gradient(to top, rgba(43,32,22,0.55), rgba(43,32,22,0));
}
.ks-dock svg {
  width: 100%; max-width: 880px; height: auto; pointer-events: auto;
  filter: drop-shadow(0 -3px 16px rgba(20,14,8,0.5));
}
.ks-shell { position: relative; width: 100%; max-width: 880px; pointer-events: auto; }

/* minimize button on the full deck */
.ks-min {
  position: absolute; top: 34px; right: 10px; z-index: 2;
  width: 30px; height: 26px; padding: 0;
  background: rgba(43,32,22,0.72); color: #e9e2d0;
  border: 1px solid #6b5a3e; border-radius: 5px;
  font-size: 0.9rem; line-height: 1; cursor: pointer;
}
.ks-min:hover { background: #7c2828; }

/* minimized control bar — same width as the deck: power light + transport + track name */
.ks-mini {
  display: flex; align-items: center; gap: 0.4rem;
  width: 100%; box-sizing: border-box; padding: 0.5rem 0.7rem;
  background: linear-gradient(#3a2f22, #2b2016);
  border: 1px solid #5a4a38; border-radius: 8px;
  box-shadow: 0 -3px 16px rgba(20,14,8,0.5);
  color: #e9e2d0; font-family: 'Playfair Display', Georgia, serif;
}
.ks-mini[hidden] { display: none; }
.ks-mini-led {
  flex: none; width: 12px; height: 12px; border-radius: 50%;
  background: #4a1410; box-shadow: inset 0 0 3px rgba(0,0,0,0.6);
}
body.ks-playing .ks-mini-led { background: #e2180b; box-shadow: 0 0 8px #ff2a1a; }
.ks-mini-btn {
  flex: none; width: 40px; height: 34px; padding: 0;
  background: #4a4032; color: #f4ecd8; border: 1px solid #6b5a3e;
  border-radius: 5px; font-size: 1rem; line-height: 1; cursor: pointer;
}
.ks-mini-btn:hover { background: #5a4a38; }
.ks-mini-play { background: #7c2828; border-color: #591a1a; }
.ks-mini-play:hover { background: #591a1a; }
.ks-mini-title {
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 700; font-size: 0.98rem; padding: 0 0.4rem;
}
.ks-mini-expand {
  flex: none; padding: 0.45rem 0.8rem;
  background: #4a4032; color: #f4ecd8; border: 1px solid #6b5a3e;
  border-radius: 5px; cursor: pointer; white-space: nowrap;
  font-family: 'Playfair Display', Georgia, serif; font-size: 0.9rem;
}
.ks-mini-expand:hover { background: #5a4a38; }

/* minimized: hide the full deck + its minimize button, show only the bar */
body.ks-deck-min .ks-shell svg,
body.ks-deck-min .ks-min { display: none; }

/* reels are spun from JS (player.js) via a transform attribute — reliable in SVG */

/* interactive bits */
.ks-key { cursor: pointer; }
#ks-seekhit { cursor: pointer; }

/* keep page content clear of the dock (deck is ~404:1120 → taller than before) */
body.ks-has-dock { padding-bottom: 346px; }
@media (max-width: 640px) { body.ks-has-dock { padding-bottom: 210px; } }
body.ks-deck-min.ks-has-dock { padding-bottom: 74px; }

/* pop-out queue panel */
.ks-queue {
  position: fixed; right: 12px; bottom: 342px; z-index: 70;
  width: min(360px, 92vw); max-height: 54vh; overflow: auto;
  background: var(--paper, #fbf6e9); color: var(--ink, #2b2016);
  border: 1px solid var(--gold-dk, #a17d2e); border-radius: 6px;
  box-shadow: 0 10px 34px rgba(20,14,8,0.42);
  font-family: 'EB Garamond', Georgia, serif;
}
.ks-queue[hidden] { display: none; }
.ks-queue__head {
  position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center;
  background: var(--oxblood, #7c2828); color: var(--cream, #f4ecd8);
  padding: 0.5rem 0.8rem; font-family: 'Playfair Display', Georgia, serif; letter-spacing: 1px;
}
.ks-queue__close { background: none; border: 0; color: var(--cream, #f4ecd8); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.ks-queue__body { padding: 0.3rem 0.6rem 0.8rem; }
.ks-queue h4 { margin: 0.7rem 0 0.2rem; font-family: 'Playfair Display', Georgia, serif; color: var(--oxblood, #7c2828); font-size: 0.95rem; }
.ks-queue ol { list-style: none; margin: 0; padding: 0; }
.ks-queue li { display: flex; gap: 0.6rem; padding: 0.3rem 0.4rem; border-top: 1px solid var(--line, #d8c9a5); cursor: pointer; border-radius: 3px; }
.ks-queue li:hover { background: var(--cream-deep, #ece0c4); }
.ks-queue li.is-cur { background: var(--cream-deep, #ece0c4); color: var(--oxblood, #7c2828); font-weight: 600; }
.ks-queue .n { width: 1.5rem; text-align: right; color: var(--gold-dk, #a17d2e); }
@media (max-width: 640px) { .ks-queue { bottom: 206px; } }

/* Music page: inline rows enhanced to drive the deck */
.tracklist li.ks-row { cursor: pointer; }
.tracklist li.ks-row:hover { background: var(--cream-deep, #ece0c4); }
.tracklist li.ks-cur { background: var(--cream-deep, #ece0c4); color: var(--oxblood, #7c2828); font-weight: 600; }
