:root {
  --bg: #07080b;
  --bg-2: #0b0e14;
  --panel: #10141c;
  --panel-2: #151a24;
  --border: #222938;
  --border-soft: rgba(255, 255, 255, 0.075);
  --text: #f2f5fa;
  --muted: #8d96ab;
  --muted-2: #667089;
  --green: #1ed760;
  --green-2: #25e26a;
  --green-dark: #14a84a;
  --violet: #7c5cff;
  --cyan: #38d9ff;
  --danger: #ff5d7a;
  --amber: #ffb547;
  --radius: 18px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 700px at 6% -10%, rgba(30, 215, 96, 0.13), transparent 55%),
    radial-gradient(900px 650px at 96% -8%, rgba(124, 92, 255, 0.14), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  background: rgba(30, 215, 96, 0.3);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: #2a3242;
  border-radius: 99px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------- Layout ---------- */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 234px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px 16px 16px;
  border-right: 1px solid var(--border-soft);
  background: rgba(8, 10, 14, 0.72);
  backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 8px 4px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand svg {
  width: 31px;
  height: 31px;
  flex: none;
}

.brand span {
  color: var(--green);
}

.brand .brand-name {
  color: var(--text);
}

.brand b {
  color: var(--green);
  font-weight: 700;
  margin-left: -6px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.18s, color 0.18s, transform 0.18s;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.nav a.active {
  background: linear-gradient(90deg, rgba(30, 215, 96, 0.15), rgba(30, 215, 96, 0.03));
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(30, 215, 96, 0.17);
}

.nav a.active svg {
  color: var(--green);
}

.nav a svg {
  width: 19px;
  height: 19px;
  flex: none;
}

.nav-label {
  padding: 0 12px;
  margin: 10px 0 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.025);
  min-width: 0;
}

.user-mini img,
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: linear-gradient(135deg, var(--green), var(--violet));
  display: grid;
  place-items: center;
  color: #04140a;
  font-weight: 800;
  font-size: 13px;
}

.user-mini .um-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-mini .um-sub {
  font-size: 10.5px;
  color: var(--muted);
}

.sidebar-note {
  padding: 0 10px;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--muted-2);
}

.main {
  margin-left: 234px;
  min-height: 100vh;
  position: relative;
  z-index: 2;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 34px;
  background: linear-gradient(180deg, rgba(7, 8, 11, 0.92), rgba(7, 8, 11, 0.55) 72%, transparent);
  backdrop-filter: blur(14px);
}

.page-head {
  flex: 1;
  min-width: 0;
}

.page-head h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.025em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-head p {
  margin: 1px 0 0;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-radius: 99px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s;
}

.sync-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.sync-pill .ico-only {
  display: none;
}

.sync-pill .ico-only svg {
  width: 15px;
  height: 15px;
}

.sync-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(30, 215, 96, 0.12);
}

.sync-pill.busy .dot {
  background: var(--cyan);
  animation: pulse 1.2s infinite;
}

.sync-pill.error .dot {
  background: var(--danger);
}

.avatar-btn {
  flex: none;
  border-radius: 50%;
  transition: transform 0.18s;
}
.avatar-btn:hover {
  transform: scale(1.05);
}

.content {
  max-width: 1360px;
  margin: 0 auto;
  padding: 6px 34px 130px;
  animation: fadeIn 0.3s ease;
}

.mobile-nav {
  display: none;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.16s, background 0.16s, border-color 0.16s, filter 0.16s;
}

.btn:active {
  transform: scale(0.98);
}

.btn.primary {
  background: linear-gradient(180deg, #28e56d, #17b954);
  color: #04140a;
  box-shadow: 0 12px 30px -14px rgba(30, 215, 96, 0.75);
}

.btn.primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--border);
  color: var(--text);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.075);
}

.btn.subtle {
  background: transparent;
  color: var(--muted);
}
.btn.subtle:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.btn.danger {
  background: rgba(255, 93, 122, 0.12);
  border-color: rgba(255, 93, 122, 0.3);
  color: #ff9aac;
}
.btn.danger:hover {
  background: rgba(255, 93, 122, 0.2);
}

.btn.sm {
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 12.5px;
}

.btn.icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
}

.btn[disabled],
.btn.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.btn svg {
  width: 17px;
  height: 17px;
}

/* ---------- Forms ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field > label,
.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.input,
.select,
.textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 13px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238d96ab' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

.textarea {
  resize: vertical;
  line-height: 1.55;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(30, 215, 96, 0.55);
  box-shadow: 0 0 0 3px rgba(30, 215, 96, 0.12);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted-2);
}

.search {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--muted-2);
  pointer-events: none;
}

.search .input {
  padding-left: 40px;
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch .track {
  width: 40px;
  height: 23px;
  border-radius: 99px;
  background: #2a3242;
  transition: background 0.2s;
  position: relative;
  flex: none;
}

.switch .track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}

.switch input:checked + .track {
  background: var(--green);
}

.switch input:checked + .track::after {
  transform: translateX(17px);
}

.switch .sw-label {
  font-size: 13px;
  color: var(--text);
}

.switch .sw-sub {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

/* ---------- Cards & common ---------- */

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.038), rgba(255, 255, 255, 0.012));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(30, 215, 96, 0.13);
}

.section {
  margin-top: 34px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.section-head .link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--green);
  white-space: nowrap;
}
.section-head .link:hover {
  text-decoration: underline;
}

.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.tiny {
  font-size: 11px;
}
.mt-8 {
  margin-top: 8px;
}
.mt-16 {
  margin-top: 16px;
}
.mt-24 {
  margin-top: 24px;
}
.flex {
  display: flex;
}
.gap-8 {
  gap: 8px;
}
.gap-12 {
  gap: 12px;
}
.wrap {
  flex-wrap: wrap;
}
.between {
  justify-content: space-between;
}
.center {
  align-items: center;
}
.hide {
  display: none !important;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  white-space: nowrap;
}

.badge.green {
  background: rgba(30, 215, 96, 0.12);
  color: #6df0a0;
}

.badge.violet {
  background: rgba(124, 92, 255, 0.14);
  color: #b7a5ff;
}

.badge.amber {
  background: rgba(255, 181, 71, 0.13);
  color: #ffc978;
}

.badge.danger {
  background: rgba(255, 93, 122, 0.13);
  color: #ff9aac;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 36px;
  align-items: center;
  padding: 30px 4px 24px;
}

.hero h1 {
  margin: 14px 0 16px;
  font-family: var(--display);
  font-size: clamp(38px, 4.5vw, 60px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--green) 5%, var(--cyan) 52%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 11.5px;
  color: var(--muted-2);
}

.hero-note svg {
  width: 14px;
  height: 14px;
  color: var(--green);
}

.hero-stack {
  position: relative;
  height: 330px;
  display: grid;
  place-items: center;
}

.stack-card {
  position: absolute;
  width: 186px;
  height: 244px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 32px 70px -28px #000;
  background: linear-gradient(180deg, #171c26, #0c0f15);
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.stack-card .sc-img {
  width: 100%;
  height: 168px;
  object-fit: cover;
  background: linear-gradient(135deg, #1a2230, #0e1118);
}

.stack-card .sc-fallback {
  width: 100%;
  height: 168px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 42px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  background: linear-gradient(135deg, rgba(30, 215, 96, 0.35), rgba(124, 92, 255, 0.4));
}

.stack-card .sc-body {
  padding: 12px 14px;
}

.stack-card .sc-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stack-card .sc-meta {
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted);
}

.stack-card.c1 {
  transform: rotate(-10deg) translate(-92px, 14px) scale(0.92);
  z-index: 1;
}
.stack-card.c2 {
  transform: rotate(0) translateY(-8px);
  z-index: 3;
}
.stack-card.c3 {
  transform: rotate(9deg) translate(92px, 14px) scale(0.92);
  z-index: 2;
}

.hero-stack:hover .c1 {
  transform: rotate(-13deg) translate(-108px, 8px) scale(0.95);
}
.hero-stack:hover .c3 {
  transform: rotate(12deg) translate(108px, 8px) scale(0.95);
}

.float-chip {
  position: absolute;
  right: 8px;
  bottom: 4px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 12px;
  background: rgba(18, 22, 31, 0.92);
  border: 1px solid rgba(30, 215, 96, 0.25);
  box-shadow: 0 18px 40px -18px #000;
  backdrop-filter: blur(12px);
  font-size: 11.5px;
  font-weight: 600;
  animation: floaty 5s ease-in-out infinite;
}

.float-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
  margin: 6px 0 8px;
}

.stat {
  position: relative;
  overflow: hidden;
  padding: 17px 18px;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
}

.stat::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -50px;
  top: -60px;
  border-radius: 50%;
  background: rgba(30, 215, 96, 0.07);
  filter: blur(4px);
}

.stat .ico {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(30, 215, 96, 0.12);
  color: var(--green);
  margin-bottom: 13px;
}

.stat .ico svg {
  width: 18px;
  height: 18px;
}

.stat.violet .ico {
  background: rgba(124, 92, 255, 0.14);
  color: #a992ff;
}
.stat.cyan .ico {
  background: rgba(56, 217, 255, 0.12);
  color: var(--cyan);
}
.stat.amber .ico {
  background: rgba(255, 181, 71, 0.12);
  color: var(--amber);
}

.stat .num {
  font-family: var(--display);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.stat .lbl {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.stat .hint {
  margin-top: 7px;
  font-size: 10.5px;
  color: var(--muted-2);
}

/* ---------- Home panels ---------- */

.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-title h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.genre-row {
  display: grid;
  grid-template-columns: 116px 1fr 38px;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}

.genre-name {
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: capitalize;
}

.genre-bar {
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.055);
  overflow: hidden;
}

.genre-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  opacity: 0.9;
}

.genre-count {
  font-size: 11px;
  color: var(--muted-2);
  text-align: right;
}

.decades {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  height: 150px;
  padding-top: 8px;
}

.decade {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  height: 100%;
}

.decade i {
  width: 100%;
  max-width: 36px;
  min-height: 4px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, var(--violet), rgba(124, 92, 255, 0.22));
}

.decade span {
  font-size: 10.5px;
  color: var(--muted);
}

.artists-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-width: thin;
}

.artist-bubble {
  flex: none;
  width: 104px;
  text-align: center;
}

.artist-bubble .ab-img {
  width: 92px;
  height: 92px;
  margin: 0 auto 8px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #1a2230, #0e1118);
  border: 1px solid var(--border-soft);
}

.artist-bubble .ab-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artist-bubble .ab-name {
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artist-bubble .ab-meta {
  font-size: 10px;
  color: var(--muted-2);
}

/* ---------- Playlists ---------- */

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

.playlist-grid.single {
  grid-template-columns: 1fr;
}

.playlist-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px;
  border-radius: 15px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.022);
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
  min-width: 0;
}

.playlist-card:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.12);
}

.playlist-cover {
  width: 54px;
  height: 54px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  color: #05140b;
  overflow: hidden;
  position: relative;
}

.playlist-cover svg {
  width: 22px;
  height: 22px;
  opacity: 0.85;
}

.playlist-info {
  flex: 1;
  min-width: 0;
}

.playlist-name {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-meta {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}

.icon-link {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: var(--muted);
  transition: background 0.16s, color 0.16s;
}

.icon-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.icon-link.danger:hover {
  background: rgba(255, 93, 122, 0.12);
  color: #ff9aac;
}

.icon-link svg {
  width: 16px;
  height: 16px;
}

.sync-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--muted-2);
  white-space: nowrap;
}

.sync-state .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}
.sync-state.off .dot {
  background: var(--muted-2);
}
.sync-state.err .dot {
  background: var(--danger);
}

/* ---------- Artists view ---------- */

.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 12px 0 18px;
  flex-wrap: wrap;
}

.view-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.view-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  max-width: 620px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.toolbar .select {
  width: auto;
  min-width: 150px;
}

.quick-select {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.artists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}

.artist-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 9px;
  border-radius: 15px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  transition: background 0.16s, border-color 0.16s, transform 0.16s;
  min-width: 0;
}

.artist-card:hover {
  background: rgba(255, 255, 255, 0.045);
}

.artist-card.selected {
  background: rgba(30, 215, 96, 0.075);
  border-color: rgba(30, 215, 96, 0.38);
}

.artist-photo {
  position: relative;
  aspect-ratio: 1;
  border-radius: 13px;
  overflow: hidden;
  background: linear-gradient(135deg, #1b2231, #0d1017);
}

.artist-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.artist-card:hover .artist-photo img {
  transform: scale(1.045);
}

.artist-photo .initials {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 30px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.65);
  background: linear-gradient(135deg, rgba(30, 215, 96, 0.22), rgba(124, 92, 255, 0.3));
}

.artist-check {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  color: transparent;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.18s, transform 0.18s, background 0.18s;
}

.artist-card:hover .artist-check {
  opacity: 0.85;
}

.artist-card.selected .artist-check {
  opacity: 1;
  transform: none;
  background: var(--green);
  border-color: var(--green);
  color: #04140a;
}

.artist-check svg {
  width: 13px;
  height: 13px;
}

.artist-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artist-meta {
  margin-top: -5px;
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.load-more {
  display: flex;
  justify-content: center;
  margin: 24px 0 0;
}

.selection-bar {
  position: fixed;
  left: calc(50% + 117px);
  bottom: 22px;
  z-index: 60;
  transform: translateX(-50%) translateY(150%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 10px 9px 18px;
  border-radius: 16px;
  border: 1px solid rgba(30, 215, 96, 0.28);
  background: rgba(17, 21, 30, 0.94);
  box-shadow: 0 26px 70px -22px #000;
  backdrop-filter: blur(18px);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
  max-width: calc(100vw - 24px);
}

.selection-bar.show {
  transform: translateX(-50%) translateY(0);
}

.selection-bar .sel-count {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.selection-bar .sel-sub {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.selection-bar .divider {
  width: 1px;
  height: 30px;
  background: var(--border-soft);
}

/* ---------- Templates ---------- */

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

.template {
  position: relative;
  text-align: left;
  padding: 17px;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.template:hover {
  transform: translateY(-2px);
  border-color: rgba(30, 215, 96, 0.3);
  background: linear-gradient(150deg, rgba(30, 215, 96, 0.08), rgba(255, 255, 255, 0.015));
}

.template .t-ico {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(30, 215, 96, 0.12);
  color: var(--green);
  margin-bottom: 14px;
}

.template .t-ico svg {
  width: 19px;
  height: 19px;
}

.template h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.template p {
  margin: 4px 0 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted);
}

.template .t-arrow {
  position: absolute;
  right: 15px;
  bottom: 15px;
  color: var(--muted-2);
  transition: transform 0.2s, color 0.2s;
}

.template:hover .t-arrow {
  transform: translate(2px, -2px);
  color: var(--green);
}

.template .t-arrow svg {
  width: 16px;
  height: 16px;
}

/* ---------- AI ---------- */

.ai-shell {
  position: relative;
  padding: 1px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(30, 215, 96, 0.65), rgba(56, 217, 255, 0.22) 45%, rgba(124, 92, 255, 0.7));
  margin-top: 10px;
}

.ai-inner {
  border-radius: 23px;
  background: #0b0e14;
  padding: 25px;
}

.ai-inner h2 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.ai-inner > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.ai-textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.ai-textarea:focus {
  border-color: rgba(30, 215, 96, 0.5);
  box-shadow: 0 0 0 3px rgba(30, 215, 96, 0.1);
}

.ai-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.chip.selected {
  background: rgba(30, 215, 96, 0.13);
  border-color: rgba(30, 215, 96, 0.45);
  color: #7df0a9;
}

.ai-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.ai-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--muted-2);
}

.ai-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.ai-result {
  margin-top: 18px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(30, 215, 96, 0.22);
  background: linear-gradient(180deg, rgba(30, 215, 96, 0.055), rgba(255, 255, 255, 0.012));
  animation: fadeUp 0.3s ease both;
}

.ai-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ai-result h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.ai-result .explain {
  margin: 5px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  max-width: 640px;
}

.ai-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.ai-preview {
  margin-top: 16px;
  border-top: 1px solid var(--border-soft);
  padding-top: 14px;
}

/* ---------- Preview / track list ---------- */

.preview-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 10px;
  max-height: 236px;
  overflow: auto;
  padding-right: 4px;
}

.preview-track {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 5px;
  border-radius: 8px;
  min-width: 0;
}

.preview-track:hover {
  background: rgba(255, 255, 255, 0.035);
}

.pt-num {
  width: 16px;
  flex: none;
  text-align: right;
  font-size: 10.5px;
  color: var(--muted-2);
}

.pt-img {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
  flex: none;
  background: linear-gradient(135deg, #1a2230, #0e1118);
}

.pt-img.fallback {
  display: grid;
  place-items: center;
  color: var(--muted-2);
}

.pt-img.fallback svg {
  width: 14px;
  height: 14px;
}

.pt-main {
  flex: 1;
  min-width: 0;
}

.pt-name {
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pt-artist {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pt-dur {
  font-size: 10.5px;
  color: var(--muted-2);
  flex: none;
}

.preview-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--muted);
}

.preview-summary strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Settings ---------- */

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.setting-card {
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
}

.setting-card h3 {
  margin: 0 0 2px;
  font-family: var(--display);
  font-size: 15.5px;
  font-weight: 600;
}

.setting-card .sub {
  margin: 0 0 14px;
  font-size: 11.5px;
  color: var(--muted);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-soft);
}

.setting-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.setting-row .sr-label {
  font-size: 12.5px;
  font-weight: 500;
}

.setting-row .sr-sub {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 1px;
}

.progress {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin-top: 10px;
}

.progress i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  transition: width 0.45s ease;
}

/* ---------- Empty / loading ---------- */

.empty {
  padding: 46px 24px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  text-align: center;
  color: var(--muted);
}

.empty .e-ico {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-2);
}

.empty h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-family: var(--display);
  font-size: 16px;
}

.empty p {
  margin: 0 auto;
  max-width: 380px;
  font-size: 12.5px;
}

.spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex: none;
}

.spinner.lg {
  width: 26px;
  height: 26px;
  border-width: 3px;
}

.loading-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(3, 4, 7, 0.72);
  backdrop-filter: blur(7px);
  animation: fade 0.18s ease;
}

.modal {
  width: 100%;
  max-width: 590px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: #0d1017;
  box-shadow: 0 44px 110px -34px #000;
  overflow: hidden;
  animation: pop 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal.wide {
  max-width: 720px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px 12px;
}

.modal-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.modal-head p {
  margin: 3px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}

.modal-close {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: background 0.16s, color 0.16s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.modal-body {
  padding: 4px 22px 20px;
  overflow: auto;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 22px;
  border-top: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.012);
}

.modal-foot .left {
  margin-right: auto;
  font-size: 11px;
  color: var(--muted-2);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.chips-select {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-height: 150px;
  overflow: auto;
  padding: 2px;
}

.chips-select .chip {
  text-transform: capitalize;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.range-row input[type="range"] {
  flex: 1;
  accent-color: var(--green);
}

.range-value {
  min-width: 44px;
  text-align: right;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
}

/* ---------- Toast ---------- */

.toast-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: min(390px, calc(100vw - 40px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 14px;
  border-radius: 13px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  background: rgba(18, 22, 31, 0.97);
  box-shadow: 0 20px 50px -20px #000;
  font-size: 12.5px;
  line-height: 1.45;
  animation: slideIn 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: auto;
}

.toast.success {
  border-left-color: var(--green);
}
.toast.error {
  border-left-color: var(--danger);
}
.toast.info {
  border-left-color: var(--cyan);
}

.toast .t-icon {
  flex: none;
  margin-top: 1px;
}
.toast .t-icon svg {
  width: 16px;
  height: 16px;
}
.toast.success .t-icon {
  color: var(--green);
}
.toast.error .t-icon {
  color: var(--danger);
}
.toast.info .t-icon {
  color: var(--cyan);
}

.toast .t-close {
  flex: none;
  color: var(--muted-2);
  padding: 0 2px;
}

/* ---------- Login ---------- */

.login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 26px clamp(20px, 5vw, 64px) 40px;
  position: relative;
  z-index: 2;
}

.login-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.login-hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: 40px;
  align-items: center;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 0;
}

.login-hero h1 {
  margin: 16px 0 18px;
  font-family: var(--display);
  font-size: clamp(40px, 5.6vw, 72px);
  font-weight: 600;
  line-height: 0.99;
  letter-spacing: -0.045em;
}

.login-hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--green), var(--cyan) 55%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-hero p {
  max-width: 500px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.login-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.spotify-btn {
  height: 50px;
  padding: 0 22px;
  border-radius: 14px;
  background: var(--green);
  color: #04140a;
  font-size: 14.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 18px 44px -18px rgba(30, 215, 96, 0.85);
  transition: transform 0.16s, filter 0.16s;
}

.spotify-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.spotify-btn svg {
  width: 22px;
  height: 22px;
}

.login-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}

.login-feature {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.025);
}

.login-feature .lf-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(30, 215, 96, 0.12);
  color: var(--green);
  margin-bottom: 12px;
}

.login-feature h3 {
  margin: 0 0 3px;
  font-size: 13.5px;
  font-weight: 600;
}

.login-feature p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}

.login-foot {
  max-width: 1180px;
  width: 100%;
  margin: 26px auto 0;
  font-size: 10.5px;
  color: var(--muted-2);
  text-align: center;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 93, 122, 0.3);
  background: rgba(255, 93, 122, 0.08);
  color: #ffb3c0;
  font-size: 12.5px;
  margin-bottom: 16px;
}

.alert.warn {
  border-color: rgba(255, 181, 71, 0.3);
  background: rgba(255, 181, 71, 0.08);
  color: #ffd596;
}

.alert.info {
  border-color: rgba(56, 217, 255, 0.25);
  background: rgba(56, 217, 255, 0.07);
  color: #a8ecff;
}

.alert svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
}

/* ---------- Animations ---------- */

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

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.975) translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

/* ---------- Responsive ---------- */

@media (max-width: 1150px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 18px;
  }
  .hero-stack {
    display: none;
  }
  .home-grid {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }
  .main {
    margin-left: 0;
  }
  .topbar {
    padding: 11px 16px;
  }
  .content {
    padding: 4px 16px 120px;
  }
  .mobile-nav {
    display: flex;
    justify-content: space-around;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    background: rgba(9, 11, 16, 0.94);
    border-top: 1px solid var(--border-soft);
    backdrop-filter: blur(18px);
  }
  .mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 9.5px;
    color: var(--muted);
    min-width: 54px;
  }
  .mobile-nav a.active {
    color: var(--green);
    background: rgba(30, 215, 96, 0.08);
  }
  .mobile-nav svg {
    width: 19px;
    height: 19px;
  }
  .playlist-grid {
    grid-template-columns: 1fr;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .login-hero {
    grid-template-columns: 1fr;
    padding: 26px 0;
  }
  .login-art {
    display: none;
  }
  .login-features {
    grid-template-columns: 1fr;
  }
  .selection-bar {
    bottom: 76px;
    left: 50%;
  }
  .toast-root {
    bottom: 82px;
  }
}

@media (max-width: 620px) {
  .hero h1 {
    font-size: 38px;
  }
  .hero p {
    font-size: 14px;
  }
  .stats {
    gap: 9px;
  }
  .stat {
    padding: 14px;
  }
  .stat .num {
    font-size: 23px;
  }
  .artists-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 7px;
  }
  .artist-card {
    padding: 6px;
  }
  .toolbar .search {
    flex: 1 1 100%;
  }
  .toolbar .select {
    min-width: 0;
    flex: 1 1 42%;
  }
  .quick-select {
    margin-left: 0;
    width: 100%;
  }
  .view-head h2 {
    font-size: 24px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    max-height: 94vh;
    border-radius: 20px 20px 0 0;
    max-width: 100%;
  }
  .selection-bar {
    gap: 9px;
    padding: 8px 8px 8px 14px;
    width: calc(100vw - 20px);
    justify-content: space-between;
  }
  .selection-bar .sel-sub {
    display: none;
  }
  .selection-bar .divider {
    display: none;
  }
  .section-head {
    align-items: center;
  }
  .genre-row {
    grid-template-columns: 92px 1fr 32px;
  }
  .ai-inner {
    padding: 18px;
  }
  .ai-inner h2 {
    font-size: 21px;
  }
  .topbar .sync-pill > span:not(.dot):not(.ico-only),
  .topbar .sync-pill .dot {
    display: none;
  }
  .topbar .sync-pill .ico-only {
    display: inline-flex;
  }
  .topbar .sync-pill {
    width: 36px;
    padding: 0;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
