/* ---------- Platform: nav, profiles, room, chat, live now, settings ---------- */

/* Top navigation */
.topnav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.navlink { padding: 8px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px; }
.navlink:hover { color: var(--text); background: var(--surface); }
.navlink.is-here { color: var(--text); background: var(--surface); }
.navme { display: inline-flex; border-radius: 50%; margin-left: 4px; }
.navme .avatar { box-shadow: 0 0 0 2px var(--orange); }
.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; display: inline-flex; }
.danger { color: #d93025 !important; }
[data-theme="dark"] .danger { color: #ff8a80 !important; }

/* Profile header */
.profile-wrap { max-width: 1160px; }
.banner { position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 3 / 1; max-height: 300px; width: 100%; background: var(--surface); border: 1px solid var(--border); }
.banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-head { display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin: 8px 0 24px; padding: 0 6px; }
.profile-head.has-banner { position: relative; }
.profile-head.has-banner .profile-avatar { margin-top: -58px; }
.profile-avatar .avatar { box-shadow: 0 0 0 5px var(--bg); }
.profile-id { flex: 1; min-width: 220px; padding-top: 10px; }
.profile-id h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); letter-spacing: -1.2px; overflow-wrap: anywhere; }
.profile-bio { margin: 6px 0 0; max-width: 620px; color: var(--muted); line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.profile-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 10px; color: var(--muted); font-size: 15px; }
.profile-stats b { color: var(--text); }
.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 14px; }

.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }

/* Live card */
.live-card { position: relative; overflow: hidden; }
.gate-title { margin: 6px 0 4px; font-size: 22px; font-weight: 800; color: var(--text) !important; }
.gate-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
#gate .scribble { font-size: 22px; }

/* Volume button that changes with the level */
.vol-btn { width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--bg); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.vol-btn:hover { background: var(--border); }
.vol-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vol-btn .vol-speaker { fill: var(--text); }
.vol-btn .vol-x { display: none; stroke: #d93025; }
.vol-btn[data-level="low"] .vol-w2 { display: none; }
.vol-btn[data-level="muted"] .vol-w1, .vol-btn[data-level="muted"] .vol-w2 { display: none; }
.vol-btn[data-level="muted"] .vol-x { display: inline; }
[data-theme="dark"] .vol-btn .vol-x { stroke: #ff8a80; }

/* Reactions */
.react-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.react-btn { width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg); font-size: 22px; cursor: pointer; transition: transform .12s ease; }
.react-btn:hover { transform: translateY(-2px); }
.react-btn:active { transform: scale(.9); }
.react-stage { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.react-float { position: absolute; bottom: 10px; font-size: 32px; animation: reactUp 2.6s ease-out forwards; }
@keyframes reactUp {
  0% { transform: translate(0, 0) scale(.6); opacity: 0; }
  12% { transform: translate(0, -20px) scale(1.15); opacity: 1; }
  100% { transform: translate(var(--drift, 0), -260px) scale(1); opacity: 0; }
}

/* Listeners */
.listeners-wrap { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.listeners-count { margin: 0 0 10px !important; font-weight: 700; color: var(--text) !important; font-size: 15px; }
.listeners { display: flex; flex-wrap: wrap; gap: 8px; }
.listener { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); font-size: 14px; font-weight: 700; }
.listener a { color: var(--text); text-decoration: none; }
.listener.is-guest { color: var(--muted); }
.listener.is-me { border-color: var(--orange); }
.chip-btn { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.chip-btn:hover { background: var(--border); color: var(--text); }

/* Recently played */
.history { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.history li { display: flex; align-items: center; gap: 12px; }
.history img, .hist-art { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: var(--border); flex-shrink: 0; }
.hist-text { display: flex; flex-direction: column; min-width: 0; }
.hist-text a { color: var(--text); font-weight: 700; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-text a:hover { text-decoration: underline; }
.hist-text .muted { font-size: 13px; }

/* Comments */
.comment-form { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.comment-form textarea, .settings textarea {
  width: 100%; min-height: 84px; resize: vertical; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--border);
  background: var(--bg); color: var(--text); font: inherit; font-size: 15px; line-height: 1.5;
}
.comment-form textarea:focus, .settings textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255, 85, 0, .18); }
.comment-form-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.comments { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; }
.comment { display: flex; gap: 12px; align-items: flex-start; }
.comment-body { flex: 1; min-width: 0; }
.comment-meta { display: flex; gap: 10px; align-items: baseline; font-size: 14px; }
.comment-meta a { color: var(--text); font-weight: 800; text-decoration: none; }
.comment-meta time { color: var(--muted); font-size: 13px; }
.comment-body p { margin: 4px 0 0; color: var(--text) !important; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.comment-tools { display: flex; gap: 10px; }

/* Chat */
.chat { position: sticky; top: 16px; display: flex; flex-direction: column; height: min(640px, calc(100vh - 40px)); padding: 18px; }
.chat-head h2 { margin: 0 0 10px; }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 4px 2px 8px; }
.chat-empty { margin: auto 0 !important; text-align: center; }
.chat-msg { display: flex; gap: 10px; align-items: flex-start; }
.chat-body { flex: 1; min-width: 0; }
.chat-meta { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.chat-meta a { color: var(--text); font-weight: 800; text-decoration: none; }
.chat-meta time { color: var(--muted); font-size: 12px; }
.chat-body p { margin: 2px 0 0; color: var(--text) !important; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.host-tag { padding: 1px 7px; border-radius: 999px; background: var(--orange); color: #121212; font-size: 11px; font-weight: 800; }
.chat-tools { display: flex; opacity: 0; transition: opacity .15s ease; }
.chat-msg:hover .chat-tools, .chat-msg:focus-within .chat-tools { opacity: 1; }
.chat-form { display: flex; gap: 8px; margin-top: 10px; }
.chat-form input { flex: 1; min-width: 0; min-height: 42px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: 15px; }
.chat-form input:focus { outline: none; border-color: var(--orange); }
.chat-note { margin: 10px 0 0 !important; font-size: 14px; }

/* Live now */
.live-page h1 { font-size: clamp(34px, 5vw, 52px); letter-spacing: -1.5px; margin: 6px 0 6px; }
.live-section { margin-top: 28px; }
.live-section h2 { font-size: 22px; margin: 0 0 14px; }
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.live-tile { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); transition: transform .15s ease, border-color .15s ease; }
.live-tile:hover { transform: translateY(-3px); border-color: var(--orange); }
.live-tile .tile-top { display: flex; align-items: center; gap: 10px; }
.live-tile .tile-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-tile .tile-track { display: flex; gap: 12px; align-items: center; }
.live-tile .tile-track img, .live-tile .tile-track .hist-art { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; }
.live-tile .tile-track div { min-width: 0; }
.live-tile .tile-track strong, .live-tile .tile-track span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-tile .tile-track span { color: var(--muted); font-size: 14px; }
.empty-live { padding: 26px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }

/* Settings */
.settings { max-width: 760px; }
.settings h1 { font-size: clamp(32px, 4vw, 44px); letter-spacing: -1.2px; margin: 4px 0 18px; }
.settings .card { margin-bottom: 18px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); }
.set-row:first-of-type { border-top: 0; }
.set-row .set-text { flex: 1; min-width: 0; }
.set-row .set-text b { display: block; font-size: 16px; }
.set-row .set-text span { color: var(--muted); font-size: 14px; line-height: 1.45; }
.switch { position: relative; width: 50px; height: 30px; flex-shrink: 0; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--rest); transition: background .2s ease; }
.switch span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s ease; }
.switch input:checked + span { background: var(--orange); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 3px; }
.media-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.banner-prev { width: 100%; aspect-ratio: 3 / 1; border-radius: 18px; overflow: hidden; background: var(--bg); border: 1px dashed var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; }
.banner-prev img { width: 100%; height: 100%; object-fit: cover; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--border); background: var(--bg); cursor: pointer; }
.radio-card input { margin-top: 3px; accent-color: var(--orange); width: 18px; height: 18px; }
.radio-card b { display: block; }
.radio-card span { color: var(--muted); font-size: 14px; }
.radio-card:has(input:checked) { border-color: var(--orange); }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.inline-form input { flex: 1; min-width: 160px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--bg); color: var(--text); font: inherit; }
.people-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.person-row { display: flex; align-items: center; gap: 10px; }
.person-row a { flex: 1; color: var(--text); font-weight: 700; text-decoration: none; }
.saved-note { font-size: 13px; color: var(--ok); font-weight: 700; min-height: 18px; }

@media (max-width: 980px) {
  .profile-grid { grid-template-columns: minmax(0, 1fr); }
  /* on smaller screens, put chat right under the player */
  .profile-grid > .stack { display: contents; }
  #room { order: 1; } #chat { order: 2; } #history-card { order: 3; } .profile-tabs-card { order: 4; }
  .profile-grid > .side-col { display: contents; }
  .chat { position: static; height: 460px; }
}
@media (max-width: 640px) {
  .profile-head.has-banner .profile-avatar { margin-top: -44px; }
  .profile-avatar .avatar { width: 84px !important; height: 84px !important; font-size: 34px !important; }
  .navlink { padding: 6px 8px; font-size: 14px; }
  .site-header { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .react-float { animation-duration: .01s; }
  .live-tile, .react-btn { transition: none; }
}

/* Option pickers in settings */
.set-select {
  flex-shrink: 0; min-height: 42px; padding: 0 36px 0 14px; border-radius: 12px; border: 1.5px solid var(--border);
  background: var(--bg) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round'/></svg>") no-repeat right 12px center;
  color: var(--text); font: inherit; font-size: 15px; font-weight: 600; appearance: none; -webkit-appearance: none; cursor: pointer; max-width: 55%;
}
.set-select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255, 85, 0, .18); }
@media (max-width: 560px) { .set-row:has(.set-select) { flex-direction: column; align-items: stretch; } .set-select { max-width: none; } }

/* Follower / following lists */
.stat-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; }
.stat-btn:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.stat-btn[disabled] { cursor: default; text-decoration: none; }
.people-dialog { width: min(420px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 64px)); padding: 0; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); color: var(--text); }
.people-dialog::backdrop { background: rgba(0, 0, 0, .55); }
.people-dialog .pd-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.people-dialog .pd-head h2 { margin: 0; font-size: 19px; }
.people-dialog .pd-list { padding: 12px 20px 20px; overflow-y: auto; max-height: 440px; display: flex; flex-direction: column; gap: 10px; }
.lock-note { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Site frame + player bar ---------- */
html:has(body.shell), body.shell { height: 100%; overflow: hidden; }
body.shell { margin: 0; --bar-h: 76px; }
body.shell::before { display: none; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: var(--bg); }
body.has-bar #view { height: calc(100% - var(--bar-h) - env(safe-area-inset-bottom, 0px)); }

.player-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  min-height: var(--bar-h); box-sizing: border-box;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: 0 -12px 30px -18px rgba(0, 0, 0, .5);
  animation: barIn .35s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes barIn { from { transform: translateY(100%); } to { transform: none; } }
.bar-art-link { flex-shrink: 0; display: block; border-radius: 10px; }
.bar-art-link[href]:hover .bar-art { filter: brightness(1.1); }
.bar-art { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--border); display: block; }
.bar-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 0 1 260px; }
.bar-title { font-size: 15px; font-weight: 800; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-title[href]:hover { text-decoration: underline; text-underline-offset: 3px; }
.bar-artist { font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-artist[href]:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.player-bar.is-waiting .bar-title { font-weight: 700; }

.bar-middle { flex: 1 1 320px; min-width: 180px; display: flex; flex-direction: column; gap: 6px; }
.bar-progress { display: flex; align-items: center; gap: 10px; }
.bar-time { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); min-width: 34px; }
.bar-time:last-child { text-align: right; }
.bar-track { flex: 1; height: 5px; border-radius: 999px; background: var(--rest); overflow: hidden; }
.bar-track i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--orange); transition: width .5s linear; }
.player-bar.is-waiting .bar-progress { opacity: .4; }
.bar-widget { height: 20px; width: 100%; opacity: .75; transition: opacity .2s ease; }
.bar-widget:hover { opacity: 1; }
.bar-frame { width: 100%; height: 20px; border: 0; display: block; }

.bar-host { display: flex; align-items: center; gap: 8px; flex-shrink: 0; max-width: 200px; padding: 4px 12px 4px 4px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.bar-host:hover { border-color: var(--text); }
.bar-host-pic { display: inline-flex; flex-shrink: 0; }
.bar-host-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.bar-host-label { font-size: 10.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.bar-host-text b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-sync { flex-shrink: 0; font-size: 13px; }
.bar-sc { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--text); text-decoration: none; font-size: 13px; font-weight: 700; }
.bar-sc:hover { border-color: #ff5500; color: #ff5500; }
.bar-sc svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bar-sc[hidden] { display: none; }
.bar-vol { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.bar-vol input { width: 100px; accent-color: var(--orange); }
.bar-leave { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; flex-shrink: 0; }
.bar-leave:hover { border-color: var(--text); }
@media (max-width: 1100px) { .bar-sc span, .bar-sync { display: none; } .bar-sc { padding: 9px; } }
.bar-toast {
  position: fixed; left: 50%; bottom: calc(var(--bar-h) + 16px); transform: translateX(-50%); z-index: 11; margin: 0;
  max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 14px; background: var(--inv); color: var(--inv-text);
  font-weight: 700; font-size: 14px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5);
}

/* "Playing in the bar" note on a profile */
.in-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; padding: 16px 18px; border-radius: 18px; background: var(--bg); }
.in-bar .scribble { font-size: 22px; }

@media (max-width: 760px) {
  body.shell { --bar-h: 150px; }
  .player-bar { flex-wrap: wrap; gap: 8px 10px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .bar-art { width: 44px; height: 44px; }
  .bar-info { flex: 1 1 0; }
  .bar-vol input { display: none; }
  .bar-middle { order: 5; flex: 1 1 100%; }
  .bar-host { order: 6; max-width: none; flex: 1 1 auto; }
  .bar-sc { order: 7; }
}
@media (prefers-reduced-motion: reduce) { .player-bar { animation: none; } }

/* ---------- Settings: tabs + compact layout ---------- */
.settings { max-width: 1000px; }
.settings-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.settings-top h1 { margin: 2px 0 0; }
.settings-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.settings-tabs { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); }
.settings-tabs button { text-align: left; padding: 11px 14px; border: 0; border-radius: 12px; background: none; color: var(--muted); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.settings-tabs button:hover { color: var(--text); background: var(--bg); }
.settings-tabs button[aria-selected="true"] { color: #121212; background: var(--orange); }
.settings .settings-panels .card { margin-bottom: 0; }
.set-row.stacked { flex-direction: column; align-items: stretch; gap: 8px; }
.set-row.stacked textarea { min-height: 64px; }
.media-grid { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 20px; margin: 12px 0 6px; }
.media-box { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.media-box > b { font-size: 15px; }
.avatar-prev { display: block; }
.media-box .banner-prev { margin: 0; }
.radio-list.compact { margin-top: 6px; }
.radio-list.compact .radio-card { padding: 11px 14px; }
.history-more { margin-top: 10px; }

@media (max-width: 820px) {
  .settings-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .settings-tabs { position: static; flex-direction: row; overflow-x: auto; padding: 6px; scrollbar-width: none; }
  .settings-tabs::-webkit-scrollbar { display: none; }
  .settings-tabs button { flex-shrink: 0; padding: 9px 14px; font-size: 14px; }
  .media-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Crop window ---------- */
.crop-dialog { padding: 20px; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); color: var(--text); max-width: calc(100vw - 24px); }
.crop-dialog::backdrop { background: rgba(0, 0, 0, .6); }
.crop-head h2 { margin: 0 0 14px; font-size: 20px; }
.crop-stage { position: relative; overflow: hidden; border-radius: 14px; background: #000; cursor: grab; touch-action: none; margin: 0 auto; }
.crop-stage:active { cursor: grabbing; }
.crop-stage:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.crop-stage img { position: absolute; left: 0; top: 0; max-width: none; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.crop-mask { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .8); border-radius: 14px; }
.crop-mask.is-round { border-radius: 50%; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .5), inset 0 0 0 2px rgba(255, 255, 255, .85); }
.crop-hint { text-align: center; font-size: 13px; margin: 10px 0 4px; }
.crop-zoom { display: flex; align-items: center; gap: 10px; max-width: 360px; margin: 0 auto; font-weight: 800; color: var(--muted); }
.crop-zoom input { flex: 1; accent-color: var(--orange); }
.crop-actions { justify-content: flex-end; margin-top: 16px; }

/* ---------- Color editor ---------- */
.color-editor { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.color-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 18px; align-items: start; }
.color-fields { display: flex; flex-direction: column; gap: 10px; }
.color-field { display: flex; align-items: center; gap: 12px; }
.swatch-wrap { position: relative; width: 44px; height: 44px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); flex-shrink: 0; cursor: pointer; }
.swatch-wrap input { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); border: 0; padding: 0; cursor: pointer; }
.cf-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cf-text b { font-size: 15px; }
.cf-text span { font-size: 13px; color: var(--muted); }
.hex-input { width: 92px; min-height: 38px; padding: 0 10px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--bg); color: var(--text); font: 600 14px ui-monospace, Menlo, Consolas, monospace; }
.hex-input.is-custom { border-color: var(--orange); }
.color-preview { padding: 16px; border-radius: 18px; background: var(--p-bg); border: 1px solid var(--border); }
.cp-card { padding: 14px; border-radius: 16px; background: var(--p-surface); color: var(--p-text); display: flex; flex-direction: column; gap: 12px; }
.cp-row { display: flex; gap: 10px; align-items: center; }
.cp-row b { display: block; font-size: 15px; }
.cp-row span { font-size: 13px; opacity: .7; }
.cp-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--p-accent); flex-shrink: 0; }
.cp-bar { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--p-text) 18%, var(--p-surface)); overflow: hidden; }
.cp-bar i { display: block; width: 55%; height: 100%; background: var(--p-accent); }
.cp-btn { align-self: flex-start; padding: 8px 16px; border-radius: 999px; background: var(--p-accent); color: #121212; font-weight: 800; font-size: 14px; }
@media (max-width: 700px) { .color-layout { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Parties ---------- */
.party-callout {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 20px; padding: 16px 20px; border-radius: 22px;
  background: color-mix(in srgb, var(--orange) 14%, var(--surface)); border: 1.5px solid var(--orange); color: var(--text); text-decoration: none;
}
.party-callout:hover { background: color-mix(in srgb, var(--orange) 22%, var(--surface)); }
.party-callout > span:nth-child(2) { flex: 1; min-width: 180px; }
.party-callout b { font-size: 17px; }
.party-emoji { font-size: 28px; }
.party-head { margin: 4px 0 24px; }
.party-head h1 { margin: 2px 0 10px; font-size: clamp(30px, 5vw, 48px); letter-spacing: -1.4px; overflow-wrap: anywhere; }
.party-host { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.party-host-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-size: 15px; }
.party-host-link b { font-weight: 800; }
.party-tile .tile-top b { font-size: 16px; }
.check-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--muted); cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--orange); }
.side-col { gap: 20px; }
.local-player { margin-top: 12px; }

/* Guest / anonymous listener chips */
.listener.is-group { padding: 4px 12px 4px 4px; }
.guest-icon { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--rest); }
.guest-icon svg { width: 16px; height: 16px; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.guest-icon.is-anon { background: color-mix(in srgb, var(--orange) 25%, var(--surface)); }
.guest-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--orange); color: #121212; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Profile tabs: Favorites / Stats / Comments ---------- */
.ptabs { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); margin-bottom: 18px; width: fit-content; max-width: 100%; overflow-x: auto; }
.ptabs button { padding: 9px 18px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; white-space: nowrap; }
.ptabs button[aria-selected="true"] { background: var(--orange); color: #121212; }
.tab-count { font-size: 12px; opacity: .8; }
.small { font-size: 13px !important; }
.pin-btn { flex-shrink: 0; width: 34px; height: 34px; border: 0; border-radius: 10px; background: none; color: var(--muted); font-size: 19px; line-height: 1; cursor: pointer; }
.pin-btn:hover { background: var(--bg); color: var(--text); }
.pin-btn.is-on { color: var(--orange); }

.fav-group + .fav-group { margin-top: 20px; }
.fav-group h3, .stats-cols h3 { margin: 0 0 12px; font-size: 16px; }
.fav-artists { display: flex; flex-wrap: wrap; gap: 14px; }
.fav-artist-wrap { position: relative; }
.fav-artist-wrap .pin-btn { position: absolute; top: -6px; right: -6px; background: var(--surface); border: 1px solid var(--border); width: 28px; height: 28px; font-size: 15px; border-radius: 50%; }
.fav-artist { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 92px; text-decoration: none; color: var(--text); text-align: center; }
.fav-artist img, .fav-art-empty { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: var(--rest); }
.fav-art-empty { display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 30px; text-transform: uppercase; color: var(--muted); }
.fav-name { font-weight: 700; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.fav-tracks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fav-tracks li, .history li { display: flex; align-items: center; gap: 12px; }
.fav-tracks li .hist-text, .history li .hist-text { flex: 1; }
.fav-tracks img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; }
.fav-tracks b { font-weight: 700; }

.stats-top { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.period { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); }
.period button { padding: 6px 12px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.period button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.stat-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.stat-tile { padding: 14px 16px; border-radius: 16px; background: var(--bg); border: 1px solid var(--border); }
.stat-tile b { display: block; font-size: 28px; letter-spacing: -1px; line-height: 1.1; }
.stat-tile span { font-size: 13px; color: var(--muted); }
.stats-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.top-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.top-list li { display: flex; align-items: center; gap: 10px; }
.top-list .rank { width: 20px; text-align: right; font-weight: 800; color: var(--muted); font-size: 14px; flex-shrink: 0; }
.top-list img, .top-list .hist-art { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.top-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.top-main a, .top-main b { color: var(--text); font-weight: 700; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-main a:hover { text-decoration: underline; }
.top-bar { height: 6px; border-radius: 999px; background: var(--rest); overflow: hidden; }
.top-bar i { display: block; height: 100%; background: var(--orange); border-radius: 999px; }
.plays { font-size: 13px; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) {
  .stats-cols { grid-template-columns: minmax(0, 1fr); }
  .stat-tile b { font-size: 22px; }
}

/* Live now: start a party */
.start-party { margin-top: 20px; padding: 20px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); }
.start-party h2 { margin: 0 0 6px; font-size: 20px; }

.empty-row { display: block !important; }

/* ---------- Profile: Stats/Favorites on the left, pop-out windows ---------- */
.profile-grid.side-left { grid-template-columns: 320px minmax(0, 1fr); }
.peek-card { display: flex; flex-direction: column; gap: 10px; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
.peek-card:hover { border-color: var(--orange); transform: translateY(-2px); }
.peek-head { display: flex; justify-content: space-between; align-items: center; }
.peek-head b { font-size: 18px; }
.peek-open { font-size: 13px; font-weight: 700; color: var(--accent-text); }
.peek-body { display: flex; flex-direction: column; gap: 10px; }
.peek-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.peek-stats > span { padding: 10px; border-radius: 12px; background: var(--bg); display: flex; flex-direction: column; }
.peek-stats b { font-size: 20px; line-height: 1.1; }
.peek-stats small { font-size: 12px; color: var(--muted); }
.peek-line { font-size: 13px; }
.peek-faces { display: flex; }
.peek-faces img, .peek-face { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 3px solid var(--surface); margin-left: -8px; background: var(--rest); }
.peek-faces > :first-child { margin-left: 0; }
.peek-face { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: var(--muted); text-transform: uppercase; }

.pop-dialog { width: min(820px, calc(100vw - 24px)); max-height: min(86vh, 900px); padding: 0; border: 1px solid var(--border); border-radius: 26px; background: var(--surface); color: var(--text); overflow: hidden; }
.pop-dialog[open] { display: flex; flex-direction: column; animation: popIn .22s cubic-bezier(.2, .9, .3, 1.15); }
.pop-dialog::backdrop { background: rgba(0, 0, 0, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.pop-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.pop-head h2 { margin: 0; font-size: 22px; }
.pop-body { padding: 20px 22px 24px; overflow-y: auto; }
@keyframes popIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pop-dialog[open] { animation: none; } }

@media (max-width: 980px) {
  .profile-grid.side-left { grid-template-columns: minmax(0, 1fr); }
  .profile-grid.side-left > .side-col, .profile-grid.side-left > .stack { display: contents; }
  #room { order: 1; } #stats-peek { order: 2; } #fav-peek { order: 3; } #comments-card { order: 4; } #history-card { order: 5; }
}

/* "Show N more" drop-downs */
.collapse-toggle { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.collapse-toggle::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s ease; }
.collapse-toggle.is-open::after { transform: rotate(-135deg) translateY(-2px); }
.collapse-toggle:hover { border-color: var(--text); }
.listeners + .collapse-toggle { margin-top: 10px; }

/* Add a favorite by link */
.fav-add { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; padding: 14px; border-radius: 16px; background: var(--bg); border: 1px dashed var(--border); }
.fav-add b { font-size: 15px; }
.fav-add .inline-form { margin-top: 0; }
.fav-add-msg { font-size: 13px; min-height: 18px; }
.fav-add-msg.bad { color: #d93025; }
[data-theme="dark"] .fav-add-msg.bad { color: #ff8a80; }

.media-wide { grid-column: 1 / -1; }
.bg-prev { width: 100%; aspect-ratio: 16 / 7; border-radius: 16px; overflow: hidden; background: var(--bg); border: 1px dashed var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; position: relative; }
.bg-prev img { width: 100%; height: 100%; object-fit: cover; }
.bg-prev .bg-fade { position: absolute; inset: 0; background: var(--bg); }

/* Opened drop-downs scroll inside a small box */
.is-scroll { max-height: 300px; overflow-y: auto; overscroll-behavior: contain; padding-right: 6px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.is-scroll::-webkit-scrollbar { width: 6px; }
.is-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
.is-scroll::-webkit-scrollbar-track { background: transparent; }
.comments.is-scroll { max-height: 380px; }
.listeners.is-scroll, .fav-artists.is-scroll { max-height: 200px; }

/* ---------- Avatar decorations ---------- */
.deco-avatar { position: relative; display: inline-flex; flex-shrink: 0; }
.deco-svg { position: absolute; left: -25%; top: -25%; width: 150%; height: 150%; pointer-events: none; z-index: 2; }
.deco-svg svg { width: 100%; height: 100%; overflow: visible; display: block; }
.deco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.deco-choice { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 26px 10px 14px; border-radius: 18px; border: 2px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.deco-choice[aria-pressed="true"] { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255, 85, 0, .18); }
.deco-choice:hover { border-color: var(--text); }

/* ---------- Profile editor ---------- */
.edit-bar {
  position: sticky; top: 10px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 0 18px; padding: 14px 18px; border-radius: 20px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent-text) 45%, var(--border));
  box-shadow: 0 16px 40px -20px rgba(0, 0, 0, .55);
}
.edit-bar-text { display: flex; flex-direction: column; min-width: 220px; flex: 1; }
.edit-bar-text b { font-size: 16px; }
.edit-bar-text span { font-size: 13px; color: var(--muted); }
.edit-bar .form-msg { width: 100%; margin: 0; }
.hidden-tray { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.tray-chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.tray-chip:hover { background: color-mix(in srgb, var(--orange) 14%, transparent); }

body.editing .pcol { min-height: 160px; border-radius: 26px; transition: background .2s ease, box-shadow .2s ease; }
body.editing.is-dragging .pcol { background: color-mix(in srgb, var(--accent-text) 6%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-text) 22%, transparent); }
body.editing [data-block] { position: relative; transition: box-shadow .15s ease; }
body.editing [data-block]:hover { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent-text) 45%, transparent); }
body.editing .peek-card { cursor: default; transform: none !important; }
.block-tools { display: flex; align-items: center; gap: 8px; margin: -6px -6px 12px; padding: 4px 6px 8px; border-bottom: 1px solid var(--border); cursor: grab; user-select: none; }
.block-tools:active { cursor: grabbing; }
.block-drag { font-size: 16px; line-height: 1; color: var(--muted); opacity: .7; }
.block-name { flex: 1; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.block-x { width: 26px; height: 26px; border-radius: 50%; border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.block-x:hover { background: #d93025; color: #fff; }
.block-ghost { opacity: .35; }
.is-removed { display: none !important; }

.editable { cursor: pointer; position: relative; border-radius: 10px; transition: background .15s ease; }
body.editing #p-name.editable, body.editing #p-bio.editable { width: fit-content; max-width: 100%; margin-left: -8px; padding: 0 8px; }
body.editing #p-name.editable:hover, body.editing #p-bio.editable:hover { background: color-mix(in srgb, var(--accent-text) 10%, transparent); }
body.editing #p-name.editable::after, body.editing #p-bio.editable::after {
  content: "✎"; margin-left: 8px; font-size: 14px; font-weight: 700; color: var(--accent-text); opacity: 0; vertical-align: middle; transition: opacity .15s ease;
}
body.editing #p-name.editable:hover::after, body.editing #p-bio.editable:hover::after { opacity: 1; }
body.editing #p-name:has(input)::after, body.editing #p-bio:has(textarea)::after { display: none; }
body.editing #p-avatar.editable { border-radius: 50%; }
body.editing #p-avatar.editable::after {
  content: "✎"; position: absolute; right: 2px; bottom: 2px; z-index: 3; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700;
  background: var(--surface); color: var(--accent-text); box-shadow: 0 0 0 1px var(--border);
}
body.editing .banner.editable::before {
  content: "✎ Change banner"; position: absolute; right: 14px; bottom: 14px; z-index: 2; padding: 7px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700; background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--text);
  box-shadow: 0 0 0 1px var(--border); opacity: 0; transition: opacity .15s ease;
}
body.editing .banner.editable:hover::before { opacity: 1; }
body.editing .banner.is-empty::before { display: none; }
.inline-input { font: inherit; color: var(--text); background: var(--bg); border: 2px solid var(--orange); border-radius: 12px; padding: 4px 10px; }
.handle-input { font-size: inherit; font-weight: 800; width: min(360px, 70vw); letter-spacing: inherit; }
.bio-input { width: min(620px, 100%); font-size: 16px; line-height: 1.5; resize: vertical; }
.banner.is-empty { display: flex; align-items: center; justify-content: center; aspect-ratio: 6 / 1; background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--border); transition: background .15s ease; }
.banner.is-empty:hover { background: color-mix(in srgb, var(--accent-text) 8%, var(--surface)); }
.banner.is-empty img { display: none; }
.banner.is-empty::after { content: "+ Add a banner"; color: var(--muted); font-weight: 700; font-size: 15px; }

@media (max-width: 980px) {
  .profile-grid.side-left [data-block] { order: 0 !important; }
  .profile-grid.side-left [data-block="player"] { order: -1 !important; }
  body.editing .profile-grid.side-left { grid-template-columns: minmax(0, 1fr); }
  body.editing .pcol { display: flex !important; flex-direction: column; gap: 16px; }
  body.editing .profile-grid.side-left [data-block="player"] { order: 0 !important; }
}

.deco-grid.compact { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.deco-grid.compact .deco-choice { padding: 20px 6px 10px; font-size: 12px; gap: 10px; }
.avatar-prev { padding: 22px 0 6px 22px; }

/* ---------- Display name + @username ---------- */
.profile-head h1#p-name { margin-bottom: 0; line-height: 1.1; overflow-wrap: anywhere; }
.profile-handle { margin: 2px 0 10px; font-size: 16px; font-weight: 600; color: var(--muted); }
.profile-handle #p-handle { display: inline-block; }
.name-tag { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; max-width: 100%; color: var(--text); text-decoration: none; }
.name-tag .nt-name { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.name-tag .nt-handle { font-weight: 500; font-size: .9em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.name-tag:hover .nt-name { text-decoration: underline; }
.name-input { font-size: inherit; font-weight: 800; width: min(520px, 80vw); letter-spacing: inherit; }
.profile-handle .handle-input { font-size: 16px; font-weight: 600; width: min(260px, 60vw); }
body.editing #p-handle.editable { padding: 0 8px; margin-left: -8px; }
body.editing #p-handle.editable:hover { background: color-mix(in srgb, var(--accent-text) 10%, transparent); }
body.editing #p-handle.editable::after { content: "✎"; margin-left: 6px; font-size: 13px; color: var(--accent-text); opacity: 0; transition: opacity .15s ease; }
body.editing #p-handle.editable:hover::after { opacity: 1; }
body.editing #p-handle:has(input)::after { display: none; }

/* ---------- Nav icons: messages + notifications ---------- */
.navicon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; color: var(--text); }
.navicon:hover, .navicon.is-here { background: var(--rest); }
.navicon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nav-count { position: absolute; top: 1px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #e0262c; color: #fff; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--bg); }
.nav-count[hidden] { display: none; }
.scl-toast { position: fixed; left: 50%; bottom: 96px; z-index: 100; transform: translateX(-50%); padding: 12px 18px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 700; font-size: 14px; box-shadow: 0 12px 30px -10px rgba(0,0,0,.5); animation: toastIn .25s ease; transition: opacity .4s ease, transform .4s ease; }
.scl-toast.is-out { opacity: 0; transform: translate(-50%, 10px); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ---------- Notifications page ---------- */
.narrow-page { max-width: 760px; }
.page-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 18px; }
.page-title-row h1 { margin: 0; }
.noti-list { display: flex; flex-direction: column; gap: 10px; }
.noti { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.noti.is-new { border-color: color-mix(in srgb, var(--accent-text) 50%, var(--border)); background: color-mix(in srgb, var(--accent-text) 6%, var(--surface)); }
.noti-avatar { position: relative; flex-shrink: 0; }
.noti-kind { position: absolute; right: -6px; bottom: -4px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 1px var(--border); display: flex; align-items: center; justify-content: center; font-size: 12px; color: #ff5a8a; }
.noti-body { flex: 1; min-width: 0; }
.noti-line { margin: 0; line-height: 1.4; }
.noti-line .name-tag { display: inline-flex; vertical-align: baseline; }
.noti-quote { margin: 4px 0 2px; padding-left: 10px; border-left: 3px solid var(--border); color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.noti-pct { color: var(--accent-text); }
.noti-empty { padding: 36px 20px; }

/* ---------- Messages page ---------- */
.dm-page { max-width: 1100px; }
.dm-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; height: min(76vh, 760px); min-height: 460px; }
.dm-list-card, .dm-thread-card { display: flex; flex-direction: column; min-height: 0; padding: 16px; }
.dm-title { margin: 0 0 12px; font-size: 26px; }
.dm-new input { width: 100%; }
.dm-list { flex: 1; overflow-y: auto; margin-top: 12px; display: flex; flex-direction: column; gap: 4px; scrollbar-width: thin; }
.dm-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 14px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.dm-row:hover, .dm-row.is-open { background: var(--bg); }
.dm-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dm-row-top { display: flex; justify-content: space-between; gap: 8px; min-width: 0; }
.dm-row-top .name-tag { min-width: 0; }
.dm-row-last { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-row.is-unread .dm-row-last { color: var(--text); font-weight: 700; }
.dm-unread { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--orange); color: #121212; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.dm-empty { margin: auto; text-align: center; }
.dm-thread { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.dm-thread-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.dm-back { display: none; }
.dm-who { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-width: 0; }
.dm-log { flex: 1; overflow-y: auto; padding: 14px 4px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; }
.dm-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 78%; }
.dm-msg.is-mine { align-self: flex-end; align-items: flex-end; }
.dm-msg time { font-size: 11px; color: var(--muted); margin-top: 3px; }
.dm-text { margin: 0; padding: 9px 14px; border-radius: 18px 18px 18px 6px; background: var(--bg); overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.4; }
.dm-msg.is-mine .dm-text { border-radius: 18px 18px 6px 18px; background: var(--orange); color: #121212; }
.dm-match { padding: 16px 18px; border-radius: 22px; text-align: center; background: linear-gradient(135deg, color-mix(in srgb, #ff7eb6 30%, var(--surface)), color-mix(in srgb, #b9a4ff 30%, var(--surface))); border: 1px solid color-mix(in srgb, #ff7eb6 50%, var(--border)); max-width: 320px; }
.dm-match-top { font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.dm-match-pct { display: block; font-size: 44px; line-height: 1.1; letter-spacing: -2px; margin: 4px 0; }
.dm-match p { margin: 0; font-size: 14px; }
.dm-compose { display: flex; gap: 10px; align-items: flex-end; padding-top: 12px; border-top: 1px solid var(--border); }
.dm-compose textarea { flex: 1; resize: none; min-height: 44px; max-height: 140px; border-radius: 22px; padding: 11px 16px; }
.dm-note { margin: 8px 0 0; }
@media (max-width: 760px) {
  .dm-layout { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 190px); }
  .dm-layout .dm-thread-card { display: none; }
  .dm-layout.show-thread .dm-list-card { display: none; }
  .dm-layout.show-thread .dm-thread-card { display: flex; }
  .dm-back { display: inline-flex; }
}

/* ---------- Badges: small and quiet, in the profile's accent color ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 14px; margin: 4px 0 12px; }
.badges:empty { display: none; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
.badge-icon { display: inline-flex; width: 15px; height: 15px; color: var(--accent-text); }
.badge-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Match ---------- */
.btn-match { background: linear-gradient(135deg, #ff7eb6, #b9a4ff); color: #1a1020; border: 0; }
.btn-match:hover { filter: brightness(1.06); }
.match-dialog { width: min(460px, calc(100vw - 24px)); }
.match-body { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.match-faces { display: flex; align-items: center; gap: 12px; }
.match-heart { font-size: 26px; color: #ff5a8a; animation: heartBeat 1.2s ease-in-out infinite; }
.match-dialog.is-low .match-heart { color: var(--muted); animation: none; }
@keyframes heartBeat { 50% { transform: scale(1.25); } }
.match-ring { --p: 0; width: 160px; height: 160px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(closest-side, var(--surface) 78%, transparent 80% 100%), conic-gradient(#ff7eb6 calc(var(--p) * 1%), var(--rest) 0); }
.match-dialog.is-low .match-ring { background: radial-gradient(closest-side, var(--surface) 78%, transparent 80% 100%), conic-gradient(#7aa2ff calc(var(--p) * 1%), var(--rest) 0); }
.match-ring b { font-size: 40px; letter-spacing: -2px; }
.match-verdict { margin: 0; font-weight: 700; font-size: 17px; max-width: 340px; }
.match-shared { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.match-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.match-chip { padding: 4px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); font-size: 13px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .match-heart { animation: none; } }

/* ---------- Picture menu + decoration picker extras ---------- */
.profile-head { position: relative; }
.pic-menu { position: absolute; left: 20px; top: 128px; z-index: 30; min-width: 210px; padding: 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 18px 40px -16px rgba(0,0,0,.55); display: flex; flex-direction: column; animation: popIn .16s ease; }
.pic-menu button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; font-weight: 700; font-size: 14px; text-align: left; cursor: pointer; }
.pic-menu button:hover, .pic-menu button:focus-visible { background: var(--bg); }
.pic-menu button.danger { color: #e5484d; }
.pm-icon { width: 22px; text-align: center; }
.deco-choice { position: relative; }
.anim-tag { position: absolute; top: 7px; left: 50%; transform: translateX(-50%); padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .4px; white-space: nowrap;
  background: linear-gradient(135deg, #ff7eb6, #b9a4ff); color: #1a1020; }
.deco-sizes { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.deco-sizes span { margin-right: 4px; }
.deco-sizes button { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.deco-sizes button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.deco-choice { padding-top: 34px; }

/* ---------- Stickers ---------- */
.profile-wrap { position: relative; }
.sticker-layer { position: absolute; inset: 0; z-index: 6; pointer-events: none; overflow: visible; }
.sticker { position: absolute; pointer-events: none; user-select: none; touch-action: none;
  filter: drop-shadow(3px 0 0 #fffaf2) drop-shadow(-3px 0 0 #fffaf2) drop-shadow(0 3px 0 #fffaf2) drop-shadow(0 -3px 0 #fffaf2) drop-shadow(2px 5px 6px rgba(40, 20, 30, .3)); }
.sticker > svg { width: 100%; height: 100%; display: block; }
.sticker-layer.is-editing .sticker { pointer-events: auto; cursor: grab; }
.sticker-layer.is-editing .sticker:hover { outline: 1.5px dashed color-mix(in srgb, var(--accent-text) 60%, transparent); outline-offset: 4px; border-radius: 10px; }
.sticker.is-selected { outline: 2px solid var(--accent-text) !important; outline-offset: 5px; border-radius: 10px; }
.sticker.is-dragging { cursor: grabbing; opacity: .9; }
.sticker:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 5px; }
.sticker-tools { position: absolute; transform: translateX(-50%); z-index: 7; pointer-events: auto; display: flex; gap: 2px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 10px 24px -12px rgba(0,0,0,.5); }
.sticker-tools button { width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; }
.sticker-tools button:hover { background: var(--bg); }

.sticker-drawer { position: fixed; left: 50%; bottom: 84px; z-index: 40; transform: translateX(-50%); width: min(720px, calc(100vw - 20px)); max-height: 46vh; display: flex; flex-direction: column;
  padding: 12px 14px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 24px 60px -20px rgba(0,0,0,.6); animation: popIn .2s ease; }
.sticker-drawer[hidden] { display: none; }
.sd-head { display: flex; align-items: center; gap: 10px; }
.sd-tabs { flex: 1; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.sd-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-weight: 700; font-size: 13px; white-space: nowrap; cursor: pointer; }
.sd-tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); }
.sd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; margin-top: 10px; overflow-y: auto; padding: 4px; scrollbar-width: thin; }
.sd-item { aspect-ratio: 1; border: 0; border-radius: 14px; background: var(--bg); padding: 8px; cursor: pointer; transition: transform .12s ease; }
.sd-item:hover { transform: scale(1.08) rotate(-3deg); }
.sd-item > svg { width: 100%; height: 100%; }
.sd-help { margin: 8px 2px 0; }
.dm-new input, .dm-compose textarea { width: 100%; font: inherit; font-size: 15px; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 11px 16px; outline: none; }
.dm-compose textarea { border-radius: 22px; }
.dm-new input:focus, .dm-compose textarea:focus { border-color: var(--accent-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-text) 20%, transparent); }

/* Decoration colors */
.deco-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; padding: 12px 14px; border-radius: 16px; background: var(--bg); border: 1px solid var(--border); }
.deco-colors-label { display: flex; flex-direction: column; margin-right: 6px; min-width: 110px; }
.deco-colors-label b { font-size: 14px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border); background: var(--sw); cursor: pointer; padding: 0; position: relative; transition: transform .12s ease; }
.swatch:hover { transform: scale(1.12); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent-text); }
.swatch-custom { background: conic-gradient(#ff4d4d, #ffd84d, #7ed957, #5bcefa, #b9a4ff, #ff7eb6, #ff4d4d); overflow: hidden; }
.swatch-custom input { position: absolute; inset: -6px; width: 42px; height: 42px; opacity: 0; cursor: pointer; }
.anim-tag { top: 7px; left: 7px; transform: none; }
.deco-colors-label { flex-basis: 100%; flex-direction: row; align-items: baseline; gap: 8px; margin: 0 0 2px; }
.deco-colors .btn { margin-left: 4px; }
/* the "Animated" tag sits under the name so it never covers the ears */
.deco-choice .anim-tag { position: static; order: 3; margin-top: -6px; }
.deco-choice { padding-top: 30px; }

/* pencils only show when you hover (or tab to) the name, @username or bio */
body.editing #p-name.editable:hover::after, body.editing #p-bio.editable:hover::after, body.editing #p-handle.editable:hover::after,
body.editing #p-name.editable:focus-visible::after, body.editing #p-bio.editable:focus-visible::after, body.editing #p-handle.editable:focus-visible::after { opacity: 1; }

/* the top menu always stays above anything on the page */
.site-header { position: relative; z-index: 12; }

/* "Use this theme everywhere?" question */
.site-theme-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin: 14px 0 6px; padding: 14px 16px; border-radius: 18px;
  background: color-mix(in srgb, var(--accent-text) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent-text) 35%, var(--border)); animation: popIn .22s ease; }
.site-theme-ask[hidden] { display: none; }
.sta-emoji { font-size: 22px; }
.sta-text { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 2px; }
.sta-text span { font-size: 13px; color: var(--muted); }

/* ---------- Account menu (your picture, top right) ---------- */
.acct { position: relative; display: inline-flex; }
.acct-btn { padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; display: inline-flex; }
.acct-btn:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.acct-btn[aria-expanded="true"] .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent-text); }
.acct-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; width: 250px; padding: 6px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 22px 50px -18px rgba(0,0,0,.6); animation: popIn .16s ease; }
.acct-menu[hidden] { display: none; }
.acct-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; color: var(--text); text-decoration: none; }
.acct-head:hover, .acct-head:focus-visible { background: var(--bg); outline: none; }
.acct-names { display: flex; flex-direction: column; min-width: 0; }
.acct-names b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-names span { font-size: 13px; color: var(--muted); }
.acct-sep { height: 1px; margin: 6px 4px; background: var(--border); }
.acct-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none;
  color: var(--text); font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; text-align: left; cursor: pointer; }
.acct-item:hover, .acct-item:focus-visible { background: var(--bg); outline: none; }
.acct-item svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: var(--muted); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.acct-item:hover svg { stroke: var(--accent-text); }
.acct-item.is-danger { color: #e5484d; }
.acct-item.is-danger svg { stroke: #e5484d; }

/* Taste match chip, next to followers / following */
.match-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 10px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 700; color: var(--text);
  background: color-mix(in srgb, var(--accent-text) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent-text) 30%, var(--border));
  transition: background .15s ease, border-color .15s ease; }
.match-chip:hover { background: color-mix(in srgb, var(--accent-text) 18%, transparent); border-color: var(--accent-text); }
.match-chip svg { width: 15px; height: 15px; fill: none; stroke: var(--accent-text); stroke-width: 2.2; stroke-linejoin: round; }
.match-chip.is-high svg { fill: var(--accent-text); }
.match-chip[hidden] { display: none; }

/* ---------- Loading skeleton (profiles + parties) ---------- */
body.is-loading .site-footer { visibility: hidden; }
.skeleton { display: flex; flex-direction: column; gap: 18px; }
.skeleton[hidden] { display: none; }
.sk-banner, .sk-circle, .sk-lines i, .sk-card {
  background: linear-gradient(90deg, var(--rest) 0%, color-mix(in srgb, var(--rest) 55%, var(--surface)) 50%, var(--rest) 100%);
  background-size: 200% 100%; animation: skShimmer 1.3s ease-in-out infinite; }
.sk-banner { height: 220px; border-radius: 26px; }
.sk-head { display: flex; align-items: center; gap: 20px; margin-top: -60px; padding-left: 20px; }
.sk-circle { width: 112px; height: 112px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 6px var(--bg); }
.sk-lines { display: flex; flex-direction: column; gap: 10px; padding-top: 60px; }
.sk-lines i { display: block; height: 14px; max-width: 60vw; border-radius: 999px; }
.sk-lines i:first-child { height: 26px; }
.sk-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; }
.sk-card { height: 180px; border-radius: 24px; }
.sk-card.tall { height: 300px; }
@keyframes skShimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (max-width: 760px) { .sk-grid { grid-template-columns: 1fr; } .sk-banner { height: 140px; } }
@media (prefers-reduced-motion: reduce) { .sk-banner, .sk-circle, .sk-lines i, .sk-card { animation: none; } }

/* ---------- Pinned song ---------- */
.pinned-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.pinned-head h2 { margin: 0; font-size: 18px; }
.pinned-head svg { width: 18px; height: 18px; fill: var(--accent-text); transform: rotate(-20deg); }
.pinned-embed iframe { width: 100%; height: 166px; border: 0; border-radius: 14px; display: block; background: var(--bg); }
.pinned-embed[hidden] { display: none; }
.pinned-empty { margin: 0; padding: 18px; border-radius: 14px; background: var(--bg); text-align: center; font-size: 14px; }
.pinned-form { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.pinned-form[hidden] { display: none; }

/* decoration picker groups */
.deco-group-title { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; margin: 10px 2px -2px; font-weight: 800; font-size: 15px; }
.deco-group-title:first-child { margin-top: 0; }

/* movable sticker drawer */
.sticker-drawer.is-placed { transform: none; bottom: auto; }
.sticker-drawer.is-dragging { opacity: .92; box-shadow: 0 30px 70px -20px rgba(0,0,0,.7); user-select: none; }
.sd-grip { display: flex; justify-content: center; padding: 2px 0 8px; margin: -4px 0 0; cursor: grab; touch-action: none; }
.sd-grip span { width: 44px; height: 5px; border-radius: 999px; background: var(--border); }
.sd-grip:hover span { background: var(--muted); }
.sticker-drawer.is-dragging .sd-grip { cursor: grabbing; }
.sd-head { cursor: grab; touch-action: none; }
.sd-head button, .sd-head [role=tab] { cursor: pointer; }
.sd-small { width: 32px; height: 32px; font-size: 18px; }
.sticker-drawer.is-min .sd-grid, .sticker-drawer.is-min .sd-help { display: none; }
.sd-item > svg { filter: drop-shadow(2px 0 0 #fffaf2) drop-shadow(-2px 0 0 #fffaf2) drop-shadow(0 2px 0 #fffaf2) drop-shadow(0 -2px 0 #fffaf2); }

/* ---------- Social icons + joined/UID ---------- */
.p-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 2px 0 10px; }
.p-extra[hidden] { display: none; }
.socials { display: flex; flex-wrap: wrap; gap: 4px; }
.socials:empty { display: none; }
.social { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  color: var(--muted); background: none; border: 0; cursor: pointer; transition: color .15s ease, background .15s ease; }
.social svg { width: 17px; height: 17px; fill: currentColor; }
.social:hover, .social:focus-visible { color: var(--text); background: var(--rest); outline: none; }
.p-meta { font-size: 13px; color: var(--muted); }
.p-meta:empty { display: none; }

.social-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; width: 100%; }
.sf-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sf-icon { width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; background: var(--rest); display: inline-flex; align-items: center; justify-content: center; color: var(--text); }
.sf-icon svg { width: 16px; height: 16px; fill: currentColor; }
.sf-name { width: 78px; flex-shrink: 0; font-size: 13px; font-weight: 700; }
.sf-row input { flex: 1; min-width: 0; padding: 8px 10px; font-size: 14px; }
.sf-row input.is-bad { border-color: #e5484d; }
@media (max-width: 640px) { .social-fields { grid-template-columns: 1fr; } }

/* ---------- Bottom bar: everyone listening ---------- */
.bar-people { display: flex; align-items: center; flex-shrink: 0; padding-left: 4px; }
.bar-people[hidden], .bar-people:empty { display: none; }
.bp-face { padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; margin-left: -8px; transition: transform .15s ease; position: relative; }
.bp-face:first-child { margin-left: 0; }
.bp-face .avatar { box-shadow: 0 0 0 2px var(--surface); }
.bp-face:hover, .bp-face:focus-visible { transform: translateY(-3px); z-index: 2; outline: none; }
.bp-face:focus-visible .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-text); }
.bp-more { margin-left: -6px; min-width: 28px; height: 28px; padding: 0 7px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; background: var(--rest); color: var(--text); box-shadow: 0 0 0 2px var(--surface); }
.bar-peek { position: fixed; z-index: 30; width: 260px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 20px 44px -16px rgba(0,0,0,.6); display: flex; flex-direction: column; gap: 10px; animation: popIn .16s ease; }
.bar-peek[hidden] { display: none; }
.bpk-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bpk-names { display: flex; flex-direction: column; min-width: 0; }
.bpk-names b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bpk-names span { font-size: 13px; color: var(--muted); }
.bpk-bio { margin: 0; font-size: 13px; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bar-peek .btn { align-self: flex-start; }
@media (max-width: 1100px) { .bar-people { order: 6; } }
@media (max-width: 760px) { .bar-people { order: 6; } .bar-host { flex: 0 1 auto; } }
.sf-row input { font: inherit; font-size: 14px; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; outline: none; }
.sf-row input:focus { border-color: var(--accent-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-text) 20%, transparent); }
.sf-row input::placeholder { color: var(--muted); }
/* tighter, smaller social icons, with a dot before the joined date */
.p-extra { gap: 4px 0; }
.socials { gap: 0; }
.social { width: 24px; height: 24px; border-radius: 7px; }
.social svg { width: 14px; height: 14px; }
.socials:not(:empty) + .p-meta:not(:empty) { margin-left: 10px; }

/* Only our own progress line: the SoundCloud player still plays the music, just out of sight.
   (The song title, artwork and the SoundCloud button still take you to the song.) */
.bar-widget { position: absolute; width: 2px; height: 2px; left: 0; bottom: 0; opacity: 0; overflow: hidden; pointer-events: none; }
.bar-middle { justify-content: center; }
.bar-track { height: 6px; }

/* Lots of listeners: one bubble, click for the full list */
.bp-bubble { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.bp-bubble:hover, .bp-bubble[aria-expanded="true"] { border-color: var(--text); }
.bp-stack { display: inline-flex; }
.bp-stack .avatar { box-shadow: 0 0 0 2px var(--bg); margin-left: -7px; }
.bp-stack .avatar:first-child { margin-left: 0; }
.bar-list { position: fixed; z-index: 30; width: 280px; max-height: min(60vh, 420px); display: flex; flex-direction: column; padding: 10px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 22px 50px -18px rgba(0,0,0,.6); animation: popIn .16s ease; }
.bar-list[hidden] { display: none; }
.bl-head { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 6px 8px; }
.bl-rows { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; }
.bl-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 12px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.bl-row:hover, .bl-row:focus-visible { background: var(--bg); outline: none; }
.bl-names { display: flex; flex-direction: column; min-width: 0; }
.bl-names b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-names span { font-size: 12px; color: var(--muted); }
.bl-guests { margin: 6px 8px 2px; }
@media (max-width: 760px) { body.shell { --bar-h: 136px; } }

/* ---------- Party doodles ---------- */
/* the drawing lives on the background: behind the page content, above the theme decorations */
.party-canvas { position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none; touch-action: none; }
body.party-page > header, body.party-page > main, body.party-page > footer { position: relative; z-index: 1; }
body.party-page > header { z-index: 12; }
/* while drawing, the gaps between things go to the canvas; cards, buttons and text still work */
body.is-drawing .party-canvas { pointer-events: auto; cursor: crosshair; }
body.is-drawing > main { pointer-events: none; }
body.is-drawing > main .card, body.is-drawing > main .party-head > *:not(h1):not(.scribble), body.is-drawing > main .profile-actions > *,
body.is-drawing > main #missing, body.is-drawing > main #config-missing { pointer-events: auto; }
body.is-drawing > main h1, body.is-drawing > main .scribble { pointer-events: none; }
/* frosted cards: doodles behind the chat, player and listeners show through blurred */
body.party-page .card { background: color-mix(in srgb, var(--surface) 70%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.15); backdrop-filter: blur(16px) saturate(1.15); }
body.party-page .party-head h1, body.party-page .party-head .scribble, body.party-page .party-host-link, body.party-page #listed-note { text-shadow: 0 1px 12px var(--bg), 0 0 2px var(--bg); }

.draw-wrap { position: relative; display: inline-flex; }
#draw-btn { display: inline-flex; align-items: center; gap: 6px; }
#draw-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
#draw-btn .caret { font-size: 11px; opacity: .7; }
#draw-btn[aria-expanded="true"] { border-color: var(--orange); color: var(--text); }
.draw-panel { position: absolute; top: calc(100% + 8px); left: 0; z-index: 20; width: 300px; padding: 14px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 22px 50px -18px rgba(0,0,0,.6);
  display: flex; flex-direction: column; gap: 12px; text-shadow: none; animation: popIn .16s ease; }
.draw-panel[hidden] { display: none; }
.dp-title { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.dp-colors { display: flex; flex-wrap: wrap; gap: 6px; }
.dp-colors .swatch { width: 26px; height: 26px; }
.dp-size { display: flex; align-items: center; gap: 10px; }
.dp-size input { flex: 1; accent-color: var(--orange); }
#dp-dot { display: inline-block; border-radius: 50%; flex-shrink: 0; max-width: 40px; max-height: 40px; box-sizing: border-box; }
.dp-actions { gap: 6px; }
#dp-erase[aria-pressed="true"] { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 15%, transparent); }
.dp-done { align-self: flex-start; }
.dp-tools[hidden] { display: none; }
@media (max-width: 560px) { .draw-panel { position: fixed; left: 10px; right: 10px; top: auto; bottom: 90px; width: auto; } }

/* ---------- Custom scrollbars everywhere (thin, rounded, follows the theme) ---------- */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text) 22%, transparent) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text) 20%, transparent); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--text) 38%, transparent); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
/* pop-up windows: keep the scrollbar inside the rounded corners */
.pop-body { scrollbar-gutter: stable; }

.dp-top { display: flex; align-items: flex-start; gap: 8px; }
.dp-top .dp-title { flex: 1; }
.dp-min { width: 30px; height: 30px; flex-shrink: 0; font-size: 18px; }
.draw-panel.is-min { width: auto; }
.draw-panel.is-min .dp-title span, .draw-panel.is-min .dp-size, .draw-panel.is-min .dp-actions, .draw-panel.is-min .check-row,
.draw-panel.is-min .dp-done, .draw-panel.is-min .dp-guest { display: none; }
.draw-panel.is-min .dp-colors .swatch { width: 22px; height: 22px; }

/* ---------- Drawing: on/off switch + floating toolbar ---------- */
body.is-drawing, body.is-drawing * { -webkit-user-select: none; user-select: none; }
body.is-drawing .draw-dock input { -webkit-user-select: auto; user-select: auto; }
#draw-btn[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: #121212; }
#draw-btn[aria-pressed="true"] svg { stroke: #121212; }
.draw-dock { position: fixed; left: 50%; bottom: 18px; z-index: 40; transform: translateX(-50%); max-width: calc(100vw - 20px);
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--border); box-shadow: 0 16px 40px -14px rgba(0,0,0,.6); animation: dockIn .22s cubic-bezier(.2,.9,.3,1.2); }
.draw-dock[hidden] { display: none; }
@keyframes dockIn { from { opacity: 0; transform: translate(-50%, 16px); } }
.dd-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dd-tools[hidden] { display: none; }
.draw-dock .dp-colors { display: flex; gap: 5px; flex-wrap: nowrap; }
.draw-dock .dp-colors .swatch { width: 24px; height: 24px; border-width: 2px; }
.dd-sep { width: 1px; height: 24px; background: var(--border); }
.draw-dock .dp-size { display: flex; align-items: center; gap: 8px; }
.draw-dock .dp-size input { width: 90px; accent-color: var(--orange); }
.draw-dock #dp-dot { max-width: 26px; max-height: 26px; }
.dd-btn { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 11px; border-radius: 999px; border: 1px solid transparent;
  background: none; color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.dd-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dd-btn:hover { background: var(--bg); }
.dd-btn[aria-pressed="true"] { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 15%, transparent); }
.dd-btn.danger { color: #e5484d; }
.dd-btn[hidden] { display: none; }
.dd-hide { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; padding: 0 4px; }
.dd-hide input { accent-color: var(--orange); }
.dd-done { height: 36px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--orange); color: #121212; font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; flex-shrink: 0; }
.dd-guest { padding: 0 4px; }
@media (max-width: 760px) {
  .draw-dock { border-radius: 22px; flex-wrap: wrap; justify-content: center; bottom: 10px; }
  .dd-btn span, .dd-hide span, .dd-sep { display: none; }
}
/* keep the toolbar to one slim row: icons only (names show on hover) */
@media (min-width: 761px) {
  .dd-tools { flex-wrap: nowrap; }
  .dd-btn span, .dd-hide span { display: none; }
  .dd-btn { width: 34px; padding: 0; justify-content: center; }
  .dd-hide { padding: 0 2px; }
  .draw-dock .dp-size input { width: 72px; }
  .draw-dock .dp-colors .swatch { width: 22px; height: 22px; }
}
.dd-hide .eye-off { display: none; }
.dd-hide:has(input:checked) { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 15%, transparent); }
.dd-hide:has(input:checked) .eye-off { display: inline; }
.dd-hide:focus-within { outline: 2px solid var(--accent-text); outline-offset: 2px; }

/* party buttons: one neat row */
.party-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.party-actions .btn { display: inline-flex; align-items: center; gap: 7px; }
.party-actions .btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.party-actions #end-btn { margin-left: 4px; }
body.is-drawing > main .party-actions > * { pointer-events: auto; }

/* party link name editor (dashboard) */
.slug-edit { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.slug-row { display: flex; align-items: center; gap: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); padding: 3px 3px 3px 12px; }
.slug-row:focus-within { border-color: var(--accent-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-text) 20%, transparent); }
.slug-prefix { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; white-space: nowrap; }
.slug-row input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; padding: 8px 6px; outline: none; }
.saved-note.bad { color: #e5484d; }

/* the invisible sheet that catches the pen in draw mode (above the page, below the top menu + toolbar) */
.draw-catcher { position: absolute; top: 0; left: 0; z-index: 11; display: none; touch-action: none; cursor: crosshair; }
body.is-drawing .draw-catcher { display: block; }
body.is-drawing .party-canvas { pointer-events: none; }
body.is-drawing, body.is-drawing * { cursor: crosshair; }
body.is-drawing .draw-dock, body.is-drawing .draw-dock *, body.is-drawing > header, body.is-drawing > header * { cursor: auto; }
body.is-drawing .draw-dock button, body.is-drawing .draw-dock label, body.is-drawing > header a, body.is-drawing > header button { cursor: pointer; }

/* party chat: "was kicked / banned by the host" notes */
.chat-system { display: flex; justify-content: center; margin: 4px 0; }
.chat-system span { font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--bg); border: 1px solid var(--border); padding: 4px 12px; border-radius: 999px; text-align: center; }
/* banned list */
#bans-btn .bans-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #e5484d; color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.bans-dialog { width: min(440px, calc(100vw - 24px)); }
.bans-list { display: flex; flex-direction: column; gap: 6px; }
.ban-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; background: var(--bg); }
.ban-names { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ban-names b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* now playing: click the song (or artwork) to open it on SoundCloud */
.song-link { color: inherit; text-decoration: none; }
.song-link[href]:hover { text-decoration: underline; text-underline-offset: 3px; }
.artist .song-link[href]:hover { color: var(--text); }
.art-link { display: block; flex-shrink: 0; border-radius: 12px; }
.art-link[href]:hover .art { filter: brightness(1.08); }
.art-link[href] { cursor: pointer; }

/* ---------- Edit mode never moves the page (so stickers stay where you put them) ---------- */
/* the editor bar floats on top instead of pushing the profile down */
.edit-bar { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); width: min(1180px, calc(100vw - 20px)); margin: 0; z-index: 45; }
/* section handles float over the top edge of each card instead of adding a row */
.block-tools { position: absolute; top: -15px; left: 16px; right: 16px; z-index: 5; margin: 0; height: 30px; padding: 0 6px 0 10px;
  border: 1px solid var(--border); border-bottom: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  box-shadow: 0 6px 16px -8px rgba(0,0,0,.45); opacity: 0; transition: opacity .15s ease; }
body.editing [data-block]:hover > .block-tools, body.editing [data-block]:focus-within > .block-tools, body.editing.is-dragging .block-tools { opacity: 1; }
@media (hover: none) { .block-tools { opacity: 1; } }
.block-tools .block-x { width: 22px; height: 22px; font-size: 15px; }
@media (max-width: 980px) {
  body.editing .pcol { display: contents !important; }
}
.pinned-dialog { width: min(480px, calc(100vw - 24px)); }
.pinned-dialog .pinned-form { margin-top: 0; padding-top: 0; border-top: 0; }
@media (max-width: 980px) { body.editing .profile-grid.side-left [data-block="player"] { order: -1 !important; } }

/* ---------- Pinned song: our own player (no white SoundCloud box) ---------- */
.pinned-embed iframe { display: none; }
.pp-frame { position: absolute; width: 2px; height: 2px; left: -9999px; top: 0; border: 0; opacity: 0; pointer-events: none; }
.pinned-player { position: relative; display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: 18px; overflow: hidden;
  background: var(--bg); border: 1px solid var(--border); isolation: isolate; }
.pp-bg { position: absolute; inset: -30px; z-index: -1; background-size: cover; background-position: center; filter: blur(34px) saturate(1.3); opacity: .28; transition: opacity .4s ease; }
.pp-art-wrap { position: relative; flex-shrink: 0; width: 92px; height: 92px; }
.pp-art { display: block; width: 100%; height: 100%; border-radius: 14px; overflow: hidden; background: var(--rest); box-shadow: 0 10px 24px -12px rgba(0,0,0,.6); }
.pp-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-art-empty { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 30px; color: var(--muted); }
.pp-play { position: absolute; right: -8px; bottom: -8px; width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--bg);
  background: var(--orange); color: #121212; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
  box-shadow: 0 6px 16px -6px rgba(0,0,0,.6); transition: transform .15s ease; }
.pp-play:hover { transform: scale(1.08); }
.pp-play:disabled { opacity: .5; cursor: default; transform: none; }
.pp-play svg { width: 18px; height: 18px; fill: currentColor; }
.pp-play .i-pause { display: none; }
.pinned-player.is-playing .pp-play .i-play { display: none; }
.pinned-player.is-playing .pp-play .i-pause { display: block; }
.pinned-player.is-playing .pp-bg { opacity: .42; }
.pp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.pp-names { display: flex; flex-direction: column; min-width: 0; }
.pp-title { font-weight: 800; font-size: 16px; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-artist { font-size: 13.5px; color: var(--muted); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-title:hover, .pp-artist:hover { text-decoration: underline; text-underline-offset: 3px; color: var(--text); }
.pp-progress { display: flex; align-items: center; gap: 9px; }
.pp-time { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 30px; }
.pp-time:last-child { text-align: right; }
.pp-track { flex: 1; height: 5px; border-radius: 999px; background: color-mix(in srgb, var(--text) 16%, transparent); cursor: pointer; position: relative; }
.pp-track:hover, .pp-track:focus-visible { height: 7px; outline: none; }
.pp-track i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--orange); transition: width .25s linear; }
.pp-sc { align-self: flex-start; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--muted); text-decoration: none; font-weight: 800; flex-shrink: 0; }
.pp-sc:hover { background: var(--rest); color: var(--text); }
/* while loading: soft shimmer on the names */
.pinned-player.is-loading .pp-title, .pinned-player.is-loading .pp-artist { color: transparent; background: var(--rest); border-radius: 6px; width: 60%; }
.pinned-player.is-loading .pp-artist { width: 35%; margin-top: 4px; }
/* if SoundCloud can't load, it still links to the song */
.pinned-player.is-fallback .pp-progress, .pinned-player.is-fallback .pp-play { display: none; }
@media (max-width: 520px) { .pp-art-wrap { width: 72px; height: 72px; } .pp-play { width: 36px; height: 36px; } }
@media (prefers-reduced-motion: reduce) { .pp-track i { transition: none; } }

/* ---------- Display name effects ---------- */
.name-styled { position: relative; display: inline-block; }
/* basic */
.nfx-gradient { background: linear-gradient(90deg, var(--orange), color-mix(in srgb, var(--orange) 40%, #ff4fd8)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nfx-outline { color: transparent; -webkit-text-stroke: 2px var(--text); }
.nfx-shadow { text-shadow: 3px 3px 0 var(--orange), 6px 6px 0 color-mix(in srgb, var(--orange) 40%, transparent); }
.nfx-squiggle { padding-bottom: 10px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='10' viewBox='0 0 40 10'%3E%3Cpath d='M0 5 Q5 0 10 5 T20 5 T30 5 T40 5' fill='none' stroke='%23ff5500' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x left bottom / 28px 8px; }
/* premium (animated) */
.nfx-rainbow { background: linear-gradient(90deg, #ff5f6d, #ffc371, #7ed957, #5bcefa, #b9a4ff, #ff7eb6, #ff5f6d); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: nfxFlow 5s linear infinite; }
@keyframes nfxFlow { to { background-position: 300% 0; } }
.nfx-glow { color: #fff; text-shadow: 0 0 6px var(--orange), 0 0 18px var(--orange), 0 0 36px color-mix(in srgb, var(--orange) 60%, transparent); animation: nfxGlow 2.4s ease-in-out infinite; }
@keyframes nfxGlow { 50% { text-shadow: 0 0 3px var(--orange), 0 0 10px var(--orange), 0 0 18px color-mix(in srgb, var(--orange) 40%, transparent); } }
.nfx-shimmer { background: linear-gradient(110deg, var(--text) 40%, #fff 50%, var(--text) 60%); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: nfxShimmer 3s ease-in-out infinite; }
@keyframes nfxShimmer { 0% { background-position: 120% 0; } 60%, 100% { background-position: -20% 0; } }
.nfx-wave .nfx-letter { display: inline-block; animation: nfxWave 1.8s ease-in-out infinite; animation-delay: calc(var(--i) * 70ms); }
@keyframes nfxWave { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-0.18em); } }
.nfx-sparkle { background: linear-gradient(90deg, var(--text), color-mix(in srgb, var(--orange) 70%, #ffd84d)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nfx-star { position: absolute; font-size: .38em; color: #ffd84d; -webkit-text-fill-color: #ffd84d; pointer-events: none; animation: nfxTwinkle 2.2s ease-in-out infinite; }
.nfx-star.s0 { top: -0.15em; left: -0.4em; }
.nfx-star.s1 { top: 0.1em; right: -0.55em; animation-delay: .7s; font-size: .3em; }
.nfx-star.s2 { bottom: 0; right: 18%; animation-delay: 1.4s; font-size: .26em; }
@keyframes nfxTwinkle { 0%, 100% { opacity: .15; transform: scale(.6) rotate(0); } 50% { opacity: 1; transform: scale(1.1) rotate(45deg); } }
.nfx-glitch { animation: nfxGlitch 3.2s steps(1) infinite; }
@keyframes nfxGlitch {
  0%, 86%, 100% { text-shadow: none; transform: none; }
  87% { text-shadow: -3px 0 #00e5ff, 3px 0 #ff2e97; transform: translateX(1px); }
  90% { text-shadow: 3px 0 #00e5ff, -3px 0 #ff2e97; transform: translateX(-2px) skewX(-6deg); }
  93% { text-shadow: -2px 0 #00e5ff, 2px 0 #ff2e97; transform: translateX(1px); }
}
.nfx-fire { background: linear-gradient(0deg, #ff3d00, #ff9100 45%, #ffd54f 80%); background-size: 100% 200%; -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 8px rgba(255, 90, 0, .55)); animation: nfxFire 1.2s ease-in-out infinite alternate; }
@keyframes nfxFire { from { background-position: 0 0; } to { background-position: 0 100%; } }
.nfx-neon { color: color-mix(in srgb, var(--orange) 30%, #fff); text-shadow: 0 0 4px #fff, 0 0 10px var(--orange), 0 0 22px var(--orange), 0 0 40px var(--orange); animation: nfxNeon 5s linear infinite; }
@keyframes nfxNeon { 0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; } 20%, 24%, 55% { opacity: .35; text-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .nfx-rainbow, .nfx-glow, .nfx-shimmer, .nfx-wave .nfx-letter, .nfx-star, .nfx-glitch, .nfx-fire, .nfx-neon { animation: none; } }

/* ---------- Profile intro animations ---------- */
.intro-layer { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
/* page pieces animating in, one after another */
body.intro-fade [data-block], body.intro-fade .profile-head, body.intro-fade .party-callout, body.intro-fade .banner { animation: inFade .7s cubic-bezier(.2,.8,.3,1) both; animation-delay: calc(var(--intro-i, 0) * 80ms); }
body.intro-pop [data-block], body.intro-pop .profile-head, body.intro-pop .party-callout, body.intro-pop .banner { animation: inPop .6s cubic-bezier(.3,1.5,.5,1) both; animation-delay: calc(var(--intro-i, 0) * 70ms); }
body.intro-slide [data-col="left"] [data-block] { animation: inLeft .7s cubic-bezier(.2,.8,.3,1) both; animation-delay: calc(var(--intro-i, 0) * 70ms); }
body.intro-slide [data-col="right"] [data-block], body.intro-slide .party-callout { animation: inRight .7s cubic-bezier(.2,.8,.3,1) both; animation-delay: calc(var(--intro-i, 0) * 70ms); }
body.intro-slide .profile-head, body.intro-slide .banner { animation: inFade .6s ease both; }
body.intro-cascade [data-block], body.intro-cascade .profile-head, body.intro-cascade .party-callout, body.intro-cascade .banner { animation: inDrop .8s cubic-bezier(.2,1.2,.4,1) both; animation-delay: calc(var(--intro-i, 0) * 120ms); }
@keyframes inFade { from { opacity: 0; transform: translateY(18px); } }
@keyframes inPop { from { opacity: 0; transform: scale(.85); } }
@keyframes inLeft { from { opacity: 0; transform: translateX(-60px); } }
@keyframes inRight { from { opacity: 0; transform: translateX(60px); } }
@keyframes inDrop { from { opacity: 0; transform: translateY(-40px) rotate(-1.5deg); } }
/* particles */
.ip-confetti { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; animation: ipFall 2.6s cubic-bezier(.3,.6,.5,1) both; }
@keyframes ipFall { to { transform: translate(var(--dx), 110vh) rotate(var(--rot)); } }
.ip-spark { position: fixed; transform: translate(-50%, -50%); animation: ipBurst 1.3s cubic-bezier(.1,.8,.3,1) both; }
@keyframes ipBurst { 0% { opacity: 1; transform: translate(-50%, -50%) scale(.3); } 100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1) rotate(90deg); } }
.ip-petal { position: absolute; top: -30px; width: 16px; height: 12px; border-radius: 12px 0 12px 0; background: linear-gradient(135deg, #ffd1e3, #ff8fb8);
  animation: ipPetal 4s linear both; }
@keyframes ipPetal { 0% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(calc(var(--dx) * .6), 55vh) rotate(200deg); } 100% { transform: translate(var(--dx), 112vh) rotate(420deg); } }
.ip-heart { position: absolute; bottom: -50px; animation: ipHeart 3.4s ease-out both; }
@keyframes ipHeart { 0% { opacity: 0; transform: translate(0, 0) scale(.6); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), -95vh) scale(1.1); } }
body.intro-glitch > main { animation: ipGlitch 1s steps(1) both; }
@keyframes ipGlitch {
  0% { opacity: 0; } 10% { opacity: 1; transform: translateX(-8px) skewX(8deg); filter: drop-shadow(6px 0 #ff2e97) drop-shadow(-6px 0 #00e5ff); }
  25% { transform: translateX(6px); filter: drop-shadow(-4px 0 #ff2e97) drop-shadow(4px 0 #00e5ff); clip-path: inset(10% 0 40% 0); }
  40% { transform: none; filter: none; clip-path: none; } 55% { transform: translateX(-3px); filter: drop-shadow(3px 0 #ff2e97); } 70%, 100% { transform: none; filter: none; }
}
.ip-curtain i { position: absolute; top: 0; bottom: 0; width: 51%; background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--orange) 85%, #000) 0 22px, color-mix(in srgb, var(--orange) 65%, #000) 22px 44px);
  box-shadow: inset 0 -40px 60px rgba(0,0,0,.35); animation: .9s cubic-bezier(.7,0,.3,1) .35s both; }
.ip-curtain .c-left { left: 0; animation-name: ipCurtainL; }
.ip-curtain .c-right { right: 0; animation-name: ipCurtainR; }
@keyframes ipCurtainL { to { transform: translateX(-102%); } }
@keyframes ipCurtainR { to { transform: translateX(102%); } }
.ip-vinyl { display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--bg) 85%, transparent); animation: ipFadeOut .5s ease 1.3s both; }
.ip-vinyl .vinyl { width: min(46vmin, 320px); aspect-ratio: 1; border-radius: 50%; position: relative;
  background: repeating-radial-gradient(circle, #111 0 3px, #1d1d1d 3px 5px); box-shadow: 0 20px 60px rgba(0,0,0,.5); animation: ipSpin 1.6s cubic-bezier(.4,0,.2,1) both; }
.ip-vinyl .vinyl i { position: absolute; inset: 34%; border-radius: 50%; background: var(--orange); box-shadow: inset 0 0 0 6px rgba(0,0,0,.2); }
.ip-vinyl .vinyl i::after { content: ""; position: absolute; inset: 44%; border-radius: 50%; background: #111; }
@keyframes ipSpin { from { transform: scale(.4) rotate(-200deg); opacity: 0; } 30% { opacity: 1; } to { transform: scale(1) rotate(540deg); } }
@keyframes ipFadeOut { to { opacity: 0; } }
body.intro-stickers .sticker { animation: ipStick .5s cubic-bezier(.3,1.6,.5,1) both; animation-delay: calc(.5s + var(--intro-i, 0) * 120ms); }
@keyframes ipStick { from { opacity: 0; scale: 1.8; } }
.ip-warp { background: radial-gradient(circle, transparent 20%, color-mix(in srgb, var(--bg) 70%, transparent)); animation: ipFadeOut .6s ease 1.5s both; }
.ip-warp i { position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px #fff;
  animation: ipWarp 1.2s cubic-bezier(.5,0,.9,.4) both; }
@keyframes ipWarp { from { transform: translate(-50%, -50%) scale(.2); opacity: 0; } 20% { opacity: 1; } to { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(3, 1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .intro-layer { display: none; } }

/* name style + intro pickers */
.style-dialog { width: min(720px, calc(100vw - 24px)); }
.ns-preview { display: flex; align-items: center; justify-content: center; min-height: 96px; margin-bottom: 8px; padding: 14px; border-radius: 18px; background: var(--bg); border: 1px solid var(--border); overflow: hidden; }
.ns-preview span { font-size: clamp(30px, 6vw, 46px); font-weight: 800; letter-spacing: -1px; }
.ns-h { margin: 16px 0 6px; font-size: 16px; }
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.style-choice { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 96px; padding: 14px 8px 12px;
  border-radius: 16px; border: 2px solid var(--border); background: var(--bg); color: var(--text); font: inherit; cursor: pointer; }
.style-choice:hover { border-color: var(--text); }
.style-choice[aria-pressed="true"] { border-color: var(--orange); box-shadow: 0 0 0 4px color-mix(in srgb, var(--orange) 20%, transparent); }
.style-choice .sc-sample { font-size: 26px; line-height: 1.1; }
.style-choice .sc-name { font-size: 13px; font-weight: 700; }
.style-choice .sc-icon { font-size: 26px; line-height: 1; }
.style-choice .anim-tag { position: static; margin-top: 2px; }
/* mutual friends chip + visitors */
.mutual-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px 3px 4px; border-radius: 999px; border: 1px solid var(--border); background: none; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.mutual-chip:hover { color: var(--text); border-color: var(--text); }
.mutual-chip[hidden] { display: none; }
.mc-faces { display: inline-flex; }
.mc-faces .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }
.mc-faces .avatar:first-child { margin-left: 0; }
.people-list { display: flex; flex-direction: column; gap: 4px; }
.people-list .person-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; color: var(--text); text-decoration: none; }
.people-list .person-row:hover { background: var(--bg); }
.pr-time { margin-left: auto; }
.visit-warning { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; color: var(--muted);
  background: color-mix(in srgb, #ffd84d 10%, var(--bg)); border: 1px solid color-mix(in srgb, #ffd84d 35%, var(--border)); }
/* the section handle floats above each card: don't let cards cut it off while editing */
body.editing [data-block] { overflow: visible !important; }
/* "your database needs updating" note in the editor */
.db-note { width: 100%; margin: 0; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; background: color-mix(in srgb, #ffd84d 14%, var(--bg)); border: 1px solid color-mix(in srgb, #ffd84d 45%, var(--border)); }
.db-note[hidden] { display: none; }

/* ---------- Profile editor toolbar (bottom of the screen) ---------- */
.edit-bar { position: fixed; top: auto; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 45; width: auto; max-width: calc(100vw - 20px);
  display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; margin: 0; padding: 6px 6px 6px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--border); box-shadow: 0 18px 44px -16px rgba(0,0,0,.6); animation: dockIn .22s cubic-bezier(.2,.9,.3,1.2); }
.edit-bar[hidden] { display: none; }
.eb-label { font-size: 12px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); padding-right: 6px; cursor: help; }
.eb-tools { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.eb-tools::-webkit-scrollbar { display: none; }
.eb-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 11px; border-radius: 999px; border: 0; background: none;
  color: var(--text); font: inherit; font-size: 13.5px; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; }
.eb-btn:hover, .eb-btn[aria-expanded="true"] { background: var(--bg); }
.eb-btn svg { width: 17px; height: 17px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.eb-btn[hidden] { display: none; }
.eb-btn b { font-weight: 800; color: var(--accent-text); }
.eb-sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; flex-shrink: 0; }
.eb-cancel, .eb-save { height: 36px; padding: 0 16px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; flex-shrink: 0; }
.eb-cancel { border: 1px solid var(--border); background: none; color: var(--text); }
.eb-cancel:hover { border-color: var(--text); }
.eb-save { border: 0; background: var(--orange); color: #121212; }
.eb-save:hover { filter: brightness(1.06); }
/* little pop-ups above the toolbar */
.eb-pop { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); width: max-content; max-width: min(520px, calc(100vw - 30px));
  margin: 0; padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 14px 30px -14px rgba(0,0,0,.55); }
.eb-pop[hidden] { display: none; }
#hidden-tray { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
#hidden-tray[hidden] { display: none; }
#hidden-list { display: flex; flex-wrap: wrap; gap: 6px; }
.eb-msg + .eb-msg { bottom: calc(100% + 64px); }
@media (max-width: 900px) {
  .edit-bar { left: 10px; right: 10px; transform: none; max-width: none; bottom: 10px; }
  .eb-btn span { display: none; }
  .eb-btn { padding: 0 10px; }
  .eb-label { display: none; }
}
/* line icons that replaced emojis */
.pm-icon svg, .sc-icon svg, .noti-kind svg, .party-emoji svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pm-icon { display: inline-flex; width: 20px; justify-content: center; }
.pm-icon svg { width: 18px; height: 18px; }
.sc-icon { display: inline-flex; color: var(--accent-text); }
.sc-icon svg { width: 28px; height: 28px; }
.noti-kind { color: var(--accent-text); }
.noti-kind svg { width: 13px; height: 13px; }
.party-emoji { display: inline-flex; color: var(--accent-text); }
.party-emoji svg { width: 28px; height: 28px; }
.i-lock { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -2px; }

body > .edit-bar { z-index: 45; }
html[data-ptheme]:not([data-ptheme="default"]) body > .edit-bar { position: fixed; }

/* ---------- Banner sits behind the profile header: soft, a little blurred, fading into the page ---------- */
#profile { position: relative; }
#profile > .banner:not([hidden]):not(.is-empty) {
  position: absolute; top: 0; left: 0; right: 0; z-index: 0; height: 290px; aspect-ratio: auto; max-height: none;
  border: 0; border-radius: 28px; background: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, rgba(0,0,0,.6) 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 30%, rgba(0,0,0,.6) 62%, transparent 100%);
}
#profile > .banner:not([hidden]):not(.is-empty) img { filter: blur(3px) saturate(1.12); transform: scale(1.06); }
/* a gentle wash of the page color so the name and buttons stay easy to read on any banner */
#profile > .banner:not([hidden]):not(.is-empty)::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 10%, transparent) 0%, color-mix(in srgb, var(--bg) 55%, transparent) 100%); }
/* the header sits on top of the banner, lower down, where it fades */
#profile > .banner:not([hidden]):not(.is-empty) ~ .profile-head { position: relative; z-index: 1; padding-top: 128px; }
.profile-head.has-banner .profile-avatar { margin-top: 0; }
#profile > .banner:not([hidden]):not(.is-empty) ~ .profile-head h1,
#profile > .banner:not([hidden]):not(.is-empty) ~ .profile-head .profile-handle,
#profile > .banner:not([hidden]):not(.is-empty) ~ .profile-head .profile-bio { text-shadow: 0 1px 14px color-mix(in srgb, var(--bg) 85%, transparent); }
/* in the editor, the "Change banner" pill sits at the top of the banner (the header covers the bottom) */
body.editing #profile > .banner.editable::before { top: 14px; bottom: auto; }
@media (max-width: 760px) {
  #profile > .banner:not([hidden]):not(.is-empty) { height: 210px; border-radius: 22px; }
  #profile > .banner:not([hidden]):not(.is-empty) ~ .profile-head { padding-top: 84px; }
  .profile-head.has-banner .profile-avatar { margin-top: 0; }
}
@media (prefers-reduced-transparency: reduce) { #profile > .banner:not([hidden]):not(.is-empty) img { filter: none; } }

/* ---------- Theme panel (editor): slides in from the right, the profile stays visible ---------- */
.theme-panel { position: fixed; top: 12px; right: 12px; bottom: 84px; z-index: 46; width: min(340px, calc(100vw - 24px)); display: flex; flex-direction: column;
  border-radius: 22px; background: color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--border); box-shadow: 0 24px 60px -20px rgba(0,0,0,.6); animation: tpIn .25s cubic-bezier(.2,.9,.3,1.1); }
.theme-panel[hidden] { display: none; }
@keyframes tpIn { from { opacity: 0; transform: translateX(24px); } }
.tp-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--border); }
.tp-head b { font-size: 16px; }
.tp-body { flex: 1; overflow-y: auto; padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.tp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tp-theme { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; border-radius: 14px; border: 2px solid var(--border); background: var(--bg); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.tp-theme:hover { border-color: var(--text); }
.tp-theme[aria-pressed="true"] { border-color: var(--orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 22%, transparent); }
.tp-swatch { display: flex; }
.tp-swatch i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--bg); margin-left: -5px; }
.tp-swatch i:first-child { margin-left: 0; }
.tp-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tp-h { margin: 6px 0 0; font-size: 15px; }
.tp-colors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tp-color { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); font-size: 13.5px; font-weight: 700; cursor: pointer; }
.tp-chip { position: relative; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; flex-shrink: 0; box-shadow: 0 0 0 2px var(--border); }
.tp-chip input { position: absolute; inset: -8px; width: 44px; height: 44px; border: 0; padding: 0; cursor: pointer; }
#tp-reset { align-self: flex-start; }
#edit-theme[aria-expanded="true"] { background: var(--bg); }
@media (max-width: 760px) { .theme-panel { top: auto; left: 10px; right: 10px; width: auto; bottom: 70px; max-height: 58vh; } }

/* Favorites menu in the editor */
.favs-pop { display: flex; flex-direction: column; gap: 8px; width: 260px; }
.favs-pop[hidden] { display: none; }
.fp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 700; cursor: pointer; }
#edit-favs[aria-expanded="true"] { background: var(--bg); }

/* Favorites card: #1 artist and #1 song */
.fav-top { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; background: var(--bg); border: 1px solid var(--border); min-width: 0; }
.ft-art { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--rest); }
.ft-art.round { border-radius: 50%; }
.ft-empty { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.ft-text { display: flex; flex-direction: column; min-width: 0; }
.ft-text b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-text .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-label { font-size: 11px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--accent-text); }
/* "#1" badge and "Make #1" in the Favorites window */
.top-badge { flex-shrink: 0; padding: 2px 8px; border-radius: 999px; background: var(--orange); color: #121212; font-size: 11.5px; font-weight: 800; }
.fav-artist-wrap .top-badge { position: absolute; left: -4px; top: -6px; }
.make-top { flex-shrink: 0; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); background: none; color: var(--muted); font: inherit; font-size: 11.5px; font-weight: 800; cursor: pointer; }
.make-top:hover { color: var(--text); border-color: var(--text); }
.fav-artist-wrap .make-top { position: absolute; left: -6px; bottom: 26px; background: var(--surface); opacity: 0; transition: opacity .15s ease; }
.fav-artist-wrap:hover .make-top, .fav-artist-wrap .make-top:focus-visible { opacity: 1; }
@media (hover: none) { .fav-artist-wrap .make-top { opacity: 1; } }

/* ---------- Pinned song: cleaner card ---------- */
.pinned-card { position: relative; isolation: isolate; padding: 18px 20px 20px; }
.pinned-head { margin: 0 0 12px; gap: 6px; }
.pinned-head h2 { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.pinned-head svg { width: 14px; height: 14px; }
.pinned-embed { position: static; }
.pinned-player { position: static; padding: 0; border: 0; border-radius: 0; background: none; gap: 18px; }
/* the artwork glow now fills the whole card, softly */
.pp-bg { position: absolute; inset: 0; z-index: -1; border-radius: inherit; clip-path: inset(0 round 24px); filter: blur(40px) saturate(1.4); opacity: .3; transform: scale(1.2); }
.pinned-player.is-playing .pp-bg { opacity: .45; }
.pp-art-wrap { width: 108px; height: 108px; }
.pp-art { border-radius: 16px; box-shadow: 0 14px 30px -14px rgba(0,0,0,.7); }
.pp-play { right: -10px; bottom: -10px; width: 46px; height: 46px; border: 4px solid var(--surface); }
.pp-main { gap: 12px; }
.pp-title { font-size: 19px; letter-spacing: -.3px; }
.pp-artist { font-size: 14.5px; }
.pp-track { height: 4px; }
.pp-track:hover, .pp-track:focus-visible { height: 6px; }
.pp-sc { position: absolute; top: 14px; right: 14px; width: auto; height: auto; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; color: var(--muted); }
.pp-sc span { font-size: 0; }
.pp-sc span::before { content: "SoundCloud"; font-size: 12px; }
.pp-sc:hover { background: var(--rest); color: var(--text); }
@media (max-width: 520px) { .pp-art-wrap { width: 84px; height: 84px; } .pp-title { font-size: 16px; } }

/* ---------- Admin panel ---------- */
.admin-page { max-width: 1320px; padding-bottom: 60px; }
.admin-page .page-title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.adm-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.adm-tabs button { height: 36px; padding: 0 16px; border-radius: 999px; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 800; cursor: pointer; }
.adm-tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); }
.adm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 18px 0 22px; }
.adm-stat { padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; }
.adm-stat b { font-size: 26px; letter-spacing: -.5px; }
.adm-stat span { font-size: 13px; color: var(--muted); }
.adm-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.adm-search { flex: 1 1 280px; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.adm-search:focus-within { border-color: var(--accent-text); }
.adm-search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.adm-search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 15px; outline: none; }
.adm-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-filters button { height: 36px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--border); background: none; color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.adm-filters button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.adm-sort { display: flex; align-items: center; gap: 8px; }
.adm-sort select, .adm-ban select { height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
.adm-table-wrap { overflow-x: auto; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); }
.adm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm-table th { text-align: left; font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.adm-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-table tr:hover td { background: color-mix(in srgb, var(--bg) 60%, transparent); }
.adm-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.adm-table .warn { color: #e5484d; font-weight: 800; }
.adm-table tr.is-banned td { opacity: .65; }
.adm-email { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.adm-person { display: flex; align-items: center; gap: 10px; }
.adm-names { display: flex; flex-direction: column; min-width: 0; }
.adm-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.adm-chip { padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 800; background: var(--rest); color: var(--text); }
.adm-chip.bad { background: #e5484d; color: #fff; }
.adm-chip.live { background: var(--orange); color: #121212; }
.adm-chip.dim { background: none; border: 1px solid var(--border); color: var(--muted); }
.adm-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; }
.adm-dialog { width: min(680px, calc(100vw - 24px)); }
.adm-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.adm-head .adm-names b { font-size: 18px; }
.adm-head .adm-chips { margin-left: auto; }
.adm-banned-note { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, #e5484d 14%, var(--bg)); border: 1px solid color-mix(in srgb, #e5484d 40%, var(--border)); }
.adm-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.adm-fact { padding: 8px 10px; border-radius: 12px; background: var(--bg); display: flex; flex-direction: column; min-width: 0; }
.adm-fact b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-bio { margin: 0 0 14px; display: flex; flex-direction: column; gap: 2px; }
.adm-ban { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.adm-ban input { flex: 1 1 220px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; }
.adm-danger { background: #e5484d; border-color: #e5484d; color: #fff; }
.adm-h { margin: 18px 0 8px; font-size: 15px; }
.adm-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-log { display: flex; flex-direction: column; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); }
.adm-log-row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.adm-log-row:last-child { border-bottom: 0; }
@media (max-width: 760px) {
  .adm-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-log-row { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- What a banned account sees ---------- */
.banned-screen { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--bg); }
.banned-box { max-width: 460px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.banned-box h1 { margin: 0; font-size: 32px; }
.banned-box p { margin: 0; color: var(--muted); }
.adm-table td:nth-child(5) { white-space: normal; min-width: 190px; } .adm-table td .adm-chips { max-width: 230px; }

.acct-credits { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.acct-credits b { color: var(--accent-text); }

/* ---------- Shop ---------- */
.shop-page { max-width: 1180px; padding-bottom: 60px; }
.shop-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 10px 0 18px; }
.shop-head h1 { margin: 2px 0 0; }
.shop-balance { display: flex; flex-direction: column; align-items: flex-end; padding: 10px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.shop-balance b { font-size: 28px; letter-spacing: -.5px; color: var(--accent-text); }
.shop-credits h2, .shop-bar h2 { margin: 0; font-size: 22px; }
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 14px 0 8px; }
.pack { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 20px 14px 16px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); text-align: center; }
.pack.is-best { border-color: var(--orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 18%, transparent); }
.pack-flag { position: absolute; top: -11px; padding: 2px 10px; border-radius: 999px; background: var(--orange); color: #121212; font-size: 11.5px; font-weight: 800; }
.pack-credits { font-size: 30px; letter-spacing: -.8px; }
.pack-bonus { min-height: 20px; margin: 4px 0 10px; font-size: 12.5px; font-weight: 800; color: var(--accent-text); }
.pack .btn { width: 100%; }
.shop-items { margin-top: 34px; }
.shop-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.shop-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.shop-tabs::-webkit-scrollbar { display: none; }
.shop-tabs button { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: none; color: var(--text); font: inherit; font-weight: 700; font-size: 14px; white-space: nowrap; cursor: pointer; }
.shop-tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.shop-tabs .tf-count { font-size: 11px; opacity: .6; }
.shop-owned-filter { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.shop-item { display: flex; flex-direction: column; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.shop-item.is-owned { opacity: .85; }
.si-preview { position: relative; height: 140px; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--bg); border-bottom: 1px solid var(--border); overflow: hidden; }
.si-swatch { position: absolute; left: 12px; top: 12px; display: flex; }
.si-swatch i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); margin-left: -6px; }
.si-swatch i:first-child { margin-left: 0; }
.si-shapes { display: flex; gap: 10px; }
.si-shapes span { width: 34px; display: block; }
.si-shapes svg { width: 100%; display: block; }
.si-shapes svg * { fill: currentColor; }
.si-shapes svg .line { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.si-shapes svg .cut { fill: rgba(0,0,0,.25); }
.si-av { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #6a5acd, #ff7eb6); display: block; }
.si-sticker { width: 56px; display: block; }
.si-sticker svg { width: 100%; display: block; filter: drop-shadow(2px 0 0 #fffaf2) drop-shadow(-2px 0 0 #fffaf2) drop-shadow(0 2px 0 #fffaf2) drop-shadow(0 -2px 0 #fffaf2); }
.si-name { font-size: 34px; font-weight: 800; }
.si-icon svg { width: 54px; height: 54px; fill: none; stroke: var(--accent-text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.si-text { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.si-top { display: flex; align-items: center; gap: 8px; }
.si-top b { font-size: 16px; }
.si-top .anim-tag { position: static; }
.si-desc { line-height: 1.35; }
.si-bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; }
.si-price { font-size: 13px; color: var(--muted); }
.si-price b { font-size: 17px; color: var(--text); }
.si-actions { display: flex; gap: 6px; margin-left: auto; }
.si-owned { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--accent-text); }
.si-owned::before { content: "✓"; }

/* lock + price tag on locked items in pickers */
.price-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.price-tag svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.is-locked { position: relative; }
.is-locked > .price-tag { position: absolute; top: 8px; right: 8px; z-index: 2; }
/* buy window */
.buy-dialog { width: min(400px, calc(100vw - 24px)); }
.buy-body { display: flex; flex-direction: column; gap: 10px; padding: 22px; }
.buy-title { margin: 0; font-size: 22px; }
.buy-info { margin: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.buy-price { font-size: 26px; font-weight: 800; color: var(--accent-text); }
.buy-actions { justify-content: flex-end; margin-top: 6px; }

/* sticker drawer: packs you don't own */
.sd-tabs [role=tab] .price-tag { margin-left: 4px; font-size: 10.5px; padding: 1px 6px; }
.sd-grid.is-locked-pack .sd-item { opacity: .38; filter: grayscale(.4); }
.sd-unlock { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--bg); border: 1px solid var(--border); font-weight: 800; }
.tp-theme.is-locked .price-tag, .deco-choice.is-locked .price-tag, .style-choice.is-locked .price-tag, .theme-card.is-locked .price-tag { position: absolute; top: 8px; right: 8px; }
.tp-theme { position: relative; }
.deco-choice.is-locked, .style-choice.is-locked, .theme-card.is-locked { position: relative; }

.adm-credits { color: var(--accent-text); font-weight: 800; }
.adm-credit-row input[type=number] { flex: 0 0 110px; }
.adm-balance { font-size: 14px; color: var(--muted); margin-right: 4px; }
.adm-balance b { font-size: 20px; color: var(--accent-text); }
.si-actions .btn { white-space: nowrap; } .si-price { white-space: nowrap; }
/* shop cards: never clip the buttons */
.shop-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.si-bottom { flex-wrap: wrap; row-gap: 8px; }
.si-actions { flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.si-actions .btn { padding: 0 14px; }

/* ---- Smooth loading ------------------------------------------------------------------
   Quick loads show nothing in between (no skeleton blink); the page just fades in once it's
   ready. The skeleton / "Loading…" text only appears if loading takes longer than ~0.35s. */
@keyframes slowShow { from { opacity: 0; } to { opacity: 1; } }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
#loading:not([hidden]) { animation: slowShow .25s ease .35s backwards; }
#profile:not([hidden]), #party:not([hidden]) { animation: pageIn .22s ease backwards; }
.stat-btn b.is-pending { display: inline-block; min-width: 1.2em; height: .9em; border-radius: 6px; background: var(--rest); vertical-align: -1px; opacity: .6; }
@media (prefers-reduced-motion: reduce) {
  #loading:not([hidden]), #profile:not([hidden]), #party:not([hidden]) { animation: none; }
}
