:root {
  color-scheme: dark;
  --canvas: #0a0a0a;
  --canvas-soft: #111316;
  --canvas-card: #191919;
  --canvas-cookie: #2c0373;
  --canvas-mid: #25282d;
  --cookie-desc: #c9c9c9;
  --cookie-border: #4f299b;
  --hairline: #24272c;
  --hairline-strong: rgba(255, 255, 255, 0.24);
  --ink: #ffffff;
  --body: #dadbdf;
  --muted: #7d8187;
  --orange: #ff7a17;
  --violet: #c4b5fd;
  --blue: #a0c3ec;
  --green: #8bd7a7;
  --rose: #ff9bb3;
  --yellow: #ffd36e;
  --danger: #ff4d5e;
  --danger-soft: rgba(255, 77, 94, 0.12);
  --danger-border: rgba(255, 77, 94, 0.48);
  --radius: 8px;
  --pill: 9999px;
  --shadow: none;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0;
  background: rgba(10, 10, 10, 0.92);
  border-bottom: 1px solid var(--hairline);
  backdrop-filter: blur(12px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: none;
  min-height: 64px;
  margin: 0;
  padding: 0 24px;
}

.brand,
.topnav,
.nav-group,
.transport,
.filters,
.segmented,
.save-row {
  display: flex;
  align-items: center;
}

.brand {
  flex: 0 0 auto;
  gap: 12px;
  font-size: 15px;
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-name {
  color: var(--ink);
  font-weight: 800;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--hairline-strong);
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.topnav {
  min-width: 0;
  margin-left: auto;
  gap: 12px;
}

.nav-group {
  gap: 6px;
  padding: 4px;
}

.nav-primary {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--hairline);
  border-radius: var(--pill);
}

.nav-account {
  justify-content: flex-end;
}

.account-menu {
  position: relative;
  display: block;
}

.account-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--pill);
  background: transparent;
  color: var(--body);
  font-size: 14px;
  cursor: pointer;
  list-style: none;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.account-menu summary::-webkit-details-marker {
  display: none;
}

.account-menu summary::after {
  width: 6px;
  height: 6px;
  margin-left: 9px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  content: "";
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.account-menu[open] summary::after {
  transform: rotate(225deg) translate(-1px, -1px);
}

.account-menu-label,
.account-menu-user,
.account-menu-item {
  display: inline-flex;
  align-items: center;
}

.account-menu-user {
  min-width: 0;
  gap: 8px;
}

#account-menu-first-name {
  display: block;
  max-width: 116px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-avatar {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  color: #0a0a0a;
}

.account-avatar svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 25;
  display: none;
  width: 196px;
  padding: 8px;
  background: var(--canvas-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
}

.account-menu[open] .account-menu-panel {
  display: grid;
  gap: 6px;
}

.account-menu-panel a,
.account-menu-panel button {
  justify-content: flex-start;
  width: 100%;
}

.account-menu-panel button {
  appearance: none;
  font: inherit;
  cursor: pointer;
}

.account-menu-item {
  min-height: 38px;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--body);
  font-size: 14px;
  text-align: left;
}

.account-menu-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-menu-logout {
  color: #ffd7dc;
}

.global-volume-control {
  display: grid;
  grid-template-columns: 42px 128px;
  align-items: center;
  gap: 8px;
  width: 190px;
  min-height: 46px;
  padding: 4px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--body);
}

.global-mute {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--body);
  background: transparent;
  border: 0;
  border-radius: 50%;
}

.global-mute:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

.global-mute .button-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}

.global-volume-control input {
  width: 100%;
  min-height: 0;
  padding: 0;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.global-volume-control input::-webkit-slider-runnable-track {
  height: 2px;
  background: #f3f3f3;
  border-radius: 999px;
}

.global-volume-control input::-webkit-slider-thumb {
  width: 12px;
  height: 24px;
  margin-top: -11px;
  appearance: none;
  background: #ffffff;
  border: 0;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.32);
}

.global-volume-control input::-moz-range-track {
  height: 2px;
  background: #f3f3f3;
  border-radius: 999px;
}

.global-volume-control input::-moz-range-thumb {
  width: 12px;
  height: 24px;
  background: #ffffff;
  border: 0;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.32);
}

.topnav a,
.chip,
.segment,
.pill {
  min-height: 40px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--pill);
  background: transparent;
  color: var(--ink);
}

.topnav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  color: var(--body);
  font-size: 14px;
}

.topnav a.active,
.topnav a[aria-current="page"] {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.topnav .nav-strong {
  border-color: #ffffff;
  background: #ffffff;
  color: #0a0a0a;
}

.pwa-install-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #ffffff;
  border-radius: var(--pill);
  background: #ffffff;
  color: #0a0a0a;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 160ms ease;
}

.pwa-install-button .button-icon {
  width: 18px;
  height: 18px;
}

.pwa-install-button:hover {
  opacity: 0.88;
}

.nav-toggle {
  position: relative;
  display: none;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--hairline-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
}

/* Always-visible auth shortcut in the top bar. Desktop uses the account dropdown, so it
   only surfaces on mobile (see the max-width: 760px block). renderAccount hides it when
   signed in via the data-auth-state attribute. */
.mobile-auth-cta {
  display: none;
}

.nav-toggle span {
  position: absolute;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 160ms ease, opacity 160ms ease;
}

.nav-toggle span:nth-child(1) {
  transform: translateY(-5px);
}

.nav-toggle span:nth-child(3) {
  transform: translateY(5px);
}

.topbar.nav-open .nav-toggle span:nth-child(1) {
  transform: rotate(45deg);
}

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

.topbar.nav-open .nav-toggle span:nth-child(3) {
  transform: rotate(-45deg);
}

.topnav a:focus-visible,
.pwa-install-button:focus-visible,
.account-menu summary:focus-visible,
.account-menu-panel button:focus-visible,
.global-mute:focus-visible,
.nav-toggle:focus-visible,
.transport-button:focus-visible,
.pill:focus-visible,
.chip:focus-visible,
.segment:focus-visible,
input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.app-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.hero-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  padding: 40px 0 32px;
  position: relative;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(50px, 8vw, 85px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0;
  font-size: 17px;
  font-weight: 400;
}

.hero-copy {
  position: relative;
  padding-bottom: 18px;
}

.hero-summary {
  max-width: 460px;
  margin: 0 auto 28px;
  color: var(--body);
  font-size: 16px;
}

.transport {
  position: relative;
  isolation: isolate;
  z-index: 1;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.08),
    inset 0 -18px 36px rgba(0, 0, 0, 0.42),
    0 18px 54px rgba(0, 0, 0, 0.34),
    0 0 60px 30px rgba(0, 0, 0, 0.85);
  display: grid;
  place-items: center;
  width: clamp(220px, 24vw, 292px);
  aspect-ratio: 1;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.045) 0 31%, transparent 32%),
    radial-gradient(circle at 34% 18%, rgba(255, 255, 255, 0.06), transparent 31%),
    linear-gradient(145deg, #202020, #111111 72%);
}

.transport::before,
.transport::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.transport::before {
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.72),
    inset 0 18px 34px rgba(255, 255, 255, 0.025);
}

.transport::after {
  inset: 32%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: radial-gradient(circle at 45% 36%, rgba(255, 255, 255, 0.045), rgba(13, 13, 13, 0.92) 68%);
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(0, 0, 0, 0.9);
}

.transport.control-fired::before {
  animation: dialPulse 520ms ease-out;
}

.transport.is-playing {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.1),
    inset 0 -18px 36px rgba(0, 0, 0, 0.42),
    0 18px 54px rgba(0, 0, 0, 0.34);
}

.transport-button {
  position: absolute;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.transport-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.16);
  opacity: 0;
  transform: scale(0.62);
  pointer-events: none;
}

.transport-button.is-pressing::after {
  animation: transportRipple 420ms ease-out;
}

.transport-button:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.045);
  color: #ffffff;
}

.transport-button:active {
  transform: scale(0.96);
}

.dial-action {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  gap: 1px;
}

.dial-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
  line-height: 1;
}

.dial-action .button-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dial-sleep {
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
}

.dial-focus {
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
}

.dial-random {
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
}

.dial-clear {
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
}

.dial-sleep:active,
.dial-clear:active {
  transform: translateX(-50%) scale(0.96);
}

.dial-focus:active,
.dial-random:active {
  transform: translateY(-50%) scale(0.96);
}

.transport-main {
  z-index: 2;
  width: clamp(96px, 10vw, 124px);
  height: clamp(96px, 10vw, 124px);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.13);
  background:
    radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.08), transparent 36%),
    radial-gradient(circle at 50% 76%, rgba(0, 0, 0, 0.52), transparent 58%),
    linear-gradient(145deg, #242424, #0d0d0d 78%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.09),
    inset 0 -12px 24px rgba(0, 0, 0, 0.52);
}

.transport-main:hover {
  background:
    radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.12), transparent 36%),
    radial-gradient(circle at 50% 76%, rgba(0, 0, 0, 0.46), transparent 58%),
    linear-gradient(145deg, #2c2c2c, #111111 78%);
  color: #ffffff;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.12),
    inset 0 -12px 24px rgba(0, 0, 0, 0.5);
}

.transport-main.is-playing {
  background:
    radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.14), transparent 34%),
    radial-gradient(circle at 50% 76%, rgba(0, 0, 0, 0.42), transparent 58%),
    linear-gradient(145deg, #262626, #0a0a0a 78%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.14),
    inset 0 -12px 24px rgba(0, 0, 0, 0.48);
}

.transport-main .button-icon {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  fill: currentColor;
  stroke: none;
}

.transport-main .icon-pause {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
}

@keyframes transportRipple {
  0% {
    opacity: 0.34;
    transform: scale(0.58);
  }
  100% {
    opacity: 0;
    transform: scale(1.45);
  }
}

@keyframes dialPulse {
  0% {
    box-shadow:
      inset 0 0 0 1px rgba(0, 0, 0, 0.72),
      inset 0 18px 34px rgba(255, 255, 255, 0.025),
      0 0 0 0 rgba(255, 255, 255, 0.12);
  }
  100% {
    box-shadow:
      inset 0 0 0 1px rgba(0, 0, 0, 0.72),
      inset 0 18px 34px rgba(255, 255, 255, 0.025),
      0 0 0 18px rgba(255, 255, 255, 0);
  }
}

.pill,
.chip,
.segment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  white-space: nowrap;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.button-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

svg.button-icon {
  fill: currentColor;
  stroke: none;
}

.pill:not(.premium-cta):hover,
.chip:hover,
.segment:hover,
.account-menu summary:hover,
.account-menu-item:hover,
.topnav a:hover {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.account-menu-logout:hover {
  border-color: var(--danger-border);
  background: var(--danger-soft);
  color: #ffffff;
}

.pill.primary {
  border-color: #ffffff;
  background: #ffffff;
  color: #0a0a0a;
}

.premium-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 48px;
  min-width: min(100%, 260px);
  padding: 0 20px;
  gap: 12px;
  border: 1px solid rgba(180, 120, 20, 0.7);
  border-radius: 999px;
  background:
    linear-gradient(100deg, #b66f00 0%, #ffbf24 18%, #ffd84d 37%, #e79200 56%, #ffc43a 77%, #a35f00 100%);
  color: #070603;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 249, 192, 0.72),
    inset 0 -3px 0 rgba(106, 61, 0, 0.28),
    inset 0 -12px 18px rgba(120, 69, 0, 0.18),
    0 6px 16px rgba(255, 179, 31, 0.18);
  animation: premiumPulse 3.2s ease-in-out infinite;
  transition: background 200ms ease, border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.premium-cta:hover {
  background:
    linear-gradient(100deg, #cc8000 0%, #ffca40 18%, #ffe06a 37%, #f0a010 56%, #ffd050 77%, #b87000 100%);
  border-color: rgba(255, 200, 60, 0.8);
  box-shadow:
    inset 0 1px 0 rgba(255, 252, 220, 0.9),
    inset 0 -3px 0 rgba(106, 61, 0, 0.18),
    inset 0 -12px 18px rgba(120, 69, 0, 0.1),
    0 8px 24px rgba(255, 191, 36, 0.36);
  transform: translateY(-1px);
}

.premium-cta:active {
  background:
    linear-gradient(100deg, #a56200 0%, #e8ad1e 18%, #f0c840 37%, #d08000 56%, #e8b030 77%, #904e00 100%);
  border-color: rgba(140, 90, 10, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 180, 0.5),
    inset 0 -2px 0 rgba(80, 45, 0, 0.3),
    inset 0 -8px 14px rgba(100, 55, 0, 0.2),
    0 2px 8px rgba(255, 179, 31, 0.12);
  transform: translateY(0) scale(0.98);
}

.premium-cta > * {
  position: relative;
  z-index: 2;
}

.premium-cta::before {
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 239, 120, 0.05) 46%, rgba(89, 52, 0, 0.2) 100%);
  content: "";
  z-index: 0;
  animation: premiumGoldSweep 4s linear infinite;
}

.premium-cta::after {
  display: none;
}

.premium-diamond {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  color: #050505;
  background: transparent;
  border: 0;
  border-radius: 0;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.22));
  animation: premiumDiamond 2.6s ease-in-out infinite;
}

.premium-diamond svg {
  width: 29px;
  height: 29px;
  fill: rgba(0, 0, 0, 0.08);
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.subscription-card .premium-diamond svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
}

.subscription-card .premium-diamond svg path {
  fill: none;
}

.compact-premium {
  width: 100%;
}

@keyframes premiumPulse {
  0%,
  100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 249, 192, 0.72),
      inset 0 -3px 0 rgba(106, 61, 0, 0.28),
      inset 0 -12px 18px rgba(120, 69, 0, 0.18),
      0 6px 16px rgba(255, 179, 31, 0.18);
  }
  50% {
    box-shadow:
      inset 0 1px 0 rgba(255, 252, 220, 0.88),
      inset 0 -3px 0 rgba(106, 61, 0, 0.2),
      inset 0 -12px 18px rgba(120, 69, 0, 0.12),
      0 8px 24px rgba(255, 191, 36, 0.3);
  }
}

@keyframes premiumGoldSweep {
  0%,
  100% {
    opacity: 0.72;
  }
  50% {
    opacity: 0.95;
  }
}

@keyframes premiumDiamond {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-1px);
  }
}


.pill.icon-pill {
  width: 40px;
  padding-right: 0;
  padding-left: 0;
}

.transport-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 16px;
  background: #0a0a0a;
}

.now-playing {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: min(920px, 100%);
  margin: -4px auto 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.now-playing-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.now-playing-label {
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.now-playing-count {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  place-items: center;
  border-radius: var(--pill);
  background: #ffffff;
  color: #0a0a0a;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
}

.now-playing-list {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  gap: 8px 8px;
  overflow: visible;
  padding: 2px 0;
}

.now-playing-chip {
  --chip-accent: #ffffff;
  --chip-glow: rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  max-width: 230px;
  min-height: 34px;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left-color: var(--chip-accent);
  border-left-width: 3px;
  border-radius: var(--pill);
  background: linear-gradient(90deg, var(--chip-glow), rgba(255, 255, 255, 0.035));
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.now-playing-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--chip-accent);
  box-shadow: 0 0 14px var(--chip-accent);
}

.now-playing-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.now-playing-volume {
  color: rgba(255, 255, 255, 0.66);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}

.visualizer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 392px);
  gap: 24px;
  align-items: start;
}

.route-page {
  min-height: calc(100vh - 96px);
  display: grid;
  place-items: center;
  padding: 56px 0;
}

.route-card {
  position: relative;
  width: min(560px, 100%);
  padding: 28px;
  background: var(--canvas-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

.route-card h1 {
  font-size: clamp(42px, 7vw, 72px);
}

.auth-card {
  padding-top: 76px;
}

.route-card:not(.auth-card) > .route-back + .eyebrow {
  display: flex;
  align-items: center;
  min-height: 40px;
  margin: -8px 0 12px 52px;
}

.route-back {
  position: absolute;
  top: 20px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: #fff;
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.route-back:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--hairline-strong);
}

.route-back svg {
  width: 20px;
  height: 20px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

.google-auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  color: #111;
  font-weight: 800;
  background: #f7f7f2;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

.google-auth-button:hover,
.google-auth-button:focus-visible {
  background: #fff;
  border-color: #fff;
  transform: translateY(-1px);
}

.google-auth-button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.google-mark {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}

.auth-switch {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.auth-switch a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  transition: border-color 0.2s, color 0.2s;
}

.auth-switch a:hover,
.auth-switch a:focus-visible {
  color: #fff;
  border-color: #fff;
}

.subscription-card {
  position: relative;
  width: min(680px, 100%);
  text-align: center;
}

.plan-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 28px 0 24px;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 24px 20px;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.plan-card-featured {
  border-color: rgba(255, 191, 36, 0.35);
  background: linear-gradient(165deg, rgba(255, 191, 36, 0.04), transparent 60%);
}

.plan-badge {
  position: absolute;
  top: -10px;
  right: 16px;
  padding: 2px 10px;
  background: linear-gradient(135deg, #ffbf24, #ffd84d);
  color: #0a0a0a;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 99px;
}

.plan-label {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.plan-price {
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  color: var(--heading);
  line-height: 1.1;
}

.plan-detail {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.plan-per-month {
  margin: 2px 0 0;
  color: var(--body);
  font-size: 13px;
}

.plan-card .premium-cta {
  margin-top: 16px;
  width: 100%;
}

#plan-month .premium-cta {
  background: #d4d4d4;
  background-image: none;
  border-color: #e0e0e0;
  color: #1a1a1a;
  animation: none;
  -webkit-text-fill-color: #1a1a1a;
}

#plan-month .premium-cta::before,
#plan-month .premium-cta::after {
  display: none;
}

#plan-month .premium-cta .premium-diamond svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

#plan-month .premium-cta:hover {
  background: #e8e8e8;
  border-color: #f0f0f0;
  color: #000;
  -webkit-text-fill-color: #000;
}

#plan-month .premium-cta:hover .premium-diamond svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

#plan-year .premium-cta {
  background: linear-gradient(100deg, #b66f00 0%, #ffbf24 18%, #ffd84d 37%, #e79200 56%, #ffc43a 77%, #a35f00 100%);
  background-image: linear-gradient(100deg, #b66f00 0%, #ffbf24 18%, #ffd84d 37%, #e79200 56%, #ffc43a 77%, #a35f00 100%);
  border-color: rgba(255, 191, 36, 0.5);
  color: #1a1200;
  animation: premiumPulse 3.2s ease-in-out infinite;
  -webkit-text-fill-color: #1a1200;
}

#plan-year .premium-cta .premium-diamond svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

#plan-year .premium-cta::before {
  transition: opacity 0.3s;
}

#plan-year .premium-cta::after {
  transition: opacity 0.3s;
}

#plan-year .premium-cta:hover {
  background: #d4d4d4;
  background-image: none;
  border-color: #e0e0e0;
  color: #1a1a1a;
  -webkit-text-fill-color: #1a1a1a;
  animation: none;
}

#plan-year .premium-cta:hover .premium-diamond svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

#plan-year .premium-cta:hover::before {
  opacity: 0;
}

#plan-year .premium-cta:hover::after {
  opacity: 0;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--body);
  font-size: 14px;
}

.feature-diamond {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: #ffbf24;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.plan-yearly-equiv {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.route-copy {
  color: var(--body);
}

.route-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.section-heading,
.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.panel-heading.compact {
  margin-bottom: 16px;
}

.filters {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.chip {
  min-height: 34px;
  padding: 6px 12px;
  color: var(--body);
  font-size: 13px;
}

.chip.active,
.segment.active {
  background: var(--ink);
  color: var(--canvas);
}

.sound-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  grid-auto-rows: minmax(132px, auto);
  align-items: stretch;
  gap: 12px;
}

.sound-accordion {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}

.sound-accordion > summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.sound-accordion > summary::-webkit-details-marker {
  display: none;
}

.sound-accordion > summary::after {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid var(--hairline-strong);
  border-radius: 50%;
  color: var(--muted);
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 15px;
}

.sound-accordion[open] > summary::after {
  content: "-";
}

.sound-accordion:not([open]) > summary {
  margin-bottom: 0;
}

.sound-accordion > summary:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.78);
  outline-offset: 6px;
}

.premium-shell {
  position: relative;
}

.accordion-actions,
.accordion-filters {
  margin-bottom: 16px;
}

.accordion-filters {
  justify-content: flex-start;
}

.sound-search-row {
  margin-bottom: 12px;
}

.sound-search-row input {
  width: 100%;
  max-width: none;
  min-height: 40px;
  padding: 8px 14px;
  color: var(--ink);
  background: var(--canvas-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--pill);
  font-size: 14px;
}

.sound-search-row input::placeholder {
  color: #6e747c;
}

.sound-search-row input:focus {
  border-color: rgba(255, 255, 255, 0.48);
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.custom-sounds-section {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.premium-heading {
  align-items: center;
}

.premium-status {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.premium-status.warning {
  color: var(--muted);
}

.sound-card {
  --card-accent: #3d3c3c;
  position: relative;
  display: grid;
  gap: 10px;
  height: 100%;
  min-height: 132px;
  padding: 14px 14px 12px 16px;
  overflow: hidden;
  background: var(--canvas-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

.sound-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--card-accent);
  content: "";
}

.sound-card[data-accent="blue"] {
  --accent: var(--blue);
}

.sound-card[data-accent="violet"] {
  --accent: var(--violet);
}

.sound-card[data-accent="cyan"] {
  --accent: #7ec8e3;
}

.sound-card[data-accent="white"] {
  --accent: var(--body);
}

.sound-card[data-accent="orange"] {
  --accent: var(--orange);
}

.sound-card[data-accent="amber"] {
  --accent: #ffc285;
}

.sound-card[data-accent="green"] {
  --accent: var(--green);
}

.sound-card[data-accent="lime"] {
  --accent: #b9e769;
}

.sound-card[data-accent="yellow"] {
  --accent: var(--yellow);
}

.sound-card[data-accent="rose"] {
  --accent: var(--rose);
}

.sound-card[data-accent="cream"] {
  --accent: #f6f0a7;
}

.sound-card[data-accent="tan"] {
  --accent: #b7a38a;
}

.sound-card[data-accent="ice"] {
  --accent: #b4c7d9;
}

.sound-card[data-accent="indigo"] {
  --accent: #97a7ff;
}

.sound-card.active {
  --card-accent: var(--accent);
  border-color: rgba(255, 255, 255, 0.34);
}

.sound-card.premium-card {
  --card-accent: var(--accent);
  border-color: rgba(255, 255, 255, 0.18);
}

.sound-card.locked {
  border-color: var(--hairline);
}

.sound-card.locked .sound-symbol {
  color: var(--card-accent);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--hairline);
}

.sound-card.locked .slider-row,
.sound-card.locked .sound-meter {
  opacity: 0.42;
}

.sound-card.hidden {
  display: none;
}

.sound-top,
.sound-identity,
.sound-actions,
.sound-meter,
.item-row,
.account-line {
  display: flex;
  align-items: center;
}

.sound-top {
  justify-content: space-between;
  gap: 10px;
}

.sound-identity {
  min-width: 0;
  gap: 12px;
}

.sound-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  color: var(--card-accent);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hairline);
  border-radius: 50%;
}

.sound-icon {
  width: 30px;
  height: 30px;
}

.sound-icon * {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.sound-meta {
  min-width: 0;
}

.sound-name {
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.2;
}

.sound-category {
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sound-actions {
  flex: 0 0 auto;
  gap: 6px;
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--hairline-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
}

.mini-button:disabled,
.volume-slider:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.mini-button .button-icon {
  width: 15px;
  height: 15px;
}

.favorite-button .icon-star {
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.8;
}

.favorite-button.active .icon-star {
  fill: currentColor;
}

.icon-lock {
  color: var(--danger);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.sound-card.locked .mute-button {
  color: var(--danger);
  border-color: var(--danger-border);
}

.sound-card.locked .mute-button:hover {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: var(--danger-border);
}

.mini-button:hover,
.mini-button.active {
  border-color: #ffffff;
  background: #ffffff;
  color: #0a0a0a;
}

.danger-button {
  color: var(--danger);
  border-color: var(--danger-border);
}

.danger-button:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

.danger-pill {
  color: #ffd7dc;
  background: var(--danger);
  border-color: var(--danger);
}

.danger-pill:hover {
  color: #ffffff;
  background: #ff6f7c;
  border-color: #ff6f7c;
}

.slider-row {
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 10px;
  align-items: center;
}

input[type="range"] {
  --slider-track-bg: #191919;
  --slider-track-border: #3d3c3c;
  --volume-percent: 0%;
  height: 18px;
  width: 100%;
  background: transparent;
  accent-color: var(--card-accent);
  -webkit-appearance: none;
  appearance: none;
}

.volume-slider::-webkit-slider-runnable-track {
  height: 8px;
  background: linear-gradient(
    to right,
    var(--card-accent) 0%,
    var(--card-accent) var(--volume-percent),
    var(--slider-track-bg) var(--volume-percent),
    var(--slider-track-bg) 100%
  );
  border: 1px solid var(--slider-track-border);
  border-radius: var(--pill);
}

.volume-slider::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -5px;
  background: var(--card-accent);
  border: 1px solid var(--slider-track-border);
  border-radius: 50%;
  -webkit-appearance: none;
  appearance: none;
}

.volume-slider::-moz-range-track {
  height: 8px;
  background: var(--slider-track-bg);
  border: 1px solid var(--slider-track-border);
  border-radius: var(--pill);
}

.volume-slider::-moz-range-progress {
  height: 8px;
  background: var(--card-accent);
  border: 1px solid var(--slider-track-border);
  border-radius: var(--pill);
}

.volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--card-accent);
  border: 1px solid var(--slider-track-border);
  border-radius: 50%;
}

.volume-value {
  color: var(--body);
  font-family: var(--mono);
  font-size: 12px;
  text-align: right;
}

.sound-meter {
  gap: 4px;
  min-height: 14px;
}

.meter-bar {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--canvas-mid);
}

.meter-bar.on {
  background: var(--card-accent);
}

.side-rail {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.panel {
  padding: 20px;
  background: var(--canvas-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

.custom-audio-panel {
  overflow: visible;
}

.custom-access-message {
  margin-top: 0;
  color: var(--body);
  font-size: 14px;
}

.custom-access-message.warning {
  color: #ffd7dc;
}

.save-row {
  gap: 8px;
}

.save-row input {
  min-width: 0;
}

.stack-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

label {
  color: var(--body);
  font-size: 13px;
}

input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--canvas-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

input::placeholder {
  color: #6e747c;
}

input[type="file"] {
  padding: 8px;
}

.list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.empty {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.item-row {
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  background: var(--canvas-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

.item-title {
  min-width: 0;
  overflow: hidden;
  color: var(--body);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.item-actions .mini-button {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

.segmented {
  gap: 4px;
  padding: 4px;
  background: var(--canvas-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--pill);
}

.segment {
  min-height: 34px;
  flex: 1;
  border-color: transparent;
  padding: 6px 12px;
  font-size: 14px;
}

.auth-form {
  margin-top: 16px;
}

.account-name {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 18px;
}

.account-email {
  margin-bottom: 16px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
}

.confirm-panel {
  width: min(420px, calc(100vw - 40px));
  padding: 22px;
  background: var(--canvas-card);
  border: 1px solid #3d3c3c;
  border-radius: var(--radius);
}

.confirm-panel h2 {
  font-size: 24px;
}

.confirm-message {
  margin: 12px 0 20px;
  color: var(--body);
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.share-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 35;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  color: #0a0a0a;
  background: linear-gradient(145deg, #ffffff, #dfe4ea);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 50%;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.38);
}

.share-float svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.share-panel {
  position: fixed;
  right: 20px;
  bottom: 84px;
  z-index: 34;
  width: min(328px, calc(100vw - 40px));
  padding: 14px;
  color: var(--ink);
  background: var(--canvas-card);
  border: 1px solid #3d3c3c;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.share-panel.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.share-panel p {
  margin: 0 0 12px;
  color: var(--body);
  font-size: 13px;
  line-height: 1.45;
}

.share-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.share-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 10px;
  color: var(--ink);
  background: #111111;
  border: 1px solid var(--hairline);
  border-radius: var(--pill);
  font-size: 13px;
}

.share-actions a:hover {
  border-color: rgba(255, 255, 255, 0.42);
  background: #1f1f1f;
}

.toast {
  position: fixed;
  right: 86px;
  bottom: 20px;
  z-index: 30;
  max-width: min(360px, calc(100vw - 40px));
  padding: 12px 16px;
  color: var(--ink);
  background: #111316;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.error,
.toast.warning {
  color: #ffd7dc;
  background: #220c11;
  border-color: var(--danger-border);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.hidden,
[hidden] {
  display: none !important;
}

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

.site-footer {
  margin-top: 64px;
  padding: 32px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand {
  font-size: 15px;
  font-weight: 600;
  color: var(--heading);
  letter-spacing: -0.01em;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--heading);
}

.footer-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.25);
  font-size: 12px;
}

@media (max-width: 1080px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .side-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  .topbar {
    padding: 0;
  }

  .topbar-inner {
    flex-wrap: wrap;
    min-height: 60px;
    padding: 9px 16px;
  }

  .brand-copy {
    max-width: 190px;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  /* Prominent auth CTA next to the hamburger for signed-out mobile visitors. The CTA owns
     the auto margin so it and the toggle sit together on the right; when it is hidden
     (signed in), the auto margin hands back to the toggle so the hamburger stays flush right. */
  .mobile-auth-cta {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    min-height: 38px;
    padding: 6px 18px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
  }

  .mobile-auth-cta + .nav-toggle {
    margin-left: 0;
  }

  .mobile-auth-cta.hidden + .nav-toggle {
    margin-left: auto;
  }

  .topnav {
    width: 100%;
    display: none;
    align-items: stretch;
    margin-left: 0;
    padding: 10px;
    background: var(--canvas-card);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
  }

  .topbar.nav-open .topnav {
    display: grid;
    gap: 8px;
  }

  .nav-group {
    display: grid;
    gap: 8px;
    padding: 0;
  }

  .nav-primary {
    background: transparent;
    border: 0;
  }

  .nav-account {
    justify-content: stretch;
    border-top: 1px solid var(--hairline);
    padding-top: 8px;
  }

  .account-menu,
  .account-menu summary {
    width: 100%;
  }

  .account-menu summary {
    display: none;
  }

  .account-menu-user {
    flex: 1;
  }

  #account-menu-first-name {
    max-width: none;
  }

  /* Flatten the account menu into full-width, centered buttons matching the
     Instalar button. The display lives on the [open] selector so it beats the
     desktop `.account-menu[open] .account-menu-panel` rule (same specificity). */
  .account-menu-panel {
    position: static;
    width: 100%;
    margin-top: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .account-menu[open] .account-menu-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .account-menu-panel a,
  .account-menu-panel button {
    justify-content: center;
  }

  .topnav .nav-strong {
    border-color: var(--hairline-strong);
    background: transparent;
    color: var(--body);
  }

  .global-volume-control {
    width: 100%;
    grid-template-columns: 42px 1fr;
  }

  .global-volume-control input {
    width: 100%;
  }

  .topnav a {
    justify-content: flex-start;
    width: 100%;
  }

  .app-shell {
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero-band {
    padding-top: 28px;
    padding-bottom: 24px;
  }

  .filters,
  .section-heading {
    justify-content: flex-start;
  }

  .transport {
    width: min(68vw, 240px);
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .sound-accordion > summary.section-heading {
    align-items: center;
    flex-direction: row;
  }

  .side-rail {
    grid-template-columns: 1fr;
  }

  .save-row {
    align-items: stretch;
    flex-direction: column;
  }

  .share-float {
    right: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
  }

  .share-panel {
    right: 16px;
    bottom: 76px;
    width: calc(100vw - 32px);
  }

  .toast {
    right: 16px;
    bottom: 76px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer-links {
    gap: 16px;
  }

  .plan-cards {
    grid-template-columns: 1fr;
  }
}

/* ── Footer link as button (Gerenciar cookies) ───────────────────────── */
/* Match .footer-links a exactly so the button reads as a sibling link. */
.footer-links .footer-link-button {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: 13px;
  line-height: inherit;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s;
}
.footer-links .footer-link-button:hover {
  color: var(--heading);
}

/* ── CMP Banner ──────────────────────────────────────────────────────── */
.cmp-banner {
  position: fixed;
  inset: auto 16px 16px 16px;
  z-index: 60;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.cmp-banner.hidden { display: none; }
.cmp-panel {
  pointer-events: auto;
  width: 100%;
  max-width: 680px;
  background: var(--canvas-cookie);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 14px 16px 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
}
.cmp-panel .eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--violet);
  text-transform: uppercase;
}
.cmp-panel h2 {
  margin: 2px 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.cmp-desc {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--body);
  line-height: 1.35;
}
.cmp-desc em { font-style: normal; color: var(--ink); }
.cmp-link { color: var(--violet); text-decoration: underline; }
.cmp-link:hover { color: #d6cdfd; }

.cmp-categories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}
.cmp-cat {
  display: block;
  background: var(--canvas-cookie);
  border: 1px solid var(--cookie-border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.cmp-cat:has(input:disabled) { cursor: default; }
.cmp-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cmp-cat-name {
  color: var(--ink);
  font-weight: 500;
  font-size: 12px;
}
.cmp-cat-state.always {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink);
  background: rgba(139, 215, 167, 0.10);
  border: 1px solid rgba(91, 43, 205, 0.608);
  border-radius: 9999px;
  padding: 2px 8px;
}
.cmp-cat-desc {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--cookie-desc);
  line-height: 1.35;
}
/* ON/OFF pill toggle sized to match the .pill.primary button (Aceitar todos):
   40px height like the action pills, with a 110px width that gives a similar pill
   aspect ratio. Bold black border, label inside the track, knob slides between sides.
   White fill = OFF, black fill = ON. */
.cmp-cat input[type="checkbox"] {
  display: inline-block;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  width: 85px;
  height: 20px;
  margin: 0;
  padding: 0;
  background: #ffffff;
  border: 5px solid var(--canvas-cookie);
  border-radius: 9999px;
  position: relative;
  cursor: pointer;
  flex: 0 0 85px;
  transition: background .15s ease;
}
.cmp-cat input[type="checkbox"]::before {
  /* Label sits opposite the knob — "OFF" on the right when unchecked. */
  content: "OFF";
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: #0a0a0a;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.03em;
  pointer-events: none;
}
.cmp-cat input[type="checkbox"]::after {
  /* Knob — solid disc that slides left↔right; inverts color with the track. */
  content: "";
  position: absolute;
  top: 50%;
  left: 4px;
  width: 25px;
  height: 25px;
  background: #0a0a0a;
  border-radius: 50%;
  transform: translateY(-50%);
  transition: transform .15s ease, background .15s ease;
}
.cmp-cat input[type="checkbox"]:checked {
  background: #0a0a0a;
}
.cmp-cat input[type="checkbox"]:checked::before {
  content: "ON";
  right: auto;
  left: 14px;
  color: #ffffff;
}
.cmp-cat input[type="checkbox"]:checked::after {
  transform: translate(45px, -50%);
  background: #ffffff;
}
.cmp-cat input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

.cmp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.cmp-actions .pill {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 24px;
  padding: 6px 12px;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 560px) {
  .topbar-inner {
    padding-right: 12px;
    padding-left: 12px;
  }

  .brand-copy {
    max-width: 150px;
  }

  .app-shell {
    padding-right: 12px;
    padding-left: 12px;
    padding-bottom: 36px;
  }

  .hero-band {
    padding-top: 22px;
  }

  h1 {
    font-size: 40px;
    line-height: 1.02;
  }

  h2 {
    font-size: 24px;
  }

  .hero-summary {
    margin-bottom: 20px;
    font-size: 14px;
  }

  .transport-wrap {
    min-height: 252px;
    padding: 10px 0 28px;
  }

  .transport {
    width: min(calc(100vw - 96px), 214px);
    margin-bottom: 0;
    box-shadow:
      inset 0 1px 1px rgba(255, 255, 255, 0.08),
      inset 0 -14px 28px rgba(0, 0, 0, 0.42),
      0 14px 34px rgba(0, 0, 0, 0.32),
      0 0 34px 14px rgba(0, 0, 0, 0.78);
  }

  .now-playing {
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    margin-top: -10px;
  }

  .now-playing-list {
    padding-bottom: 4px;
  }

  .now-playing-chip {
    max-width: 76vw;
  }

  .dial-action {
    width: 46px;
    height: 46px;
  }

  .dial-label {
    font-size: 8px;
  }

  .dial-action .button-icon {
    width: 19px;
    height: 19px;
    flex-basis: 19px;
  }

  .dial-sleep {
    top: 12px;
  }

  .dial-focus {
    right: 12px;
  }

  .dial-random {
    left: 12px;
  }

  .dial-clear {
    bottom: 12px;
  }

  .transport-main {
    width: 84px;
    height: 84px;
  }

  .transport-main .button-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .transport-main .icon-pause {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .premium-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .premium-heading .premium-cta {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    min-height: 44px;
  }

  .sound-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(124px, auto);
  }

  .sound-card {
    min-height: 124px;
    padding: 12px;
  }

  .sound-top {
    align-items: flex-start;
  }

  .sound-identity {
    gap: 10px;
  }

  .sound-symbol {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .sound-icon {
    width: 26px;
    height: 26px;
  }

  .slider-row {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .volume-value {
    font-size: 11px;
  }

  .route-page {
    min-height: calc(100vh - 76px);
    padding: 28px 0;
  }

  .route-card,
  .panel {
    padding: 16px;
  }

  .auth-card {
    padding-top: 64px;
  }

  .route-back {
    top: 14px;
    left: 14px;
  }

  .route-card:not(.auth-card) > .route-back + .eyebrow {
    margin: -2px 0 10px 48px;
  }

  .plan-card {
    padding: 20px 14px;
  }

  .item-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .item-title {
    white-space: normal;
  }

  .item-actions {
    margin-left: auto;
  }

  .share-actions {
    grid-template-columns: 1fr;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .toast {
    max-width: calc(100vw - 32px);
  }

  .cmp-banner {
    inset: auto 8px 8px 8px;
  }
  .cmp-panel {
    padding: 12px 10px 10px;
  }
  .cmp-categories {
    grid-template-columns: 1fr;
  }
  .cmp-actions .pill {
    flex: 1 1 100%;
  }
}

@media (max-width: 380px) {
  body {
    min-width: 0;
  }

  .brand-name {
    max-width: 116px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .transport {
    width: min(calc(100vw - 72px), 188px);
    box-shadow:
      inset 0 1px 1px rgba(255, 255, 255, 0.08),
      inset 0 -12px 24px rgba(0, 0, 0, 0.42),
      0 12px 28px rgba(0, 0, 0, 0.32),
      0 0 28px 10px rgba(0, 0, 0, 0.74);
  }

  .transport-main {
    width: 76px;
    height: 76px;
  }

  .dial-action {
    width: 40px;
    height: 40px;
  }
}

/* ── Account page sections (privacy + danger zone) ───────────────────── */
.account-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}
.account-section .eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--violet);
  text-transform: uppercase;
}
.account-section-copy {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
}
.account-sub-status {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--body);
}
.account-sub-status.premium { color: var(--green); font-weight: 600; }

.account-section.danger-section {
  padding: 18px 16px;
  margin-top: 28px;
  border-radius: 12px;
  border: 1px solid var(--danger-border);
  background: var(--danger-soft);
}
.account-section.danger-section .eyebrow.danger-eyebrow {
  color: var(--danger);
}

/* ── Email verification banner ───────────────────────────────────────── */
.email-verify-banner {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 211, 110, 0.36);
  background: rgba(255, 211, 110, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.email-verify-banner.hidden { display: none; }
.email-verify-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--yellow);
}
.email-verify-copy strong { color: var(--yellow); font-weight: 700; }
.email-verify-copy span { color: var(--body); }
.email-verify-copy em { color: var(--ink); font-style: normal; font-weight: 600; }
.email-verify-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Edit display name form ──────────────────────────────────────────── */
.account-name-form {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: wrap;
}
.account-name-form input[type="text"] {
  flex: 1 1 220px;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--pill);
  background: var(--canvas-soft);
  color: var(--ink);
  font-size: 14px;
}
.account-name-form input[type="text"]:focus {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
  border-color: var(--violet);
}
.admin-code-form {
  max-width: 560px;
}
.admin-code-message {
  min-height: 18px;
}
.admin-code-message.premium {
  color: var(--green);
  font-weight: 600;
}

/* ── Consent history ─────────────────────────────────────────────────── */
.consent-history {
  margin-top: 18px;
  border-top: 1px dashed var(--hairline);
  padding-top: 14px;
}
.consent-history summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--body);
  list-style: none;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.consent-history summary::-webkit-details-marker { display: none; }
.consent-history summary::before {
  content: "▸";
  display: inline-block;
  font-size: 10px;
  color: var(--muted);
  transition: transform .15s ease;
}
.consent-history[open] summary::before { transform: rotate(90deg); }
.consent-history summary:hover { color: var(--ink); }

.consent-history-table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: 12px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  overflow: hidden;
}
.consent-history-table th,
.consent-history-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--hairline);
}
.consent-history-table thead th {
  background: var(--canvas-mid);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.consent-history-table tbody tr:last-child td { border-bottom: 0; }
.consent-history-table td { color: var(--body); }
.consent-history-table .yes { color: var(--green); font-weight: 600; }
.consent-history-table .no { color: var(--muted); }
.consent-history-table .date { color: var(--ink); white-space: nowrap; }

/* ── Mobile-only tabs (Filtro | Salvos) ──────────────────────────────── */
/* Hidden on desktop; shown ≤760px to split side-rail content into two views. */
.mobile-tabs {
  display: none;
}
.mobile-tab {
  flex: 1 1 0;
  background: transparent;
  border: 0;
  padding: 12px 8px 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.mobile-tab:hover { color: var(--body); }
.mobile-tab.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.mobile-tab:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (max-width: 760px) {
  /* Show tabs and put them at the top of workspace, with side-rail right below.
     Sound workbench falls last so the tab content is visually above "Sons premium". */
  .workspace {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .mobile-tabs {
    display: flex;
    order: 1;
    margin: 0 -4px;
    border-bottom: 1px solid var(--hairline);
    gap: 0;
  }
  .side-rail {
    order: 2;
    margin-top: 0;
    gap: 12px;
  }
  .sound-workbench {
    order: 3;
  }

  /* Filter side-rail items by active mobile tab. */
  body[data-mobile-tab="filtro"] [data-mobile-panel="salvos"] { display: none; }
  body[data-mobile-tab="salvos"] [data-mobile-panel="filtro"] { display: none; }
}

/* ── Forgot password link (Login) ────────────────────────────────────── */
.auth-forgot {
  margin: 14px 0 0;
  text-align: center;
}
.auth-link-button {
  background: transparent;
  border: 0;
  padding: 4px 8px;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.15s ease;
}
.auth-link-button:hover { color: var(--ink); }

/* ── Provider icon next to account email ─────────────────────────────── */
.account-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.account-provider-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}
.provider-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}
.provider-icon svg { display: block; }

/* Former-premium pitch shown in the Personalizado section when user has uploads but lost
   Premium. Stronger than the generic "Premium required" message — uses the violet accent. */
.custom-access-message.former-premium {
  color: var(--violet);
  font-weight: 600;
  background: rgba(196, 181, 253, 0.10);
  border: 1px solid rgba(196, 181, 253, 0.32);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 8px;
}
