/* Vinyl: a listening room at night. Shellac, label paper, valve amber, record red. */
:root {
  color-scheme: dark;
  --shellac: #1c1613;   /* page */
  --sleeve: #271f1a;    /* raised surfaces */
  --sleeve-2: #33291f;  /* inputs, pressed */
  --groove: #463829;    /* lines */
  --paper: #f3e6cc;     /* text, like a label */
  --dust: #b5a287;      /* quiet text */
  --amber: #ffae42;     /* the one accent: valve glow */
  --red: #ff5b47;       /* recording, problems */
  --sage: #b4d39a;      /* fits, done */
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --text: "Hanken Grotesk", system-ui, sans-serif;
  --gutter: 16px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--shellac); }
body {
  margin: 0; min-height: 100vh; color: var(--paper); background: var(--shellac);
  font: 400 16px/1.45 var(--text); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
main { max-width: 620px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top)) var(--gutter) calc(96px + env(safe-area-inset-bottom)); }
h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: .01em; line-height: .95; margin: 0; }
h1 { font-size: 46px; }
h2 { font-size: 26px; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 18px; }
.page-head p { color: var(--dust); font-size: 14px; }
.aside, .empty { color: var(--dust); font-size: 14px; }
.empty { text-align: center; padding: 48px 12px; font-size: 16px; }
.warn { color: var(--red); font-size: 14px; }
.section { font-size: 24px; margin: 30px 0 12px; color: var(--dust); }

/* ---- tab bar ---- */
.tabs {
  position: fixed; inset: auto 0 0 0; z-index: 10; display: flex; justify-content: center;
  background: rgba(28, 22, 19, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--groove); padding-bottom: env(safe-area-inset-bottom);
}
.tabs a {
  flex: 1; max-width: 150px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 4px 10px; color: var(--dust); text-decoration: none; font-size: 12px; font-weight: 600; position: relative;
}
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabs a.on { color: var(--amber); }
.tabs b {
  position: absolute; top: 5px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--red); color: #fff; font-size: 11px; line-height: 18px; text-align: center;
}

/* ---- buttons ---- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  font: 600 15px/1.2 var(--text); padding: 10px 16px; border-radius: 999px; cursor: pointer; text-decoration: none;
  color: var(--paper); background: var(--sleeve-2); border: 1px solid var(--groove);
}
.button:active { transform: translateY(1px); }
.button.primary { background: var(--amber); border-color: var(--amber); color: #2a1702; }
.button.quiet { background: transparent; }
.button.danger { color: var(--red); background: transparent; }
.button.big { width: 100%; min-height: 58px; font-size: 17px; }
.button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.button input[type=file] { display: none; }
.link { background: none; border: 0; color: var(--amber); font: 600 14px var(--text); padding: 8px 4px; cursor: pointer; }

/* ---- now playing ---- */
.now { display: flex; flex-direction: column; align-items: stretch; overflow-x: clip; }
.status { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; color: var(--dust); }
.status .clock { margin-left: auto; font: 700 30px/1 var(--display); color: var(--paper); }
.lamp { width: 11px; height: 11px; border-radius: 50%; background: var(--groove); flex: none; }
.now.recording .lamp { background: var(--red); box-shadow: 0 0 0 4px rgba(255, 91, 71, .18), 0 0 14px var(--red); animation: lamp 1.6s ease-in-out infinite; }
.now.recording #live-state { color: var(--paper); }
.now.offline .lamp { background: transparent; border: 2px solid var(--dust); }
.expiry-banner { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--red); background: rgba(255, 91, 71, .14); color: var(--paper); font-size: 14px; }
.expiry-banner strong { color: var(--red); }
.lost-banner { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--red); background: rgba(255, 91, 71, .14); color: var(--paper); font-size: 14px; font-weight: 600; }
@keyframes lamp { 50% { opacity: .45; } }

/* ---- the mode: record or listen ---- */
.mode { display: grid; gap: 10px; margin-top: 14px; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--sleeve); border: 1px solid var(--groove); }
.mode-switch button {
  min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 999px;
  background: transparent; color: var(--dust); font: 800 22px/1 var(--display); letter-spacing: .02em; cursor: pointer;
}
.mode-switch button::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--groove); }
.mode-switch button.on { background: var(--paper); color: var(--shellac); }
.mode-switch .to-record.on::before { background: var(--red); box-shadow: 0 0 8px var(--red); }
.mode-switch .to-listen.on::before { background: #6f9a52; box-shadow: 0 0 8px var(--sage); }
.mode-switch button:active { transform: translateY(1px); }
.mode-for .chip { padding: 6px 12px; font-size: 13px; }
.mode-note { font-size: 14px; color: var(--dust); }
.now.listening .mode-note { color: var(--sage); }
.mode-pending { font-size: 14px; color: var(--amber); }
.now.listening .lamp { background: var(--sage); }
.now.recording.listening .lamp { background: var(--sage); box-shadow: 0 0 0 4px rgba(180, 211, 154, .18), 0 0 14px var(--sage); }
.mode-dot { position: absolute; top: 7px; left: calc(50% + 9px); width: 8px; height: 8px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 8px var(--sage); }

.platter { position: relative; width: min(100%, 420px); aspect-ratio: 1 / .86; margin: 18px auto 8px; }
.disc, .sheen { position: absolute; left: 1%; top: 2%; width: 82%; aspect-ratio: 1; border-radius: 50%; }
.disc {
  background:
    radial-gradient(circle, transparent 37%, rgba(0,0,0,.35) 37.6%, transparent 38.4%),
    repeating-radial-gradient(circle, #0d0b0a 0 1.3px, #1a1614 1.3px 2.6px),
    #120f0d;
  box-shadow: 0 18px 40px rgba(0,0,0,.55), inset 0 0 0 2px #2b2420;
  display: grid; place-items: center;
}
.now.spinning .disc { animation: spin 1.8s linear infinite; }   /* 33 1/3 rpm, for real */
@keyframes spin { to { transform: rotate(360deg); } }
.label {
  width: 36%; aspect-ratio: 1; border-radius: 50%; position: relative; overflow: hidden;
  background: radial-gradient(circle at 30% 30%, #ffc56e, var(--amber) 45%, #d9831c);
  background-size: cover; background-position: center;
}
.label.photo { background-image: var(--photo); }
.label .hole { position: absolute; inset: 47%; border-radius: 50%; background: var(--shellac); box-shadow: inset 0 0 0 1px rgba(0,0,0,.5); }
.sheen {
  pointer-events: none;
  background: conic-gradient(from 210deg, transparent 0 8%, rgba(255,232,200,.10) 12%, transparent 18% 58%, rgba(255,232,200,.07) 62%, transparent 68%);
}
.arm { position: absolute; right: -3%; top: -2%; width: 30%; height: 70%; transform-origin: 78% 11%; transform: rotate(var(--arm, -6deg)); transition: transform 1.2s ease; overflow: visible; }
.arm .pivot { fill: var(--sleeve-2); stroke: var(--groove); stroke-width: 2; }
.arm .pin { fill: var(--dust); }
.arm .tube { fill: none; stroke: #cfc2ad; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.arm .head { fill: #2f2722; stroke: #cfc2ad; stroke-width: 2; }

.playing { margin-top: -6px; }
.playing h1 { font-size: clamp(40px, 12vw, 64px); overflow-wrap: anywhere; }
.np-title { font-size: 19px; color: var(--dust); margin-top: 6px; }
.playing.guess h1 { color: var(--dust); }

.vu { display: flex; gap: 3px; height: 22px; margin: 22px 0 6px; }
.vu i { flex: 1; border-radius: 2px; background: var(--sleeve-2); transition: background .08s; }
.vu i.lit { background: var(--sage); }
.vu i.lit.hot { background: var(--amber); }
.vu i.lit.over { background: var(--red); }

.rec-sides { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rec-sides:empty { display: none; }
.rec-sides li { display: flex; gap: 6px; align-items: baseline; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--groove); color: var(--dust); font-size: 14px; }
.rec-sides li b { font: 700 15px var(--display); color: var(--paper); }
.rec-sides li.done { border-color: var(--sage); }
.rec-sides li.done span { color: var(--sage); }
.rec-sides li.playing { border-color: var(--red); background: var(--sleeve); }
.rec-sides li.playing span { color: var(--red); }
.rec-sides li.hint { border: 0; padding-left: 2px; color: var(--amber); }
.live-check { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--sleeve); border-left: 3px solid var(--groove); color: var(--dust); }
.live-check.match { border-left-color: var(--sage); color: var(--paper); }
.live-check.other { border-left-color: var(--red); color: var(--paper); }
.live-check.named { border-left-color: var(--amber); color: var(--paper); }
.live-check p { margin: 0; overflow-wrap: anywhere; }
.live-check-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.live-tracks li .heard { color: var(--paper); }
.live-tracks { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 2px; }
.live-tracks:empty { display: none; }
.live-tracks li { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 10px; align-items: baseline; padding: 9px 12px; border-radius: 10px; color: var(--dust); }
.live-tracks li b { font: 700 18px var(--display); }
.live-tracks li.now { background: var(--sleeve); color: var(--paper); }
.live-tracks li.now b { color: var(--amber); }
.live-tracks li .maybe { font-style: italic; }
.live-tracks .tag-now { background: none; cursor: pointer; font: 600 13px var(--text); color: var(--dust); text-decoration: none; padding: 4px 10px; border: 1px solid currentColor; border-radius: 999px; }
.live-tracks li.now .tag-now { color: var(--amber); }
.stalled { margin-top: 16px; padding: 14px; border-radius: 14px; border: 1px solid var(--red); display: grid; gap: 12px; color: var(--paper); }

.now-actions { display: grid; gap: 10px; margin: 26px 0 10px; }
.now-actions form { display: grid; }
.page-now > main > .aside { text-align: center; margin-bottom: 28px; }

/* ---- record card ---- */
.record {
  position: relative; background: var(--sleeve); border-radius: 18px; padding: 16px; margin-bottom: 16px;
  border: 1px solid transparent;
}
.record > * + * { margin-top: 14px; }
.record.problem { border-color: rgba(255, 91, 71, .55); }
.record.open { border-color: rgba(255, 174, 66, .5); }
.record-head { display: grid; grid-template-columns: 58px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; }
.record-head .thumb { grid-row: 1 / 3; }
.record-head .who { min-width: 0; }
.record-head h2 { overflow-wrap: anywhere; }
.record-head h2 a { text-decoration: none; }
.record-head .sub { color: var(--dust); margin-top: 3px; }
.record-head .sub span { opacity: .75; }
.record-head .state { grid-column: 2; font-size: 13px; font-weight: 600; color: var(--dust); margin-top: 6px; }
.open .record-head .state { color: var(--amber); }
.problem .record-head .state { color: var(--red); }
.exported .record-head .state { color: var(--sage); }
.record-head .state.todo { font-size: 15px; color: var(--amber); }
.problem .record-head .state.todo { color: var(--red); }
.thumb { width: 58px; height: 58px; border-radius: 6px; overflow: hidden; background: var(--sleeve-2); display: block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.label-photo { border-radius: 50%; box-shadow: 0 0 0 3px #0f0c0a; }
.thumb.blank { border-radius: 50%; background: repeating-radial-gradient(circle, #0d0b0a 0 1.2px, #1a1614 1.2px 2.4px); position: relative; }
.thumb.blank::after { content: ""; position: absolute; inset: 34%; border-radius: 50%; background: var(--groove); }

.photos { display: flex; gap: 8px; overflow-x: auto; }
.photos img { height: 84px; width: 84px; object-fit: cover; border-radius: 50%; display: block; }

.sides { list-style: none; padding: 0; margin-left: 0; margin-right: 0; display: grid; gap: 14px; }
.side-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; font-size: 14px; color: var(--dust); }
.side-top b { font: 700 19px var(--display); color: var(--paper); }
.flag { font-style: normal; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--sleeve-2); color: var(--paper); }
.flag.hot { color: var(--red); }

/* Album card: one tile per side of the album (views.side_map) */
.sidemap { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 8px; }
.sidemap .tile > a, .sidemap .tile > span { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--sleeve-2);
  border-top: 3px solid var(--groove); color: var(--dust); font-size: 13px; text-decoration: none; height: 100%; box-sizing: border-box; }
.sidemap .tile b { font: 800 24px/1 var(--display); color: var(--paper); }
.sidemap .ok > a, .sidemap .here > a { border-top-color: var(--sage); }
.sidemap .ok span, .sidemap .here span { color: var(--sage); }
.sidemap .take2 > a, .sidemap .ear > a { border-top-color: var(--amber); }
.sidemap .take2 span, .sidemap .ear span { color: var(--amber); font-weight: 600; }
.sidemap .lib > span { border-top-color: var(--dust); }
.sidemap .done > a { border-top-color: var(--sage); background: none; border: 1px solid var(--groove); border-top: 3px solid var(--sage); }
.sidemap .done span { color: var(--sage); }
.sidemap .miss > span { background: none; border: 1px dashed var(--groove); border-top: 3px dashed var(--groove); }
.side-fix { font-size: 14px; color: var(--dust); }
.side-fix summary { cursor: pointer; }
.side-fix form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.side-fix select { max-width: 100%; }
/* A side's player: the strip is the whole side as a waveform, the loupe a close-up around the playhead. */
.side-player { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 10px; }  /* minmax: long track names must not widen the page */
.sp-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.sp-now { min-width: 0; display: flex; align-items: baseline; gap: 8px; white-space: nowrap; font-size: 14px; color: var(--dust); }
.sp-now b { font: 700 18px var(--display); color: var(--amber); }
.sp-now b:empty { display: none; }
.sp-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--paper); font-weight: 600; }
.sp-in { flex: none; font-size: 13px; }
.side-player:not(.played):not(.seeking) .sp-in, .side-player:not(.played):not(.seeking) .sp-pos { display: none; }
.side-player:not(.played):not(.seeking) .sp-title { color: var(--dust); font-weight: 400; }
.side-player .at { font-size: 13px; color: var(--dust); white-space: nowrap; }
.side-player.seeking .sp-at { color: var(--paper); }
.source-form { display: inline; margin: 0; }
select.flag.source { border: 0; cursor: pointer; font-family: inherit; appearance: none; -webkit-appearance: none; padding-right: 20px;
  background: var(--sleeve-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 8px center; }
.spin {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--paper); color: var(--shellac); transition: background .15s, transform .1s;
}
.spin:active { transform: scale(.94); }
.spin svg { width: 18px; height: 18px; fill: currentColor; }
.spin .bars, .on > .sp-top .spin .tri, .deck.on .spin .tri { display: none; }
.on > .sp-top .spin .bars, .deck.on .spin .bars { display: inline; }
.on > .sp-top .spin, .deck.on .spin { background: var(--amber); }
.strip { position: relative; flex: 1; min-width: 0; display: flex; gap: 3px; height: 16px; --pos: 0%; }
.side-player:not(.playable) .strip { margin-top: 2px; }
.playable .strip { cursor: pointer; touch-action: none; height: 46px; }
.strip i { flex-basis: 0; min-width: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--amber) var(--fill, 0%), var(--groove) var(--fill, 0%)); }
.side-player:not(.playable) .strip i, .exported .strip i { background: linear-gradient(var(--amber), #d98a2b); opacity: .8; }
.strip .wave { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.strip.waved i { visibility: hidden; }
.strip.waved .wave { display: block; }
.strip .head { position: absolute; top: -4px; bottom: -4px; left: var(--pos); width: 2px; margin-left: -1px; border-radius: 1px; background: var(--amber); box-shadow: 0 0 8px rgba(255, 174, 66, .7); opacity: 0; pointer-events: none; }
.on .strip .head, .played .strip .head { opacity: 1; }
.strip .ghost { position: absolute; top: -4px; bottom: -4px; left: var(--ghost, 0); width: 1px; background: var(--paper); opacity: 0; pointer-events: none; }
.strip.hovering .ghost { opacity: .75; }
.strip u { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--red); text-decoration: none; }
.strip-names { display: flex; gap: 3px; margin: 0 0 -4px; font-size: 12px; color: var(--dust); }
.side-player:not(.playable) .strip-names { margin-bottom: -6px; }
.strip-names span { flex-basis: 0; min-width: 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding-left: 2px; }
.strip-names b { color: var(--paper); font-weight: 600; }
.strip s { position: absolute; top: -5px; bottom: -5px; width: 0; border-left: 2px dashed var(--paper); }
.loupe {
  position: relative; height: 128px; border-radius: 12px; overflow: hidden; cursor: grab; touch-action: none;
  background: linear-gradient(#120e0b, #17120f); border: 1px solid var(--groove);
}
.loupe.grabbing { cursor: grabbing; }
.loupe canvas { display: block; width: 100%; height: 100%; }
.loupe-hint {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 5px 10px; border-radius: 12px; width: max-content; max-width: 88%; text-align: center;
  font-size: 12px; font-weight: 600; color: var(--paper); background: rgba(18, 14, 11, .82); pointer-events: none; transition: opacity .3s;
}
.on .loupe-hint { opacity: 0; }
.dragged .loupe-hint { display: none; }
.sp-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.side-player:not(.open) .sp-keys { display: none; }
.sp-btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 36px; padding: 0 10px;
  border-radius: 999px; border: 1px solid var(--groove); background: var(--sleeve-2); color: var(--paper);
  font: 600 13px var(--text); cursor: pointer;
}
.sp-btn:active { transform: translateY(1px); }
.sp-btn svg { width: 16px; height: 16px; fill: currentColor; }
.sp-spec.on { border-color: var(--amber); color: var(--amber); }
.sp-zoom { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.sp-span { min-width: 44px; text-align: center; font-size: 12px; color: var(--dust); }
audio { width: 100%; height: 38px; margin-top: 10px; }
.divider { text-align: center; position: relative; }
.divider::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed var(--groove); }
.divider form { position: relative; display: inline-block; background: var(--sleeve); padding: 0 8px; }
.divider.between { margin: -6px 0 10px; }
.divider.between form { background: var(--shellac); }

.named { color: var(--sage); font-size: 14px; }
.fit { list-style: none; padding: 0; margin-left: 0; margin-right: 0; font-size: 14px; color: var(--sage); display: grid; gap: 3px; }
.suggestion p { font-size: 14px; color: var(--paper); }
.suggestion strong { color: var(--amber); font-weight: 600; }

.search input {
  width: 100%; font: 500 16px var(--text); padding: 13px 16px; border-radius: 12px;
  border: 1px solid var(--groove); background: var(--shellac); color: var(--paper);
}
.search input::placeholder { color: var(--dust); opacity: .8; }
.results ul { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.results form button {
  width: 100%; text-align: left; font: inherit; color: var(--paper); background: var(--shellac);
  border: 1px solid var(--groove); border-radius: 12px; padding: 11px 14px; cursor: pointer;
}
.results form button:hover { border-color: var(--amber); }
.results strong { font-weight: 600; }
.results small { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--dust); margin-top: 2px; }
.results em { color: var(--amber); font-style: normal; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions:empty { display: none; }
.actions form { display: contents; }

/* ---- library ---- */
.shelf { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 14px; }
.shelf a { display: grid; gap: 4px; text-decoration: none; }
.shelf strong { font: 800 20px/1 var(--display); margin-top: 6px; overflow-wrap: anywhere; }
.shelf span:not(.sleeve) { color: var(--dust); font-size: 14px; }
.sleeve {
  display: block; aspect-ratio: 1; border-radius: 4px; overflow: hidden; position: relative;
  background: repeating-radial-gradient(circle at 50% 50%, #0d0b0a 0 1.4px, #1a1614 1.4px 2.8px);
  box-shadow: 0 10px 24px rgba(0,0,0,.45);
}
.sleeve img { width: 100%; height: 100%; object-fit: cover; display: block; }

.back { display: inline-flex; align-items: center; min-height: 44px; margin-top: -10px; color: var(--amber); text-decoration: none; font-weight: 600; font-size: 15px; margin-bottom: 14px; }
.back::before { content: "\2039"; margin-right: 6px; }
.back { margin-bottom: 4px; }
.album-head .sleeve { width: min(72%, 300px); margin-bottom: 18px; }
.album-head h1 { font-size: clamp(38px, 11vw, 58px); }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--dust); font-size: 14px; margin-top: 8px; }
.tracklist { list-style: none; padding: 0; margin: 22px 0 0; }
.tracklist li + li { border-top: 1px solid var(--groove); }
.play, .missing {
  width: 100%; display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: baseline; text-align: left;
  font: inherit; background: none; border: 0; color: var(--paper); padding: 13px 2px; cursor: pointer;
}
.missing { color: var(--dust); cursor: default; }
.pos { font: 700 17px var(--display); color: var(--dust); }
.d { color: var(--dust); font-size: 14px; }
.play.on { color: var(--amber); }
.play.on .pos { color: var(--amber); }
/* The album deck: floats over the page above the tab bar. */
.deck { position: fixed; z-index: 9; left: 0; right: 0; bottom: calc(66px + env(safe-area-inset-bottom)); padding: 0 10px; pointer-events: none; }
.deck-in {
  pointer-events: auto; max-width: 640px; margin: 0 auto; padding: 10px 12px 8px; border-radius: 18px;
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: "art what keys" "bar bar bar"; gap: 6px 12px; align-items: center;
  background: rgba(39, 31, 26, .9); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid var(--groove); box-shadow: 0 14px 36px rgba(0, 0, 0, .5);
}
.deck-art { grid-area: art; width: 48px; height: 48px; border-radius: 6px; background: var(--sleeve-2) center / cover; }
.deck-what { grid-area: what; min-width: 0; display: grid; }
.deck-what b, .deck-sub { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.deck-what b { font-size: 15px; }
.deck-sub { font-size: 13px; color: var(--dust); }
.deck-buttons { grid-area: keys; display: flex; align-items: center; gap: 6px; }
.deck-buttons .sp-btn { min-width: 36px; padding: 0 8px; border: 0; background: transparent; }
.deck-buttons .sp-btn svg { width: 20px; height: 20px; }
.deck-bar { grid-area: bar; display: grid; grid-template-columns: 40px 1fr 44px; align-items: center; gap: 8px; font-size: 12px; color: var(--dust); }
.deck-left { text-align: right; }
.deck-wave { position: relative; height: 34px; cursor: pointer; touch-action: none; }
.deck-wave canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.deck-wave .ghost { position: absolute; top: -2px; bottom: -2px; left: var(--ghost, 0); width: 1px; background: var(--paper); opacity: 0; pointer-events: none; }
.deck-wave .ghost b {
  position: absolute; bottom: calc(100% + 4px); left: 0; transform: translateX(-50%); padding: 2px 6px; border-radius: 6px;
  background: var(--paper); color: var(--shellac); font-size: 12px; font-weight: 700;
}
.deck-wave.hovering .ghost { opacity: 1; }
body.has-deck main { padding-bottom: calc(244px + env(safe-area-inset-bottom)); }
/* The deck's tempo fader (tempo.js): key lock, the fader with its centre mark, the effective BPM, the range. */
.deck-in { grid-template-areas: "art what keys" "bar bar bar" "tempo tempo tempo"; }
.tempo-ctl { grid-area: tempo; display: grid; grid-template-columns: auto minmax(0, 1fr) 76px auto; align-items: center; gap: 8px; font-size: 12px; color: var(--dust); }
.tempo-ctl button { font: inherit; font-size: 12px; color: var(--dust); background: transparent; border: 1px solid var(--groove); border-radius: 999px; padding: 3px 9px; cursor: pointer; white-space: nowrap; }
.tempo-ctl .tempo-flag[aria-pressed="true"] { color: var(--amber); border-color: var(--amber); }
.tempo-ctl .tempo-read { border-color: transparent; font-variant-numeric: tabular-nums; text-align: center; padding: 3px 0; }
.tempo-ctl.tempo-moved .tempo-read { color: var(--amber); }
.tempo-fader { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0; background: transparent; cursor: pointer; touch-action: none; }
.tempo-fader::-webkit-slider-runnable-track { height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, transparent calc(50% - 1px), var(--dust) calc(50% - 1px), var(--dust) calc(50% + 1px), transparent calc(50% + 1px)), var(--groove); }
.tempo-fader::-moz-range-track { height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, transparent calc(50% - 1px), var(--dust) calc(50% - 1px), var(--dust) calc(50% + 1px), transparent calc(50% + 1px)), var(--groove); }
.tempo-fader::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 20px; margin-top: -8px; border-radius: 3px; background: var(--paper); border: 0; }
.tempo-fader::-moz-range-thumb { width: 12px; height: 20px; border-radius: 3px; background: var(--paper); border: 0; }
.tempo-moved .tempo-fader::-webkit-slider-thumb { background: var(--amber); }
.tempo-moved .tempo-fader::-moz-range-thumb { background: var(--amber); }
.play-all svg { fill: currentColor; stroke: none; width: 18px; height: 18px; }
.tracklist li { position: relative; }
.tracklist li.on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 1px;
  background: linear-gradient(90deg, var(--amber) var(--p, 0%), transparent var(--p, 0%));
}
.play .pos { position: relative; }
.eq { display: none; position: absolute; left: 0; bottom: 3px; height: 14px; gap: 2px; align-items: flex-end; }
.eq i { width: 3px; height: 40%; border-radius: 1px; background: var(--amber); }
.play.on .eq { display: flex; }
.play.on .pos { color: transparent; }
.deck-playing .play.on .eq i { animation: eq .9s ease-in-out infinite alternate; }
.deck-playing .play.on .eq i:nth-child(2) { animation-duration: .7s; animation-delay: -.3s; }
.deck-playing .play.on .eq i:nth-child(3) { animation-duration: 1.1s; animation-delay: -.6s; }
@keyframes eq { from { height: 25%; } to { height: 100%; } }

@media (min-width: 700px) {
  h1 { font-size: 58px; }
  .platter { width: 400px; }
}
@media (prefers-reduced-motion: reduce) {
  .now.spinning .disc, .now.recording .lamp, .deck-playing .play.on .eq i { animation: none; }
  .arm { transition: none; }
}

/* ---- collection ---- */
.to-collection { display: grid; gap: 2px; padding: 14px 16px; margin: -4px 0 22px; border-radius: 14px; background: var(--sleeve); text-decoration: none; }
.to-collection strong { font: 800 22px/1 var(--display); color: var(--amber); }
.to-collection span { color: var(--dust); font-size: 14px; }
.to-play-again { border: 1px solid rgba(255, 174, 66, .4); }
.to-play-again strong span { color: var(--dust); font: 400 14px var(--text); margin-left: 6px; }
.play-again { margin: 0 0 22px; }
.play-again h2 { font: 800 22px/1 var(--display); color: var(--amber); margin: 0; }
.play-again h2 span { color: var(--dust); font: 400 14px var(--text); margin-left: 6px; }
.play-again .aside { margin: 6px 0 4px; }
.play-again ul { list-style: none; padding: 0; margin: 0; }
.play-again li a { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-top: 1px solid var(--sleeve); text-decoration: none; }
.play-again li strong { overflow-wrap: anywhere; }
.play-again li b { color: var(--amber); font-size: 14px; white-space: nowrap; }
.play-again li span { grid-column: 1 / -1; color: var(--dust); font-size: 14px; }
.filters { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)) 14px; padding: 0 var(--gutter) 4px; scrollbar-width: none; }
.filters a { flex: none; padding: 8px 14px; border-radius: 999px; background: var(--sleeve); color: var(--paper); text-decoration: none; font-size: 14px; font-weight: 600; }
.filters a span { color: var(--dust); font-weight: 500; margin-left: 4px; }
.filters a.on { background: var(--paper); color: var(--shellac); }
.filters a.on span { color: var(--groove); }
.find input { width: 100%; font: 500 16px var(--text); padding: 13px 16px; border-radius: 12px; border: 1px solid var(--groove); background: var(--sleeve); color: var(--paper); margin-bottom: 14px; }
.crate { list-style: none; padding: 0; margin: 0; }
.crate li + li { border-top: 1px solid var(--groove); }
.crate a { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; text-decoration: none; }
.crate .sleeve { width: 52px; border-radius: 3px; box-shadow: none; }
.crate .who { min-width: 0; display: grid; }
.crate strong { font: 700 19px/1.05 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crate .who span { color: var(--dust); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crate small { opacity: .7; }
.rip { font-style: normal; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.rip.done { background: rgba(180, 211, 154, .16); color: var(--sage); }
.rip.part { background: rgba(255, 174, 66, .16); color: var(--amber); }
.rip.sale { background: var(--sleeve-2); color: var(--dust); }
.rip.spotify { background: none; color: var(--dust); box-shadow: inset 0 0 0 1px var(--groove); font-weight: 500; }
.spotify-lists { margin-top: 4px; }
.spotify-lists a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.more { text-align: center; margin: 18px 0; }

/* ---- tags ---- */
.album-head .actions { margin-top: 16px; }
.tag-group h3 { font: 700 15px var(--text); color: var(--dust); margin: 0 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chips form { display: contents; }
.chip { font: 600 14px var(--text); padding: 7px 13px; border-radius: 999px; border: 1px solid var(--groove); background: transparent; color: var(--paper); cursor: pointer; }
.chip.on { background: var(--amber); border-color: var(--amber); color: #2a1702; }
.chips .add input, .new-group input {
  font: 500 14px var(--text); padding: 7px 13px; border-radius: 999px; border: 1px dashed var(--groove);
  background: transparent; color: var(--paper); width: 7.5em;
}
.new-group input { width: 100%; border-radius: 12px; padding: 11px 14px; }
.tag-group h3 span { font-weight: 500; font-size: 13px; }
.tag-group .warn { margin: 8px 0 0; }
.chips.scale { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; height: auto; margin: 0; font-size: inherit; position: static; }  /* .scale is also the level meter (below) */
.scale .chip { border-radius: 12px; padding: 7px 2px; font-size: 13px; text-align: center; }
.scale .chip b { display: block; font: 700 18px/1.1 var(--display); }
.note { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; }
.note textarea {
  font: 500 14px var(--text); padding: 9px 13px; border-radius: 12px; border: 1px solid var(--groove);
  background: transparent; color: var(--paper); resize: vertical; min-width: 0;
}
.tag-open { margin: 0 0 10px 52px; padding: 4px 10px; border: 1px dashed var(--groove); border-radius: 999px; background: none;
  color: var(--dust); font: 500 13px var(--text); cursor: pointer; max-width: calc(100% - 52px); text-align: left; }
.tag-open.has { border-style: solid; color: var(--paper); }
.tag-dialog { width: min(560px, calc(100vw - 2 * var(--gutter))); max-height: 85vh; overflow: auto; padding: 0 18px 18px;
  border: 1px solid var(--groove); border-radius: 16px; background: var(--sleeve); color: var(--paper); }
.tag-dialog::backdrop { background: rgb(0 0 0 / .6); }
.tag-dialog header { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin: 0 -18px 4px; padding: 14px 18px; background: var(--sleeve); border-bottom: 1px solid var(--groove); }
.tag-dialog header p { margin: 0; font-weight: 700; }
.tag-dialog .tag-group { margin-top: 14px; }
.tag-dialog .tag-group h3 { display: flex; align-items: center; gap: 8px; }
.tag-dialog .review-form { margin-left: auto; }
.tag-dialog .note { display: flex; gap: 8px; }
.tag-dialog .note textarea { flex: 1; }
/* Suggestions: dashed until confirmed; BPM and key on the track line, a "?" while only suggested. */
.track-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 10px 52px; }
.track-extra .tag-open { margin: 0; max-width: 100%; }
.track-extra .bpm, .track-extra .key { font: 600 13px var(--text); color: var(--paper); font-variant-numeric: tabular-nums; }
.track-extra .hint { color: var(--dust); border-bottom: 1px dashed var(--groove); }
.suggest-count { padding: 4px 10px; border: 1px dashed var(--amber); border-radius: 999px; background: none; color: var(--amber);
  font: 500 13px var(--text); cursor: pointer; }
.suggest-count[hidden] { display: none; }
.chip.suggested { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 12px; border-style: dashed;
  border-color: var(--amber); cursor: default; }
.chip.suggested::after { content: none; }  /* its two buttons take the taps */
.chip.suggested small { color: var(--dust); font-weight: 500; }
.chip.suggested button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--groove); background: none;
  color: var(--paper); font: 700 14px var(--text); cursor: pointer; }
.chip.suggested button.yes { border-color: var(--amber); color: var(--amber); }
.suggest-group .aside { margin: 8px 0 0; }
.confirm-all { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 18px 0 0; }
.confirm-all .aside { flex: 1 1 16em; }
.chip.review { font-size: 12px; border-style: dashed; opacity: .75; }
.chip.review.on { border-style: solid; opacity: 1; }
.tags-filter a span { font-size: 12px; }

/* ---- mixes ---- */
.mix-tracks { list-style: none; padding: 0; margin-left: 0; margin-right: 0; display: grid; gap: 4px; font-size: 14px; }
.mix-tracks span { display: inline-block; width: 52px; color: var(--amber); font-weight: 600; }
.mix-save { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.mix-save input { font: 500 16px var(--text); padding: 11px 14px; border-radius: 12px; border: 1px solid var(--groove); background: var(--shellac); color: var(--paper); min-width: 0; }

/* ---- the Pi ---- */
.gear { color: var(--dust); display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; }
.status .clock:empty + .gear { margin-left: auto; }
.gear svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.facts { margin: 0 0 20px; display: grid; gap: 1px; background: var(--groove); border-radius: 14px; overflow: hidden; }
.facts div { background: var(--sleeve); padding: 12px 16px; display: grid; gap: 2px; }
.facts dt { font-size: 13px; color: var(--dust); font-weight: 600; }
.facts dd { margin: 0; }
.facts .hot { color: var(--red); }

/* ---- choosing a pressing ---- */
.ask { font-weight: 600; color: var(--paper); margin-top: 10px; }
.results form button { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.results form button > strong, .results form button > span, .results form button > small { grid-column: 2; }
.results form button > strong { margin-top: 0; }
.pick-cover { grid-row: 1 / span 3; width: 56px; height: 56px; border-radius: 4px; object-fit: cover; }

/* ---- cuts that need an ear ---- */
.strip .cut { position: absolute; top: -7px; bottom: -7px; width: 14px; margin-left: -7px; padding: 0; border: 0; background: none; cursor: pointer; z-index: 2; }
.strip .cut::after { content: ""; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; border-radius: 1px; background: var(--paper); }
/* Moving a cut by ear: pick it, drag its line in the close-up or nudge it. */
.sp-cuts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--groove); }
.side-player:not(.open) .sp-cuts { display: none; }
.sp-cut-at { min-width: 120px; flex: 1 1 120px; text-align: center; font-size: 13px; color: var(--dust); font-variant-numeric: tabular-nums; }
.sp-cut-at b { color: var(--amber); font-weight: 600; }
.sp-nudge { display: flex; gap: 4px; }
.sp-sel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.sp-sel[hidden], .side-player:not(.open) .sp-sel { display: none; }
.sp-sel-at { flex: 1 1 160px; font-size: 13px; color: var(--paper); font-variant-numeric: tabular-nums; }
.sp-delete:not(:disabled) { color: var(--amber); border-color: var(--amber); }
.sp-btn:disabled { opacity: .4; cursor: default; }
.editing .loupe.on-cut { cursor: col-resize; }
.decide { border-radius: 14px; padding: 14px 16px; background: rgba(255, 91, 71, .08); border: 1px solid rgba(255, 91, 71, .35); display: grid; gap: 8px; font-size: 14px; }
.decide ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.decide details { color: var(--dust); font-size: 13px; }
.decide summary { cursor: pointer; }

/* ---- levels ---- */
.to-levels { display: inline-block; color: var(--amber); font-size: 14px; font-weight: 600; text-decoration: none; margin-top: 2px; }
.levels .verdict { font: 800 30px/1.05 var(--display); margin-bottom: 18px; color: var(--dust); }
.levels .verdict.good { color: var(--sage); } .levels .verdict.hot { color: var(--red); } .levels .verdict.low { color: var(--amber); }
.meter-row { display: grid; grid-template-columns: 22px 1fr 64px; gap: 10px; align-items: center; margin-bottom: 10px; }
.meter-row .ch { font: 800 22px var(--display); color: var(--dust); }
.meter-row .val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.meter { position: relative; height: 34px; border-radius: 8px; overflow: hidden; background: var(--sleeve-2); }
.meter .zone { position: absolute; top: 0; bottom: 0; opacity: .14; }
.meter .zone.ok { left: 0; width: 75%; background: var(--sage); }          /* to -12 dB */
.meter .zone.hot { left: 75%; width: 18.75%; background: var(--amber); }   /* -12 to -3 dB */
.meter .zone.over { left: 93.75%; right: 0; background: var(--red); }      /* -3 to 0 dB */
.meter .peak, .meter .rms { position: absolute; left: 0; width: 0; transition: width .12s linear; }
.meter .peak { top: 0; bottom: 0; background: linear-gradient(90deg, var(--sage) 0 75%, var(--amber) 75% 93.75%, var(--red) 93.75%); background-size: var(--full, 100%) 100%; opacity: .55; }
.meter .rms { top: 9px; bottom: 9px; background: var(--paper); border-radius: 0 4px 4px 0; }
.meter .hold { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1px; background: var(--paper); text-decoration: none; transition: left .2s; }
.scale { position: relative; height: 18px; margin: 0 74px 18px 32px; font-size: 12px; color: var(--dust); }
.scale span { position: absolute; transform: translateX(-50%); }
.facts.small div { padding: 10px 14px; }
#history { width: 100%; height: 160px; border-radius: 12px; background: var(--sleeve); display: block; margin-bottom: 10px; }

/* ---- test plays in the inbox ---- */
.tests { margin-top: 26px; }
.tests summary { cursor: pointer; list-style: none; display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; background: var(--sleeve); margin-bottom: 12px; }
.tests summary::-webkit-details-marker { display: none; }
.tests summary strong { font: 800 22px var(--display); }
.tests summary span { color: var(--dust); font-size: 14px; }
.tests > form { margin-bottom: 14px; }
.tests .record { opacity: .8; }

/* ---- track names and links ---- */
.dlink { font-size: 13px; font-weight: 600; color: var(--amber); text-decoration: none; margin-left: 8px; }
.names { margin-top: 14px; }
.names summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--paper); }
.names form { display: grid; gap: 8px; margin-top: 10px; }
.names label { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; }
.names label span { font: 700 17px var(--display); color: var(--dust); }
.names input { font: 500 15px var(--text); padding: 9px 12px; border-radius: 10px; border: 1px solid var(--groove); background: var(--shellac); color: var(--paper); min-width: 0; }
.names .button { justify-self: start; }

/* ---- flags ---- */
.flag-add { margin-top: 12px; }
.flag-add summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--dust); }
.flag-add form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 8px; }
.flag-add input { font: 500 15px var(--text); padding: 9px 12px; border-radius: 10px; border: 1px solid var(--groove); background: var(--shellac); color: var(--paper); min-width: 0; }
.flag-note { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 174, 66, .1); font-size: 14px; }
.flag-note b { color: var(--amber); margin-right: 6px; }
.flag-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.flag-list li { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--sleeve); }
.flag-list a { text-decoration: none; } .flag-list b { font: 700 18px var(--display); }
.flag-list small { color: var(--dust); }

/* ---- telling pressings apart ---- */
.results li.pick { position: relative; }
.pick-link { position: absolute; top: 10px; right: 12px; z-index: 1; font-size: 13px; font-weight: 600; color: var(--amber); text-decoration: none; padding: 4px 8px; border-radius: 999px; background: var(--sleeve); }
.results small.details { color: var(--paper); opacity: .85; }
.import { margin-bottom: 8px; }
.import .button input[type=file] { display: none; }

/* ---- listen mode ---- */
section.listen { margin: 8px 0 28px; display: grid; gap: 12px; }
.listen-session { margin-bottom: 28px; display: grid; gap: 10px; }
.listen-session h2 { font-size: 24px; }
.listen-tracks { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.listen-tracks li { display: grid; grid-template-columns: 48px 1fr; gap: 4px 10px; align-items: baseline; padding: 10px 12px; border-radius: 10px; background: var(--sleeve); }
.listen-tracks li.now { box-shadow: inset 0 0 0 1px var(--amber); }
.listen-tracks li.empty { display: block; background: none; padding: 24px 12px; }
.listen-tracks .at { color: var(--amber); font-weight: 600; font-size: 14px; }
.listen-tracks .what { display: grid; gap: 2px; min-width: 0; }
.listen-tracks .what span { color: var(--paper); }
.listen-tracks .what small, .listen-tracks .unknown { color: var(--dust); font-size: 13px; }
.listen-tracks .want { grid-column: 2; display: grid; gap: 6px; font-size: 14px; }
.listen-tracks a.want { color: var(--dust); }
/* The pressings take the row's whole width (the time column is too narrow to spare on a phone). */
.listen-tracks .want-other { grid-column: 1 / -1; display: grid; gap: 6px; min-width: 0; }
.listen-tracks .want-other summary, .listen-tracks .want-other > .aside { margin-left: 58px; }
.listen-tracks .want-other summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--amber); }
.listen-tracks .want-other .results ul { margin: 4px 0; }
.listen-tracks .want-other form button:disabled { cursor: default; border-color: var(--amber); opacity: 1; }

/* ---- playlist ---- */
.playlist { margin: 8px 0 22px; padding: 16px; border-radius: 18px; background: var(--sleeve); display: grid; gap: 12px; }
.playlist h2 { font-size: 24px; }
.playlist ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.playlist li { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 6px 8px; margin: 0 -8px; border-radius: 12px; }
.playlist .sleeve { width: 44px; border-radius: 3px; box-shadow: none; }
.playlist a { text-decoration: none; display: grid; min-width: 0; }
.playlist a strong { font: 700 18px/1.05 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.playlist a span { color: var(--dust); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.playlist em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--dust); margin-top: 2px; }
.playlist li.played { opacity: .45; }
.playlist li.playing { background: rgba(255, 174, 66, .14); box-shadow: inset 3px 0 0 var(--amber); }
.playlist li.playing em { color: var(--amber); }
.playlist li.next em { color: var(--sage); }
.playlist > form { display: grid; }
.moves { display: flex; gap: 2px; }
.moves form { display: contents; }
.move { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 0; background: none; color: var(--dust); cursor: pointer; }
.move:hover, .move:focus-visible { background: var(--sleeve-2); color: var(--paper); }
.move svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.crate li { display: flex; align-items: center; gap: 10px; }
.crate li > a { flex: 1; min-width: 0; }
.crate li > form { display: contents; }
.add-list { flex: none; font: 600 12px var(--text); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--groove); background: transparent; color: var(--amber); cursor: pointer; white-space: nowrap; }
.on-list { flex: none; font-style: normal; font-size: 12px; font-weight: 600; color: var(--sage); white-space: nowrap; }

/* ---- names from another version ---- */
.names-from { margin-top: 12px; display: grid; gap: 8px; }
.names-from summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--amber); }
.versions { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.versions form { display: grid; }
.versions button {
  width: 100%; display: grid; gap: 2px; text-align: left; font: inherit; color: var(--paper); background: var(--shellac);
  border: 1px solid var(--groove); border-radius: 12px; padding: 11px 14px; cursor: pointer;
}
.versions button:hover { border-color: var(--amber); }
.versions strong { font-weight: 600; }
.versions small { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--dust); }
.versions .preview { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.versions .differs { font-size: 13px; color: var(--amber); }
.versions em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--amber); margin-top: 4px; }

/* ---- the record still playing, on top of the inbox ---- */
.record.playing { border-color: var(--red); box-shadow: 0 0 0 1px rgba(255, 91, 71, .25), 0 10px 30px rgba(255, 91, 71, .08); }
.record.playing .record-head .state { color: var(--red); display: inline-flex; align-items: center; gap: 8px; font-size: 15px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); animation: lamp 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ---- notifications ---- */
.bell { color: var(--dust); display: grid; place-items: center; width: 44px; height: 44px; position: relative; }
.status .clock:empty + .bell { margin-left: auto; }
.bell svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bell.on { color: var(--amber); }
.bell .slash { display: none; }
.bell.off .slash, .bell.paused .slash { display: inline; }

.alerts-master { background: var(--sleeve); border: 1px solid var(--groove); border-radius: 18px; padding: 16px; display: grid; gap: 14px; }
.alerts-master.on { border-color: rgba(255, 174, 66, .45); box-shadow: 0 0 24px rgba(255, 174, 66, .08) inset; }
.alerts-master.paused { border-style: dashed; }
.pause { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pause > span { color: var(--dust); font-size: 14px; font-weight: 600; margin-right: 2px; }
.pause form { margin: 0; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; margin: 0; }
.switch-row > span { display: grid; gap: 2px; min-width: 0; }
.switch-row b { font-weight: 600; font-size: 16px; }
.switch-row small { color: var(--dust); font-size: 13px; line-height: 1.35; }
.switch-row.big { padding: 0; }
.switch-row.big b { font: 800 30px/1 var(--display); letter-spacing: .01em; }
.switch { position: relative; flex: none; width: 52px; height: 32px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 16px; background: var(--sleeve-2); border: 1px solid var(--groove); transition: background .18s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--dust); transition: transform .18s, background .18s; }
.switch input:checked + i { background: var(--amber); border-color: var(--amber); }
.switch input:checked + i::after { transform: translateX(20px); background: #2a1702; }
.switch input:focus-visible + i { outline: 2px solid var(--amber); outline-offset: 3px; }

.kind-group { background: var(--sleeve); border-radius: 14px; padding: 4px 16px; margin-bottom: 14px; }
.kind-group h3 { font: 700 13px var(--text); color: var(--dust); text-transform: uppercase; letter-spacing: .08em; margin: 12px 0 0; }
.kind-group .switch-row + .switch-row { border-top: 1px solid var(--groove); }

.push-box { background: var(--sleeve); border-radius: 14px; padding: 14px 16px; display: grid; gap: 12px; }
.push-state { font-weight: 600; }
.push-steps { margin: 0; padding-left: 20px; color: var(--dust); font-size: 14px; display: grid; gap: 4px; }
.push-steps b { color: var(--paper); }
.phones { list-style: none; margin: 10px 0 0; padding: 0; }
.phones li { display: flex; justify-content: space-between; align-items: center; padding: 6px 2px; }
.phones span { display: grid; }
.phones small { color: var(--dust); font-size: 13px; }

.ntfy { background: var(--sleeve); border-radius: 14px; padding: 4px 16px 14px; display: grid; gap: 10px; }
.field { display: grid; gap: 4px; }
.field span { font-size: 13px; color: var(--dust); font-weight: 600; }
.field input { font: 500 16px var(--text); color: var(--paper); background: var(--sleeve-2); border: 1px solid var(--groove); border-radius: 10px; padding: 10px 12px; width: 100%; }

.alert-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--groove); border-radius: 14px; overflow: hidden; }
.alert-log li { background: var(--sleeve); padding: 10px 14px; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; }
.alert-log time { color: var(--dust); font-size: 13px; grid-row: span 2; padding-top: 2px; white-space: nowrap; }
.alert-log span { display: grid; min-width: 0; }
.alert-log small { color: var(--dust); font-size: 13px; overflow-wrap: anywhere; }
.alert-log em { font-style: normal; font-size: 12px; color: var(--sage); grid-column: 2; }
.alert-log li.muted { opacity: .55; }
.alert-log li.muted em { color: var(--dust); }
.alert-log li.failed em { color: var(--red); }

/* ---- hit areas: small pills keep their look and take a 44 px tap ---- */
.dlink, .tag-open, .add-list, .to-levels, .chip, .flag-list a, .filters a, .link, .want-other summary,
.names summary, .names-from summary, .flag-add summary, .decide summary { position: relative; }
.dlink::after, .tag-open::after, .add-list::after, .pick-link::after, .to-levels::after, .flag-list a::after, .link::after { content: ""; position: absolute; inset: -9px -4px; }
.chip::after, .filters a::after { content: ""; position: absolute; inset: -4px -3px; }  /* rows of chips sit 8 px apart: no overlap */
.names summary, .names-from summary, .flag-add summary, .want-other summary { min-height: 44px; display: flex; align-items: center; gap: 6px; }
.names summary::before, .names-from summary::before, .flag-add summary::before, .want-other summary::before { content: "\25B8"; font-size: 12px; transition: transform .15s; }
details[open] > summary::before { transform: rotate(90deg); }
.names summary::-webkit-details-marker, .names-from summary::-webkit-details-marker, .flag-add summary::-webkit-details-marker,
.want-other summary::-webkit-details-marker { display: none; }
.names summary, .names-from summary, .flag-add summary, .want-other summary { list-style: none; }

/* ---- a flag's note and its button side by side, the button under a long note ---- */
.flag-note { flex-wrap: wrap; }
.flag-note p { flex: 1 1 220px; }
.flag-note .link { white-space: nowrap; }

/* ---- file buttons reachable by keyboard: the input stays focusable, out of sight ---- */
.button input[type=file], .import .button input[type=file] { display: block; position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip-path: inset(50%); }
label.button { position: relative; }
label.button:focus-within { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ---- a tap that started something: the button says so and takes no second tap ---- */
form.busy button, form.busy .button { opacity: .65; pointer-events: none; }
form.busy .button.primary { opacity: .8; }
.button .working::before, .busy-note::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px;
  border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: turn .8s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .button .working::before, .busy-note::before { animation: none; } }

/* ---- an action that failed: the page says what happened and leads back ---- */
.problem-page { display: grid; gap: 16px; padding-top: 24px; }
.problem-page p { font-size: 17px; }

/* ---- the album player deck: the page scrolls past it ---- */
body.deck-on main { padding-bottom: calc(190px + env(safe-area-inset-bottom)); }
.offline-note { color: var(--red); }
.filters { padding-top: 4px; }
.playable .strip::before { content: ""; position: absolute; inset: -14px 0; }  /* a 44 px band to tap or drag on */

/* ---- Digital: Rekordbox tracks with BPM, key and where they live (vinyl, digital, both) ---- */
.dig-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 14px; }
.dig-filters label { display: flex; align-items: center; gap: 6px; color: var(--dust); font-size: 14px; }
.find .dig-filters input, .dig-filters select { width: auto; margin: 0; font: 500 16px var(--text); padding: 9px 10px; border-radius: 10px;
  border: 1px solid var(--groove); background: var(--sleeve); color: var(--paper); min-height: 44px; }
.find .dig-filters input { width: 5em; }
.dtracks .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0;
  text-decoration: none; color: inherit; min-height: 44px; }
.dtracks .row:has(.pos), .numbered .row { grid-template-columns: 32px minmax(0, 1fr) auto; }
.dtracks .who { min-width: 0; display: grid; }
.dtracks strong { font: 700 18px/1.1 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dtracks .who span, .dtracks .who small { color: var(--dust); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dtracks .who small { font-size: 12px; opacity: .85; }
.dtracks .dj { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.dtracks .dj b { font: 700 18px var(--display); color: var(--paper); }
.dtracks .dj i { font-style: normal; font-size: 13px; font-weight: 600; color: var(--dust); min-width: 2.2em; text-align: right; }
.src { font-style: normal; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px;
  border-radius: 999px; background: var(--sleeve); color: var(--dust); }
.src.both { background: var(--sage); color: var(--shellac); }
.src.vinyl { color: var(--amber); }
.rb-how { margin: -4px 0 18px; }
.rb-how code { color: var(--paper); overflow-wrap: anywhere; }
.pl-tree { list-style: none; padding: 0; margin: 0; }
.pl-tree .pl-tree { padding-left: 16px; border-left: 1px solid var(--groove); margin: 2px 0 6px 4px; }
.pl-tree a, .pl-tree summary { display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 44px;
  text-decoration: none; color: var(--paper); font-weight: 600; cursor: pointer; }
.pl-tree summary { color: var(--amber); }
.pl-tree span { color: var(--dust); font-weight: 500; font-size: 14px; white-space: nowrap; }
@media (max-width: 380px) { .dtracks .dj .src { display: none; } .dtracks .dj .src.both { display: inline; } }
.dirty-mark { margin-top: 12px; }
.flag-note.dirty b, .play-again .wash { color: var(--amber); }
.play-again .wash { font-style: normal; font-weight: 600; margin-right: 6px; }
/* Incomplete: a track in the library misses audio until its side is played again. */
.flag-note.incomplete b { color: var(--amber); }
.rerip { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--amber);
  border: 1px solid currentColor; border-radius: 999px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; white-space: nowrap; }
.play-again .rerip { margin: 0 6px 0 0; }
.tile .rerip { position: absolute; top: 8px; left: 8px; margin: 0; background: rgba(28, 22, 19, .88); }
.tile .no-discogs ~ .rerip { top: 34px; }

/* ---- the Library's wide pages: sidebar on a desk, chip row on the phone (library.html, album.html, playlist.html) ---- */
.wide main { max-width: 1400px; }
.shell { display: block; }
.sidebar { display: none; }
.lib-chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -4px 14px; padding: 0 4px 2px; scrollbar-width: none; }
.lib-chips a { flex: none; padding: 7px 14px; border-radius: 999px; background: var(--sleeve); color: var(--dust); text-decoration: none; font-size: 14px; font-weight: 600; }
.lib-chips a.on { background: var(--paper); color: var(--shellac); }
@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); max-width: 1640px; margin: 0 auto; }
  .wide main { max-width: none; margin: 0; padding-left: 28px; padding-right: 28px; }
  .lib-chips { display: none; }
  .sidebar {
    display: flex; flex-direction: column; gap: 1px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    padding: calc(18px + env(safe-area-inset-top)) 12px 110px 16px; border-right: 1px solid var(--groove);
  }
  .sidebar a, .sidebar summary { display: flex; justify-content: space-between; gap: 8px; padding: 5px 8px; border-radius: 8px; color: var(--dust); text-decoration: none; font-size: 14px; cursor: pointer; }
  .sidebar a span, .sidebar summary span { color: var(--groove); font-size: 12px; }
  .sidebar a:hover, .sidebar summary:hover { background: var(--sleeve); color: var(--paper); }
  .sidebar a.on { color: var(--amber); background: var(--sleeve); }
  .sidebar a.in-folder { padding-left: 20px; }
  .sidebar a.drop-on { outline: 1px dashed var(--amber); color: var(--paper); }
  .side-head { margin: 16px 8px 4px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--paper); font-weight: 700; }
  .side-head:first-child { margin-top: 0; }
  .side-new input, .side-find { width: 100%; margin: 2px 0; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--groove); background: var(--sleeve); color: var(--paper); font: inherit; font-size: 13px; }
}

.lib-find { display: grid; gap: 10px; margin-bottom: 8px; }
.lib-find input[type=search] { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--groove); background: var(--sleeve); color: var(--paper); font: inherit; }
.lib-bar, .lib-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lib-bar select, .lib-filters select, .lib-filters .bpm input { min-height: 36px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--groove); background: var(--sleeve); color: var(--paper); font: inherit; font-size: 14px; }
.lib-filters .bpm { display: inline-flex; gap: 6px; align-items: center; color: var(--dust); font-size: 14px; }
.lib-filters .bpm input { width: 70px; }
.pills { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--sleeve); }
.pills label { padding: 6px 14px; border-radius: 999px; color: var(--dust); font-size: 14px; font-weight: 600; cursor: pointer; }
.pills label.on, .pills label:has(input:checked) { background: var(--paper); color: var(--shellac); }
.chip-check { position: relative; display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--groove); color: var(--dust); font-size: 14px; cursor: pointer; text-decoration: none; }
.chip-check:has(input:checked), .chip-check.on { border-color: var(--amber); color: var(--amber); }
.lib-links { margin: 4px 0 16px; }
.lib-links code { font-size: 12px; }

.tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
@media (min-width: 560px) { .tiles { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }
.tile { position: relative; }
.tile > a { display: grid; gap: 3px; text-decoration: none; position: relative; }
.tile .sleeve { margin-bottom: 4px; }
.tile strong { font-weight: 700; font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile > a > span:last-child { color: var(--dust); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.shelf-only .sleeve img, .tile.shelf-only .initials { opacity: .38; filter: grayscale(.55); }
.tile .src, .tile .no-discogs { position: absolute; top: 8px; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; background: rgba(28, 22, 19, .88); }
.tile .src { right: 8px; }
.tile .no-discogs { left: 8px; color: var(--dust); text-transform: none; letter-spacing: 0; font-weight: 600; }
.src-vinyl { color: var(--amber); } .src-digital { color: var(--sage); } .src-both { color: var(--paper); }
.initials { display: grid; place-items: center; width: 100%; height: 100%; font: 800 44px/1 var(--display); color: var(--dust); background: var(--sleeve-2); }
.tile-pick { position: absolute; z-index: 2; bottom: 54px; right: 6px; width: 28px; height: 28px; border-radius: 50%; background: rgba(28, 22, 19, .85); display: none; place-items: center; cursor: pointer; }
.tile-pick input { width: 16px; height: 16px; accent-color: var(--amber); }
.tile:hover .tile-pick, .selecting .tile-pick, .tile-pick:has(input:checked) { display: grid; }

.artist-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.artist-list a { display: grid; grid-template-columns: 92px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 8px; border-radius: 12px; text-decoration: none; }
.artist-list a:hover { background: var(--sleeve); }
.artist-covers { grid-row: span 2; display: flex; }
.artist-covers img { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; margin-right: -18px; box-shadow: 0 0 0 2px var(--shellac); }
.artist-list strong { font-weight: 700; align-self: end; }
.artist-list a > span:last-child { color: var(--dust); font-size: 13px; align-self: start; }
.pills input, .chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.lib-find .pills input, .lib-find .chip-check input { width: 1px; height: 1px; padding: 0; margin: 0; border: 0; }
.lib-find .switch input { width: 100%; height: 100%; padding: 0; margin: 0; border: 0; }
.lib-switch { display: inline-flex; align-items: center; gap: 8px; color: var(--dust); font-size: 14px; cursor: pointer; }
.lib-switch:has(input:checked) { color: var(--paper); }
.lib-find input[type=search] { margin-bottom: 0; }
.lib-filters .bpm input { margin: 0; padding: 4px 10px; font-size: 14px; }

/* ---- record page additions: source chip, quick tag box, playlist button, selection ---- */
.src { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.track-extra .src { padding: 2px 6px; border-radius: 999px; background: var(--sleeve); }
.pick-track { display: inline-grid; place-items: center; width: 22px; height: 22px; cursor: pointer; }
.pick-track input { width: 16px; height: 16px; margin: 0; accent-color: var(--amber); }
.quick-tag { position: relative; display: inline-block; }
.quick-tag input { width: 92px; min-height: 28px; padding: 3px 10px; border-radius: 999px; border: 1px dashed var(--groove); background: transparent; color: var(--paper); font: inherit; font-size: 13px; }
.quick-tag input:focus { width: 150px; border-style: solid; border-color: var(--amber); outline: none; }
.quick-list { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; min-width: 220px; padding: 4px; border-radius: 10px; border: 1px solid var(--groove); background: var(--sleeve); box-shadow: 0 12px 30px rgba(0,0,0,.5); display: grid; }
.quick-list button { display: flex; justify-content: space-between; gap: 12px; padding: 6px 8px; border: 0; border-radius: 6px; background: none; color: var(--paper); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.quick-list button small { color: var(--dust); font-size: 12px; }
.quick-list button.hl, .quick-list button:hover { background: var(--sleeve-2); }
.plist-btn { width: 30px; height: 30px; border-radius: 50%; border: 0; background: none; color: var(--dust); font-size: 20px; line-height: 1; cursor: pointer; }
.plist-btn:hover { color: var(--amber); background: var(--sleeve); }
.dig-btn { display: inline-grid; place-items: center; width: auto; padding: 0 6px; border-radius: 999px; font: 600 12px var(--text); text-decoration: none; }
.plist-pop { position: fixed; z-index: 40; display: flex; flex-direction: column; width: 280px; overflow: hidden; padding: 10px; border-radius: 14px; border: 1px solid var(--groove); background: var(--sleeve); box-shadow: 0 18px 40px rgba(0,0,0,.55); }
.plist-pop[hidden] { display: none; }
.plist-title { margin: 2px 4px 8px; font-size: 13px; font-weight: 700; color: var(--paper); }
.plist-pop input { flex: none; width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--groove); background: var(--shellac); color: var(--paper); font: inherit; font-size: 15px; }
.plist-pop input:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255,174,66,.18); }
.plist-pop input::-webkit-search-cancel-button { filter: invert(.7); }
.plist-pop ul { list-style: none; margin: 0; padding: 0; max-height: 260px; min-height: 0; overflow-y: auto; flex: 0 1 auto; }
.plist-pop button { display: flex; width: 100%; align-items: center; gap: 10px; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--paper); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.plist-pop button:hover, .plist-pop button:focus-visible { background: var(--sleeve-2); outline: none; }
.plist-pop .plist-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plist-pop button small { color: var(--dust); font-size: 12px; margin-left: auto; flex: none; }
.plist-pop button i { color: var(--sage); font-style: normal; width: 14px; flex: none; }
.plist-pop .plist-new { margin-top: 6px; color: var(--amber); }
.plist-pop .plist-new[hidden] { display: none; }
.plist-pop .plist-new span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--amber); color: var(--shellac); font-weight: 800; flex: none; }
.plist-pop .plist-new b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.plist-error { margin: 6px 8px 2px; font-size: 13px; color: var(--red); }
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 14px; max-width: calc(100% - 32px);
  padding: 11px 14px 11px 16px; border-radius: 12px; background: var(--paper); color: var(--shellac); font-size: 14px; font-weight: 600; box-shadow: 0 12px 30px rgba(0,0,0,.5);
  opacity: 0; transform: translate(-50%, 10px); transition: opacity .2s, transform .2s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast a { color: var(--shellac); text-decoration: underline; text-underline-offset: 3px; flex: none; }
.toast a[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
.pop-head { margin: 6px 8px 2px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dust); }
.sel-bar { position: fixed; z-index: 35; left: 50%; transform: translateX(-50%); bottom: calc(74px + env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  width: min(640px, calc(100% - 24px)); padding: 10px 14px; border-radius: 14px; background: var(--paper); color: var(--shellac); box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.sel-bar .quick-tag input { color: var(--shellac); border-color: var(--shellac); }
.sel-bar .button { min-height: 34px; }
.sel-bar .button.quiet { color: var(--shellac); }
.button.small { min-height: 32px; padding: 4px 12px; font-size: 14px; }

/* ---- price strip ---- */
.price-strip { margin: 0 0 22px; }
.price-strip:has(div) { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 18px; padding: 12px 14px; border-radius: 14px; background: var(--sleeve); }
.price-strip div { display: grid; gap: 1px; align-content: start; }
.price-strip span { color: var(--dust); font-size: 12px; }
.price-strip b { font: 800 22px/1.1 var(--display); color: var(--sage); }
.price-strip small { color: var(--dust); font-size: 12px; }
.price-strip .price-when, .price-strip .warn { grid-column: 1 / -1; }

/* ---- playlists ---- */
.inline-new { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.inline-new input, .inline-new select { min-height: 42px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--groove); background: var(--sleeve); color: var(--paper); font: inherit; }
.inline-new input { flex: 1 1 200px; }
form.inline { display: inline; }
.plist-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 2px; }
.plist-list a { display: flex; justify-content: space-between; padding: 10px 12px; border-radius: 10px; text-decoration: none; background: var(--sleeve); }
.plist-list span { color: var(--dust); font-size: 14px; }
.plist-head { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; margin: 4px 0 16px; }
.plist-head h1 { font-size: clamp(36px, 8vw, 56px); margin: 2px 0 6px; }
.plist-head .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: flex-start; }
.mosaic { width: 150px; height: 150px; flex: none; display: grid; grid-template-columns: 1fr 1fr; border-radius: 6px; overflow: hidden; background: var(--sleeve-2); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.mosaic img:only-child { grid-column: span 2; grid-row: span 2; }
.plist-edit { display: inline-block; }
.plist-edit[open] { display: block; width: 100%; padding: 10px; border-radius: 12px; background: var(--sleeve); }
.plist-tabs { display: flex; gap: 16px; margin: 8px 0 6px; border-bottom: 1px solid var(--groove); }
.plist-tabs a { padding: 6px 0; color: var(--dust); text-decoration: none; font-size: 14px; font-weight: 600; }
.plist-tabs a.on { color: var(--paper); box-shadow: inset 0 -2px var(--amber); }
.plist-rows { width: 100%; border-collapse: collapse; font-size: 14px; }
.plist-rows th { text-align: left; font-weight: 600; color: var(--dust); font-size: 12px; padding: 6px; }
.plist-rows td { padding: 6px; border-top: 1px solid var(--groove); vertical-align: middle; }
.plist-rows td a { text-decoration: none; }
.plist-rows tr.off td:not(:nth-child(4)) { opacity: .5; }
.plist-rows .play { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 6px; padding: 0; border: 0; border-radius: 50%; background: var(--sleeve-2); color: var(--amber); font-size: 11px; cursor: pointer; vertical-align: middle; }
.plist-rows .row-tools { white-space: nowrap; text-align: right; }
.plist-rows .row-tools form { display: inline; }
.plist-rows .row-tools button { border: 0; background: none; color: var(--dust); font-size: 15px; cursor: pointer; padding: 2px 4px; }
.mini { width: 36px; height: 36px; object-fit: cover; border-radius: 3px; display: block; background: var(--sleeve-2); }
.shelf-cell { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; border: 1px solid var(--groove); border-radius: 4px; }
@media (max-width: 640px) { .plist-rows th:nth-child(2), .plist-rows td:nth-child(2), .plist-rows th:nth-child(7), .plist-rows td:nth-child(7), .plist-rows th:nth-child(1), .plist-rows td:nth-child(1) { display: none; } }
.proposal { padding: 12px 14px; margin: 0 0 16px; border-radius: 12px; background: var(--sleeve); border-left: 3px solid var(--amber); }
.proposal ol { margin: 8px 0 12px; padding-left: 22px; columns: 2 220px; font-size: 14px; }
.pull { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 4px; }
.pull li { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; background: var(--sleeve); }
.pull li > div { flex: 1; min-width: 0; }
.pull a { text-decoration: none; }

/* ---- tags page ---- */
.tag-admin summary { list-style: none; cursor: pointer; }
.tag-admin summary::-webkit-details-marker { display: none; }
.tag-rows { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 4px; }
.tag-rows li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 6px 10px; border-radius: 10px; background: var(--sleeve); }
.tag-rows li > a { min-width: 120px; font-weight: 600; text-decoration: none; }
.tag-edit { display: flex; gap: 6px; margin-left: auto; }
.tag-edit input, .tag-edit select { min-height: 32px; padding: 3px 8px; border-radius: 8px; border: 1px solid var(--groove); background: var(--shellac); color: var(--paper); font: inherit; font-size: 13px; }
.tag-edit input { width: 140px; }
.dup { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 6px; border-radius: 10px; background: var(--sleeve); }
@media (min-width: 900px) {
  .wide .album-head { display: grid; grid-template-columns: 260px minmax(0, 1fr); column-gap: 28px; align-items: end; margin-bottom: 22px; }
  .wide .album-head > .sleeve { grid-row: 1 / span 4; width: 260px; margin: 0; }
  .wide .album-head > :not(.sleeve) { grid-column: 2; }
  .wide .tracklist { max-width: 1000px; }
}

/* ---- quick player and the Songs view (library.html) ---- */
.tile-play { position: absolute; z-index: 2; left: 8px; bottom: 58px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--amber); color: var(--shellac);
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 16px rgba(0,0,0,.5); opacity: .92; }
.tile-play svg { width: 18px; height: 18px; fill: currentColor; }
@media (hover: hover) { .tile-play { opacity: 0; transition: opacity .12s; } .tile:hover .tile-play, .tile-play:focus-visible { opacity: 1; } }
.src-rekordbox { color: var(--sage); }
.quick-player { position: fixed; z-index: 34; left: 0; right: 0; bottom: calc(62px + env(safe-area-inset-bottom)); background: rgba(39, 31, 26, .97);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--groove); padding: 8px var(--gutter) 6px; }
@media (min-width: 900px) { .quick-player { left: 210px; } }
.qp-head { display: flex; align-items: center; gap: 10px; max-width: 1200px; margin: 0 auto; }
.qp-head img { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; }
.qp-head p { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.qp-head p b, .qp-head p span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qp-head p span { color: var(--dust); font-size: 13px; }
.qp-tracks { max-width: 1200px; margin: 6px auto 0; max-height: 34vh; overflow-y: auto; }
.quick-player .deck { position: static; margin: 4px auto 0; max-width: 1200px; background: none; box-shadow: none; padding: 0; border: 0; }
.quick-player .deck .deck-art { display: none; }
body.has-quick-player main { padding-bottom: calc(274px + env(safe-area-inset-bottom)); }
body.has-quick-player .sel-bar { bottom: calc(254px + env(safe-area-inset-bottom)); }
.songs td b { font-weight: 600; }
.play-one { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--sleeve-2); color: var(--amber); font-size: 11px; cursor: pointer; }
.songs .row-tools label { margin-right: 4px; }
.songs { width: 100%; border-collapse: collapse; font-size: 14px; }
.songs th { text-align: left; font-weight: 600; color: var(--dust); font-size: 12px; padding: 6px; }
.songs td { padding: 6px; border-top: 1px solid var(--groove); vertical-align: middle; }
.songs td a { text-decoration: none; }
.songs .row-tools { white-space: nowrap; text-align: right; }
@media (max-width: 640px) { .songs .c-record, .songs .c-have, .songs .c-key, .songs .c-time, .songs .c-mood, .songs .c-slot, .songs .c-tags, .songs .c-year { display: none; } }
.songs .c-cover { width: 44px; padding-right: 0; }
.songs td.c-record { min-width: 150px; }
#collection-rows:has(> table.songs) { overflow-x: auto; }  /* many columns scroll inside the list, never the page */
@media (max-width: 640px) { .songs .cell-tag { white-space: normal; } }
.songs .c-cover img { width: 40px; height: 40px; object-fit: cover; border-radius: 3px; display: block; }
.songs .stars { color: var(--amber); letter-spacing: 1px; white-space: nowrap; font-size: 12px; }
.songs .stars i { font-style: normal; color: var(--groove); }
.songs .cell-tag { display: inline-block; font-size: 12px; padding: 1px 7px; margin: 1px 3px 1px 0; border-radius: 10px; background: var(--groove); white-space: nowrap; }
.col-pick { position: relative; }
.col-pick summary { list-style: none; cursor: pointer; }
.col-pick summary::-webkit-details-marker { display: none; }
.col-pick .col-pop { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; min-width: 170px; padding: 8px 12px; border-radius: 10px;
  background: var(--sleeve, #1f1a16); border: 1px solid var(--groove); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.col-pick .col-pop label { display: flex; gap: 8px; align-items: center; padding: 4px 0; font-size: 14px; white-space: nowrap; cursor: pointer; }

/* Track links (track_links.py): the list and the find box in the tag popup, the count on the track's line, the Now page line. */
.link-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 4px; }
.link-list:empty { display: none; }
.link-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; gap: 4px 8px; align-items: center; padding: 6px 4px 6px 10px; border-radius: 10px; background: var(--sleeve); }
.link-list .arrow, .live-links .arrow { font: 700 17px var(--display); color: var(--amber); }
.link-list li.both .arrow { color: var(--sage); }
.link-list a { color: var(--paper); text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-list a span { color: var(--dust); font-size: 13px; }
.link-list .music, .link-hits .music { color: var(--dust); font-variant-numeric: tabular-nums; font-size: 12px; }
.fit { color: var(--sage); font-size: 12px; font-weight: 700; }
.link-list li .fit { margin-left: -4px; }
.link-list form button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--groove); background: none; color: var(--dust); cursor: pointer; }
.link-list .link-note { grid-column: 2 / -1; margin: 0; color: var(--dust); font-size: 13px; font-style: italic; }
.link-add { display: grid; gap: 8px; }
.link-kind { display: flex; flex-wrap: wrap; gap: 6px; }
.link-kind input { accent-color: var(--amber); margin: 0 6px 0 0; }
.link-kind .chip-check:has(input:checked) { border-color: var(--amber); color: var(--paper); }
.link-add input[name=q], .link-add input[name=note] { width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--groove); background: var(--sleeve-2); color: var(--paper); font: inherit; font-size: 15px; }
.link-add input[name=q]:focus, .link-add input[name=note]:focus { border-color: var(--amber); outline: none; }
.link-add input[name=note] { font-size: 14px; min-height: 34px; }
.link-find { position: relative; }
.link-hits { margin-top: 4px; display: grid; gap: 2px; max-height: 50vh; overflow-y: auto; border-radius: 10px; border: 1px solid var(--groove); background: var(--sleeve); padding: 4px; }
.link-hits button { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0 8px; text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--paper); font: inherit; font-size: 14px; cursor: pointer; }
.link-hits button b { grid-column: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-hits button > span { grid-column: 1; grid-row: 2; color: var(--dust); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-hits button small { grid-row: 1 / 3; align-self: center; }
.link-hits button.hl, .link-hits button:hover { background: var(--sleeve-2); }
.link-hits .aside { margin: 6px 10px; }
.link-count { padding: 4px 10px; border: 1px solid var(--groove); border-radius: 999px; background: none; color: var(--paper); font: 600 13px var(--text); cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-links { grid-column: 2 / -1; margin: 2px 0 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; }
.live-links a { color: var(--paper); text-decoration: none; }
.live-links small { color: var(--dust); }
.live-links .fit { color: var(--sage); margin-left: 4px; }

/* Music across the tabs (shell.js): the page in front in a frame over the page with the music, and the bar above the tabs. */
.shell-frame { position: fixed; inset: 0; z-index: 20; width: 100%; height: 100%; border: 0; background: var(--shellac); }
body.shell-covered { overflow: hidden; }
body.shell-barred main { padding-bottom: 72px; }
.shell-bar { position: fixed; z-index: 21; left: 10px; right: 10px; bottom: calc(66px + env(safe-area-inset-bottom)); max-width: 640px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) 44px 40px; gap: 6px; align-items: center; padding: 6px 6px 6px 14px; border-radius: 16px;
  background: rgba(39, 31, 26, .94); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid var(--groove); box-shadow: 0 10px 28px rgba(0, 0, 0, .5); }
.shell-what { display: grid; min-width: 0; text-align: left; background: none; border: 0; padding: 4px 0; color: var(--paper); font: inherit; cursor: pointer; }
.shell-what b, .shell-what span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.shell-what b { font-size: 15px; }
.shell-what span { color: var(--dust); font-size: 13px; }
.shell-toggle { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--paper); color: var(--shellac); cursor: pointer; display: grid; place-items: center; }
.shell-toggle svg { width: 20px; height: 20px; fill: currentColor; }
.shell-toggle .bars, .shell-bar.on .shell-toggle .tri { display: none; }
.shell-bar.on .shell-toggle .bars { display: inline; }
.shell-stop { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--groove); background: none; color: var(--dust); cursor: pointer; font-size: 15px; }

/* ---- album page, compact: small sleeve beside the title, short track rows, one line each on wide screens ---- */
.album-head { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 14px; align-items: center; }
.album-head > .sleeve { grid-row: 1 / span 3; align-self: start; width: 96px; margin: 0; box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.album-head > :not(.sleeve) { grid-column: 2; }
.album-head > .actions { grid-column: 1 / -1; margin-top: 14px; gap: 6px; }
.album-head h1 { font-size: clamp(26px, 7vw, 36px); }
.album-head .np-title { font-size: 16px; margin-top: 4px; }
.album-head .meta { font-size: 13px; margin-top: 4px; gap: 2px 12px; }
.album-head .actions .button, .confirm-all .button { min-height: 38px; padding: 6px 14px; font-size: 14px; }
.album-head .actions .play-all svg { width: 16px; height: 16px; }
.confirm-all { margin-top: 12px; }
.confirm-all .aside { font-size: 13px; }
.tracklist { margin-top: 14px; }
.tracklist .play, .tracklist .missing { grid-template-columns: 32px minmax(0, 1fr) auto; padding: 9px 2px; align-items: center; }
.tracklist .pos { font-size: 15px; }
.tracklist .d { font-size: 13px; }
.track-extra { margin: -2px 0 8px 42px; gap: 4px 8px; }
.track-extra .tag-open, .track-extra .suggest-count, .track-extra .link-count { padding: 2px 9px; font-size: 12px; }
.track-extra .tag-open { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-extra .bpm, .track-extra .key { font-size: 12px; }
.track-extra .quick-tag input { width: 72px; min-height: 26px; padding: 2px 9px; font-size: 12px; }
.track-extra .quick-tag input:focus { width: 140px; }
.track-extra .plist-btn { width: 26px; height: 26px; font-size: 17px; }
/* "Tag" and "N suggested" open the same popup: show one */
.track-extra:has(.suggest-count:not([hidden])) .tag-open:not(.has) { display: none; }
/* Checkboxes only while selecting (a long press starts it on a phone), or on hover with a mouse */
.track-extra .pick-track { display: none; }
body.selecting .track-extra .pick-track, .track-extra .pick-track:has(:checked) { display: inline-grid; }
@media (hover: hover) {
  .track-extra .pick-track { display: inline-grid; opacity: 0; transition: opacity .12s; }
  .tracklist li:hover .pick-track, .pick-track:focus-within, body.selecting .track-extra .pick-track, .track-extra .pick-track:has(:checked) { opacity: 1; }
}
@media (min-width: 900px) {
  .wide .album-head { grid-template-columns: 150px minmax(0, 1fr); column-gap: 22px; align-items: center; margin-bottom: 8px; }
  .wide .album-head > .sleeve { grid-row: 1 / span 4; width: 150px; align-self: center; }
  .wide .album-head > .actions { grid-column: 2; margin-top: 12px; }
  .wide .album-head h1 { font-size: 44px; }
  .wide .tracklist li { display: flex; align-items: center; gap: 10px; }
  .wide .tracklist .play, .wide .tracklist .missing { flex: 1 1 auto; min-width: 0; padding: 7px 2px; }
  .wide .tracklist .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .wide .track-extra { display: contents; }
  .wide .track-extra > * { flex: none; }
  .wide .track-extra .pick-track { order: -1; }
  .wide .track-extra .link-count { max-width: 200px; }
  .wide .album-head + .price-strip:has(div) { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 1000px; }
}
.album-head { margin-bottom: 14px; }
.album-head + .price-strip:has(div) { grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 6px 16px; padding: 10px 12px; margin-bottom: 0; }
.album-head + .price-strip b { font-size: 18px; }
.album-head + .price-strip small, .album-head + .price-strip .price-when { font-size: 12px; }
.price-strip .price-when { margin: 2px 0 0; }
.dirty-mark .button { min-height: 36px; padding: 6px 14px; font-size: 14px; }

/* smart playlists (smart.py) and the stick line on a playlist page */
.rules { display: grid; gap: 10px; margin: 0 0 20px; padding: 14px; border-radius: 14px; background: var(--sleeve); }
.rules select, .rules input:not([type=checkbox]) { font: 500 16px var(--text); padding: 9px 12px; border-radius: 10px; border: 1px solid var(--groove); background: var(--sleeve-2); color: var(--paper); min-width: 0; }
.rules .match { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--dust); }
.rule-line { margin: 0; font: 700 17px/1.2 var(--display); color: var(--amber); }
.rule { border: 0; border-top: 1px solid var(--groove); padding: 10px 0 0; margin: 0; display: grid; gap: 8px; }
.rule-body { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rule-body[hidden], .rules .values[hidden] { display: none; }
.rules > .button { justify-self: start; }
.stick-how { margin: 28px 0 12px; padding: 14px 16px; border-radius: 14px; background: var(--sleeve); display: grid; gap: 8px; }
.stick-how h2 { margin: 0; font-size: 18px; }
.stick-how p { margin: 0; }
.stick-how code.copy { display: block; overflow-x: auto; white-space: nowrap; padding: 10px; border-radius: 8px; background: var(--shellac); font-size: 13px; }

/* Ratings (_rate.html, ratings.py): three stars, shit, fine, insane; the stars up to the rating light. */
.rate { display: inline-flex; align-items: center; gap: 0; }
.rate button {
  display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 999px;
  background: transparent; color: var(--dust); cursor: pointer; opacity: .55;
}
.rate button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rate button:hover, .rate button:focus-visible { opacity: 1; }
.rate button:active { transform: scale(.9); }
.rate[data-rating="dud"] button[value="dud"],
.rate[data-rating="fine"] button:is([value="dud"], [value="fine"]),
.rate[data-rating="fav"] button { color: var(--amber); opacity: 1; }
.rate[data-rating="dud"] button[value="dud"] { color: var(--red); }
.rate button[aria-pressed="true"] svg,
.rate[data-rating="fine"] button[value="dud"] svg, .rate[data-rating="fav"] button svg { fill: currentColor; }
/* hovering a star shows the rating a tap would give */
@media (hover: hover) { .rate:hover button { color: var(--dust); } .rate:hover button svg { fill: none; }
  .rate button:hover, .rate button:has(~ button:hover) { color: var(--amber) !important; opacity: 1; }
  .rate button:hover svg, .rate button:has(~ button:hover) svg { fill: currentColor !important; } }
.track-extra .rate button { width: 24px; height: 26px; }
.track-extra .rate button svg { width: 15px; height: 15px; }
.album-head .actions .rate { border: 1px solid var(--groove); border-radius: 999px; padding: 0 4px; }
.album-head .actions .rate button { width: 32px; height: 38px; }
.album-head .actions .rate button svg { width: 18px; height: 18px; }
/* The rating sits at the end of the tempo row, so the title keeps its width on a phone. */
.deck-in:has(.deck-rate:not([hidden])) {
  grid-template-columns: 48px minmax(0, 1fr) auto auto; grid-template-areas: "art what keys keys" "bar bar bar bar" "tempo tempo tempo rate";
}
.deck-in:has(.deck-rate:not([hidden])) .tempo-ctl { grid-template-columns: auto minmax(0, 1fr) 54px auto; }
.deck-rate { grid-area: rate; justify-self: end; }
.deck-rate button { width: 32px; height: 30px; }
.deck-rate button svg { width: 19px; height: 19px; }
.now-rate { justify-content: center; margin-top: 6px; }
.now-rate button { width: 40px; height: 40px; }
.now-rate button svg { width: 22px; height: 22px; }
.live-tracks li { grid-template-columns: 34px 1fr auto auto auto; }
.live-tracks .rate { align-self: center; }
.live-tracks .rate button { width: 28px; height: 28px; }
.songs .play-cell { white-space: nowrap; }
.songs .play-cell .rate { vertical-align: middle; }
.songs .rate button { width: 22px; height: 26px; }
.songs .rate button svg { width: 15px; height: 15px; }
.tile-rated {
  position: absolute; right: 6px; bottom: 6px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 999px;
  font-size: 13px; line-height: 1; background: rgba(28, 22, 19, .88);
}
.tile-rated.fav { width: auto; padding: 0 7px; font-size: 11px; letter-spacing: 1px; }
.tile-rated.fav { color: var(--amber); }
.tile-rated.dud { color: var(--red); }

/* The Now page's identify bar: search and paste a link, the label photo beside it. */
.identify { margin: 14px 0 4px; text-align: left; }
.identify-bar { display: flex; gap: 8px; align-items: stretch; }
.identify-bar input[type=search] { flex: 1; min-width: 0; }
.identify-bar form { display: contents; }
.identify-photo { display: grid; place-items: center; width: 50px; flex: none; border-radius: 12px; border: 1px solid var(--groove);
  background: var(--shellac); color: var(--amber); cursor: pointer; }
.identify-photo svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.identify-photo input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.identify .results:not(:empty) { margin-top: 8px; }

/* The login page, for the app reached from the internet (vinylrec/auth.py) */
.login-page { display: grid; gap: 16px; max-width: 360px; margin: 0 auto; padding-top: 18vh; }
.login-page label { display: grid; gap: 8px; }
.login-page input[type=password] { min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--groove); background: var(--sleeve); color: var(--paper); font: inherit; }
.login-error { color: var(--red); }
/* ---- the inbox, tidy: rows for records on their way to the library, folded extras on the cards ---- */
.saving { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.saving li { display: grid; grid-template-columns: 44px 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--sleeve); }
.saving .thumb { width: 44px; height: 44px; }
.saving .who { min-width: 0; display: grid; }
.saving .who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saving .who b a { color: inherit; text-decoration: none; }
.saving .who span { color: var(--dust); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saving .who small { color: var(--dust); font-size: 13px; margin-top: 2px; }
.saving .who small.busy { color: var(--amber); }
.saving .who small i { font: 700 13px var(--display); font-style: normal; color: var(--paper); margin-left: 4px; padding: 0 5px; border-radius: 4px; border: 1px solid var(--groove); }
.saving .who small i.done { color: var(--sage); border-color: var(--sage); }
.saving .rename { grid-column: 3; font-size: 13px; color: var(--dust); }
.saving .rename[open] { grid-column: 1 / -1; }
.saving .rename summary { cursor: pointer; list-style: none; min-height: 44px; display: flex; align-items: center; }
.saving .rename summary::-webkit-details-marker { display: none; }
.side-done { font-size: 14px; color: var(--sage); }
.side-done a { color: var(--amber); }
.why, .card-more { font-size: 14px; color: var(--dust); }
.why summary, .card-more summary { cursor: pointer; list-style: none; min-height: 44px; display: flex; align-items: center; gap: 6px; font-weight: 600; }
.why summary::-webkit-details-marker, .card-more summary::-webkit-details-marker { display: none; }
.why summary::before, .card-more summary::before { content: "\25B8"; font-size: 12px; transition: transform .15s; }
.why[open] summary::before, .card-more[open] summary::before { transform: rotate(90deg); }
.why > * + *, .card-more > * + * { margin-top: 10px; }
.card-more { border-top: 1px solid var(--groove); padding-top: 2px; }
