:root {
  --bg: #050505;
  --panel: rgba(255,255,255,.055);
  --panel-strong: rgba(255,255,255,.095);
  --text: #f2eee7;
  --muted: rgba(242,238,231,.62);
  --faint: rgba(242,238,231,.32);
  --line: rgba(242,238,231,.14);
  --accent: #f2eee7;
  --danger: #ff8a8a;
  --radius: 28px;
  --shadow: 0 24px 80px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at 12% 10%, rgba(255,255,255,.08), transparent 32%),
    radial-gradient(circle at 90% 90%, rgba(255,255,255,.04), transparent 34%),
    var(--bg);
  color: var(--text);
}

button, input, textarea { font: inherit; }
.hidden { display: none !important; }

.app-shell, .admin-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 120px;
}

.lock-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  gap: 26px;
}

.eyebrow {
  margin: 0 0 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 12px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  font-size: clamp(58px, 10vw, 126px);
  line-height: .92;
  font-weight: 500;
  letter-spacing: -.055em;
  margin-bottom: 14px;
}
h2 {
  font-size: clamp(28px, 4vw, 58px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -.04em;
}
h3 {
  font-size: 24px;
  font-weight: 500;
}

.login-form {
  display: flex;
  gap: 12px;
  width: min(520px, 100%);
}
input, textarea {
  width: 100%;
  color: var(--text);
  background: rgba(255,255,255,.055);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px 18px;
  outline: none;
}
textarea { resize: vertical; line-height: 1.55; }
input:focus, textarea:focus { border-color: rgba(255,255,255,.38); }

button {
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
button:hover { transform: translateY(-1px); }
.primary-button, .login-form button {
  background: var(--accent);
  color: #050505;
}
.ghost-button {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
}
.error { color: var(--danger); }

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding: 28px 0 54px;
}
.topbar h1 { font-size: clamp(48px, 8vw, 96px); margin-bottom: 0; }
.subtitle, .intro-note p { color: var(--muted); line-height: 1.6; }

.intro-note {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
  margin-bottom: 56px;
}
.intro-note p { margin: 0; font-size: clamp(20px, 3vw, 34px); }

.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 34px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.notice h2 { margin: 0; font-size: 30px; }

.song-hero {
  display: grid;
  grid-template-columns: minmax(260px, 44%) 1fr;
  gap: 46px;
  align-items: center;
  margin-bottom: 78px;
}
.cover-frame {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.035));
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.cover-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cover-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 80px;
}
.song-detail h2 { margin-bottom: 18px; }
.song-detail .subtitle { margin-bottom: 28px; }
.player-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 28px 0;
  flex-wrap: wrap;
}
.transport-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.transport-button,
.mode-button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 28px;
  line-height: 1;
}
.mode-button {
  font-size: 16px;
  letter-spacing: .04em;
}
.mode-button.active,
.like-button.liked {
  background: rgba(255,255,255,.16);
  border-color: rgba(242,238,231,.30);
}
.play-button {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 20px;
}
.progress-wrap {
  flex: 1 1 220px;
  min-width: 160px;
}
.progress-line {
  width: 100%;
  height: 18px;
  display: block;
  padding: 7px 0;
  background: transparent;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  touch-action: none;
}
.progress-line::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 7px;
  height: 4px;
  background: rgba(255,255,255,.14);
  border-radius: 999px;
}
.progress-line:hover,
.progress-line:focus-visible {
  transform: none;
  outline: none;
}
.progress-line:focus-visible::before {
  background: rgba(255,255,255,.24);
}
.progress-fill {
  position: relative;
  z-index: 1;
  display: block;
  width: 0%;
  height: 4px;
  background: var(--accent);
  border-radius: 999px;
}
.time-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin-top: 8px;
}

.like-button {
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  min-width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 18px;
}

.content-block {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}
.block-toggle {
  width: 100%;
  padding: 0;
  text-align: left;
  color: var(--text);
  background: transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
}
.block-content {
  padding-top: 18px;
  color: rgba(242,238,231,.84);
  line-height: 1.85;
  white-space: pre-wrap;
}
.block-toggle span:last-child { color: var(--muted); }

.archive-section { margin-top: 40px; }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.section-heading h2 { margin: 0; }
.song-list { display: grid; gap: 12px; }
.song-card {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.035);
  cursor: pointer;
}
.song-card:hover, .song-card.active { background: var(--panel-strong); }
.song-card-cover {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel);
}
.song-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.song-card h3 { margin: 0 0 5px; }
.song-card p { margin: 0; color: var(--muted); }

.admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 440px) 1fr;
  gap: 24px;
}
.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 16px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.checkboxes { display: grid; gap: 10px; margin: 18px 0; }
.checkboxes label { display: flex; align-items: center; gap: 10px; margin: 0; }
.checkboxes input { width: auto; }
.form-actions { display: flex; gap: 10px; }
.admin-song-list { display: grid; gap: 12px; }
.admin-song-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.admin-song-item p { margin: 0; color: var(--muted); }
.admin-actions { display: flex; gap: 8px; }

@media (max-width: 760px) {
  .app-shell, .admin-shell { width: min(100% - 26px, 1120px); padding-top: 28px; }
  .login-form { flex-direction: column; }
  .topbar { padding-bottom: 34px; }
  .song-hero { grid-template-columns: 1fr; gap: 28px; }
  .cover-frame { border-radius: 26px; }
  .player-row { align-items: stretch; flex-wrap: wrap; }
  .transport-controls { width: 100%; justify-content: center; flex-wrap: wrap; }
  .transport-button, .mode-button, .like-button { width: 44px; height: 44px; }
  .play-button { width: 58px; height: 58px; }
  .progress-wrap { flex-basis: 100%; min-width: 0; }
  .section-heading { display: block; }
  .song-card { grid-template-columns: 58px 1fr; }
  .song-card .ghost-button { grid-column: 1 / -1; }
  .song-card-cover { width: 58px; height: 58px; border-radius: 15px; }
  .admin-grid { grid-template-columns: 1fr; }
}

.featured-work {
  margin: -18px 0 72px;
}
.work-lock-card {
  width: 100%;
  display: grid;
  grid-template-columns: 76px 1fr auto;
  grid-template-areas:
    "mark copy pill"
    "mark copy note";
  align-items: center;
  gap: 12px 24px;
  padding: 28px;
  text-align: left;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.025)),
    radial-gradient(circle at 16% 20%, rgba(242,238,231,.10), transparent 30%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 60px rgba(0,0,0,.22);
  overflow: hidden;
  position: relative;
}
.work-lock-card::before,
.work-lock-card::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(242,238,231,.08);
  border-radius: calc(var(--radius) - 10px);
  pointer-events: none;
}
.work-lock-card::after {
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(242,238,231,.24), transparent);
  border: 0;
}
.work-lock-mark {
  grid-area: mark;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--faint);
  background: rgba(0,0,0,.18);
  font-size: 38px;
}
.work-lock-copy { grid-area: copy; display: grid; gap: 7px; }
.work-lock-copy .eyebrow { margin: 0; }
.work-lock-copy strong {
  display: block;
  font-size: clamp(30px, 5vw, 58px);
  line-height: .94;
  font-weight: 500;
  letter-spacing: -.045em;
}
.work-lock-copy em {
  color: var(--muted);
  font-style: normal;
  font-size: clamp(17px, 2vw, 22px);
}
.locked-pill {
  grid-area: pill;
  justify-self: end;
  padding: 9px 14px;
  border: 1px solid rgba(242,238,231,.20);
  border-radius: 999px;
  color: rgba(242,238,231,.82);
  background: rgba(0,0,0,.24);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.work-lock-note {
  grid-area: note;
  justify-self: end;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}
.locked-pulse {
  animation: lockedPulse .72s ease both;
}
@keyframes lockedPulse {
  0% { transform: translateY(0); border-color: var(--line); }
  35% { transform: translateY(-2px); border-color: rgba(242,238,231,.46); background-color: rgba(255,255,255,.035); }
  100% { transform: translateY(0); border-color: var(--line); }
}

.collection-list { display: grid; gap: 12px; }
.collection-card {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,.035);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.collection-card:hover,
.collection-card.active,
.collection-card:focus-visible {
  background: var(--panel-strong);
  border-color: rgba(242,238,231,.24);
  outline: none;
}
.collection-card:hover { transform: translateY(-1px); }
.collection-card.is-locked { opacity: .82; }
.collection-thumb {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(242,238,231,.08);
}
.collection-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.collection-thumb span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 32px;
}
.collection-copy h3 { margin: 0 0 5px; }
.collection-copy p { margin: 0; color: var(--muted); }
.type-label {
  margin-bottom: 6px !important;
  color: var(--faint) !important;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .featured-work { margin: -14px 0 52px; }
  .work-lock-card {
    grid-template-columns: 58px 1fr;
    grid-template-areas:
      "mark copy"
      "pill pill"
      "note note";
    gap: 16px;
    padding: 22px;
  }
  .work-lock-mark { width: 58px; height: 58px; border-radius: 18px; font-size: 30px; }
  .locked-pill, .work-lock-note { justify-self: start; }
  .collection-card { grid-template-columns: 58px 1fr; }
  .collection-card .ghost-button { grid-column: 1 / -1; }
  .collection-thumb { width: 58px; height: 58px; border-radius: 15px; }
}

.admin-guidance {
  margin: 0 0 22px;
  padding: 16px 18px;
  border: 1px solid rgba(242,238,231,.16);
  border-radius: 20px;
  background: rgba(0,0,0,.16);
  color: var(--muted);
  line-height: 1.55;
}
.admin-guidance p { margin: 0 0 8px; }
.admin-guidance p:last-child { margin-bottom: 0; }
.admin-guidance strong {
  color: var(--text);
  font-weight: 500;
}
.admin-guidance code {
  color: rgba(242,238,231,.88);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(242,238,231,.10);
  border-radius: 8px;
  padding: 2px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: .92em;
}
.field-hint {
  display: block;
  margin-top: -2px;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.4;
}

.admin-search-label {
  margin: 18px 0 20px;
}
.admin-song-item.is-featured {
  border-color: rgba(242,238,231,.34);
  background: rgba(255,255,255,.075);
}
.admin-song-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.admin-song-cover {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(242,238,231,.10);
  background: rgba(0,0,0,.18);
}
.admin-song-cover img,
.admin-cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.admin-song-cover span,
.admin-cover-preview span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--faint);
}
.admin-inline-audio {
  width: min(260px, 100%);
  height: 34px;
  margin-top: 10px;
  display: block;
}
.admin-preview {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid rgba(242,238,231,.14);
  border-radius: 20px;
  background: rgba(0,0,0,.12);
}
.admin-preview-grid {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  align-items: center;
}
.admin-cover-preview {
  width: 92px;
  height: 92px;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(242,238,231,.12);
}
.admin-audio-preview p {
  margin: 0 0 10px;
  color: var(--text);
}
.admin-audio-preview audio {
  width: 100%;
}
.admin-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.admin-actions .ghost-button {
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
}

@media (max-width: 760px) {
  .admin-song-item {
    display: grid;
    gap: 16px;
  }
  .admin-song-main {
    align-items: flex-start;
  }
  .admin-actions {
    justify-content: flex-start;
  }
  .admin-preview-grid {
    grid-template-columns: 74px 1fr;
  }
  .admin-cover-preview {
    width: 74px;
    height: 74px;
    border-radius: 16px;
  }
}

/* v4.0 Admin UX polish */
.admin-form-panel,
.admin-list-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.admin-form-panel h2,
.admin-list-panel h2 {
  margin-bottom: 0;
}
.admin-form-section {
  padding: 20px;
  border: 1px solid rgba(242,238,231,.12);
  border-radius: 22px;
  background: rgba(0,0,0,.10);
}
.admin-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.admin-section-heading .eyebrow {
  margin: 0;
}
.admin-form-section label:last-child {
  margin-bottom: 0;
}
.admin-checkbox-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}
.admin-checkbox-grid label {
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid rgba(242,238,231,.10);
  border-radius: 16px;
  background: rgba(255,255,255,.035);
}
.admin-preview {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.preview-unavailable,
.admin-status {
  margin: 0;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.5;
}
.admin-status {
  padding: 12px 14px;
  border: 1px solid rgba(242,238,231,.14);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  color: var(--text);
}
.admin-save-actions {
  padding-top: 4px;
}
.admin-search-label {
  margin: 0 0 4px;
}
.admin-song-list {
  gap: 14px;
}
.admin-song-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.035);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.admin-song-card:hover {
  transform: translateY(-1px);
  background: var(--panel-strong);
  border-color: rgba(242,238,231,.24);
}
.admin-song-card.is-featured {
  border-color: rgba(242,238,231,.34);
  background: rgba(255,255,255,.07);
}
.admin-song-media {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-width: 0;
}
.admin-song-info {
  min-width: 0;
}
.admin-song-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.admin-song-title-row strong {
  font-size: 18px;
  font-weight: 500;
}
.admin-song-info p {
  margin: 0 0 5px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.admin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 5px 9px;
  border: 1px solid rgba(242,238,231,.16);
  border-radius: 999px;
  color: rgba(242,238,231,.84);
  background: rgba(0,0,0,.20);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.admin-badge.is-hidden {
  color: var(--faint);
}
.admin-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(104px, 1fr));
  gap: 8px;
  align-items: center;
  justify-content: end;
  min-width: 230px;
}
.admin-actions .ghost-button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  white-space: nowrap;
}
.admin-actions .featured-action {
  grid-column: 1 / -1;
}
.featured-action.is-featured {
  background: rgba(255,255,255,.14);
  border-color: rgba(242,238,231,.30);
}
.danger-text {
  color: var(--danger);
}
.danger-button {
  background: var(--danger);
  color: #050505;
}
.admin-empty-state {
  display: grid;
  gap: 8px;
  padding: 28px;
  border: 1px dashed rgba(242,238,231,.16);
  border-radius: 22px;
  color: var(--muted);
  text-align: center;
}
.admin-empty-state strong {
  color: var(--text);
  font-weight: 500;
  font-size: 18px;
}
.admin-empty-state span {
  color: var(--muted);
}
.admin-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: grid;
  gap: 5px;
  width: min(360px, calc(100% - 44px));
  padding: 16px 18px;
  border: 1px solid rgba(242,238,231,.18);
  border-radius: 18px;
  background: rgba(18,18,18,.96);
  box-shadow: var(--shadow);
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.admin-toast strong {
  color: var(--text);
  font-weight: 500;
}
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(10px);
}
.admin-modal-card {
  width: min(460px, 100%);
  padding: 24px;
  border: 1px solid rgba(242,238,231,.16);
  border-radius: 24px;
  background: #0b0b0b;
  box-shadow: var(--shadow);
}
.admin-modal-card h2 {
  margin-bottom: 12px;
  font-size: clamp(26px, 4vw, 38px);
}
.admin-modal-card p {
  color: var(--muted);
  line-height: 1.6;
}
.admin-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

@media (max-width: 900px) {
  .admin-song-card {
    grid-template-columns: 1fr;
  }
  .admin-actions {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .admin-actions .featured-action {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .admin-form-section {
    padding: 16px;
    border-radius: 20px;
  }
  .admin-checkbox-grid {
    grid-template-columns: 1fr;
  }
  .admin-song-media {
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: start;
  }
  .admin-song-cover {
    width: 64px;
    height: 64px;
  }
  .admin-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-actions .ghost-button {
    font-size: 12px;
  }
  .admin-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* v4.2 Admin UX polish */
.admin-shell {
  width: min(1280px, calc(100% - 40px));
}
.admin-grid {
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  align-items: start;
  gap: 30px;
}
.admin-form-panel,
.admin-list-panel {
  gap: 20px;
}
.admin-form-panel {
  position: sticky;
  top: 22px;
  max-height: calc(100vh - 44px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(242,238,231,.22) transparent;
}
.admin-form-panel::-webkit-scrollbar,
.admin-list-panel::-webkit-scrollbar {
  width: 9px;
}
.admin-form-panel::-webkit-scrollbar-thumb,
.admin-list-panel::-webkit-scrollbar-thumb {
  background: rgba(242,238,231,.18);
  border-radius: 999px;
}
.admin-form-panel.is-edit-highlighted {
  animation: adminFormGlow 1.2s ease both;
}
@keyframes adminFormGlow {
  0%, 100% { border-color: var(--line); box-shadow: none; }
  30% { border-color: rgba(242,238,231,.42); box-shadow: 0 0 0 4px rgba(242,238,231,.07), var(--shadow); }
}
.admin-accordion {
  display: grid;
  gap: 12px;
}
.admin-accordion-section {
  border: 1px solid rgba(242,238,231,.12);
  border-radius: 22px;
  background: rgba(0,0,0,.12);
  overflow: clip;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.admin-accordion-section:hover,
.admin-accordion-section:focus-within {
  border-color: rgba(242,238,231,.22);
  background: rgba(255,255,255,.035);
}
.admin-accordion-section summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 18px;
  cursor: pointer;
  list-style: none;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.admin-accordion-section summary::-webkit-details-marker { display: none; }
.accordion-icon {
  color: var(--muted);
  transition: transform .22s ease;
}
.admin-accordion-section:not([open]) .accordion-icon {
  transform: rotate(-90deg);
}
.admin-accordion-body {
  display: grid;
  gap: 16px;
  padding: 0 18px 18px;
  animation: adminAccordionIn .22s ease both;
}
@keyframes adminAccordionIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.admin-accordion-body label {
  margin-bottom: 0;
}
.admin-save-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 -24px -24px;
  padding: 18px 24px 24px;
  background: linear-gradient(180deg, transparent, rgba(5,5,5,.92) 25%, rgba(5,5,5,.98));
  border-top: 1px solid rgba(242,238,231,.10);
  backdrop-filter: blur(14px);
}
.admin-save-actions button {
  width: 100%;
}
.admin-preview-player {
  padding: 16px;
  border: 1px solid rgba(242,238,231,.12);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,.065), rgba(255,255,255,.02));
}
.admin-preview-grid {
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
}
.admin-preview-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}
.admin-preview-heading p {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.admin-preview-badges,
.admin-song-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.admin-badge-featured {
  border-color: rgba(245,198,87,.42);
  color: #f6d98b;
  background: rgba(245,198,87,.10);
}
.admin-cover-preview {
  width: 88px;
  height: 88px;
  border-radius: 20px;
}
.admin-audio-preview audio,
.admin-inline-audio {
  filter: saturate(.8);
}
.admin-song-list {
  gap: 16px;
}
.admin-song-card-v42 {
  grid-template-columns: minmax(0, 1fr) 164px;
  align-items: stretch;
  padding: 20px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.025)),
    rgba(0,0,0,.08);
}
.admin-song-card-v42:hover {
  transform: translateY(-2px);
}
.admin-song-card-body {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 20px;
  min-width: 0;
}
.admin-song-cover-large {
  width: 116px;
  height: 116px;
  border-radius: 24px;
  box-shadow: 0 14px 42px rgba(0,0,0,.26);
}
.admin-song-info-v42 {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
}
.admin-song-title-row-v42 {
  margin: 0;
}
.admin-song-title-row-v42 strong {
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.02;
  letter-spacing: -.035em;
  font-family: Georgia, "Times New Roman", serif;
}
.admin-song-file {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.admin-song-description {
  margin: 0;
  max-width: 62ch;
  color: rgba(242,238,231,.72);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.admin-mini-player {
  display: grid;
  grid-template-columns: minmax(180px, 340px) auto;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.admin-inline-audio {
  width: 100%;
  height: 34px;
  margin: 0;
}
.admin-duration {
  color: var(--faint);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  white-space: nowrap;
}
.admin-actions-v42 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  min-width: 0;
  align-content: start;
}
.admin-action-button {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px !important;
  border-radius: 15px !important;
  font-size: 13px !important;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, opacity .16s ease;
}
.admin-action-button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: rgba(255,255,255,.085);
}
.admin-action-button:active:not(:disabled) {
  transform: translateY(0) scale(.98);
}
.admin-action-button:disabled {
  cursor: default;
  opacity: .48;
  transform: none;
}
.admin-action-button.danger-text {
  color: var(--danger);
  border-color: rgba(255,138,138,.22);
}
.admin-action-button.danger-text:hover:not(:disabled) {
  background: rgba(255,138,138,.08);
  border-color: rgba(255,138,138,.34);
}
.featured-action.is-featured {
  color: #f6d98b;
  border-color: rgba(245,198,87,.38);
  background: rgba(245,198,87,.10);
}
.admin-empty-state {
  min-height: 180px;
  place-content: center;
  border-radius: 28px;
  background: rgba(255,255,255,.025);
}
.admin-search-label input {
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.admin-search-label input:focus {
  box-shadow: 0 0 0 4px rgba(242,238,231,.055);
}
.admin-toast {
  animation: adminToastIn .18s ease both;
}
@keyframes adminToastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
button:focus-visible,
summary:focus-visible {
  outline: 2px solid rgba(242,238,231,.52);
  outline-offset: 3px;
}

@media (max-width: 1080px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .admin-form-panel {
    position: static;
    max-height: none;
  }
  .admin-song-card-v42 {
    grid-template-columns: 1fr;
  }
  .admin-actions-v42 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .admin-shell {
    width: min(100% - 26px, 1120px);
  }
  .admin-song-card-v42 {
    padding: 16px;
    border-radius: 24px;
  }
  .admin-song-card-body {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
  }
  .admin-song-cover-large {
    width: 82px;
    height: 82px;
    border-radius: 18px;
  }
  .admin-mini-player {
    grid-template-columns: 1fr;
  }
  .admin-actions-v42 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-action-button {
    min-height: 42px;
    white-space: normal;
  }
  .admin-preview-grid {
    grid-template-columns: 74px minmax(0, 1fr);
  }
  .admin-cover-preview {
    width: 74px;
    height: 74px;
    border-radius: 16px;
  }
}
@media (max-width: 480px) {
  .admin-song-card-body {
    grid-template-columns: 1fr;
  }
  .admin-song-cover-large {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
  .admin-actions-v42,
  .admin-save-actions {
    grid-template-columns: 1fr;
  }
}

/* v4.2 Revision 2 final polish */
.admin-shell button {
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.admin-shell button:hover:not(:disabled) {
  box-shadow: 0 10px 26px rgba(0,0,0,.18);
}
.admin-shell button:active:not(:disabled) {
  transform: translateY(0) scale(.985);
}
.admin-form-panel {
  scroll-margin-top: 22px;
}
.admin-form-panel h2,
.admin-list-panel h2 {
  letter-spacing: -.035em;
}
.admin-guidance {
  margin-bottom: 4px;
}
.admin-accordion-section {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.admin-accordion-section[open] {
  background: rgba(255,255,255,.026);
  border-color: rgba(242,238,231,.16);
}
.admin-accordion-section summary {
  transition: background .18s ease, color .18s ease;
}
.admin-accordion-section summary:hover {
  background: rgba(255,255,255,.025);
}
.admin-accordion-body {
  will-change: opacity, transform;
}
.admin-checkbox-grid label {
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.admin-checkbox-grid label:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.055);
  border-color: rgba(242,238,231,.20);
}
.admin-song-card-v42 {
  position: relative;
  scroll-margin: 28px;
}
.admin-song-card-v42.is-selected {
  border-color: rgba(242,238,231,.30);
}
.admin-song-card-v42.is-card-highlighted {
  animation: adminCardGlow 1.35s ease both;
}
@keyframes adminCardGlow {
  0%, 100% { box-shadow: none; }
  28% { box-shadow: 0 0 0 4px rgba(242,238,231,.07), 0 22px 70px rgba(0,0,0,.32); }
}
.admin-song-title-row-v42 strong {
  color: var(--text);
}
.admin-song-badges {
  margin: 1px 0 2px;
}
.admin-song-file {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.admin-empty-state strong {
  font-size: 20px;
  letter-spacing: -.02em;
}
.admin-empty-state span {
  font-size: 14px;
  line-height: 1.55;
}
.admin-action-button {
  border-color: rgba(242,238,231,.15);
}
.admin-action-button:hover:not(:disabled) {
  border-color: rgba(242,238,231,.30);
}
.admin-action-button:disabled {
  box-shadow: none !important;
}
.featured-action.is-featured:disabled {
  opacity: .92;
  cursor: default;
}
.admin-toast {
  pointer-events: none;
}
.admin-toast.hidden {
  display: none !important;
}
@media (max-width: 760px) {
  .admin-form-panel,
  .admin-list-panel {
    gap: 16px;
  }
  .admin-accordion-section summary {
    min-height: 54px;
    padding: 0 16px;
  }
  .admin-accordion-body {
    padding: 0 16px 16px;
  }
}

/* v5.0.1 Library navigation + favourites */
.library-section {
  margin: 40px 0 56px;
}
.library-search-section {
  margin: 12px 0 34px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.032);
}
.library-search-label {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.library-search-label .eyebrow { margin: 0; }
.library-search-label input {
  width: 100%;
  min-height: 52px;
  border-radius: 18px;
  background: rgba(0,0,0,.16);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.library-search-label input:focus {
  background: rgba(0,0,0,.24);
  box-shadow: 0 0 0 4px rgba(242,238,231,.055);
}
.library-empty {
  margin: 0;
  padding: 24px;
  border: 1px dashed rgba(242,238,231,.16);
  border-radius: 22px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
  line-height: 1.6;
}
.compact-list .collection-card,
.collection-card.compact-card {
  padding: 12px;
}
.collection-card .favourite-toggle {
  min-width: 48px;
  font-size: 18px;
}
.collection-card.active .ghost-button,
.collection-card .favourite-toggle {
  border-color: rgba(242,238,231,.28);
  background: rgba(255,255,255,.08);
}
.song-hero {
  scroll-margin-top: 22px;
}
.song-detail {
  min-width: 0;
}
.song-detail .content-block:first-of-type {
  margin-top: 10px;
}

@media (max-width: 760px) {
  .library-section {
    margin: 30px 0 42px;
  }
  .library-search-section {
    margin: 6px 0 28px;
    padding: 16px;
    border-radius: 22px;
  }
  .library-empty {
    padding: 18px;
  }
  .collection-card {
    gap: 14px;
    padding: 12px;
  }
  .collection-card .ghost-button {
    min-height: 42px;
  }
}

/* v5.1 Brand polish and optional metadata */
.song-hero.song-switching {
  animation: songFadeIn .38s ease both;
}
@keyframes songFadeIn {
  from { opacity: .72; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.song-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: -8px 0 24px;
  padding: 0;
}
.song-metadata div {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(242,238,231,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.035);
}
.song-metadata dt,
.song-metadata dd {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  line-height: 1;
}
.song-metadata dt {
  color: var(--faint);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.song-metadata dd {
  color: rgba(242,238,231,.80);
}
.like-button {
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.like-button.heart-pop {
  animation: heartPop .42s ease both;
}
@keyframes heartPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.16); }
  100% { transform: scale(1); }
}
.progress-line::before,
.progress-fill {
  transition: background .18s ease, width .08s linear;
}
.progress-line:hover::before {
  background: rgba(255,255,255,.20);
}
.admin-metadata-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.admin-metadata-fields label {
  margin-bottom: 0;
}
.admin-metadata-wide {
  grid-column: 1 / -1;
}
.admin-song-meta {
  color: rgba(242,238,231,.70) !important;
  font-size: 12px;
}
@media (max-width: 760px) {
  .song-metadata {
    gap: 8px;
    margin-bottom: 18px;
  }
  .song-metadata div {
    padding: 7px 9px;
  }
  .admin-metadata-fields {
    grid-template-columns: 1fr;
  }
}


/* v5.2 Misha Activity */
.admin-activity-panel {
  margin-top: 28px;
}
.admin-activity-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.admin-activity-header h2 { margin-bottom: 8px; }
.admin-activity-key {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(242,238,231,.12);
  border-radius: 20px;
  background: rgba(0,0,0,.12);
}
.admin-activity-key label { margin-bottom: 0; }
.admin-activity-list {
  display: grid;
  gap: 12px;
}
.admin-activity-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid rgba(242,238,231,.12);
  border-radius: 20px;
  background: rgba(255,255,255,.035);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.admin-activity-item:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.055);
  border-color: rgba(242,238,231,.22);
}
.admin-activity-item strong {
  display: block;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 5px;
}
.admin-activity-item span {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}
@media (max-width: 760px) {
  .admin-activity-header,
  .admin-activity-key,
  .admin-activity-item {
    display: grid;
  }
  .admin-activity-key { grid-template-columns: 1fr; }
}
