/* TILES — library
   Brand: red #CC0000 on black, tile corner marks, Roboto Mono (as in the layout files). */

@font-face {
  font-family: "Roboto Mono TILES";   /* Roboto Mono Medium v3.001, same as in the layouts */
  src: url("../fonts/RobotoMono-Medium.woff2?v=2") format("woff2"), url("../fonts/RobotoMono-Medium.ttf?v=2") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --red: #cc0000;
  /* light (default) — background #F3F3F3 */
  --bg: #f3f3f3;
  --bg-rgb: 243, 243, 243;
  --fg: #111;
  --dim: rgba(17, 17, 17, .48);
  --faint: rgba(17, 17, 17, .18);
  --line: rgba(17, 17, 17, .14);
  --bd: #cdcdcd;          /* button borders */
  --bd-hi: #8a8a8a;
  --hov: rgba(17, 17, 17, .045);
  --tile-off: #dedede;    /* empty progress tiles */
  --tile-off-hi: #cfcfcf;
  --on-red: #fff;         /* text on red */
  --row: rgba(17, 17, 17, .07);
  --sheen: .55;           /* light on the centre record */
  --kbd: #9a9a9a;
  --pad: 20px;
  --deck-left: 42;                                  /* % width of the deck's text column */
  /* desktop: the logo ends exactly where "Artist" starts in the index header.
     header width W = deck column − pad; inside: 18px padding, columns 40px | 3.2fr | 2.2fr | 1.8fr | 40px, gaps 14px
     → Artist starts at 18 + 40 + 14 + (W − 18 − 136) · 3.2/7.2 + 14 */
  --head-w: calc(var(--deck-left) * 1vw - var(--pad));
  --logo-w: calc(86px + (var(--head-w) - 154px) * 0.444444);
  --logo-h: 22px;                          /* desktop: small, like the very first header */
  --top-pad: 18px;
  --row-gap: 18px;
  --tgap: 4px;
  --top: calc(var(--top-pad) * 2 + var(--logo-h));
  --foot: 46px;
  --fs: 11px;
  --u: 7px;           /* corner mark tile */
  --g: 2px;           /* corner mark gap */
  --ease: cubic-bezier(.2, .7, .1, 1);
}
html[data-theme="dark"] {
  --bg: #000; --bg-rgb: 0, 0, 0; --fg: #f2f2f2;
  --dim: rgba(242, 242, 242, .38); --faint: rgba(242, 242, 242, .14); --line: rgba(242, 242, 242, .12);
  --bd: #2c2c2c; --bd-hi: #555; --hov: rgba(255, 255, 255, .045);
  --tile-off: #1c1c1c; --tile-off-hi: #2a2a2a; --on-red: #000; --row: #0f0f0f; --sheen: 1; --kbd: #444;
}
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--bg); color: var(--fg); overflow: hidden; }
body {
  font-family: "Roboto Mono TILES", ui-monospace, Menlo, monospace;
  font-size: var(--fs);
  line-height: 1.35;
  letter-spacing: .02em;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button, input { font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; background: none; border: 0; outline: 0; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 1px solid var(--red); outline-offset: 2px; }

/* ---------- corner marks (3 tiles, L-shape) ---------- */
.cm {
  position: absolute; width: var(--u); height: var(--u); background: var(--red);
  --o: calc(var(--u) + var(--g));
  pointer-events: none;
}
.cm.tl { top: 0; left: 0;   box-shadow: var(--o) 0 0 var(--red), 0 var(--o) 0 var(--red); }
.cm.tr { top: 0; right: 0;  box-shadow: calc(var(--o) * -1) 0 0 var(--red), 0 var(--o) 0 var(--red); }
.cm.bl { bottom: 0; left: 0;  box-shadow: var(--o) 0 0 var(--red), 0 calc(var(--o) * -1) 0 var(--red); }
.cm.br { bottom: 0; right: 0; box-shadow: calc(var(--o) * -1) 0 0 var(--red), 0 calc(var(--o) * -1) 0 var(--red); }

/* ---------- intro: the TILES logo builds itself tile by tile ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: grid; place-items: center; align-content: center; gap: 28px;
  transition: background-color .7s var(--ease);
}
.loader__logo {
  width: min(46.8vw, 588px); height: auto; overflow: visible; display: block;
  transform-origin: 0 0; transition: transform .9s cubic-bezier(.7, 0, .2, 1);
}
.loader__logo { fill: var(--red); }
/* step 1: the bracket frame fades in */
.loader__logo #introL, .loader__logo #introR { opacity: 0; transition: opacity .45s var(--ease); }
.loader.is-brackets .loader__logo #introL, .loader.is-brackets .loader__logo #introR { opacity: 1; }
.loader__count { color: var(--dim); font-variant-numeric: tabular-nums; font-size: 10px; letter-spacing: .12em; transition: opacity .25s; }
.loader { transition: opacity .8s cubic-bezier(.4, 0, .2, 1); }
.loader.is-out { opacity: 0; pointer-events: none; }
.loader.is-out .loader__count { opacity: 0; }
.loader.is-gone { display: none; }
/* the header logo stays hidden until the intro logo has landed on it */
body:not(.intro-done) .top__logo svg { opacity: 0; }
.top__logo svg { transition: opacity .2s; }
/* everything else fades in under the flying logo */
body.is-loading main, body.is-loading .top__row, body.is-loading .player { opacity: 0; }
main, .top__row, .player { transition: opacity .8s var(--ease) .15s; }
@media (prefers-reduced-motion: reduce) {
  .loader__logo #introL, .loader__logo #introR { opacity: 1; transition: none; animation: none; }
  .loader__logo { transition: none; }
}

/* ---------- header: logo left up to the middle of the screen, tile buttons after it ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 20;
  display: flex; align-items: center; gap: 28px;
  padding: var(--top-pad) var(--pad) var(--top-pad); background: var(--bg);
}
.top__logo { color: var(--red); display: block; width: calc(var(--logo-h) * 6.7492); flex: none; }
.top__logo svg { width: 100%; height: auto; aspect-ratio: 6.7492; fill: currentColor; display: block; }
.top__row { display: flex; align-items: center; justify-content: flex-end; flex: 1; min-width: 0; }

/* ---------- nav: compact block like pavilionaudio.systems — "TLS +" opens to the side ---------- */
.pnav { --ph: 24px; display: flex; align-items: stretch; height: var(--ph); gap: 2px; font-size: 10.5px; letter-spacing: .06em; }
.pnav button { height: var(--ph); display: inline-flex; align-items: center; white-space: nowrap; }
.pnav__brand, .pnav__toggle, .pnav__link { background: var(--fg); color: var(--bg); transition: background .2s, color .2s; }
.pnav__brand { padding: 0 9px; overflow: hidden; }
.pnav__long { display: inline-block; max-width: 0; opacity: 0; overflow: hidden; vertical-align: top;
  transition: max-width .55s cubic-bezier(.7, 0, .2, 1), opacity .3s; }
.pnav__short { display: inline-block; max-width: 4em; overflow: hidden; transition: max-width .45s cubic-bezier(.7, 0, .2, 1), opacity .2s; }
.pnav.is-open .pnav__short { max-width: 0; opacity: 0; }
.pnav.is-open .pnav__long { max-width: 12em; opacity: 1; transition-delay: .05s; }
.pnav__toggle { position: relative; width: var(--ph); flex: none; justify-content: center; }
.pnav__toggle i { position: absolute; left: 50%; top: 50%; width: 9px; height: 1.5px; margin: -.75px 0 0 -4.5px; background: currentColor;
  transition: transform .35s cubic-bezier(.7, 0, .2, 1); }
.pnav__toggle i:last-child { transform: rotate(90deg); }
.pnav.is-open .pnav__toggle { background: #b9b9b9; color: #fff; }
.pnav.is-open .pnav__toggle i:last-child { transform: rotate(0deg); }       /* + → − */
.pnav__menu { display: flex; gap: 2px; max-width: 0; overflow: hidden; transition: max-width .6s cubic-bezier(.7, 0, .2, 1); }
.pnav.is-open .pnav__menu { max-width: 40em; }
.pnav__link { padding: 0 10px; opacity: 0; transform: translateX(10px); transition: background .2s, color .2s, opacity .3s, transform .45s var(--ease); }
.pnav.is-open .pnav__link { opacity: 1; transform: none; }
.pnav.is-open .pnav__link:nth-child(1) { transition-delay: 0s, 0s, .32s, .32s; }
.pnav.is-open .pnav__link:nth-child(2) { transition-delay: 0s, 0s, .27s, .27s; }
.pnav.is-open .pnav__link:nth-child(3) { transition-delay: 0s, 0s, .22s, .22s; }
.pnav.is-open .pnav__link:nth-child(4) { transition-delay: 0s, 0s, .17s, .17s; }
.pnav.is-open .pnav__link:nth-child(5) { transition-delay: 0s, 0s, .12s, .12s; }
.pnav__brand:hover, .pnav__link:hover { background: var(--red); color: #fff; }
.pnav__toggle:hover { background: var(--red); color: #fff; }
/* current view: grey, like Pavilion's active item */
body[data-view="deck"]  .pnav__link[data-view-link="deck"],
body[data-view="grid"]  .pnav__link[data-view-link="grid"],
body[data-view="index"] .pnav__link[data-view-link="index"] { background: #b9b9b9; color: #fff; }
.pnav__link.is-on { background: var(--blk-on, #b9b9b9); color: #fff; }
html[data-theme="dark"] body[data-view="deck"]  .pnav__link[data-view-link="deck"],
html[data-theme="dark"] body[data-view="grid"]  .pnav__link[data-view-link="grid"],
html[data-theme="dark"] body[data-view="index"] .pnav__link[data-view-link="index"],
html[data-theme="dark"] .pnav.is-open .pnav__toggle { background: #555; color: #fff; }

/* ---------- views ---------- */
main { position: fixed; inset: 0; }
.view {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity .22s ease-out, visibility 0s .22s;
}
body[data-view="deck"]  .view--deck,
body[data-view="grid"]  .view--grid,
body[data-view="index"] .view--index { opacity: 1; visibility: visible; transition: opacity .55s var(--ease) .18s; }

/* ---------- DECK ---------- */
.view--deck { display: grid; grid-template-columns: calc(var(--deck-left) * 1vw) 1fr; }
.view--deck .list { order: -1; }
.wheel { position: relative; overflow: hidden; touch-action: none; }
.wheel__items { position: absolute; inset: 0; }
.disc {
  position: absolute; left: 0; top: 0; width: 100px; height: 100px;
  border-radius: 50%; will-change: transform, opacity;
  cursor: pointer;
}
.disc__spin { position: absolute; inset: 0; border-radius: 50%; }
.disc img, .disc .disc__gen {
  position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover; display: block; user-select: none; -webkit-user-drag: none;
  pointer-events: none;
}
.disc--wheel { transition: filter .3s; }
.disc--wheel:not(.is-active):hover { filter: brightness(1.15); }
.is-spinning .disc__spin { animation: spin 1.818s linear infinite; }   /* 33⅓ rpm */
.is-paused .disc__spin { animation: spin 1.818s linear infinite; animation-play-state: paused; }
@keyframes spin { to { transform: rotate(360deg); } }

/* the big record in the middle of the ring */
.center { position: absolute; border-radius: 50%; cursor: pointer; z-index: 2; }
.center__rot { position: absolute; inset: 0; border-radius: 50%; will-change: transform; }
.center__layer {
  position: absolute; inset: 0; border-radius: 50%;
  opacity: 0;
  transition: opacity .35s cubic-bezier(.4, 0, .2, 1);   /* plain cross-fade, no zoom or rotation */
  will-change: opacity;
}
.center__layer.is-on { opacity: 1; transform: none; }
.center__layer img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; display: block; user-select: none; -webkit-user-drag: none; pointer-events: none; will-change: transform; }
.center::after {          /* soft sheen, like light on vinyl */
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  opacity: var(--sheen);
  background: conic-gradient(from 30deg, rgba(255,255,255,0) 0deg, rgba(255,255,255,.07) 40deg, rgba(255,255,255,0) 90deg, rgba(255,255,255,0) 210deg, rgba(255,255,255,.05) 250deg, rgba(255,255,255,0) 290deg);
}

.wheel__frame { position: absolute; pointer-events: none; z-index: 3; transition: opacity .3s; }
.wheel__frame .cm { --u: 6px; --g: 2px; }

/* caption (right column) — catalogue card */
.cap { display: grid; padding: 4px 18px 26px 0; min-height: 0; align-content: start; }
.cap__head { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 18px; }
.cap__num svg { display: block; height: 30px; width: auto; fill: var(--red); }
.cap__of { color: var(--dim); font-size: 10px; letter-spacing: .08em; line-height: 1; padding-bottom: 1px; font-variant-numeric: tabular-nums; }
.cap__title {
  font-weight: inherit; font-size: clamp(18px, 1.6vw, 26px); line-height: 1.05; letter-spacing: -.02em; color: var(--fg);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 26ch;
}
.cap__mix { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; }
.cap__mix span { display: flex; align-items: center; gap: 9px; color: var(--dim); font-size: 11px; letter-spacing: .04em; }
.cap__mix span::before { content: ""; width: 7px; height: 7px; background: var(--red); flex: none; }
.cap__meta {
  display: grid; grid-template-columns: 74px 1fr; margin-top: 12px; max-width: 460px;
  border-top: 1px solid var(--line);
}
.cap__meta dt, .cap__meta dd { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 10.5px; }
.cap__meta dt { color: var(--dim); letter-spacing: .08em; }
.cap__meta dd { color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cap__links { display: flex; flex-wrap: wrap; gap: var(--tgap); margin-top: 18px; }
.cbtn {
  position: relative; display: inline-flex; align-items: center; gap: 10px; height: 30px; padding: 0 12px;
  background: var(--tile-off); color: var(--fg); font-size: 10.5px; letter-spacing: .08em;
  transition: color .2s, background .2s;
}
.cbtn b { font-weight: inherit; color: var(--dim); transition: color .2s, transform .25s var(--ease); }
.cbtn:hover { background: var(--tile-off-hi); color: var(--fg); }
.cbtn:hover b { color: var(--red); transform: translate(2px, -2px); }
.cbtn--play { background: var(--red); color: var(--on-red); padding: 0 16px 0 12px; }
.cbtn--play:hover { background: #e00000; color: var(--on-red); }
.cbtn__ic { width: 8px; height: 9px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.cbtn--play.is-on .cbtn__ic { clip-path: none; background: linear-gradient(90deg, currentColor 0 34%, transparent 34% 66%, currentColor 66%); }

.wheel__hint, .grid__hint {
  position: absolute; right: var(--pad); bottom: calc(var(--foot) + 14px); color: var(--dim); font-size: 10px; pointer-events: none;
  transition: opacity .6s;
}
.has-interacted .wheel__hint, .has-dragged .grid__hint { opacity: 0; }

/* synced list */
.list { position: relative; display: grid; grid-template-rows: auto auto 1fr; padding: calc(var(--top) + 10px) 0 var(--foot) var(--pad); min-height: 0; }
.list__head, .lrow {
  display: grid; grid-template-columns: 40px minmax(0, 3.2fr) minmax(0, 2.2fr) minmax(0, 1.8fr) 40px; gap: 14px;
}
.list__head { color: var(--dim); padding: 8px 0 8px 18px; border-bottom: 1px solid var(--line); font-size: 10px; }
.list__viewport {
  position: relative; overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
          mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
}
.list__rows { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }
.lrow {
  position: relative; height: 26px; align-items: center; padding-left: 18px;
  color: var(--dim); cursor: pointer; transition: color .25s, background .25s;
}
.lrow > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow:hover { color: var(--fg); }
.lrow.is-active { color: var(--fg); background: var(--hov); }
.lrow.is-active::before {
  content: ""; position: absolute; left: 3px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; background: var(--red);
}
.lrow.is-playing { color: var(--red); }
.lrow .n { font-variant-numeric: tabular-nums; }

/* ---------- GRID ---------- */
.view--grid { overflow: hidden; touch-action: none; cursor: grab; }
.view--grid.is-grabbing { cursor: grabbing; }
.grid__plane { position: absolute; inset: 0; }
.tile {
  position: absolute; left: 0; top: 0; background: var(--bg);
  outline: 1px solid var(--line); will-change: transform;
}
.tile .cm { --u: 5px; --g: 2px; opacity: 0; transition: opacity .2s; }
.tile:hover .cm, .tile.is-playing .cm { opacity: 1; }
.tile .disc { position: absolute; left: 7%; top: 7%; width: 86%; height: 86%; cursor: inherit; transition: transform .5s var(--ease); }
.tile:hover .disc { transform: scale(1.035); }
.tile__cap {
  position: absolute; left: 8px; right: 8px; bottom: 6px; font-size: 9.5px; color: var(--fg);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .2s;
  text-shadow: 0 0 6px var(--bg), 0 0 2px var(--bg), 0 0 1px var(--bg); pointer-events: none;
}
.tile__cap b { color: var(--red); font-weight: inherit; margin-right: 6px; }
.tile:hover .tile__cap, .tile.is-playing .tile__cap { opacity: 1; }

/* ---------- INDEX ---------- */
.view--index { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.ix { padding: calc(var(--top) + 18px) var(--pad) calc(var(--foot) + 60px); min-height: 100%; }
.ix__bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 18px; }
.ix__search { display: flex; align-items: center; gap: 14px; flex: 1; max-width: 560px; color: var(--dim); }
.ix__search input {
  flex: 1; border-bottom: 1px solid var(--line); padding: 6px 0; color: var(--fg); text-transform: none;
}
.ix__search input:focus { border-bottom-color: var(--red); }
.ix__search input::placeholder { color: var(--faint); text-transform: uppercase; }
.ix__result { color: var(--dim); }
.ix__head, .irow {
  display: grid; grid-template-columns: 48px minmax(0, 3fr) minmax(0, 2.2fr) minmax(0, 1.8fr) 56px 150px; gap: 16px; align-items: center;
}
.ix__head { position: sticky; top: calc(var(--top) - 4px); background: var(--bg); z-index: 2; padding: 9px 0 9px 20px; border-bottom: 1px solid var(--line); color: var(--dim); font-size: 10px; }
.ix__head button { text-align: left; color: var(--dim); }
.ix__head button:hover, .ix__head button.is-sorted { color: var(--fg); }
.ix__head button.is-sorted::after { content: " ↓"; color: var(--red); }
.ix__head button.is-sorted.is-desc::after { content: " ↑"; }
.irow { position: relative; padding: 0 0 0 20px; height: 34px; border-bottom: 1px solid var(--row); color: var(--dim); cursor: pointer; transition: color .15s, background .15s; }
.irow > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.irow:hover { color: var(--fg); background: var(--hov); }
.irow:hover::before, .irow.is-playing::before {
  content: ""; position: absolute; left: 4px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; background: var(--red);
}
.irow.is-playing { color: var(--red); }
.irow .t { color: var(--fg); display: flex; align-items: center; gap: 14px; }
.irow .t > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.irow .th { width: 24px; height: 24px; border-radius: 50%; flex: none; display: block; background: var(--tile-off); }
.irow.is-playing .th { animation: spin 1.818s linear infinite; }
.irow.is-playing .t { color: var(--red); }
.irow .shop { display: flex; gap: 12px; }
.irow .shop a { color: var(--dim); }
.irow .shop a:hover { color: var(--red); }
.ix__float {
  position: fixed; left: 0; top: 0; width: 220px; height: 220px; z-index: 30; pointer-events: none;
  opacity: 0; transform: translate(-50%, -50%) scale(.6); transition: opacity .25s, transform .35s var(--ease);
}
.ix__float.is-on { opacity: 1; }
.ix__float img { width: 100%; height: 100%; border-radius: 50%; animation: spin 1.818s linear infinite; display: block; }

/* ---------- source window ---------- */
.src {
  position: fixed; left: var(--pad); bottom: calc(var(--foot) + 16px); z-index: 25;
  width: 256px; padding: 14px 14px 14px; background: var(--bg);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility 0s .35s;
}
.src.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.src .cm { --u: 4px; --g: 2px; }
.src__bar { display: flex; justify-content: space-between; color: var(--dim); font-size: 9.5px; margin-bottom: 8px; }
.src__bar button:hover { color: var(--red); }
.src__body { position: relative; width: 228px; height: 128px; background: #000; }
.src__body iframe, .src__body > div { width: 100% !important; height: 100% !important; display: block; }
.src.is-min .src__body { height: 0; overflow: hidden; }
.src.is-min .src__bar { margin: 0; }
.src.is-audio .src__body { height: 0; overflow: hidden; }
.src.is-audio .src__bar { margin: 0; }

/* ---------- player ---------- */
.player {
  position: fixed; inset: auto 0 0 0; height: var(--foot); z-index: 26; background: var(--bg);
  border-top: 1px solid var(--line);
  display: grid; align-items: center;
  grid-template-columns: 34px minmax(120px, 1fr) auto minmax(140px, 340px) 110px 74px;
  gap: 18px; padding: 0 var(--pad);
}
.p__cell { min-width: 0; white-space: nowrap; }
.p__mark { display: grid; grid-template-columns: 8px 8px; gap: 2px; width: 18px; }
.p__mark i { width: 8px; height: 8px; background: var(--red); }
.p__mark i:nth-child(4) { background: transparent; }
.is-playing-any .p__mark i { animation: eq .9s steps(2) infinite; }
.is-playing-any .p__mark i:nth-child(2) { animation-duration: .7s; }
.is-playing-any .p__mark i:nth-child(3) { animation-duration: 1.1s; }
.is-playing-any .p__mark i:nth-child(4) { animation: eq4 .8s steps(2) infinite; }
@keyframes eq { 50% { opacity: .15; } }
@keyframes eq4 { 50% { background: var(--red); } }
.p__nr { color: var(--red); font-variant-numeric: tabular-nums; }
.p__now { overflow: hidden; }
.p__marquee { display: inline-flex; white-space: nowrap; will-change: transform; }
.p__marquee.is-run { animation: marquee var(--mq, 12s) linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(var(--mq-dist, -50%)); } }
.p__now .sep { color: var(--dim); margin: 0 8px; }
.p__ctrl { display: flex; gap: 14px; }
.p__ctrl button { color: var(--dim); }
.p__ctrl button:hover { color: var(--fg); }
.p__ctrl .p__play { color: var(--fg); min-width: 44px; text-align: left; }
#bShuf.is-on { color: var(--red); }
.p__ctrl .p__amp { color: var(--fg); border: 1px solid var(--bd); padding: 1px 6px; line-height: 1.2; }
.p__ctrl .p__amp:hover, .p__ctrl .p__amp.is-on { border-color: var(--red); color: var(--red); }
.p__prog { display: flex; gap: 2px; height: 9px; cursor: pointer; align-items: center; overflow: hidden; }
.p__prog i { flex: none; width: 8px; height: 8px; background: var(--tile-off); transition: background .15s; }
.p__prog i.on { background: var(--red); }
.p__prog:hover i:not(.on) { background: var(--tile-off-hi); }
.p__time { color: var(--dim); font-variant-numeric: tabular-nums; }
.p__shop { display: flex; gap: 14px; }
.p__shop a { color: var(--fg); }
.p__shop a:hover { color: var(--red); }
.p__clock { color: var(--dim); text-align: right; font-variant-numeric: tabular-nums; }
.p__state { color: var(--red); }

/* ---------- TILES·AMP (Winamp-style player) ---------- */
.amp {
  --ab: #2f2f2f;  --ad: #000;        /* bevel light / dark */
  position: fixed; right: 22px; bottom: calc(var(--foot) + 18px); z-index: 28; width: 378px;
  background: #060606; border: 1px solid #262626;
  box-shadow: 0 24px 70px rgba(0,0,0,.75), 0 0 0 1px #000;
  user-select: none; -webkit-user-select: none; text-transform: uppercase;
}
.amp:not(.is-open) { display: none; }
.amp .cm { --u: 4px; --g: 2px; z-index: 2; }
.amp.is-dragging { box-shadow: 0 30px 90px rgba(0,0,0,.9), 0 0 0 1px var(--red); }
.amp__bar {
  height: 22px; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 14px;
  background: linear-gradient(#141414, #0a0a0a); border-bottom: 1px solid #000; cursor: grab;
}
.amp.is-dragging .amp__bar { cursor: grabbing; }
.amp__logo { height: 9px; width: calc(9px * 6.7492); fill: var(--red); flex: none; display: block; }
.amp__grip {
  flex: 1; height: 6px; opacity: .9;
  background: repeating-linear-gradient(90deg, #3a0000 0 2px, transparent 2px 4px), repeating-linear-gradient(#000 0 1px, transparent 1px 2px);
  background-blend-mode: normal;
}
.amp__name { font-size: 9px; color: #6a6a6a; letter-spacing: .12em; }
.amp__mini {
  width: 14px; height: 14px; font-size: 9px; line-height: 12px; text-align: center; color: #9a9a9a;
  background: linear-gradient(#2a2a2a, #161616); border: 1px solid; border-color: #4a4a4a #000 #000 #4a4a4a;
}
.amp__mini:hover { color: #fff; }
.amp__mini:active { border-color: #000 #4a4a4a #4a4a4a #000; color: var(--red); }
.amp__mini.is-on { color: var(--red); }

.amp__main { padding: 9px 10px 10px; }
.bevel-in, .amp__lcd, .amp__ticker, .amp__seek {
  border: 1px solid; border-color: #000 #2a2a2a #2a2a2a #000;
}
.amp__lcd {
  display: grid; grid-template-columns: 92px 1fr; gap: 8px; padding: 6px; background: #080000;
  position: relative;
}
.amp__lcd::after {   /* faint scanlines over the whole display */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(rgba(0,0,0,.18) 0 1px, transparent 1px 3px);
}
.amp__screen {
  position: relative; width: 92px; height: 92px; background: #000; overflow: hidden;
  outline: 1px solid #1a0000; outline-offset: -1px;
}
.amp__screen img {
  position: absolute; inset: 7px; width: 78px; height: 78px; border-radius: 50%; display: none; object-fit: cover;
  filter: saturate(.9) contrast(1.05);
}
.amp__screen.has-cover img { display: block; }
.amp.is-playing .amp__screen img { animation: spin 1.818s linear infinite; }
.amp__nosig { position: absolute; inset: 0; display: grid; place-items: center; font-size: 8px; color: #3a0000; letter-spacing: .1em; }
.amp__screen.has-cover .amp__nosig { display: none; }
.amp__readout { display: grid; grid-template-rows: 30px 50px; gap: 6px; min-width: 0; align-content: start; }
.amp__status { display: flex; align-items: center; gap: 6px; min-width: 0; }
.amp__state { width: 9px; height: 9px; flex: none; background: #2a0000; }
.amp__state.is-play { background: var(--red); clip-path: polygon(0 0, 100% 50%, 0 100%); box-shadow: 0 0 6px var(--red); }
.amp__state.is-pause { background: linear-gradient(90deg, var(--red) 0 35%, transparent 35% 65%, var(--red) 65%); }
.amp__state.is-stop { background: var(--red); }
#lcdTime { flex: 1; height: 30px; min-width: 0; display: block; cursor: pointer; }
#lcdSpec { width: 100%; height: 50px; display: block; }
.amp__lamps {
  grid-column: 1 / -1; display: flex; gap: 10px; font-size: 8.5px; letter-spacing: .08em; color: #3a0000;
  border-top: 1px solid #1a0000; padding-top: 5px; margin-top: -1px;
}
.amp__lamps .on { color: #ff2a1a; text-shadow: 0 0 6px rgba(255,40,20,.7); }
.amp__nr { margin-left: auto; color: #ff2a1a; text-shadow: 0 0 6px rgba(255,40,20,.5); font-variant-numeric: tabular-nums; }
.amp__ticker { display: block; width: 100%; height: 22px; margin-top: 7px; background: #080000; }

.amp__seek {
  position: relative; height: 12px; margin: 9px 0 9px; cursor: pointer; touch-action: none;
  background: repeating-linear-gradient(90deg, #161616 0 5px, #0c0c0c 5px 7px);
}
.amp__seek i { position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: repeating-linear-gradient(90deg, #7a0000 0 5px, #3a0000 5px 7px); }
.amp__seek b {
  position: absolute; top: -1px; width: 14px; height: 12px; left: 0;
  background: linear-gradient(#3a3a3a, #1a1a1a); border: 1px solid; border-color: #6a6a6a #000 #000 #6a6a6a;
}
.amp__seek b::after { content: ""; position: absolute; left: 4px; right: 4px; top: 3px; bottom: 3px; background: var(--red); }

.amp__row { display: flex; align-items: center; gap: 8px; }
.amp__ctrl { display: flex; gap: 3px; }
.pbtn {
  height: 22px; min-width: 28px; display: grid; place-items: center; color: #cfcfcf;
  background: linear-gradient(#2c2c2c, #141414); border: 1px solid; border-color: #555 #000 #000 #555;
}
.pbtn:hover { color: #fff; }
.pbtn:active, .pbtn.is-on { border-color: #000 #555 #555 #000; background: linear-gradient(#0e0e0e, #1c1c1c); color: var(--red); }
.pbtn svg { display: block; }
.amp.is-playing #aPlay { color: var(--red); }
.pbtn--txt { font-size: 9px; padding: 0 7px; letter-spacing: .06em; }
.amp__vol { flex: 1; height: 22px; display: flex; align-items: flex-end; gap: 2px; cursor: pointer; padding: 2px 0; touch-action: none; }
.amp__vol i { flex: 1; height: var(--h); background: #1e1e1e; }
.amp__vol i.on { background: var(--red); }
.amp__vol:hover i:not(.on) { background: #2c2c2c; }
.amp__shop { display: flex; gap: 14px; margin-top: 9px; font-size: 10px; min-height: 13px; }
.amp__shop:empty { display: none; }
.amp__shop a { color: #bdbdbd; }
.amp__shop a:hover { color: var(--red); }


/* windowshade: title bar + ticker + transport only */
.amp.is-shade .amp__lcd, .amp.is-shade .amp__seek, .amp.is-shade .amp__shop, .amp.is-shade .amp__vol, .amp.is-shade #aShuf { display: none; }
.amp.is-shade .amp__ticker { margin-top: 0; margin-bottom: 8px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* pop-out window (Document Picture-in-Picture) */
body.amp-pip { margin: 0; background: #060606; overflow: hidden; height: auto; }
.amp.is-pip { position: static; width: 100%; border: 0; box-shadow: none; }
.amp.is-pip .amp__bar { cursor: default; }

/* ---------- info: drawer from the right, built from blocks ---------- */
.info {
  position: fixed; inset: 0; z-index: 19; background: rgba(var(--bg-rgb), .55);
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease .3s, visibility 0s .6s;          /* closing: the drawer slides out first, then the backdrop fades */
}
.info.is-on { opacity: 1; visibility: visible; transition: opacity .3s ease; }
.info__panel {
  position: absolute; top: var(--top); right: var(--pad); bottom: calc(var(--foot) + 12px); width: min(440px, calc(100vw - 2 * var(--pad)));
  display: flex; flex-direction: column; gap: 2px; overflow-y: auto;
  transform: translateX(48px); opacity: 0;
  transition: transform .55s cubic-bezier(.7, 0, .2, 1), opacity .45s cubic-bezier(.7, 0, .2, 1);   /* same curve in and out */
}
.info.is-on .info__panel { transform: none; opacity: 1; }
.info__bar { display: flex; gap: 2px; justify-content: flex-end; }
.info__tab, .info__close { height: 24px; display: inline-flex; align-items: center; gap: 8px; padding: 0 10px; font-size: 10.5px; letter-spacing: .06em; }
.info__tab { background: var(--blk-on); color: var(--blk-on-fg); }
.info__close { background: var(--blk); color: var(--blk-fg); }
.info__close i { font-style: normal; }
.info__lead {
  background: var(--blk); color: var(--blk-fg); padding: 18px 16px 20px;
  font-size: 19px; line-height: 1.18; letter-spacing: -.01em;
}
.info__logo { background: var(--tile-off); padding: 22px 16px; }
.info__logo svg { display: block; width: 100%; height: auto; aspect-ratio: 6.7492; fill: var(--red); }
.info__links { display: grid; gap: 2px; }
.info__links a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; height: 34px; padding: 0 12px;
  background: var(--blk); color: var(--blk-fg); font-size: 10.5px; letter-spacing: .06em; transition: background .2s, color .2s;
}
.info__links a span { opacity: .55; }
.info__links a b { font-weight: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info__links a:hover { background: var(--red); color: #fff; }
.info__links a:hover span { opacity: .8; }
.info__small { background: var(--tile-off); color: var(--dim); padding: 12px; font-size: 9.5px; line-height: 1.55; }

/* ---------- cursor ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none;
  width: 9px; height: 9px; background: var(--red); margin: -4.5px 0 0 -4.5px;
  opacity: 0; transition: opacity .2s, width .25s var(--ease), height .25s var(--ease), margin .25s var(--ease);
}
.cursor span {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%); white-space: nowrap;
  color: var(--fg); font-size: 10px; text-shadow: 0 0 4px var(--bg), 0 0 2px var(--bg);
}
.has-pointer .cursor.is-on { opacity: 1; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .player { grid-template-columns: 26px minmax(100px, 1fr) auto minmax(100px, 220px) 100px; }
  .p__clock { display: none; }
}
@media (max-width: 900px) {
  :root { --pad: 14px; --foot: 92px; --logo-h: 22px; --top: calc(var(--top-pad) * 2 + 24px); }
  .player {
    grid-template-columns: 20px minmax(0, 1fr) auto;
    grid-template-rows: 1fr 1fr; row-gap: 0; column-gap: 12px; padding-bottom: env(safe-area-inset-bottom);
  }
  .p__mark { grid-row: 1; }
  .p__ctrl { grid-column: 3; grid-row: 1; gap: 2px; }
  #bShuf, #bAmp { display: none; }
  .amp { display: none !important; }
  .p__prog { grid-column: 1 / 3; grid-row: 2; }
  .p__time { grid-column: 3; grid-row: 2; text-align: right; }
  .p__shop, .p__clock { display: none; }
  .src { right: 10px; left: auto; bottom: calc(var(--foot) + 10px); width: 176px; padding: 10px; }
  .src__body { width: 156px; height: 88px; }
  .top__row { position: absolute; right: var(--pad); top: var(--top-pad); }   /* menu opens over the logo */
  /* open menu: logo slides out to the left, the bar grows from the + leftwards over the full width; closing brings the logo back */
  .top__logo { transition: transform .55s cubic-bezier(.7, 0, .2, 1), opacity .4s cubic-bezier(.7, 0, .2, 1); }
  body.nav-open .top__logo { transform: translateX(calc(-100% - var(--pad))); opacity: 0; pointer-events: none; }
  .pnav { width: calc(var(--ph) + 2px); justify-content: flex-end; transition: width .6s cubic-bezier(.7, 0, .2, 1); }
  body.nav-open .pnav { width: calc(100vw - 2 * var(--pad)); }
  .pnav__menu, .pnav.is-open .pnav__menu { max-width: none; flex: 1; min-width: 0; }
  .pnav__link { flex: 1; justify-content: center; padding: 0 4px; min-width: 0; }
  .pnav__long { display: none; }
  .pnav.is-open .pnav__short { max-width: 4em; opacity: 1; }
  .top__meta { display: none; }
  .view--deck { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .view--deck .list { order: 0; }
  .list { padding: 0 var(--pad) calc(var(--foot) + 4px); grid-template-rows: auto; }
  .list__head, .list__viewport { display: none; }
  /* fixed height so the ring never moves or resizes between tracks (title + mix line + 4 rows) */
  .cap { padding: 4px 0 0 0; height: 190px; overflow: hidden; align-content: start; }
  .cap__mix span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .cap__mix span::before { display: inline-block; margin-right: 9px; vertical-align: 1px; }
  .cap__mix span + span { display: none; }
  .cap__head { margin-bottom: 10px; }
  .cap__num svg { height: 20px; }
  .cap__title { font-size: 18px; max-width: none; -webkit-line-clamp: 1; }
  .cap__mix { margin-top: 6px; }
  .cap__meta { margin-top: 10px; max-width: none; }
  .cap__meta dt, .cap__meta dd { padding: 6px 0; }
  .cap__links { margin-top: 12px; }
  .wheel__frame .cm { --u: 4px; --g: 2px; }
  .list__head { display: none; }
  .list__head, .lrow { grid-template-columns: 34px minmax(0, 1.4fr) minmax(0, 1fr); }
  .lrow span:nth-child(4), .lrow span:nth-child(5) { display: none; }
  .wheel__hint { display: none; }
  .disc__label { display: none; }
  .ix__head, .irow { grid-template-columns: 34px minmax(0, 1.5fr) minmax(0, 1fr) 44px; gap: 10px; }
  .ix__head > :nth-child(4), .irow > :nth-child(4), .ix__head > :nth-child(6), .irow > :nth-child(6) { display: none; }
  .ix__float { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .p__marquee.is-run { animation: none; }
  .is-spinning .disc__spin, .ix__float img { animation-duration: 6s; }
}


/* =====================================================================
   BLOCK UI — the Pavilion-style language for the whole interface:
   solid dark blocks with light text, 2px apart, 24px high;
   active = grey, hover = TILES red; inverted in dark mode.
   ===================================================================== */
:root { --blk: var(--fg); --blk-fg: var(--bg); --blk-on: #b9b9b9; --blk-on-fg: #fff; --bh: 24px; }
html[data-theme="dark"] { --blk-on: #555; --blk-on-fg: #fff; }

/* track info buttons */
.cap__links { gap: 2px; }
.cbtn, .cbtn--play { height: var(--bh); padding: 0 10px; background: var(--blk); color: var(--blk-fg); gap: 8px; font-size: 10.5px; letter-spacing: .06em; }
.cbtn b { color: inherit; opacity: .6; }
.cbtn:hover, .cbtn--play:hover { background: var(--red); color: #fff; }
.cbtn:hover b { color: inherit; opacity: 1; }
.cbtn--play.is-on { background: var(--blk-on); color: var(--blk-on-fg); }
.cbtn__ic { width: 7px; height: 8px; }

/* deck: index list rows */
.lrow { height: 24px; margin-bottom: 2px; }
.lrow.is-active::before { display: none; }
.lrow.is-active { background: var(--blk-on); color: var(--blk-on-fg); }
.lrow.is-playing { background: var(--red); color: #fff; }
.lrow:hover:not(.is-active):not(.is-playing) { background: var(--blk); color: var(--blk-fg); }
.list__head { border-bottom: 0; }

/* player bar */
.p__now { background: var(--blk); color: var(--blk-fg); height: var(--bh); display: flex; align-items: center; padding: 0 10px; overflow: hidden; }
.p__now .sep { color: inherit; opacity: .45; }
.p__ctrl { gap: 2px; }
.p__ctrl button, .p__ctrl .p__play, .p__ctrl .p__amp {
  height: var(--bh); padding: 0 10px; background: var(--blk); color: var(--blk-fg); border: 0; min-width: 0; line-height: 1;
  transition: background .2s, color .2s;
}
.p__ctrl button:hover, .p__ctrl .p__amp:hover { background: var(--red); color: #fff; }
.is-playing-any .p__ctrl .p__play, #bShuf.is-on, .p__ctrl .p__amp.is-on { background: var(--blk-on); color: var(--blk-on-fg); }
.p__prog { height: var(--bh); padding: 0; }
.p__time, .p__clock { color: var(--fg); }

/* YouTube source window */
.src__bar { align-items: stretch; gap: 2px; font-size: 9.5px; }
.src__bar span, .src__bar button { background: var(--blk); color: var(--blk-fg); padding: 4px 8px; }
.src__bar span { flex: 1; }
.src__bar button:hover { background: var(--red); color: #fff; }

/* grid: caption block on the tile */
.tile__cap { left: 10px; right: auto; bottom: 10px; max-width: calc(100% - 20px); width: max-content; padding: 5px 8px;
  background: var(--blk); color: var(--blk-fg); text-shadow: none; }
.tile__cap b { color: inherit; opacity: .55; }

/* index view */
.ix__search span { background: var(--blk); color: var(--blk-fg); height: var(--bh); display: inline-flex; align-items: center; padding: 0 10px; }
.ix__search { gap: 2px; }
.ix__search input { height: var(--bh); padding: 0 10px; border: 0; background: var(--tile-off); }
.ix__search input:focus { border: 0; outline: 1px solid var(--red); outline-offset: -1px; }
.ix__result { background: var(--blk); color: var(--blk-fg); height: var(--bh); display: inline-flex; align-items: center; padding: 0 10px; }
.ix__head { border-bottom: 0; }
.ix__head button { padding: 4px 8px; margin-left: -8px; width: max-content; }
.ix__head button:hover { background: var(--blk); color: var(--blk-fg); }
.ix__head button.is-sorted { background: var(--blk-on); color: var(--blk-on-fg); }
.ix__head button.is-sorted::after { color: inherit; }
.irow { height: 32px; border-bottom: 0; margin-bottom: 2px; }
.irow:hover { background: var(--blk); color: var(--blk-fg); }
.irow:hover .t, .irow:hover .shop a { color: var(--blk-fg); }
.irow:hover::before, .irow.is-playing::before { display: none; }
.irow.is-playing, .irow.is-playing .t { background: var(--red); color: #fff; }
.irow.is-playing .shop a { color: #fff; }
.irow .shop { gap: 2px; }
.irow .shop a { padding: 3px 7px; outline: 1px solid currentColor; outline-offset: -1px; }
.irow .shop a:hover { background: var(--red); color: #fff; outline-color: var(--red); }

.info__close:hover { background: var(--red); color: #fff; }

/* cursor label */
.cursor span { background: var(--blk); color: var(--blk-fg); padding: 4px 8px; text-shadow: none; left: 14px; }
.cursor { background: var(--red); }

@media (max-width: 900px) {
}
/* the YouTube window sits bottom right (the text column is on the left now) */
@media (min-width: 901px) { .src { left: auto; right: var(--pad); } }
.wheel__hint, .grid__hint { background: var(--blk); color: var(--blk-fg); padding: 5px 8px; font-size: 9.5px; }

/* YouTube player is not shown — it stays in the page (off-screen) only so playback works */
.src, .src.is-on, .src.is-min { position: fixed !important; left: -10000px !important; top: 0 !important; right: auto !important; bottom: auto !important;
  width: 228px !important; padding: 0 !important; opacity: 0 !important; visibility: visible !important; pointer-events: none !important; transform: none !important; }
.src .src__body { width: 228px !important; height: 128px !important; }

/* shop links as plain rows in the info table */
.cap__links:empty { display: none; }
.cap__shop { color: var(--fg); display: inline-flex; gap: 6px; align-items: baseline; transition: color .2s; }
.cap__shop b { font-weight: inherit; color: var(--dim); display: inline-block; transition: color .2s, transform .25s var(--ease); }
.cap__shop:hover, .cap__shop:hover b { color: var(--red); }
.cap__shop:hover b { transform: translate(2px, -2px); }

/* credit row: set apart from the TILES links */
.info__links a.info__credit { margin-top: 10px; background: var(--tile-off); color: var(--fg); }
.info__links a.info__credit:hover { background: var(--red); color: #fff; }

/* shop links side by side in one row */
.cap__shops { display: flex; gap: 22px; }
.cap__none { color: var(--dim); }

/* desktop too: one-line title + one-line mix, fixed block height -> the index list never moves */
.cap { height: 216px; overflow: hidden; }
.cap__title { -webkit-line-clamp: 1; max-width: none; white-space: nowrap; display: block; overflow: hidden; text-overflow: ellipsis; }
.cap__mix { min-height: 15px; }
.cap__mix span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.cap__mix span::before { display: inline-block; margin-right: 9px; vertical-align: 1px; }
.cap__mix span + span { display: none; }
@media (max-width: 900px) { .cap { height: 190px; } }

/* title + mix on one line */
.cap__title { display: flex !important; align-items: baseline; gap: 14px; white-space: nowrap; overflow: hidden; }
.cap__main { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cap__mixin { flex: 0 100 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .04em; color: var(--dim); }
.cap__mixin::before { content: ""; width: 7px; height: 7px; background: var(--red); flex: none; align-self: center; }
.cap__mix { display: none !important; }
.cap { height: 196px; }
@media (max-width: 900px) { .cap { height: 168px; } }

/* no rule above the player bar */
.player { border-top: 0 !important; }
