:root {
  --ink: #f8efe1;
  --ink-soft: #d8caba;
  --ink-muted: #9c8f82;
  --night: #0a090d;
  --cabinet: #171019;
  --cabinet-2: #211622;
  --chrome: #d9dde2;
  --chrome-dark: #727985;
  --gold: #e5bd63;
  --mint: #68d4c1;
  --coral: #ee7469;
  --ruby: #9e1f34;
  --blue: #5d8fd7;
  --line: rgba(255, 255, 255, 0.14);
  --shadow: 0 28px 90px -48px #000;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -16%, rgba(104, 212, 193, 0.14), transparent 34rem),
    radial-gradient(circle at 10% 18%, rgba(238, 116, 105, 0.13), transparent 24rem),
    radial-gradient(circle at 92% 62%, rgba(93, 143, 215, 0.12), transparent 26rem),
    linear-gradient(180deg, #0b090d, #151018 58%, #09080b);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

button {
  color: inherit;
}

a {
  color: inherit;
}

.jukebox-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 56px;
}

.topbar,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.topbar {
  min-height: 58px;
  margin-bottom: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(229, 189, 99, 0.7);
  border-radius: 8px;
  background: linear-gradient(145deg, #2a1720, #0e0b10);
  color: var(--gold);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem;
  font-style: italic;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.brand-name,
.brand-owner {
  display: block;
}

.brand-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.45rem;
  line-height: 1.05;
}

.brand-owner {
  color: var(--ink-muted);
  font-size: 0.78rem;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.short-label {
  display: none;
}

.topnav a,
.action-link,
.story-cta,
.filter-button,
.version-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink-soft);
  text-decoration: none;
  cursor: pointer;
}

.topnav a {
  min-width: 0;
  padding: 0 13px;
  font-size: 0.9rem;
}

.topnav a:hover,
.topnav a:focus-visible,
.action-link:hover,
.action-link:focus-visible,
.story-cta:hover,
.story-cta:focus-visible,
.filter-button:hover,
.filter-button:focus-visible,
.version-button:hover,
.version-button:focus-visible {
  border-color: rgba(229, 189, 99, 0.72);
  color: var(--ink);
}

.machine {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  min-width: 0;
  padding: 56px 22px 22px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 36px 36px 12px 12px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent),
    linear-gradient(145deg, #221724 0%, #100c13 54%, #21131a 100%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.machine::before {
  content: "";
  position: absolute;
  inset: 10px 10px auto;
  height: 98px;
  border-radius: 28px 28px 8px 8px;
  background:
    linear-gradient(90deg, rgba(104, 212, 193, 0.28), transparent 22%, rgba(229, 189, 99, 0.30) 50%, transparent 78%, rgba(238, 116, 105, 0.26)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.machine-crown {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
}

.machine-crown span {
  width: 92px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mint), var(--gold), var(--coral));
  box-shadow: 0 0 22px rgba(229, 189, 99, 0.34);
}

.now-playing,
.chrome-side,
.song-bank,
.lyrics-case,
.comments-case,
.upload-card {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  background: rgba(13, 10, 16, 0.70);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.now-playing {
  z-index: 1;
  padding: clamp(24px, 4vw, 38px);
}

.kicker,
.section-title span,
.detail-list dt,
.upload-label {
  color: var(--mint);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  max-width: 100%;
  margin: 10px 0 8px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  font-weight: 600;
  line-height: 0.94;
  overflow-wrap: anywhere;
  word-break: normal;
}

.artist-line {
  color: var(--ink-soft);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
}

.display-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1.22fr);
  gap: 22px;
  align-items: stretch;
  margin-top: 28px;
}

.record-window {
  min-height: 320px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 44% 44% 10px 10px;
  background:
    radial-gradient(circle at 50% 40%, rgba(229, 189, 99, 0.16), transparent 8rem),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 18px),
    linear-gradient(180deg, rgba(104, 212, 193, 0.10), rgba(158, 31, 52, 0.10));
}

.record {
  position: relative;
  width: min(72%, 270px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #08070a 0 7px, #17131a 8px 11px);
  box-shadow: 0 26px 72px -30px #000;
  animation: record-spin 9s linear infinite;
  animation-play-state: paused;
}

.record.is-playing {
  animation-play-state: running;
}

.record::after {
  content: "";
  position: absolute;
  width: 16px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: var(--night);
}

.record img {
  width: 42%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(229, 189, 99, 0.72);
}

.play-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}

.meta-pills,
.transport,
.side-actions,
.artist-filter,
.version-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-pills span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--ink-soft);
}

.meta-pills span:first-child {
  border-color: rgba(229, 189, 99, 0.72);
  color: var(--gold);
  font-weight: 800;
}

.icon-button,
.play-button {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #241a26, #100c13);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.icon-button {
  width: 50px;
  height: 50px;
  font-size: 1rem;
}

.icon-button.small {
  width: 40px;
  height: 40px;
}

.play-button {
  width: 68px;
  height: 68px;
  border-color: rgba(229, 189, 99, 0.82);
  background: linear-gradient(180deg, #f1cc77, #c79233);
  color: #1a0d05;
  font-size: 1.24rem;
}

.icon-button:hover,
.play-button:hover,
.icon-button:focus-visible,
.play-button:focus-visible {
  transform: translateY(-1px);
  border-color: var(--gold);
}

.timeline {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
  color: var(--ink-muted);
  font-size: 0.86rem;
}

.timeline input {
  width: 100%;
  min-width: 0;
  accent-color: var(--gold);
}

.version-button {
  min-height: 34px;
  padding: 0 11px;
  color: var(--ink-muted);
  font-size: 0.84rem;
}

.version-button.is-active {
  border-color: rgba(104, 212, 193, 0.76);
  color: var(--mint);
  background: rgba(104, 212, 193, 0.09);
}

.chrome-side {
  z-index: 1;
  padding: 24px;
}

.side-light {
  height: 96px;
  margin-bottom: 22px;
  border-radius: 999px 999px 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent),
    linear-gradient(135deg, var(--ruby), var(--coral) 48%, var(--gold));
  box-shadow: 0 0 38px rgba(238, 116, 105, 0.20);
}

.detail-list {
  display: grid;
  gap: 18px;
}

.detail-list dd {
  margin-top: 4px;
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.detail-artist-link {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.detail-artist-link:hover,
.detail-artist-link:focus-visible {
  color: var(--gold);
  outline: none;
}

.stats-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 22px;
}

.stats-panel div {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.stats-panel span {
  color: var(--gold);
  font-size: 1.15rem;
  font-weight: 900;
}

.stats-panel small {
  color: var(--ink-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.side-actions {
  margin-top: 24px;
}

.action-link,
.story-cta {
  padding: 0 14px;
  color: var(--gold);
  font-weight: 800;
}

.like-action {
  color: var(--ink-soft);
}

.like-action.is-active {
  border-color: rgba(238, 116, 105, 0.74);
  color: var(--coral);
  background: rgba(238, 116, 105, 0.10);
}

.copy-status {
  min-height: 22px;
  margin-top: 12px;
  color: var(--mint);
  font-size: 0.84rem;
}

.cabinet-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 22px;
  margin-top: 22px;
}

.song-bank,
.lyrics-case {
  padding: 22px;
}

.comments-case {
  margin-top: 22px;
  padding: 22px;
}

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

.section-title strong {
  color: var(--ink-muted);
  font-size: 0.84rem;
}

.artist-filter {
  margin-bottom: 14px;
}

.artist-directory {
  margin-bottom: 14px;
}

.artist-search {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.artist-search span {
  color: var(--mint);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.artist-search input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.artist-search input::placeholder {
  color: var(--ink-muted);
}

.filter-button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 0.84rem;
}

.filter-button.is-active {
  border-color: rgba(229, 189, 99, 0.72);
  color: var(--gold);
}

.artist-pill {
  gap: 9px;
  justify-content: space-between;
  max-width: 100%;
}

.artist-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artist-pill strong {
  min-width: 24px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  padding: 0 7px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--mint);
  font-size: 0.72rem;
}

.artist-status {
  min-height: 20px;
  color: var(--ink-muted);
  font-size: 0.82rem;
}

.artist-empty {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0 12px;
}

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

.title-strip {
  width: 100%;
  min-height: 86px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(70, 36, 20, 0.62);
  border-radius: 8px;
  padding: 10px 12px;
  background:
    linear-gradient(90deg, rgba(229, 189, 99, 0.18), transparent 9px),
    linear-gradient(180deg, #fff1cf, #f5d99b);
  color: #231409;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.title-strip:hover,
.title-strip:focus-visible,
.title-strip.is-active {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 2px rgba(238, 116, 105, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.strip-code {
  display: grid;
  place-items: center;
  width: 42px;
  height: 54px;
  border-radius: 6px;
  background: #261016;
  color: var(--gold);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.strip-title,
.strip-artist {
  display: block;
}

.strip-title {
  font-weight: 900;
  line-height: 1.16;
}

.strip-artist {
  margin-top: 4px;
  color: #6e4e35;
  font-size: 0.86rem;
  font-weight: 700;
}

.lyrics-window {
  max-height: 420px;
  overflow: auto;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent),
    #100d14;
}

.lyric-section + .lyric-section {
  margin-top: 18px;
}

.lyric-section h3 {
  color: var(--gold);
  font-size: 0.74rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.lyric-section p {
  color: var(--ink-soft);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.45;
  white-space: pre-line;
}

.story-cta {
  margin-top: 16px;
}

.comments-list {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.comment-card,
.empty-state {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.comment-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
}

.comment-card p,
.empty-state {
  color: var(--ink-soft);
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.35fr) minmax(0, 1fr);
  gap: 14px;
}

.comment-form label {
  display: grid;
  gap: 7px;
}

.comment-form label span {
  color: var(--mint);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.comment-form textarea {
  min-height: 94px;
  resize: vertical;
}

.compact-actions {
  grid-column: 1 / -1;
  margin-top: 0;
}

.rule {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 30px 0 18px;
  color: var(--ink-muted);
}

.rule::before,
.rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.rule span {
  color: var(--mint);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer {
  margin-top: 30px;
  color: var(--ink-muted);
  font-size: 0.84rem;
}

.footer span:last-child {
  color: var(--gold);
}

/* Upload booth */
.upload-shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 56px;
}

.upload-card {
  padding: clamp(22px, 4vw, 36px);
}

.upload-heading {
  margin-bottom: 24px;
}

.upload-heading h1 {
  font-size: clamp(2.6rem, 8vw, 4.6rem);
}

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

.field {
  display: grid;
  gap: 7px;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.field textarea {
  min-height: 170px;
  resize: vertical;
}

.field textarea.compact-textarea {
  min-height: 116px;
}

.field input[type="file"] {
  padding: 10px;
}

.field-hint {
  color: var(--ink-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.consent-field {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  color: var(--ink-soft);
}

.consent-field input {
  width: 18px;
  min-height: 18px;
}

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

.submit-button {
  min-height: 46px;
  border: 1px solid rgba(229, 189, 99, 0.82);
  border-radius: 8px;
  padding: 0 18px;
  background: linear-gradient(180deg, #f1cc77, #c79233);
  color: #1a0d05;
  font-weight: 900;
  cursor: pointer;
}

.form-note {
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.moderator-shell {
  width: min(1120px, calc(100% - 32px));
}

.owner-key-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto minmax(160px, 0.5fr);
  gap: 12px;
  align-items: end;
}

.owner-key-form .form-note {
  align-self: center;
}

.moderator-panel {
  margin-top: 18px;
}

.moderation-list {
  display: grid;
  gap: 12px;
}

.moderation-card,
.stats-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
}

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

.moderation-meta strong {
  color: var(--gold);
}

.moderation-meta span {
  color: var(--ink-muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.moderation-card p {
  color: var(--ink-soft);
  white-space: pre-line;
}

.queue-note,
.queue-story {
  margin-top: 8px;
}

.queue-links {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.queue-links a {
  color: var(--mint);
  overflow-wrap: anywhere;
}

.moderation-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.stats-table {
  display: grid;
  gap: 9px;
}

.stats-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(86px, auto));
  gap: 12px;
  align-items: center;
  color: var(--ink-soft);
}

.stats-row strong {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 34px;
  margin-right: 10px;
  border-radius: 6px;
  background: rgba(229, 189, 99, 0.14);
  color: var(--gold);
}

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

@media (max-width: 980px) {
  .machine,
  .cabinet-grid,
  .display-grid {
    grid-template-columns: 1fr;
  }

  .chrome-side {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 18px;
  }

  .side-light {
    height: auto;
    margin-bottom: 0;
  }
}

@media (max-width: 720px) {
  .jukebox-shell,
  .upload-shell {
    width: min(340px, calc(100vw - 24px));
    max-width: min(340px, calc(100vw - 24px));
    margin-left: 12px;
    margin-right: 12px;
    padding-top: 18px;
  }

  .topbar,
  .footer,
  .chrome-side {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .topnav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
  }

  .upload-nav {
    grid-column: 1 / -1;
  }

  .topnav a {
    padding: 0 8px;
    font-size: 0.82rem;
  }

  .wide-label {
    display: none;
  }

  .short-label {
    display: inline;
  }

  .machine {
    width: 100%;
    max-width: 100%;
    padding: 48px 12px 12px;
    border-radius: 26px 26px 10px 10px;
  }

  .machine-crown span {
    width: 62px;
  }

  .now-playing,
  .chrome-side,
  .song-bank,
  .lyrics-case,
  .comments-case,
  .upload-card {
    padding: 18px;
  }

  h1 {
    max-width: 280px;
    font-size: 2.08rem;
    line-height: 1.06;
    overflow-wrap: break-word;
  }

  .artist-line {
    font-size: 1.12rem;
  }

  .record-window {
    min-height: 260px;
  }

  .timeline {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .timeline span:last-child {
    display: none;
  }

  .title-strip-list,
  .upload-grid,
  .comment-form,
  .owner-key-form,
  .stats-row {
    grid-template-columns: 1fr;
  }
}
