:root {
  --bg: #070707;
  --panel: #101010;
  --panel-2: #151515;
  --ink: #d5d0c6;
  --muted: #8f8a82;
  --faint: #62605b;
  --line: #393633;
  --line-light: #514b46;
  --accent: #7b2424;
  --accent-dark: #431616;
  --paper: #bfb7a7;
  --link: #d4c6ac;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0, rgba(255,255,255,.012) 1px, transparent 1px, transparent 3px),
    #070707;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: #fff4dc; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.top-rule { height: 5px; background: var(--accent); border-bottom: 1px solid #280b0b; }
.site-shell { width: min(1080px, calc(100% - 24px)); margin: 18px auto 30px; border: 1px solid var(--line); background: #0b0b0b; box-shadow: 0 0 0 1px #000; }

.masthead {
  padding: 28px 24px 23px;
  background: linear-gradient(#151313, #0c0c0c);
  border-bottom: 1px solid #25211f;
  text-align: center;
}
.logo { text-decoration: none; display: inline-block; color: var(--paper); }
.logo:hover { color: var(--paper); }
.logo-main {
  display: block;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(28px, 5vw, 48px);
  letter-spacing: .12em;
  line-height: 1;
  text-shadow: 0 1px 0 #000;
}
.logo-sub { display: block; margin-top: 9px; color: var(--muted); font-size: 11px; letter-spacing: .13em; text-transform: uppercase; }

.main-nav {
  min-height: 36px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: #181513;
  border-top: 1px solid #312925;
  border-bottom: 1px solid #3a302b;
}
.main-nav a {
  display: flex;
  align-items: center;
  padding: 0 20px;
  color: #c9c0b2;
  text-decoration: none;
  text-transform: uppercase;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 12px;
  letter-spacing: .08em;
  border-left: 1px solid #342c28;
}
.main-nav a:last-child { border-right: 1px solid #342c28; }
.main-nav a:hover { background: #241a18; color: #fff; }

.utility-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #0d0d0d;
  border-bottom: 1px solid var(--line);
}
.search-form { display: flex; align-items: center; gap: 7px; flex: 1; }
.search-form label { color: var(--muted); font-weight: bold; }
.search-form input {
  width: min(460px, 65vw);
  height: 27px;
  background: #080808;
  color: var(--ink);
  border: 1px solid #49433e;
  padding: 3px 7px;
  outline: none;
}
.search-form input:focus { border-color: #7a6a5d; }
button, .button-link {
  border: 1px solid #574d47;
  background: #1b1715;
  color: #d7cec1;
  padding: 5px 10px;
  text-decoration: none;
  border-radius: 0;
}
button:hover, .button-link:hover { background: #2c1c1a; color: #fff; }
.text-button { background: transparent; border: 0; padding: 2px; color: var(--link); text-decoration: underline; }

#app { padding: 14px; min-height: 560px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 14px; }
.box { border: 1px solid var(--line); background: var(--panel); margin-bottom: 14px; }
.box-title {
  margin: 0;
  padding: 6px 9px;
  border-bottom: 1px solid #473a35;
  background: linear-gradient(#3b1c1a, #2a1514);
  color: #e3d9cb;
  font: bold 13px Georgia, 'Times New Roman', serif;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.box-body { padding: 10px; }

.release-list { border-collapse: collapse; width: 100%; }
.release-list td { padding: 10px 7px; vertical-align: top; border-bottom: 1px solid #292725; }
.release-list tr:last-child td { border-bottom: 0; }
.release-cover-cell { width: 92px; }
.cover-thumb { display: block; width: 76px; height: 76px; object-fit: cover; border: 1px solid #5a514a; background: #1b1b1b; }
.release-band { font: bold 14px Georgia, 'Times New Roman', serif; text-transform: uppercase; letter-spacing: .025em; }
.release-title { margin-top: 2px; font-style: italic; color: #c5b9aa; }
.release-meta { margin-top: 5px; color: var(--muted); font-size: 12px; }
.release-note { margin-top: 6px; color: #aaa49c; }

.small-list { list-style: none; margin: 0; padding: 0; }
.small-list li { padding: 5px 0; border-bottom: 1px dotted #393632; }
.small-list li:last-child { border-bottom: 0; }
.count { float: right; color: var(--faint); }

.page-title {
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-light);
  color: #ddd4c6;
  font: normal 21px Georgia, 'Times New Roman', serif;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.page-subtitle { color: var(--muted); margin: -4px 0 16px; }

.release-header { display: grid; grid-template-columns: 220px 1fr; gap: 18px; }
.release-cover-large { width: 220px; aspect-ratio: 1; object-fit: cover; border: 1px solid #655a52; background: #181818; }
.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td { padding: 7px 8px; border-bottom: 1px solid #2c2926; text-align: left; vertical-align: top; }
.info-table th { width: 150px; color: #a9a095; font-weight: normal; background: #121110; }

.tracklist { width: 100%; border-collapse: collapse; }
.tracklist th, .tracklist td { border-bottom: 1px solid #2c2926; padding: 7px 6px; text-align: left; }
.tracklist th { color: #948d85; font-size: 11px; text-transform: uppercase; }
.track-number { width: 35px; text-align: right !important; color: var(--faint); }
.track-time { width: 65px; text-align: right !important; color: var(--muted); }

.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tag { border: 1px solid #403a36; background: #151311; padding: 2px 5px; color: #a9a096; font-size: 11px; }

.archive-table { width: 100%; border-collapse: collapse; }
.archive-table th { background: #1a1715; color: #b7ac9f; text-transform: uppercase; font-size: 11px; letter-spacing: .04em; }
.archive-table th, .archive-table td { padding: 7px 8px; border: 1px solid #322f2b; text-align: left; }
.archive-table tr:nth-child(even) td { background: #0d0d0d; }

.form-grid { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 9px 12px; align-items: start; }
.form-grid label { color: #aaa197; padding-top: 5px; }
.form-grid input, .form-grid textarea, .form-grid select {
  width: 100%;
  border: 1px solid #4c4540;
  background: #090909;
  color: var(--ink);
  padding: 6px 7px;
  border-radius: 0;
}
.form-grid textarea { min-height: 105px; resize: vertical; }
.form-help { color: var(--muted); font-size: 11px; }
.form-actions { grid-column: 2; display: flex; gap: 8px; align-items: center; }
.notice { border: 1px solid #5b5048; background: #17130f; padding: 9px 10px; margin: 10px 0; color: #c4b9aa; }
.notice.success { border-color: #526447; background: #11170f; }
.notice.error { border-color: #74423e; background: #1b1010; }

.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.danger { border-color: #6c3936; background: #241110; }
.muted { color: var(--muted); }
.empty { padding: 22px 10px; text-align: center; color: var(--muted); }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  background: #090909;
  color: #6f6b65;
  font-size: 11px;
}
.footer a { color: #91897e; }

@media (max-width: 760px) {
  .site-shell { width: calc(100% - 10px); margin-top: 5px; }
  .masthead { padding: 22px 8px 18px; }
  .logo-main { letter-spacing: .06em; }
  .logo-sub { letter-spacing: .07em; }
  .main-nav { flex-wrap: wrap; }
  .main-nav a { padding: 8px 11px; border-bottom: 1px solid #342c28; }
  .utility-bar { align-items: flex-start; flex-direction: column; }
  .search-form { width: 100%; flex-wrap: wrap; }
  .search-form input { flex: 1; min-width: 160px; width: auto; }
  #app { padding: 8px; }
  .layout { grid-template-columns: 1fr; }
  .release-header { grid-template-columns: 1fr; }
  .release-cover-large { width: min(100%, 300px); }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid label { padding-top: 0; }
  .form-actions { grid-column: 1; }
  .archive-table { font-size: 11px; }
  .archive-table .hide-mobile { display: none; }
  .footer { flex-direction: column; }
}

/* Authentication / backend additions */
[hidden] { display: none !important; }
.utility-right { display: flex; align-items: center; gap: 14px; }
.session-bar { color: var(--faint); font-size: 11px; white-space: nowrap; }
.admin-mark { color: #dca29c; font-weight: bold; letter-spacing: .08em; }
.auth-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stack-form { display: grid; gap: 10px; }
.stack-form label { color: #aaa197; display: grid; gap: 4px; }
.stack-form input {
  width: 100%;
  border: 1px solid #4c4540;
  background: #090909;
  color: var(--ink);
  padding: 7px 8px;
  border-radius: 0;
}
.stack-form button { justify-self: start; }
.form-status { color: var(--muted); margin-left: 6px; }
.success-text { color: #9fbc91; }
.error-text { color: #d5948e; }
.account-line { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.status { display: inline-block; padding: 2px 6px; border: 1px solid #4b4540; background: #161412; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.status-pending { border-color: #716441; color: #d0bf87; }
.status-approved { border-color: #4d6945; color: #a9c89e; }
.status-rejected { border-color: #74423e; color: #d79a94; }
.admin-description { color: #9f9991; margin: 5px 0; max-width: 580px; }
code { color: #c9bca8; background: #080808; border: 1px solid #2e2b28; padding: 1px 3px; }
button:disabled { opacity: .5; cursor: default; }

@media (max-width: 760px) {
  .auth-columns { grid-template-columns: 1fr; }
  .account-line { align-items: flex-start; flex-direction: column; }
  .utility-right { width: 100%; justify-content: space-between; }
  .session-bar { overflow: hidden; text-overflow: ellipsis; }
}

/* Production refinements */
.flush { padding: 0 !important; }
.table-scroll { width: 100%; overflow-x: auto; }
.index-stats {
  margin: 0 0 12px;
  padding: 6px 8px;
  border: 1px solid #302d2a;
  background: #0d0d0d;
  color: #77726c;
  font-size: 11px;
  letter-spacing: .02em;
}
.index-stats strong { color: #b8aea0; font-weight: normal; }
.title-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.title-line .page-title { flex: 1; }
.copy-link { white-space: nowrap; margin-top: 2px; }
.release-section { margin-top: 16px; }
.prose { white-space: pre-line; }
.directory-list { columns: 2; column-gap: 28px; }
.directory-list li { break-inside: avoid; }

.form-section-heading {
  grid-column: 1 / -1;
  margin: 7px 0 1px;
  padding: 5px 7px;
  border-top: 1px solid #3d3631;
  border-bottom: 1px solid #2f2a27;
  background: #12100f;
  color: #b9aea0;
  font: bold 11px Georgia, 'Times New Roman', serif;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.form-section-heading:first-child { margin-top: 0; }
.checkbox-label { padding: 0 !important; color: inherit !important; display: flex; gap: 7px; align-items: flex-start; }
.checkbox-label input { width: auto !important; margin-top: 3px; }
.cover-preview {
  display: block;
  width: 150px;
  height: 150px;
  object-fit: cover;
  margin-top: 8px;
  border: 1px solid #5b524b;
  background: #111;
}
.cover-preview[hidden] { display: none; }

.auth-extra { margin-top: 14px; border-top: 1px dotted #3c3834; padding-top: 9px; color: var(--muted); }
.auth-extra summary { cursor: pointer; color: var(--link); text-decoration: underline; }
.compact-form { margin-top: 10px; }
.narrow-form { max-width: 520px; }

.plain-tracklist { margin: 7px 0 0; padding-left: 24px; max-width: 680px; }
.plain-tracklist li { padding: 3px 0; border-bottom: 1px dotted #34312e; }
.plain-tracklist li span { float: right; color: var(--muted); margin-left: 20px; }

.admin-queue { padding: 0; }
.admin-review-card { padding: 12px; border-bottom: 1px solid #3a3531; }
.admin-review-card:last-child { border-bottom: 0; }
.admin-review-main { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 13px; }
.admin-cover { width: 132px; height: 132px; object-fit: cover; border: 1px solid #5a514a; background: #111; }
.admin-review-card h3 { margin: 0 0 4px; font: bold 15px Georgia, 'Times New Roman', serif; color: #d4cabd; }
.admin-contact { margin-top: 9px; color: #817b74; font-size: 11px; }
.submission-data { margin-top: 9px; color: #918b83; }
.submission-data summary { cursor: pointer; color: var(--link); }
.submission-data-body { padding: 7px 0 0; }
.admin-review-form {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dotted #403a35;
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 9px 12px;
}
.admin-review-form label { display: grid; gap: 4px; color: #9f978d; }
.admin-review-form textarea,
.admin-review-form input {
  width: 100%;
  border: 1px solid #4c4540;
  background: #090909;
  color: var(--ink);
  padding: 6px 7px;
  border-radius: 0;
}
.admin-review-form textarea { min-height: 68px; resize: vertical; }
.admin-review-form label:nth-child(3) { grid-column: 1 / -1; }
.admin-review-form .admin-actions { grid-column: 1 / -1; align-items: center; }
.submission-header { margin-bottom: 14px; }

@media (max-width: 760px) {
  .directory-list { columns: 1; }
  .title-line { display: block; }
  .copy-link { margin: -4px 0 10px; }
  .admin-review-main { grid-template-columns: 82px minmax(0, 1fr); }
  .admin-cover { width: 82px; height: 82px; }
  .admin-review-form { grid-template-columns: 1fr; }
  .admin-review-form label:nth-child(3), .admin-review-form .admin-actions { grid-column: 1; }
}

/* Submission editing / revisions */
.status-withdrawn { border-color: #4a4743; color: #817b74; }
.row-actions { white-space: nowrap; min-width: 180px; }
.link-button {
  border: 0;
  background: transparent;
  color: var(--link);
  padding: 0;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.link-button:hover { background: transparent; color: #fff; }
.danger-link { color: #b87972; }
.change-note { margin-top: 5px; font-size: 11px; line-height: 1.5; }
.detail-actions { margin: -3px 0 14px; }
.compact-notice { margin: 0 0 11px; padding: 6px 8px; }
.change-review-card { background: #0e0c0b; }

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


/* v5: destructive-account and admin actions */
.danger-zone {
  border-color: #742626;
}
.danger-zone .box-title {
  color: #ffb8b8;
}
.title-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* v6: clean /release/<slug> URLs; no visual changes required. */


/* v7 security UI */
.security-zone { border-color: #444; }
.mfa-setup { max-width: 720px; }
.mfa-qr {
  width: 220px;
  max-width: 100%;
  height: auto;
  image-rendering: auto;
  background: #fff;
  padding: 8px;
  border: 1px solid #777;
}
.secret-code {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  user-select: all;
}
.security-dialog {
  width: min(520px, calc(100% - 32px));
  border: 1px solid #888;
  border-radius: 0;
  background: #111;
  color: #eee;
  padding: 0;
}
.security-dialog::backdrop { background: rgba(0,0,0,.72); }
.security-dialog-form {
  display: grid;
  gap: 14px;
  padding: 20px;
}
.security-dialog-form h2 { margin: 0; font-size: 1.2rem; }
.security-dialog-form label { display: grid; gap: 5px; }
.security-dialog-form input {
  width: 100%;
  box-sizing: border-box;
}
.dialog-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}


/* v8 Turnstile */
.turnstile-slot {
  min-height: 65px;
  margin: 4px 0 2px;
  overflow: hidden;
}
