/* Site pages only â€” editor uses editor.css */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=Quicksand:wght@400;500;600;700&display=swap");

/* Site shell — canvas + sidebar share #1b202d. Do not inherit editor appearance.
   Keep in sync with SITE_SHELL in lib/theme-chrome.ts and applySiteShell in site-theme-init.js. */
:root {
  color-scheme: dark;
  --sm-accent: #a8a8b0;
  --sm-accent-light: var(--sm-accent);
  --sm-accent-dark: color-mix(in srgb, var(--sm-accent) 72%, #000);
  --sm-accent-rgb: 168, 168, 176;
  --sm-green: var(--sm-accent);
  --sm-green-light: var(--sm-link, var(--sm-accent-light));
  --sm-green-dark: var(--sm-accent-dark);
  --sm-bg: #1b202d;
  --sm-panel: #1b202d;
  --sm-panel-border: #ffffff18;
  --sm-border: #ffffff24;
  --sm-border-strong: #ffffff47;
  --sm-muted: #ffffff99;
  --sm-text-muted: var(--sm-muted);
  --sm-text-subtle: #ffffff8c;
  --sm-text-faint: #ffffff59;
  --sm-text: #e4e4e7;
  --sm-text-rgb: 228, 228, 231;
  --sm-link: var(--sm-accent-light);
  --sm-link-hover: var(--sm-text);
  --sm-text-on-accent: #ffffff;
  --sm-surface: #232a3a;
  --sm-surface-hover: #2a3244;
  --sm-hover-bg: #ffffff0f;
  --sm-panel-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  --nav-w: clamp(256px, 17vw, 280px);
  --page-pad: clamp(8px, 2vw, 24px);
  --content-max: min(1400px, 100%);
  --sm-display: "Poppins", "Quicksand", system-ui, sans-serif;
  --sm-font-body: "Quicksand", system-ui, sans-serif;
  --sm-font-display: "Poppins", "Quicksand", system-ui, sans-serif;
  --sm-panel-accent: var(--sm-accent);
  --sidenav-bg: #1b202d;
  --sidenav-active-bg: #2d3648;
  --sidenav-logo-h: 56px;
  --mobile-nav-logo-h: 44px;
  --site-logo-fill: #e4e4e7;
  --site-logo-wordmark: #e4e4e7;
  --site-logo-stroke: #a8a8b0;
  --site-logo-stroke-dark: #2a344d;
}

html.site-page {
  --sm-bg: #1b202d !important;
  --sm-panel: #1b202d !important;
  --sm-surface: #232a3a !important;
  --sm-surface-hover: #2a3244 !important;
  --sidenav-bg: #1b202d !important;
  --sidenav-active-bg: #2d3648 !important;
  --sm-accent: #a8a8b0 !important;
  --sm-accent-light: #a8a8b0 !important;
  --sm-accent-rgb: 168, 168, 176 !important;
  --sm-text: #e4e4e7 !important;
  --site-logo-fill: #e4e4e7 !important;
  --site-logo-wordmark: #e4e4e7 !important;
  --site-logo-stroke: #a8a8b0 !important;
  color-scheme: dark;
}

html,
body {
  background-color: var(--sm-bg);
  margin: 0;
}

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

.site-root {
  background-color: transparent;
  min-height: 100vh;
  margin-left: var(--nav-w);
  color: var(--sm-text);
  font-family: var(--sm-font-body, "Quicksand", system-ui, sans-serif);
  font-size: clamp(16px, 1.35vw, 22px);
  position: relative;
  padding: var(--page-pad);
  overflow-x: clip;
  max-width: 100%;
}

.site-root h1,
.site-root h2,
.site-root h3,
.home-panel-title,
.site-page-header h1 {
  font-family: var(--sm-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sm-text);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background: var(--sm-bg);
}

.site-bg-vignette {
  display: none;
}

.site-root hr {
  width: min(900px, 100%);
  margin: clamp(16px, 3vw, 32px) auto;
  border: 0;
  border-top: 1px solid var(--sm-panel-border);
}

.site-root a {
  color: var(--sm-link);
}

.site-root a:hover {
  color: var(--sm-link-hover);
}

.site-root p {
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  line-height: 1.45;
}

.site-root select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  max-width: none;
  min-height: 52px;
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  padding: 12px 16px;
  background-color: var(--sm-surface);
  border: 1px solid var(--sm-border);
  border-radius: 12px;
  color: var(--sm-text);
  color-scheme: dark;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.site-root select option {
  background-color: var(--sm-surface);
  color: var(--sm-text);
}

.site-root select option:checked,
.site-root select option:hover,
.site-root select option:focus {
  background-color: rgba(var(--sm-accent-rgb), 0.35);
  color: var(--sm-text);
}

.site-root select:hover,
.site-root select:focus {
  outline: none;
  border-color: var(--sm-border-strong);
  background: var(--sm-surface);
}

.site-root ::-webkit-scrollbar {
  width: 10px;
}

.site-root ::-webkit-scrollbar-track {
  background: #00000040;
  border-radius: 8px;
}

.site-root ::-webkit-scrollbar-thumb {
  background: var(--sm-green);
  border-radius: 8px;
}

@keyframes animatedBackground {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 256px 0;
  }
}

.site-root #animate-area {
  width: 100%;
  height: 100%;
  background-image: url(/bg.png);
  background-repeat: repeat;
  animation: animatedBackground 14s linear infinite;
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.08;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.home-shell {
  width: var(--content-max);
  margin: 0 auto;
  text-align: center;
}

.site-root .header-logo-img {
  width: min(640px, 92vw);
  margin: clamp(4px, 1.5vw, 16px) auto 0;
  display: block;
  opacity: 0.92;
}

.home-hero-copy {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.home-hero-header {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: center;
  gap: clamp(8px, 1.4vw, 12px);
  margin: 0;
}

.home-hero-header-sep {
  flex-shrink: 0;
}

.home-hero-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: min(560px, 94vw);
  margin: 0;
  line-height: 0;
}

.home-stats {
  display: block;
  text-align: center;
  margin: 0;
  color: var(--sm-muted);
  font-size: clamp(0.92rem, 2vw, 1.05rem);
  font-variant-numeric: tabular-nums;
}

.home-stats strong {
  font-weight: 800;
  color: var(--sm-text);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  line-height: 0;
}

.site-logo > svg {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
}

.site-logo--nav {
  max-width: min(240px, 78vw);
}

.site-logo--editor {
  max-width: min(220px, 48vw);
}

.site-root .tagline {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  margin: 8px 0 clamp(20px, 4vw, 40px);
  color: var(--sm-muted);
}

.home-hero-stage {
  display: none;
}

.home-hero-copy,
.home-actions {
  position: relative;
  z-index: 1;
}

.home-tagline {
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}

.home-actions {
  display: none;
}

.home-action-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
}

.track-mode-picker {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.track-mode-controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.track-mode-custom {
  display: flex;
  gap: 8px;
  align-items: stretch;
  width: 100%;
  margin: 0;
}

.track-mode-custom input[type="number"] {
  flex: 1;
  min-width: 0;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
}

.track-mode-go {
  flex: 0 0 auto;
  min-width: 72px;
  min-height: 44px;
  margin: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(8px, 1.5vw, 14px);
  width: var(--content-max);
  margin: 0 auto;
  text-align: left;
}

.site-root .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 700;
  background: var(--sm-surface);
  border-radius: 12px;
  padding: 14px 24px;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  text-decoration: none;
  color: var(--sm-text);
  border: 1px solid var(--sm-border);
}

.site-root .button:hover {
  background: var(--sm-surface-hover);
  border-color: var(--sm-border-strong);
  color: var(--sm-link-hover);
}

.site-root .button:active {
  background: rgba(var(--sm-accent-rgb), 0.24);
}

.site-root .buttonsmall {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sm-link);
  font-size: clamp(0.85rem, 1.6vw, 1rem);
  font-weight: 600;
  background: rgba(var(--sm-accent-rgb), 0.2);
  border: 1px solid rgba(var(--sm-accent-rgb), 0.45);
  border-radius: 12px;
  padding: 12px 20px;
  margin: 8px;
  transition: background 0.18s ease, border-color 0.18s ease;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.site-root .buttonsmall:hover {
  background: rgba(var(--sm-accent-rgb), 0.32);
  border-color: var(--sm-accent);
  color: var(--sm-link-hover);
}

.site-root .buttondiscord {
  display: inline-block;
  color: var(--sm-text);
  font-size: clamp(0.85rem, 1.6vw, 1rem);
  background-color: #5865f2;
  border-radius: 10px;
  padding: 12px 22px;
  margin: 8px;
  text-decoration: none;
}

.site-root .buttondiscord:hover {
  background-color: #6b77ff;
  color: var(--sm-text);
}

.site-root .tab {
  display: inline-block;
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  background-color: var(--sm-green);
  border-radius: 12px 12px 0 0;
  padding: 10px 24px;
  margin: 0 6px;
  text-decoration: none;
  color: var(--sm-text);
}

.site-root .tab.active {
  background-color: var(--sm-panel);
  color: var(--sm-green-light);
}

.site-root .infocontainer {
  position: relative;
  width: 100%;
  min-height: 180px;
  border-radius: 10px;
  background: var(--sm-panel);
  border: 1px solid var(--sm-panel-border);
  padding: clamp(14px, 1.8vw, 18px);
  box-shadow: none;
}

.site-root .infocontainer ul {
  padding: 0 0 0 1.2em;
  margin: 0;
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
}

.site-root .infocontainer li {
  margin: 0.45em 0;
}

.site-root .site-footer-kicker,
.site-root .site-footer-credit,
.site-root .site-footer-note {
  margin: 0;
}

.site-root .site-footer-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sm-text-faint);
}

.site-root .site-footer-credit {
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--sm-text);
}

.site-root .site-footer-note {
  margin-top: 8px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--sm-text-subtle);
}

.site-root .site-footer a {
  color: var(--sm-link);
}

.site-root .site-footer a:hover {
  color: var(--sm-link-hover);
}

.site-root .site-footer--compact .site-footer-credit {
  font-size: 0.82rem;
  color: var(--sm-text-subtle);
}

.site-root .trackselect {
  max-width: none;
}

.site-root input[type="text"],
.site-root input[type="number"] {
  width: min(100%, 420px);
  padding: 12px 16px;
  background-color: var(--sm-surface);
  color: var(--sm-text);
  border: 1px solid var(--sm-border);
  border-radius: 12px;
  font-size: clamp(14px, 1.6vw, 16px);
  font-family: inherit;
  transition: border-color 0.18s ease;
}

.site-root input[type="text"]:focus,
.site-root input[type="number"]:focus {
  outline: none;
  border-color: var(--sm-border-strong);
  background: var(--sm-surface);
}

.site-root input[type="submit"] {
  background-color: var(--sm-green);
  color: var(--sm-text);
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
}

/* Site navigation */

.mobile-nav-bar {
  display: none;
}

.sidenav-overlay {
  display: none;
}

.sidenav {
  font-family: var(--sm-font-body, "Quicksand", system-ui, sans-serif);
  color: var(--sm-text);
  min-height: 100vh;
  height: 100vh;
  width: var(--nav-w);
  position: fixed;
  z-index: 200;
  top: 0;
  left: 0;
  overflow: visible;
  background: var(--sidenav-bg, var(--sm-bg, #1b202d));
  border-right: 1px solid var(--sm-panel-border);
  padding: 0;
}

.sidenav-top-row {
  display: none;
}

.sidenav-collapse-toggle {
  display: none;
  position: absolute;
  top: 14px;
  right: -12px;
  z-index: 3;
  width: 24px;
  height: 28px;
  margin: 0;
  padding: 0;
  border-radius: 0 4px 4px 0;
  border: 1px solid var(--sm-panel-border);
  border-left: none;
  background: var(--sm-panel);
  color: var(--sm-muted);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.sidenav-collapse-toggle:hover {
  color: var(--sm-text);
  background: var(--sm-surface);
}

.sidenav-collapse-toggle:focus-visible {
  outline: 2px solid var(--sm-accent);
  outline-offset: 1px;
}

.sidenav-collapse-icon {
  display: block;
  width: 16px;
  height: 16px;
  transition: transform 0.16s ease;
}

.sidenav--collapsed .sidenav-collapse-icon {
  transform: rotate(180deg);
}

.sidenav-label {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidenav--collapsed .sidenav-label,
.sidenav--collapsed .sidenav-drawer-title,
.sidenav--collapsed .sidenav-profile-name,
.sidenav--collapsed .sidenav-brand-logo,
.sidenav--collapsed .sidenav-group-label {
  display: none;
}

.sidenav--collapsed .sidenav-links a,
.sidenav--collapsed .sidenav-signin,
.sidenav--collapsed .sidenav-logout {
  justify-content: center;
  padding-inline: 8px;
  gap: 0;
}

.sidenav-drawer-title {
  display: none;
}

.sidenav-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: 0;
  padding: 16px 0 0;
  overflow: hidden;
}

.sidenav-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  flex-shrink: 0;
  margin: 0 8px 12px;
  padding: 10px 6px 14px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--sm-panel-border);
}

.sidenav-brand:hover {
  color: inherit;
}

.sidenav .sidenav-brand-icon.site-icon {
  display: none;
  flex-shrink: 0;
  border-radius: 6px;
}

.sidenav--collapsed .sidenav-brand-icon.site-icon {
  display: inline-flex;
}

.sidenav-brand-logo {
  min-width: 0;
  flex: 1 1 auto;
  height: var(--sidenav-logo-h, 56px);
}

.sidenav--collapsed .sidenav-brand {
  justify-content: center;
  margin-inline: 8px;
  padding: 8px 4px 12px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand-mark--login {
  flex-direction: column;
  gap: 10px;
}

.brand-mark-label {
  font-size: clamp(0.9rem, 3.6vw, 1.05rem);
  font-weight: 700;
  color: var(--sm-text);
  line-height: 1.2;
}

.sidenav-links {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 0 8px;
  gap: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--sm-border) transparent;
}

.sidenav-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0 6px 10px;
}

.sidenav-group:last-child {
  margin-bottom: 4px;
}

.sidenav-group-label {
  margin: 0;
  padding: 8px 10px 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sm-text-faint);
  line-height: 1.2;
}

.sidenav--collapsed .sidenav-group {
  margin-inline: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--sm-panel-border);
}

.sidenav--collapsed .sidenav-group:first-child {
  padding-top: 0;
  border-top: none;
}

.sidenav-links a {
  padding: 8px 10px;
  min-height: 36px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--sm-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  box-shadow: none;
  transition: background 0.12s ease, color 0.12s ease;
}

.sidenav-links a:hover {
  color: var(--sm-text);
  background: var(--sm-hover-bg);
}

.sidenav-links a:active {
  transform: translateY(1px);
}

.sidenav-links a:focus-visible {
  outline: 2px solid var(--sm-accent);
  outline-offset: 1px;
}

.sidenav-links a[aria-current="page"] {
  color: var(--sm-text);
  font-weight: 700;
  background: var(--sidenav-active-bg, #2d3648);
  box-shadow: none;
}

.sidenav-links a[aria-current="page"] .sidenav-icon {
  color: var(--sm-accent);
}

.sidenav-icon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  background: none;
  border-radius: 0;
}

.sidenav-icon svg {
  display: block;
  width: 20px;
  height: 20px;
}

body.nav-drawer-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .mobile-nav-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 150;
    height: 52px;
    padding: 0 8px 0 4px;
    background: var(--sidenav-bg, var(--sm-bg, #1b202d));
    border-bottom: 1px solid var(--sm-panel-border);
  }

  .mobile-nav-toggle {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    appearance: none;
    border: 1px solid var(--sm-border);
    border-radius: 6px;
    background: var(--sm-surface);
    color: var(--sm-text);
    cursor: pointer;
    font-family: inherit;
  }

  .mobile-nav-toggle:hover {
    background: var(--sm-hover-bg);
    border-color: var(--sm-border-strong);
  }

  .mobile-nav-brand {
    flex: 1;
    min-width: 0;
    padding: 0 8px;
    font-size: clamp(0.9rem, 3.6vw, 1.05rem);
    font-weight: 700;
    color: var(--sm-text);
    text-decoration: none;
    letter-spacing: 0.01em;
    line-height: 1.2;
    display: flex;
    align-items: center;
  }

  .mobile-nav-brand .site-logo {
    height: var(--mobile-nav-logo-h, 40px);
  }

  .mobile-nav-brand-full {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-nav-toggle-bars {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 18px;
    height: 14px;
  }

  .mobile-nav-toggle-bars span {
    display: block;
    height: 2px;
    width: 100%;
    border-radius: 1px;
    background: var(--sm-text);
    transition: transform 0.18s ease, opacity 0.18s ease;
  }

  .mobile-nav-toggle--open .mobile-nav-toggle-bars span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .mobile-nav-toggle--open .mobile-nav-toggle-bars span:nth-child(2) {
    opacity: 0;
  }

  .mobile-nav-toggle--open .mobile-nav-toggle-bars span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .sidenav-drawer-title {
    display: none;
  }

  .sidenav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 180;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .sidenav-overlay--visible {
    opacity: 1;
    pointer-events: auto;
  }

  .site-root {
    margin-left: 0;
    padding-top: 64px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .sidenav {
    width: min(300px, 88vw);
    height: 100%;
    padding: 0;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.4);
  }

  .sidenav--open {
    transform: translateX(0);
  }

  .sidenav-inner {
    padding-top: 10px;
  }

  .sidenav-links a {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 1rem;
  }

  .sidenav-footer {
    margin-top: auto;
  }

  .sidenav-user {
    margin-top: 0;
    padding: 12px 10px 16px;
    border-top: 1px solid var(--sm-panel-border);
  }

  .sidenav-user a,
  .sidenav-logout {
    min-height: 44px;
  }

  .sidenav--collapsed .sidenav-label,
  .sidenav--collapsed .sidenav-profile-name {
    display: unset;
  }

  .sidenav--collapsed .sidenav-brand-logo,
  .sidenav--collapsed .sidenav-group-label {
    display: block;
  }

  .sidenav--collapsed .sidenav-brand-logo {
    display: inline-flex;
  }

  .sidenav--collapsed .sidenav-brand-icon.site-icon {
    display: none;
  }

  .sidenav--collapsed .sidenav-links a,
  .sidenav--collapsed .sidenav-signin,
  .sidenav--collapsed .sidenav-logout {
    justify-content: flex-start;
    padding-inline: 12px;
    gap: 10px;
  }

  .sidenav--collapsed .sidenav-group {
    margin-inline: 6px;
    padding-top: 0;
    border-top: none;
  }

  .sidenav--collapsed .sidenav-brand {
    justify-content: flex-start;
    margin-inline: 8px;
    padding: 8px 8px 12px;
  }

  .sidenav-search {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .sidenav-collapse-toggle {
    display: inline-flex;
  }

  .sidenav-inner {
    min-height: 100vh;
  }

  .sidenav-footer {
    margin-top: auto;
  }

  .sidenav-user {
    margin-top: 0;
  }

  .home-hero-stage {
    grid-template-columns: 1fr;
    align-items: center;
    text-align: center;
  }

  .home-hero-copy {
    text-align: center;
    grid-column: 1 / -1;
  }

  .home-tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .home-actions {
    flex-direction: column;
    width: min(520px, 100%);
    max-width: none;
    margin: 0 auto;
    grid-column: 1 / -1;
  }

  .home-action-card {
    align-items: stretch;
    width: 100%;
    min-width: 0;
  }

  .track-mode-picker,
  .track-mode-controls {
    align-items: stretch;
  }

  .site-root .button {
    width: 100%;
    min-width: 0;
  }

  .site-root select,
  .site-root .trackselect {
    max-width: none;
    width: 100%;
  }

  .track-mode-controls {
    width: 100%;
  }

  .track-mode-custom {
    width: 100%;
    min-width: 0;
  }
}

@media (min-width: 900px) {
  .home-actions {
    padding: 4px 0;
  }
}

@media (max-width: 767px) {
  .home-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .site-root .header-logo-img {
    width: min(420px, 92vw);
    margin-top: 4px;
  }

  .site-root .tagline {
    font-size: 0.92rem;
    padding: 0 4px;
  }

  .home-panel--editable .home-panel-edit-btn--corner {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
  }

  .post-body-text,
  .update-log-body {
    font-size: clamp(1rem, 2.2vw, 1.1rem);
    line-height: 1.5;
  }

  .home-news-list time {
    font-size: 0.82rem;
  }
}

@media (min-width: 2000px) {
  .site-root {
    font-size: 20px;
  }

  .home-shell,
  .home-grid {
    max-width: 1600px;
  }
}

/* Login — center on full viewport; site-root drops sidebar inset when login is shown */
.site-root:has(> .login-shell) {
  margin-left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px));
  padding-block: max(24px, env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-bottom, 0px));
}

.login-shell {
  width: min(420px, 100%);
  max-width: 100%;
  min-width: 0;
  margin: 0;
  text-align: center;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.login-shell .login-hero-logo {
  width: 100%;
  margin: 0 0 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-shell .site-logo--login {
  max-width: min(360px, 92vw);
}

.login-card {
  background: linear-gradient(
    155deg,
    var(--editor-bar-top, #14141f) 0%,
    var(--sm-panel, #0c0c12) 100%
  );
  border: 1px solid rgba(var(--sm-accent-rgb), 0.28);
  border-radius: 20px;
  padding: clamp(16px, 4vw, 28px);
  margin: 16px 0 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), 0 0 40px rgba(var(--sm-accent-rgb), 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-card:focus-within {
  border-color: rgba(var(--sm-accent-rgb), 0.45);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 48px rgba(var(--sm-accent-rgb), 0.14);
}

.login-card.success {
  text-align: center;
}

.login-card label {
  display: block;
  font-size: 0.9rem;
  color: var(--sm-muted);
  margin-bottom: 8px;
}

.login-card input[type="email"] {
  width: 100%;
  margin-bottom: 16px;
}

.login-submit {
  width: 100%;
  margin: 0;
  border: none;
  cursor: pointer;
  font-family: inherit;
  min-height: 44px;
}

.login-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.login-error {
  color: #ff6b6b;
  font-size: clamp(0.85rem, 1.6vw, 0.95rem);
  width: 100%;
  max-width: 100%;
  margin: 12px 0 0;
  line-height: 1.4;
  text-align: center;
}

.login-hint {
  font-size: 0.85rem;
  color: var(--sm-muted);
  margin: -8px 0 12px;
}

.login-field-error {
  color: #ff6b6b;
  font-size: 0.85rem;
  margin: -4px 0 12px;
  line-height: 1.35;
}

.login-back {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.auth-tab {
  flex: 1 1 0;
  min-width: 0;
  appearance: none;
  border: 1px solid var(--sm-panel-border);
  background: #0c0c12;
  color: var(--sm-muted);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
}

.auth-tab.active {
  color: var(--sm-text);
  border-color: var(--sm-accent);
  background: rgba(var(--sm-accent-rgb), 0.18);
}

.auth-subtabs {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 12px auto 0;
  max-width: 420px;
}

.auth-subtab {
  flex: 1;
  appearance: none;
  border: 1px solid var(--sm-panel-border);
  background: transparent;
  color: var(--sm-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.auth-subtab.active {
  color: var(--sm-text);
  border-color: rgba(var(--sm-accent-rgb), 0.55);
  background: rgba(var(--sm-accent-rgb), 0.1);
}

.login-card input[type="text"],
.login-card input[type="email"],
.login-card input[type="password"] {
  width: 100%;
  margin-bottom: 16px;
  font-size: max(16px, 1rem);
  min-height: 44px;
}

.login-success {
  color: var(--sm-link);
  font-size: clamp(0.85rem, 1.6vw, 0.95rem);
  width: 100%;
  max-width: 100%;
  margin: 12px 0 0;
  line-height: 1.4;
  text-align: center;
}
}


.login-secondary-action {
  margin-top: 8px;
  width: 100%;
  min-height: 44px;
}

.login-secondary-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.login-forgot-link {
  align-self: flex-start;
  margin: 4px 0 8px;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent, #7c6cff);
  font-size: 0.9rem;
  text-decoration: underline;
  cursor: pointer;
}

.login-forgot-link:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-forgot-back {
  margin-top: 12px;
}

.login-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.turnstile-wrap {
  display: flex;
  justify-content: center;
  margin: 12px 0 4px;
  min-height: 65px;
  max-width: 100%;
  overflow-x: auto;
}

.login-spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--sm-text);
  border-radius: 50%;
  animation: login-spin 0.7s linear infinite;
  vertical-align: -0.15em;
}

@keyframes login-spin {
  to {
    transform: rotate(360deg);
  }
}


.login-verify-heading {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--sm-text);
}


.login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.account-shell,
.profile-shell {
  width: min(920px, 100%);
  margin: clamp(16px, 4vw, 40px) auto;
  padding: 0 12px 48px;
}

.account-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(var(--sm-accent-rgb), 0.08);
  border: 1px solid rgba(var(--sm-accent-rgb), 0.18);
}

.account-tab {
  flex: 1;
  text-align: center;
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--sm-muted);
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.account-tab:hover {
  color: var(--sm-link-hover);
  background: rgba(var(--sm-accent-rgb), 0.1);
}

.account-tab--active {
  color: var(--sm-text);
  background: rgba(var(--sm-accent-rgb), 0.2);
  box-shadow: inset 0 0 0 1px rgba(var(--sm-accent-rgb), 0.35);
}

.account-section-hint {
  margin: -8px 0 16px;
  font-size: 0.9rem;
}

.account-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.account-header h1,
.profile-card h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.account-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.account-logout {
  background: #3a3a3f;
}

.account-card {
  background: var(--sm-panel);
  border: 1px solid var(--sm-panel-border);
  border-radius: 10px;
  padding: clamp(16px, 3vw, 22px);
  margin-bottom: 16px;
  box-shadow: none;
}

.account-card h2 {
  margin: 0 0 16px;
  font-size: clamp(1.2rem, 2.8vw, 1.45rem);
}

.account-card label {
  display: block;
  font-size: 0.9rem;
  color: var(--sm-muted);
  margin: 0 0 8px;
}

.account-card input[type="text"],
.account-card input[type="password"],
.account-card textarea {
  width: 100%;
  margin-bottom: 14px;
  border: 1px solid var(--sm-border);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.account-card input[type="text"]:focus,
.account-card input[type="password"]:focus,
.account-card textarea:focus {
  outline: none;
  border-color: rgba(var(--sm-accent-rgb), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--sm-accent-rgb), 0.18);
}

.account-card textarea {
  resize: vertical;
  min-height: 96px;
  padding: 12px 18px;
  background-color: var(--sm-surface);
  color: var(--sm-text);
  border-radius: 16px;
  font-size: clamp(14px, 1.6vw, 18px);
  font-family: inherit;
}

.account-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0 16px;
  color: var(--sm-muted);
  font-size: 0.9rem;
}

.account-check input {
  margin-top: 4px;
}

.account-media-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 20px;
  align-items: start;
}

.account-media-block label {
  margin-bottom: 10px;
}

.account-media-hint {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: var(--sm-muted);
  text-align: center;
}

.account-banner-preview,
.account-avatar-preview {
  appearance: none;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  padding: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: #121218;
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.account-banner-preview:hover,
.account-avatar-preview:hover {
  border-color: rgba(var(--sm-accent-rgb), 0.45);
}

.account-banner-preview {
  display: block;
  width: 100%;
  height: 140px;
  border-radius: 16px;
}

.account-banner-preview.has-image {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.08);
}

.account-banner-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.account-avatar-preview {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 auto;
  color: var(--sm-muted);
}

.account-avatar-preview.has-image {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.08);
}

.account-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.account-media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 100%;
  padding: 16px;
  color: var(--sm-muted);
  font-size: 0.92rem;
  text-align: center;
}

.account-media-placeholder small {
  font-size: 0.75rem;
  opacity: 0.75;
}

.account-media-spinner {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.55);
  display: grid;
  place-items: center;
}

.account-media-spinner::after {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--sm-accent);
  animation: account-spin 0.7s linear infinite;
}

@keyframes account-spin {
  to {
    transform: rotate(360deg);
  }
}

.account-toast {
  max-width: none;
  margin: 0 0 16px;
}

.account-skeleton {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.account-skeleton-line {
  height: 18px;
  border-radius: 8px;
  background: linear-gradient(90deg, #15151c 0%, #1e1e28 50%, #15151c 100%);
  background-size: 200% 100%;
  animation: account-shimmer 1.2s ease-in-out infinite;
}

.account-skeleton-line.wide {
  width: 40%;
  height: 28px;
}

.account-skeleton-card {
  padding: 24px;
  border-radius: 20px;
  border: 1px solid var(--sm-panel-border);
  background: #0c0c10;
}

.account-skeleton-banner {
  height: 140px;
  border-radius: 16px;
  margin-bottom: 16px;
  background: linear-gradient(90deg, #15151c 0%, #1e1e28 50%, #15151c 100%);
  background-size: 200% 100%;
  animation: account-shimmer 1.2s ease-in-out infinite;
}

@keyframes account-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (max-width: 640px) {
  .account-media-row {
    grid-template-columns: 1fr;
  }

  .account-media-block--avatar {
    order: -1;
  }
}

.account-danger {
  border-color: rgba(255, 107, 107, 0.35);
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 8px;
}

.account-card.account-danger h2 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.account-card.account-danger > .browse-muted {
  margin: 0 0 8px;
  font-size: 0.82rem;
  line-height: 1.35;
}

.account-card.account-danger label {
  margin: 0 0 4px;
  font-size: 0.8rem;
}

.account-card.account-danger input[type="password"] {
  width: 100%;
  max-width: 280px;
  margin-bottom: 8px;
  padding: 6px 10px;
  min-height: 32px;
  font-size: 0.9rem;
  line-height: 1.2;
  border-radius: 8px;
  background-color: var(--sm-surface);
  color: var(--sm-text);
}

.account-delete-btn {
  appearance: none;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  background: #7f1d1d;
  color: var(--sm-text);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.account-delete-btn:hover {
  background: #991b1b;
}

.profile-banner {
  height: clamp(140px, 24vw, 220px);
  border-radius: 20px 20px 0 0;
  background: #121218;
  overflow: hidden;
  position: relative;
}

.profile-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-banner-empty {
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    -45deg,
    #121218,
    #121218 12px,
    #15151c 12px,
    #15151c 24px
  );
}

.profile-card {
  background: linear-gradient(145deg, #121218, #0c0c10);
  border: 1px solid var(--sm-panel-border);
  border-top: none;
  border-radius: 0 0 20px 20px;
  padding: clamp(20px, 4vw, 28px);
  margin-top: -48px;
  position: relative;
}

.profile-identity {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.profile-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.profile-title-row h1 {
  margin: 0;
}

.profile-edit-link {
  flex-shrink: 0;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: visible;
  border: 4px solid #0c0c10;
  background: #15151c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--sm-muted);
  position: relative;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-presence {
  margin: 0 0 10px;
}

.profile-handle {
  color: var(--sm-accent-light);
  margin: 4px 0 12px;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 4px;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: help;
  border: 1px solid transparent;
}

.profile-badge--owner {
  color: #fde68a;
  background: rgba(120, 53, 15, 0.45);
  border-color: rgba(251, 191, 36, 0.35);
}

.profile-badge--creator {
  color: var(--sm-link);
  background: rgba(var(--sm-accent-rgb), 0.4);
  border-color: rgba(var(--sm-accent-rgb), 0.35);
}

.profile-badge--mod {
  color: #bfdbfe;
  background: rgba(30, 58, 138, 0.45);
  border-color: rgba(96, 165, 250, 0.35);
}

.profile-badge--contributor {
  color: #a7f3d0;
  background: rgba(6, 78, 59, 0.45);
  border-color: rgba(52, 211, 153, 0.35);
}

.profile-badge--beta {
  color: #ddd6fe;
  background: rgba(76, 29, 149, 0.45);
  border-color: rgba(167, 139, 250, 0.35);
}

.profile-bio {
  color: var(--sm-muted);
  line-height: 1.5;
  max-width: 640px;
}

.profile-songs-title {
  margin: 28px 0 12px;
}

.profile-songs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
}

.profile-song-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--sm-surface);
  border: 1px solid var(--sm-panel-border);
  text-decoration: none;
  color: var(--sm-text);
}

.profile-song-card span {
  color: var(--sm-muted);
  font-size: 0.85rem;
}

.sidenav-profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  margin: 0 0 4px;
  border-radius: 2px 6px 6px 2px;
  text-decoration: none;
  color: var(--sm-text);
  transition: background 0.12s ease;
}

.sidenav-profile-card:hover {
  background: var(--sm-hover-bg);
  color: var(--sm-text);
}

.sidenav-profile-avatar {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--sm-accent) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--sm-accent) 32%, transparent);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--sm-text);
}

.sidenav-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidenav-profile-name {
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--sm-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidenav-user--collapsed .sidenav-profile-card {
  justify-content: center;
  margin-inline: auto;
  padding: 6px;
}

.sidenav-footer {
  margin-top: auto;
  flex-shrink: 0;
}

.sidenav-user {
  margin-top: 0;
  flex-shrink: 0;
  padding: 10px 12px 12px;
  font-size: 0.85rem;
  color: var(--sm-muted);
  border-top: 1px solid var(--sm-panel-border);
}

.sidenav-signin,
.sidenav-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 8px 8px;
  margin: 0;
  border: none;
  border-radius: 2px 6px 6px 2px;
  background: none;
  color: var(--sm-muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
}

.sidenav-signin:hover,
.sidenav-logout:hover {
  color: var(--sm-text);
  background: var(--sm-hover-bg);
}

.sidenav-signin:focus-visible,
.sidenav-logout:focus-visible,
.sidenav-profile-card:focus-visible {
  outline: 2px solid var(--sm-accent);
  outline-offset: 1px;
}

.sidenav-signin svg,
.sidenav-logout svg {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.browse-shell .site-page-header {
  overflow: visible;
  z-index: 6;
}

.site-page-header {
  text-align: center;
  margin-bottom: clamp(16px, 2.6vw, 28px);
}

.site-page-header h1 {
  margin: 0 0 6px;
  font-size: clamp(1.55rem, 3.2vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--sm-text);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}

.settings-page-shell {
  width: min(720px, 100%);
  margin: 0 auto;
}

.settings-palette-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 18px;
}

.settings-palette-swatch {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--sm-border);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.custom-palette-editor {
  margin: 4px 0 18px;
}

.custom-palette-editor--editor {
  margin: 8px 0 12px;
}

.custom-palette-hint {
  margin: 8px 0 10px;
  font-size: 0.86rem;
  color: var(--sm-muted, #94a3b8);
  line-height: 1.45;
}

.custom-palette-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.custom-palette-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.custom-palette-slot input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
}

.custom-palette-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid var(--sm-border);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.custom-palette-slot-num {
  font-size: 0.68rem;
  color: var(--sm-muted, #94a3b8);
}

.custom-palette-save-row label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.custom-palette-save-controls,
.custom-palette-saved-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.custom-palette-save-controls input[type="text"],
.custom-palette-saved-controls select {
  flex: 1;
  min-width: 0;
}

.custom-palette-save-btn,
.custom-palette-delete {
  flex: 0 0 auto;
  white-space: nowrap;
}

.custom-palette-saved-row {
  margin-bottom: 12px;
}

.custom-palette-saved-row label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.custom-palette-saved-msg {
  margin: 8px 0 0;
  font-size: 0.86rem;
  color: #86efac;
}

.settings-theme-preview {
  display: grid;
  gap: 8px;
  margin: 8px 0 18px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--sm-panel-border);
}

.settings-theme-preview-bar {
  height: 18px;
  border-radius: 8px;
}

.settings-theme-preview-panel {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.site-page-header-icon {
  display: block;
  margin: 0 auto 12px;
}

.site-footer {
  text-align: left;
}

.site-footer--home {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px 16px;
  width: 100%;
  margin: clamp(16px, 2.5vw, 28px) auto 0;
  padding: 16px 18px;
  border: 1px solid var(--sm-panel-border);
  border-radius: 10px;
  background: var(--sm-panel);
  box-shadow: none;
}

.site-footer-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex: 1 1 240px;
  min-width: 0;
}

.site-footer--compact {
  width: var(--content-max);
  margin: clamp(24px, 4vw, 40px) auto 0;
  padding: 14px 4px 4px;
  border-top: 1px solid var(--sm-panel-border);
}

.site-root:has(.home-shell) > .site-footer--compact {
  display: none;
}

.browse-collection {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 10px auto 12px;
  z-index: 6;
}

.browse-collection-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--sm-border);
  background: var(--sm-surface);
  color: var(--sm-text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.browse-collection-btn:hover,
.browse-collection.is-open .browse-collection-btn {
  border-color: rgba(var(--sm-accent-rgb), 0.45);
  background: var(--sm-surface-hover);
}

.browse-collection-btn:focus-visible {
  outline: 2px solid var(--sm-accent);
  outline-offset: 2px;
}

.browse-collection-caret {
  width: 16px;
  height: 16px;
  display: block;
  color: var(--sm-muted);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.browse-collection.is-open .browse-collection-caret {
  transform: rotate(180deg);
}

.browse-collection-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  min-width: 220px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 12px;
  border: 1px solid var(--sm-panel-border);
  background: #1b202d;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(var(--sm-accent-rgb), 0.08);
  transform: translateX(-50%);
  animation: browse-collection-in 0.18s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 8;
}

@keyframes browse-collection-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.browse-collection-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--sm-muted);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.browse-collection-option:hover,
.browse-collection-option:focus-visible {
  background: var(--sidenav-active-bg);
  color: var(--sm-text);
}

.browse-collection-option.is-active {
  background: var(--sidenav-active-bg);
  color: var(--sm-text);
}

.browse-search {
  display: flex;
  align-items: center;
  width: min(100%, 540px);
  min-height: 44px;
  margin: 0 auto 12px;
  padding: 4px 5px 4px 12px;
  border: 1px solid var(--sm-border);
  border-radius: 12px;
  background: #141a27;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.browse-search:focus-within {
  border-color: rgba(var(--sm-accent-rgb), 0.62);
  box-shadow: 0 0 0 3px rgba(var(--sm-accent-rgb), 0.12);
}

.browse-search-icon {
  flex: 0 0 auto;
  color: var(--sm-muted);
  font-size: 1.2rem;
  line-height: 1;
}

.browse-search input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 10px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--sm-text);
  font: inherit;
}

.browse-search input::placeholder {
  color: var(--sm-muted);
}

/* Custom .browse-search-clear only — hide native type="search" clear */
.browse-search input::-webkit-search-cancel-button,
.browse-search input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.browse-search input::-moz-search-clear-button {
  display: none;
}

.browse-search-clear,
.browse-search-submit {
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  color: var(--sm-muted);
  font-family: inherit;
  font-weight: 650;
  cursor: pointer;
}

.browse-search-clear {
  width: 34px;
  height: 34px;
  background: transparent;
  font-size: 1.2rem;
}

.browse-search-submit {
  min-height: 34px;
  padding: 6px 12px;
  background: var(--sidenav-active-bg);
  color: var(--sm-text);
}

.browse-search-clear:hover,
.browse-search-submit:hover {
  color: var(--sm-link);
}

.browse-sort-ink {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--sm-accent);
  pointer-events: none;
  opacity: 0;
  transform: translateX(0);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.18s ease;
}

.browse-sort-ink.is-on {
  opacity: 1;
}

.browse-panel {
  min-height: min(50vh, 520px);
  margin-top: 0;
  text-align: left;
  display: block;
  overflow: visible;
}

.browse-hof .song-grid {
  margin-top: 16px;
}

.browse-panel > * {
  width: 100%;
  max-width: none;
  min-width: 0;
}

.browse-muted {
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  color: var(--sm-muted);
}

/* Song grid (browse + profiles) */

.song-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 20px;
  width: 100%;
  margin: 0 auto;
  padding: 6px 2px 10px;
}

@keyframes browse-card-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes song-preview-spin {
  to {
    transform: rotate(360deg);
  }
}

.song-grid-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  border: 1px solid var(--sm-panel-border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--sm-panel) 86%, #10141e);
  overflow: hidden;
  cursor: pointer;
  transform: translateY(0) scale(1);
  transform-origin: center top;
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease,
    border-color 0.28s ease;
  animation: browse-card-enter 0.42s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: calc(min(12, var(--card-i, 0)) * 32ms);
}

.song-grid-card:hover {
  transform: translateY(-7px) scale(1.018);
  border-color: rgba(var(--sm-accent-rgb), 0.42);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(var(--sm-accent-rgb), 0.16);
  z-index: 2;
}

.song-grid-card.is-playing {
  border-color: rgba(var(--sm-accent-rgb), 0.5);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(var(--sm-accent-rgb), 0.22);
}

.song-grid-preview {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 9 / 5;
  height: auto;
  overflow: hidden;
  background: var(--sm-bg);
  border-bottom: 1px solid var(--sm-panel-border);
}

.song-grid-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.01);
  filter: saturate(0.96);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), filter 0.35s ease;
}

.song-grid-card:hover .song-grid-thumb,
.song-grid-card.is-playing .song-grid-thumb {
  transform: scale(1.07);
  filter: saturate(1.06);
}

.song-grid-preview-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 42%, rgba(8, 10, 18, 0.58) 100%);
  opacity: 0.5;
  transition: opacity 0.28s ease;
}

.song-grid-card:hover .song-grid-preview-shade,
.song-grid-card.is-playing .song-grid-preview-shade {
  opacity: 1;
}

.song-grid-quick-play {
  position: absolute;
  top: auto;
  right: 12px;
  bottom: 12px;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(12, 16, 28, 0.78);
  color: #fff;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  opacity: 0.94;
  transform: scale(0.94);
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.song-grid-card:hover .song-grid-quick-play,
.song-grid-quick-play.playing,
.song-grid-quick-play:focus-visible {
  opacity: 1;
  transform: scale(1);
}

.song-grid-quick-play:hover,
.song-grid-quick-play:focus-visible {
  background: rgba(var(--sm-accent-rgb), 0.92);
  border-color: var(--sm-accent);
  transform: scale(1.06);
}

.song-grid-quick-play:focus-visible {
  outline: 2px solid var(--sm-accent);
  outline-offset: 2px;
}

.song-grid-quick-play.playing {
  background: rgba(var(--sm-accent-rgb), 0.92);
  border-color: var(--sm-accent);
}

.song-grid-quick-play.loading {
  opacity: 0.9;
  cursor: wait;
}

.song-grid-quick-play-glyph {
  width: 22px;
  height: 22px;
  display: block;
}

.song-grid-quick-play-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: #fff;
  animation: song-preview-spin 0.7s linear infinite;
}

.song-preview-shared-iframe {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  border: none;
  left: -9999px;
  top: -9999px;
}

.browse-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(12px);
  z-index: 10050;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(10, 10, 15, 0.94);
  border: 1px solid rgba(var(--sm-accent-rgb), 0.45);
  color: var(--sm-text);
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.browse-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.song-detail-play.loading {
  opacity: 0.75;
  cursor: wait;
}

.song-detail-play.playing {
  border-color: var(--sm-accent);
}

.song-grid-delete {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  border: none;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.65);
  font-size: 14px;
  line-height: 1;
}

.song-grid-delete:hover {
  background: rgba(var(--sm-accent-rgb), 0.85);
}

.song-grid-delete:disabled {
  opacity: 0.5;
  cursor: wait;
}

.song-grid-player-iframe {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  border: none;
}

.song-grid-meta {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 14px 14px;
}

.song-grid-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  height: 1.225rem;
  overflow: hidden;
}

.song-grid-title,
.song-grid-meta-top h3 {
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.25;
  height: 1.225rem;
  color: var(--sm-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-grid-author {
  flex: 0 1 auto;
  max-width: 40%;
  min-width: 0;
  font-size: 0.78rem;
  line-height: 1.225rem;
  color: var(--sm-accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-grid-meta-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 8px;
  min-width: 0;
  height: 1.15rem;
  overflow: hidden;
  font-size: 0.78rem;
  line-height: 1.15rem;
  color: var(--sm-text-subtle);
  white-space: nowrap;
}

.song-grid-meta-bottom > * {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-detail-modal {
  position: relative;
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: linear-gradient(180deg, var(--sm-panel), var(--sm-bg));
  border: 1px solid rgba(var(--sm-accent-rgb), 0.35);
  border-radius: 20px;
  padding: 24px;
  color: var(--sm-text);
}

.song-detail-thumb {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--sm-panel-border);
}

.song-detail-byline {
  color: var(--sm-muted);
  margin: 0 0 16px;
}

.song-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.song-detail-play,
.song-detail-smr,
.song-detail-like {
  padding: 10px 16px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: none;
}

.song-detail-play {
  background: linear-gradient(180deg, var(--sm-accent), var(--sm-accent-dark));
  color: var(--sm-text);
}

.song-detail-smr {
  background: var(--sm-text);
  color: #0a0a0f;
  display: inline-flex;
  align-items: center;
}

.song-detail-like {
  background: transparent;
  border: 1px solid var(--sm-border-strong);
  color: var(--sm-text);
}

.song-detail-like.active {
  border-color: var(--sm-accent);
  color: var(--sm-accent);
}

.song-detail-dislike,
.song-detail-hype {
  padding: 10px 16px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: none;
  background: transparent;
  border: 1px solid var(--sm-border-strong);
  color: var(--sm-text);
}

.song-detail-dislike.active {
  border-color: #f87171;
  color: #f87171;
}

.song-detail-hype.active,
.song-detail-hype:disabled {
  border-color: #fb923c;
  color: #fb923c;
  opacity: 0.95;
  cursor: default;
}

.song-detail-status,
.song-detail-hype-cooldown {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--sm-muted);
}

.song-owner-edit {
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--sm-panel-border);
  background: color-mix(in srgb, var(--sm-panel) 88%, transparent);
}

.song-owner-edit h3 {
  margin: 0;
  font-size: 0.95rem;
}

.song-owner-edit-hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--sm-muted);
  line-height: 1.45;
}

.song-owner-edit label {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--sm-text-subtle);
}

.song-owner-edit input,
.song-owner-edit select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--sm-border);
  background: var(--sm-surface);
  color: var(--sm-text);
  font: inherit;
}

.song-owner-edit .buttonsmall {
  justify-self: start;
}

.song-grid-visibility {
  color: var(--sm-muted);
}

.song-grid-hypes {
  color: #fb923c;
  font-size: 0.85rem;
}

.song-grid-comments {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.85rem;
  color: #93c5fd;
}

.song-grid-comment-glyph {
  width: 0.95em;
  height: 0.95em;
  flex-shrink: 0;
}

.song-grid-notes {
  color: var(--sm-link);
  font-size: 0.85rem;
}

.browse-sort-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 18px;
}

.browse-sort-tabs {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  min-width: 0;
  flex: 1 1 auto;
  border-bottom: 1px solid var(--sm-panel-border);
}

.browse-folders {
  text-align: center;
  margin-bottom: 16px;
}

.browse-sort-label,
.browse-count {
  color: var(--sm-muted);
  font-size: 0.9rem;
  padding-bottom: 10px;
}

.browse-sort-btn {
  padding: 8px 14px 12px;
  border-radius: 0;
  border: none;
  background: transparent;
  color: var(--sm-muted);
  font-family: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: color 0.18s ease;
}

.browse-sort-btn:hover {
  color: var(--sm-text);
}

.browse-sort-btn.active {
  background: transparent;
  color: var(--sm-text);
}

.browse-sort-refresh.is-refreshing {
  animation: browse-refresh-pulse 0.7s ease;
}

@keyframes browse-refresh-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.browse-empty {
  color: var(--sm-muted);
}

.browse-folder {
  display: inline-block;
  margin: 0 8px 8px 0;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--sm-border);
  font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
  .song-grid-card,
  .song-grid-thumb,
  .song-grid-preview-shade,
  .song-grid-quick-play,
  .browse-sort-ink,
  .browse-sort-btn,
  .browse-page-btn,
  .browse-collection-menu,
  .browse-collection-caret {
    animation: none !important;
    transition: none !important;
  }

  .song-grid-card:hover,
  .song-grid-card.is-playing,
  .song-grid-thumb,
  .song-grid-card:hover .song-grid-thumb,
  .song-grid-quick-play,
  .song-grid-card:hover .song-grid-quick-play,
  .browse-page-btn:hover:not(:disabled) {
    transform: none;
  }
}

/* â”€â”€ Update log (home) â”€â”€ */

.home-panel-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  text-align: left;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sm-text);
  padding-bottom: 6px;
  border-bottom: 2px solid var(--sm-accent);
}

.home-panel-mark {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: var(--sm-text);
}

.home-panel-placeholder {
  min-height: 72px;
}

.home-panel-link {
  text-align: left;
  font-size: 0.88em;
  margin: 12px 0 0;
}

.home-panel-link a {
  color: var(--sm-muted);
  text-decoration: none;
}

.home-panel-link a:hover {
  color: var(--sm-accent);
  text-decoration: underline;
}

.home-news-thumb {
  border-radius: 16px;
  max-width: 100%;
  height: auto;
}

.home-news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.home-news-list li {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--sm-panel-border);
}

.home-news-list li strong {
  display: block;
  font-size: clamp(1.15rem, 3.2vw, 1.4rem);
  line-height: 1.35;
  margin-bottom: 6px;
  color: var(--sm-text);
}

.home-news-list time {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--sm-muted);
}

.update-log-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.update-log-item {
  position: relative;
  padding: 0 0 16px 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(var(--sm-accent-rgb), 0.2);
}

.update-log-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 4px;
  height: calc(100% - 12px);
  border-radius: 4px;
  background: linear-gradient(180deg, var(--sm-accent), var(--sm-accent-dark));
}

.update-log-time {
  display: block;
  font-size: 0.78rem;
  color: var(--sm-accent);
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.update-log-title {
  margin: 0 0 6px;
  font-size: clamp(1.05rem, 2.8vw, 1.25rem);
  color: var(--sm-text);
}

.update-log-body {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.12rem);
  color: var(--sm-muted);
  line-height: 1.45;
}

.update-log-muted {
  color: var(--sm-muted);
  font-size: 0.9rem;
}

.update-log-body-wrap .post-body-text {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.12rem);
  color: var(--sm-muted);
  line-height: 1.45;
}

.home-panel--editable {
  position: relative;
}

.home-panel-edit-btn {
  border: 1px solid rgba(var(--sm-accent-rgb), 0.45);
  background: rgba(18, 18, 26, 0.85);
  color: var(--sm-text);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  padding: 0;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}

.home-panel-edit-btn:hover {
  background: rgba(var(--sm-accent-rgb), 0.25);
}

.home-panel-edit-btn--corner {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.home-post-item {
  position: relative;
}

.home-post-item-edit {
  position: absolute;
  top: 0;
  right: 0;
  border: none;
  background: transparent;
  color: var(--sm-text-subtle);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 4px;
}

.home-post-item-edit:hover {
  color: var(--sm-accent);
}

.post-body-image {
  display: block;
  max-width: min(100%, 680px);
  height: auto;
  border-radius: 12px;
  margin: 8px 0;
}

.post-body-embed {
  position: relative;
  width: 100%;
  max-width: 680px;
  aspect-ratio: 16 / 9;
  margin: 8px 0;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.post-body-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.post-body-text {
  margin: 6px 0 0;
  font-size: clamp(1rem, 2.2vw, 1.12rem);
  color: var(--sm-muted);
  line-height: 1.45;
}

.post-body-text a {
  color: var(--sm-accent);
}

.home-hof-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.home-hof-item {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--sm-panel-border);
}

.home-hof-thumb-link {
  display: block;
  max-width: 680px;
  margin: 8px 0;
}

.home-hof-thumb {
  width: 100%;
  max-width: 680px;
  max-height: 120px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(var(--sm-accent-rgb), 0.25);
  background: var(--sm-surface);
}

.home-hof-song-link {
  margin: 4px 0 0;
  font-size: 0.85rem;
}

.home-hof-song-link a {
  color: var(--sm-accent);
}

.news-editor-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.news-editor-modal {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(var(--sm-accent-rgb), 0.35);
  background: #12121a;
}

.news-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.news-editor-head h3 {
  margin: 0;
  font-size: 1rem;
}

.news-editor-image-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.news-editor-preview {
  display: block;
  max-width: 100%;
  max-height: 160px;
  margin-top: 8px;
  border-radius: 10px;
}

.news-editor-delete {
  border-color: rgba(255, 80, 80, 0.5) !important;
  color: #ff8888 !important;
}

.sm-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.sm-dialog {
  width: min(420px, 100%);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(var(--sm-accent-rgb), 0.35);
  background: linear-gradient(180deg, color-mix(in srgb, var(--sm-panel) 96%, transparent), var(--sm-bg));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 48px rgba(var(--sm-accent-rgb), 0.1);
}

.sm-dialog-head h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  color: var(--sm-text);
}

.sm-dialog-message {
  margin: 0 0 16px;
  color: var(--sm-muted);
  line-height: 1.5;
  font-size: 0.92rem;
}

.sm-dialog-field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--sm-text-subtle);
}

.sm-dialog-field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--sm-border);
  background: var(--sm-surface);
  color: var(--sm-text);
}

.sm-dialog-field input:focus {
  outline: none;
  border-color: rgba(var(--sm-accent-rgb), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--sm-accent-rgb), 0.18);
}

.sm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.sm-dialog-btn {
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid var(--sm-border-strong);
  background: var(--sm-surface);
  color: var(--sm-text);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
}

.sm-dialog-btn:hover {
  background: var(--sm-surface-hover);
  border-color: var(--sm-border-strong);
}

.sm-dialog-btn--primary {
  background: linear-gradient(180deg, var(--sm-accent-light, var(--sm-accent)), var(--sm-accent-dark));
  border-color: rgba(var(--sm-accent-rgb), 0.55);
  color: var(--sm-text-on-accent);
}

.sm-dialog-btn--primary:hover {
  background: var(--sm-accent);
  border-color: rgba(var(--sm-accent-rgb), 0.65);
}

.sm-dialog-btn--destructive {
  background: linear-gradient(180deg, #e05555, #b83232);
  border-color: rgba(255, 80, 80, 0.55);
  color: #fff;
}

.sm-dialog-btn--destructive:hover {
  background: #c94444;
  border-color: rgba(255, 100, 100, 0.65);
}

.owner-news-manager {
  width: min(720px, 100%);
  margin: 0 auto 24px;
  padding: 16px;
  border: 1px dashed rgba(var(--sm-accent-rgb), 0.4);
  border-radius: 16px;
  background: rgba(18, 18, 26, 0.6);
}

.owner-news-form {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.owner-news-form label {
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
}

.owner-news-form input,
.owner-news-form textarea,
.owner-news-form select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--sm-border);
  background: var(--sm-surface);
  color: var(--sm-text);
  font-family: inherit;
}

.owner-news-form-actions {
  display: flex;
  gap: 8px;
}

.owner-news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.owner-news-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--sm-panel-border);
}

.owner-news-type {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--sm-accent);
  border: 1px solid rgba(var(--sm-accent-rgb), 0.35);
  border-radius: 999px;
  padding: 2px 8px;
}

.owner-news-item-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.browse-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(var(--sm-accent-rgb), 0.2);
  background: var(--sm-surface);
  color: var(--sm-text);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.15s;
}

.browse-card:hover {
  border-color: rgba(var(--sm-accent-rgb), 0.5);
}

.browse-card-icon {
  font-size: 1.6rem;
}

.browse-card-title {
  font-weight: 700;
  font-size: 1rem;
}

.browse-card-meta {
  font-size: 0.85rem;
  color: var(--sm-muted);
}

.browse-card-meta a {
  color: var(--sm-link);
}

.browse-card-stats {
  font-size: 0.8rem;
  color: var(--sm-muted);
}

.browse-player-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.browse-player-modal {
  position: relative;
  width: min(520px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: linear-gradient(180deg, #12121a, #0a0a0f);
  border: 1px solid rgba(var(--sm-accent-rgb), 0.25);
  border-radius: 20px;
  padding: 24px;
  color: var(--sm-text);
}

.browse-player-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: transparent;
  color: var(--sm-muted);
  font-size: 1.6rem;
  cursor: pointer;
}

.browse-player-author {
  color: var(--sm-muted);
  margin: 0 0 16px;
}

.browse-player-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.browse-player-play {
  padding: 12px 24px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--sm-accent-light, var(--sm-accent)), var(--sm-accent));
  color: var(--sm-text-on-accent);
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.browse-player-reactions {
  display: flex;
  gap: 8px;
}

.browse-react {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: var(--sm-text);
  cursor: pointer;
  font-family: inherit;
}

.browse-react.active {
  border-color: var(--sm-accent);
  background: rgba(var(--sm-accent-rgb), 0.25);
}

.browse-player-iframe {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  border: none;
}

.browse-player-open {
  display: inline-block;
  margin: 12px 0;
}

.browse-player-comments {
  margin-top: 16px;
  border-top: 1px solid var(--sm-panel-border);
  padding-top: 16px;
}

.browse-player-comments ul {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}

.browse-player-comments li {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.browse-player-comments form {
  display: flex;
  gap: 8px;
}

.browse-player-comments input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--sm-border);
  background: var(--sm-surface);
  color: var(--sm-text);
  font-family: inherit;
}

/* --- Home launch + site chrome revamp --- */

.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 0 0 clamp(20px, 3vw, 32px);
  padding: 4px 0 clamp(18px, 2.4vw, 26px);
  border-bottom: 1px solid var(--sm-panel-border);
  text-align: center;
}

.home-launch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 920px;
}

.home-launch-tile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-height: 108px;
  padding: 16px 16px 14px;
  border: 1px solid var(--sm-panel-border);
  border-radius: 10px;
  background: var(--sm-panel);
  color: inherit;
  text-decoration: none;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

a.home-launch-tile {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  min-height: 88px;
}

a.home-launch-tile:hover,
.home-launch-tile--tracks:hover {
  border-color: var(--sm-border-strong);
  color: inherit;
  background: var(--sm-surface-hover);
}

.home-launch-tile--accent {
  border-color: color-mix(in srgb, var(--sm-accent) 42%, var(--sm-panel-border));
  box-shadow: inset 3px 0 0 var(--sm-accent);
}

.home-launch-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.home-launch-main:hover {
  color: inherit;
}

.home-launch-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--sm-accent) 14%, transparent);
  color: var(--sm-text);
}

.home-launch-icon svg {
  width: 18px;
  height: 18px;
}

.home-launch-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.home-launch-label {
  font-family: var(--sm-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sm-text);
}

.home-launch-hint {
  font-size: 0.8rem;
  color: var(--sm-muted);
}

.home-launch-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-launch-tools .trackselect,
.home-launch-tools select {
  min-height: 40px;
  width: 100%;
  max-width: none;
  padding: 8px 10px;
  font-size: 0.85rem;
  border-radius: 8px;
}

.home-launch-tools .track-mode-custom {
  display: flex;
  gap: 8px;
  width: 100%;
  margin: 0;
}

.home-launch-tools .track-mode-custom input[type="number"] {
  flex: 1;
  min-width: 0;
  width: auto;
  max-width: none;
  min-height: 40px;
  margin: 0;
  padding: 8px 10px;
  font-size: 0.85rem;
  border-radius: 8px;
}

.home-launch-go {
  flex: 0 0 auto;
  min-width: 52px;
  min-height: 40px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--sm-border);
  border-radius: 8px;
  background: var(--sm-surface);
  color: var(--sm-text);
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

.home-launch-go:hover {
  border-color: var(--sm-border-strong);
  background: var(--sm-surface-hover);
}

.browse-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 22px 0 4px;
  padding-top: 14px;
  border-top: 1px solid var(--sm-panel-border);
}

.browse-page-btn {
  min-width: 40px;
  min-height: 36px;
  padding: 6px 10px;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--sm-muted);
  font-family: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.browse-page-btn:hover:not(:disabled) {
  color: var(--sm-text);
  transform: translateY(-1px);
}

.browse-page-btn.active {
  color: var(--sm-text);
  border-bottom-color: var(--sm-accent);
}

.browse-page-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.browse-page-ellipsis {
  min-width: 24px;
  color: var(--sm-text-faint);
  text-align: center;
}

.browse-count {
  margin-left: auto;
}

.leaderboard-metric-chips {
  gap: 14px;
  border-bottom: 1px solid var(--sm-panel-border);
  padding-bottom: 0;
}

.stats-card {
  border-radius: 10px;
  background: var(--sm-panel);
}

.admin-members-header h1 {
  font-size: clamp(1.55rem, 3.2vw, 2.05rem);
  letter-spacing: -0.03em;
}

@media (max-width: 820px) {
  .home-launch {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
}

@media (max-width: 767px) {
  .home-actions {
    width: 100%;
    max-width: none;
  }

  .home-launch {
    max-width: none;
  }

  .browse-count {
    margin-left: 0;
    width: 100%;
  }
}

.home-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  opacity: 0.92;
}

.home-action-icon svg {
  width: 18px;
  height: 18px;
}

.home-divider {
  opacity: 0.85;
  border: 0;
  height: 1px;
  background: var(--sm-panel-border);
}

.site-root .button--primary {
  background: var(--sm-accent-dark);
  border-color: rgba(var(--sm-accent-rgb), 0.55);
  color: var(--sm-text-on-accent);
}

.site-root .button--primary:hover {
  background: var(--sm-accent);
  border-color: rgba(var(--sm-accent-rgb), 0.65);
  color: var(--sm-text-on-accent);
}

.site-root .button--primary:active {
  background: var(--sm-accent-dark);
}

.site-root .infocontainer.home-panel > hr {
  display: none;
}

@media (max-width: 767px) {
  .home-actions {
    width: 100%;
    max-width: none;
  }

  .site-root #animate-area {
    opacity: 0.06;
  }

  .home-panel-title {
    text-align: left;
  }

  .site-root .infocontainer {
    padding: 14px;
  }
}


/* Owner members admin */
.admin-members-shell {
  width: min(1120px, calc(100% - 24px));
  max-width: 100%;
  margin: 0 auto;
  padding: 0 12px 40px;
}

.admin-members-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 16px;
}

.admin-members-shell h1 {
  margin: 0 0 4px;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  letter-spacing: -0.03em;
}

.admin-members-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.78rem;
  color: var(--sm-text-subtle);
}

.admin-members-summary strong {
  color: var(--sm-text);
  font-weight: 700;
}

.admin-members-loading {
  margin: 12px 0 24px;
}

.admin-members-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
  margin: 0 0 4px;
}

.admin-members-search {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.admin-members-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 8.5rem;
}

.admin-members-filter select,
.admin-members-search input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--sm-border);
  background: var(--sm-surface);
  color: var(--sm-text);
  font-size: 0.82rem;
  font-family: inherit;
}

.admin-members-search-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sm-text-subtle);
}

.admin-members-search input:focus,
.admin-members-filter select:focus,
.admin-mod-select select:focus {
  outline: none;
  border-color: var(--sm-border-strong);
}

.admin-members-count {
  font-size: 0.74rem;
  color: var(--sm-text-subtle);
  white-space: nowrap;
  align-self: center;
  margin-left: auto;
}

.admin-mod-status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 12px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--sm-panel-border);
}

.admin-mod-status-tab {
  margin: 0;
  padding: 10px 2px 12px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--sm-muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
  box-shadow: inset 0 -2px 0 transparent;
}

.admin-mod-status-tab:hover {
  color: var(--sm-text);
}

.admin-mod-status-tab.active {
  color: var(--sm-text);
  box-shadow: inset 0 -2px 0 var(--sm-accent);
}

.admin-mod-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-height: 420px;
}

.admin-mod-list-wrap,
.admin-mod-detail {
  border: 1px solid var(--sm-panel-border);
  border-radius: 10px;
  background: var(--sm-panel);
}

.admin-mod-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: min(72vh, 760px);
  overflow: auto;
}

.admin-mod-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.admin-mod-row:hover {
  background: var(--sm-hover-bg);
}

.admin-mod-row--active {
  background: var(--sm-surface);
  box-shadow: inset 3px 0 0 var(--sm-accent);
}

.admin-mod-row--banned {
  background: rgba(239, 68, 68, 0.06);
}

.admin-mod-row--temp {
  background: rgba(251, 191, 36, 0.05);
}

.admin-mod-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--sm-surface);
  color: var(--sm-text);
  font-family: var(--sm-display);
  font-size: 0.82rem;
  font-weight: 750;
}

.admin-mod-avatar--lg {
  width: 48px;
  height: 48px;
  font-size: 1.05rem;
}

.admin-mod-row-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.admin-mod-row-copy strong {
  font-size: 0.9rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-mod-row-meta {
  font-size: 0.72rem;
  color: var(--sm-text-subtle);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-mod-status {
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--sm-text-subtle);
  white-space: nowrap;
}

.admin-mod-status--ban {
  color: #fca5a5;
}

.admin-mod-status--temp {
  color: #fde68a;
}

.admin-mod-status--online {
  color: #86efac;
}

.admin-members-empty {
  text-align: center;
  color: var(--sm-text-subtle);
  padding: 28px 12px;
  margin: 0;
}

.admin-mod-detail {
  padding: 18px 20px 22px;
  min-height: 420px;
}

.admin-mod-detail--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sm-muted);
  text-align: center;
  padding: 40px 24px;
}

.admin-mod-detail--empty p {
  margin: 0;
  max-width: 28ch;
}

.admin-mod-detail-back {
  display: none;
  margin: 0 0 12px;
  padding: 0;
  border: none;
  background: none;
  color: var(--sm-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
}

.admin-mod-detail-back:hover {
  color: var(--sm-text);
}

.admin-mod-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-mod-detail-titles {
  flex: 1 1 160px;
  min-width: 0;
}

.admin-mod-detail h2 {
  margin: 0 0 4px;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.admin-mod-detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
}

.admin-mod-detail-head .admin-mod-status {
  margin-left: auto;
  padding-top: 6px;
}

.admin-mod-ban-reason {
  margin: -8px 0 14px;
  font-size: 0.8rem;
  color: var(--sm-muted);
}

.admin-mod-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--sm-panel-border);
}

.admin-mod-section h3 {
  margin: 0 0 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sm-text-subtle);
}

.admin-mod-hint {
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: var(--sm-muted);
  line-height: 1.4;
}

.admin-mod-meta {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 6px 12px;
  margin: 0;
  font-size: 0.82rem;
}

.admin-mod-meta dt {
  color: var(--sm-text-subtle);
  font-weight: 650;
}

.admin-mod-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.admin-mod-mono {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
}

.admin-mod-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.admin-mod-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--sm-panel-border);
  border-radius: 8px;
  background: var(--sm-surface);
}

.admin-mod-stats strong {
  font-size: 1.05rem;
  font-weight: 750;
}

.admin-mod-stats span {
  font-size: 0.68rem;
  color: var(--sm-text-subtle);
}

.admin-mod-actions,
.admin-mod-wipe-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}

.admin-mod-action {
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--sm-border);
  border-radius: 8px;
  background: var(--sm-surface);
  color: var(--sm-text);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
}

.admin-mod-action:hover:not(:disabled) {
  border-color: var(--sm-border-strong);
  background: var(--sm-surface-hover);
}

.admin-mod-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.admin-mod-action--danger {
  color: #fca5a5;
}

.admin-mod-select {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 150px;
}

.admin-mod-select span {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sm-text-subtle);
}

.admin-mod-select select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--sm-border);
  background: var(--sm-surface);
  color: var(--sm-text);
  font-size: 0.82rem;
  font-family: inherit;
}

.admin-mod-danger {
  margin-top: 28px;
  padding: 12px 14px 14px;
  border: 1px dashed var(--sm-border);
  border-radius: 10px;
  background: transparent;
}

.admin-mod-danger summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fca5a5;
}

.admin-mod-danger[open] summary {
  margin-bottom: 10px;
}

.admin-mod-tools-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.78rem;
  color: var(--sm-text-subtle);
  margin: 0 0 12px;
}

.admin-members-sub {
  display: inline;
  font-size: 0.68rem;
  color: var(--sm-text-subtle);
  line-height: 1.3;
}

.admin-members-inline-link {
  color: var(--sm-link);
  text-decoration: none;
  font-size: 0.78rem;
}

.admin-members-inline-link:hover {
  color: var(--sm-link-hover);
  text-decoration: underline;
}

.admin-members-badge {
  display: inline-block;
  font-size: 0.64rem;
  border-radius: 6px;
  padding: 2px 8px;
  border: 1px solid var(--sm-border);
  white-space: nowrap;
  background: transparent;
}

.admin-members-badge--ban {
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.admin-members-badge--temp {
  border-color: rgba(251, 191, 36, 0.4);
  color: #fde68a;
}

.admin-members-badge--owner {
  border-color: rgba(251, 191, 36, 0.45);
  color: #fde68a;
}

.admin-members-badge--creator {
  border-color: rgba(var(--sm-accent-rgb), 0.45);
  color: var(--sm-link);
}

.admin-members-badge--contributor {
  border-color: rgba(52, 211, 153, 0.45);
  color: #a7f3d0;
}

.admin-members-badge--beta {
  border-color: rgba(167, 139, 250, 0.35);
  color: #ddd6fe;
}

.admin-members-badge--mod {
  border-color: rgba(96, 165, 250, 0.45);
  color: #bfdbfe;
}

.admin-members-badge--member {
  color: var(--sm-text-subtle);
}

.admin-members-badge--active {
  color: #a7f3d0;
}

.admin-members-role-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.admin-members-role-pills {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.admin-members-role-pills .admin-members-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding-right: 2px;
}

.admin-members-role-remove {
  border: none;
  background: transparent;
  color: inherit;
  opacity: 0.65;
  cursor: pointer;
  font: inherit;
  font-size: 0.85em;
  line-height: 1;
  padding: 0 2px;
}

.admin-members-role-remove:hover:not(:disabled) {
  opacity: 1;
}

.admin-members-role-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.admin-members-role-add select {
  font-size: 0.78rem;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--sm-border);
  background: var(--sm-surface);
  color: inherit;
}

.admin-members-role-add-btn {
  border: 1px solid var(--sm-border);
  background: var(--sm-surface);
  color: var(--sm-text);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1;
  padding: 7px 10px;
  cursor: pointer;
  font-family: inherit;
}

.admin-members-role-add-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-members-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.admin-members-modal {
  width: min(400px, 100%);
  padding: 18px;
  border-radius: 12px;
  border: 1px solid var(--sm-panel-border);
  background: var(--sm-surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.admin-members-modal h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

@media (max-width: 860px) {
  .admin-members-shell {
    width: 100%;
    padding: 0 8px 32px;
  }

  .admin-mod-layout {
    grid-template-columns: 1fr;
  }

  .admin-mod-layout--open .admin-mod-list-wrap {
    display: none;
  }

  .admin-mod-detail-back {
    display: inline-block;
  }

  .admin-mod-detail--empty {
    display: none;
  }

  .admin-mod-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-members-count {
    margin-left: 0;
  }
}


.stats-shell {
  width: min(920px, 100%);
  margin: clamp(16px, 4vw, 40px) auto;
  padding: 0 12px 48px;
}

.community-shell {
  width: min(920px, 100%);
  margin: clamp(16px, 4vw, 40px) auto;
  padding: 0 12px 48px;
}

.community-shell .home-panel-title {
  display: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.stats-grid--profile {
  margin-bottom: 8px;
}

.stats-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--sm-panel-border);
  position: relative;
  overflow: visible;
}

.stats-card-value {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stats-card-label {
  font-size: clamp(0.9rem, 1.8vw, 1rem);
  color: var(--sm-muted);
}

.stats-card .compact-count {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}

.stats-card-hit {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  cursor: default;
}

.stats-card:focus-within {
  border-color: rgba(var(--sm-accent-rgb), 0.55);
  box-shadow: 0 0 0 2px rgba(var(--sm-accent-rgb), 0.22);
}

.compact-count {
  position: relative;
  outline: none;
  cursor: default;
}

.compact-count:focus-visible {
  border-radius: 6px;
  box-shadow: 0 0 0 2px rgba(var(--sm-accent-rgb), 0.22);
}

.stats-card .compact-count:focus-visible {
  border-radius: 0;
  box-shadow: none;
}

.compact-count-tip {
  position: fixed;
  z-index: 11000;
  padding: 6px 10px;
  border-radius: 8px;
  background: #1b202d;
  color: #e4e4e7;
  border: 1px solid #ffffff24;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(255, 255, 255, 0.04);
  font-family: var(--sm-display, system-ui, sans-serif);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
}

.stats-privacy-intro,
.profile-stats-note,
.account-stats-hint,
.leaderboard-note {
  margin: 0 0 12px;
  font-size: 0.9rem;
}

.account-supporter-status {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.account-supporter-ok {
  color: var(--sm-accent);
  font-weight: 600;
}

.account-supporter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.stats-visibility-options {
  display: grid;
  gap: 10px;
}

.stats-visibility-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--sm-border);
  cursor: pointer;
}

.stats-visibility-option.active {
  border-color: rgba(var(--sm-accent-rgb), 0.45);
  background: rgba(var(--sm-accent-rgb), 0.08);
}

.stats-visibility-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--sm-muted);
  font-size: 0.88rem;
}

.stats-visibility-copy strong {
  color: var(--sm-text);
  font-size: 0.95rem;
}

.account-stats-visibility {
  border: none;
  margin: 0 0 16px;
  padding: 0;
}

.account-stats-visibility legend {
  font-size: 0.9rem;
  color: var(--sm-muted);
  margin-bottom: 8px;
}

.leaderboard-card {
  overflow: hidden;
}

.leaderboard-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 18px;
  margin-bottom: 8px;
}

.leaderboard-header h2 {
  margin-bottom: 4px;
}

.leaderboard-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.leaderboard-control {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 10rem;
}

.leaderboard-control span {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sm-text-subtle);
}

.leaderboard-control select {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--sm-border);
  background: rgba(10, 10, 16, 0.9);
  color: var(--sm-text);
  font: inherit;
  font-size: 0.82rem;
}

.leaderboard-range {
  display: inline-flex;
  border: 1px solid var(--sm-border);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}

.leaderboard-range-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--sm-text-subtle);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 14px;
  cursor: pointer;
}

.leaderboard-range-btn.active {
  background: rgba(var(--sm-accent-rgb), 0.18);
  color: var(--sm-text);
}

.leaderboard-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 2.6rem 2.4rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--sm-panel-border);
  background: rgba(255, 255, 255, 0.03);
}

.leaderboard-rank {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sm-text-subtle);
  letter-spacing: 0.02em;
}

.leaderboard-avatar {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--sm-border);
  color: var(--sm-text-subtle);
  font-weight: 700;
  font-size: 0.9rem;
}

.leaderboard-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.leaderboard-person {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.leaderboard-person strong {
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-handle {
  font-size: 0.78rem;
  color: var(--sm-text-subtle);
}

.leaderboard-value {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.leaderboard-empty {
  margin: 8px 0 0;
}

.stats-wipe-card {
  border-color: rgba(255, 107, 107, 0.28);
}

.stats-wipe-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.stats-wipe-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-top: 1px solid rgba(255, 107, 107, 0.14);
  font-size: 0.85rem;
}

.stats-wipe-row-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.stats-wipe-row-count {
  color: var(--sm-muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.stats-wipe-empty {
  margin: 0;
}

.stats-wipe-btn {
  background: #5c1a1a;
  margin: 0;
  flex-shrink: 0;
}

.stats-wipe-btn:hover {
  background: #7f1d1d;
}

.stats-wipe-all {
  appearance: none;
  margin-top: 8px;
  padding: 0;
  border: none;
  background: none;
  color: var(--sm-muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.stats-wipe-all:hover {
  color: var(--sm-text);
}

.stats-wipe-all:disabled {
  opacity: 0.5;
  cursor: default;
}

@media (max-width: 640px) {
  .leaderboard-header {
    flex-direction: column;
  }

  .leaderboard-controls {
    width: 100%;
  }

  .leaderboard-control {
    flex: 1 1 100%;
  }

  .leaderboard-row {
    grid-template-columns: 2.2rem 2.1rem minmax(0, 1fr);
    grid-template-areas:
      "rank avatar person"
      "rank avatar value";
    row-gap: 4px;
  }

  .leaderboard-rank {
    grid-area: rank;
  }

  .leaderboard-avatar {
    grid-area: avatar;
  }

  .leaderboard-person {
    grid-area: person;
  }

  .leaderboard-value {
    grid-area: value;
    font-size: 0.95rem;
  }
}

.profile-stats {
  margin-bottom: 20px;
}

/* Profile links */
.profile-link {
  color: var(--sm-link, var(--sm-accent-light));
  text-decoration: none;
}

.profile-link:hover,
.profile-link:focus-visible {
  color: var(--sm-link-hover, var(--sm-text));
  text-decoration: underline;
  text-underline-offset: 2px;
}

.song-detail-comment-author {
  font-weight: 700;
}

/* Side nav search */
.sidenav-search {
  padding: 0 12px 10px;
}

.sidenav-search input {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 2px 6px 6px 2px;
  border: 1px solid var(--sm-panel-border);
  background: var(--sm-surface);
  color: var(--sm-text);
  font-family: inherit;
  font-size: 0.82rem;
}

.sidenav-search input::placeholder {
  color: var(--sm-text-faint);
}

.sidenav-search input:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--sm-accent) 55%, transparent);
  outline-offset: 1px;
}

.sidenav-search--collapsed {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px 8px;
  color: var(--sm-link);
  text-decoration: none;
}

.sidenav-search--collapsed:hover {
  color: var(--sm-link-hover);
}

.sidenav--collapsed .sidenav-search:not(.sidenav-search--collapsed) {
  display: none;
}

/* Search page */
.search-shell {
  max-width: min(760px, 100%);
  margin: 0 auto;
}

.search-lead {
  color: var(--sm-muted);
  margin-top: -8px;
}

.search-form {
  display: flex;
  gap: 10px;
  margin: 20px 0 16px;
}

.search-form input {
  flex: 1;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--sm-panel-border);
  background: var(--sm-surface);
  color: var(--sm-text);
  font-family: inherit;
  font-size: 1rem;
}

.search-form input:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--sm-accent) 55%, transparent);
  outline-offset: 1px;
}

.search-submit {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--sm-accent) 45%, transparent);
  background: color-mix(in srgb, var(--sm-accent) 18%, var(--sm-surface));
  color: var(--sm-text);
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

.search-submit:hover {
  background: color-mix(in srgb, var(--sm-accent) 28%, var(--sm-surface));
}

.search-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.search-tab {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--sm-panel-border);
  background: var(--sm-surface);
  color: var(--sm-muted);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

.search-tab.active {
  color: var(--sm-text);
  border-color: color-mix(in srgb, var(--sm-accent) 45%, transparent);
  background: color-mix(in srgb, var(--sm-accent) 16%, var(--sm-surface));
}

.search-muted {
  color: var(--sm-muted);
  font-size: 0.95rem;
}

.search-section {
  margin-bottom: 28px;
}

.search-section h2 {
  font-size: 1.1rem;
  margin: 0 0 12px;
}

.search-people-list,
.search-songs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.search-person-card,
.search-song-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--sm-panel-border);
  background: var(--sm-panel);
  color: inherit;
  text-decoration: none;
}

.search-person-card:hover,
.search-song-card:hover {
  border-color: color-mix(in srgb, var(--sm-accent) 40%, transparent);
  background: var(--sm-surface-hover);
}

.search-person-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--sm-accent) 20%, var(--sm-surface));
  color: var(--sm-text);
  font-weight: 700;
}

.search-person-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-person-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.search-person-meta strong {
  font-size: 0.98rem;
}

.search-person-handle {
  font-size: 0.82rem;
}

.search-song-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--sm-panel-border);
}

.search-song-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.search-song-byline {
  font-size: 0.82rem;
  color: var(--sm-muted);
}

/* Discovery + Social hub */
.discovery-shell {
  width: min(1080px, 100%);
  margin: clamp(12px, 3vw, 28px) auto;
  padding: 0 12px 40px;
}

.search-shell.discovery-shell {
  max-width: min(760px, 100%);
}

.stats-shell.discovery-shell {
  width: min(920px, 100%);
  margin: clamp(12px, 3vw, 28px) auto;
}

.discovery-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: 520px;
  margin: 16px auto 0;
  border-bottom: 1px solid var(--sm-panel-border);
}

.discovery-nav-link {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 10px 12px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--sm-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 650;
  box-shadow: inset 0 -2px 0 transparent;
}

.discovery-nav-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.discovery-nav-link:hover {
  color: var(--sm-text);
  border-color: transparent;
}

.discovery-nav-link.active {
  color: var(--sm-text);
  border-color: transparent;
  background: transparent;
  box-shadow: inset 0 -2px 0 var(--sm-accent);
}

.social-shell .site-page-header {
  margin-bottom: clamp(14px, 2.4vw, 22px);
}

.social-section {
  margin-bottom: 14px;
}

.social-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.social-section-head h2 {
  margin: 0;
}

.social-section-link {
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--sm-accent-light);
  text-decoration: none;
  white-space: nowrap;
}

.social-section-link:hover {
  text-decoration: underline;
}

.social-section-lead,
.social-empty {
  margin: 0 0 12px;
}

.social-search-form {
  margin: 0 0 12px;
}

.social-people-list {
  margin-top: 4px;
}

.social-board-grid,
.social-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.social-board-tile,
.social-shortcut {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 14px;
  border-radius: 10px;
  border: 1px solid var(--sm-panel-border);
  background: var(--sm-panel);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.social-board-tile:hover,
.social-shortcut:hover {
  border-color: var(--sm-border-strong);
  background: var(--sm-surface-hover);
}

.social-board-icon {
  font-size: 1.15rem;
  line-height: 1;
  opacity: 0.9;
}

.social-board-label,
.social-shortcut strong {
  font-size: 0.95rem;
  font-weight: 750;
}

.social-shortcut span {
  font-size: 0.8rem;
  color: var(--sm-muted);
}

@media (max-width: 560px) {
  .social-section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .social-board-grid,
  .social-shortcut-grid {
    grid-template-columns: 1fr 1fr;
  }

  .leaderboard-metric-chips {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .leaderboard-metric-chip {
    flex: 0 0 auto;
  }

  .leaderboard-card--compact .leaderboard-row {
    grid-template-columns: auto auto 1fr auto;
    gap: 8px;
  }
}

.leaderboard-metric-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0;
}

.leaderboard-metric-chip {
  padding: 7px 2px 9px;
  border-radius: 0;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--sm-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
}

.leaderboard-metric-chip:hover {
  color: var(--sm-text);
}

.leaderboard-metric-chip:focus-visible,
.leaderboard-range-btn:focus-visible {
  outline: 2px solid var(--sm-accent);
  outline-offset: 2px;
}

.leaderboard-metric-chip.active {
  color: var(--sm-text);
  border-bottom-color: var(--sm-accent);
  background: transparent;
}

.leaderboard-card--compact .leaderboard-header {
  margin-bottom: 10px;
}

.leaderboard-card--compact .leaderboard-header h2 {
  margin: 0;
}

.leaderboard-footer {
  margin: 14px 0 0;
  text-align: right;
}

/* --- Discord join ads (navy chrome, no glow) --- */

.discord-ad {
  text-align: left;
}

.site-root .discord-ad p {
  font-size: inherit;
  line-height: 1.35;
}

.discord-ad-name,
.discord-ad-hint,
.discord-ad-online,
.discord-ad-kicker,
.discord-ad-brand,
.discord-ad-heading {
  margin: 0;
}

.discord-ad-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sm-text-faint);
}

.discord-ad-name {
  font-family: var(--sm-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sm-text);
}

.discord-ad-hint {
  color: var(--sm-muted);
  line-height: 1.4;
}

.discord-ad-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--sm-muted);
}

.discord-ad-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
}

.site-root .discord-ad-join,
.discord-ad-join {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 16px;
  min-height: 44px;
  border: 1px solid var(--sm-border);
  border-radius: 8px;
  background: var(--sm-surface);
  color: var(--sm-text);
  font-family: var(--sm-display);
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: inset 3px 0 0 var(--sm-accent);
}

.site-root .discord-ad-join:hover,
.discord-ad-join:hover {
  color: var(--sm-text);
  border-color: var(--sm-border-strong);
  background: var(--sm-surface-hover);
}

.discord-ad-join--compact {
  width: 100%;
  margin-top: 10px;
  min-height: 38px;
  padding: 8px 10px;
  font-size: 0.72rem;
}

.site-root .discord-ad-join--blurple,
.discord-ad-join--blurple {
  margin-top: 10px;
  min-height: 40px;
  padding: 8px 14px;
  border-color: #4752c4;
  background: #5865f2;
  color: #fff;
  box-shadow: none;
}

.site-root .discord-ad-join--blurple:hover,
.discord-ad-join--blurple:hover {
  color: #fff;
  border-color: #6b77ff;
  background: #6b77ff;
}

.discord-ad--home {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  width: 100%;
  max-width: 920px;
  margin: 0 auto clamp(16px, 2.4vw, 24px);
  padding: 10px 14px;
  border: 1px solid var(--sm-panel-border);
  border-radius: 10px;
  background: var(--sm-panel);
  box-shadow: none;
  text-align: left;
}

.discord-ad--home .discord-ad-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1 1 auto;
  gap: 2px;
  min-width: 0;
}

.discord-ad-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.discord-ad-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--sm-accent) 14%, transparent);
  color: var(--sm-text);
}

.discord-ad-mark svg {
  width: 16px;
  height: 16px;
}

.discord-ad-wordmark {
  font-family: var(--sm-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b95f7;
}

.discord-ad-heading {
  font-family: var(--sm-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--sm-text);
  padding: 0;
  border: 0;
  margin: 0;
}

.site-root .discord-ad-heading {
  font-size: 0.95rem;
  margin: 0;
}

.discord-ad--home .discord-ad-join--compact {
  width: auto;
  margin-top: 0;
  flex: 0 0 auto;
}

.discord-ad--home .discord-ad-name {
  font-size: 0.95rem;
}

.discord-ad-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.discord-ad-faces {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.discord-ad-face {
  width: 26px;
  height: 26px;
  margin-left: -7px;
  border: 2px solid var(--sm-panel);
  border-radius: 50%;
  overflow: hidden;
  background: var(--sm-surface);
}

.discord-ad-face:first-child {
  margin-left: 0;
}

.discord-ad-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.discord-ad-face--more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--sm-text);
  background: #2b3348;
}

.discord-ad--home .discord-ad-hint {
  max-width: 42ch;
  font-size: 0.82rem;
}

.discord-ad--home .discord-ad-join {
  margin-top: 4px;
}

.discord-ad--home-plain {
  grid-template-columns: 1fr;
}

.discord-ad-embed {
  width: 100%;
  height: 200px;
  min-height: 200px;
  border: 1px solid var(--sm-panel-border);
  border-radius: 8px;
  overflow: hidden;
  background: #1e1f22;
}

.discord-ad-embed iframe {
  display: block;
  width: 100%;
  height: 350px;
  margin-top: -6px;
  border: 0;
  pointer-events: auto;
}

.discord-ad--sidebar {
  margin: 0 8px 8px;
  padding: 10px 10px 12px;
  border: 1px solid var(--sm-panel-border);
  border-radius: 10px;
  background: var(--sm-surface);
}

.discord-ad--sidebar .discord-ad-name {
  margin-top: 4px;
  font-size: 0.88rem;
}

.discord-ad--sidebar .discord-ad-online {
  margin-top: 4px;
}

.discord-ad--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 16px);
  min-height: 36px;
  margin: 0 8px 8px;
  padding: 8px;
  border: 1px solid var(--sm-panel-border);
  border-radius: 8px;
  background: var(--sm-surface);
  color: var(--sm-text);
  text-decoration: none;
}

.discord-ad--icon:hover {
  color: var(--sm-text);
  background: var(--sm-surface-hover);
  border-color: var(--sm-border-strong);
}

.discord-ad--icon svg {
  width: 18px;
  height: 18px;
}

.discovery-nav-wrap {
  width: 100%;
}

.discord-ad--discovery {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  width: 100%;
  max-width: 640px;
  margin: 14px auto 0;
  padding: 10px 12px;
  border: 1px solid var(--sm-panel-border);
  border-radius: 10px;
  background: var(--sm-panel);
}

.discord-ad--discovery .discord-ad-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--sm-accent) 14%, transparent);
  color: var(--sm-text);
}

.discord-ad--discovery .discord-ad-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.discord-ad--discovery .discord-ad-name {
  font-size: 0.92rem;
}

.discord-ad--discovery .discord-ad-join--compact {
  width: auto;
  margin-top: 0;
  flex: 0 0 auto;
}

@media (max-width: 820px) {
  .discord-ad--home {
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  .discord-ad--home {
    max-width: none;
  }

  .discord-ad--discovery .discord-ad-join--compact {
    width: 100%;
  }
}

/* --- Site mobile chrome (iPhone Safari) --- */

html {
  min-height: 100dvh;
}

body {
  min-height: 100dvh;
}

.sidenav-drawer-head {
  display: none;
}

.sidenav-drawer-close {
  display: none;
}

@media (hover: hover) {
  .sidenav-links a:hover {
    color: var(--sm-text);
    background: var(--sm-hover-bg);
  }
}

@media (hover: none) {
  .sidenav-links a:hover {
    color: var(--sm-muted);
    background: none;
  }

  .compact-count-tip {
    display: none !important;
  }
}

@media (max-width: 767px) {
  :root {
    --nav-w: 0px;
    --mobile-bar-h: 52px;
    --safari-toolbar: 64px;
  }

  html,
  body {
    min-height: 100dvh;
  }

  .mobile-nav-bar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    z-index: 220;
    height: calc(var(--mobile-bar-h) + env(safe-area-inset-top, 0px));
    min-height: calc(var(--mobile-bar-h) + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    padding-bottom: 0;
    padding-left: max(12px, env(safe-area-inset-left, 0px));
  }

  .mobile-nav-toggle {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    touch-action: manipulation;
  }

  .mobile-nav-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    height: 28px;
    padding: 0;
    overflow: hidden;
  }

  .mobile-nav-brand .site-logo {
    display: flex;
    align-items: flex-end;
    height: 28px;
    max-width: min(220px, calc(100vw - 92px));
    overflow: hidden;
  }

  .mobile-nav-brand .site-logo > svg {
    height: 56px;
    width: auto;
    max-width: none;
    max-height: none;
  }

  .sidenav-overlay {
    z-index: 200;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .sidenav {
    width: min(280px, 86vw);
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    z-index: 210;
    top: 0;
    padding-top: env(safe-area-inset-top, 0px);
    visibility: hidden;
    pointer-events: none;
  }

  .sidenav--open {
    visibility: visible;
    pointer-events: auto;
  }

  .sidenav:not(.sidenav--open) {
    visibility: hidden;
    pointer-events: none;
  }

  .sidenav-inner {
    min-height: 0;
    height: 100%;
    overflow: hidden;
    padding-top: 8px;
  }

  .sidenav-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-shrink: 0;
    margin: 0 8px 8px;
    padding: 0 4px 10px;
    border-bottom: 1px solid var(--sm-panel-border);
  }

  .sidenav-drawer-title {
    display: block;
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sm-text-faint);
  }

  .sidenav-drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--sm-border);
    border-radius: 8px;
    background: var(--sm-surface);
    color: var(--sm-text);
    cursor: pointer;
    touch-action: manipulation;
  }

  .sidenav-brand {
    display: none;
  }

  .sidenav-footer {
    min-width: 0;
    overflow: hidden;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
  }

  .discord-ad--sidebar {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    margin-inline: 8px;
  }

  .discord-ad-join--compact {
    white-space: normal;
    text-align: center;
    line-height: 1.2;
  }

  .site-root {
    margin-left: 0;
    min-height: 100dvh;
    padding-top: calc(var(--mobile-bar-h) + env(safe-area-inset-top, 0px) + 10px);
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    padding-bottom: max(32px, calc(env(safe-area-inset-bottom, 0px) + var(--safari-toolbar)));
    padding-left: max(16px, env(safe-area-inset-left, 0px));
  }

  .home-hero-logo {
    max-width: min(420px, 92vw);
  }

  .home-hero-logo .site-logo {
    height: 48px;
  }

  .home-stats {
    padding: 0 8px;
  }

  .home-launch {
    grid-template-columns: 1fr;
    max-width: none;
    gap: 10px;
  }

  .home-launch-tile,
  a.home-launch-tile {
    min-height: 0;
  }

  .home-launch-tools .trackselect,
  .home-launch-tools select,
  .home-launch-tools .track-mode-custom input[type="number"],
  .home-launch-go {
    min-height: 44px;
  }

  .discord-ad--home {
    margin-bottom: 18px;
  }

  .stats-shell,
  .account-shell,
  .profile-shell,
  .community-shell,
  .browse-shell,
  .social-shell,
  .login-shell {
    padding-bottom: max(24px, calc(env(safe-area-inset-bottom, 0px) + var(--safari-toolbar)));
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stats-card {
    overflow: visible;
    min-width: 0;
    padding: 12px 12px 14px;
  }

  .stats-card-value {
    font-size: clamp(1.35rem, 7vw, 1.85rem);
    line-height: 1.3;
    padding-top: 0.18em;
    overflow: visible;
  }

  .stats-card-label {
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.35;
  }

  .browse-sort-row {
    flex-wrap: wrap;
    align-items: stretch;
    gap: 6px 4px;
    padding-bottom: 4px;
  }

  .browse-sort-btn,
  .browse-collection-btn,
  .browse-collection-option,
  .discovery-nav-link {
    min-height: 44px;
    padding: 10px 12px;
    touch-action: manipulation;
  }

  .browse-sort-label {
    width: 100%;
    padding-bottom: 2px;
  }

  .song-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .song-grid-card:hover {
    transform: translateY(-4px) scale(1.01);
  }

  .song-grid-preview {
    aspect-ratio: 16 / 9;
    max-height: 148px;
  }

  .song-grid-meta {
    padding: 10px 12px 12px;
  }

  .song-grid-meta-top {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    height: calc(1.225rem + 2px + 0.78rem);
  }

  .song-grid-title,
  .song-grid-meta-top h3,
  .song-grid-author {
    max-width: 100%;
    width: 100%;
  }

  .song-grid-author {
    line-height: 0.78rem;
    height: 0.78rem;
  }

  .song-grid-meta-bottom {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 6px 10px;
    margin-top: 6px;
  }

  .social-shortcut-grid {
    grid-template-columns: 1fr;
  }

  .social-shortcut,
  .search-submit,
  .login-submit,
  .site-root .buttonsmall,
  .site-root .buttondiscord {
    min-height: 44px;
  }

  .search-form.social-search-form,
  .search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .search-form input[type="search"],
  .social-search-form input[type="search"] {
    flex: 1 1 160px;
    min-width: 0;
    min-height: 44px;
  }

  .login-shell {
    margin-top: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .login-card {
    padding: 16px 14px;
  }

  .account-tabs {
    gap: 6px;
  }

  .account-tab {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .discovery-nav {
    max-width: none;
  }

  .discovery-nav-link {
    flex: 1 1 0;
    font-size: 0.82rem;
    padding-left: 6px;
    padding-right: 6px;
  }
}

/* Owner Sounds — navy chrome, not a spreadsheet */
.admin-sounds-shell {
  width: min(1100px, calc(100% - 24px));
  max-width: 100%;
  margin: 0 auto;
  padding: 8px 12px 48px;
}

.admin-sounds-header {
  margin: 0 0 20px;
}

.admin-sounds-shell h1 {
  margin: 0 0 6px;
  font-size: clamp(1.5rem, 3vw, 1.95rem);
  letter-spacing: -0.03em;
}

.admin-sounds-error {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(127, 29, 29, 0.28);
  color: #fecaca;
  font-size: 0.86rem;
}

.admin-sounds-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.admin-sounds-panel {
  border: 1px solid var(--sm-panel-border);
  border-radius: 14px;
  background: linear-gradient(180deg, #232a3a 0%, #1b202d 100%);
  box-shadow: var(--sm-panel-shadow);
  padding: 16px;
  min-width: 0;
}

.admin-sounds-panel-head h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.admin-sounds-panel-head p {
  margin: 0 0 14px;
  font-size: 0.8rem;
  color: var(--sm-text-subtle);
  max-width: 42ch;
}

.admin-sounds-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(15, 18, 28, 0.45);
  border: 1px solid #ffffff14;
}

.admin-sounds-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-sounds-field span,
.admin-sounds-file-label {
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sm-text-subtle);
}

.admin-sounds-field input,
.admin-sounds-field select {
  width: 100%;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--sm-border);
  background: var(--sm-surface);
  color: var(--sm-text);
  font-size: 0.86rem;
  font-family: inherit;
}

.admin-sounds-field input:focus,
.admin-sounds-field select:focus {
  outline: none;
  border-color: var(--sm-border-strong);
}

.admin-sounds-help {
  font-size: 0.72rem !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--sm-muted) !important;
}

.admin-sounds-files {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.admin-sounds-file {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 72px;
  padding: 10px;
  border-radius: 10px;
  border: 1px dashed #ffffff2e;
  background: #1b202d;
  cursor: pointer;
}

.admin-sounds-file:hover {
  border-color: #ffffff47;
  background: var(--sm-surface);
}

.admin-sounds-file--ready {
  border-style: solid;
  border-color: rgba(var(--sm-accent-rgb), 0.45);
  background: color-mix(in srgb, var(--sm-accent) 10%, #1b202d);
}

.admin-sounds-file-hint {
  font-size: 0.78rem;
  color: var(--sm-text);
  word-break: break-all;
}

.admin-sounds-file input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.admin-sounds-submit {
  margin: 2px 0 0;
  padding: 10px 14px;
  border-radius: 9px;
  border: 1px solid rgba(var(--sm-accent-rgb), 0.4);
  background: color-mix(in srgb, var(--sm-accent) 18%, var(--sm-surface));
  color: var(--sm-text);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.admin-sounds-submit:hover:not(:disabled) {
  background: color-mix(in srgb, var(--sm-accent) 28%, var(--sm-surface));
}

.admin-sounds-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-sounds-empty {
  margin: 0 0 8px;
  font-size: 0.8rem;
  color: var(--sm-text-subtle);
}

.admin-sounds-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-sounds-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: #161b27;
  border: 1px solid #ffffff12;
}

.admin-sounds-card-name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.admin-sounds-card-meta {
  margin: 2px 0 0;
  font-size: 0.72rem;
  color: var(--sm-text-subtle);
}

.admin-sounds-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.admin-sounds-card-actions audio {
  height: 32px;
  max-width: 100%;
  flex: 1 1 140px;
}

@media (max-width: 860px) {
  .admin-sounds-grid,
  .admin-sounds-files {
    grid-template-columns: 1fr;
  }
}

/* Who's online + Find people */
.presence-shell .discovery-nav,
.discovery-shell .discovery-nav {
  max-width: min(760px, 100%);
}

.presence-shell .discovery-nav-link {
  font-size: 0.8rem;
  padding: 10px 6px 12px;
  gap: 5px;
}

.presence-card {
  background: #161b27;
  border: 1px solid #ffffff14;
  padding: 12px 12px 10px;
}

.presence-search {
  margin: 0 0 12px;
}

.presence-search input[type="search"] {
  min-height: 42px;
  border-radius: 10px;
  background: #1b202d;
}

.presence-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(68vh, 720px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #ffffff2e #161b27;
}

.presence-list::-webkit-scrollbar {
  width: 8px;
}

.presence-list::-webkit-scrollbar-thumb {
  background: #ffffff2e;
  border-radius: 99px;
}

.presence-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #ffffff10;
  background: #1b202d;
  color: inherit;
  text-decoration: none;
}

.presence-row:hover {
  border-color: #ffffff22;
  background: #232a3a;
}

.presence-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: visible;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: #2a3244;
  color: var(--sm-text);
  font-weight: 700;
}

.presence-avatar img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.presence-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #5a6478;
  border: 2px solid #1b202d;
}

.presence-dot--on {
  background: #7ddea3;
}

.presence-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.presence-name-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-width: 0;
}

.presence-name {
  font-size: 0.95rem;
  font-weight: 700;
}

.presence-handle {
  font-size: 0.78rem;
  color: var(--sm-muted);
}

.presence-status {
  font-size: 0.82rem;
  color: #c8d0e0;
  line-height: 1.35;
}

.presence-status--off {
  color: var(--sm-muted);
}

.presence-empty {
  margin: 8px 4px 12px;
}

@media (max-width: 640px) {
  .presence-shell .discovery-nav-link span {
    font-size: 0.74rem;
  }

  .presence-list {
    max-height: min(62vh, 640px);
  }
}

/* Real phones keep mobile chrome even when Safari requests a desktop viewport. */
html.smr-device-mobile {
  --nav-w: 0px;
  --mobile-bar-h: 52px;
  --safari-toolbar: 64px;
}

html.smr-device-mobile .mobile-nav-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  position: fixed;
  inset: 0 0 auto;
  z-index: 220;
  height: calc(var(--mobile-bar-h) + env(safe-area-inset-top, 0px));
  min-height: calc(var(--mobile-bar-h) + env(safe-area-inset-top, 0px));
  padding:
    env(safe-area-inset-top, 0px)
    max(12px, env(safe-area-inset-right, 0px))
    0
    max(12px, env(safe-area-inset-left, 0px));
  background: var(--sidenav-bg, var(--sm-bg, #1b202d));
  border-bottom: 1px solid var(--sm-panel-border);
}

html.smr-device-mobile .mobile-nav-toggle {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  border: 1px solid var(--sm-border);
  border-radius: 7px;
  background: var(--sm-surface);
  color: var(--sm-text);
  touch-action: manipulation;
}

html.smr-device-mobile .mobile-nav-brand {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0;
  overflow: visible;
}

html.smr-device-mobile .mobile-nav-brand .site-logo {
  display: inline-flex;
  align-items: center;
  height: 34px;
  max-width: min(230px, calc(100vw - 88px));
  overflow: visible;
}

html.smr-device-mobile .mobile-nav-brand .site-logo > svg {
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

html.smr-device-mobile .sidenav-overlay {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.55);
}

html.smr-device-mobile .sidenav {
  width: min(280px, 86vw);
  height: 100dvh;
  max-height: 100dvh;
  top: 0;
  z-index: 210;
  padding-top: env(safe-area-inset-top, 0px);
  overflow: hidden;
  transform: translateX(-105%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.22s ease;
}

html.smr-device-mobile .sidenav--open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

html.smr-device-mobile .sidenav-collapse-toggle,
html.smr-device-mobile .sidenav-brand {
  display: none;
}

html.smr-device-mobile .sidenav-inner {
  min-height: 0;
  height: 100%;
  padding-top: 8px;
}

html.smr-device-mobile .sidenav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
  margin: 0 8px 8px;
  padding: 0 4px 10px;
  border-bottom: 1px solid var(--sm-panel-border);
}

html.smr-device-mobile .sidenav-drawer-title {
  display: block;
}

html.smr-device-mobile .sidenav-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}

html.smr-device-mobile .sidenav-links a,
html.smr-device-mobile .sidenav-signin,
html.smr-device-mobile .sidenav-logout {
  min-height: 44px;
  justify-content: flex-start;
  padding: 10px 12px;
  gap: 10px;
  font-size: 1rem;
}

html.smr-device-mobile .sidenav--collapsed .sidenav-label,
html.smr-device-mobile .sidenav--collapsed .sidenav-profile-name,
html.smr-device-mobile .sidenav--collapsed .sidenav-brand-logo,
html.smr-device-mobile .sidenav--collapsed .sidenav-group-label {
  display: block;
}

html.smr-device-mobile .site-root {
  margin-left: 0;
  min-height: 100dvh;
  padding:
    calc(var(--mobile-bar-h) + env(safe-area-inset-top, 0px) + 8px)
    max(12px, env(safe-area-inset-right, 0px))
    max(32px, calc(env(safe-area-inset-bottom, 0px) + var(--safari-toolbar)))
    max(12px, env(safe-area-inset-left, 0px));
}

html.smr-device-mobile .account-shell,
html.smr-device-mobile .profile-shell,
html.smr-device-mobile .stats-shell,
html.smr-device-mobile .community-shell,
html.smr-device-mobile .discovery-shell,
html.smr-device-mobile .browse-shell,
html.smr-device-mobile .social-shell {
  margin: 8px auto;
  padding-right: 0;
  padding-left: 0;
}

html.smr-device-mobile .discovery-nav {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  max-width: 760px;
}

html.smr-device-mobile .discovery-nav-link {
  min-height: 42px;
  padding: 7px 8px 9px;
}

html.smr-device-mobile .home-launch {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 8px;
}

html.smr-device-mobile .home-launch-tile {
  min-height: 0;
  padding: 11px 12px;
}

@media (max-height: 500px) and (orientation: landscape) {
  html.smr-device-mobile {
    --mobile-bar-h: 44px;
    --safari-toolbar: 24px;
  }

  html.smr-device-mobile .mobile-nav-toggle {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  html.smr-device-mobile .mobile-nav-brand,
  html.smr-device-mobile .mobile-nav-brand .site-logo {
    height: 30px;
  }

  html.smr-device-mobile .site-root {
    padding-top: calc(var(--mobile-bar-h) + env(safe-area-inset-top, 0px) + 4px);
  }

  html.smr-device-mobile .site-page-header {
    margin-bottom: 8px;
  }

  html.smr-device-mobile .site-page-header h1 {
    font-size: 1.35rem;
  }

  html.smr-device-mobile .discovery-nav {
    margin-top: 6px;
  }

  html.smr-device-mobile .discovery-nav-link {
    min-height: 36px;
    padding-block: 5px 7px;
  }

  html.smr-device-mobile .home-hero {
    margin-bottom: 8px;
    padding-bottom: 8px;
  }
}

