*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }

body {
  margin: 0;
  min-height: var(--tg-viewport-stable-height, 100vh); /* 100vh is wrong inside the iOS Mini App sheet */
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.4 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:is(button, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
img { display: block; }
[hidden] { display: none !important; }

.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic .fill { fill: currentColor; stroke: none; }

#main {
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px);
}
body.has-mini #main { padding-bottom: calc(var(--nav-h) + var(--mini-h) + var(--safe-b) + 24px); }

.view { padding: var(--s2) var(--gutter) 0; max-width: var(--col); margin: 0 auto; overflow-x: clip; }
/* in a browser (no Telegram back button): an arrow before the title of deeper screens */
.view__back { margin: 0 0 6px -8px; }
.view__back .ic { transform: rotate(90deg); }
/* a guest has no chat with the bot to send a track to */

/* rows and cards arrive one after another (restarts whenever a screen is shown again) */
@keyframes row-in { from { opacity: 0; transform: translateY(10px); } }
.tracks > .track:nth-child(-n+12), .cards > .card:nth-child(-n+6), .genres > .genre, .tiles > .tile, .pl-row:nth-child(-n+8) {
  animation: row-in .52s var(--ease-io) both; animation-delay: calc(60ms + var(--i, 0) * 32ms); }
:is(.tracks, .cards, .genres, .tiles, .playlists) > :nth-child(2) { --i: 1; }
:is(.tracks, .cards, .genres, .tiles, .playlists) > :nth-child(3) { --i: 2; }
:is(.tracks, .cards, .genres, .tiles, .playlists) > :nth-child(4) { --i: 3; }
:is(.tracks, .cards, .genres, .tiles, .playlists) > :nth-child(5) { --i: 4; }
:is(.tracks, .cards, .genres, .tiles, .playlists) > :nth-child(6) { --i: 5; }
:is(.tracks, .playlists) > :nth-child(7) { --i: 6; }
:is(.tracks, .playlists) > :nth-child(8) { --i: 7; }
.tracks > :nth-child(9) { --i: 8; }
.tracks > :nth-child(10) { --i: 9; }
.tracks > :nth-child(11) { --i: 10; }
.tracks > :nth-child(12) { --i: 11; }

/* ---------- brand ---------- */

.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark { width: 24px; height: 24px; flex: none; }
.brand__mark .disc { fill: var(--vinyl); }
.brand__mark .groove { fill: none; stroke: var(--groove-strong); stroke-width: .7; }
.brand__mark .label { fill: var(--accent); }
.brand__mark .hole { fill: var(--bg); }
:root[data-mode="dark"] .brand__mark .disc { stroke: rgba(255, 255, 255, .18); stroke-width: .8; }
.brand__name { font: 600 18px/1 var(--font-serif); letter-spacing: .02em; }

/* home header: the brand in the middle, the greeting a quiet line under it */
.hero { padding: 14px 0 6px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero .brand { gap: 12px; }
.hero .brand__mark { width: 40px; height: 40px; }
.hero .brand__name { font-size: 28px; letter-spacing: .03em; }
.hero__title { font: 500 15px/1.3 var(--font-sans); margin: 10px 0 0; color: var(--text-2); letter-spacing: .01em; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.view__head { padding: var(--s3) 0 var(--s3); }
/* the first block under a page title sits close to it; the next ones keep the section gap */
.view__head + :is(.section, .group) { margin-top: var(--s2); }
.view__title { font: 600 30px/1.15 var(--font-serif); margin: 0; letter-spacing: -.01em; overflow-wrap: anywhere; }
.view__kicker { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); min-height: 0; }
.view__kicker:empty { display: none; }
.view__sub { color: var(--text-2); font-size: 14px; margin-top: 4px; }
.view__head--list { border-bottom: 1px solid var(--line); padding-bottom: var(--s4); margin-bottom: var(--s1); }

/* ---------- sections ---------- */

.section { margin-top: var(--section-gap); }
.section--later:not([hidden]) { animation: row-in .6s var(--ease-io) both; }
.section__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); min-height: 32px; }
.section__title { font: 600 20px/1.2 var(--font-serif); margin: 0; }
.link { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 500; color: var(--accent-text); }
.link .ic { width: 18px; height: 18px; }
.section__tools { display: flex; align-items: center; gap: var(--s3); }
.link--sort { gap: 4px; color: var(--text-2); font-size: 13px; }
.list-tools { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); margin: var(--s2) 0 0; }
.list-tools[hidden] { display: none; }
.list-tools .link { min-height: 44px; }
.list-tools .link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }

/* horizontal cards */
.cards { display: flex; gap: var(--gap); overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.cards::-webkit-scrollbar { display: none; }
.card { flex: 0 0 136px; text-align: left; scroll-snap-align: start; scroll-margin-left: var(--gutter); }
.card__cover { width: 136px; height: 136px; border-radius: var(--r-md); }
.card__title { display: block; margin-top: 8px; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__artist { display: block; font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card:active .card__cover { opacity: .8; }

/* a record drawn under every picture: visible while it loads, or if it never does */
.cover, .mosaic, .artist__photo { background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A39580' stroke-width='1.4'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Ccircle cx='12' cy='12' r='.9' fill='%23A39580' stroke='none'/%3E%3C/svg%3E") center / 46% no-repeat; }
.cover { object-fit: cover; }
.cover--empty, .img-empty, .mosaic--empty, .artist__photo--empty { display: grid; place-items: center; color: var(--text-3); background: var(--surface); }
.img-empty .ic { width: 46%; height: 46%; }

/* genres */
.genres { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.genre { height: 72px; border-radius: var(--r-md); padding: 12px 14px; text-align: left; display: flex; align-items: flex-end;
  font: 600 18px/1.1 var(--font-serif); color: var(--white); position: relative; overflow: hidden; }
.genre::after { content: ''; position: absolute; right: -22px; top: -22px; width: 72px; height: 72px; border-radius: 50%; border: 10px solid rgba(255,255,255,.08); }
.genre--0 { background: var(--tile-navy); }
.genre--1 { background: var(--accent); color: var(--on-accent); }
.genre--2 { background: var(--surface-2); color: var(--text); }
.genre--2::after { border-color: var(--line); }
.genre:active { opacity: .85; }

/* ---------- track rows ---------- */

.tracks { display: flex; flex-direction: column; }
.track { display: flex; align-items: center; gap: 12px; padding: 8px 0; min-height: 64px; cursor: pointer; border-radius: var(--r-sm); position: relative;
  content-visibility: auto; contain-intrinsic-size: auto 64px; /* long lists: off-screen rows are not laid out */ }
.track + .track::before { content: ''; position: absolute; top: 0; left: 60px; right: 0; height: 1px; background: var(--line); }
.tracks--numbered .track + .track::before { left: 88px; }
.track:active { background: var(--surface); }
.track__num { width: 18px; text-align: center; font: 500 15px/1 var(--font-serif); color: var(--text-3); flex: none; }
.track__art { width: 48px; height: 48px; position: relative; flex: none; }
.track__art .cover { width: 48px; height: 48px; border-radius: var(--r-sm); }
.track__meta { flex: 1; min-width: 0; }
.track__title { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track__artist { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.track__time { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; flex: none; }
/* saved on the phone (offline.js): a small mark beside the length; the one downloading now spins */
.track__saved { display: none; flex: none; color: var(--accent-text); margin-right: -6px; }
.track__saved .ic { width: 15px; height: 15px; }
.track.is-saved .track__saved, .track.is-saving .track__saved { display: grid; }
/* the download in progress: a ring filling up to --p percent (pathLength 100), no gradients */
.ring { width: 15px; height: 15px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 2.6; }
.ring__track { stroke: var(--line); }
.ring__fill { stroke: var(--accent-text); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p, 0));
  transition: stroke-dashoffset .3s var(--ease-io); }
.offline-note { display: flex; align-items: center; gap: var(--s3); margin: 0 0 var(--s3); padding: var(--s3) var(--card-x); border-radius: var(--r-md);
  background: var(--surface); color: var(--text-2); font-size: 13.5px; line-height: 1.35; }
.offline-note[hidden] { display: none; }
.offline-note .ic { width: 20px; height: 20px; flex: none; color: var(--accent-text); }
.track__more { color: var(--text-3); margin-right: -8px; }
/* the heart sits tight against "more": two 40 px buttons side by side would eat the title */
.track__like { width: 36px; height: 36px; margin-right: -10px; color: var(--text-3); }
.track__like .ic { width: 20px; height: 20px; }
.track__like.is-on { color: var(--accent-text); }
.track__like.is-on .ic { animation: like-pop .3s var(--ease); }
.track.is-current .track__title { color: var(--accent-text); }

.eq { position: absolute; inset: 0; border-radius: var(--r-sm); background: var(--shade); display: none; align-items: flex-end; justify-content: center; gap: 3px; padding-bottom: 14px; }
.eq i { width: 3px; height: 18px; background: var(--white); border-radius: 1px; transform-origin: bottom; transform: scaleY(.33); }
.track.is-current .eq { display: flex; }
.track.is-playing .eq i { animation: eq .9s ease-in-out infinite; }
.track.is-playing .eq i:nth-child(2) { animation-delay: -.3s; }
.track.is-playing .eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { transform: scaleY(.28); } 50% { transform: scaleY(1); } }
body.player-open .eq i { animation-play-state: paused; } /* hidden under the full player */

/* ---------- buttons ---------- */

.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 50%; flex: none; color: var(--text); }
.icon-btn:active { background: var(--surface); }
.icon-btn--accent { color: var(--accent-text); background: var(--accent-soft); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: var(--r-md); font-weight: 600; font-size: 15px; }
.btn .ic { width: 20px; height: 20px; }
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--accent:active { background: var(--accent-press); }
.btn--outline { border: 1px solid var(--line); color: var(--text); }
.btn--outline:active { background: var(--surface); }
.btn--ghost { color: var(--text-2); }

.list-actions { display: flex; gap: var(--gap); margin-top: var(--s4); align-items: center; }
.list-actions .btn { flex: 1; }
.list-actions.is-disabled .btn { opacity: .4; pointer-events: none; }

/* ---------- search ---------- */

.searchbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 6px 0 14px;
  background: var(--surface); border-radius: var(--r-md); color: var(--text-3); margin-bottom: 8px; box-shadow: 0 -8px 0 var(--bg); }
.searchbar input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--text); font: 400 16px var(--font-sans); outline: none; }
.searchbar input::placeholder { color: var(--text-3); }
.searchbar input::-webkit-search-cancel-button { display: none; }
.searchbar--list { position: static; box-shadow: none; margin-top: var(--s4); }
.searchbar--list[hidden] { display: none; }

/* completions: a list that lies over the results, right under the field */
.suggest { position: sticky; top: 46px; z-index: 5; height: 0; }
.suggest[hidden] { display: none; }
.suggest__item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 14px; text-align: left;
  background: var(--surface); color: var(--text); font-size: 15px; border-top: 1px solid var(--line); }
.suggest__item:first-child { border-top: 0; border-radius: var(--r-md) var(--r-md) 0 0; }
.suggest__item:last-child { border-radius: 0 0 var(--r-md) var(--r-md); }
.suggest__item:first-child:last-child { border-radius: var(--r-md); }
.suggest__item .ic { width: 18px; height: 18px; color: var(--text-3); }
.suggest__item span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest__item:active { opacity: .6; }
.suggest { filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .14)); }

/* the empty "Playlists": the medium of the player in use, half out of its box (js/art.js) */
.pl-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--s2) var(--s3) var(--s4); gap: 6px; }
.pl-empty__art { width: 176px; height: 132px; margin-bottom: var(--s1); overflow: visible; }
.pl-empty__box { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.pl-empty__band { fill: var(--accent); opacity: .85; }
.pl-empty__line { fill: var(--line); }
.pl-empty__line--short { opacity: .7; }
.pl-empty__plus circle { fill: var(--accent); }
.pl-empty__plus path { stroke: var(--on-accent); stroke-width: 2.2; stroke-linecap: round; fill: none; }
.pl-empty__vinyl { fill: #15120F; }
.pl-empty__groove { fill: none; stroke: rgba(255, 240, 220, .13); stroke-width: 1.2; }
.pl-empty__label { fill: var(--accent); }
.pl-empty__hole { fill: var(--bg); }
.pl-empty__shell { fill: var(--tp-shell, #1E1E20); }
.pl-empty__sticker { fill: var(--tp-label, #F1E6CC); }
.pl-empty__reel { fill: #C5C8CC; stroke: #8E9196; stroke-width: 1.5; }
.pl-empty__wound { fill: #5A4232; }
.pl-empty__cd { fill: #D6D9DE; stroke: #B5B9BF; stroke-width: 1; }
.pl-empty__hue { opacity: .5; }
.pl-empty__hue--1 { fill: #E8577A; } .pl-empty__hue--2 { fill: #3FB6C9; }
.pl-empty__clamp { fill: #EEF0F2; stroke: #B5B9BF; }
.pl-empty__case { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; opacity: .96; }
.pl-empty__hinge { fill: var(--surface-2); }
.pl-empty__wax { fill: #A8723E; }
.pl-empty__wax-grooves { stroke: #7E5328; stroke-width: 1.5; }
.pl-empty__dial { fill: #F3E6C2; stroke: var(--line); }
.pl-empty__needle { fill: #B3261E; }
.pl-empty__cloth { fill: var(--surface-2); }
.pl-empty__bars { stroke: var(--line); stroke-width: 2.5; }
.pl-empty__waves { fill: none; stroke: var(--accent-text); stroke-width: 2; stroke-linecap: round; opacity: .7; }
.pl-empty__move { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .pl-empty__move--slide { animation: pl-slide 4.5s var(--ease-io) infinite; }
  .pl-empty__move--rise { animation: pl-rise 4.5s var(--ease-io) infinite; }
  .pl-empty__move--tune { animation: pl-tune 3s var(--ease-io) infinite alternate; }
  .pl-empty__plus { transform-box: fill-box; transform-origin: center; animation: pl-plus 4.5s var(--ease-io) infinite; }
}
@keyframes pl-slide { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(8px) rotate(8deg); } }
@keyframes pl-rise { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes pl-tune { to { transform: translateX(64px); } }
@keyframes pl-plus { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(1.15); } }
.pl-empty__title { font: 600 20px/1.25 var(--font-serif); color: var(--text); }
.pl-empty__text { font-size: 14px; max-width: 280px; color: var(--text-2); }
.pl-empty .btn { margin-top: 12px; }
.pl-empty .btn .ic { width: 18px; height: 18px; }
.searchbar__clear { width: 34px; height: 34px; color: var(--text-2); }
.searchbar__clear .ic { width: 18px; height: 18px; }

.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-md); font-size: 14px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip:active { background: var(--surface); }

/* ---------- empty / loading ---------- */

.empty { text-align: center; padding: 56px var(--s5); color: var(--text-2); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty--inline { padding: var(--s4) 0; text-align: left; align-items: flex-start; }
.empty--full { min-height: 70vh; justify-content: center; }
.empty__icon { width: 56px; height: 56px; color: var(--accent-text); stroke-width: 1.2; margin-bottom: 8px; }
.empty__title { font: 600 20px/1.25 var(--font-serif); color: var(--text); }
.empty__text { font-size: 14px; max-width: 300px; }
.empty .btn { margin-top: 14px; }

@keyframes pulse { 50% { opacity: .5; } }

/* vinyl loader: a record slides out of a cardboard sleeve, spins, and goes back in when done */
.vl { --s: 132px; position: relative; width: calc(var(--s) * 1.62); height: var(--s); }
.vl--sm { --s: 64px; }
.vl__sleeve { position: absolute; left: 0; top: 0; z-index: 1; width: var(--s); height: var(--s); display: grid; place-items: center;
  background: var(--surface); border: 3px double var(--line); border-radius: 4px; box-shadow: 0 6px 16px var(--shadow); }
.vl--sm .vl__sleeve { border-width: 2px; box-shadow: 0 3px 8px var(--shadow); }
.vl__brand { font: 600 calc(var(--s) * .14)/1 var(--font-serif); letter-spacing: .04em; color: var(--accent-text); }
.vl--sm .vl__brand { display: none; }
.vl__slide { position: absolute; left: calc(var(--s) * .04); top: calc(var(--s) * .04); width: calc(var(--s) * .92); height: calc(var(--s) * .92);
  animation: vl-out .9s var(--ease-io) .15s both; }
.vl__disc { position: absolute; inset: 0; border-radius: 50%; background: var(--vinyl);
  /* grooves as flat rings: no gradients */
  box-shadow: inset 0 0 0 calc(var(--s) * .05) var(--vinyl), inset 0 0 0 calc(var(--s) * .055) rgba(255, 240, 220, .1),
    inset 0 0 0 calc(var(--s) * .12) var(--vinyl), inset 0 0 0 calc(var(--s) * .125) rgba(255, 240, 220, .08),
    inset 0 0 0 calc(var(--s) * .19) var(--vinyl), inset 0 0 0 calc(var(--s) * .195) rgba(255, 240, 220, .08);
  animation: vl-spin 1.8s linear infinite; }
.vl__groove { position: absolute; inset: 14%; border-radius: 50%; border: 2px solid transparent; border-top-color: rgba(255, 240, 220, .22); }
.vl__label { position: absolute; inset: 34%; border-radius: 50%; background: var(--bordeaux); box-shadow: inset 0 0 0 calc(var(--s) * .06) var(--bordeaux), inset 0 0 0 calc(var(--s) * .07) rgba(255, 255, 255, .25); }
.vl__label::after { content: ''; position: absolute; left: 50%; top: 50%; width: 10%; height: 10%; margin: -5% 0 0 -5%; border-radius: 50%; background: var(--bg); }
@keyframes vl-out { from { transform: translateX(0); } to { transform: translateX(62%); } }
@keyframes vl-in { from { transform: translateX(62%); } to { transform: translateX(0); } }
@keyframes vl-spin { to { transform: rotate(360deg); } }
@keyframes vl-away { to { opacity: 0; transform: scale(.94); } }

.boot { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: var(--bg); }
.boot__note { font-size: 14px; color: var(--text-2); }
.boot.is-done .vl__slide { animation: vl-in .55s var(--ease-io) both; }
.boot.is-done { animation: vl-away .4s var(--ease-io) .45s both; pointer-events: none; }

.view-loader { display: flex; justify-content: center; padding: 64px 0; opacity: 0; animation: fade-in .3s var(--ease-io) .25s forwards; }
@keyframes fade-in { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .vl__slide { animation: none; transform: translateX(62%); }
  .boot.is-done .vl__slide { animation: none; }
}

/* ---------- search modes, artist rows ---------- */

.search__modes { margin: var(--s1) 0 var(--s3); background: var(--surface); }
.search__modes button { transition: background .3s var(--ease-io), color .3s var(--ease-io); }
.artists { display: flex; flex-direction: column; }
.artist-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 0; text-align: left; }
.artist-row + .artist-row { border-top: 1px solid var(--line); }
.artist-row__photo { width: 56px; height: 56px; border-radius: 50%; flex: none; }
.artist-row__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.artist-row__name { font: 600 17px/1.25 var(--font-serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.artist-row__sub { font-size: 13px; color: var(--text-2); }
.artist-row__chev { color: var(--text-3); width: 20px; height: 20px; }
.artist-row:active { opacity: .7; }
.artists > .artist-row:nth-child(-n+8) { animation: row-in .52s var(--ease-io) both; animation-delay: calc(60ms + var(--i, 0) * 32ms); }
.artists > :nth-child(2) { --i: 1; } .artists > :nth-child(3) { --i: 2; } .artists > :nth-child(4) { --i: 3; }
.artists > :nth-child(5) { --i: 4; } .artists > :nth-child(6) { --i: 5; } .artists > :nth-child(7) { --i: 6; } .artists > :nth-child(8) { --i: 7; }

/* ---------- artist ---------- */

/* artist names open the artist card */
.track__artist, .card__artist, .mini__artist { cursor: pointer; }
.track__artist:active, .card__artist:active, .mini__artist:active { text-decoration: underline; text-underline-offset: 3px; }

.artist__head { padding: var(--s3) 0 var(--s1); }
.artist__photo { display: block; width: 100%; aspect-ratio: 1 / 1; max-height: 320px; object-fit: cover; object-position: 50% 30%;
  border-radius: var(--r-md); margin-bottom: var(--s4); }
.artist__photo--empty { display: grid; place-items: center; color: var(--text-3); }
.artist__photo--empty .ic { width: 64px; height: 64px; stroke-width: 1.2; }
.card--artist { flex-basis: 116px; text-align: center; }
.card--artist .card__cover { width: 116px; height: 116px; }
.card__cover--round { border-radius: 50%; }
.artist__about { margin: 10px 0 6px; color: var(--text-2); font-size: 14px; line-height: 1.55; white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.artist__about.is-open { display: block; }

/* ---------- library ---------- */

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.tile { border-radius: var(--r-md); padding: var(--card-y) var(--card-x); height: 112px; display: flex; flex-direction: column; align-items: flex-start; text-align: left; color: var(--white); }
.tile .ic { width: 26px; height: 26px; margin-bottom: auto; }
.tile__title { font: 600 19px/1.15 var(--font-serif); }
.tile__sub { font-size: 13px; opacity: .75; margin-top: 2px; }
.tile--accent { background: var(--accent); color: var(--on-accent); }
.tile--navy { background: var(--tile-navy); }
.tile--wide { grid-column: 1 / -1; height: 72px; flex-direction: row; align-items: center; gap: 14px; background: var(--surface); color: var(--text);
  border: 3px double var(--line); }
.tile--wide .ic { width: 30px; height: 30px; margin: 0; color: var(--accent-text); }
.tile__text { display: flex; flex-direction: column; }
.artist__fav { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--r-md); color: var(--text-2); }
.artist__fav.is-on { color: var(--accent-text); border-color: var(--accent-text); }
.artist__fav.is-on .ic { animation: like-pop .3s var(--ease); }
.tile:active { opacity: .88; }
.tile.is-opening { opacity: .88; transform: scale(.985); transition: transform .5s var(--ease), opacity .5s var(--ease); pointer-events: none; }

.playlists { display: flex; flex-direction: column; }
.pl-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; text-align: left; width: 100%; }
.pl-row + .pl-row { border-top: 1px solid var(--line); }
.pl-row__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pl-row__name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-row__count { font-size: 13px; color: var(--text-2); }
.pl-row__chev { color: var(--text-3); width: 20px; height: 20px; }
.mosaic { width: 56px; height: 56px; border-radius: var(--r-sm); overflow: hidden; flex: none; display: grid; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.mosaic--4 { grid-template-columns: 1fr 1fr; }
.mosaic--empty { place-items: center; color: var(--text-3); }

/* ---------- settings ---------- */

.group { margin-top: var(--section-gap); }
.group__label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 0 0 var(--s2) var(--s1); }
.group__card { background: var(--surface); border-radius: var(--r-md); overflow: hidden; }
.group__item { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 56px; padding: var(--card-y) var(--card-x);
  background: var(--surface); width: 100%; text-align: left; }
/* rounded as one card, whatever tags the rows are (button, div, label) and whether a label is above them */
.group > .group__item:first-child, .group__label + .group__item { border-radius: var(--r-md) var(--r-md) 0 0; }
.group > .group__item:last-child { border-radius: 0 0 var(--r-md) var(--r-md); }
.group > .group__item:only-child, .group__label + .group__item:last-child { border-radius: var(--r-md); }
.group__item + .group__item, .group__card > * + * { border-top: 1px solid var(--line); }
.group__note { margin: var(--s2) var(--s1) 0; font-size: 12.5px; line-height: 1.45; color: var(--text-3); }
.group__item--stack { flex-direction: column; align-items: stretch; }
.group__item--danger { color: var(--accent-text); font-weight: 500; }
.group__item--text p { margin: var(--s3) 0 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.group__item--text { display: block; }
.group__name { font-weight: 500; display: block; }
.group__hint { font-size: 13px; color: var(--text-2); display: block; margin-top: 2px; }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); padding: 3px; gap: 3px; }
.segmented button { height: 36px; border-radius: var(--r-sm); font-size: 14px; font-weight: 500; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; }
.segmented button.is-on { background: var(--seg-on); color: var(--on-seg-on); }
/* language: a small switch at the very bottom */
.segmented--mini { flex: none; width: 108px; padding: 2px; }
.segmented--mini button { height: 30px; font-size: 13px; font-weight: 600; }
.segmented--dense button { font-size: 12.5px; padding: 0 1px; letter-spacing: -.015em; } /* five options, or three long words, on a 375 px phone */

.switch { appearance: none; -webkit-appearance: none; width: 48px; height: 28px; border-radius: 14px; background: var(--surface-2); position: relative; flex: none; cursor: pointer; transition: background .2s; margin: 0; border: 1px solid var(--line); }
.switch::after { content: ''; position: absolute; left: 2px; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.switch:checked { background: var(--accent); border-color: var(--accent); }
.switch:checked::after { background: var(--on-accent); }
.switch:checked::after { transform: translateX(20px); }

.about__brand { display: flex; align-items: center; gap: 10px; }
.about__features { list-style: none; margin: var(--s4) 0 var(--s1); padding: 0; display: grid; gap: var(--s3); }
.about__features li { display: flex; gap: var(--s3); align-items: flex-start; color: var(--text-2); font-size: 14px; line-height: 1.4; }
/* colour themes and players as cards (Settings, the intro's last page) */
.theme-card__dots { display: grid; grid-template-columns: 1fr 1fr; width: 34px; height: 34px; flex: none; border-radius: var(--r-sm);
  overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.swatches { display: grid; grid-template-columns: repeat(7, minmax(0, 34px)); justify-content: space-between; gap: 10px 6px; margin-top: 12px; }
.swatch { width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .35); position: relative; }
/* the label in the middle makes it read as a record */
.swatch::after { content: ''; position: absolute; inset: 36%; border-radius: 50%; background: var(--bordeaux); box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.swatch.is-on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-text); }
/* turntable colourways: a plinth with its plate, not a record */
.swatches--deck { grid-template-columns: repeat(8, minmax(0, 34px)); }
.swatch--deck { border-radius: 8px; aspect-ratio: 1.15; }
.swatch--deck::after { inset: 22%; border-radius: 4px; background: var(--c2); box-shadow: none; }
.group__item.is-muted .swatches { opacity: .5; }
.themes { display: grid; gap: 8px; padding-bottom: 6px; }
.theme-card { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-align: left; }
.theme-card__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.theme-card__name { min-width: 0; font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.theme-card__desc { font-size: 12.5px; line-height: 1.3; color: var(--text-2); }
.theme-card__check { width: 18px; height: 18px; color: var(--accent-text); opacity: 0; }
.theme-card.is-on { border-color: var(--accent-text); }
.theme-card.is-on .theme-card__check { opacity: 1; }
.about__features .ic { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--accent-text); }

/* ---------- bottom nav ---------- */

/* retro: a double rule like an old record sleeve, small-caps serif labels, a tonearm-like needle under the active tab */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: var(--bg); border-top: 3px double var(--line);
  padding-inline: max(0px, calc(50% - var(--col) / 2)); } /* on a wide screen (a computer) the tabs keep to the 720 px column of the screens */
.nav__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text-3); position: relative;
  font: 600 12.5px/1 var(--font-serif); font-variant: small-caps; letter-spacing: .05em; transition: color .3s var(--ease-io); }
.nav__item .ic { width: 25px; height: 25px; stroke-width: 1.6; }
.nav__item.is-on { color: var(--accent-text); }
.nav__item.is-on .ic { animation: nav-pop .5s var(--ease-io); }
@keyframes nav-pop { 40% { transform: translateY(-2px) scale(1.12); } }
.ic__knob, .ic__disc, .ic__horn, .ic__rec { transform-box: fill-box; transform-origin: center; transition: transform .55s var(--ease-io); }
.ic__horn { transform-origin: 0% 100%; }
.nav__item.is-on .ic__knob { transform: rotate(100deg); }
.nav__item.is-on .ic__disc { transform: translateX(2.5px); }
.nav__item.is-on .ic__horn { transform: rotate(-8deg) scale(1.06); }
.nav__item.is-on .ic__rec { transform: rotate(180deg); }
.nav__needle { position: absolute; left: max(0px, calc(50% - var(--col) / 2)); top: -3px; width: calc((100% - 2 * max(0px, calc(50% - var(--col) / 2))) / 4); height: 3px; pointer-events: none;
  transform: translateX(calc(var(--tab, 0) * 100%)); transition: transform .5s var(--ease-io); }
.nav__needle::before { content: ''; position: absolute; left: 50%; top: 0; width: 28px; height: 2px; margin-left: -16px; border-radius: 1px; background: var(--accent); }
.nav__needle::after { content: ''; position: absolute; left: 50%; top: -2px; width: 6px; height: 6px; margin-left: 10px; border-radius: 50%; background: var(--accent); }

/* ---------- mini player ---------- */

.mini { position: fixed; left: max(var(--s2), calc(50% - var(--col) / 2 + var(--s2))); right: max(var(--s2), calc(50% - var(--col) / 2 + var(--s2))); bottom: calc(var(--nav-h) + var(--safe-b) + 8px); z-index: 29; height: var(--mini-h);
  background: var(--mini); color: var(--on-mini); border-radius: var(--r-md); display: none; align-items: center; gap: 12px; padding: 0 6px 0 8px; overflow: hidden; cursor: pointer;
  transform: translateY(0); transition: transform .4s var(--ease-io), opacity .4s var(--ease-io); }
body.has-mini .mini { display: flex; animation: mini-in .5s var(--ease-io); }
@keyframes mini-in { from { transform: translateY(20px); opacity: 0; } }
body.player-open .mini { opacity: 0; pointer-events: none; }
.mini__cover { width: 46px; height: 46px; border-radius: var(--r-sm); flex: none; }
.mini__meta { flex: 1; min-width: 0; }
.mini__title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .mini__like.is-on { color: var(--accent-text); }
:root[data-mode="light"] .mini .mini__like.is-on { color: #E8A1A9; } /* the light-theme accent would vanish on the dark mini bar */

/* long titles (ui.js fitMarquee): a ticker running one way, the copy following after a gap */
.marquee { display: inline-block; white-space: nowrap; }
.is-marquee { text-overflow: clip; }
.is-marquee .marquee { animation: marquee var(--dur, 10s) linear infinite; }
.marquee__copy { padding-left: var(--gap, 48px); }
@keyframes marquee {
  0% { transform: translateX(0); }
  15% { transform: translateX(0); } /* a rest at the start of each round */
  100% { transform: translateX(var(--dist, 0)); }
}
@media (prefers-reduced-motion: reduce) { .is-marquee .marquee { animation: none; } }
.mini__artist { font-size: 12px; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .icon-btn { color: var(--on-mini); }
.mini .icon-btn:active { background: rgba(255,255,255,.1); }
.mini__progress { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); }
.mini.is-loading .mini__progress { animation: pulse 1s ease-in-out infinite; transform: scaleX(1); opacity: .5; }

/* ---------- equalizer: a hi-fi front panel ---------- */

.group__chev { width: 20px; height: 20px; color: var(--text-3); }
.eqp { margin: 2px 0 6px; padding: var(--card-y) var(--card-x) var(--s4); background: var(--surface); border: 3px double var(--line); border-radius: var(--r-md); }
.eqp__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.eqp__title { font: 600 19px/1 var(--font-serif); font-variant: small-caps; letter-spacing: .06em; margin-bottom: 2px; }
.eqp__sub { font: 600 12px/1 var(--font-serif); font-variant: small-caps; letter-spacing: .1em; color: var(--text-2); text-transform: none; }
.eqp__eq { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line); }
.eqp .fx__label { margin: 14px 0 8px; }
.eqp .fx__label:first-of-type { margin-top: 12px; }
.eqp__power { display: flex; align-items: center; gap: 8px; font: 600 12px/1 var(--font-serif); font-variant: small-caps; letter-spacing: .06em; color: var(--text-2); }
.eqp__curve { display: block; width: 100%; height: 64px; margin: 4px 0 8px; overflow: visible; }
.eqp__zero { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; fill: none; vector-effect: non-scaling-stroke; }
.eqp__line { stroke: var(--accent-text); stroke-width: 2; fill: none; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: stroke .3s var(--ease-io); }
.eqp.is-off .eqp__line { stroke: var(--text-3); }
.eqp__faders { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.fader { display: flex; flex-direction: column; align-items: center; gap: 6px; --v: 0; --h: 168px; }
.fader__db { font: 500 12px/1 var(--font-sans); font-variant-numeric: tabular-nums; color: var(--text-2); min-height: 12px; }
.fader__track { position: relative; width: 44px; height: var(--h); touch-action: none; cursor: ns-resize; outline-offset: 4px; }
.fader__ticks { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.fader__ticks line { stroke: var(--text-3); stroke-width: 1; vector-effect: non-scaling-stroke; }
.fader__ticks line.zero { stroke: var(--text-2); stroke-width: 1.5; }
.fader__slot { position: absolute; left: 50%; top: 8px; bottom: 8px; width: 4px; margin-left: -2px; border-radius: 2px; background: var(--text); opacity: .85; }
/* the cap sits at --v (-1 .. 1): +12 dB at the top, -12 dB at the bottom */
.fader__cap { position: absolute; left: 50%; top: 50%; width: 30px; height: 18px; margin: -9px 0 0 -15px; border-radius: 4px; background: var(--accent);
  box-shadow: 0 2px 0 var(--accent-press); transform: translateY(calc(var(--v) * (var(--h) / -2 + 9px))); transition: transform .12s var(--ease-io); }
.fader__cap::before, .fader__cap::after { content: ''; position: absolute; left: 6px; right: 6px; height: 1px; background: rgba(255, 255, 255, .55); }
.fader__cap::before { top: 6px; } .fader__cap::after { bottom: 6px; }
.fader.is-drag .fader__cap { transition: none; transform: translateY(calc(var(--v) * (var(--h) / -2 + 9px))) scale(1.08); }

/* the control panel holds more than the equalizer did: a taller sheet and a more compact equalizer */
.sheet--panel .sheet__panel { max-height: 90vh; }
.sheet--panel .fader { --h: 128px; }
.sheet--panel .eqp__curve { height: 44px; margin: 2px 0 4px; }
.fader__label { font: 600 12.5px/1 var(--font-serif); font-variant: small-caps; letter-spacing: .04em; color: var(--text-2); }
.eqp.is-off .fader__cap { background: var(--text-3); box-shadow: 0 2px 0 var(--text-2); }
.eqp__presets { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.eqp__preset { height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg);
  font: 600 13px/1 var(--font-serif); font-variant: small-caps; letter-spacing: .04em; color: var(--text-2); transition: background .25s var(--ease-io), color .25s var(--ease-io); }
.eqp__noise { margin-top: var(--s5); }
.eqp__noise-label { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; font: 600 13px/1.2 var(--font-serif); font-variant: small-caps; letter-spacing: .06em; color: var(--text-2); }
.eqp__noise-label small { font: 400 12px/1.3 var(--font-sans); font-variant: normal; letter-spacing: 0; color: var(--text-3); }
.seg.seg--5 { grid-template-columns: repeat(5, 1fr); gap: 6px; }
.seg.seg--5 button { min-height: 40px; padding: 4px 2px; }
.seg.seg--5 b { font-size: 12.5px; }
.eqp__preset.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ---------- sheet & dialog ---------- */

.sheet { position: fixed; inset: 0; z-index: 60; }
.alarm__field { font: inherit; min-height: 44px; padding: 0 var(--s2); border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.shared { margin: 0 0 var(--s3); }
.shared__name { font-weight: 600; font-size: 17px; overflow-wrap: anywhere; }
.shared__sub { color: var(--text-2); margin: var(--s1) 0 0; }
.shared__titles { list-style: none; margin: var(--s2) 0 0; padding: 0; color: var(--text-2); font-size: 13px; }
.shared__titles li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shared__note { margin: 0 0 var(--s3); color: var(--text-2); }
.alarm__says { margin: 0 0 var(--s3); color: var(--text-2); }
.sheet__scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .36s var(--ease-io); }
.sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 80vh; overflow-y: auto; background: var(--bg); border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: var(--s2) var(--gutter) calc(var(--s3) + var(--safe-b)); transform: translateY(100%); transition: transform .38s var(--ease-io); max-width: var(--col); margin: 0 auto; }
.sheet.is-open .sheet__scrim { opacity: 1; }
.sheet.is-open .sheet__panel { transform: none; }
.sheet__grip { width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto var(--s3); }
.sheet__title { font: 600 20px/1.2 var(--font-serif); padding: var(--s1) 0 var(--s3); }
.sheet__track { display: flex; gap: var(--s3); align-items: center; padding: var(--s1) 0 var(--s3); border-bottom: 1px solid var(--line); margin-bottom: 4px; min-width: 0; }
.sheet__track > div { min-width: 0; }
.sheet__track .cover { width: 48px; height: 48px; border-radius: var(--r-sm); flex: none; }
.sheet__item { display: flex; align-items: center; gap: 14px; width: 100%; height: 52px; text-align: left; font-size: 16px; }
.sheet__item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet__item .ic { color: var(--text-2); }
.sheet__item.is-danger, .sheet__item.is-danger .ic { color: var(--accent-text); }
.sheet__item:active { opacity: .6; }
.sheet__cancel { width: 100%; height: 48px; margin-top: var(--s3); border-radius: var(--r-md); background: var(--surface); font-weight: 600; }
/* a sheet that follows the finger (swipe to close) must not lag behind it */
.sheet__panel.is-dragging { transition: none; }

/* lyrics and the queue: the head and the button stay, only the list scrolls */
:is(.sheet--lyrics, .sheet--queue) .sheet__panel { display: flex; flex-direction: column; height: 86vh; max-height: 86vh; overflow: hidden; }
:is(.sheet--lyrics, .sheet--queue) .sheet__grip { flex: none; margin-bottom: 0; }
:is(.sheet--lyrics, .sheet--queue) .sheet__body { flex: 1; min-height: 0; display: flex; }
:is(.sheet--lyrics, .sheet--queue) .sheet__cancel { flex: none; }
.lyrics, .queue { flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column; }
.sheet__head { flex: none; padding: var(--s3) 0 var(--s3); border-bottom: 1px solid var(--line); text-align: center; touch-action: none; }
.lyrics__title { font: 600 20px/1.2 var(--font-serif); overflow-wrap: anywhere; }
.lyrics__artist { margin-top: 4px; font-size: 14px; color: var(--text-2); }
.sheet__scroll { position: relative; flex: 1; min-height: 0; overflow-x: hidden; touch-action: pan-y; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 18px 2px 8px; }
.lyrics__text { margin: 0; white-space: pre-wrap; font-size: 17px; line-height: 1.65; text-align: center; color: var(--text); }
.lyrics__source { margin: 22px 0 6px; font-size: 12px; color: var(--text-3); text-align: center; }
/* timed lyrics: the line being sung is lit and kept in the middle; tap a line to jump to it */
.lyrics--synced .sheet__scroll { padding: 30vh 6px 30vh; }
.lyrics__lines { display: flex; flex-direction: column; align-items: center; }
.lyrics__line { max-width: 92%; margin: 0; padding: 6px 4px; font: 600 19px/1.4 var(--font-serif); text-align: center; color: var(--text-3); cursor: pointer;
  transform-origin: center; transition: color .35s var(--ease-io), transform .35s var(--ease-io); overflow-wrap: anywhere; }
.lyrics__line.is-active { color: var(--accent-text); transform: scale(1.06); }
.lyrics__line:active { opacity: .6; }
.lyrics__gap { margin: 0; height: 18px; }

/* the queue: what plays now, what comes next */
.queue__title { font: 600 20px/1.2 var(--font-serif); }
.queue .sheet__scroll { padding-top: 10px; }
.queue__label { display: flex; align-items: center; justify-content: space-between; min-height: 36px; margin-top: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.queue__label--next { margin-top: 14px; }
.queue__clear { height: 32px; padding: 0 4px; font: 600 14px var(--font-sans); letter-spacing: 0; text-transform: none; color: var(--accent-text); }
.queue.is-empty .queue__clear { display: none; }
.queue__empty { display: none; margin: 18px 12px; font-size: 14px; line-height: 1.5; text-align: center; color: var(--text-3); }
.queue.is-empty .queue__empty { display: block; }
.qrow { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 6px 0; background: var(--bg); position: relative; }
.qrow__cover { width: 44px; height: 44px; border-radius: var(--r-sm); flex: none; }
.qrow__meta { flex: 1; min-width: 0; }
.qrow__title, .qrow__artist { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qrow__title { font-size: 15px; font-weight: 500; }
.qrow__artist { margin-top: 2px; font-size: 13px; color: var(--text-2); }
.qrow.is-current .qrow__title { color: var(--accent-text); }
.queue__list .qrow { cursor: pointer; }
.queue__list .qrow:active:not(.is-dragging) { opacity: .6; }
.qrow__remove { color: var(--text-3); flex: none; }
.qrow__grip { width: 40px; height: 44px; flex: none; display: grid; place-items: center; color: var(--text-3); touch-action: none; cursor: grab; }
.queue__list.is-sorting .qrow { transition: transform .2s var(--ease-io); }
.queue__list.is-sorting .qrow.is-dragging { transition: none; z-index: 2; box-shadow: 0 6px 18px var(--scrim); border-radius: var(--r-sm); cursor: grabbing; }

/* sound: speed and reverb */
.fx__title { font: 600 19px/1 var(--font-serif); font-variant: small-caps; letter-spacing: .06em; margin-bottom: 14px; }
.fx__label { margin: 14px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; padding: 6px 4px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); color: var(--text-2);
  transition: background .25s var(--ease-io), color .25s var(--ease-io); }
.seg b { font: 600 15px/1.1 var(--font-serif); font-variant-numeric: tabular-nums; }
.seg small { font-size: 11px; opacity: .75; }
.seg button.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* import a playlist */
.import__hint { margin: -4px 0 12px; font-size: 13.5px; line-height: 1.45; color: var(--text-2); }
.import__field { height: auto; min-height: 120px; padding: 10px 12px; resize: vertical; line-height: 1.4; }
.import__error { margin: 10px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--accent-text); }
.import__busy { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; color: var(--text-2); }
.import__busy[hidden] { display: none; }
.import__busy .view-loader { position: static; width: auto; height: auto; padding: 0; flex: none; }
.import.is-busy .import__field { opacity: .6; }
.import-missing__lead { margin: 0 0 8px; font-size: 14px; color: var(--text-2); }
.import-missing ul { margin: 0; padding: 0 0 0 18px; font-size: 14px; line-height: 1.6; max-height: 40vh; overflow-y: auto; }
.import-missing__more { list-style: none; margin-left: -18px; color: var(--text-3); }

.dialog { position: fixed; inset: 0; z-index: 70; background: var(--scrim); display: grid; place-items: center; padding: var(--gutter); animation: fade .3s var(--ease-io); }
.dialog__panel { animation: dialog-in .36s var(--ease-io); }
@keyframes fade { from { opacity: 0; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.dialog__panel { width: 100%; max-width: 360px; background: var(--bg); border-radius: var(--r-lg); padding: var(--s5) var(--s5) var(--s4); }
.dialog__title { font: 600 20px/1.2 var(--font-serif); margin-bottom: var(--s4); }
.field { width: 100%; height: 46px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--text); padding: 0 12px; font: 400 16px var(--font-sans); outline: none; }
.field:focus { border-color: var(--accent); }
.dialog__actions { display: flex; justify-content: flex-end; gap: var(--s2); margin-top: var(--s4); }

.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--mini-h) + var(--safe-b) + 24px); z-index: 80; transform: translate(-50%, 12px);
  background: var(--toast); color: var(--on-toast); padding: 11px 16px; border-radius: var(--r-md); font-size: 14px; max-width: min(calc(100vw - 2 * var(--gutter)), 480px);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease-io), transform .36s var(--ease-io); text-align: center; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.has-icon { display: flex; align-items: center; gap: var(--s3); text-align: left; flex-wrap: wrap; }
.toast__icon { display: grid; flex: none; }
.toast__icon .ic { width: 20px; height: 20px; }
.toast.is-on .toast__icon { animation: pr-pop .4s var(--ease) .1s both; }
.login__text { margin: 0 0 14px; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.login__open { display: flex; align-items: center; justify-content: center; width: 100%; height: 48px; text-decoration: none; }
.login__state { margin: 12px 0 4px; font-size: 13.5px; text-align: center; color: var(--text-3); }
.confirm__text { margin: 0 0 6px; padding: 0 2px 8px; font-size: 14px; line-height: 1.45; color: var(--text-2); }
body.player-open .toast { bottom: calc(24px + var(--safe-b)); }

/* titles in the serif face use the theme's heading colour (--heading is the text colour unless the theme sets one) */
.view__title, .section__title, .sheet__title, .dialog__title, .empty__title, .lyrics__title, .fp__title,
.hero .brand__name, .about__brand .brand__name { color: var(--heading); }

/* ---------- press: a small motion of the icon on every tap (ui.js pressAnim adds .is-press) ---------- */

.ic__hands, .ic__heart, .ic__roll, .ic__plus, .ic__ln, .ic__dot, .ic__cap, .ic__mid { transform-box: fill-box; transform-origin: center; }
.ic__hands { transform-box: view-box; transform-origin: 12px 12px; } /* the hands turn on the clock's centre */
@media (prefers-reduced-motion: no-preference) {
  /* Favourites: the heart jumps and beats, the record on the shelf rolls a little */
  .is-press .ic--shelf .ic__heart { animation: pr-beat .6s var(--ease); }
  .is-press .ic--shelf .ic__roll { animation: pr-roll .6s var(--ease-io); }
  /* History: the hands run backwards, one full turn */
  .is-press .ic--clock .ic__hands { animation: pr-back .6s var(--ease-io); }
  /* + (new playlist, import) and the plus in "To a playlist" */
  .is-press .ic--plus { animation: pr-plus .5s var(--ease); }
  .is-press .ic--listPlus .ic__plus { animation: pr-quarter .5s var(--ease); }
  /* hearts: a beat when liked, a squeeze when unliked */
  .is-press:not(.was-on) .ic--heartFill { animation: like-pop .35s var(--ease); }
  .is-press.was-on .ic--heart { animation: pr-squeeze .35s var(--ease); }
  .is-press :is(.ic--play, .ic--pause) { animation: pr-pop .32s var(--ease); }
  .is-press .ic--next { animation: pr-push-r .35s var(--ease); }
  .is-press .ic--prev { animation: pr-push-l .35s var(--ease); }
  .is-press .ic--shuffle { animation: pr-flip .45s var(--ease-io); }
  .is-press :is(.ic--repeat, .ic--repeat1) { animation: pr-turn .55s var(--ease-io); }
  .is-press .ic--send { animation: pr-fly .6s var(--ease-io); }
  .is-press .ic--lyrics .ic__ln { animation: pr-read .5s var(--ease) both; }
  .is-press .ic--lyrics .ic__ln:nth-of-type(2) { animation-delay: .07s; }
  .is-press .ic--lyrics .ic__ln:nth-of-type(3) { animation-delay: .14s; }
  .is-press .ic--eq .ic__cap { animation: pr-fader .5s var(--ease-io); }
  .is-press .ic--eq .ic__cap:nth-of-type(2) { animation-name: pr-fader2; }
  .is-press .ic--eq .ic__cap:nth-of-type(3) { animation-delay: .06s; }
  .is-press .ic--queue .ic__mid { animation: pr-shift .5s var(--ease-io); }
  .is-press .ic--more .ic__dot { animation: pr-hop .4s var(--ease) both; }
  .is-press .ic--more .ic__dot:nth-of-type(2) { animation-delay: .06s; }
  .is-press .ic--more .ic__dot:nth-of-type(3) { animation-delay: .12s; }
  .is-press .ic--down { animation: pr-dive .4s var(--ease); }
  .is-press .ic--sort { animation: pr-upend .45s var(--ease-io); }
}
@keyframes pr-beat { 30% { transform: translateY(-3px) scale(1.25); } 55% { transform: translateY(-1px) scale(.95); } 75% { transform: scale(1.1); } }
@keyframes pr-roll { 50% { transform: translateX(-1.5px) rotate(-70deg); } }
@keyframes pr-back { to { transform: rotate(-360deg); } }
@keyframes pr-plus { 60% { transform: rotate(100deg) scale(1.15); } 100% { transform: rotate(90deg); } }
@keyframes pr-quarter { to { transform: rotate(90deg); } }
@keyframes pr-squeeze { 40% { transform: scale(.75); } }
@keyframes pr-pop { 0% { transform: scale(.7); } 60% { transform: scale(1.08); } }
@keyframes pr-push-r { 40% { transform: translateX(3px); } }
@keyframes pr-push-l { 40% { transform: translateX(-3px); } }
@keyframes pr-flip { 50% { transform: scaleX(-1); } }
@keyframes pr-turn { to { transform: rotate(360deg); } }
@keyframes pr-fly { 45% { transform: translate(7px, -7px) scale(.7); opacity: 0; } 55% { transform: translate(-5px, 5px) scale(.7); opacity: 0; } }
@keyframes pr-read { 45% { transform: translateX(2.5px); opacity: .55; } }
@keyframes pr-fader { 40% { transform: translateY(-4px); } 75% { transform: translateY(1px); } }
@keyframes pr-fader2 { 40% { transform: translateY(5px); } 75% { transform: translateY(-1px); } }
@keyframes pr-shift { 45% { transform: translateX(4px); opacity: .4; } }
@keyframes pr-hop { 40% { transform: translateY(-3px); } }
@keyframes pr-dive { 45% { transform: translateY(3px); } }
@keyframes pr-upend { 50% { transform: scaleY(-1); } }

/* ---------- the tape views (the cassette deck and the reels; <html data-family="tape">) ---------- */

/* a cassette whose reels turn: the loader and the launch screen */
.tl { --s: 150px; width: var(--s); height: calc(var(--s) * .63); }
.tl--sm { --s: 76px; }
.tl__shell { position: relative; display: block; width: 100%; height: 100%; border-radius: calc(var(--s) * .05); background: var(--tp-shell);
  box-shadow: 0 6px 16px var(--shadow), inset 0 0 0 1px var(--tp-edge); }
.tl__label { position: absolute; left: 7%; right: 7%; top: 8%; height: 58%; border-radius: calc(var(--s) * .025); background: var(--tp-label);
  box-shadow: inset 0 calc(var(--s) * .09) 0 var(--tp-label), inset 0 calc(var(--s) * .12) 0 var(--tp-band); }
.tl__win { position: absolute; left: 29%; right: 29%; top: 31%; height: 21%; border-radius: calc(var(--s) * .02); background: var(--tp-window);
  display: flex; justify-content: space-around; align-items: center; }
.tl__reel { width: calc(var(--s) * .1); height: calc(var(--s) * .1); border-radius: 50%; border: calc(var(--s) * .022) dotted var(--tp-hub);
  animation: vl-spin 2.4s linear infinite reverse; }
.boot .tl { display: none; }
:root[data-family="tape"] .boot .tl { display: block; }
:root[data-family="tape"] .boot .vl { display: none; }
.boot.is-done .tl { animation: vl-away .4s var(--ease-io) both; }
@media (prefers-reduced-motion: reduce) { .tl__reel { animation: none; } }


/* Headings only, so decorative faces don't impair the readability of controls or track names. */
:root[data-theme-font="navy"] { --font-serif: 'Cormorant Garamond', Georgia, serif; }
:root[data-theme-font="noir"] { --font-serif: 'Oswald', Georgia, serif; }
:root[data-theme-font="bordo"] { --font-serif: 'PT Serif', Georgia, serif; }
:root[data-theme-font="green"] { --font-serif: 'PT Serif Caption', Georgia, serif; }
:root[data-theme-font="richesse"] { --font-serif: 'Cormorant', Georgia, serif; }
:root[data-theme-font="obsidian"] { --font-serif: 'Manrope', Georgia, serif; }
:root[data-theme-font="terracotta"] { --font-serif: 'Alegreya', Georgia, serif; }
:root[data-theme-font="tuscan"] { --font-serif: 'Merriweather', Georgia, serif; }
:root[data-theme-font="ussr"] { --font-serif: 'Russo One', Georgia, serif; }
:root[data-theme-font="ddr"] { --font-serif: 'Roboto Condensed', Georgia, serif; }
:root[data-theme-font="eighties"] { --font-serif: 'Rubik Mono One', Georgia, serif; }
:root[data-theme-font="depression"] { --font-serif: 'Bitter', Georgia, serif; }

/* behind every picture: a cassette instead of a record */
:root[data-family="tape"] :is(.cover, .mosaic, .artist__photo) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A39580' stroke-width='1.3'%3E%3Crect x='2.5' y='6' width='19' height='12' rx='1.5'/%3E%3Ccircle cx='8.5' cy='11.4' r='2'/%3E%3Ccircle cx='15.5' cy='11.4' r='2'/%3E%3Cpath d='M7.5 18 8.6 15.6h6.8L16.5 18'/%3E%3C/svg%3E"); }

.brand__mark--tape .disc { fill: var(--tp-shell); }
.brand__mark--tape .label { fill: var(--accent); }
.brand__mark--tape .hole { fill: var(--tp-label); }
.brand__mark--tape .groove { fill: none; stroke: var(--tp-edge); stroke-width: .8; }

/* the boombox's speakers pulse instead of the gramophone horn turning */
:root[data-family="tape"] .ic__horn { transform-origin: center; }
:root[data-family="tape"] .nav__item.is-on .ic__horn { transform: scale(1.08); }

/* cassette and tape deck colours in Settings */
.swatches--tape { grid-template-columns: repeat(6, minmax(0, 40px)); }
.swatch--tape { border-radius: 5px; aspect-ratio: 1.55; }
.swatch--tape::after { inset: 18% 12% 46%; border-radius: 2px; background: var(--c2); box-shadow: none; }
.swatches--recorder { grid-template-columns: repeat(4, minmax(0, 44px)); justify-content: start; gap: 10px 14px; }
.swatch--recorder { border-radius: 7px; aspect-ratio: 1.3; }
.swatch--recorder::after { inset: 20% 18% 34%; border-radius: 3px; background: var(--c2); box-shadow: none; }

.about__credit { margin: var(--s3) 0 0; font-size: 12px; line-height: 1.45; color: var(--text-3); }

/* a toast with an action (undo) */
.toast__action { border: 0; border-radius: var(--r-sm); color: inherit; background: transparent; text-decoration: underline; padding: 0 var(--s2);
  min-height: 36px; font-weight: 600; }
.toast.is-on .toast__action { pointer-events: auto; }

/* downloads */
.download-tools { display: flex; flex-wrap: wrap; gap: var(--s3); margin-bottom: var(--s4); }
.download-tools .btn { flex: 1 1 140px; }
.downloads-list { margin-top: var(--s3); }
.download-row { display: flex; gap: var(--s3); align-items: center; min-height: 64px; padding: var(--s2) 0; }
.download-row + .download-row { border-top: 1px solid var(--line); }
.download-row__meta { flex: 1; min-width: 0; display: grid; gap: 2px; }
.download-row__meta b { font-weight: 500; }
.download-row__meta b, .download-row__meta small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.download-row__meta small, .download-row__meta span { color: var(--text-2); font-size: 13px; }
.download-filter { display: flex; gap: var(--s3); align-items: center; min-height: 44px; margin: var(--s2) 0 0; font-size: 14px; color: var(--text-2); }
.download-filter input { accent-color: var(--accent); width: 18px; height: 18px; }

/* search: what the results are doing (loading, failed), one line under the modes */
.search__status { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); color: var(--text-2); font-size: 13px; }
.search__status:not(:empty) { min-height: 44px; margin: 0 0 var(--s2); }
.suggest__item[aria-selected="true"] { background: var(--accent-soft); }
.queue__summary { color: var(--text-2); font-size: 13px; margin: var(--s1) 0 0; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }

/* ---------- Settings: one page, everything applies at once ---------- */

.group__text { flex: 1; min-width: 0; }
.group__item--stack > .group__text { flex: none; }
.group__mark { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--bg); }
.group__mark .brand__mark { width: 26px; height: 26px; }
.group__item--danger { color: var(--accent-text); font-weight: 500; justify-content: flex-start; }
.group__item .btn { align-self: stretch; }
/* the players: a strip of cards that scrolls sideways, the chosen one outlined */
.picks { display: flex; gap: var(--s3); overflow-x: auto; padding: var(--card-y) var(--card-x); scroll-snap-type: x proximity; scrollbar-width: none;
  background: var(--surface); }
.picks::-webkit-scrollbar { display: none; }
.pick { flex: 0 0 132px; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s1); min-height: 148px; padding: var(--s3);
  border-radius: var(--r-md); background: var(--bg); text-align: left; scroll-snap-align: start; box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .25s var(--ease-io), transform .25s var(--ease-io); }
.pick:active { transform: scale(.97); }
.pick.is-on { box-shadow: inset 0 0 0 2px var(--accent-text); }
.pick__art { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: var(--s1); border-radius: var(--r-sm); color: var(--accent-text);
  background: var(--surface); }
.pick__art .ic { width: 32px; height: 32px; stroke-width: 1.5; }
.pick.is-on .pick__art { background: var(--accent); color: var(--on-accent); }
.pick__name { font-weight: 600; font-size: 14.5px; line-height: 1.2; }
.pick__desc { font-size: 12px; line-height: 1.35; color: var(--text-2); }
/* colour themes as a grid of tiles: four stripes of colour and the name */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s2); margin-top: var(--s3); }
.theme-tile { display: flex; align-items: center; gap: var(--s2); min-width: 0; min-height: 48px; padding: var(--s2); border-radius: var(--r-sm);
  background: var(--bg); text-align: left; box-shadow: inset 0 0 0 1px var(--line); }
.theme-tile.is-on { box-shadow: inset 0 0 0 2px var(--accent-text); }
.theme-tile .theme-card__dots { width: 28px; height: 28px; }
.theme-tile__name { min-width: 0; font-size: 13px; font-weight: 500; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group__item--stack .segmented, .group__item--stack .swatches { margin-top: var(--s3); }
.swatches { margin-top: var(--s3); }
.eqp__hint { margin: -2px 0 var(--s2); font-size: 12.5px; line-height: 1.4; color: var(--text-3); }
.seg:has(> :nth-child(2):last-child) { grid-template-columns: 1fr 1fr; }

/* ---------- the radio on Home: the receiver, its era and its stations ---------- */

.radio-card { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: var(--s3) var(--s4); align-items: center; padding: var(--card-y) var(--card-x);
  border-radius: var(--r-md); background: var(--surface); }
.radio-card__art { display: block; width: 100%; aspect-ratio: 4 / 3; }
.radio-card__meta .section__title { margin: 2px 0 var(--s1); }
.radio-card__meta .shelf__sub { margin: 0; }
.radio-card__stations { grid-column: 1 / -1; display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--card-x));
  padding: 0 var(--card-x); }
.radio-card__stations::-webkit-scrollbar { display: none; }
.radio-chip { flex: none; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; height: 46px; padding: 0 var(--s3);
  background: var(--bg); }
.radio-chip b { font-size: 13.5px; font-weight: 600; }
.radio-chip small { font-size: 11.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.radio-chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.radio-chip.is-on small { color: inherit; opacity: .8; }
.radio-card__actions { grid-column: 1 / -1; display: flex; gap: var(--gap); }
.radio-card__actions .btn:first-child { flex: 1; }
@media (max-width: 360px) { .radio-card { grid-template-columns: 1fr; } .radio-card__art { max-width: 200px; margin: 0 auto; } }

/* ---------- the Garage / the Living room: receivers by decade ---------- */

.sheet--garage .sheet__panel { max-height: 88vh; }
.garage__filter { display: flex; gap: var(--s2); margin: 0 0 var(--s4); overflow-x: auto; scrollbar-width: none; }
.garage__filter::-webkit-scrollbar { display: none; }
.garage__filter .chip { flex: none; }
.garage__filter .chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.garage__item[hidden], .garage__decade[hidden] { display: none; }
.garage__decade + .garage__decade { margin-top: var(--s5); }
.garage__year { margin: 0 0 var(--s2) var(--s1); font: 600 18px/1.2 var(--font-serif); color: var(--heading); }
.garage__row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--gap); }
.garage__item { display: flex; flex-direction: column; gap: 2px; padding: var(--s2) var(--s2) var(--s3); border-radius: var(--r-md); background: var(--surface);
  text-align: left; box-shadow: inset 0 0 0 1px var(--line); }
.garage__item.is-on { box-shadow: inset 0 0 0 2px var(--accent-text); }
.garage__art { display: block; width: 100%; aspect-ratio: 4 / 3; margin-bottom: var(--s1); }
.garage__name { font-weight: 600; font-size: 14px; line-height: 1.25; }
.garage__meta { font-size: 12px; line-height: 1.35; color: var(--text-2); }

/* ---------- the loading pictures of the reels, the CD player, the phonograph and the radios (index.html #ml-art) ---------- */

.ml { width: 96px; flex: none; }
.ml svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 4px 10px var(--shadow)); }
.boot .ml { width: 190px; }
.boot.boot--ml :is(.vl, .tl) { display: none; }
.boot.is-done .ml { animation: vl-away .4s var(--ease-io) both; }
.ml-spin { transform-box: fill-box; transform-origin: center; animation: vl-spin 2.2s linear infinite; }
.ml-spin--slow { animation-duration: 3.4s; }
.ml-spin--fast { animation-duration: .9s; }
.ml-spin--knob { animation: ml-knob 2.4s var(--ease-io) infinite alternate; }
@keyframes ml-knob { from { transform: rotate(-40deg); } to { transform: rotate(60deg); } }
/* the reels: a brushed body, two reels winding the tape past the head */
.ml-body { fill: var(--surface-2); stroke: var(--line); stroke-width: 1.5; }
.ml-reel { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.ml-wound { fill: #5A4232; }
.ml-hole { fill: var(--surface-2); }
.ml-hub, .ml-accent { fill: var(--accent); }
.ml-tape { fill: none; stroke: #5A4232; stroke-width: 2; }
.ml-vu circle { fill: var(--accent); animation: ml-pulse 1.1s ease-in-out infinite; }
@keyframes ml-pulse { 50% { opacity: .35; } }
/* the CD player: a round lid over a disc whose flat rainbow sectors turn, a still highlight on top */
.ml-ring { fill: none; stroke: var(--line); stroke-width: 1.5; }
.ml-disc { fill: #D6D9DE; }
.ml-hue { opacity: .55; }
.ml-hue--1 { fill: #E8577A; } .ml-hue--2 { fill: #F2C14E; } .ml-hue--3 { fill: #3FB6C9; }
.ml-clamp { fill: var(--surface-2); stroke: var(--line); }
.ml-hole { stroke: none; }
.ml--cd .ml-hole { fill: var(--bg); }
.ml-shine { fill: #FFFFFF; opacity: .35; }
.ml-lcd { fill: #A9B79A; animation: ml-pulse 1.4s steps(2) infinite; }
/* the phonograph: a wooden box, a brown wax cylinder with grooves running past, a brass horn */
.ml-horn, .ml-brass { fill: #C9A04A; }
.ml-bell { fill: #A9822F; }
.ml-wood { fill: #7A4B2A; }
.ml-wood2 { fill: #5E3A20; }
.ml-cyl { fill: #A8723E; }
.ml-grooves { fill: none; stroke: #7E5328; stroke-width: 16; stroke-dasharray: 1.6 4.4; animation: ml-run .5s linear infinite; }
@keyframes ml-run { to { stroke-dashoffset: -6; } }
.ml-crank { stroke: #3A2414; stroke-width: 3; stroke-linecap: round; fill: #C9A04A; transform-box: view-box; transform-origin: 8px 86px; animation: ml-crank 1.6s linear infinite; }
@keyframes ml-crank { to { transform: rotate(360deg); } }
/* the home set: walnut, a glowing dial with its needle tuning, cloth and a knob turning, the magic eye */
.ml-cabinet { fill: #7A4B2A; }
.ml-dial { fill: #F3E6C2; }
.ml-ticks { stroke: #7A4B2A; stroke-width: 2; stroke-dasharray: 1 6; opacity: .7; }
.ml-needle rect { fill: #B3261E; }
.ml-needle { animation: ml-tune 2.4s var(--ease-io) infinite alternate; }
@keyframes ml-tune { to { transform: translateX(76px); } }
.ml-cloth { fill: #D9C394; }
.ml-bars { stroke: #BFA676; stroke-width: 2.5; }
.ml-knob { fill: #3A2414; }
.ml-knob-mark { fill: #E8D2A6; }
.ml-eye { fill: #3FD06A; animation: ml-pulse 1.8s ease-in-out infinite; }
/* the car: the road running under the windshield, the speedometer swinging, the display scrolling */
.ml-glass { fill: #9CC0D4; }
.ml-road { fill: #5A5F63; }
.ml-lane { stroke: #F4F1E6; stroke-width: 2; stroke-dasharray: 4 5; animation: ml-run .45s linear infinite reverse; }
.ml-dash { fill: #232323; }
.ml-gauge { fill: #111; stroke: #BDBDB8; stroke-width: 2.5; }
.ml-needle2 { stroke: #FF6A1A; stroke-width: 2.5; stroke-linecap: round; }
.ml-swing { transform-box: view-box; transform-origin: 30px 66px; animation: ml-swing 1.6s var(--ease-io) infinite alternate; }
@keyframes ml-swing { to { transform: rotate(130deg); } }
.ml-hub2 { fill: #BDBDB8; }
.ml-unit { fill: #121212; }
.ml-display { fill: #031614; }
.ml-scroll { stroke: #4FE3D0; stroke-width: 3; stroke-dasharray: 9 5; animation: ml-run2 1s linear infinite; }
@keyframes ml-run2 { to { stroke-dashoffset: -14; } }
.ml-keys { stroke: #3A3B3E; stroke-width: 4; stroke-linecap: round; }
:root[data-mode="dark"] .ml-glass { fill: #1C2733; }
@media (prefers-reduced-motion: reduce) { .ml *, .ml svg * { animation: none !important; } }
.side-b__play { display: flex; align-items: center; gap: var(--s3); width: 100%; padding: var(--s4); background: var(--accent); color: var(--on-accent); border-radius: var(--r-md); text-align: start; }
.side-b__play strong { flex: 1; font: inherit; font-size: 1.5rem; font-weight: 650; }
.side-b__play:disabled { opacity: .7; }
.side-b__disc { display: grid; place-items: center; width: 3rem; height: 3rem; border: 3px double currentColor; border-radius: 50%; }
.side-b__disc::after { content: ''; width: .9rem; height: .9rem; border: 4px solid currentColor; border-radius: 50%; }
.side-b summary { width: fit-content; padding-block: var(--s2); color: var(--text-2); cursor: pointer; font-size: .85rem; }
.side-b details p { margin: 0; }

.nav__brand { display: none; }

@media (min-width: 1000px) {
  body { --rail-width: clamp(200px, 17vw, 272px); }
  #main { margin-inline-start: var(--rail-width); padding: var(--s6) var(--s5); }
  #main .view { max-width: 1440px; }
  body.has-mini #main { padding-bottom: calc(var(--mini-h) + var(--s6) + var(--safe-b)); }

  .nav { inset: 0 auto 0 0; width: var(--rail-width); height: auto; overflow-y: auto;
    display: flex; flex-direction: column; gap: var(--s2); padding: var(--s6) var(--s4);
    background: var(--surface); border: 0; border-right: 1px solid var(--line); }
  .nav__brand { display: flex; gap: var(--s3); padding-inline: var(--s3); margin-bottom: var(--s6); }
  .nav__brand .brand__mark { width: 36px; height: 36px; }
  .nav__brand .brand__name { font-size: 26px; }
  .nav__item { flex-direction: row; justify-content: flex-start; gap: var(--s3); min-height: 48px;
    padding-inline: var(--s4); border-radius: var(--r-md); color: var(--text-2); font-size: 16px; }
  .nav__item:hover { background: var(--bg); }
  .nav__item.is-on { background: var(--bg); box-shadow: inset 3px 0 var(--accent); }
  .nav__needle { display: none; }

  .mini { left: var(--rail-width); right: 0; bottom: 0; height: calc(var(--mini-h) + var(--safe-b));
    border-radius: 0; padding: 0 var(--s6) var(--safe-b); gap: var(--s4); }
  .toast { left: calc(50% + var(--rail-width) / 2); bottom: var(--s5); }
  body.has-mini .toast { bottom: calc(var(--mini-h) + var(--s5) + var(--safe-b)); }
}
