/* GreatMap Hub — Spotify-style layout, Kleverb-style hardware look
   (cream faceplates, black ink, GreatMap blue chassis). Colours live here. */
:root {
  --blue: #6FB4F9;
  --blue-deep: #3F8EE0;
  --blue-ink: #2B6FBF;
  --face: #F5F2E9;
  --face-2: #E9E4D6;
  --face-3: #DCD5C3;
  --ink: #111111;
  --ink-2: #4A4740;
  --ink-3: #8A857A;
  --led-on: #FF4B3E;
  --led-ok: #35C76F;
  --led-off: #BDB6A4;
  --radius: 22px;
  --line: 2px solid var(--ink);
  --font: "League Spartan", "Futura", "Avenir Next", system-ui, sans-serif;
  --gutter: 16px;
  --side-w: 248px;
  --player-h: 92px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--blue);
  /* paint-speckle texture like the logo */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.045' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .5 0 0 0 0 .85 0 0 0 -9 5.6'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  background-attachment: fixed;
}
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.label, legend, .crumbs, .hw-btn, .stage-btn, .chip, .nav-item, .th {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 700;
  font-size: 11px;
}

/* ---------- shell: sidebar + main ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); gap: 14px; padding: 14px; min-height: 100vh; }
.shell:has(.sidebar[hidden]) { display: block; padding: 0; }
.sidebar {
  position: sticky; top: 14px; align-self: start;
  min-height: calc(100vh - 28px - var(--player-h) - 14px);
  max-height: calc(100vh - 28px); overflow-y: auto; /* short windows: scroll inside instead of spilling out */
  display: flex; flex-direction: column; gap: 22px;
  padding: 18px 16px; background: var(--face);
  border: 3px solid var(--ink); border-radius: var(--radius);
  box-shadow: 0 6px 0 var(--ink);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.emblem { width: 44px; height: 44px; border-radius: 50%; border: var(--line); background: #fff; object-fit: cover; flex: none; }
.wordmark { font-weight: 800; letter-spacing: .26em; font-size: 15px; line-height: 1; }
.wordmark small { display: block; font-size: 9px; letter-spacing: .5em; color: var(--ink-3); margin-top: 4px; }
.nav { display: grid; gap: 10px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 0 14px; min-height: 48px;
  text-decoration: none; font-size: 12px;
  border: var(--line); border-radius: 10px; background: linear-gradient(#fff, var(--face-2));
  box-shadow: 0 3px 0 var(--ink);
}
.nav-item svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; flex: none; }
.nav-item:hover { background: #fff; }
.nav-item.on { background: var(--ink); color: var(--face); transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding-top: 14px; border-top: 1.5px dashed var(--ink-3); }
.side-foot .who { flex: 1; min-width: 0; font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

main { min-width: 0; outline: none; padding-bottom: calc(var(--player-h) + 30px + env(safe-area-inset-bottom)); }

@media (max-width: 760px) {
  .shell { display: block; padding: 0; }
  .sidebar {
    position: sticky; top: 0; z-index: 15; height: auto; min-height: 0; max-height: none; overflow: visible;
    flex-direction: row; align-items: center; gap: 10px;
    padding: calc(8px + env(safe-area-inset-top)) var(--gutter) 8px;
    border-width: 0 0 3px; border-radius: 0; box-shadow: none;
  }
  .wordmark { display: none; }
  .emblem { width: 38px; height: 38px; }
  .nav { display: flex; gap: 8px; flex: 1; }
  .nav-item { flex: 1; min-height: 40px; padding: 0 10px; justify-content: center; font-size: 10px; gap: 6px; letter-spacing: .1em; }
  .nav-item svg { width: 16px; height: 16px; }
  .side-foot { margin: 0; padding: 0; border: 0; }
  .side-foot .who, .side-foot .led { display: none; }
  main { padding: 14px var(--gutter) calc(var(--player-h) + 30px + env(safe-area-inset-bottom)); }
}

/* ---------- faceplates & modules ---------- */
.faceplate {
  background: var(--face);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 6px 0 var(--ink), 0 18px 40px rgba(20, 60, 120, .25);
  padding: 22px;
}
.faceplate + .faceplate { margin-top: 18px; }
.plate-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.plate-title { margin: 0; font-size: clamp(28px, 5vw, 44px); font-weight: 800; letter-spacing: .05em; text-transform: uppercase; line-height: .95; overflow-wrap: anywhere; }
.plate-sub { margin: 6px 0 0; color: var(--ink-2); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.plate-sub a { text-decoration: none; border-bottom: 1.5px solid currentColor; }

fieldset.module { border: var(--line); border-radius: 14px; margin: 0; padding: 16px; min-width: 0; background: var(--face); }
fieldset.module > legend { padding: 3px 10px; border: var(--line); border-radius: 6px; background: var(--ink); color: var(--face); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px; }
.stack { display: grid; gap: 18px; align-content: start; }
@media (max-width: 980px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- home sections (Spotify-style rows) ---------- */
.section + .section { margin-top: 28px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.section-head .tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.linkish { background: none; border: 0; padding: 4px 0; cursor: pointer; font-weight: 700; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1.5px solid transparent; }
.linkish:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* row 1: small artist boxes */
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
@media (max-width: 560px) { .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.qbox {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding-right: 12px; overflow: hidden;
  text-decoration: none; cursor: pointer; text-align: left;
  border: var(--line); border-radius: 10px; background: var(--face-2);
  box-shadow: 0 3px 0 var(--ink); transition: transform .1s, box-shadow .1s;
}
.qbox:hover { background: #fff; }
.qbox:active, .qbox.on { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.qbox.on { background: var(--ink); color: var(--face); }
.qbox .qimg { width: 64px; height: 64px; flex: none; border-right: var(--line); background: var(--blue); display: grid; place-items: center; overflow: hidden; }
.qbox.on .qimg { border-right-color: var(--face); }
.qbox .qimg img { width: 100%; height: 100%; object-fit: cover; }
.qbox .qimg .initial { font-size: 26px; font-weight: 800; color: var(--ink); }
.qbox .qname { font-weight: 700; font-size: 15px; letter-spacing: .04em; line-height: 1.15; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qbox.add { background: transparent; border-style: dashed; box-shadow: none; }
.qbox.add .qimg { background: transparent; border-right-style: dashed; font-size: 30px; }
@media (max-width: 560px) { .qbox { min-height: 52px; gap: 8px; } .qbox .qimg { width: 52px; height: 52px; } .qbox .qname { font-size: 13px; } }

/* rows 2 & 3: big cover cards on a shelf */
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: 184px; gap: 16px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.shelf.all { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); grid-auto-columns: unset; overflow: visible; }
@media (max-width: 560px) { .shelf { grid-auto-columns: 148px; gap: 12px; } .shelf.all { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px;
  text-decoration: none; scroll-snap-align: start; min-width: 0;
  border: var(--line); border-radius: 14px; background: var(--face-2);
  box-shadow: 0 4px 0 var(--ink); transition: transform .12s, box-shadow .12s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); background: #fff; }
.card .cover-art { position: relative; aspect-ratio: 1; border: var(--line); border-radius: 8px; overflow: hidden; background: var(--blue); }
.card .cover-art img { width: 100%; height: 100%; object-fit: cover; }
.card .knob { position: absolute; right: 10px; bottom: 10px; width: 46px; height: 46px; opacity: 0; transform: translateY(6px); transition: opacity .15s, transform .15s; }
.card:hover .knob, .card .knob.playing, .card .knob:focus-visible { opacity: 1; transform: none; }
@media (hover: none) { .card .knob { opacity: 1; transform: none; width: 40px; height: 40px; } }
.card .c-link { text-decoration: none; }
.card .c-link::after { content: ""; position: absolute; inset: 0; border-radius: 14px; } /* whole card clickable */
.card .knob { z-index: 2; }
.card:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
.card .c-title { font-weight: 800; font-size: 15px; letter-spacing: .03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .c-sub { font-size: 12px; color: var(--ink-2); letter-spacing: .06em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: -4px; }
.card.add { background: transparent; border-style: dashed; box-shadow: none; cursor: pointer; text-align: left; }
.card.add .cover-art { background: transparent; border-style: dashed; display: grid; place-items: center; font-size: 46px; }

/* placeholder cover: blue with big initials, like the logo's paint */
.ph { width: 100%; height: 100%; display: grid; place-items: center; background: var(--blue);
  background-image: radial-gradient(circle at 30% 25%, rgba(255,255,255,.35) 0 18%, transparent 19%), radial-gradient(circle at 75% 80%, rgba(43,111,191,.35) 0 12%, transparent 13%);
}
.ph span { font-size: 54px; font-weight: 800; letter-spacing: .02em; color: var(--ink); text-transform: uppercase; }

.empty-row { padding: 18px; border: 2px dashed var(--ink-3); border-radius: 12px; color: var(--ink-2); font-size: 14px; }

/* ---------- hardware buttons, chips, LEDs ---------- */
.hw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; cursor: pointer;
  border: var(--line); border-radius: 8px;
  background: linear-gradient(#fff, var(--face-2));
  box-shadow: 0 3px 0 var(--ink);
  text-decoration: none; white-space: nowrap;
}
.hw-btn:hover { background: #fff; }
.hw-btn:active, .hw-btn.on { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.hw-btn.primary { background: var(--ink); color: var(--face); }
.hw-btn.primary:hover { background: #2a2a2a; }
.hw-btn.blue { background: var(--blue); }
.hw-btn.small { min-height: 32px; padding: 0 12px; font-size: 10px; }
.hw-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.hw-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.led { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--led-off); border: 1.5px solid var(--ink); flex: none; }
.led.on { background: var(--led-on); box-shadow: 0 0 8px var(--led-on); }
.led.ok { background: var(--led-ok); box-shadow: 0 0 8px var(--led-ok); }
.chip { display: inline-block; padding: 4px 8px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--face); white-space: nowrap; }
.chip.dark { background: var(--ink); color: var(--face); }
.chip.blue { background: var(--blue); }
.seg { display: inline-flex; border: var(--line); border-radius: 8px; overflow: hidden; box-shadow: 0 3px 0 var(--ink); }
.seg button { border: 0; border-right: var(--line); background: var(--face-2); padding: 0 12px; min-height: 32px; cursor: pointer; font-weight: 700; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--face); }

/* ---------- round play knobs ---------- */
.knob {
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer; flex: none;
  border: var(--line);
  background: radial-gradient(circle at 35% 30%, #fff, var(--face-3) 70%);
  box-shadow: 0 3px 0 var(--ink);
  display: grid; place-items: center; padding: 0;
}
.knob:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.knob:disabled { opacity: .4; cursor: not-allowed; }
.knob .tri { width: 0; height: 0; border-left: 13px solid var(--ink); border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 4px; }
.knob.playing .tri { width: 12px; height: 14px; border: none; margin: 0; background: linear-gradient(90deg, var(--ink) 0 4px, transparent 4px 8px, var(--ink) 8px 12px); }
.knob.big { width: 64px; height: 64px; }
.knob.big .tri { border-left-width: 18px; border-top-width: 11px; border-bottom-width: 11px; }
.knob.big.playing .tri { width: 16px; height: 20px; background: linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 10px, var(--ink) 10px 16px); }

/* ---------- release page: track list ---------- */
.songlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.song-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: var(--line); border-radius: 12px; background: var(--face-2); }
.song-row .name { font-weight: 700; font-size: 17px; text-decoration: none; overflow-wrap: anywhere; }
.song-row .name:hover { text-decoration: underline; }
.meter { display: flex; gap: 4px; margin-top: 6px; }
.meter span { width: 18px; height: 6px; border-radius: 2px; background: var(--face-3); border: 1px solid var(--ink-3); }
.meter span.on { background: var(--blue); border-color: var(--ink); }
.meter span.cur { background: var(--ink); border-color: var(--ink); }
.cover { width: 100%; max-width: 220px; aspect-ratio: 1; border: 3px solid var(--ink); border-radius: 12px; object-fit: cover; background: var(--face-2); overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.head-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; min-width: 0; }
.head-row .cover { width: 140px; flex: none; }
@media (max-width: 560px) { .head-row .cover { width: 96px; } }

/* ---------- song page: version dial ---------- */
.dial-wrap { display: grid; place-items: center; }
.vdial { width: 100%; max-width: 440px; height: auto; overflow: visible; }
.vdial .arc { fill: none; stroke: var(--ink); stroke-width: 3; }
.vdial .arc-fill { fill: none; stroke: var(--blue); stroke-width: 14; stroke-linecap: round; }
.vdial .arc-track { fill: none; stroke: var(--face-3); stroke-width: 14; stroke-linecap: round; }
.vdial .tick { stroke: var(--ink); stroke-width: 2; }
.vdial .stage { cursor: pointer; }
.vdial .stage text { font: 700 13px var(--font); letter-spacing: .14em; text-transform: uppercase; fill: var(--ink-3); }
.vdial .stage.has text { fill: var(--ink); }
.vdial .stage.sel text { fill: var(--blue-ink); }
.vdial .stage circle { fill: var(--led-off); stroke: var(--ink); stroke-width: 1.5; }
.vdial .stage.has circle { fill: var(--blue); }
.vdial .stage.cur circle { fill: var(--led-on); }
.vdial .stage:focus-visible { outline: none; }
.vdial .stage:focus-visible text { text-decoration: underline; }
.vdial .needle { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; transition: transform .5s cubic-bezier(.3,1.4,.5,1); }
.vdial .hub { fill: var(--ink); }
/* editors drag the needle to relabel a version */
.vdial .needle, .vdial .hub, .vdial .stage.sel { touch-action: none; }
.vdial.dragging .needle { transition: none; }
.vdial.dragging, .vdial.dragging * { cursor: grabbing; }
.vdial .readout { font: 800 30px var(--font); letter-spacing: .08em; text-transform: uppercase; fill: var(--ink); }
.vdial .readout-sub { font: 600 11px var(--font); letter-spacing: .2em; text-transform: uppercase; fill: var(--ink-3); }
.dial-controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 6px; flex-wrap: wrap; }

.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1.5px solid var(--ink); border-radius: 10px; background: var(--face-2); min-width: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 700; overflow-wrap: anywhere; }
.row .meta { font-size: 12px; color: var(--ink-2); letter-spacing: .04em; }
.row .knob { width: 34px; height: 34px; }
.row .knob .tri { border-left-width: 10px; border-top-width: 6px; border-bottom-width: 6px; margin-left: 3px; }
.row .knob.playing .tri { width: 10px; height: 11px; background: linear-gradient(90deg, var(--ink) 0 3px, transparent 3px 7px, var(--ink) 7px 10px); }
.empty { color: var(--ink-2); font-size: 14px; margin: 4px 0; }

.stage-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.stage-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; cursor: pointer; border: var(--line); border-radius: 8px; background: var(--face-2); box-shadow: 0 3px 0 var(--ink); }
.stage-btn[aria-pressed="true"] { background: var(--ink); color: var(--face); transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.stage-btn[aria-pressed="true"] .led { background: var(--led-on); box-shadow: 0 0 6px var(--led-on); }
.drop { display: grid; place-items: center; gap: 6px; text-align: center; cursor: pointer; padding: 22px 14px; border: 2px dashed var(--ink); border-radius: 12px; background: var(--face-2); }
.drop.over { background: var(--blue); }
.drop .big { font-weight: 800; letter-spacing: .1em; text-transform: uppercase; overflow-wrap: anywhere; }
.drop .small { font-size: 12px; color: var(--ink-2); }
.progress { height: 10px; border: var(--line); border-radius: 6px; overflow: hidden; background: var(--face-3); margin-top: 12px; }
.progress > div { height: 100%; width: 0; background: var(--blue); transition: width .2s; }
.promote-go { margin-top: 14px; width: 100%; }

/* ---------- File Share ---------- */
.fs-path { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-weight: 700; font-size: 15px; letter-spacing: .04em; }
.fs-path a { text-decoration: none; padding: 2px 4px; border-radius: 4px; }
.fs-path a:hover { background: var(--face-2); }
.fs-path .sep { color: var(--ink-3); }
.fs-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0; }
.fs-tools .grow { flex: 1; }
.fs-tools input[type=search] { min-height: 40px; min-width: 0; width: 220px; max-width: 100%; padding: 0 12px; border: var(--line); border-radius: 8px; background: #fff; font-size: 15px; }
.fs-table { border: var(--line); border-radius: 12px; overflow: hidden; background: var(--face-2); position: relative; }
.fs-table.over { outline: 4px dashed var(--blue-ink); outline-offset: -8px; background: var(--blue); }
.fs-head, .fs-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 150px 96px 44px; align-items: center; gap: 10px; padding: 0 10px; }
.fs-head { min-height: 38px; background: var(--ink); color: var(--face); }
.fs-head .th { background: none; border: 0; color: inherit; padding: 0; cursor: pointer; text-align: left; }
.fs-head .th[aria-sort] { text-decoration: underline; text-underline-offset: 4px; }
.fs-row { min-height: 54px; border-top: 1.5px solid var(--face-3); }
.fs-row:hover { background: #fff; }
.fs-row .ic { width: 30px; height: 30px; display: grid; place-items: center; }
.fs-row .ic svg { width: 26px; height: 26px; }
.fs-row .nm { min-width: 0; display: flex; align-items: center; gap: 8px; }
.fs-row .nm button, .fs-row .nm a { background: none; border: 0; padding: 6px 0; cursor: pointer; text-align: left; font-weight: 700; font-size: 15px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fs-row .nm button:hover, .fs-row .nm a:hover { text-decoration: underline; }
.fs-row .sub { display: none; font-size: 12px; color: var(--ink-2); }
.fs-row .md, .fs-row .sz { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fs-row .more { width: 34px; height: 34px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--face); cursor: pointer; font-weight: 800; letter-spacing: .1em; line-height: 1; }
.fs-row .more:hover { background: var(--ink); color: var(--face); }
.fs-empty { padding: 36px 16px; text-align: center; color: var(--ink-2); }
.fs-empty b { display: block; color: var(--ink); font-size: 16px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
@media (max-width: 640px) {
  .fs-head { display: none; }
  .fs-head, .fs-row { grid-template-columns: 34px minmax(0, 1fr) 40px; }
  .fs-row .md, .fs-row .sz { display: none; }
  .fs-row .nm { flex-direction: column; align-items: flex-start; gap: 0; }
  .fs-row .sub { display: block; }
  .fs-tools input[type=search] { width: 100%; order: 9; }
  .fs-tools .grow { display: none; }
}
.ico-folder { fill: var(--blue); stroke: var(--ink); stroke-width: 1.6; }
.ico-file { fill: var(--face); stroke: var(--ink); stroke-width: 1.6; }
.ico-mark { fill: var(--ink); }

.menu {
  position: fixed; z-index: 40; min-width: 210px; padding: 6px;
  background: var(--face); border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 5px 0 var(--ink);
}
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border: 0; background: none; border-radius: 6px; cursor: pointer; text-align: left; font-weight: 600; font-size: 14px; }
.menu button:hover, .menu button:focus-visible { background: var(--ink); color: var(--face); outline: none; }
.menu button.danger { color: #B3261E; }
.menu button.danger:hover { background: #B3261E; color: #fff; }
.menu hr { border: 0; border-top: 1.5px dashed var(--ink-3); margin: 4px 6px; }

.uploads {
  position: fixed; z-index: 25; right: 16px; width: min(360px, calc(100% - 32px));
  bottom: calc(var(--player-h) + 34px + env(safe-area-inset-bottom));
  background: var(--face); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 5px 0 var(--ink); padding: 12px;
  max-height: 46vh; overflow: auto;
}
.uploads h3 { margin: 0 0 8px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; display: flex; justify-content: space-between; }
.up-item { font-size: 13px; margin-bottom: 8px; }
.up-item .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.up-item .progress { margin-top: 4px; height: 8px; }
.up-item.err .nm { color: #B3261E; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px var(--gutter); }
.login .faceplate { width: 100%; max-width: 400px; text-align: center; }
.login-logo { width: 190px; margin: -6px auto 10px; border-radius: 50%; border: 3px solid var(--ink); }
.login h1 { margin: 0; font-size: 22px; letter-spacing: .3em; font-weight: 800; }
.login p { margin: 6px 0 18px; color: var(--ink-2); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }
.field { display: grid; gap: 6px; text-align: left; margin-bottom: 14px; }
.field input { min-height: 46px; padding: 0 14px; border: var(--line); border-radius: 10px; background: #fff; font-size: 16px; }
.err { color: #B3261E; font-weight: 600; min-height: 1.2em; margin: 0 0 10px; font-size: 14px; }

/* ---------- now-playing strip ---------- */
.player {
  position: fixed; z-index: 20; left: 14px; right: 14px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; min-height: var(--player-h);
  background: var(--face); border: 3px solid var(--ink); border-radius: 18px;
  box-shadow: 0 5px 0 var(--ink), 0 14px 30px rgba(20, 60, 120, .3);
}
.player .knob.play { width: 56px; height: 56px; }
.np { flex: 1; min-width: 0; }
.np-title { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-sub { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scrub { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.scrub .t { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink-2); min-width: 34px; }
input[type=range] { flex: 1; min-width: 0; appearance: none; -webkit-appearance: none; height: 22px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; background: var(--ink); border-radius: 2px; }
input[type=range]::-moz-range-track { height: 4px; background: var(--ink); border-radius: 2px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: var(--blue); border: 2px solid var(--ink); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--blue); border: 2px solid var(--ink); }
@media (max-width: 760px) { .player { left: 10px; right: 10px; gap: 10px; padding: 10px 12px; } .player .knob.play { width: 48px; height: 48px; } }

.toast {
  position: fixed; z-index: 50; left: 50%; transform: translate(-50%, 20px);
  bottom: calc(var(--player-h) + 36px + env(safe-area-inset-bottom));
  max-width: calc(100% - 2 * var(--gutter));
  padding: 10px 16px; border: var(--line); border-radius: 10px;
  background: var(--ink); color: var(--face); font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.loading { text-align: center; padding: 60px 0; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--ink); }

@media (max-width: 600px) {
  .faceplate { padding: 16px; border-radius: 18px; }
  fieldset.module { padding: 12px; }
  .section-head h2 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* password confirmation dialog */
dialog.sudo { width: min(380px, calc(100% - 32px)); color: var(--ink); }
dialog.sudo::backdrop { background: rgba(17, 17, 17, .55); }

/* Submissions inbox */
.led.blue { background: var(--blue); box-shadow: 0 0 8px var(--blue); }
.led.off { background: var(--face-3); }
details.sub > summary { list-style: none; cursor: pointer; }
details.sub > summary::-webkit-details-marker { display: none; }
details.sub[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; background: #fff; }
.sub-body { border: 1.5px solid var(--ink); border-top: 0; border-radius: 0 0 10px 10px; padding: 14px; display: grid; gap: 14px; background: var(--face); }
.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: 15px; }
.kv dt { font-weight: 700; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; padding-top: 3px; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; } }

/* website profile */
.vis-status { display: flex; align-items: center; gap: 10px; margin: 14px 0; font-weight: 600; font-size: 14px; }
.photo-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.photo { width: 120px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 3px solid var(--ink); flex: none; background: var(--blue); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .ph span { font-size: 36px; }
.ta { padding: 12px 14px; border: var(--line); border-radius: 10px; background: #fff; font-size: 16px; resize: vertical; width: 100%; }

/* nav labels: full on desktop, short under the icon on phones */
.nav-item .lbl-s { display: none; }
.nav-item.site-link { background: var(--blue); }
.nav-item.site-link:hover { background: #8cc3fa; }
@media (max-width: 760px) {
  .sidebar .brand { display: none; }
  .nav { gap: 6px; min-width: 0; }
  .nav-item { flex: 1 1 auto; min-width: 0; flex-direction: column; gap: 3px; min-height: 48px; padding: 4px 2px; font-size: 9px; letter-spacing: .08em; }
  .nav-item .lbl { display: none; }
  .nav-item .lbl-s { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .nav-item svg { width: 18px; height: 18px; }
  .side-foot .hw-btn { padding: 0 8px; min-height: 48px; font-size: 9px; letter-spacing: .08em; }
}
#logout .out-ic { display: none; }
@media (max-width: 760px) {
  #logout { width: 44px; padding: 0; }
  #logout .out-ic { display: block; width: 18px; height: 18px; }
  #logout .lbl { display: none; }
  .nav-item { letter-spacing: .04em; }
}

/* ---------- artist page (Spotify-style) ---------- */
.artist-hero {
  display: flex; align-items: flex-end; gap: 28px; padding: 30px; margin-bottom: 14px; min-height: 260px;
  border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: 0 6px 0 var(--ink);
  background: linear-gradient(180deg, rgba(17,17,17,0) 30%, rgba(17,17,17,.55)), var(--blue-deep);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.03' numOctaves='3' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 .07 0 0 0 0 .3 0 0 0 0 .6 0 0 0 -9 5'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E"), linear-gradient(180deg, #4E9BEA, #2B6FBF);
  color: var(--face);
}
.ah-photo { width: 210px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 4px solid var(--ink); box-shadow: 0 8px 0 var(--ink); flex: none; background: var(--blue); }
.ah-photo img { width: 100%; height: 100%; object-fit: cover; }
.ah-photo .ph span { font-size: 72px; }
.ah-meta { min-width: 0; }
.ah-meta .chip { display: inline-flex; align-items: center; color: var(--ink); }
.ah-name { margin: 12px 0 6px; font-size: clamp(40px, 8vw, 96px); line-height: .9; font-weight: 900; text-transform: uppercase; letter-spacing: .01em; overflow-wrap: anywhere; text-shadow: 0 4px 0 var(--ink); }
.ah-sub { margin: 0; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; }
.ah-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 18px; padding: 0 6px; }
.ah-play { width: 72px; height: 72px; background: radial-gradient(circle at 35% 30%, #9fd0ff, var(--blue) 70%); }
.ah-more { width: 44px; height: 44px; border: var(--line); border-radius: 50%; background: var(--face); font-weight: 800; cursor: pointer; box-shadow: 0 3px 0 var(--ink); }

.tracks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.track { display: grid; grid-template-columns: 28px 40px 48px minmax(0, 1fr) auto 110px 36px; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; }
.track:hover { background: var(--face-2); }
.t-num { text-align: right; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.track .knob.t-knob { width: 36px; height: 36px; }
.track .knob.t-knob .tri { border-left-width: 10px; border-top-width: 6px; border-bottom-width: 6px; margin-left: 3px; }
.track .knob.t-knob.playing .tri { width: 10px; height: 11px; background: linear-gradient(90deg, var(--ink) 0 3px, transparent 3px 7px, var(--ink) 7px 10px); }
.t-art { width: 48px; height: 48px; border: var(--line); border-radius: 6px; overflow: hidden; display: block; }
.t-art img { width: 100%; height: 100%; object-fit: cover; }
.t-art .ph span { font-size: 16px; }
.t-main { min-width: 0; display: grid; }
.t-title { font-weight: 800; font-size: 16px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-title:hover { text-decoration: underline; }
.t-rel { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-when { font-size: 13px; color: var(--ink-2); text-align: right; }
.track .more { width: 34px; height: 34px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--face); cursor: pointer; font-weight: 800; }

.about { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 22px; align-items: center; border: var(--line); border-radius: 16px; padding: 18px; background: var(--face-2); }
.about-photo { width: 160px; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: var(--line); background: var(--blue); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-bio { margin: 0 0 12px; font-size: 17px; line-height: 1.5; }
.dsp-row { display: flex; flex-wrap: wrap; gap: 8px; }
.dsp-spotify { background: #1ED760 !important; }
.dsp-apple { background: #FA5A6B !important; }

@media (max-width: 760px) {
  .artist-hero { flex-direction: column; align-items: flex-start; padding: 20px; min-height: 0; gap: 16px; }
  .ah-photo { width: 140px; }
  .track { grid-template-columns: 22px 36px minmax(0, 1fr) 34px; gap: 8px; }
  .track .t-art, .track .t-when, .track .chip { display: none; }
  .about { grid-template-columns: 1fr; }
  .about-photo { width: 120px; }
}
.side-foot a.who { text-decoration: none; }
.side-foot a.who:hover { text-decoration: underline; }
.acct-ic { display: none !important; }
.acct-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; }
@media (max-width: 760px) {
  .acct-ic { display: inline-flex !important; width: 44px; padding: 0; min-height: 48px; }
  #logout { display: none; }
}

/* covers: change/remove buttons and the Singles collage */
.cover-box { display: grid; gap: 8px; justify-items: start; flex: none; }
.head-row .cover-box .cover { width: 140px; }
.cover-btns { display: flex; align-items: center; gap: 10px; }
.cover-note { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.collage { display: grid; width: 100%; height: 100%; gap: 0; background: var(--ink); }
.collage img { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.collage.n2 { grid-template-columns: 1fr 1fr; }
.collage.n3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.collage.n3 img:first-child { grid-row: span 2; }
.collage.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
@media (max-width: 560px) { .head-row .cover-box .cover { width: 96px; } }
dialog.pw-shown { width: min(460px, calc(100% - 32px)); }
.pw-code { font-size: 20px; padding: 8px 12px; border: var(--line); border-radius: 8px; background: #fff; display: inline-block; user-select: all; overflow-wrap: anywhere; }
