/* HARZ Player: the store's glass toolbar and track list over a full-strength visualizer. */
.player-app #viz.on { opacity: .9; }
html[data-mode="light"] .player-app #viz.on { opacity: .9; }

.player-app .window { max-width: 760px; }
.player-app .thead, .player-app .row { grid-template-columns: 30px minmax(0, 1fr) 56px 28px; }
.player-app .row { cursor: pointer; }
/* Remove: a real (small, round) glass button on every row. */
.player-app .row .x { width: 22px; height: 22px; padding: 0; border-radius: 50%; font-size: 14px; line-height: 1; justify-self: center; }
.list-tools { display: flex; align-items: center; gap: 10px; }
.player-app .lcd-title { cursor: default; }

.open-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.open-btns label { cursor: pointer; }
#p-repeat { font-size: 13px; opacity: .55; }
#p-repeat.on { opacity: 1; box-shadow: inset 0 1px 0 var(--edge), 0 0 10px var(--cool), 0 0 0 1px rgba(160,220,255,.35); }

.drop-hint {
  display: grid; gap: 6px; justify-items: center; text-align: center; padding: 48px 16px;
  color: var(--muted); background: rgba(10,11,12,.55); border: 1px dashed rgba(255,255,255,.12); margin: 8px; border-radius: 6px;
}
.drop-hint b { color: var(--text); font-size: 14px; }
.drop-hint .keys { font: 10px var(--mono); opacity: .8; }
.drop-hint[hidden] { display: none; }

.drop-veil {
  position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; pointer-events: none; opacity: 0;
  font: 20px "Michroma", var(--ui); letter-spacing: .2em; text-transform: uppercase; color: #fff;
  background: rgba(0,0,0,.55); box-shadow: inset 0 0 0 3px rgba(190,225,255,.35); transition: opacity .15s;
}
.drop-veil.on { opacity: 1; }

html[data-mode="light"] .drop-hint { background: rgba(255,255,255,.55); border-color: rgba(0,0,0,.15); }
html[data-mode="light"] .drop-hint b { color: #1a1d20; }

@media (max-width: 760px) {
  .player-app .right .wordmark { display: none; }
}

.open-btns { align-items: center; }

/* Phones: each name in full (wrapping onto a second line rather than cut short) with the remove button at the far
   right; the number and BPM make way for it. */
@media (max-width: 600px) {
  .player-app .thead, .player-app .row { grid-template-columns: minmax(0, 1fr) 34px; }
  .player-app .thead span:not(:nth-child(2)), .player-app .row > .idx, .player-app .row > .num { display: none; }
  .player-app .thead span:nth-child(2), .player-app .row > .t { display: block; }
  .player-app .row { height: auto; min-height: 40px; padding-block: 6px; contain-intrinsic-size: auto 46px; }
  .player-app .row > .t { white-space: normal; overflow-wrap: anywhere; line-height: 1.3; font-size: 13px; }
  .player-app .row .x { justify-self: end; width: 28px; height: 28px; }
}

/* ---------- meters (meters.js): a MiniMeters-style strip locked to the very bottom of the window ---------- */
/* Above everything on the page (the drop-files veil included, which stops at its edge): nothing ever covers it. */
.meters { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: flex; box-sizing: content-box;
  height: var(--meters-h, 96px); padding: 0; border: 0 solid #000; border-width: 1px 10px env(safe-area-inset-bottom);
  border-top-color: #111; background: #000; }
html.meters-open .drop-veil { bottom: calc(var(--meters-h, 96px) + 1px + env(safe-area-inset-bottom)); }
/* Its top edge is a grip too: drag it up or down for a taller or slimmer strip (meters.js). */
.meters-grip { position: absolute; left: 0; right: 0; top: -5px; height: 10px; cursor: row-resize; touch-action: none; z-index: 1; }
.meters-grip::after { content: ""; position: absolute; left: 50%; top: 4px; width: 44px; height: 2px; margin-left: -22px; border-radius: 1px;
  background: #2a2a32; opacity: 0; transition: opacity .15s, background .15s; }
.meters:hover .meters-grip::after { opacity: 1; }
.meters-grip:hover::after, .meters-grip:active::after { background: #6a6a76; }
.meters[hidden] { display: none; }
.meter { min-width: 0; flex: 1 1 0; }
.meter canvas { display: block; width: 100%; height: 100%; }
/* The gaps between meters are grips: drag one to trade width between its neighbours (meters.js). */
.meter-grip { flex: 0 0 14px; position: relative; cursor: col-resize; touch-action: none; background: #000; }
.meter-grip::after { content: ""; position: absolute; left: 6px; top: 22%; bottom: 22%; width: 2px; border-radius: 1px; background: #15151a; transition: background .15s; }
.meter-grip:hover::after, .meter-grip:active::after { background: #5a5a66; }
.meter-spectrogram { flex-grow: 30; } .meter-waveform { flex-grow: 8; } .meter-stereo { flex-grow: 9; }
.meter-vu { flex-grow: 12; } .meter-spectrum { flex-grow: 34; }
html.meters-open .window { padding-bottom: calc(var(--meters-h, 96px) + 14px); } /* the list scrolls clear of the strip */
/* Light mode: a pale panel to match the page (meters.js draws the readings as ink on it). */
html[data-mode="light"] .meters { background: #eef1f3; border-color: #eef1f3; border-top-color: #b4bdc4; }
html[data-mode="light"] .meter-grip { background: #eef1f3; }
html[data-mode="light"] .meter-grip::after { background: #d3dadf; }
html[data-mode="light"] .meters-grip::after { background: #b4bdc4; }
html[data-mode="light"] :is(.meter-grip, .meters-grip):is(:hover, :active)::after { background: #6f7a83; }
#p-meters.on { box-shadow: inset 0 1px 0 var(--edge), 0 0 10px var(--cool), 0 0 0 1px rgba(160,220,255,.35); }

/* ---------- the button row: back to the beats, open, meters, visualizer ---------- */
.open-btns { flex-wrap: nowrap; }
.open-btns .cart-btn { white-space: nowrap; }
/* Meters are a desktop tool: no button (and no panel) on phones and touch tablets. */
@media (max-width: 760px), (hover: none) { #p-meters, .meters { display: none !important; } html.meters-open .window { padding-bottom: 0; } }
/* Phones: one compact row of icons, like the store's own bar (style.css): the back arrow, Open, and the
   visualizer as spectrum bars (it names the style in its tooltip); count and Clear all share the next line. */
@media (max-width: 600px) {
  .player-app .filterbar { flex-wrap: wrap; justify-content: space-between; row-gap: 6px; }
  .open-btns { gap: 6px; }
  .open-btns .label { display: none; }
  .open-btns .cart-btn { padding-inline: 12px; }
  .open-btns #p-vizstyle { font-size: 0; display: inline-flex; align-items: center; justify-content: center; min-width: 0; padding-inline: 12px; align-self: stretch; }
  .open-btns #p-vizstyle::before { content: ""; width: 12px; height: 12px; background: currentColor;
    -webkit-mask: var(--viz-icon) center / contain no-repeat; mask: var(--viz-icon) center / contain no-repeat; }
  .open-btns #p-vizstyle { --viz-icon: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 12 12%27%3E%3Crect x=%270%27 y=%277%27 width=%272%27 height=%275%27 rx=%27.5%27/%3E%3Crect x=%273.3%27 y=%273%27 width=%272%27 height=%279%27 rx=%27.5%27/%3E%3Crect x=%276.6%27 y=%270%27 width=%272%27 height=%2712%27 rx=%27.5%27/%3E%3Crect x=%279.9%27 y=%275%27 width=%272%27 height=%277%27 rx=%27.5%27/%3E%3C/svg%3E"); }
}
/* Touch screens have no keyboard shortcuts to list. */
@media (hover: none) { .drop-hint .keys { display: none; } }

/* Meters: a VU-meter dial (its name is in its tooltip), so it never looks like the visualizer's spectrum bars. */
#p-meters { font-size: 0; display: inline-flex; align-items: center; justify-content: center; align-self: stretch; padding-inline: 12px;
  --meter-icon: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2012%2012%27%3E%3Cpath%20d=%27M1.4%209.6a4.6%204.6%200%200%201%209.2%200%27%20fill=%27none%27%20stroke=%27black%27%20stroke-width=%271.6%27%20stroke-linecap=%27round%27/%3E%3Cpath%20d=%27M6%209.6%208.7%204.5%27%20fill=%27none%27%20stroke=%27black%27%20stroke-width=%271.4%27%20stroke-linecap=%27round%27/%3E%3Ccircle%20cx=%276%27%20cy=%279.6%27%20r=%271.4%27/%3E%3C/svg%3E"); }
#p-meters::before { content: ""; width: 13px; height: 13px; background: currentColor;
  -webkit-mask: var(--meter-icon) center / contain no-repeat; mask: var(--meter-icon) center / contain no-repeat; }
.open-btns { --viz-icon: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 12 12%27%3E%3Crect x=%270%27 y=%277%27 width=%272%27 height=%275%27 rx=%27.5%27/%3E%3Crect x=%273.3%27 y=%273%27 width=%272%27 height=%279%27 rx=%27.5%27/%3E%3Crect x=%276.6%27 y=%270%27 width=%272%27 height=%2712%27 rx=%27.5%27/%3E%3Crect x=%279.9%27 y=%275%27 width=%272%27 height=%277%27 rx=%27.5%27/%3E%3C/svg%3E"); }

/* ---------- meters: the store's glass, movable ----------
   The strip wears the LCD display's look (smoked glass on dark, pale glass on light) with the toolbar's black edge and
   soft shadow, a little in from the window's edges. The grip on its left end moves it anywhere in the window
   (meters.js); while moved it floats with a deeper shadow. */
.meters { left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); border: 1px solid #000; border-radius: 9px;
  padding: 0 10px 0 0; height: var(--meters-h, 96px);
  background: linear-gradient(180deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,0) 45%), linear-gradient(180deg, #0c0e10, #050607);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px rgba(255,255,255,.05), 0 10px 28px rgba(0,0,0,.6); }
.meters .meter { margin-block: 6px; border-radius: 4px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,.8), 0 1px 0 rgba(255,255,255,.05); }
.meters .meter-grip { background: transparent; }
.meters .meter-grip::after { background: #23272b; }
.meters.moved { box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 0 0 1px rgba(255,255,255,.06), 0 16px 40px rgba(0,0,0,.7); }
.meters.dragging { will-change: transform; }
.meters-handle { flex: 0 0 18px; align-self: stretch; cursor: grab; touch-action: none; position: relative; border-radius: 8px 0 0 8px;
  background: var(--shine), linear-gradient(180deg, #2b2f33, #121416); border-right: 1px solid #000; margin-right: 6px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.meters-handle::after { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 26px; transform: translateY(-50%);
  background: radial-gradient(circle, #7d8790 0 1px, transparent 1.5px) 0 0 / 6px 6px; opacity: .8; }
.meters-handle:hover::after, .meters-handle:focus-visible::after { opacity: 1; filter: brightness(1.4); }
.meters-handle:focus-visible { outline: 1px dotted #fff; outline-offset: -3px; }
.meters.dragging .meters-handle { cursor: grabbing; }
html.meters-open .drop-veil { bottom: calc(var(--meters-h, 96px) + 10px + env(safe-area-inset-bottom)); }
html.meters-open .window { padding-bottom: calc(var(--meters-h, 96px) + 26px); }
html[data-mode="light"] .meters { border-color: #8d979f; background: linear-gradient(180deg, rgba(255,255,255,.7) 0%, rgba(255,255,255,0) 45%),
  linear-gradient(180deg, #f4f6f7, #e3e8eb); box-shadow: inset 0 1px 0 #fff, 0 6px 20px rgba(60,80,95,.25); }
html[data-mode="light"] .meters .meter { box-shadow: inset 0 1px 2px rgba(0,0,0,.2), 0 1px 0 #fff; }
html[data-mode="light"] .meters .meter-grip { background: transparent; }
html[data-mode="light"] .meters-handle { background: var(--shine), linear-gradient(180deg, #ffffff, #d9e0e5); border-right-color: #a3adb5; box-shadow: inset 0 1px 0 #fff; }
html[data-mode="light"] .meters-handle::after { background: radial-gradient(circle, #6f7a83 0 1px, transparent 1.5px) 0 0 / 6px 6px; }
html[data-mode="light"] .meters.moved { box-shadow: inset 0 1px 0 #fff, 0 14px 34px rgba(60,80,95,.32); }
