/* Sala de escuta: a record shelf. The spines are the navigation; the color of the
   chosen spine becomes the room's light (--mood). Everything else stays quiet. */

:root {
  --night: #0E1525;
  --velvet: #161F33;
  --velvet-raised: #1D2740;
  --line: #2A3552;
  --hairline: rgb(238 231 215 / .07);  /* thin light rules between tracks */
  --linen: #EEE7D7;
  --smoke: #939CB0;
  --ink: #0E1525;
  --warn: #F2B37A;
  --error: #F08A7E;
  --mood: #D4A84B;
  --player-h: 92px;
  --gutter: clamp(16px, 3vw, 40px);
  --content: 1320px;
  /* Side margin that centers the content column on wide screens. */
  --inset: max(var(--gutter), calc((100% - var(--content)) / 2));
  /* The top bar is wider than the content: the whole menu has to fit on one line. */
  --nav-inset: max(var(--gutter), calc((100% - 1600px) / 2));
  color-scheme: dark;
}

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

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--night);
  color: var(--linen);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 16px;
  font-stretch: 100%;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; color: inherit; }
img { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--mood); outline-offset: 3px; }

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
svg .solid { fill: currentColor; stroke: none; }

/* ---------- Structure */

.room {
  display: grid;
  /* Column tied to the screen width: the navigation bar scrolls inside instead of widening the page. */
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100dvh - var(--player-h));
}

body.is-gated .room,
body.is-gated .player,
body.is-gated .console { display: none; }

/* ---------- Top bar: brand + navigation in sections */

.topbar {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 14px var(--nav-inset);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1.5rem;
  font-stretch: 62%;
  font-weight: 900;
  line-height: 1;
}
.brand-mark { width: 34px; height: 34px; border-radius: 50%; background: var(--velvet-raised); object-fit: cover; object-position: 50% 30%; }
a.brand { color: inherit; text-decoration: none; }

/* Language: two letters, the chosen one lit. */
.lang-switch { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; }
.lang-option {
  padding: 3px 9px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--smoke);
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
}
.lang-option:hover { color: var(--linen); }
.lang-option[aria-pressed="true"] { background: var(--linen); color: var(--ink); }

/* On medium screens the "Explore" group drops to the next line instead of disappearing. */
.shelf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  min-width: 0;
}

/* Many favorites wrap onto a second line instead of running into the account. */
.nav-group { display: flex; flex: 0 1 auto; flex-wrap: wrap; align-items: center; gap: 2px; min-width: 0; }

.account {
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  color: var(--smoke);
  font-size: .875rem;
  white-space: nowrap;
}
.account-name { color: var(--linen); font-weight: 600; }
.nav-group + .nav-group { padding-left: 18px; border-left: 1px solid var(--line); }
.nav-label { margin-right: 10px; color: var(--smoke); font-size: .8125rem; }
.nav-empty { padding: 0 6px; color: var(--smoke); font-size: .875rem; font-style: italic; }

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px 0 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--smoke);
  font-size: .875rem;
  font-stretch: 87.5%;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.nav-item:hover { background: var(--velvet); color: var(--linen); }
/* The chosen one lights up in its own color: the whole room changes light with it. */
.nav-item[aria-current] { background: var(--spine, var(--linen)); color: var(--ink); }
/* "+" at the end of the favorites: put a playlist on the bar. */
.nav-item.nav-add { justify-content: center; width: 34px; padding: 0; border: 1px dashed var(--line); font-size: 1.125rem; font-weight: 500; }
.nav-item.nav-add:hover { border-color: var(--smoke); }

.nav-mark {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--spine, transparent);
}
.nav-item.is-explore .nav-mark { box-shadow: inset 0 0 0 2px currentColor; }
.nav-item[aria-current] .nav-mark { background: var(--ink); }
.nav-mark i { display: none; width: 3px; height: 45%; background: var(--spine, var(--linen)); }
.nav-item[aria-current] .nav-mark i { background: var(--ink); }

/* Playing: the dot becomes an equalizer. */
.nav-item.is-playing .nav-mark,
.nav-item.is-paused .nav-mark { width: 13px; height: 12px; border-radius: 0; background: none; }
.nav-item.is-playing .nav-mark i,
.nav-item.is-paused .nav-mark i { display: block; }
.nav-item.is-playing .nav-mark i { animation: eq 1.1s ease-in-out infinite; }
.nav-item.is-playing .nav-mark i:nth-child(2) { animation-delay: -.45s; }
.nav-item.is-playing .nav-mark i:nth-child(3) { animation-delay: -.8s; }

@keyframes eq {
  0%, 100% { height: 30%; }
  50% { height: 100%; }
}

/* ---------- Stage */

.stage {
  overflow-y: auto;
  padding: 40px var(--inset) 72px;
  scrollbar-color: var(--line) transparent;
}

.sleeve {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  align-items: end;
  gap: 36px;
  max-width: var(--content);
}

.cover {
  width: 216px;
  aspect-ratio: 1;
  border-radius: 2px;
  object-fit: cover;
  background: var(--mood);
  box-shadow: 0 30px 60px -24px rgb(0 0 0 / .75);
}
.cover-empty {
  display: grid;
  place-items: center;
  color: var(--ink);
  font-size: 7rem;
  font-stretch: 62%;
  font-weight: 900;
}

.title {
  margin: 0 0 18px;
  font-size: clamp(3.25rem, 7.2vw, 6.75rem);
  font-stretch: 62%;
  font-weight: 850;
  line-height: .86;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.description {
  max-width: 58ch;
  margin: 0 0 6px;
  color: color-mix(in srgb, var(--linen) 86%, transparent);
}

.meta {
  margin: 0;
  color: var(--smoke);
  font-size: .875rem;
}
.meta.is-warning { color: var(--warn); }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 26px;
}

/* ---------- Buttons */

.play-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px 12px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--mood);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s;
}
.play-button:hover { transform: scale(1.03); }
.play-button:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.play-button svg { width: 18px; height: 18px; }
.play-button.is-small { padding: 9px 18px; font-size: .9375rem; }
.play-button.is-danger { background: var(--error); }

.ghost-button {
  padding: 11px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--linen);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.ghost-button:hover { border-color: var(--smoke); }
.ghost-button:disabled { opacity: .5; cursor: default; }
.ghost-button.is-small { padding: 6px 14px; font-size: .875rem; }

.text-button {
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--smoke);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
  cursor: pointer;
}
.text-button:hover { color: var(--linen); text-decoration-color: currentColor; }

/* ---------- Search to add */

.adder { max-width: 680px; margin-top: 36px; }

.adder-label {
  display: block;
  margin-bottom: 8px;
  color: var(--smoke);
  font-size: .875rem;
}

.adder-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--velvet);
}
.adder-input:focus-visible { outline: none; border-color: var(--mood); }

.results { margin: 8px 0 0; padding: 0; list-style: none; }

.result {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 7px 10px;
  border-radius: 6px;
}
.result:hover { background: var(--velvet); }

.results-empty { padding: 8px 10px; color: var(--smoke); font-size: .875rem; }

/* ---------- Tracks */

.tracks {
  max-width: var(--content);
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
}

.track-button {
  display: grid;
  grid-template-columns: 2rem 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 7px 12px;
  border: 0;
  border-radius: 6px;
  background: none;
  text-align: left;
  cursor: pointer;
}
.track-button:hover { background: var(--velvet); }

.track-index {
  color: var(--smoke);
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.track-button:hover .track-index { color: var(--mood); }

.track-art {
  width: 44px;
  height: 44px;
  border-radius: 2px;
  object-fit: cover;
  background: var(--velvet-raised);
}

.track-text { display: flex; flex-direction: column; min-width: 0; }
.track-title,
.track-sub { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.track-title { font-weight: 600; }
.track-sub { color: var(--smoke); font-size: .875rem; }

.track-time {
  color: var(--smoke);
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
}

.track.is-current .track-title,
.track.is-current .track-index { color: var(--mood); }

.tracks-empty { max-width: 52ch; padding: 24px 12px; color: var(--smoke); }

/* Hairlines between tracks, so a long list doesn't float loose. */
.tracks > li + li { border-top: 1px solid var(--hairline); }

/* ---------- Sensations, Discover and New releases */

.sleeve.is-plain {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 28px;
}

.moods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 6px 10px;
  max-width: var(--content);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Each sensation gets a little spine in its own color. */
.mood {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name bpm" "text text";
  gap: 2px 12px;
  width: 100%;
  height: 100%;
  padding: 14px 16px 14px 18px;
  border: 0;
  border-left: 4px solid var(--tone);
  border-radius: 0 6px 6px 0;
  background: none;
  color: var(--linen);
  text-align: left;
  cursor: pointer;
}
.mood:hover,
.mood[aria-pressed="true"] { background: var(--velvet); }
.mood[aria-pressed="true"] .mood-name { color: var(--tone); }
.mood:disabled { opacity: .45; cursor: not-allowed; }

.mood-name {
  grid-area: name;
  font-size: 1.75rem;
  font-stretch: 62%;
  font-weight: 800;
  line-height: 1.1;
}
.mood-bpm {
  grid-area: bpm;
  align-self: center;
  color: var(--smoke);
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mood-text { grid-area: text; color: var(--smoke); font-size: .875rem; }

/* Screen head: title on the left, the mascot's scene on the right. */
.view-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
  max-width: var(--content);
}
/* The mascot is a cut-out: it stands on the page, with a shadow under it instead of a frame. */
.view-art {
  width: 170px;
  height: 170px;
  object-fit: contain;
  object-position: 50% 100%;
  filter: drop-shadow(0 18px 22px rgb(0 0 0 / .55));
}
.sense-main .view-art { width: 124px; height: 124px; }

/* Discover, New releases and Sensations filters. */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 18px;
  max-width: var(--content);
  padding: 18px 20px;
  border-radius: 8px;
  background: var(--velvet);
}
.filter { display: flex; flex-direction: column; gap: 6px; }
.filter-label { color: var(--smoke); font-size: .8125rem; }
.filter-control {
  min-width: 150px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--night);
  color: var(--linen);
}
.filter-control:focus-visible { outline: none; border-color: var(--mood); }
.filter-genre { min-width: 240px; }
.filter-hint { flex-basis: 100%; margin: 0; color: var(--smoke); font-size: .8125rem; }

/* Free field: the written feeling is the main element on the screen. */
.feeling { max-width: 760px; }
.feeling-label { display: block; margin-bottom: 4px; color: var(--smoke); font-size: .875rem; }
.feeling-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; }
.feeling-input {
  flex: 1 1 320px;
  min-width: 0;
  padding: 4px 0 8px;
  border: 0;
  border-bottom: 2px solid var(--line);
  background: transparent;
  color: var(--linen);
  font-size: 3rem;
  font-stretch: 62%;
  font-weight: 850;
  line-height: 1.1;
}
.feeling-input::placeholder { color: color-mix(in srgb, var(--smoke) 55%, transparent); }
.feeling-input:focus-visible { outline: none; border-bottom-color: var(--mood); }
.feeling-hint { margin: 10px 0 0; color: var(--smoke); font-size: .8125rem; }
.moods-label { margin: 0 0 12px; color: var(--smoke); font-size: .875rem; }

.sense-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 44px; }
.sense-main { display: grid; align-content: start; gap: 32px; }
/* Wide screen: two columns, so the right side isn't empty. */
@media (min-width: 1100px) {
  .sense-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
  .sense-moods { padding-top: 14px; }
}

/* Roulette card: text on the left, the crate digger on the right. */
.path.path-roulette { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto 1fr; gap: 10px 24px; align-items: start; }
.path-roulette > :not(.digger-wrap) { grid-column: 1; }
.path-roulette .play-button { justify-self: start; }

/* Crate digger: the mascot with a magnifying glass going through a crate; the pile beside him grows with each find. */
.digger-wrap { grid-column: 2; grid-row: 1 / span 3; text-align: center; }
.digger { display: block; width: 270px; height: auto; fill: none; stroke: none; overflow: visible; }
.digger-count { min-height: 1.2em; margin: 4px 0 0; color: var(--smoke); font-size: .8125rem; font-variant-numeric: tabular-nums; }

.digger .arm-dig,
.digger .arm-glass,
.digger .head,
.digger .crate-record { transform-box: view-box; }
.digger .arm-dig { transform-origin: 70px 78px; }
.digger .arm-glass { transform-origin: 66px 76px; }
.digger .head { transform-origin: 69px 58px; }
.digger .arm-cheer { display: none; }

.digger.is-digging .arm-dig { animation: dig .45s ease-in-out infinite alternate; }
.digger.is-digging .arm-glass { animation: scan 1.6s ease-in-out infinite alternate; }
.digger.is-digging .head { animation: bob 1.1s ease-in-out infinite; }
.digger.is-digging .crate-record { animation: riffle .9s ease-in-out infinite; }
.digger.is-digging .crate-record:nth-child(2) { animation-delay: -.13s; }
.digger.is-digging .crate-record:nth-child(3) { animation-delay: -.26s; }
.digger.is-digging .crate-record:nth-child(4) { animation-delay: -.39s; }
.digger.is-digging .crate-record:nth-child(5) { animation-delay: -.52s; }
.digger.is-digging .crate-record:nth-child(6) { animation-delay: -.65s; }
.digger.is-digging .crate-record:nth-child(7) { animation-delay: -.78s; }

.digger.is-done .arm-dig { display: none; }
.digger.is-done .arm-cheer { display: inline; animation: cheer .6s cubic-bezier(.3, 1.6, .5, 1); transform-box: view-box; transform-origin: 70px 78px; }

.pile-slot { fill: transparent; stroke: var(--line); stroke-width: .8; transition: fill .3s; }
.pile-slot.is-filled { stroke: var(--night); }
.pile-slot.is-new { animation: drop .5s cubic-bezier(.3, 1.4, .5, 1); transform-box: fill-box; }

@keyframes dig { from { transform: rotate(-14deg); } to { transform: rotate(10deg); } }
@keyframes scan { from { transform: translateX(-6px) rotate(-3deg); } to { transform: translateX(8px) rotate(3deg); } }
@keyframes bob { 50% { transform: translateY(2px); } }
@keyframes riffle { 50% { transform: translateY(-7px); } }
@keyframes cheer { from { transform: rotate(40deg); } }
@keyframes drop { from { transform: translateY(-46px); opacity: 0; } }

.paths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  max-width: var(--content);
}

.path {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 22px 24px 24px 24px;
  border-left: 4px solid var(--tone);
  border-radius: 0 8px 8px 0;
  background: var(--velvet);
}
.path-name {
  margin: 0;
  color: var(--tone);
  font-size: 2.625rem;
  font-stretch: 62%;
  font-weight: 850;
  line-height: 1;
}
.path-text { max-width: 46ch; margin: 0 0 6px; color: color-mix(in srgb, var(--linen) 86%, transparent); }
.path .adder-label { margin: 4px 0 -4px; }
.path .adder-input { max-width: 420px; background: var(--night); }
.path .play-button { --mood: var(--tone); margin-top: 6px; }

.hunt { max-width: var(--content); margin-top: 52px; }
.hunt:not([hidden]) + .tracks { margin-top: 20px; }

.hunt-title {
  margin: 0 0 6px;
  color: var(--mood);
  font-size: 3rem;
  font-stretch: 62%;
  font-weight: 850;
  line-height: .95;
}
.hunt .actions { margin-top: 18px; }

.progress {
  max-width: 420px;
  height: 3px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--line);
}
.progress i { display: block; height: 100%; background: var(--mood); transition: width .4s; }

.find {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
}
.find .track-button { grid-template-columns: 2rem 44px minmax(0, 1fr) auto auto; }

/* Details ("why this song?") only when the person asks. */
.find-details {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  grid-column: 1 / -1;
  /* aligned with the title: number + cover + the row's gaps */
  padding: 0 12px 10px calc(12px + 2rem + 16px + 44px + 16px);
  color: var(--smoke);
  font-size: .8125rem;
}
.find-details .text-button { font-size: .8125rem; }

.blocked-list { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.blocked-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .875rem;
}

.info-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--smoke);
  cursor: pointer;
}
.info-button:hover,
.info-button[aria-expanded="true"] { color: var(--linen); background: var(--velvet); }
.info-button svg { width: 18px; height: 18px; }

/* A song that just fell out of the roulette. */
.find.is-new { animation: land .45s cubic-bezier(.2, .9, .3, 1.25); }
@keyframes land { from { opacity: 0; transform: translateY(-14px) scale(.98); } }

.bpm { color: var(--smoke); font-size: .75rem; white-space: nowrap; }
.bpm b { color: var(--linen); font-size: .9375rem; font-variant-numeric: tabular-nums; }

.add-button {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--smoke);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
}
.add-button:hover { border-color: var(--smoke); color: var(--linen); }
.add-button.is-added { border-color: color-mix(in srgb, var(--mood) 45%, transparent); color: var(--mood); }

.chain { padding: 26px 12px 6px; }
.chain-path {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 0;
  margin: 0 0 2px;
  padding: 0;
  list-style: none;
  font-size: 1.125rem;
  font-stretch: 75%;
  font-weight: 700;
}
.chain-path li + li::before {
  content: "→";
  margin: 0 10px;
  color: var(--smoke);
  font-weight: 400;
}
.chain-path li:last-child { color: var(--mood); }

/* ---------- Player */

.player {
  position: fixed;
  inset: auto 0 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  height: var(--player-h);
  padding: 0 24px;
  border-top: 1px solid var(--line);
  background: var(--velvet);
}

.now { display: flex; align-items: center; gap: 14px; min-width: 0; }
.now-art { width: 56px; height: 56px; border-radius: 2px; object-fit: cover; }
.now-text { min-width: 0; }
.now-title,
.now-sub { margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.now-title { font-weight: 600; }
.now-sub { color: var(--smoke); font-size: .875rem; }

.transport { display: flex; flex-direction: column; align-items: center; gap: 4px; }
/* Play sits in the middle column and the two sides always get the same width,
   so it stays centered over the timeline: shuffle + previous | play | next + repeat. */
.controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; }
.controls-side { display: flex; align-items: center; gap: 18px; }
.controls-side.is-left { justify-self: end; }
.controls-side.is-right { justify-self: start; }

.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--smoke);
  cursor: pointer;
}
.icon-button:hover { color: var(--linen); }
.icon-button[aria-pressed="true"] { color: var(--mood); }
/* Repeating one track: a small 1 on the icon, as in Spotify. */
#btn-repeat { position: relative; }
#btn-repeat[data-mode="track"]::after {
  content: "1";
  position: absolute;
  top: 5px;
  right: 3px;
  display: grid;
  place-items: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--mood);
  color: var(--ink);
  font-size: .5625rem;
  font-weight: 800;
}

.round-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--linen);
  color: var(--ink);
  cursor: pointer;
  transition: transform .15s;
}
.round-button:hover { transform: scale(1.06); }
.icon-pause { display: none; }
.player[data-state="playing"] .icon-pause { display: block; }
.player[data-state="playing"] .icon-play { display: none; }

.timeline {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) 3rem;
  align-items: center;
  gap: 10px;
  width: min(100%, 560px);
}
.player[data-state="idle"] .timeline { opacity: .35; }

.time {
  color: var(--smoke);
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}
.time:first-child { text-align: right; }

.output {
  display: grid;
  grid-template-columns: 20px minmax(80px, 140px);
  align-items: center;
  justify-content: end;
  column-gap: 10px;
}
.volume-icon { color: var(--smoke); }

.device {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--smoke);
  font-size: .75rem;
  text-align: right;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.player-auth { display: none; }
.player[data-state="auth"] > :not(.player-auth) { display: none; }
.player[data-state="auth"] .player-auth {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.player-auth p { margin: 0; color: var(--smoke); }

/* ---------- Progress and volume bars */

.range {
  --fill: 0%;
  width: 100%;
  height: 18px;
  margin: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.range:disabled { opacity: .4; cursor: default; }
.range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--mood) var(--fill), var(--line) var(--fill));
}
.range::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--linen);
  opacity: 0;
  -webkit-appearance: none;
  transition: opacity .15s;
}
.range:hover::-webkit-slider-thumb,
.range:focus-visible::-webkit-slider-thumb { opacity: 1; }
.range::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line); }
.range::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--mood); }
.range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--linen); }

/* ---------- Update console */

.console {
  position: fixed;
  right: 24px;
  bottom: calc(var(--player-h) + 16px);
  display: flex;
  flex-direction: column;
  width: min(560px, calc(100vw - 48px));
  max-height: min(52vh, 480px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--velvet-raised);
  box-shadow: 0 24px 60px -20px rgb(0 0 0 / .75);
  animation: rise .28s cubic-bezier(.2, .7, .2, 1);
}

.console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.console-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}
.console-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mood);
}
.console[data-status="running"] .console-title::before { animation: pulse 1s ease-in-out infinite; }
.console[data-status="error"] .console-title::before { background: var(--error); }

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

.console-lines {
  overflow-y: auto;
  padding: 12px 18px 16px;
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.55;
}
.line { margin: 0; }
.line.is-heading { margin-top: 10px; font-weight: 700; }
.line.is-item { padding-left: 1.25rem; color: var(--smoke); }
.line.is-warning { padding-left: 1.25rem; color: var(--warn); }

/* ---------- Home: hello, the moment, what's playing, favorites, shortcuts, recent finds */

.home { display: grid; gap: 44px; max-width: var(--content); }
.home-title { margin: 0; }
.home-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 1000px) {
  .home-top { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
}
.home-label { margin: 0 0 6px; color: var(--smoke); font-size: .8125rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin: 0 0 16px; }
.section-title { margin: 0; font-size: 1.75rem; font-stretch: 62%; font-weight: 800; line-height: 1; }

/* The moment: a sensation's own spine and light. */
.moment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 22px 26px 24px 26px;
  border-left: 4px solid var(--tone);
  border-radius: 0 8px 8px 0;
  background: var(--velvet);
}
.moment-name { margin: 0; color: var(--tone); font-size: 2.75rem; font-stretch: 62%; font-weight: 850; line-height: 1; }
.moment-text { max-width: 52ch; margin: 8px 0 0; color: color-mix(in srgb, var(--linen) 86%, transparent); }
.moment .actions { margin-top: 18px; }
.moment .play-button { --mood: var(--tone); }
.moment-art { width: 150px; height: 140px; object-fit: contain; filter: drop-shadow(0 14px 18px rgb(0 0 0 / .5)); }

.now-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 20px;
  border-radius: 8px;
  background: var(--velvet);
}
.now-card.is-empty { grid-template-columns: minmax(0, 1fr); }
.now-card-art { width: 112px; height: 112px; border-radius: 4px; object-fit: cover; background: var(--line); }
.now-card-text { min-width: 0; }
.now-card-title {
  margin: 0 0 2px;
  overflow: hidden;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.now-card .ghost-button { margin-top: 12px; }

/* Favorites: covers on spines, like the bar. */
.fav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fav-card { position: relative; }
.fav-card-open {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px 12px 11px;
  border: 0;
  border-bottom: 3px solid var(--spine);
  border-radius: 8px 8px 0 0;
  background: var(--velvet);
  color: var(--linen);
  text-align: left;
  cursor: pointer;
}
.fav-card-open:hover { background: var(--velvet-raised); }
.fav-card-art { width: 100%; aspect-ratio: 1; margin-bottom: 8px; border-radius: 4px; object-fit: cover; }
.fav-card-art.is-empty { display: grid; place-items: center; background: var(--spine); color: var(--ink); font-size: 4rem; font-stretch: 62%; font-weight: 900; }
.fav-card-name { overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.fav-card-meta { color: var(--smoke); font-size: .8125rem; }
.fav-card-play {
  position: absolute;
  top: 22px;
  right: 22px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--spine);
  color: var(--ink);
  box-shadow: 0 10px 24px -8px rgb(0 0 0 / .7);
  cursor: pointer;
}
.fav-card-play svg { width: 20px; height: 20px; }

.home-hidden { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 16px 0 0; color: var(--smoke); font-size: .875rem; }
.toast-action { padding: 0; border: 0; background: none; cursor: pointer; text-decoration: underline; }
.home-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; max-width: 760px; }
.home-empty p { max-width: 52ch; margin: 0 0 12px; color: color-mix(in srgb, var(--linen) 86%, transparent); }
.home-empty-art { width: 90px; height: 150px; object-fit: contain; filter: drop-shadow(0 14px 18px rgb(0 0 0 / .5)); }

.shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.shortcut {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 18px 20px 20px 20px;
  border-left: 4px solid var(--tone);
  border-radius: 0 8px 8px 0;
  background: var(--velvet);
}
.shortcut-name { margin: 0; color: var(--tone); font-size: 1.75rem; font-stretch: 62%; font-weight: 850; line-height: 1; }
.shortcut-text { margin: 0 0 8px; color: var(--smoke); }

.recent-list { margin-top: 0; }
.recent-list .track-button { grid-template-columns: 2rem 44px minmax(0, 1fr) auto auto; }
.recent-where { overflow: hidden; max-width: 22ch; color: var(--smoke); font-size: .8125rem; text-overflow: ellipsis; white-space: nowrap; }

/* Friends: affinity cards and matches. */
.friends-join { max-width: 680px; padding: 22px 26px; border-left: 4px solid var(--mood); border-radius: 0 8px 8px 0; background: var(--velvet); }
.friends-join p { margin: 0 0 16px; color: color-mix(in srgb, var(--linen) 88%, transparent); }
.friend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.friend-card { padding: 18px 20px; border-radius: 8px; background: var(--velvet); }
.friend-card .meta + .meta { margin-top: 4px; }
.friend-name { margin: 0; font-weight: 700; }
.friend-percent { margin: 2px 0 8px; color: var(--mood); font-size: 3.25rem; font-stretch: 62%; font-weight: 850; line-height: 1; }
.friend-percent small { margin-left: 8px; color: var(--smoke); font-size: .8125rem; font-stretch: 100%; font-weight: 400; }
.friend-percent.is-empty { color: var(--smoke); }
.friends-hint { max-width: 68ch; margin-top: 14px; }
.feed .track-button { grid-template-columns: 44px minmax(0, 1fr); }
.feed-text { white-space: normal; }
.friends-me { margin-top: 36px; }
.tracks.feed { margin-top: 0; }
.friends-access { max-width: 680px; }

/* Reviews: half-star ratings, a few words, private or open to the room. */
.review-start { max-width: 680px; }
.review-link { display: grid; gap: 8px; }
.review-link-row { display: flex; gap: 10px; }
.review-link-row .filter-control { flex: 1; min-width: 0; }
.field-label { color: var(--linen); font-size: .9375rem; font-weight: 600; }
.stars { position: relative; display: inline-block; color: var(--line); font-size: 1rem; letter-spacing: 2px; line-height: 1; white-space: nowrap; }
.stars-fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--mood); }
.stars.is-large { font-size: 2.25rem; letter-spacing: 4px; }
.stars.is-input { cursor: pointer; }
.stars-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.stars.is-input:has(.stars-range:focus-visible) { outline: 2px solid var(--mood); outline-offset: 6px; border-radius: 4px; }
.stars-input { display: inline-flex; align-items: center; gap: 14px; }
.stars-value { color: var(--smoke); font-variant-numeric: tabular-nums; }
.review-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.review-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 18px; padding: 18px 0; }
.review-card + .review-card { border-top: 1px solid var(--hairline); }
.review-card.is-compact { grid-template-columns: minmax(0, 1fr); padding: 14px 0; }
.review-cover { width: 72px; height: 72px; padding: 0; overflow: hidden; border: 0; border-radius: 4px; background: var(--velvet-raised); cursor: pointer; }
.review-cover img { width: 100%; height: 100%; object-fit: cover; }
.review-body { display: grid; gap: 6px; max-width: 72ch; }
.review-body p { margin: 0; }
.review-album { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.review-album-name { padding: 0; border: 0; background: none; color: var(--linen); font: inherit; font-size: 1.0625rem; font-weight: 700; text-align: left; cursor: pointer; }
.review-album-name:hover { text-decoration: underline; text-underline-offset: 4px; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.review-private { padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--smoke); font-size: .75rem; }
.review-text { color: color-mix(in srgb, var(--linen) 90%, transparent); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.release { grid-template-columns: minmax(0, 1fr) auto auto; }
.release-review { width: 32px; height: 32px; }
.release-review svg, #btn-review svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.review-sheet {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--velvet);
  color: var(--linen);
  box-shadow: 0 40px 80px -30px rgb(0 0 0 / .9);
}
.review-sheet::backdrop { background: rgb(6 9 16 / .74); }
.review-inner { display: grid; gap: 26px; padding: 28px 32px 30px; }
.review-sheet-head { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 20px; align-items: start; }
.review-sheet-cover { width: 112px; height: 112px; border-radius: 6px; background: var(--velvet-raised); object-fit: cover; }
.review-sheet-text { display: grid; gap: 4px; justify-items: start; }
.review-sheet-text p { margin: 0; }
.review-title { margin: 0; font-size: 2.25rem; font-stretch: 62%; font-weight: 850; line-height: 1; text-wrap: balance; }
.review-close { font-size: 1.5rem; line-height: 1; }
.review-form { display: grid; gap: 20px; }
.review-field { display: grid; gap: 10px; justify-items: start; }
.review-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--night);
  color: var(--linen);
  font: inherit;
  line-height: 1.55;
  resize: vertical;
}
.review-textarea:focus-visible { outline: none; border-color: var(--mood); }
.review-visibility { display: flex; flex-wrap: wrap; gap: 8px; }
.review-visibility-hint { margin: 0; }
.review-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.review-room { padding-top: 22px; border-top: 1px solid var(--hairline); }
.review-room-title { margin: 0 0 10px; font-size: 1.375rem; font-stretch: 62%; font-weight: 800; }
.review-average { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; color: var(--smoke); }
.access-list { display: grid; gap: 8px; margin: 14px 0; padding: 0; list-style: none; }
.access-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px; border-radius: 8px; background: var(--velvet); }
.access-new { display: inline-flex; align-items: center; gap: 8px; color: var(--linen); font-size: .9375rem; cursor: pointer; }
.access-new input { width: 18px; height: 18px; accent-color: var(--mood); }

/* Artists: photo, who's in it, and the releases. */
.artist-head { display: flex; align-items: center; gap: 22px; }
.artist-photo { flex: none; width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.who-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.who-chip {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--smoke);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
}
.who-chip:hover { border-color: var(--smoke); color: var(--linen); }
.who-chip[aria-pressed="true"] { border-color: transparent; background: var(--linen); color: var(--ink); }
.who-chip small { margin-left: 6px; font-weight: 400; opacity: .75; }
.artist-filters { margin-top: 18px; }
.candidates-row { list-style: none; }
.candidates { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.candidate {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 18px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--velvet);
  color: var(--linen);
  text-align: center;
  cursor: pointer;
}
.candidate:hover { border-color: var(--smoke); background: var(--velvet-raised); }
.candidate-photo { width: 96px; height: 96px; margin-bottom: 8px; border-radius: 50%; object-fit: cover; }
.candidate-photo.is-empty { display: grid; place-items: center; background: var(--line); font-size: 2.5rem; font-stretch: 62%; font-weight: 900; }
.candidate-name { font-weight: 700; }
.candidate-meta { color: var(--smoke); font-size: .8125rem; }
.release { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.release-type {
  display: inline-block;
  margin-right: 8px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .75rem;
}
.release-date { color: var(--smoke); font-size: .875rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.release-open { font-size: .875rem; }

/* A favorite's page: how often it updates. */
.every-control { display: inline-flex; align-items: center; gap: 8px; color: var(--smoke); font-size: .875rem; }
.every-select { min-width: 0; padding: 7px 10px; }

/* ---------- Where the songs go: a small panel next to the button (a bottom sheet on phones) */

.picker {
  position: fixed;
  z-index: 15;
  display: flex;
  flex-direction: column;
  width: 340px;
  max-height: min(460px, 70vh);
  padding: 14px 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--velvet-raised);
  box-shadow: 0 24px 60px -20px rgb(0 0 0 / .85);
  animation: rise .16s cubic-bezier(.2, .7, .2, 1);
}
.picker.is-busy { cursor: progress; }
.picker.is-busy .picker-list { opacity: .6; }

.picker-head { position: relative; padding: 0 52px 10px 16px; }
.picker-title { margin: 0; font-size: 1.375rem; font-stretch: 62%; font-weight: 800; line-height: 1.1; }
.picker-sub { margin: 2px 0 0; overflow: hidden; color: var(--smoke); font-size: .8125rem; white-space: nowrap; text-overflow: ellipsis; }
.picker-close {
  position: absolute;
  top: -4px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--smoke);
  cursor: pointer;
}
.picker-close:hover { background: var(--velvet); color: var(--linen); }
.picker-close svg,
.tour-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.picker-list { flex: 1; min-height: 0; margin: 0; padding: 0 6px; overflow-y: auto; list-style: none; scrollbar-color: var(--line) transparent; }
.picker-option {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--linen);
  text-align: left;
  cursor: pointer;
}
.picker-option:hover,
.picker-option:focus-visible { background: var(--velvet); outline: none; }
.picker-option:disabled { cursor: progress; }
.picker-art { width: 38px; height: 38px; border-radius: 4px; object-fit: cover; }
.picker-art.is-round { border-radius: 50%; background: var(--velvet-raised); object-position: 50% 30%; }
.picker-art.is-empty { display: grid; place-items: center; background: var(--line); font-stretch: 62%; font-weight: 900; }
.picker-option-text { display: grid; min-width: 0; }
.picker-option-name,
.picker-option-sub { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.picker-option-name { font-weight: 600; }
.picker-option-sub { color: var(--smoke); font-size: .8125rem; }
.picker-note { padding: 10px 12px; color: var(--smoke); font-size: .875rem; }
.picker-note.is-error { color: var(--error); }

.picker-new {
  margin: 6px 12px 0;
  padding: 12px 4px 4px;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--linen);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.picker-new:hover { color: var(--mood); }

.picker-form { display: grid; gap: 10px; padding: 2px 16px 6px; }
.picker-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--night);
}
.picker-input:focus-visible { outline: none; border-color: var(--mood); }
.picker-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 4px; }
.picker-conflict { margin: 0; }
.picker-hint { margin: -4px 0 0; color: var(--smoke); font-size: .8125rem; }

/* ---------- How it works: one step at a time, with the mascot's scene beside it */

.tour {
  width: min(800px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: var(--velvet);
  color: var(--linen);
  box-shadow: 0 40px 80px -30px rgb(0 0 0 / .9);
}
.tour[open] { display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.tour::backdrop { background: rgb(6 9 16 / .74); }
.tour-art {
  width: 100%;
  height: 100%;
  min-height: 380px;
  padding: 36px 28px 28px;
  background: var(--night);
  object-fit: contain;
  filter: drop-shadow(0 20px 24px rgb(0 0 0 / .5));
  animation: tour-in .35s ease;
}
@keyframes tour-in { from { opacity: 0; } }
.tour-body { display: flex; flex-direction: column; gap: 12px; padding: 40px 40px 30px; }
.tour-step { margin: 0; color: var(--smoke); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.tour-title { margin: 0; font-size: 3rem; font-stretch: 62%; font-weight: 850; line-height: .95; text-wrap: balance; }
.tour-text { max-width: 44ch; margin: 0; color: color-mix(in srgb, var(--linen) 88%, transparent); font-size: 1.0625rem; line-height: 1.55; }
.tour-dots { display: flex; gap: 6px; margin: auto 0 0; padding: 18px 0 0; list-style: none; }
.tour-dots li { width: 22px; height: 4px; border-radius: 2px; background: var(--line); }
.tour-dots li.is-current { background: var(--linen); }
.tour-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.tour-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(14 21 37 / .55);
  color: var(--linen);
  cursor: pointer;
}
.tour-close:hover { background: var(--night); }

/* ---------- Notices */

.toasts {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  max-width: 380px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--linen);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 16px 40px -16px rgb(0 0 0 / .8);
  animation: rise .25s cubic-bezier(.2, .7, .2, 1);
}
.toast.is-error { background: var(--error); }
.toast.has-action { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; pointer-events: auto; }
.toast-action { color: var(--ink); font-weight: 800; text-underline-offset: 3px; }

/* The heart beside the song playing: outlined, filled once it's liked. */
.like-button { flex: none; }
.like-button[aria-pressed="true"] svg { fill: currentColor; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Sign-in screen */

.gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 10vw;
  background: var(--night);
}

/* Sign-in screen: text on the left, the mascot on the couch on the right. */
.gate.has-art {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
  align-items: center;
  gap: 6vw;
}
.gate-art { width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgb(0 0 0 / .6)); }
.pause-notice { display: flex; align-items: center; gap: 12px; }
.notice-art { flex: none; width: 44px; height: 48px; object-fit: contain; }
.gate-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }

.gate-title {
  margin: 0 0 18px;
  font-size: clamp(4rem, 12vw, 10rem);
  font-stretch: 62%;
  font-weight: 850;
  line-height: .85;
}

.gate-text {
  max-width: 44ch;
  margin: 0 0 30px;
  color: var(--smoke);
  font-size: 1.125rem;
}

/* ---------- Narrow screens */

@media (max-width: 760px) {
  :root { --player-h: 132px; }

  /* The whole page scrolls (the top bar leaves as you go down); only the player stays fixed. */
  .room { height: auto; }
  .stage { overflow: visible; padding-top: 24px; padding-bottom: calc(var(--player-h) + 40px); }

  /* Menu on two lines: playlists swipe sideways, Explore is always in view. */
  .topbar { flex-wrap: wrap; row-gap: 8px; padding-top: 8px; padding-bottom: 10px; }
  /* First line: the mascot on the left, the account on the right. */
  .brand { order: -2; }
  .brand-mark { width: 30px; height: 30px; }
  .account { order: -1; flex: 1; justify-content: flex-end; gap: 10px; font-size: .8125rem; }
  /* min-width: 0 lets each line scroll inside instead of widening the page (and hiding the player). */
  .topbar { min-width: 0; }
  .shelf { flex-direction: column; align-items: stretch; gap: 6px; width: 100%; min-width: 0; }
  .nav-group { flex-wrap: nowrap; min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .nav-group + .nav-group { padding-left: 0; border-left: 0; }
  .nav-label { flex: none; min-width: 60px; margin-right: 4px; }
  .nav-item { padding: 0 9px 0 8px; }
  .sleeve { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .cover { width: 148px; }

  .track-button { grid-template-columns: 1.5rem 40px minmax(0, 1fr) auto; gap: 12px; padding: 7px 4px; }
  .find .track-button { grid-template-columns: 1.5rem 40px minmax(0, 1fr) auto; }
  .find .track-time { display: none; }
  .find-details { padding-left: 8px; }
  .hunt-title { font-size: 2.25rem; }
  .view-head { gap: 16px; }
  .view-art,
  .sense-main .view-art { width: 96px; height: 96px; }
  .add-button { padding: 6px 10px; }
  .moment-name { font-size: 2.25rem; }
  .moment-art { display: none; }
  .now-card { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 14px; }
  .now-card-art { width: 72px; height: 72px; }
  .fav-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .fav-card-play { top: 18px; right: 18px; width: 38px; height: 38px; }
  .recent-list .track-button { grid-template-columns: 1.5rem 40px minmax(0, 1fr) auto; }
  .recent-where { display: none; }
  .artist-photo { width: 64px; height: 64px; }
  .release-open { display: none; }
  .review-inner { padding: 22px 18px 24px; }
  .review-sheet-head { grid-template-columns: 76px minmax(0, 1fr) auto; gap: 14px; }
  .review-sheet-cover { width: 76px; height: 76px; }
  .review-title { font-size: 1.75rem; }
  .review-card { grid-template-columns: 56px minmax(0, 1fr); gap: 14px; }
  .review-cover { width: 56px; height: 56px; }
  .feed .track-button { grid-template-columns: 40px minmax(0, 1fr); }

  .picker.is-sheet {
    inset: auto 0 0 0;
    z-index: 30;
    width: auto;
    max-height: 78dvh;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
  }

  .tour[open] { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .tour-art { height: 210px; min-height: 0; padding: 18px; }
  .tour-body { padding: 22px 22px 20px; }
  .tour-title { font-size: 2.25rem; }
  .tour-text { font-size: 1rem; }

  .gate.has-art { grid-template-columns: minmax(0, 1fr); align-content: center; gap: 28px; padding: 6vh 7vw; }
  .gate-art { order: -1; width: min(280px, 70vw); }
  .feeling-input { font-size: 2.25rem; }
  .path.path-roulette { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .digger-wrap { grid-column: 1; grid-row: auto; justify-self: center; }
  .digger { width: 220px; }

  .player {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "now controls" "timeline timeline";
    gap: 6px 12px;
    padding: 12px 16px;
  }
  .now { grid-area: now; }
  .transport { display: contents; }
  .controls { display: flex; grid-area: controls; gap: 6px; }
  .controls-side { display: contents; }
  .timeline { grid-area: timeline; width: 100%; }
  .output { display: none; }
  .player[data-state="auth"] .player-auth { flex-direction: column; gap: 10px; text-align: center; }
}

/* Below this the whole menu doesn't fit beside the name on one line: only the mascot stays. */
@media (max-width: 1399px) {
  .brand-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
