/* ============================================================
   BODEGA STUDIO
   Dark hardware-inspired album workshop
   ============================================================ */

:root {
  --ink: #050404;
  --ink-soft: #0a0808;
  --panel: #0d0a0a;
  --panel-2: #131010;
  --panel-3: #191414;
  --white: #fafaf9;
  --muted: #8e8e8e;
  --muted-2: #6f6868;
  --red: #f9140d;
  --red-bright: #ff3b24;
  --red-soft: #ff6a4d;
  --pink: #ceb8b7;
  --brown: #594845;
  --line: rgba(250, 250, 249, 0.1);
  --line-strong: rgba(250, 250, 249, 0.17);
  --glass: rgba(10, 8, 8, 0.78);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --pixel: "Silkscreen", "Courier New", monospace;
  --sans: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1000px 700px at 88% -10%, rgba(249, 20, 13, 0.09), transparent 62%),
    radial-gradient(900px 700px at -8% 108%, rgba(89, 72, 69, 0.12), transparent 60%),
    var(--ink);
  color: var(--white);
  font-family: var(--sans);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

button {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: var(--red);
  color: #fff;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.accent,
.accent-text {
  color: var(--red);
}

.pixel {
  font-family: var(--pixel);
  font-weight: 700;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.micro {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(249, 20, 13, 0.12);
  animation: pulse 2.4s ease-in-out infinite;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.7'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ---------- Generic UI ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: wait;
  transform: none;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.btn-red {
  background: var(--red);
  color: #fff;
  box-shadow: 0 7px 26px rgba(249, 20, 13, 0.24);
}

.btn-red:hover {
  background: var(--red-bright);
}

.btn-light {
  background: var(--white);
  color: var(--ink);
}

.btn-light:hover {
  background: #fff;
}

.btn-dark {
  background: rgba(250, 250, 249, 0.05);
  border-color: var(--line-strong);
  color: var(--white);
}

.btn-dark:hover {
  background: rgba(250, 250, 249, 0.09);
  border-color: rgba(250, 250, 249, 0.27);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.btn-ghost:hover {
  color: var(--white);
  background: rgba(250, 250, 249, 0.06);
}

.btn-danger {
  background: rgba(249, 20, 13, 0.1);
  border-color: rgba(249, 20, 13, 0.34);
  color: #ff8d82;
}

.btn-danger:hover {
  background: var(--red);
  color: #fff;
}

.btn-sm {
  min-height: 34px;
  padding: 0 13px;
  font-size: 12px;
}

.btn-arrow {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
}

.btn-arrow svg {
  width: 14px;
  height: 14px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.icon-btn:hover {
  color: var(--white);
  background: rgba(250, 250, 249, 0.07);
  border-color: var(--line-strong);
}

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

.ghost-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.ghost-icon:hover {
  color: var(--white);
  background: rgba(250, 250, 249, 0.07);
}

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

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

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

.login {
  min-height: 100vh;
  padding: 24px;
  display: flex;
  align-items: stretch;
}

.login-shell {
  position: relative;
  width: min(1500px, 100%);
  min-height: calc(100vh - 48px);
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(370px, 0.62fr);
  border: 1px solid var(--line);
  border-radius: 30px;
  overflow: hidden;
  background: #070505;
  box-shadow: var(--shadow);
}

.login-art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 38px 46px;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 90% 110%, rgba(249, 20, 13, 0.26), transparent 58%),
    linear-gradient(150deg, #0b0808 0%, #080606 55%, #0d0707 100%);
}

.login-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(250, 250, 249, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(250, 250, 249, 0.032) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 30% 40%, #000 0%, transparent 75%);
  pointer-events: none;
}

.art-top,
.art-note {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
}

.art-copy {
  position: relative;
  z-index: 2;
  margin: auto 0;
  padding: 34px 0 90px;
  max-width: 760px;
}

.art-copy .micro {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(249, 20, 13, 0.28);
  border-radius: 999px;
  background: rgba(249, 20, 13, 0.06);
}

.login-art h1 {
  margin: 26px 0 24px;
  font-size: clamp(54px, 7.4vw, 126px);
  line-height: 0.86;
}

.login-art .lede {
  max-width: 500px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.65;
}

.vinyl {
  position: absolute;
  right: -11%;
  bottom: -25%;
  z-index: 1;
  width: min(42vw, 540px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at center, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 5px),
    radial-gradient(circle at 42% 38%, #221b1b 0%, #0c0909 48%, #050404 72%);
  border: 1px solid rgba(250, 250, 249, 0.08);
  box-shadow:
    0 50px 120px rgba(0, 0, 0, 0.65),
    inset 0 0 100px rgba(0, 0, 0, 0.8);
  animation: spin 34s linear infinite;
}

.vinyl::after {
  content: "";
  position: absolute;
  inset: 38%;
  border-radius: 50%;
  background: radial-gradient(circle, #1b1515 0 44%, var(--red) 45% 100%);
  box-shadow: 0 0 60px rgba(249, 20, 13, 0.25);
}

.vinyl-label {
  position: absolute;
  z-index: 2;
  inset: 38%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 50%;
  color: #fff;
  text-align: center;
  transform: rotate(-8deg);
}

.vinyl-label span {
  font-family: var(--pixel);
  font-size: clamp(11px, 1.4vw, 18px);
  letter-spacing: -0.04em;
}

.vinyl-label small {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.22em;
}

.art-glow {
  position: absolute;
  z-index: 0;
  width: 380px;
  height: 380px;
  right: 4%;
  bottom: -45%;
  border-radius: 50%;
  background: var(--red);
  filter: blur(170px);
  opacity: 0.28;
}

.login-panel {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 34px;
  border-left: 1px solid var(--line);
  background:
    radial-gradient(600px 400px at 80% 0%, rgba(89, 72, 69, 0.13), transparent 60%),
    linear-gradient(180deg, #0e0b0b 0%, #080606 100%);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  box-shadow: 0 0 0 5px rgba(249, 20, 13, 0.1);
}

.brand-mark svg {
  width: 17px;
  height: 17px;
  transform: translateX(1px);
}

.brand-word {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-family: var(--pixel);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.brand-word span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.2em;
}

.login-card {
  margin: auto 0;
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(400px 240px at 100% 0%, rgba(249, 20, 13, 0.08), transparent 65%),
    linear-gradient(160deg, #151010 0%, #0c0909 80%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

.card-index {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 26px;
}

.login-card h2 {
  margin: 0 0 12px;
  font-family: var(--pixel);
  font-size: clamp(27px, 2.7vw, 39px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  text-transform: uppercase;
}

.login-card > p {
  margin: 0 0 26px;
  font-size: 13px;
  line-height: 1.6;
}

.field-label {
  display: block;
  margin-bottom: 9px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.password-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 5px 4px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(5, 4, 4, 0.6);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.password-wrap:focus-within {
  border-color: rgba(249, 20, 13, 0.7);
  box-shadow: 0 0 0 4px rgba(249, 20, 13, 0.1);
}

.password-wrap input {
  width: 100%;
  height: 42px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--white);
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.16em;
  outline: none;
}

.password-wrap input::placeholder {
  color: #4c4444;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.login-submit {
  width: 100%;
  justify-content: space-between;
  margin-top: 14px;
  padding-left: 20px;
  min-height: 50px;
}

.form-error {
  min-height: 18px;
  margin: 12px 0 0;
  color: #ff9186;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
}

.login-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

/* ---------- App chrome ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 4, 4, 0.78);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.brand-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
}

.brand:hover .brand-mark {
  box-shadow: 0 0 0 7px rgba(249, 20, 13, 0.15);
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.role-chip.admin {
  border-color: rgba(249, 20, 13, 0.35);
  background: rgba(249, 20, 13, 0.08);
  color: #ff8075;
}

.shell {
  width: min(1600px, 100%);
  margin: 0 auto;
  padding: 24px 28px 140px;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100vh - 116px);
  min-height: 0;
}

.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 4px;
  color: var(--muted);
}

.count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 18px;
  margin-left: 3px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0;
}

.mini-add {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(250, 250, 249, 0.04);
  color: var(--white);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.mini-add:hover {
  background: var(--red);
  border-color: var(--red);
}

.mini-add svg {
  width: 12px;
  height: 12px;
}

.admin-only {
  display: none !important;
}

.admin-mode .admin-only {
  display: inline-flex !important;
}

.workshop-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: auto;
  padding-right: 3px;
  scrollbar-width: thin;
}

.workshop-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--white);
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.workshop-item:hover {
  background: rgba(250, 250, 249, 0.04);
}

.workshop-item.active {
  background: linear-gradient(100deg, rgba(249, 20, 13, 0.11), rgba(250, 250, 249, 0.025));
  border-color: rgba(249, 20, 13, 0.28);
}

.workshop-thumb,
.workshop-thumb-fallback {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #221717, #0d0a0a);
}

.workshop-thumb-fallback {
  display: grid;
  place-items: center;
  color: var(--brown);
}

.workshop-thumb-fallback svg {
  width: 17px;
  height: 17px;
}

.workshop-item-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.workshop-item-copy strong {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workshop-item-copy span {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workshop-item.active .workshop-item-copy span {
  color: var(--pink);
}

.side-foot {
  margin-top: auto;
  padding-top: 14px;
}

.side-note {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(250, 250, 249, 0.025);
}

.side-note p {
  margin: 7px 0 0;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.55;
}

.storage-meter {
  margin-top: 12px;
}

.storage-bar {
  height: 3px;
  margin: 8px 0 6px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(250, 250, 249, 0.09);
}

.storage-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--red-soft));
}

.main {
  min-width: 0;
}

/* ---------- Dashboard ---------- */

.dash-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 22px;
  padding: clamp(26px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(700px 380px at 84% 20%, rgba(249, 20, 13, 0.17), transparent 62%),
    linear-gradient(140deg, #121010 0%, #0a0808 58%, #0d0807 100%);
}

.dash-hero::after {
  content: "BODEGA";
  position: absolute;
  right: -24px;
  bottom: -42px;
  color: rgba(250, 250, 249, 0.026);
  font-family: var(--pixel);
  font-size: clamp(110px, 19vw, 290px);
  font-weight: 700;
  letter-spacing: -0.1em;
  line-height: 0.7;
  pointer-events: none;
  white-space: nowrap;
}

.dash-hero-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
}

.dash-hero h1 {
  position: relative;
  z-index: 2;
  margin: 36px 0 18px;
  max-width: 900px;
  font-family: var(--pixel);
  font-size: clamp(44px, 6.4vw, 94px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.9;
  text-transform: uppercase;
}

.dash-hero h1 .red-block {
  display: inline-block;
  padding: 0.06em 0.12em 0.08em;
  border-radius: 0.16em;
  background: var(--red);
  color: #fff;
  transform: rotate(-1deg);
}

.dash-hero-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-top: 38px;
}

.dash-hero-foot p {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 30px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 114px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(250, 250, 249, 0.022);
}

.stat-card.accent-card {
  background:
    radial-gradient(220px 140px at 100% 100%, rgba(0, 0, 0, 0.25), transparent 60%),
    linear-gradient(135deg, var(--red) 0%, #d80f08 100%);
  border-color: transparent;
}

.stat-card strong {
  display: block;
  margin-top: 27px;
  font-family: var(--pixel);
  font-size: clamp(23px, 2.4vw, 33px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.stat-card.accent-card strong,
.stat-card.accent-card .micro {
  color: #fff;
}

.stat-card .micro {
  color: var(--muted);
}

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

.section-heading h2 {
  margin: 4px 0 0;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.section-heading .micro {
  color: var(--muted);
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.album-card {
  position: relative;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: linear-gradient(155deg, rgba(250, 250, 249, 0.04), rgba(250, 250, 249, 0.012));
  color: var(--white);
  text-align: left;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.album-card:hover {
  transform: translateY(-4px);
  border-color: rgba(250, 250, 249, 0.22);
  background: linear-gradient(155deg, rgba(250, 250, 249, 0.065), rgba(250, 250, 249, 0.015));
}

.album-card-cover {
  display: block;
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(145deg, #241818, #0c0909);
}

.album-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.album-card:hover .album-card-cover img {
  transform: scale(1.035);
}

.album-cover-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(160px 120px at 70% 20%, rgba(249, 20, 13, 0.24), transparent 70%),
    repeating-linear-gradient(135deg, transparent 0 12px, rgba(250, 250, 249, 0.025) 12px 13px),
    linear-gradient(145deg, #1a1212, #090707);
  color: rgba(250, 250, 249, 0.35);
}

.album-cover-placeholder svg {
  width: 28%;
  height: 28%;
}

.album-card-overlay {
  position: absolute;
  inset: auto 10px 10px auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.album-card-overlay svg {
  width: 16px;
  height: 16px;
  transform: translateX(1px);
}

.album-card:hover .album-card-overlay {
  opacity: 1;
  transform: translateY(0);
}

.album-card-body {
  display: block;
  padding: 13px 5px 5px;
}

.album-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.album-card-top .micro {
  color: var(--muted-2);
}

.album-card-body h3 {
  margin: 0 0 5px;
  overflow: hidden;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-card-body p {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.album-card.new-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 280px;
  border-style: dashed;
  background: transparent;
  color: var(--muted);
}

.album-card.new-card:hover {
  color: var(--white);
  border-color: rgba(249, 20, 13, 0.42);
  background: rgba(249, 20, 13, 0.045);
}

.new-card-plus {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(250, 250, 249, 0.03);
}

.new-card-plus svg {
  width: 20px;
  height: 20px;
}

.album-card.new-card span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 40px;
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  text-align: center;
  background: rgba(250, 250, 249, 0.015);
}

.empty-state .empty-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
}

.empty-state .empty-icon svg {
  width: 22px;
  height: 22px;
}

.empty-state h3 {
  margin: 0 0 7px;
  font-size: 18px;
  font-weight: 500;
}

.empty-state p {
  max-width: 340px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* ---------- Album view ---------- */

.album-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 310px) minmax(0, 1fr);
  gap: clamp(24px, 3.5vw, 44px);
  overflow: hidden;
  margin-bottom: 22px;
  padding: clamp(18px, 2.4vw, 30px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #0b0909;
}

.hero-ambient {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(95px) saturate(1.35);
  opacity: 0.23;
  transform: scale(1.35);
  pointer-events: none;
}

.album-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(8, 6, 6, 0.2) 0%, rgba(8, 6, 6, 0.55) 55%, rgba(8, 6, 6, 0.2) 100%);
  pointer-events: none;
}

.hero-cover {
  position: relative;
  z-index: 2;
  align-self: start;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(250, 250, 249, 0.13);
  border-radius: 20px;
  background: linear-gradient(145deg, #211717, #0b0808);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.48);
}

.hero-cover > img,
.hero-cover > .album-cover-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-action {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(250, 250, 249, 0.2);
  border-radius: 999px;
  background: rgba(5, 4, 4, 0.7);
  backdrop-filter: blur(12px);
  color: #fff;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.hero-cover:hover .cover-action,
.cover-action:focus-visible {
  opacity: 1;
  transform: translateY(0);
}

.cover-action:hover {
  background: var(--red);
  border-color: var(--red);
}

.cover-action svg {
  width: 12px;
  height: 12px;
}

.hero-meta {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 8px 0;
}

.hero-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
}

.hero-kicker .shared {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid rgba(250, 250, 249, 0.13);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-kicker .shared.on {
  border-color: rgba(249, 20, 13, 0.3);
  background: rgba(249, 20, 13, 0.08);
  color: #ff8a80;
}

.hero-kicker .shared svg {
  width: 10px;
  height: 10px;
}

.hero-title {
  margin: 18px 0 11px;
  font-family: var(--pixel);
  font-size: clamp(32px, 4.6vw, 62px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.95;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.hero-description {
  max-width: 590px;
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.6;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 22px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chip svg {
  width: 11px;
  height: 11px;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-actions .spacer {
  flex: 1;
}

.icon-action {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(250, 250, 249, 0.04);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.icon-action:hover {
  color: var(--white);
  background: rgba(250, 250, 249, 0.09);
  border-color: rgba(250, 250, 249, 0.28);
}

.icon-action.danger:hover {
  color: #ff938a;
  border-color: rgba(249, 20, 13, 0.4);
  background: rgba(249, 20, 13, 0.1);
}

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

.tracklist-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(10, 8, 8, 0.62);
}

.tracklist-head {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-2);
}

.tracklist.admin .tracklist-head {
  grid-template-columns: 22px 30px 52px minmax(0, 1fr) 64px 128px;
}

.tracklist.viewer .tracklist-head {
  grid-template-columns: 30px 52px minmax(0, 1fr) 64px 44px;
}

.tracklist-head span:last-child {
  text-align: right;
}

.drag-head {
  display: flex;
  align-items: center;
  color: var(--muted-2);
}

.drag-head svg {
  width: 13px;
  height: 13px;
}

.tracklist-body {
  min-height: 80px;
}

.track-row {
  position: relative;
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 9px 18px;
  border-bottom: 1px solid rgba(250, 250, 249, 0.055);
  transition: background 0.15s ease, opacity 0.15s ease;
}

.tracklist.admin .track-row {
  grid-template-columns: 22px 30px 52px minmax(0, 1fr) 64px 128px;
}

.tracklist.viewer .track-row {
  grid-template-columns: 30px 52px minmax(0, 1fr) 64px 44px;
}

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

.track-row:hover {
  background: rgba(250, 250, 249, 0.032);
}

.track-row.is-playing {
  background: linear-gradient(90deg, rgba(249, 20, 13, 0.085), rgba(249, 20, 13, 0.015));
}

.track-row.is-playing::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--red);
  box-shadow: 0 0 16px rgba(249, 20, 13, 0.55);
}

.track-row.dragging {
  opacity: 0.35;
  background: rgba(249, 20, 13, 0.09);
}

.track-row.drag-target {
  box-shadow: inset 0 2px 0 var(--red);
}

.track-row.is-slot {
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0 14px,
    rgba(250, 250, 249, 0.014) 14px 15px
  );
}

.track-row.is-slot:hover {
  background-color: rgba(250, 250, 249, 0.022);
}

.drag-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-2);
}

.drag-handle {
  display: grid;
  place-items: center;
  width: 22px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: grab;
}

.drag-handle:active {
  cursor: grabbing;
}

.drag-handle:hover {
  color: var(--pink);
}

.drag-handle svg {
  width: 13px;
  height: 13px;
}

.index-cell {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.track-row.is-playing .index-cell {
  color: var(--red);
}

.track-thumb {
  display: block;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(145deg, #211717, #0c0909);
}

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

.track-thumb.slot {
  display: grid;
  place-items: center;
  border-style: dashed;
  border-color: rgba(250, 250, 249, 0.15);
  background: rgba(250, 250, 249, 0.018);
  color: var(--muted-2);
}

.track-thumb.slot svg {
  width: 16px;
  height: 16px;
}

.track-info {
  min-width: 0;
}

.track-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.track-title {
  overflow: hidden;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-row.is-slot .track-title {
  color: var(--muted);
  font-style: italic;
  font-weight: 400;
}

.track-sub {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.track-sub .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted-2);
}

.track-sub .slot-label {
  color: #b47870;
}

.eq {
  display: none;
  align-items: flex-end;
  gap: 2px;
  width: 16px;
  height: 13px;
  flex: none;
}

.track-row.is-playing .eq {
  display: flex;
}

.eq span {
  width: 2px;
  height: 100%;
  border-radius: 1px;
  background: var(--red);
  transform-origin: bottom;
  animation: eq 0.8s ease-in-out infinite alternate;
}

.eq span:nth-child(1) { height: 45%; animation-delay: -0.25s; }
.eq span:nth-child(2) { height: 90%; animation-delay: -0.55s; }
.eq span:nth-child(3) { height: 65%; animation-delay: -0.1s; }
.eq span:nth-child(4) { height: 100%; animation-delay: -0.4s; }

.track-row.is-paused .eq span {
  animation-play-state: paused;
}

.duration-cell {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-align: right;
}

.track-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1px;
}

.row-action {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.row-action:hover {
  color: var(--white);
  background: rgba(250, 250, 249, 0.07);
}

.row-action.danger:hover {
  color: #ff887d;
  background: rgba(249, 20, 13, 0.1);
}

.row-action svg {
  width: 14px;
  height: 14px;
}

.row-play {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(250, 250, 249, 0.04);
  color: var(--white);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.row-play:hover {
  background: var(--red);
  border-color: var(--red);
  transform: scale(1.05);
}

.row-play svg {
  width: 13px;
  height: 13px;
}

.track-row.is-playing .row-play {
  background: var(--red);
  border-color: var(--red);
}

.admin-actions {
  display: none;
  align-items: center;
  gap: 1px;
}

.admin-mode .admin-actions {
  display: flex;
}

.admin-mode .track-actions .row-action.admin-action {
  opacity: 0.42;
}

.admin-mode .track-row:hover .track-actions .row-action.admin-action,
.admin-mode .track-row:focus-within .track-actions .row-action.admin-action {
  opacity: 1;
}

.tracklist-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
  background: rgba(250, 250, 249, 0.018);
}

.tracklist-foot .micro {
  color: var(--muted-2);
}

.tracklist-foot .foot-actions {
  display: flex;
  gap: 6px;
}

.upload-panel {
  margin: 0 18px 14px;
  padding: 13px 15px;
  border: 1px solid rgba(249, 20, 13, 0.24);
  border-radius: 14px;
  background: rgba(249, 20, 13, 0.055);
}

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

.upload-panel-head strong {
  overflow: hidden;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.upload-bar {
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(250, 250, 249, 0.11);
}

.upload-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--red-soft));
  transition: width 0.2s ease;
}

/* ---------- Player ---------- */

.player {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  border-top: 1px solid rgba(250, 250, 249, 0.13);
  background: rgba(8, 6, 6, 0.9);
  box-shadow: 0 -18px 60px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
}

.player-progress-top {
  position: absolute;
  top: -1px;
  right: 0;
  left: 0;
  height: 1px;
  background: rgba(250, 250, 249, 0.08);
}

#playerProgressLine {
  display: block;
  width: 0;
  height: 100%;
  background: var(--red);
  box-shadow: 0 0 8px rgba(249, 20, 13, 0.6);
}

.player-inner {
  width: min(1600px, 100%);
  min-height: 82px;
  margin: 0 auto;
  padding: 10px 28px;
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(380px, 620px) minmax(140px, 1fr);
  gap: 26px;
  align-items: center;
}

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

.player-cover {
  position: relative;
  width: 52px;
  height: 52px;
  flex: none;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: linear-gradient(145deg, #2a1b1b, #0c0909);
  cursor: pointer;
}

.player-cover img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-cover.has-cover img {
  display: block;
}

.player-cover-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(250, 250, 249, 0.4);
  font-family: var(--pixel);
  font-size: 18px;
}

.player-cover.has-cover .player-cover-fallback {
  display: none;
}

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

.player-meta strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-meta > span:last-child {
  overflow: hidden;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.player-center {
  min-width: 0;
}

.transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 5px;
}

.transport-side {
  width: 32px;
  height: 32px;
  border-color: transparent;
}

.transport-side svg {
  width: 15px;
  height: 15px;
}

.play-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.play-btn:hover {
  transform: scale(1.06);
  background: #fff;
}

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

.seek-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.time {
  flex: none;
  width: 34px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.02em;
  text-align: center;
}

.range {
  -webkit-appearance: none;
  appearance: none;
  height: 14px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.range::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(
    to right,
    var(--red) 0%,
    var(--red) var(--p, 0%),
    rgba(250, 250, 249, 0.14) var(--p, 0%),
    rgba(250, 250, 249, 0.14) 100%
  );
}

.range::-moz-range-track {
  height: 3px;
  border-radius: 99px;
  background: rgba(250, 250, 249, 0.14);
}

.range::-moz-range-progress {
  height: 3px;
  border-radius: 99px;
  background: var(--red);
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -3.5px;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(249, 20, 13, 0.18);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.range:hover::-webkit-slider-thumb,
.range:focus-visible::-webkit-slider-thumb {
  opacity: 1;
}

.range::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: var(--white);
}

.seek-range {
  flex: 1;
  min-width: 0;
}

.player-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.volume-range {
  width: 80px;
}

/* ---------- Dialog / toast ---------- */

.dialog {
  max-width: 100vw;
  max-height: 100vh;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--white);
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(9px);
}

.modal-card {
  width: min(520px, calc(100vw - 30px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 25px;
  border: 1px solid var(--line-strong);
  border-radius: 25px;
  background:
    radial-gradient(500px 260px at 90% 0%, rgba(249, 20, 13, 0.09), transparent 60%),
    linear-gradient(160deg, #141010 0%, #0b0808 75%);
  box-shadow: var(--shadow);
  animation: modal-in 0.2s ease both;
}

.modal-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.modal-top h3 {
  margin: 6px 0 0;
  font-family: var(--pixel);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.05;
  text-transform: uppercase;
}

.modal-top .micro {
  color: var(--muted);
}

.modal-close {
  flex: none;
}

.modal-card p.modal-copy {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.field {
  margin-bottom: 16px;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.text-input,
.textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(5, 4, 4, 0.55);
  color: var(--white);
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.text-input {
  height: 44px;
  padding: 0 13px;
}

.textarea {
  min-height: 88px;
  padding: 11px 13px;
  line-height: 1.5;
  resize: vertical;
}

.text-input:focus,
.textarea:focus {
  border-color: rgba(249, 20, 13, 0.6);
  box-shadow: 0 0 0 4px rgba(249, 20, 13, 0.08);
}

.text-input::placeholder,
.textarea::placeholder {
  color: #5c5353;
}

.cover-drop {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 15px;
  background: rgba(250, 250, 249, 0.018);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.cover-drop:hover {
  border-color: rgba(249, 20, 13, 0.4);
  background: rgba(249, 20, 13, 0.035);
}

.cover-drop-preview {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  flex: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(145deg, #221717, #0b0808);
  color: var(--muted);
}

.cover-drop-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-drop-preview svg {
  width: 20px;
  height: 20px;
}

.cover-drop-copy {
  min-width: 0;
}

.cover-drop-copy strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  font-weight: 500;
}

.cover-drop-copy span {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-transform: uppercase;
}

.check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(250, 250, 249, 0.022);
}

.check-copy strong {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
}

.check-copy span {
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.45;
}

.switch {
  position: relative;
  width: 43px;
  height: 25px;
  flex: none;
}

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

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(250, 250, 249, 0.13);
  cursor: pointer;
  transition: background 0.2s ease;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--white);
  transition: transform 0.2s ease;
}

.switch input:checked + span {
  background: var(--red);
}

.switch input:checked + span::after {
  transform: translateX(18px);
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(250, 250, 249, 0.025);
  color: var(--white);
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.menu-item:hover {
  background: rgba(250, 250, 249, 0.06);
  border-color: var(--line-strong);
}

.menu-item > svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--muted);
}

.menu-item > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.menu-item strong {
  font-size: 12.5px;
  font-weight: 500;
}

.menu-item small {
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.4;
}

.menu-item.danger {
  border-color: rgba(249, 20, 13, 0.18);
  color: #ff938a;
}

.menu-item.danger > svg {
  color: #ff6d60;
}

.menu-item.danger:hover {
  background: rgba(249, 20, 13, 0.09);
  border-color: rgba(249, 20, 13, 0.35);
}

.menu-item:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.menu-item:disabled:hover {
  background: rgba(250, 250, 249, 0.025);
  border-color: var(--line);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

.modal-actions .btn-danger {
  margin-right: auto;
}

.toast-stack {
  position: fixed;
  z-index: 90;
  right: 22px;
  bottom: 104px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: rgba(17, 13, 13, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  color: var(--white);
  font-size: 12px;
  line-height: 1.5;
  animation: toast-in 0.24s ease both;
  backdrop-filter: blur(18px);
}

.toast::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--red);
}

.toast.success::before {
  background: #64d18b;
}

.toast.error::before {
  background: #ff4d40;
}

.toast.leaving {
  animation: toast-out 0.2s ease both;
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 4px rgba(249, 20, 13, 0.12); }
  50% { opacity: 0.55; box-shadow: 0 0 0 7px rgba(249, 20, 13, 0.04); }
}

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

@keyframes eq {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(5px); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fade-up 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

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

@media (max-width: 1240px) {
  .shell {
    grid-template-columns: 244px minmax(0, 1fr);
    gap: 22px;
  }

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

  .player-inner {
    grid-template-columns: minmax(180px, 1fr) minmax(340px, 560px) minmax(120px, 0.7fr);
    gap: 18px;
  }
}

@media (max-width: 1020px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-art {
    min-height: 420px;
    padding: 30px;
  }

  .art-copy {
    padding: 36px 0 80px;
  }

  .login-art h1 {
    font-size: clamp(48px, 10vw, 86px);
  }

  .vinyl {
    width: min(48vw, 380px);
    right: -8%;
    bottom: -35%;
  }

  .login-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding: 26px;
  }

  .login-card {
    margin: 0;
    max-width: 560px;
    width: 100%;
  }

  .login-foot {
    display: none;
  }

  .shell {
    grid-template-columns: 1fr;
    padding: 18px 22px 140px;
  }

  .sidebar {
    position: static;
    max-height: none;
    min-width: 0;
  }

  .workshop-list {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .workshop-list::-webkit-scrollbar {
    display: none;
  }

  .workshop-item {
    width: auto;
    min-width: 178px;
    max-width: 230px;
    flex: none;
  }

  .side-foot {
    display: none;
  }

  .album-hero {
    grid-template-columns: minmax(180px, 250px) minmax(0, 1fr);
  }

  .stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .login-shell {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .login-art {
    min-height: 350px;
    padding: 24px;
  }

  .art-copy {
    padding: 34px 0 64px;
  }

  .login-art .lede {
    max-width: 330px;
    font-size: 13px;
  }

  .art-note {
    display: none;
  }

  .vinyl {
    width: 290px;
    right: -100px;
    bottom: -145px;
  }

  .login-panel {
    padding: 24px 20px 30px;
  }

  .login-card {
    padding: 22px;
  }

  .topbar {
    padding: 12px 16px;
  }

  .topbar-status {
    display: none;
  }

  .shell {
    padding: 14px 14px 170px;
    gap: 18px;
  }

  .brand-word {
    font-size: 13px;
  }

  .brand-word span {
    display: none;
  }

  .role-chip {
    padding: 0 9px;
    font-size: 8px;
  }

  .dash-hero {
    padding: 24px 20px;
    border-radius: 23px;
  }

  .dash-hero h1 {
    margin-top: 28px;
    font-size: clamp(38px, 12vw, 62px);
  }

  .dash-hero-foot {
    display: block;
    margin-top: 28px;
  }

  .dash-hero-foot p {
    margin-bottom: 20px;
    font-size: 12.5px;
  }

  .stat-strip {
    gap: 8px;
    margin-bottom: 24px;
  }

  .stat-card {
    min-height: 96px;
    padding: 13px;
  }

  .stat-card strong {
    margin-top: 20px;
    font-size: 23px;
  }

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

  .album-card {
    padding: 8px;
    border-radius: 17px;
  }

  .album-card-body {
    padding: 10px 3px 4px;
  }

  .album-card-body h3 {
    font-size: 13px;
  }

  .album-card-top .micro {
    display: none;
  }

  .album-card.new-card {
    min-height: 210px;
  }

  .album-hero {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 16px;
    border-radius: 23px;
  }

  .hero-cover {
    width: min(100%, 330px);
    margin: 0 auto;
  }

  .cover-action {
    opacity: 1;
    transform: none;
  }

  .hero-meta {
    padding: 0 4px 4px;
    text-align: left;
  }

  .hero-title {
    margin-top: 14px;
    font-size: clamp(30px, 9vw, 44px);
  }

  .hero-actions .spacer {
    display: none;
  }

  .hero-actions .btn {
    flex: 1;
    min-width: 116px;
  }

  .tracklist-card {
    border-radius: 19px;
  }

  .tracklist-head {
    display: none;
  }

  .tracklist.admin .track-row {
    grid-template-columns: 16px 22px 42px minmax(0, 1fr) 96px;
    gap: 8px;
    padding: 8px 10px;
  }

  .tracklist.viewer .track-row {
    grid-template-columns: 22px 42px minmax(0, 1fr) 52px;
    gap: 9px;
    padding: 8px 11px;
  }

  .track-thumb {
    width: 42px;
    height: 42px;
    border-radius: 8px;
  }

  .duration-cell {
    display: none;
  }

  .track-title {
    font-size: 12.5px;
  }

  .track-sub {
    font-size: 7.5px;
  }

  .admin-mode .track-actions .row-action.admin-action {
    opacity: 1;
  }

  .row-action {
    width: 26px;
    height: 26px;
  }

  .track-actions .row-action[data-action="move-up"],
  .track-actions .row-action[data-action="move-down"] {
    display: none;
  }

  .tracklist-foot {
    padding: 11px 12px;
  }

  .tracklist-foot .micro {
    display: none;
  }

  .upload-panel {
    margin: 0 10px 10px;
  }

  .player-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 12px;
    min-height: 104px;
    padding: 8px 14px 10px;
  }

  .player-center {
    grid-column: 1 / -1;
  }

  .player-right {
    display: none;
  }

  .player-cover {
    width: 42px;
    height: 42px;
  }

  .player-meta > span:last-child {
    max-width: 140px;
  }

  .transport {
    margin-bottom: 1px;
  }

  .play-btn {
    width: 36px;
    height: 36px;
  }

  .toast-stack {
    right: 14px;
    bottom: 126px;
  }

  .dash-hero-head .micro:last-child {
    display: none;
  }
}

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

  .album-card.new-card {
    min-height: 130px;
  }

  .stat-strip {
    grid-template-columns: 1fr 1fr;
  }

  .hero-kicker .micro:first-child {
    display: none;
  }
}

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