/* ------------------------------------------------------------------
   PDX busking (busk.js, wave 16): the note highway beside the pushed-in
   player, the tune list before it and the end card after. DG//OS look,
   docs/STYLE-GUIDE.md: a near-black panel, chamfers, mono labels; the
   four lanes volt, cyan, hot and white (drawn on the canvas). The game
   shows through on the left: the panel stands at the right on a wide
   screen, along the bottom on a tall one (busk.js follow() slides the
   camera to match).
   ------------------------------------------------------------------ */
.busk { position: fixed; right: 3vw; top: 76px; bottom: calc(var(--keys-h, 40px) + 16px); z-index: 36; display: flex; font-family: var(--font-mono); pointer-events: none; }
.busk[hidden] { display: none; }
.busk-box {
  --c: 12px;
  pointer-events: auto;
  width: min(320px, 40vw); display: flex; flex-direction: column; gap: 10px; padding: 12px;
  background: rgba(8, 10, 16, .9); border: 1px solid var(--volt); color: var(--text);
  clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, var(--c) 100%, 0 calc(100% - var(--c)));
}
.busk:not(.is-play) .busk-box { align-self: flex-start; }   /* the list and the card: as tall as they are */
.busk-head { min-width: 0; }
.busk-eye { margin: 0 0 6px; font: 500 10px/1.3 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.busk-name { margin: 0; font: 700 20px/1.05 var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--text); }

.busk-stats { display: flex; gap: 12px; align-items: center; }
.busk-stat { display: flex; align-items: center; gap: 8px; font: 500 10px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.busk-stat em { font-style: normal; }
.busk-stat.is-crowd { flex: 1; }
.busk-streak { font: 700 18px/1 var(--font-display); color: var(--volt); font-variant-numeric: tabular-nums; min-width: 2ch; }
.busk-crowd { position: relative; flex: 1; height: 8px; background: var(--screen, #05070c); border: 1px solid var(--line-2); }
.busk-crowd-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 40%; background: var(--cyan); }
.is-card .busk-stats { display: none; }

.busk-list { margin: 0; padding: 0; list-style: none; display: none; flex-direction: column; gap: 6px; overflow: auto; }
.is-pick .busk-list { display: flex; }
.busk-tune button {
  width: 100%; text-align: left; padding: 10px 12px; cursor: pointer;
  background: var(--bg-2, #0b0e16); border: 1px solid var(--line-2); color: var(--text);
  font: 600 13px/1.2 var(--font-mono); letter-spacing: .06em;
}
.busk-tune.is-on button { border-color: var(--volt); color: var(--volt); }
.busk-tune.is-carol button { color: var(--cyan); }
.busk-tune.is-carol.is-on button { border-color: var(--cyan); }
.busk-tune button:hover { border-color: var(--volt); }

.busk-road { position: relative; flex: 1; min-height: 0; display: none; }
.is-play .busk-road { display: block; }
.busk-canvas { display: block; width: 100%; height: 100%; touch-action: none; border: 1px solid var(--line-2); }
.busk-coins { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.busk-coin {
  position: absolute; bottom: 18%; font: 700 18px/1 var(--font-display); font-style: normal; color: var(--volt);
  animation: busk-coin .9s steps(9) 1 forwards;
}
@keyframes busk-coin { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(-120px); opacity: 0; } }

.busk-card { display: none; flex-direction: column; gap: 10px; cursor: pointer; }
.is-card .busk-card { display: flex; }
.busk-pay { margin: 4px 0 2px; font: 700 clamp(22px, 4.6vw, 30px)/1.05 var(--font-display); letter-spacing: .04em; color: var(--volt); }
.busk-pay.is-none { color: var(--hot); }
.busk-line { margin: 0; font: 500 12px/1.45 var(--font-mono); color: var(--text); }
.busk-line + .busk-line { color: var(--muted); }

.busk-keys { margin: 0; font: 500 10px/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* A tall screen: the panel along the bottom half; the player above it. */
@media (max-aspect-ratio: 21/20) {
  .busk { left: 8px; right: 8px; top: auto; bottom: calc(var(--keys-h, 40px) + 8px); align-items: flex-end; }
  .busk-box { width: 100%; }
  .busk.is-play .busk-box { height: 46vh; }
  .busk:not(.is-play) .busk-box { align-self: flex-end; }
}
@media (pointer: coarse) { .busk { bottom: 12px; } }

/* "Why not" when H cannot start a set. */
.busk-toast {
  --c: 10px;
  position: fixed; left: 50%; bottom: calc(var(--keys-h, 40px) + 160px); z-index: 37; transform: translateX(-50%);
  max-width: calc(100vw - 32px); margin: 0; padding: 10px 14px;
  background: rgba(8, 10, 16, .92); border: 1px solid var(--hot); color: var(--text);
  font: 500 12px/1.35 var(--font-mono); letter-spacing: .04em; text-align: center;
  clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, var(--c) 100%, 0 calc(100% - var(--c)));
  opacity: 0; pointer-events: none; transition: opacity .18s linear;
}
.busk-toast.is-on { opacity: 1; }

/* Touch: a button to start, as H does. */
.busk-tap {
  --c: 8px;
  position: fixed; left: 12px; bottom: 150px; z-index: 6; padding: 11px 14px; border: 1px solid var(--volt);
  background: rgba(8, 10, 16, .85); color: var(--volt); font: 700 12px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, var(--c) 100%, 0 calc(100% - var(--c)));
}
.busk-tap[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) { .busk-toast { transition: none; } .busk-coin { animation: none; display: none; } }
