/* The listening app. Dark by default, light on request (You → Light mode).
   Loads /style.css first for fonts and base; everything visual is here. */

:root {
  --orange: #f6711e;
  --on-orange: #1a0d05;
  --bg: #0f0d0c;
  --bg2: #191513;
  --bg3: #241f1b;
  --ink: #f8f4f1;
  --ink2: #b5aca5;
  --ink3: #83796f;
  --line: #2c2622;
  --warn: #ef7d5c;
  --warn-bg: #2a1710;
  --good: #5fb887;
  --sheet: #1c1815;
  --scrim: rgba(8, 6, 5, .6);
  --col: 720px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #ffffff;
  --bg2: #f7f4f1;
  --bg3: #efeae5;
  --ink: #131110;
  --ink2: #4a4644;
  --ink3: #7d7874;
  --line: #e3ddd8;
  --warn: #b3402a;
  --warn-bg: #fbeee9;
  --good: #2f6b46;
  --sheet: #ffffff;
  --scrim: rgba(19, 17, 16, .35);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--ink); }
/* A tap is a tap. Without this, iPhone Safari treats a quick double tap as
   "zoom in here" (a double tap on a tab nudged the page) and waits to see if
   a tap is the first of two. Pinching to zoom still works. Text isn't
   enlarged on rotating the phone either. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body, button, a, input, textarea, select, label, [role="button"] { touch-action: manipulation; }
/* No scrollbars: a phone app scrolls by touch, and the bar only takes room. */
html, body, .np, .sheet .menu, .hscroll, .segs { scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar, .np::-webkit-scrollbar, .sheet .menu::-webkit-scrollbar, .segs::-webkit-scrollbar { display: none; }
body { margin: 0; font-family: Archivo, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: left; padding: 0; }
button:disabled { opacity: .4; cursor: default; }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin: 0; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@keyframes up { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes drop { from { transform: translate(-50%, -12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes bar { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

/* ── type helpers ─────────────────────────────────────────────────── */

.dim { color: var(--ink2); font-size: 14.5px; line-height: 1.5; }
.small { font-size: 12.5px; }
.mono, .mono-dim, .label, .badge, .chip, .mono-box, .times { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.mono { font-size: 12px; }
.mono-dim { font-size: 11.5px; color: var(--ink3); }
.label { display: block; font-size: 10.5px; letter-spacing: .13em; color: var(--ink3); }
.label.pad { padding: 18px 20px 10px; }
.good-ink { color: var(--good); }
.warn-ink { color: var(--warn); }
.note-line { display: flex; align-items: center; gap: 7px; font-size: 13.5px; }
.link-dim { display: inline-flex; align-items: center; gap: 6px; color: var(--ink3); font-size: 13px; }
.link-dim:hover { color: var(--ink); }

/* ── layout ───────────────────────────────────────────────────────── */

.app { min-height: 100vh; }
.content {
  max-width: var(--col); margin: 0 auto;
  padding-bottom: calc(130px + env(safe-area-inset-bottom, 0px));
}
.screen { padding-top: calc(env(safe-area-inset-top, 0px) + 18px); }
.pad { padding: 0 20px; }
.head { display: flex; align-items: center; gap: 12px; padding: 12px 20px 16px; }
.head h1 { font-size: 29px; font-weight: 800; letter-spacing: -.035em; }
.head .circle-btn:last-child:not(:first-child) { margin-left: auto; }
.head .h-sub { font-size: 22px; }
.stack { display: grid; gap: 12px; }
.row { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.list { display: flex; flex-direction: column; }
.hscroll { display: flex; gap: 13px; overflow-x: auto; padding: 0 20px 6px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 0 20px; }
@media (min-width: 620px) { .grid2 { grid-template-columns: repeat(3, 1fr); } }

/* ── artwork ──────────────────────────────────────────────────────── */

.art { display: block; flex: none; border-radius: 9px; background-size: cover; background-position: center; position: relative; overflow: hidden; }
.art.round { border-radius: 999px; }
.art.ring { border: 3px solid var(--bg); }
.s40 { width: 40px; height: 40px; border-radius: 8px; }
.s44 { width: 44px; height: 44px; border-radius: 8px; }
.s50 { width: 50px; height: 50px; }
.s56 { width: 56px; height: 56px; border-radius: 12px; margin-bottom: 14px; }
.s58 { width: 58px; height: 58px; border-radius: 10px; }
.s76 { width: 76px; height: 76px; }
.s84 { width: 84px; height: 84px; }
.s152 { width: 152px; height: 152px; border-radius: 13px; }
.sq { width: 100%; aspect-ratio: 1; border-radius: 12px; }
.new {
  position: absolute; top: 9px; left: 9px; background: rgba(12, 10, 9, .62); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-family: "IBM Plex Mono", monospace; font-size: 9.5px; letter-spacing: .1em; padding: 4px 7px; border-radius: 999px; font-weight: 500;
}

/* ── buttons ──────────────────────────────────────────────────────── */

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--orange); color: var(--on-orange); border-radius: 999px;
  padding: 12px 20px; font-size: 15px; font-weight: 700;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary.sm { padding: 9px 16px; font-size: 13.5px; }
.btn-primary.wide, .btn-quiet.wide { width: 100%; border-radius: 13px; padding: 15px; font-size: 16px; }
.btn-quiet { color: var(--ink3); font-size: 15px; font-weight: 600; padding: 12px; text-align: center; }
.btn-quiet:hover { color: var(--ink); }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 15px;
  font-size: 13.5px; font-weight: 600; color: var(--ink2);
}
.pill:hover { border-color: var(--orange); color: var(--ink); }
.pill.sm { padding: 5px 11px; font-size: 12.5px; }
.pill:disabled { opacity: .5; }
.center { text-align: center; }

/* ── choosing a playlist's or a local album's picture ─────────────── */

.coll-cover { position: relative; display: block; }
/* Editing: a pencil on the picture to change it, a bin at its corner to remove it. */
.coll-cover-edit, .coll-cover-remove {
  position: absolute; width: 34px; height: 34px; border-radius: 999px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; background: var(--bg3); color: var(--ink);
  border: 3px solid var(--bg);
}
.coll-cover-edit { right: -6px; bottom: 4px; }
.coll-cover-remove { right: -6px; top: -6px; color: var(--warn); }
.coll-name {
  font: inherit; font-size: 25px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); text-align: center;
  background: none; border: none; border-bottom: 2px solid var(--orange); padding: 2px 4px; width: min(100%, 420px); outline: none;
}
.card-name { font-size: 14px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── dragging a song into place ───────────────────────────────────── */

[data-reorder] { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.q-row { background: var(--bg); position: relative; }
.lifted { position: relative; z-index: 5; box-shadow: 0 10px 28px rgba(0, 0, 0, .45); border-radius: 12px; transition: none !important; }
.q-row.lifted, .track.lifted .track-slide { background: var(--bg3); }
.reordering { touch-action: none; }

/* ── a link opened in Safari on an iPhone ─────────────────────────── */

.handoff {
  position: fixed; inset: 0; z-index: 96; background: var(--bg); display: flex; flex-direction: column; justify-content: center;
  gap: 12px; padding: calc(env(safe-area-inset-top, 0px) + 24px) 26px calc(env(safe-area-inset-bottom, 0px) + 24px);
  max-width: 460px; margin: 0 auto; animation: up .25s ease;
}
.handoff h1 { font-size: 30px; font-weight: 800; letter-spacing: -.035em; margin: 0 0 6px; }
.handoff-icon { width: 54px; height: 54px; border-radius: 15px; background: var(--bg3); color: var(--orange); display: flex; align-items: center; justify-content: center; }
.handoff-steps { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 8px; color: var(--ink2); font-size: 16px; }
.handoff .btn-primary.wide { margin-top: 4px; }

/* ── buying a song or an album ────────────────────────────────────── */

.buy { margin-top: 2px; }
.buy-price { display: flex; align-items: baseline; gap: 10px; }
.buy-price b { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.buy-check { display: flex; gap: 11px; align-items: flex-start; font-size: 14px; color: var(--ink2); line-height: 1.4; cursor: pointer; }
.buy-check input { width: 20px; height: 20px; flex: none; margin-top: 1px; accent-color: var(--orange); }
.buy-gift { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; }
.buy-gift .t { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 14.5px; }
.buy-gift .t span { font-size: 12.5px; }
.buy-gift input { appearance: none; width: 44px; height: 26px; border-radius: 999px; background: var(--bg3); position: relative; flex: none; transition: background .15s; cursor: pointer; }
.buy-gift input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 999px; background: #fff; transition: transform .15s; }
.buy-gift input:checked { background: var(--orange); }
.buy-gift input:checked::after { transform: translateX(18px); }
.btn-primary:disabled, .btn-quiet-solid:disabled { opacity: .45; filter: none; }
.btn-quiet-solid { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 13px; padding: 15px; font-size: 16px; font-weight: 700; background: var(--bg3); color: var(--ink); }
.btn-quiet-solid.wide { width: 100%; }
.btn-primary.wide { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.buy-pill { height: 46px; padding: 0 18px; font-size: 15px; font-weight: 800; color: var(--ink); border-color: var(--orange); }

/* what's been bought, under You */
.bought { display: grid; gap: 8px; }
.bought-artist { display: flex; align-items: center; gap: 6px; font-size: 16px; color: var(--ink); }
.bought-item { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; }
.bought-title { font-weight: 700; font-size: 14.5px; margin-bottom: 4px; }
.bought-track { display: flex; align-items: center; gap: 10px; min-height: 34px; }
.bought-track .t { flex: 1; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.circle-btn {
  width: 38px; height: 38px; border-radius: 999px; flex: none;
  background: var(--bg2); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
}
.circle-btn:hover { border-color: var(--orange); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px; color: var(--ink); position: relative; flex: none; }
.icon-btn.dim { color: var(--ink3); }
.icon-btn.on { color: var(--orange); }
.float-btn {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 14px); left: 16px;
  width: 36px; height: 36px; border-radius: 999px; background: rgba(10, 8, 7, .55); color: #fff;
  display: flex; align-items: center; justify-content: center;
}

/* ── inputs ───────────────────────────────────────────────────────── */

/* Every text box at 16px or more: below that, iPhones zoom the page in when
   one is tapped, and don't always zoom back out. */
input, textarea, select { font-size: 16px; }
.input, .input-row input {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); min-width: 0;
}
.input { background: var(--bg2); border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px; resize: vertical; }
.input.mono { font-family: "IBM Plex Mono", monospace; font-size: 16px; letter-spacing: -.02em; }
.input-row {
  display: flex; gap: 10px; align-items: center; color: var(--ink3);
  background: var(--bg2); border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px;
}
.input-row input { background: none; border: 0; font-weight: 600; outline: none; }
.input-row:focus-within { border-color: var(--orange); }
.add-form { display: grid; gap: 10px; margin-top: 4px; }

/* ── rows ─────────────────────────────────────────────────────────── */

.row-item, .track-main {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 20px; min-height: 52px;
}
.track { position: relative; overflow: hidden; width: 100%; }
/* The row itself, which a sideways swipe moves; what it will do shows under it. */
.track-slide { position: relative; z-index: 1; display: flex; align-items: center; width: 100%; background: var(--bg); will-change: transform; }
.swipe-under {
  position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 22px;
  background: var(--bg3); color: var(--ink3); opacity: 0; transition: background-color .15s ease, color .15s ease;
}
.track.swiping .swipe-under { opacity: 1; }
.track.left .swipe-queue, .track.right .swipe-like { visibility: hidden; }
.swipe-under span { display: flex; transition: transform .15s ease; }
.track.ready .swipe-under { background: var(--orange); color: #fff; }
.track.ready .swipe-under span { transform: scale(1.18); }
.track-main { flex: 1; min-width: 0; }
.track .more-btn { margin-right: 8px; padding: 9px; }
.track .track-main:has(+ .more-btn), .track .track-main:has(+ .track-edit) { padding-right: 4px; }
.track-edit { display: flex; gap: 2px; margin-right: 12px; }
.track-edit button { padding: 8px; display: flex; color: var(--ink3); }
.track-edit button.warn-ink { color: var(--warn); }
.track:hover .track-slide, .row-item:hover { background: var(--bg2); }
.track .n { width: 18px; flex: none; font-family: "IBM Plex Mono", monospace; font-size: 11.5px; color: var(--ink3); display: flex; }
.track .t, .row-item .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.track .t b, .row-item .t b { font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-item .t b { font-size: 15px; font-weight: 700; }
.track .t span { font-size: 12.5px; color: var(--ink3); }
.row-item .t .mono { display: inline-flex; align-items: center; gap: 4px; }
.track.on .t b { color: var(--orange); }
.track .d { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--ink3); flex: none; }
.badge { font-size: 10.5px; color: var(--ink3); border: 1px solid var(--line); border-radius: 999px; padding: 3px 7px; flex: none; }
.badge.good { color: var(--good); }
.bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.bars i { width: 3px; height: 100%; background: var(--orange); animation: bar .9s ease-in-out infinite; }
.bars i:nth-child(2) { animation-delay: .15s; }
.bars i:nth-child(3) { animation-delay: .3s; }
.btn-primary .bars i { background: var(--on-orange); }

.card-art { width: 152px; flex: none; display: flex; flex-direction: column; gap: 6px; }
.grid2 .card-art { width: auto; }
.card-art b { font-size: 14.5px; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; margin-top: 3px; }
.card-art span:not(.art):not(.new) { font-size: 13px; color: var(--ink3); }
.card-art:hover { opacity: .86; }
.card-artist { width: 84px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.card-artist span:last-child { font-size: 12.5px; font-weight: 600; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 84px; }

.segs { display: flex; gap: 7px; overflow-x: auto; padding: 0 20px 14px; }
.pad .segs { padding: 0 0 14px; }
.seg { flex: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 15px; font-size: 13.5px; font-weight: 600; color: var(--ink2); }
.seg.on { background: var(--orange); border-color: var(--orange); color: var(--on-orange); }

/* ── first run ────────────────────────────────────────────────────── */

.first { min-height: 80vh; display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top, 0px) + 80px) 26px 20px; max-width: 460px; }
.first h1 { font-size: 33px; font-weight: 800; letter-spacing: -.035em; line-height: 1.08; margin-top: 24px; }
.first .dim { margin: 12px 0 28px; max-width: 290px; }
.first-foot { margin-top: 28px; }

/* ── artist ───────────────────────────────────────────────────────── */

.artist.screen { padding-top: 0; }
.banner { height: calc(220px + env(safe-area-inset-top, 0px)); position: relative; background-size: cover; background-position: center; }
.artist-top { display: flex; align-items: flex-end; justify-content: space-between; margin-top: -34px; position: relative; }
.artist-top .artist-price { margin: 0 0 -4px; justify-content: flex-end; }
.artist-title { display: flex; align-items: center; gap: 8px; }
.artist-title .artist-name { min-width: 0; }
.trust-mark { color: var(--warn); display: flex; padding: 6px; margin: 4px 0 0 -2px; border-radius: 999px; flex: none; }
.trust-mark.on { background: var(--warn-bg); }
.trust-why { animation: up .2s ease; }
.banner-actions { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 14px); right: 16px; display: flex; gap: 8px; }
.banner-actions .float-btn { position: static; }
.float-pill {
  height: 36px; padding: 0 16px; border-radius: 999px; background: rgba(10, 8, 7, .55); color: #fff;
  font-size: 14px; font-weight: 700; display: inline-flex; align-items: center;
}
.float-pill.follow { background: var(--orange); color: #131110; }
.artist-name { font-size: 28px; font-weight: 800; letter-spacing: -.035em; margin: 12px 0 10px; }
.trust {
  display: flex; gap: 8px; align-items: flex-start; border-radius: 11px; padding: 10px 12px;
  font-family: "IBM Plex Mono", monospace; font-size: 12.5px; line-height: 1.4; border: 1px solid var(--line); background: var(--bg2);
}
.trust svg { flex: none; margin-top: 1px; }
.trust.good { color: var(--good); }
.trust.warn { color: var(--warn); background: var(--warn-bg); border-color: var(--warn); }
.chips { display: flex; gap: 7px; flex-wrap: wrap; margin: 12px 0; }
.chip { font-size: 11.5px; color: var(--ink2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; }
.chip.solid { background: var(--bg3); color: var(--ink); border-color: var(--bg3); }
.about-btn { padding: 0; cursor: pointer; }
.about { display: grid; justify-items: center; gap: 14px; margin: 4px 0 6px; }
.about-photo { width: 132px; height: 132px; }
.about p { white-space: pre-line; line-height: 1.5; max-height: 40vh; overflow-y: auto; width: 100%; }
.panel { background: var(--bg2); border: 1px solid var(--line); border-radius: 15px; padding: 16px; display: grid; gap: 8px; margin: 12px 0 4px; }
.panel > b { font-size: 15px; letter-spacing: -.015em; display: flex; gap: 7px; align-items: center; }
.panel h2 { font-size: 18px; letter-spacing: -.02em; }
.release { margin-top: 22px; }
.release-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.release-head .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.release-head .t b { font-size: 16px; letter-spacing: -.02em; }
.keep { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.foot-link { margin: 22px 0 8px; }

/* ── dock: low balance, mini player, tabs ─────────────────────────── */

.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: linear-gradient(transparent, var(--bg) 18px); pointer-events: none; }
.dock > * { pointer-events: auto; }
.lowbar, .mini { max-width: calc(var(--col) - 16px); margin: 0 auto 6px; width: calc(100% - 16px); }
.lowbar {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px;
  background: var(--bg3); border: 1px solid var(--line); font-size: 13px;
}
.lowbar b { margin-left: auto; color: var(--orange); }
/* Getting the app onto the home screen (install.jsx), above everything else in the dock. */
.install {
  display: flex; align-items: center; gap: 11px; padding: 9px 6px 9px 10px; border-radius: 12px;
  max-width: calc(var(--col) - 16px); margin: 0 auto 6px; width: calc(100% - 16px);
  background: var(--bg3); border: 1px solid var(--line); font-size: 13px;
}
.install img { border-radius: 8px; flex: none; }
.install-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; color: var(--ink2); }
.install-text > b { color: var(--ink); font-size: 14px; }
.install-text svg { display: inline-block; vertical-align: -2px; color: var(--orange); }
.install-go { margin-left: auto; padding: 7px 14px; border-radius: 999px; background: var(--orange); color: #131110; font-weight: 700; font-size: 13px; }
.install .icon-btn { margin-left: auto; }
.install-go + .icon-btn { margin-left: 0; }
.mini {
  display: flex; align-items: center; gap: 11px; padding: 8px 8px 8px 10px;
  /* Square along the top, where the progress line runs edge to edge. */
  border-radius: 0 0 14px 14px;
  background: var(--bg3); border: 1px solid var(--line); border-top-width: 0; cursor: pointer;
  position: relative;
}
/* The track the line runs along: the song still to come. */
.mini::before { content: ""; position: absolute; top: 0; left: -1px; right: -1px; height: 2px; background: var(--line); pointer-events: none; }
/* How far through the song, along the top, in the cover's colour (set on .mini). */
.mini-progress {
  position: absolute; top: 0; left: -1px; width: calc(100% + 2px); height: 2px; pointer-events: none;
  transform-origin: left center; background: var(--np-accent, var(--orange));
  transition: transform .3s linear, height .15s ease, background-color .6s ease;
}
:root[data-theme="light"] .mini-progress, :root[data-theme="light"] .mini-knob { background: var(--np-accent-light, var(--orange)); }
/* Where to grab it: a strip across the top edge, mostly above the card so
   taps on the card itself still open Now playing. */
.mini-scrub { position: absolute; left: -1px; right: -1px; top: -14px; height: 24px; z-index: 2; touch-action: none; cursor: pointer; }
.mini-knob {
  position: absolute; top: 2px; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 999px;
  background: var(--np-accent, var(--orange)); pointer-events: none; opacity: 0; transform: scale(.5);
  transition: opacity .15s ease, transform .15s ease;
}
.mini.scrubbing .mini-progress { height: 4px; transition: height .15s ease, background-color .6s ease; }
.mini.scrubbing .mini-knob { opacity: 1; transform: none; }
.mini-time { font-family: "IBM Plex Mono", ui-monospace, monospace; color: var(--ink2); }
.mini-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 3px; }
.mini-text b { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-text span { font-size: 11.5px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-sub { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mini-sub .badge { font-size: 9.5px; padding: 1px 6px; }
.np-who { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.np-who .np-artist { margin-top: 0; }
.badge.paid { color: var(--orange); border-color: var(--orange); }
.sub-line { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.chip.good { color: var(--good); display: inline-flex; align-items: center; gap: 5px; }
/* Close to the bottom edge on any phone: the home-indicator area is used,
   less a little, rather than stacked on top of our own padding. */
.tabs {
  display: flex; background: var(--bg); border-top: 1px solid var(--line);
  padding: 4px 8px max(6px, calc(env(safe-area-inset-bottom, 0px) - 14px));
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 0 2px; color: var(--ink3); font-size: 10.5px; font-weight: 600; }
.tab.on { color: var(--orange); }
.tab-icon { position: relative; display: flex; }
.tab-dot { position: absolute; top: -1px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); border: 2px solid var(--bg); }

/* ── now playing ──────────────────────────────────────────────────── */

.np { position: fixed; inset: 0; z-index: 70; background: var(--bg); display: flex; flex-direction: column; animation: up .28s ease; overflow-y: auto; }
/* The cover: a square with room round it, as big as fits without pushing the
   controls off a short phone. */
.np-top { display: flex; justify-content: center; padding-top: calc(env(safe-area-inset-top, 0px) + 4px); flex: none; }
.np-art {
  width: min(calc(100% - 48px), 44vh, 420px); aspect-ratio: 1; margin: 6px auto 0; flex: none; position: relative;
}
/* The cover, and the one sliding away — right off the screen — when the song changes. */
.np-art .slide { position: absolute; inset: 0; will-change: transform; }
.art-layer {
  position: absolute; inset: 0; border-radius: 14px; overflow: hidden; background-color: var(--bg2);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .45);
}
:root[data-theme="light"] .art-layer { box-shadow: 0 14px 34px rgba(19, 17, 16, .18); }
.np { overflow-x: hidden; }

/* A cover: its colours at once, the picture faded in when it's here. */
.cover { display: block; overflow: hidden; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s ease; }
.cover img.in { opacity: 1; }
.cover:not(.shown)::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .16) 50%, transparent 70%);
  background-size: 250% 100%; animation: sheen 1.3s ease-in-out infinite;
}
@keyframes sheen { from { background-position: 130% 0; } to { background-position: -30% 0; } }
@media (prefers-reduced-motion: reduce) { .cover:not(.shown)::after { animation: none; } }

/* The mini player's song, which slides over as it changes. */
.mini-slides { flex: 1; min-width: 0; position: relative; overflow: hidden; align-self: stretch; display: flex; }
.mini-slides .slide { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; will-change: transform; }
.mini-slides .slide.gone { position: absolute; inset: 0; }
.np-close { color: var(--ink2); padding: 8px 14px; }
.np-body { padding: 20px 20px calc(30px + env(safe-area-inset-bottom, 0px)); max-width: var(--col); width: 100%; margin: 0 auto; }
/* The song and its controls fill the first screen; what's next is below it. */
.np-stage { flex: none; min-height: 100%; display: flex; flex-direction: column; }
.np-more { padding: 0 20px calc(30px + env(safe-area-inset-bottom, 0px)); max-width: var(--col); width: 100%; margin: 0 auto; }
.np-more .upnext { margin-top: 4px; }
.sheet .tips { margin: 0; padding: 0; }
.sheet .tips > .label { display: none; }
.np h1 { font-size: 24px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.np-artist { display: flex; align-items: center; gap: 7px; margin-top: 6px; font-size: 15px; font-weight: 600; color: var(--ink2); }
.times { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink3); }
.controls { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; }
.play-big {
  width: 64px; height: 64px; border-radius: 999px; background: var(--np-accent, var(--orange)); color: var(--np-on, var(--on-orange));
  display: flex; align-items: center; justify-content: center;
}
/* The cover's colour, when there is one (set on .np); deeper on a light screen. */
.play-big { transition: background-color .6s ease, color .6s ease; }
:root[data-theme="light"] .play-big { background: var(--np-accent-light, var(--orange)); color: var(--np-on-light, var(--on-orange)); }
/* Buffering: a ring turning round the play button. */
.waiting { position: relative; }
.waiting::after {
  content: ""; position: absolute; inset: -4px; border-radius: 999px; pointer-events: none;
  border: 2px solid transparent; border-top-color: var(--np-accent, var(--orange)); animation: spin .9s linear infinite;
}
.icon-btn.waiting::after { inset: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.badge-1 { position: absolute; right: 3px; bottom: 3px; font-family: "IBM Plex Mono", monospace; font-size: 9px; }
.upnext { margin-top: 24px; }
/* Tips, in a sheet from Now playing. */
.tips { margin-top: 24px; }
.tip-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 9px; }
.tip-chip {
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px;
  font-size: 14.5px; font-weight: 700; color: var(--ink); text-align: center;
  transition: border-color .2s ease, color .2s ease;
}
.tip-chip:hover, .tip-chip:active { border-color: var(--np-accent, var(--orange)); color: var(--np-accent, var(--orange)); }
.tip-amply { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.tip-amply .tip-chip { padding: 5px 12px; font-size: 12.5px; color: var(--ink2); }
.label-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.q-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.q-art { flex: none; }
.q-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.q-text b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-text span { font-size: 11.5px; color: var(--ink3); }

/* ── sheets and toasts ────────────────────────────────────────────── */

.sheet-wrap { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.sheet-scrim { position: absolute; inset: 0; background: var(--scrim); }
.sheet {
  position: relative; width: 100%; max-width: 520px; background: var(--sheet); border-top: 1px solid var(--line);
  border-radius: 22px 22px 0 0; padding: 14px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  animation: up .26s ease; display: grid; gap: 10px;
}
.grip { width: 38px; height: 4px; border-radius: 999px; background: var(--line); margin: 0 auto 8px; }
.sheet h2 { font-size: 22px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; }
/* Subscription plans, to choose from. */
.plans { display: grid; gap: 10px; text-align: left; }
.plan { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 12px; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: 15px; background: var(--bg2); color: var(--ink); }
.plan:hover, .plan:focus-visible { border-color: var(--orange); }
.plan b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.plan span:not(.mono-dim) { font-size: 15px; font-weight: 600; color: var(--ink2); }
.plans-again { justify-self: center; margin-top: 4px; }
.artist-price { align-items: center; }
/* A song's menu: the song beside its cover, a heart at the end, icons under it. */
.menu-head { display: flex; align-items: center; gap: 14px; text-align: left; }
.menu-head .art { flex: none; }
.menu-head-t { flex: 1; min-width: 0; display: grid; gap: 3px; }
.menu-head-t b { font-size: 18px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-head-t .dim { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-like { flex: none; }
.menu-like.on { color: var(--orange); }
.menu-icons { display: flex; gap: 12px; }
.sheet .mono-box { margin: 2px 0; }
.sheet .btn-primary.wide { margin-top: 6px; }
.sheet-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--bg3); display: flex; align-items: center; justify-content: center; color: var(--orange); }
.sheet-icon.warn { color: var(--warn); background: var(--warn-bg); }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 12px); z-index: 95;
  width: calc(100% - 24px); max-width: 480px; background: var(--ink); color: var(--bg); border-radius: 12px;
  padding: 12px 14px; display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; animation: drop .22s ease;
}
.toast.bad { background: var(--warn); color: #fff; }

/* ── boxes ────────────────────────────────────────────────────────── */

.mono-box {
  background: var(--bg3); border-radius: 12px; padding: 12px 13px; font-size: 12.5px; line-height: 1.6;
  color: var(--ink); overflow-wrap: anywhere;
}
.mono-box.secret { background: var(--warn-bg); border: 1px solid var(--warn); }
.alert {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: var(--warn-bg); border: 1px solid var(--warn); border-radius: 13px; padding: 13px 14px; color: var(--warn); font-size: 13.5px;
}
.alert span { flex: 1; color: var(--ink); }
.alert b { color: var(--orange); }

/* ── you ──────────────────────────────────────────────────────────── */

.balance-card { position: relative; background: var(--bg2); border: 1px solid var(--line); border-radius: 15px; padding: 17px; display: grid; gap: 10px; align-content: start; }
.bal-refresh { position: absolute; top: 8px; right: 8px; }
.bal-refresh.turning svg { animation: spin .8s linear infinite; }
.bal-open { display: grid; gap: 10px; text-align: left; color: inherit; padding-right: 28px; }
.bal-open .bal > svg { color: var(--ink3); align-self: center; }
/* Transactions */
.tx .you-row { padding-left: 0; padding-right: 0; text-decoration: none; }
.tx .t { display: grid; gap: 2px; min-width: 0; }
.tx .sub { font-size: 12.5px; font-weight: 400; color: var(--ink3); }
.tx div.you-row:hover { background: none; }
.tx-day { padding: 18px 0 4px; }
.tx-amount { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 14px; font-variant-numeric: tabular-nums; flex: none; }
.tx-more { margin: 14px auto 0; display: flex; }
.desk .tx { max-width: 720px; }
.bal { display: flex; align-items: baseline; gap: 9px; }
.bal b { font-size: 32px; font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.you-list { margin-top: 18px; }
.you-row {
  display: flex; align-items: center; gap: 13px; width: 100%; padding: 14px 20px; border-top: 1px solid var(--line); color: var(--ink3);
}
.you-row:hover { background: var(--bg2); }
.you-row .t { flex: 1; font-size: 15px; font-weight: 600; color: var(--ink); }
.you-row.warn-ink .t, .you-row.warn-ink .you-icon { color: var(--warn); }
.you-icon { display: flex; color: var(--ink2); }
.foot-note { margin-top: 14px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li { display: flex; gap: 10px; align-items: center; font-size: 14.5px; }
.steps svg { color: var(--orange); flex: none; }

ol.setup { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
ol.setup > li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; }
ol.setup > li > div { flex: 1 1 auto; min-width: 0; display: grid; gap: 4px; }
.tick {
  flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; background: var(--bg3); color: var(--ink3);
}
.tick.done { background: var(--good); color: var(--bg); }
.more summary { cursor: pointer; display: inline-flex; gap: 6px; align-items: center; color: var(--ink3); font-size: 13.5px; font-weight: 600; margin-bottom: 8px; }
.more[open] { display: grid; gap: 8px; }
.qr-pair { display: flex; gap: 18px; flex-wrap: wrap; }
.qr-pair figure { margin: 0; text-align: center; }
.qr { width: 160px; height: 160px; background: #fff; padding: 8px; border-radius: 10px; }
.qr svg { width: 100%; height: 100%; display: block; }
/* A code to scan: big, on white, in the middle. */
.qr.big { width: min(300px, 78vw); height: auto; aspect-ratio: 1; padding: 12px; border-radius: 16px; }
.qr-share { display: grid; justify-items: center; gap: 12px; padding: 6px 0 4px; }
.qr-pager { justify-content: center; }
.qr-pair figcaption { font-size: 12.5px; color: var(--ink3); margin-top: 6px; }

/* ── playlists, albums, menus ─────────────────────────────────────── */

.s38 { width: 38px; height: 38px; border-radius: 8px; }
.art.round.s38 { border-radius: 999px; }
.s132 { width: 132px; height: 132px; border-radius: 13px; display: flex; align-items: flex-end; padding: 11px; }
.art-title { font-size: 15px; font-weight: 800; letter-spacing: -.02em; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.35); overflow-wrap: anywhere; }
.card-art.small { width: 132px; }
.card-new {
  width: 132px; height: 132px; flex: none; border: 1px dashed var(--line); border-radius: 13px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--ink3); font-size: 12.5px; font-weight: 600;
}
.card-new:hover { border-color: var(--orange); color: var(--ink); }
.art.dashed { border: 1px dashed var(--line); display: flex; align-items: center; justify-content: center; color: var(--ink3); background: none; }
.dim-row .t b { color: var(--ink2); font-weight: 600; }

.head-actions { margin-left: auto; display: flex; gap: 8px; }
.circle-btn.on { border-color: var(--orange); color: var(--orange); }
.circle-btn.big { width: 46px; height: 46px; }
.coll-top { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.coll-art { width: 186px; height: 186px; border-radius: 15px; margin-bottom: 10px; }
.coll-top h1 { font-size: 25px; font-weight: 800; letter-spacing: -.03em; }
.row.center { justify-content: center; margin-top: 10px; }
.coll-list { margin-top: 16px; }
.mini-artist { display: flex; align-items: center; gap: 11px; }
.mini-artist .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mini-artist .t b { font-size: 14px; }

.release-open { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.release-open .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.release-open .t b { font-size: 16px; letter-spacing: -.02em; }

.menu { display: flex; flex-direction: column; }
.menu-item { display: flex; align-items: center; gap: 14px; padding: 13px 4px; font-size: 15.5px; font-weight: 600; border-top: 1px solid var(--line); }
.menu-item:first-child { border-top: 0; }
.menu-item span:nth-child(2) { flex: 1; }
.menu-item.on { color: var(--orange); }
.menu-item.warn-ink { color: var(--warn); }
.menu-item:hover { color: var(--orange); }
.sheet .menu { max-height: 50vh; overflow-y: auto; }

.np-actions { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.np-actions .mono-dim { margin-left: auto; }
/* The waveform style, at the right end of the row (after the session line, if any). */
.np-actions .wave-toggle { margin-left: auto; }
.np-actions .mono-dim + .wave-toggle { margin-left: 0; }
.np-actions .icon-btn { color: var(--ink2); }
.np-actions .icon-btn.on { color: var(--orange); }

/* ── adding an artist, scanning ───────────────────────────────────── */

.scan-cta {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px; margin-top: 10px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; font-size: 16px; font-weight: 700;
}
.scan-cta svg { color: var(--orange); }
.scan-cta:hover { border-color: var(--orange); }
.scan-cta:disabled { opacity: .5; }
.local-room { text-align: center; margin-top: 4px; }

/* editing a local song's details */
.edit-local { margin: 4px 0 8px; }
.edit-local .field { display: grid; gap: 5px; }
.edit-local .label { font-size: 10.5px; color: var(--ink3); letter-spacing: .06em; text-transform: uppercase; }
.edit-local .input { padding: 11px 13px; }
.edit-row { display: grid; grid-template-columns: 1fr 76px; gap: 10px; }
.edit-cover { position: relative; justify-self: center; cursor: pointer; }
.edit-cover svg { position: absolute; right: -6px; bottom: -6px; background: var(--bg3); color: var(--ink); border-radius: 999px; padding: 6px; box-sizing: content-box; }
.edit-note { text-align: center; margin: -4px 0 0; font-size: 11px; }
.album-pick { display: flex; gap: 8px; overflow-x: auto; margin: -2px -2px 0; padding: 2px; scrollbar-width: none; }
.album-pick::-webkit-scrollbar { display: none; }
.album-pick button { display: flex; align-items: center; gap: 9px; flex: none; max-width: 210px; padding: 6px 12px 6px 6px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; text-align: left; }
.album-pick .art { flex: none; border-radius: 7px; }
.album-pick .t { display: grid; min-width: 0; }
.album-pick b, .album-pick .t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-pick b { font-size: 14px; }
.album-pick .t span { font-size: 12px; color: var(--ink3); }
.edit-local .input.clash { border-color: var(--warn, var(--orange)); }
.edit-warn { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: -4px; text-align: left; }
.card-art .badge { margin-left: 6px; font-size: 9.5px; padding: 1px 6px; vertical-align: 1px; }
.preview { background: var(--bg2); border: 1px solid var(--line); border-radius: 15px; overflow: hidden; animation: up .25s ease; }
.preview-banner { display: block; height: 84px; background-size: cover; background-position: center; }
.preview-body { padding: 0 15px 15px; display: grid; gap: 8px; }
.preview-body b { font-size: 19px; font-weight: 800; letter-spacing: -.025em; }
.preview-body .mono { display: inline-flex; gap: 5px; align-items: center; }
.s60 { width: 60px; height: 60px; margin-top: -30px; }
.ring2 { border: 3px solid var(--bg2); }
.chip.fit { justify-self: start; }
.scanner { position: fixed; inset: 0; z-index: 95; background: #000; display: flex; align-items: center; justify-content: center; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: relative; width: min(66vw, 280px); aspect-ratio: 1; border: 3px solid var(--orange); border-radius: 22px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
.scan-hint { position: absolute; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom, 0px)); text-align: center; color: #fff; font-weight: 600; }

.chips:empty { display: none; }
.sub-line { margin-top: 12px; }

/* Swipes: vertical drags on these belong to us, not the page. */
.np, .sheet { overscroll-behavior: contain; }
/* No bounce at the top of Now playing: a pull down there closes it. */
.np { overscroll-behavior-y: none; }
.mini, .np-art, .mini-slides { touch-action: pan-y; }
.sheet .grip { cursor: grab; }

.btn-primary.danger { background: var(--warn); color: #fff; }

/* The waveform is the progress bar. It bleeds to the screen edges and runs
   a little behind the artist line above and the controls below, which sit on
   top of it; only the line through its middle takes taps. */
.wave-scrub { position: relative; height: 170px; margin: -38px -20px -44px; pointer-events: none; z-index: 0; }
.waveform { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mini > :not(.mini-progress):not(.mini-knob):not(.mini-scrub) { position: relative; }
.scrub-hit {
  position: absolute; left: 20px; width: calc(100% - 40px); top: 50%; height: 34px; transform: translateY(-50%);
  margin: 0; cursor: pointer; pointer-events: auto; touch-action: none; border-radius: 999px;
}
.wave-scrub .times { position: absolute; left: 20px; right: 20px; top: calc(50% + 14px); text-shadow: 0 0 6px var(--bg), 0 0 3px var(--bg); }
.np-who, .controls, .np-actions { position: relative; z-index: 1; }

/* ── your listening (You, stats.js) ───────────────────────────────── */

.listen-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; align-items: end; width: 100%; text-align: left;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 15px; padding: 17px;
}
.listen-card .label { grid-column: 1 / -1; }
.listen-card:hover { border-color: var(--ink3); }
.listen-total { display: flex; align-items: center; gap: 6px; color: var(--ink3); }
.listen-total b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.week-boxes { display: flex; gap: 7px; }
.wk-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wk-stack { display: flex; flex-direction: column-reverse; gap: 3px; }
/* One square a quarter of an hour, coloured up each column as the waveform's boxes are. */
.wk-box { width: 12px; height: 12px; border-radius: 3px; background: var(--bg3); }
.wk-box.on { background: hsl(calc(10 + var(--up) * 22) calc((92 - var(--up) * 8) * 1%) calc((42 + var(--up) * 30) * 1%)); }
:root[data-theme="light"] .wk-box.on { background: hsl(calc(10 + var(--up) * 20) calc(90% - var(--up) * 5%) calc((50 + var(--up) * 8) * 1%)); }
.wk-day { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10px; color: var(--ink3); }
.week-boxes.big { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; width: 100%; align-self: stretch; }
.desk .week-boxes.big { max-width: 520px; }
.week-boxes.big .wk-col { align-items: stretch; }
.week-boxes.big .wk-stack { gap: 6px; }
.week-boxes.big .wk-box { width: 100%; height: auto; aspect-ratio: 1; border-radius: 22%; }
.week-boxes.big .wk-day { text-align: center; font-size: 11px; }
.listen-head { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 6px 0 26px; }
.listen-head b { margin-top: 10px; font-size: 32px; font-weight: 800; letter-spacing: -.035em; }
.listen-list { margin: 8px -20px 24px; }
.listen-list .you-row .t { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.listen-list .you-row:disabled { cursor: default; }
.listen-list .you-row:disabled:hover, .listen-list div.you-row:hover { background: none; }

/* ── on a computer (desktop.jsx) ──────────────────────────────────── */

.app.desk { --side: 248px; --barh: 84px; display: grid; grid-template-columns: var(--side) minmax(0, 1fr); align-items: start; }
.desk .content { max-width: none; width: 100%; margin: 0; padding: 0 20px calc(var(--barh) + 48px); }
.desk .screen { padding-top: 24px; }

.side {
  position: sticky; top: 0; height: 100vh; box-sizing: border-box; overflow-y: auto; scrollbar-width: none;
  display: flex; flex-direction: column; gap: 26px; padding: 22px 14px calc(var(--barh) + 20px);
  background: var(--bg); border-right: 1px solid var(--line);
}
:root:not([data-theme="light"]) .side { background: #0b0a09; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 10px; color: var(--ink2); font-size: 15px; font-weight: 600; text-align: left; }
.side-link:hover { background: var(--bg2); color: var(--ink); }
.side-link.on { background: var(--bg2); color: var(--orange); font-weight: 700; }
.side-group { display: flex; flex-direction: column; gap: 2px; }
.side-label { display: flex; align-items: center; justify-content: space-between; min-height: 30px; padding: 0 2px 4px 12px; }
.side-label .label { font-size: 12.5px; }
.side-item { display: flex; align-items: center; gap: 11px; padding: 6px 12px; border-radius: 8px; text-align: left; color: var(--ink); }
.side-item:hover, .side-item.on { background: var(--bg2); }
.side-item.on b { color: var(--orange); }
.side-item .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.side-item .t b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-item .t span { font-size: 12px; color: var(--ink3); }
.art.s36 { width: 36px; height: 36px; border-radius: 6px; }
.art.s28 { width: 28px; height: 28px; }

/* The player bar: a line across the whole window, the music faint behind. */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: var(--barh); isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 24px; padding: 0 20px;
  background: var(--bg2);
}
.bar-wave { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; opacity: .75; }
:root[data-theme="light"] .bar-wave { opacity: .8; }
.bar-wave .timeline { display: block; width: 100%; height: 100%; }
.bar-line { position: absolute; left: 0; right: 0; top: -7px; height: 14px; z-index: 2; cursor: pointer; touch-action: none; }
.bar-line::before, .bar-played { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 3px; transition: height .12s ease, top .12s ease; }
.bar-line::before { background: var(--line); }
.bar-played { transform-origin: left center; background: var(--np-accent, var(--orange)); }
.bar-knob {
  position: absolute; top: 7.5px; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%;
  background: var(--np-accent, var(--orange)); opacity: 0; transition: opacity .15s ease;
}
:root[data-theme="light"] .bar-played, :root[data-theme="light"] .bar-knob { background: var(--np-accent-light, var(--orange)); }
.bar-line:hover .bar-knob, .bar-line:focus-visible .bar-knob, .bar.scrubbing .bar-knob { opacity: 1; }
.bar-line:hover::before, .bar-line:hover .bar-played, .bar.scrubbing .bar-line::before, .bar.scrubbing .bar-played { top: 5px; height: 5px; }
.bar-song { display: flex; align-items: center; gap: 14px; min-width: 0; }
/* Behind the controls and words, so they read over the waveform: solid right
   behind them, then a wide blur fading out into the music around. */
.bar-text, .bar-controls, .bar-side, .bar-song .icon-btn { position: relative; }
.bar-text::before, .bar-controls::before, .bar-side::before, .bar-song .icon-btn::before {
  content: ""; position: absolute; inset: -30px -70px; z-index: -1; pointer-events: none;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  background: radial-gradient(closest-side, var(--bg2) 58%, color-mix(in srgb, var(--bg2) 55%, transparent) 78%, transparent);
  -webkit-mask-image: radial-gradient(closest-side, #000 60%, transparent);
          mask-image: radial-gradient(closest-side, #000 60%, transparent);
}
.bar-song .icon-btn::before { inset: -22px; }
/* More room either side of shuffle and repeat, and before the time. */
.bar-controls::before { inset: -30px -120px; }
.bar-side::before { inset: -30px -50px -30px -150px; }
.bar-side { justify-self: end; }
.bar-text { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.bar-title { max-width: 100%; font-size: 15px; font-weight: 700; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-artist { font-size: 13px; color: var(--ink2); }
.bar-title:hover, .bar-artist:hover { text-decoration: underline; text-underline-offset: 2px; }
.bar-song .icon-btn { color: var(--ink2); }
.bar-song .icon-btn.on { color: var(--orange); }
.bar-controls { display: flex; align-items: center; gap: 12px; }
.bar-controls .icon-btn, .bar-side .icon-btn { color: var(--ink2); }
.bar-controls .icon-btn:hover, .bar-side .icon-btn:hover { color: var(--ink); }
.bar-controls .icon-btn.on { color: var(--orange); }
.bar-play {
  width: 44px; height: 44px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  background: var(--np-accent, var(--orange)); color: var(--np-on, var(--on-orange)); transition: background-color .6s ease, color .6s ease;
}
:root[data-theme="light"] .bar-play { background: var(--np-accent-light, var(--orange)); color: var(--np-on-light, var(--on-orange)); }
.bar-side { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.bar-time { margin-right: 10px; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11.5px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.bar-volume { display: flex; align-items: center; }
.bar-volume input {
  -webkit-appearance: none; appearance: none; width: 92px; height: 4px; margin: 0 8px 0 2px; border-radius: 999px; cursor: pointer;
  background: linear-gradient(90deg, var(--ink) var(--v), var(--line) var(--v));
}
.bar-volume input::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); border: 0; }
.bar-volume input::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); border: 0; }

/* The + button's menu: its options dropping down under it at the top right,
   each floating on its own, with no box round them. */
.add-menu {
  position: fixed; top: 72px; right: 20px; z-index: 50; width: 380px; max-height: calc(100vh - var(--barh) - 92px); overflow-y: auto;
  padding: 4px 4px 24px; animation: up .18s ease; scrollbar-width: none;
}
.add-menu .input-row, .add-menu .scan-cta, .add-menu .preview, .add-menu .trust {
  background: var(--sheet); box-shadow: 0 12px 32px rgba(0, 0, 0, .38);
}
:root[data-theme="light"] .add-menu .input-row, :root[data-theme="light"] .add-menu .scan-cta,
:root[data-theme="light"] .add-menu .preview, :root[data-theme="light"] .add-menu .trust { box-shadow: 0 10px 28px rgba(19, 17, 16, .16); }

/* You: this week's listening and the money side by side, the same height.
   On a phone each card is narrow, so inside them things stack; setting up a
   wallet, which has more to say, takes the whole width there. */
.you-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 12px; }
.you-top > * { margin: 0; }
.you-top > .alert { grid-column: 1 / -1; order: -1; }
.you-top > .panel { grid-column: 1 / -1; }
.pay-empty { text-align: left; align-content: space-between; color: inherit; }
.pay-invite { display: grid; gap: 4px; }
.pay-invite b { font-size: 16px; line-height: 1.25; letter-spacing: -.015em; }
/* The EQ ribbon. */
.eq-box { max-width: 640px; }
.eq-presets { padding-bottom: 6px; }
.sound-list { max-width: 640px; margin-top: 22px; }
.sound-list .you-row { padding-left: 0; padding-right: 0; }
.sound-list .t { display: grid; gap: 2px; }
.sound-list .sub { font-size: 12.5px; font-weight: 400; color: var(--ink3); }
.switch { flex: none; width: 44px; height: 26px; border-radius: 999px; background: var(--bg3); position: relative; transition: background .18s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink2); transition: transform .18s, background .18s; }
.switch.on { background: var(--orange); }
.switch.on::after { transform: translateX(18px); background: var(--on-orange); }
.eq { display: block; width: 100%; height: auto; touch-action: none; user-select: none; -webkit-user-select: none; cursor: ns-resize; overflow: visible; }
.eq-grid { stroke: var(--line); stroke-width: 1; }
.eq-zero { stroke: var(--ink3); stroke-width: 1; stroke-dasharray: 4 6; opacity: .6; }
.eq-stop-a { stop-color: #e8410f; }
.eq-stop-b { stop-color: #f7a54a; }
.eq-fill { fill: url(#eq-ink); opacity: .22; }
.eq-line { fill: none; stroke: url(#eq-ink); stroke-width: 4; stroke-linecap: round; }
.eq-dot { fill: var(--bg); stroke: var(--orange); stroke-width: 3.5; transition: r .12s; }
.eq-dot.on { fill: var(--orange); r: 14; }
.eq-dot:focus { outline: none; }
.eq-dot:focus-visible { stroke: var(--ink); }
.eq-hz, .eq-db { font-family: "IBM Plex Mono", ui-monospace, monospace; text-anchor: middle; }
.eq-hz { font-size: 17px; fill: var(--ink3); }
.eq-db { font-size: 19px; font-weight: 600; fill: var(--ink); }
.pay-empty .btn-primary { justify-self: start; }
.pay-list { margin-bottom: 18px; }
.pay-list div.you-row:hover { background: none; }
.pay-list .you-row { padding-left: 0; padding-right: 0; }
.pay-list .t { display: grid; gap: 2px; }
.pay-list .sub { font-size: 12.5px; font-weight: 400; color: var(--ink3); }
.pay-list .you-row.off .t, .pay-list .you-row.off .you-icon { color: var(--ink3); }
.pay-list .panel { margin-top: 4px; }
/* Amply ID */
.backup .btn-primary.wide { justify-content: center; }
.backup-more { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.id-name { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.id-remove { display: block; margin: 28px auto 0; }
/* On a computer the page is as wide as the window: kept to a column, as the other settings are. */
.desk .backup { max-width: 520px; }
.desk .id-remove { width: 100%; max-width: 520px; margin-left: 0; text-align: center; }
.you-top .listen-card { grid-template-columns: minmax(0, 1fr); align-content: space-between; }
.you-top .listen-total b { font-size: 18px; }
.you-top .bal { flex-wrap: wrap; gap: 2px 8px; }
.you-top .bal b { font-size: 26px; }
.you-top .balance-card .row { flex-direction: column; align-items: stretch; gap: 8px; }
.you-top .balance-card .row > * { justify-content: center; }
.desk .you-top { gap: 16px; }
.desk .you-top > .panel { grid-column: auto; }
.desk .you-top .listen-card { grid-template-columns: minmax(0, 1fr) auto; align-content: space-between; }
.desk .you-top .listen-total b { font-size: 20px; }
.desk .you-top .bal b { font-size: 32px; }
.desk .you-top .balance-card .row { flex-direction: row; align-items: center; }

/* What's next, in a panel at the side, above the player bar. */
.queue-panel {
  position: fixed; top: 0; right: 0; bottom: var(--barh); z-index: 45; width: 360px; overflow-y: auto; scrollbar-width: none;
  padding: 24px 18px; background: var(--bg); border-left: 1px solid var(--line); box-shadow: -18px 0 40px rgba(0, 0, 0, .25);
  animation: up .2s ease;
}
:root:not([data-theme="light"]) .queue-panel { background: #0b0a09; }
.queue-panel .upnext { margin-top: 0; }
.queue-close { position: absolute; top: 14px; right: 10px; }

/* The cover of what's playing, at the foot of the sidebar. */
.side-art { margin-top: auto; display: block; width: 100%; flex: none; border-radius: 10px; overflow: hidden; }
.side-art .art { width: 100%; height: auto; aspect-ratio: 1; border-radius: 10px; }
.side-art:hover { opacity: .9; }

/* The whole window: rows of covers become grids that fill the width, their
   covers growing with it, instead of scrolling sideways. */
.desk .hscroll { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 26px 22px; overflow: visible; }
.desk .hscroll:has(.card-artist) { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.desk .card-art, .desk .card-art.small { width: auto; min-width: 0; }
.desk .card-art .art.s152, .desk .card-art .art.s132 { width: 100%; height: auto; aspect-ratio: 1; }
.desk .card-new { width: auto; aspect-ratio: 1; height: auto; }
.desk .card-artist { width: auto; min-width: 0; }
.desk .card-artist .art.s84 { width: 100%; height: auto; aspect-ratio: 1; }
.desk .card-artist span:last-child { max-width: 100%; }
.desk .grid2 { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 26px 22px; }

/* Sheets open as a dialog in the middle, not up from the bottom edge. */
.desk .sheet-wrap { justify-content: center; }
.desk .sheet { border: 1px solid var(--line); border-radius: 18px; padding-bottom: 22px; }
.desk .sheet .grip { display: none; }
