@font-face { font-family: "Onest"; src: url("../fonts/Onest.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url("../fonts/Unbounded.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }

/* Minimal bento: black page, flat rounded tiles, one accent (soun pink), white tiles for contrast.
   No glows, no blurred lights; gradients are not used. */
:root {
  --bg: #0B0B0C;
  --tile: #161618;
  --tile-2: #202023;
  --tile-3: #2B2B2F;
  --white: #F3F1F2;
  --text: #F3F1F2;
  --muted: #8E8B92;
  --faint: #5B585F;
  --pink: #FF4FA0;
  --on-pink: #19050E;
  --ink: #0B0B0C;
  --r: 28px;
  --ui: "Onest", system-ui, sans-serif;
  --display: "Unbounded", "Onest", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.3, 1.45, .5, 1);
  --bar-h: 96px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.45 var(--ui);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
img, canvas, svg { display: block; }
p, h1, h2, h3, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
svg.hand { width: 30px; height: 30px; fill: currentColor; flex: none; }
.icon-btn svg.hand { width: 25px; height: 25px; }
.like svg.hand { width: 28px; height: 28px; }
.pbtn svg.hand { width: 24px; height: 24px; }
.pbtn.lg svg.hand { width: 30px; height: 30px; }
.pbtn.sm svg.hand { width: 20px; height: 20px; }
.controls .pbtn svg.hand { width: 22px; height: 22px; }
.row .n > svg.hand { width: 16px; height: 16px; display: none; color: var(--text); }
.row:hover .n > svg.hand { display: block; }
.row.playing .n > svg.hand { display: none; }
.suggest li.sg-track > svg.hand { width: 18px; height: 18px; opacity: 0; color: var(--pink); }
.suggest li.sg-track:hover > svg.hand, .suggest li.sg-track[aria-selected="true"] > svg.hand { opacity: 1; }
svg.brand { width: 100%; height: 100%; fill: currentColor; }
svg.ph { width: 100%; height: 100%; }
.label { font: 600 13px/1 var(--ui); color: var(--muted); }

/* ---------- layout ---------- */
/* The now-playing tile and the player bar exist only while something is loaded. Their grid tracks
   open from zero, and since the tiles keep their size they slide in from the right and from below. */
.app {
  --now-space: 330px;
  --bar-space: calc(var(--bar-h) + 10px);
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) var(--now-space);
  grid-template-rows: minmax(0, 1fr) var(--bar-space);
  grid-template-areas: "rail view now" "rail bar bar";
  padding: 10px;
  height: 100vh;
  transition: grid-template-columns 620ms var(--ease), grid-template-rows 620ms var(--ease);
}
.app.idle { --now-space: 0px; --bar-space: 0px; }
.app.idle .now, .app.idle .bar { opacity: 0; }
.app.idle .toast { bottom: 28px; }
.view { grid-area: view; min-height: 0; margin-left: 10px; overflow: auto; padding: 4px 4px 40px; scrollbar-width: none; }
.content { view-transition-name: view; }
.view::-webkit-scrollbar { display: none; }
.now { grid-area: now; min-height: 0; width: 320px; margin-left: 10px; justify-self: start; }
.bar { grid-area: bar; height: var(--bar-h); margin: 10px 0 0 10px; align-self: start; }
.now, .bar { transition: opacity 420ms ease, background-color 800ms ease; }
.rail, .view { animation: rise 520ms var(--ease) both; }
.view { animation-delay: 60ms; }

/* ---------- rail: icons only, drawn with the brush of the soun mark ---------- */
.rail {
  grid-area: rail; position: relative; z-index: 6; display: flex; flex-direction: column; align-items: center; gap: 20px;
  padding: 18px 0; background: var(--tile); border-radius: 42px;
}
.rail-logo .mark {                                  /* the mark alone, no tile behind it */
  display: block; width: 64px; height: 64px; margin: -6px 0 -8px; background: var(--pink);
  -webkit-mask: url("../img/mark.svg") center / contain no-repeat; mask: url("../img/mark.svg") center / contain no-repeat;
}
.rail-nav { position: relative; display: grid; gap: 8px; }
.rail-ind {
  position: absolute; left: 0; top: 0; width: 58px; height: 58px; border-radius: 20px; background: var(--pink);
  transform: translateY(var(--y, 0px)); transition: transform 420ms var(--spring);
}
.rail-nav button {
  position: relative; width: 58px; height: 58px; display: grid; place-items: center; padding: 0; border: 0;
  border-radius: 20px; background: none; color: var(--muted); cursor: pointer; text-decoration: none;
  transition: color 200ms ease;
}
.rail-nav button:hover { color: var(--text); }
.rail-nav button svg { transition: transform 320ms var(--spring); }
.rail-nav button:hover svg { transform: rotate(-6deg) scale(1.1); }
.rail-nav button:active svg { transform: scale(.88); }
.rail-nav button[aria-current="page"] { color: var(--on-pink); }
/* profile: avatar at the bottom of the rail, its menu opens to the right */
.me { position: relative; margin-top: auto; }
.me-btn { display: grid; place-items: center; width: 58px; height: 58px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.ava {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--tile-3); color: var(--muted);
  font: 700 19px/1 var(--display); transition: transform 320ms var(--spring), box-shadow 200ms ease, color 200ms ease;
}
.ava svg.hand { width: 26px; height: 26px; }
.ava.on { background: var(--pink); color: var(--on-pink); }
.me-btn:hover .ava { transform: scale(1.08) rotate(-4deg); color: var(--text); }
.me-btn:hover .ava.on { color: var(--on-pink); }
.me-btn:active .ava { transform: scale(.92); }
.me-btn[aria-expanded="true"] .ava { box-shadow: 0 0 0 3px var(--tile), 0 0 0 5px var(--pink); }
.me-menu {
  position: absolute; left: calc(100% + 14px); bottom: 0; z-index: 30; width: 260px; padding: 10px;
  border-radius: 24px; background: var(--tile-2); box-shadow: 0 18px 40px rgb(0 0 0 / .45);
  transform-origin: left bottom; animation: me-pop 260ms var(--spring);
}
.me-head { display: flex; align-items: center; gap: 12px; padding: 8px 8px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--tile-3); }
.ava.big { width: 48px; height: 48px; flex: none; overflow: hidden; }
.ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.ava.busy { animation: ava-busy 900ms ease-in-out infinite alternate; }
@keyframes ava-busy { to { opacity: .45; } }
.me-error { margin: 4px 12px 8px; color: #FF8AB8; font-size: 12px; line-height: 1.4; }
.me-who { display: grid; gap: 4px; min-width: 0; }
.me-name { font: 700 15px/1.2 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-mail { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-guest { margin: 6px 8px 10px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.me-menu [role="menuitem"] {
  display: flex; align-items: center; gap: 12px; width: 100%; height: 46px; padding: 0 12px; border: 0; border-radius: 14px;
  background: none; color: var(--text); font: 500 14px/1 var(--ui); text-decoration: none; cursor: pointer; text-align: left;
}
.me-menu [role="menuitem"]:hover, .me-menu [role="menuitem"]:focus-visible { background: var(--tile-3); outline: none; }
.me-menu [role="menuitem"] svg.hand { width: 22px; height: 22px; color: var(--muted); }
.me-menu [role="menuitem"]:hover svg.hand { color: var(--pink); }
@keyframes me-pop { from { opacity: 0; transform: scale(.9) translateX(-8px); } }
/* names appear only on hover or keyboard focus */
.rail [data-tip]::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 14px); top: 50%; white-space: nowrap; pointer-events: none;
  padding: 9px 14px; border-radius: 999px; background: var(--white); color: var(--ink); font: 600 13px/1 var(--ui);
  opacity: 0; transform: translate(-6px, -50%); transition: opacity 140ms ease, transform 260ms var(--spring);
}
.rail [data-tip]:hover::after { opacity: 1; transform: translate(0, -50%); transition-delay: 450ms; }
.rail [data-tip]:focus-visible::after { opacity: 1; transform: translate(0, -50%); }

/* ---------- buttons ---------- */
.pbtn {
  position: relative; width: 52px; height: 52px; flex: none; display: grid; place-items: center; padding: 0; border: 0;
  border-radius: 50%; background: var(--pink); color: var(--on-pink); cursor: pointer;
  transition: transform 220ms var(--spring), background-color 160ms ease;
}
.pbtn:hover { transform: scale(1.08); }
.pbtn:active { transform: scale(.93); }
.pbtn.lg { width: 64px; height: 64px; }
.pbtn.sm { width: 44px; height: 44px; }
.pbtn.dark { background: var(--on-pink); color: var(--pink); }
.pbtn.ink { background: var(--ink); color: var(--white); }
.pbtn.pop svg { animation: pop 260ms var(--spring); }
.pbtn .loader { position: absolute; inset: 0; margin: auto; display: none; }
.pbtn.buffering svg { visibility: hidden; }
.pbtn.buffering .loader { display: block; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 22px;
  border: 0; border-radius: 999px; font: 600 14px/1 var(--ui); cursor: pointer; text-decoration: none;
  transition: transform 200ms var(--spring), background-color 160ms ease;
}
.btn:active { transform: scale(.96); }
.btn svg.hand { width: 18px; height: 18px; }
.btn svg.brand { width: 18px; height: 18px; }
.btn-main { background: var(--white); color: var(--ink); }
.btn-main:hover { background: #fff; }
.btn-ghost { background: var(--tile-2); color: var(--text); }
.btn-ghost:hover { background: var(--tile-3); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; padding: 0; border: 0; border-radius: 50%;
  background: none; color: var(--muted); cursor: pointer; transition: color 140ms ease, background-color 140ms ease, transform 200ms var(--spring);
}
.icon-btn:hover { color: var(--text); background: var(--tile-2); }
.icon-btn:active { transform: scale(.9); }
.icon-btn[aria-pressed="true"] { color: var(--pink); }
.like[aria-pressed="true"], .now .like[aria-pressed="true"] { color: var(--pink); }
.like.pop svg { animation: pop 340ms var(--spring); }
.text-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font: 500 13px/1 var(--ui); cursor: pointer; padding: 6px; }
.text-btn:hover { color: var(--text); }
.text-btn svg.hand { width: 16px; height: 16px; }

/* ---------- search bar ---------- */
.topbar { position: sticky; top: 0; z-index: 7; padding: 0 0 12px; background: var(--bg); }
.search-wrap { position: relative; width: min(100%, 520px); }
.searchbox {
  display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 20px; border-radius: 999px;
  background: var(--tile); color: var(--muted); transition: background-color 200ms ease, color 200ms ease;
}
.searchbox:hover { background: var(--tile-2); }
.searchbox:focus-within { background: var(--tile-2); color: var(--text); box-shadow: inset 0 0 0 2px var(--pink); }
.searchbox input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font: 500 15px/1 var(--ui); }
.searchbox input::placeholder { color: var(--muted); }
.searchbox input::-webkit-search-cancel-button { -webkit-appearance: none; }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 8; padding: 8px; border-radius: 24px;
  background: var(--tile-2); transform-origin: 50% 0; animation: drop-in 220ms var(--spring) both;
}
.suggest li { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 14px; border-radius: 16px; cursor: pointer; }
.suggest li svg.hand { width: 16px; height: 16px; color: var(--muted); }
.suggest li:hover, .suggest li[aria-selected="true"] { background: var(--tile-3); }
.suggest li.sg-track { height: 56px; padding: 0 10px; }
.suggest li.sg-query + li.sg-track { margin-top: 6px; }
.sg-art { width: 40px; height: 40px; flex: none; border-radius: 10px; overflow: hidden; background: var(--tile-3); }
.sg-art img { width: 100%; height: 100%; object-fit: cover; }
.sg-text { flex: 1; min-width: 0; }
.sg-text b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 13px; }
.sub > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- tiles and the home bento ---------- */
.tile { position: relative; border-radius: var(--r); background: var(--tile); padding: 24px; overflow: hidden; }
.bento { display: grid; grid-template-columns: 7fr 5fr; gap: 10px; }
.bento > * { animation: rise 520ms var(--ease) both; }
.bento > :nth-child(2) { animation-delay: 70ms; }
.mix {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; min-height: 340px; padding: 30px;
  background: var(--pink); color: var(--on-pink);
}
.mix::before {                                   /* the soun mark as a quiet repeat pattern */
  content: ""; position: absolute; inset: 0; background: var(--on-pink); opacity: .05; pointer-events: none;
  -webkit-mask: url("../img/mark.svg") 0 0 / 92px 92px; mask: url("../img/mark.svg") 0 0 / 92px 92px;
}
.mix-text { position: relative; display: flex; flex-direction: column; min-width: 0; }
.mix .label { color: inherit; opacity: .72; }
.mix h1 { margin-top: 14px; font: 800 clamp(40px, 5.2vw, 76px)/.94 var(--display); letter-spacing: -0.045em; }
.mix-sub { margin-top: 14px; max-width: 36ch; font-weight: 500; line-height: 1.4; }
.mix-foot { display: flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 22px; font-weight: 600; }
.mix-foot .icon-btn { color: var(--on-pink); margin-left: -4px; }
.mix-foot .icon-btn:hover { background: rgb(25 5 14 / .12); color: var(--on-pink); }
.mix-foot .icon-btn.spin svg { animation: spin 700ms var(--ease); }
/* a new listener: three slots fill with notes as songs are played */
.learn { display: flex; gap: 12px; align-self: center; rotate: -4deg; }
.learn-slot {
  display: grid; place-items: center; width: 86px; height: 86px; border-radius: 24px; color: transparent;
  box-shadow: inset 0 0 0 3px rgb(25 5 14 / .28); transition: background-color 300ms ease, box-shadow 300ms ease;
}
.learn-slot:nth-child(2) { translate: 0 -14px; }
.learn-slot svg.hand { width: 40px; height: 40px; }
.learn-slot.on { background: var(--on-pink); color: var(--pink); box-shadow: none; animation: slot-in 520ms var(--spring); }
@keyframes slot-in { from { transform: scale(.6) rotate(-12deg); } }
.find-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 24px 0 20px; border: 0; border-radius: 999px;
  background: var(--on-pink); color: var(--pink); font: 700 15px/1 var(--display); cursor: pointer;
  transition: transform 260ms var(--spring);
}
.find-btn svg.hand { width: 22px; height: 22px; }
.find-btn:hover { transform: scale(1.04); }
.find-btn:active { transform: scale(.96); }
.learn-left { font-weight: 600; }
.mosaic { position: relative; display: grid; grid-template-columns: repeat(2, 112px); gap: 8px; align-self: center; rotate: 5deg; }
.mosaic > * { width: 112px; height: 112px; border-radius: 18px; overflow: hidden; background: rgb(25 5 14 / .12); animation: pop-in 420ms var(--spring) both; }
.mosaic > :nth-child(2) { animation-delay: 60ms; }
.mosaic > :nth-child(3) { animation-delay: 120ms; }
.mosaic > :nth-child(4) { animation-delay: 180ms; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.side-col { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 10px; }
.back { display: flex; flex-direction: column; gap: 16px; background: var(--white); color: var(--ink); cursor: pointer; }
.back .label { color: #6B6870; }
.back-body { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 16px; align-items: center; margin-top: auto; }
.back-cover { width: 96px; height: 96px; border-radius: 18px; overflow: hidden; background: #DDD9DC; }
.back-cover img { width: 100%; height: 100%; object-fit: cover; }
.back-title { font: 700 20px/1.15 var(--display); letter-spacing: -0.03em; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.back .sub { color: #55525A; margin-top: 6px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat {
  display: grid; gap: 10px; border: 0; text-align: left; color: inherit; font: inherit; cursor: pointer;
  transition: background-color 160ms ease, transform 260ms var(--spring);
}
.stat:hover { background: var(--tile-2); transform: translateY(-2px); }
.stat b { font: 800 44px/1 var(--display); letter-spacing: -0.04em; }
.stat span:last-child { color: var(--muted); }

/* ---------- shelves ---------- */
.shelf { margin-top: 36px; }
.shelf-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; padding: 0 4px; }
.kicker { color: var(--muted); font: 500 13px/1 var(--ui); }
.shelf h2 { margin-top: 6px; font: 700 22px/1.15 var(--display); letter-spacing: -0.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shelf-head > div:first-child { min-width: 0; }
.shelf-nav { display: flex; gap: 6px; }
.shelf-nav .icon-btn { background: var(--tile); }
.shelf-nav .icon-btn:hover { background: var(--tile-2); }
.shelf-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: 168px; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity;
  scrollbar-width: none; padding: 2px 4px 6px;
}
.shelf-row::-webkit-scrollbar { display: none; }
.shelf-row > * { scroll-snap-align: start; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 18px 14px; }
.card { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; display: grid; gap: 10px; color: inherit; min-width: 0; }
.card-art { position: relative; aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: var(--tile); }
.card-art > img, .card-art > svg.ph { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease); }
.card:hover .card-art > img, .card:hover .card-art > svg.ph { transform: scale(1.06); }
.card .pbtn { position: absolute; right: 10px; bottom: 10px; opacity: 0; transform: translateY(12px) scale(.85); transition: opacity 180ms ease, transform 300ms var(--spring); }
.card:hover .pbtn, .card:focus-visible .pbtn, .card.playing .pbtn { opacity: 1; transform: none; }
.card-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card.current .card-title { color: var(--pink); }
.card-artist { color: var(--muted); font-size: 13px; margin-top: -8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk { border-radius: 20px; background: var(--tile); animation: sk 900ms ease-in-out infinite alternate; }
.sk.art { aspect-ratio: 1; }
.sk.line { height: 12px; border-radius: 6px; width: 70%; }
@keyframes sk { to { background: var(--tile-2); } }

/* source logos */
.src { display: inline-grid; place-items: center; flex: none; width: 15px; height: 15px; }
.src svg.hand { width: 15px; height: 15px; }
.src-spotify { color: #1ED760; }
.src-soundcloud { color: #FF5500; }
.src-file { color: var(--faint); }
.card-art .src { position: absolute; left: 10px; top: 10px; width: 28px; height: 28px; padding: 6px; border-radius: 50%; background: rgb(11 11 12 / .78); }
.card-art .src svg.hand { width: 16px; height: 16px; }
.now-source:empty, .bar-source:empty { display: none; }
.preview { padding: 1px 6px; border-radius: 6px; background: var(--tile-3); color: var(--muted); font-size: 11px; }

/* ---------- page headers and track lists ---------- */
.page-head { display: flex; align-items: end; gap: 20px; margin: 10px 4px 26px; }
.page-head h1 { font: 800 clamp(28px, 5vw, 68px)/.96 var(--display); letter-spacing: -0.045em; overflow-wrap: anywhere; }
.page-head > div { min-width: 0; }
.page-head .lead { margin-top: 12px; color: var(--muted); }
.page-head .pbtn { margin-left: auto; }
.lead { color: var(--muted); }
.tracks { display: grid; gap: 2px; }
.row {
  display: grid; grid-template-columns: 30px 44px minmax(0, 1.2fr) minmax(0, .7fr) 52px 84px; gap: 14px; align-items: center;
  padding: 7px 10px 7px 8px; border-radius: 16px; cursor: pointer; transition: background-color 140ms ease;
}
.row:hover, .row.current { background: var(--tile); }
.row .n { display: grid; place-items: center; height: 20px; color: var(--muted); font-variant-numeric: tabular-nums; }
.row .n .bars { display: none; }
.row:hover .n .num { display: none; }
.row.playing .n .num { display: none; }
.row.current .n .num { color: var(--pink); }
.row.playing .n .bars { display: flex; }
.row .art { width: 44px; height: 44px; border-radius: 12px; overflow: hidden; background: var(--tile-2); }
.row .art img { width: 100%; height: 100%; object-fit: cover; }
.row .t { min-width: 0; }
.row .t b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.current .t b { color: var(--pink); }
.row .al { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .d { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.row .del, .row .save { opacity: 0; }
.row:hover .del, .row .del:focus-visible, .row:hover .save, .row .save:focus-visible { opacity: 1; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 15px; }
.bars svg.hand { width: 6px; height: 100%; color: var(--pink); transform-origin: 50% 100%; animation: bars 900ms ease-in-out infinite; }
.bars svg.hand:nth-child(2) { animation-delay: -300ms; }
.bars svg.hand:nth-child(3) { animation-delay: -600ms; }

/* ---------- search results ---------- */
.search-top { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 1.6fr); gap: 20px; align-items: start; }
.result-section > h2 { font: 700 20px/1.2 var(--display); letter-spacing: -0.03em; margin: 22px 4px 12px; }
.top-result {
  display: grid; align-content: start; gap: 16px; min-height: 252px; background: var(--white); color: var(--ink); cursor: pointer;
  transition: transform 300ms var(--spring);
}
.top-result:hover { transform: translateY(-3px); }
.top-cover { width: 112px; height: 112px; border-radius: 18px; overflow: hidden; background: #DDD9DC; }
.top-cover img { width: 100%; height: 100%; object-fit: cover; }
.top-title { font: 800 30px/1.05 var(--display); letter-spacing: -0.04em; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; padding-right: 8px; }
.top-result .sub { color: #55525A; font-size: 14px; }
.top-result .pbtn { position: absolute; right: 22px; bottom: 22px; }
.searching { display: flex; align-items: center; gap: 14px; color: var(--muted); padding: 20px 4px; }
.connect-hint { display: flex; align-items: center; gap: 14px; margin-top: 26px; padding: 16px 20px; }
.connect-hint > svg { width: 28px; height: 28px; color: #1ED760; }
.connect-hint p { flex: 1; color: var(--muted); }

/* ---------- Add music ---------- */
.sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.source-tile { display: flex; flex-direction: column; gap: 14px; min-height: 260px; }
.source-tile p { color: var(--muted); }
.source-tile small { color: var(--faint); }
.source-head { display: flex; align-items: center; gap: 12px; }
.source-head h2 { font: 700 22px/1 var(--display); letter-spacing: -0.03em; }
.source-head > svg { width: 30px; height: 30px; }
.source-head > svg.hand { color: var(--pink); }
.source-tile.sp .source-head > svg { color: #1ED760; }
.source-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: auto; }
.link-form { display: flex; gap: 8px; margin-top: auto; }
.link-form input {
  flex: 1; min-width: 0; height: 46px; padding: 0 18px; border: 0; border-radius: 999px; outline: none;
  background: var(--tile-2); color: var(--text); font: 400 14px/1 var(--ui);
}
.link-form input:focus { background: var(--tile-3); }
.steps { display: grid; gap: 8px; padding-left: 1.3em; list-style: decimal; color: var(--muted); }
.steps a { color: var(--text); }
.steps code { font: 500 12px/1.4 ui-monospace, monospace; color: var(--text); background: var(--tile-2); padding: 2px 6px; border-radius: 6px; word-break: break-all; }

/* ---------- now playing ---------- */
.now {
  display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: var(--r); overflow: auto; scrollbar-width: none;
  background-color: var(--tint, var(--tile));
}
.now::-webkit-scrollbar { display: none; }
.now .label { color: rgb(255 255 255 / .6); }
.now-cover { aspect-ratio: 1; flex: none; border-radius: 20px; overflow: hidden; background: rgb(255 255 255 / .06); }
.now-cover.vt { view-transition-name: cover; }
.now-cover > * { width: 100%; height: 100%; object-fit: cover; animation: cover-in 420ms var(--ease) both; }
.now-cover.vt > * { animation: none; }
.now-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.now-text { min-width: 0; }
.now-title { font: 700 20px/1.2 var(--display); letter-spacing: -0.03em; overflow-wrap: anywhere; }
.now-artist { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: rgb(255 255 255 / .7); }
.now .icon-btn { color: rgb(255 255 255 / .7); }
.now .icon-btn:hover { background: rgb(255 255 255 / .1); color: #fff; }
.queue-h { margin-top: 10px; }
.queue { display: grid; gap: 2px; }
.queue li button {
  width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center; padding: 6px;
  background: none; border: 0; border-radius: 14px; text-align: left; cursor: pointer; transition: background-color 140ms ease;
}
.queue li button:hover { background: rgb(255 255 255 / .08); }
.queue .art { width: 40px; height: 40px; overflow: hidden; border-radius: 10px; background: rgb(255 255 255 / .06); }
.queue .art img { width: 100%; height: 100%; object-fit: cover; }
.queue .q { min-width: 0; }
.queue .q b { display: block; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue .q .sub { font-size: 12px; color: rgb(255 255 255 / .6); }
.queue .end { color: rgb(255 255 255 / .5); font-size: 13px; padding: 6px; }

/* ---------- bottom bar ---------- */
.bar {
  display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 2.2fr) minmax(180px, 1fr); align-items: center; gap: 20px;
  padding: 0 24px; border-radius: var(--r); background: var(--tile);
}
.bar-track { display: flex; align-items: center; gap: 14px; min-width: 0; }
.bar-cover { width: 56px; height: 56px; flex: none; border-radius: 14px; overflow: hidden; background: var(--tile-2); }
.bar-cover > * { width: 100%; height: 100%; object-fit: cover; animation: cover-in 360ms var(--ease) both; }
.bar-meta { min-width: 0; }
.bar-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-artist { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; overflow: hidden; white-space: nowrap; }
.bar-artist > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.bar-center { display: grid; gap: 4px; }
.controls { display: flex; align-items: center; justify-content: center; gap: 6px; }
.controls .pbtn { width: 46px; height: 46px; margin: 0 8px; }
.seek { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 10px; }
.time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; text-align: center; }
.wave { width: 100%; height: 30px; cursor: pointer; touch-action: none; }
.bar-right { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
/* the volume control is drawn on the canvas; the real range input sits on top, invisible, for mouse and keys */
.vol { position: relative; width: 116px; height: 22px; }
.vol canvas { width: 100%; height: 100%; }
.vol .volume { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.vol:has(.volume:focus-visible) { outline: 2px solid var(--white); outline-offset: 4px; border-radius: 6px; }

/* ---------- loader, drop overlay, toast ---------- */
.loader { position: relative; width: 24px; height: 24px; animation: ld-spin 2s ease-in-out infinite; }
.loader::before, .loader::after { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; }
.loader::before { left: 0; top: 0; background: var(--pink); animation: ld-a 2s ease-in-out infinite; }
.loader::after { right: 0; bottom: 0; background: var(--faint); animation: ld-b 2s ease-in-out infinite; }
.pbtn .loader::before { background: var(--on-pink); }
.pbtn .loader::after { background: rgb(25 5 14 / .35); }
.toast .loader::after { background: rgb(11 11 12 / .3); }
.view-loading { display: grid; place-items: center; height: 60vh; }
.view-loading .loader { scale: 1.8; }
@keyframes ld-spin { 0% { transform: rotate(0) scale(.8); } 50% { transform: rotate(360deg) scale(1.15); } 100% { transform: rotate(720deg) scale(.8); } }
@keyframes ld-a { 50% { transform: translate(7px, 7px); } }
@keyframes ld-b { 50% { transform: translate(-7px, -7px); } }
.sc-frame { position: fixed; left: -10000px; top: 0; width: 320px; height: 166px; border: 0; opacity: 0; pointer-events: none; }
.drop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgb(11 11 12 / .82); }
.drop-card { display: grid; justify-items: center; gap: 14px; padding: 48px 64px; border-radius: 36px; background: var(--pink); color: var(--on-pink); font: 700 20px/1 var(--display); letter-spacing: -0.03em; animation: pop-in 320ms var(--spring) both; }
.drop-card svg.hand { width: 44px; height: 44px; }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--bar-h) + 28px); z-index: 21; display: flex; align-items: center; gap: 12px;
  padding: 13px 20px; border-radius: 999px; background: var(--white); color: var(--ink); font: 600 13px/1 var(--ui);
  pointer-events: none; opacity: 0; transform: translate(-50%, 14px) scale(.96);
  transition: opacity 200ms ease, transform 320ms var(--spring);
}
.toast.on { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop { 0% { transform: scale(.55); } 100% { transform: scale(1); } }
@keyframes pop-in { from { opacity: 0; transform: scale(.8); } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
@keyframes cover-in { from { opacity: 0; transform: scale(1.06); } }
@keyframes bars { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
/* switching screens: the old one lifts away, the new one settles in */
::view-transition-old(view) { animation: vt-out 150ms ease-in both; }
::view-transition-new(view) { animation: vt-in 320ms var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-10px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(18px); } }
/* starting a track from a card: its cover flies into the now-playing tile, the screen itself stays put */
::view-transition-group(cover) { animation-duration: 460ms; animation-timing-function: var(--ease); }
html.morph::view-transition-old(view) { animation: none; opacity: 0; }
html.morph::view-transition-new(view) { animation: none; }

/* ---------- smaller screens ---------- */
@media (max-width: 1240px) {
  .app { grid-template-columns: 84px minmax(0, 1fr); grid-template-areas: "rail view" "rail bar"; }
  .now { display: none; }
}
@media (max-width: 980px) {
  .bento, .search-top { grid-template-columns: 1fr; }
  .mosaic, .learn { display: none; }
  .mix { grid-template-columns: 1fr; min-height: 280px; }
  .row { grid-template-columns: 30px 44px minmax(0, 1fr) 52px 84px; }
  .row .al { display: none; }
}
@media (max-width: 760px) {
  :root { --bar-h: 150px; --r: 24px; }
  .app { grid-template-columns: 70px minmax(0, 1fr); padding: 8px; }
  .view { margin-left: 8px; }
  .bar { margin: 8px 0 0 8px; }
  .rail-logo .mark { width: 54px; height: 54px; }
  .rail-nav button, .rail-ind, .me-btn { width: 50px; height: 50px; }
  .ava { width: 40px; height: 40px; }
  svg.hand { width: 26px; height: 26px; }
  .bar { grid-template-columns: 1fr auto; grid-template-areas: "track right" "center center"; padding: 10px 14px; gap: 6px 12px; }
  .bar-track { grid-area: track; }
  .bar-right { grid-area: right; }
  .bar-center { grid-area: center; }
  .vol { display: none; }
  .shelf-row { grid-auto-columns: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- row actions: add to a playlist + like / remove ---------- */
.row .acts { display: flex; justify-content: flex-end; gap: 2px; }
.row .add-to { opacity: 0; }
.row:hover .add-to, .row .add-to:focus-visible, .row .add-to[aria-expanded="true"] { opacity: 1; }
.icon-btn svg.hand { pointer-events: none; }
.now-meta .now-text { flex: 1; min-width: 0; }

/* the "add to playlist" menu, floating next to the button that opened it */
.pl-menu {
  position: fixed; z-index: 40; width: 270px; max-height: min(420px, 70vh); overflow: auto; padding: 10px;
  border-radius: 22px; background: var(--tile-2); box-shadow: 0 18px 40px rgb(0 0 0 / .45);
  animation: me-pop 240ms var(--spring); transform-origin: top right;
}
.pl-menu .label { margin: 6px 8px 10px; }
.pl-new { display: flex; gap: 6px; margin-bottom: 6px; }
.pl-new input {
  flex: 1; min-width: 0; height: 42px; padding: 0 14px; border: 0; border-radius: 14px; outline: none;
  background: var(--tile-3); color: var(--text); font: 500 14px/1 var(--ui);
}
.pl-new input:focus { box-shadow: inset 0 0 0 2px var(--pink); }
.pl-make { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border: 0; border-radius: 14px; background: var(--pink); color: var(--on-pink); cursor: pointer; }
.pl-make svg.hand { width: 22px; height: 22px; }
.pl-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; align-items: center; gap: 10px; width: 100%; padding: 11px 12px;
  border: 0; border-radius: 14px; background: none; color: var(--text); font: 500 14px/1.2 var(--ui); text-align: left; cursor: pointer;
}
.pl-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-item small { color: var(--muted); font-size: 12px; }
.pl-item svg.hand { width: 18px; height: 18px; color: var(--pink); }
.pl-item:hover, .pl-item:focus-visible { background: var(--tile-3); outline: none; }
.pl-item.in span { color: var(--pink); }

/* ---------- library: playlist tiles ---------- */
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 18px; margin: 8px 0 40px; }
.pl-tile {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; align-content: start; width: 100%; min-width: 0; padding: 12px 12px 14px; border: 0; border-radius: 26px; background: none;
  color: var(--text); text-align: left; cursor: pointer; transition: background-color 160ms ease;
}
.pl-tile:hover, .pl-tile:focus-within { background: var(--tile); }
.pl-tile b { margin-top: 8px; font: 700 15px/1.2 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-tile small { color: var(--muted); font-size: 13px; }
.pl-cover {
  display: grid; grid-template-columns: 1fr 1fr; aspect-ratio: 1; overflow: hidden; border-radius: 20px; background: var(--tile-2);
  transition: transform 320ms var(--spring);
}
.pl-tile:hover .pl-cover { transform: rotate(-2deg) scale(1.02); }
.pl-cover.one { grid-template-columns: 1fr; }
.pl-tile .pl-cover { width: 100%; }
.pl-cover > div, .pl-cover > img, .pl-cover > svg { width: 100%; height: 100%; min-width: 0; }
.pl-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-cover.heart, .pl-cover.add { grid-template-columns: 1fr; place-items: center; }
.pl-cover.heart { background: var(--pink); color: var(--on-pink); }
.pl-cover.heart svg.hand { width: 46%; height: 46%; }
.pl-cover.add { background: none; box-shadow: inset 0 0 0 3px var(--tile-3); color: var(--muted); cursor: pointer; }
.pl-cover.add svg.hand { width: 34%; height: 34%; }
.pl-tile.new input {
  width: 100%; min-width: 0; margin-top: 8px; padding: 0; border: 0; outline: none; background: none; color: var(--text); font: 700 15px/1.2 var(--display);
}
.pl-tile.new input::placeholder { color: var(--muted); }
.pl-tile.new:focus-within .pl-cover.add { box-shadow: inset 0 0 0 3px var(--pink); color: var(--pink); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 4px 0 12px; }
.section-head h2 { font: 700 22px/1.1 var(--display); letter-spacing: -0.03em; }

/* ---------- one playlist ---------- */
.pl-head { display: flex; align-items: flex-end; gap: 28px; margin: 10px 0 28px; }
.pl-head .pl-cover { width: 220px; flex: none; border-radius: 28px; }
.pl-text { display: grid; gap: 10px; min-width: 0; }
.pl-text h1, .pl-rename { font: 800 clamp(34px, 4.4vw, 64px)/1 var(--display); letter-spacing: -0.045em; overflow-wrap: anywhere; }
.pl-rename { width: 100%; padding: 0 0 4px; border: 0; border-bottom: 3px solid var(--pink); outline: none; background: none; color: var(--text); }
.pl-tools { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.btn.danger.sure { background: var(--pink); color: var(--on-pink); }

@media (max-width: 980px) {
  .pl-head { flex-direction: column; align-items: flex-start; }
  .pl-head .pl-cover { width: 160px; }
}
@media (max-width: 760px) {
  .pl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .row .add-to { opacity: 1; }
}

/* ---------- library: the soun wordmark, huge and quiet, half under the bottom edge ---------- */
.view:has(.big-word) { display: flex; flex-direction: column; }
.view:has(.big-word) > .content { flex: 1 0 auto; display: flex; flex-direction: column; }
.big-word { position: sticky; bottom: -40px; height: 0; margin-top: auto; z-index: -1; pointer-events: none; }
.big-word .word {
  position: absolute; left: -2%; right: -2%; bottom: 0; aspect-ratio: 425 / 141.7; transform: translateY(46%);
  animation: word-in 900ms var(--ease) 120ms both;
}
.big-word .f {
  position: absolute; inset: 0; background: var(--pink); opacity: .085;
  -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat;
}
.big-word .f0 { -webkit-mask-image: url("../img/boil-0.svg"); mask-image: url("../img/boil-0.svg"); }
.big-word .f1 { -webkit-mask-image: url("../img/boil-1.svg"); mask-image: url("../img/boil-1.svg"); }
.big-word .f2 { -webkit-mask-image: url("../img/boil-2.svg"); mask-image: url("../img/boil-2.svg"); }
/* the three drawings take turns, like the logo on the site */
.big-word .f { animation: word-boil 750ms steps(1) infinite; }
.big-word .f1 { animation-delay: -500ms; }
.big-word .f2 { animation-delay: -250ms; }
@keyframes word-boil { 0% { visibility: visible; } 33.4%, 100% { visibility: hidden; } }
@keyframes word-in { from { transform: translateY(80%); opacity: 0; } }
.pl-cover.files { grid-template-columns: 1fr; place-items: center; background: var(--tile-3); color: var(--pink); }
.pl-cover.files svg.hand { width: 42%; height: 42%; }
@media (prefers-reduced-motion: reduce) {
  .big-word .f, .big-word .word { animation: none; }
  .big-word .f1, .big-word .f2 { display: none; }
}

/* ---------- profile ---------- */
.rail-nav.off .rail-ind { opacity: 0; }
.rail-ind { transition: transform 420ms var(--spring), opacity 200ms ease; }
.prof-head { display: flex; align-items: center; gap: 36px; margin: 14px 0 40px; }
.prof-ava {
  position: relative; width: 220px; height: 220px; flex: none; padding: 0; border: 0; border-radius: 50%; overflow: hidden;
  background: var(--pink); color: var(--on-pink); cursor: pointer; transition: transform 320ms var(--spring);
}
.prof-ava:hover { transform: rotate(-3deg) scale(1.02); }
.prof-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prof-initial { display: grid; place-items: center; height: 100%; font: 800 96px/1 var(--display); }
.prof-hint {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px;
  background: rgb(11 11 12 / .62); color: var(--white); font: 600 14px/1 var(--ui); opacity: 0; transition: opacity 180ms ease;
}
.prof-hint svg.hand { width: 34px; height: 34px; }
.prof-ava:hover .prof-hint, .prof-ava:focus-visible .prof-hint { opacity: 1; }
.prof-ava.busy { animation: ava-busy 900ms ease-in-out infinite alternate; }
.prof-text { display: grid; gap: 10px; min-width: 0; }
.prof-text h1 { font: 800 clamp(40px, 5.6vw, 84px)/.95 var(--display); letter-spacing: -0.05em; overflow-wrap: anywhere; }
.prof-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.prof-stat { display: grid; gap: 4px; min-width: 104px; padding: 14px 18px; border-radius: 20px; background: var(--tile); }
.prof-stat b { font: 800 26px/1 var(--display); letter-spacing: -0.03em; }
.prof-stat span { color: var(--muted); font-size: 13px; }
.prof-head { position: relative; }
.settings-btn { position: absolute; top: 0; right: 0; width: 52px; height: 52px; }
.page-head .settings-btn { position: static; margin-left: auto; }
.settings-btn svg.hand { width: 28px; height: 28px; }
.settings-btn:hover svg { transform: rotate(40deg); }
.settings-btn svg { transition: transform 420ms var(--spring); }

/* your artists: round photos from SoundCloud */
.artist-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; margin-bottom: 40px; }
.artist-card {
  display: grid; justify-items: center; gap: 12px; padding: 14px 10px 16px; border: 0; border-radius: 26px; background: none;
  color: var(--text); cursor: pointer; transition: background-color 160ms ease;
}
.artist-card:hover { background: var(--tile); }
.artist-pic { width: 100%; max-width: 150px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--tile-2); transition: transform 320ms var(--spring); }
.artist-card:hover .artist-pic { transform: scale(1.04) rotate(-2deg); }
.artist-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.artist-letter { display: grid; place-items: center; height: 100%; background: var(--pink); color: var(--on-pink); font: 800 48px/1 var(--display); }
.artist-card b { max-width: 100%; font: 700 15px/1.2 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- settings ---------- */
.set-col { display: grid; gap: 16px; max-width: 720px; padding-bottom: 40px; }
.set-card { display: grid; gap: 16px; padding: 26px 28px; border-radius: 28px; background: var(--tile); }
.set-card h2 { font: 700 22px/1.1 var(--display); letter-spacing: -0.03em; }
.set-card h3 { margin: 10px 0 -4px; font: 700 15px/1.2 var(--display); color: var(--muted); }
.set-card .lead { margin: 0; }
.set-form { display: grid; gap: 12px; justify-items: start; }
.set-form .set-field { width: 100%; }
.set-form > input { width: 100%; height: 48px; padding: 0 16px; border: 0; border-radius: 14px; outline: none; background: var(--tile-2); color: var(--text); font: 500 15px/1 var(--ui); }
.set-form > input:focus { box-shadow: inset 0 0 0 2px var(--pink); }
.set-field { display: grid; gap: 8px; }
.set-field > span { font: 600 13px/1 var(--ui); color: var(--muted); }
.set-field input, .set-select {
  width: 100%; height: 48px; padding: 0 16px; border: 0; border-radius: 14px; outline: none; background: var(--tile-2);
  color: var(--text); font: 500 15px/1 var(--ui);
}
.set-select { appearance: none; cursor: pointer; background-image: none; }
.set-field input:focus, .set-select:focus { box-shadow: inset 0 0 0 2px var(--pink); }
.set-error { color: #FF8AB8; font-size: 13px; }
.set-photo { display: flex; align-items: center; gap: 20px; }
.set-photo .set-who { display: grid; gap: 4px; min-width: 0; }
.set-photo .set-who b { font: 700 20px/1.2 var(--display); overflow-wrap: anywhere; }
.set-photo .set-who small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.set-ava { display: grid; place-items: center; width: 104px; height: 104px; flex: none; border-radius: 50%; overflow: hidden; background: var(--pink); color: var(--on-pink); font: 800 30px/1 var(--display); }
.set-ava img { width: 100%; height: 100%; object-fit: cover; }
.set-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.set-devices { display: grid; gap: 6px; }
.set-device { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 18px; background: var(--tile-2); }
.set-device > svg.hand { width: 24px; height: 24px; color: var(--muted); flex: none; }
.set-device > div { display: grid; gap: 3px; flex: 1; min-width: 0; }
.set-device b { font-weight: 600; }
.set-device small { color: var(--muted); font-size: 12px; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 18px; background: var(--tile-2); justify-self: start; flex-wrap: wrap; }
.seg button {
  height: 42px; padding: 0 18px; border: 0; border-radius: 14px; background: none; color: var(--muted);
  font: 600 14px/1 var(--ui); cursor: pointer; transition: background-color 180ms ease, color 180ms ease;
}
.seg button:hover { color: var(--text); }
.seg button[aria-checked="true"] { background: var(--pink); color: var(--on-pink); }
.danger-zone { box-shadow: inset 0 0 0 2px rgb(255 79 160 / .35); }
@media (max-width: 760px) {
  .prof-head { flex-direction: column; align-items: flex-start; gap: 20px; }
  .prof-ava { width: 140px; height: 140px; }
  .prof-initial { font-size: 60px; }
}

/* settings: categories on the left, the chosen one on the right */
.set-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; padding-bottom: 40px; }
.page-head.compact { margin-bottom: 18px; }
.page-head.compact h1 { font-size: clamp(28px, 3.4vw, 48px); }
.page-head.compact .lead { margin-top: 8px; }
.set-nav { position: sticky; top: 0; display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 26px; background: var(--tile); }
.set-tab.danger { margin-top: 10px; }
.set-tab {
  display: flex; align-items: center; gap: 12px; width: 100%; height: 50px; padding: 0 14px; border: 0; border-radius: 16px;
  background: none; color: var(--muted); font: 600 14px/1 var(--ui); text-align: left; cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}
.set-tab svg.hand { width: 22px; height: 22px; flex: none; transition: transform 320ms var(--spring); }
.set-tab svg.brand { width: 20px; height: 20px; flex: none; fill: currentColor; margin: 0 1px; }
.set-sp { display: grid; gap: 14px; }
.set-sp .steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--muted); line-height: 1.5; }
.set-sp code { padding: 2px 8px; border-radius: 8px; background: var(--tile-3); color: var(--text); font-size: 13px; overflow-wrap: anywhere; }
.set-tab:hover { background: var(--tile-2); color: var(--text); }
.set-tab:hover svg.hand { transform: rotate(-6deg) scale(1.1); }
.set-tab[aria-current="page"] { background: var(--pink); color: var(--on-pink); }
.set-tab.danger:not([aria-current]) { color: #FF8AB8; }
.set-login { display: grid; gap: 10px; justify-items: start; margin-top: 8px; padding: 14px; border-radius: 16px; background: var(--tile-2); color: var(--muted); font-size: 13px; line-height: 1.45; }
.set-panel {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; align-content: start;
  animation: set-in 320ms var(--ease) both;
}
.set-group { display: grid; gap: 14px; align-content: start; padding: 24px 26px 26px; border-radius: 26px; background: var(--tile); }
.set-group h3 { font: 700 17px/1.2 var(--display); letter-spacing: -0.02em; color: var(--text); }
.set-group .lead { margin: 0; max-width: 60ch; }
.set-group .btn-ghost { background: var(--tile-3); }
.set-group .btn-ghost:hover { background: #38383D; }
.set-group .set-field > span { color: var(--muted); }
@keyframes set-in { from { opacity: 0; transform: translateX(10px); } }
@media (max-width: 900px) {
  .set-layout { grid-template-columns: 1fr; }
  .set-nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .set-tab.danger { margin-top: 0; }
  .set-panel { grid-template-columns: 1fr; }
  .set-nav { position: static; }
  .set-tab { width: auto; flex: none; }
  .set-login { display: none; }
}
@media (prefers-reduced-motion: reduce) { .set-panel { animation: none; } }
