/* ==========================================================================
   Chordify — base theme
   Dark by default, with a light theme available via [data-theme].
   Everything the layout editor draws lives here; admin.css adds the chrome.
   ========================================================================== */

:root {
  --accent: #7c5cff;
  --accent-soft: color-mix(in srgb, var(--accent) 18%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 45%, transparent);

  --bg: #0c0c11;
  --bg-2: #13131b;
  --bg-3: #1a1a24;
  --line: #262631;
  --line-soft: #1e1e28;

  --fg: #ececf3;
  --fg-2: #b3b4c4;
  --fg-3: #7e8093;

  --ok: #46c46a;
  --warn: #f5a524;
  --err: #e5484d;
  --info: #0091ff;

  --r: 12px;
  --r-sm: 8px;
  --r-lg: 18px;
  --pad: 20px;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;

  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px rgba(0,0,0,.28);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.4), 0 24px 60px rgba(0,0,0,.45);
  --wrap: 1360px;

  --chord: #ffc857;
  --chord-size: 16px;
}

[data-theme="daylight"], [data-theme="paper"] {
  --bg: #fbfbfd;
  --bg-2: #ffffff;
  --bg-3: #f2f2f6;
  --line: #e2e2ea;
  --line-soft: #eeeef3;
  --fg: #17171f;
  --fg-2: #4c4c5a;
  --fg-3: #82838f;
  --chord: #b3560f;
  --shadow: 0 1px 2px rgba(20,20,40,.06), 0 8px 24px rgba(20,20,40,.07);
  --shadow-lg: 0 4px 12px rgba(20,20,40,.1), 0 24px 60px rgba(20,20,40,.12);
}
[data-theme="ink"] {
  --bg: #05060a; --bg-2: #0b0d14; --bg-3: #12151f; --line: #1c2030; --line-soft: #141824;
  --fg: #e6e9f5; --fg-2: #a0a6c0; --fg-3: #6b7290; --chord: #7ee0c0;
}
[data-theme="paper"] {
  --bg: #f6f1e7; --bg-2: #fffdf8; --bg-3: #efe8da; --line: #ddd3bf; --line-soft: #e9e0cd;
  --fg: #2b2419; --fg-2: #5d5343; --fg-3: #8c8171; --chord: #9c4a12;
  --sans: var(--serif);
}
[data-theme="daylight"] .logo-word, [data-theme="paper"] .logo-word { color: var(--fg); }

/* ---------------------------------------------------------------- reset */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
code, pre, kbd { font-family: var(--mono); font-size: .92em; }
code { background: var(--bg-3); padding: .1em .35em; border-radius: 5px; }
pre { background: var(--bg-3); padding: 12px 14px; border-radius: var(--r-sm); overflow: auto; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--accent); color: #fff; padding: 10px 16px;
  border-radius: 0 0 var(--r-sm) var(--r-sm); font-weight: 600;
  transition: top .15s;
}
.skip-link:focus { top: 0; text-decoration: none; }
.muted { color: var(--fg-3); }
.hint { display: block; font-size: 13px; color: var(--fg-3); font-style: normal; margin-top: 4px; }
.empty { color: var(--fg-3); padding: 22px 0; }

/* ---------------------------------------------------------------- layout */

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(14px, 3vw, 30px); }
.wrap-narrow { max-width: 760px; }
.wrap-normal { max-width: 1080px; }
.wrap-full  { max-width: 100%; }

.shell {
  flex: 1 0 auto;
  display: grid;
  gap: clamp(18px, 2.4vw, 34px);
  padding: clamp(18px, 3vw, 36px) 0 60px;
  align-items: start;
}
/* The four rail shapes. Getting these wrong drops the content column into an
   implicit grid track, which looks broken even though the HTML is valid. */
.shell.cols-0     { grid-template-columns: minmax(0, 1fr); }
.shell.cols-left  { grid-template-columns: minmax(0, 240px) minmax(0, 1fr); }
.shell.cols-right { grid-template-columns: minmax(0, 1fr) minmax(0, 280px); }
.shell.cols-both  { grid-template-columns: minmax(0, 220px) minmax(0, 1fr) minmax(0, 280px); }

.main { min-width: 0; }
.page-content { min-width: 0; }
.rail { min-width: 0; position: sticky; top: 78px; }
.rail .mod + .mod { margin-top: 22px; }
@media (max-width: 1080px) {
  .shell.cols-left, .shell.cols-right, .shell.cols-both { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; }
  .rail-left { order: 2; }
  .rail-right { order: 3; }
  .rail .mod-body { max-width: none; }
}
@media (max-width: 620px) {
  .shell { display: block; }
  .rail { margin-top: 26px; }
}

/* --------------------------------------------------------- site header */

.site-header {
  position: relative; z-index: 60;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header.is-transparent { background: transparent; border-bottom-color: transparent; }
.site-header.is-sticky { position: sticky; top: 0; }

.header-inner {
  display: flex; align-items: center; gap: 16px;
  min-height: 60px; padding: 8px 0;
}
.header-slot { display: flex; align-items: center; min-width: 0; }
/* The logo slot stacks the wordmark over its tagline; side by side they
   collide as soon as the tagline is a sentence. */
.header-slot[data-slot="logo"] { display: block; }
.header-slot-nav { flex: 1 1 auto; }
.header-slot-search { flex: 0 1 320px; }
.header-slot-account { margin-left: auto; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 4px;
  width: 40px; height: 40px; padding: 0 9px;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-sm);
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--fg); border-radius: 2px; }
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .header-slot-search { display: none; }
  .header-inner { flex-wrap: wrap; }
  .header-slot-nav { order: 10; flex-basis: 100%; }
  .site-header.nav-open .header-slot-nav { display: block; }
}

.logo { display: inline-flex; align-items: baseline; gap: 8px; font-weight: 800; color: var(--fg); letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.logo-word { font-size: 20px; }
.logo-sm .logo-word { font-size: 15px; }
.logo-lg .logo-word { font-size: 30px; }
.logo img { max-height: 38px; width: auto; }
.logo-tagline { display: block; font-size: 12px; line-height: 1.35; color: var(--fg-3); margin-top: 1px; }

.nav-menu ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav-menu.is-vertical ul { flex-direction: column; gap: 0; }
.nav-menu a {
  display: block; padding: 7px 12px; border-radius: var(--r-sm);
  color: var(--fg-2); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.nav-menu a:hover { background: var(--bg-3); color: var(--fg); text-decoration: none; }
.nav-menu a.is-active { color: var(--fg); background: var(--bg-3); }

.account-menu { position: relative; }
.account-menu > summary {
  display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
  padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line);
}
.account-menu > summary::-webkit-details-marker { display: none; }
.account-avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 13px;
}
.account-name { font-size: 14px; font-weight: 600; }
.account-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; z-index: 70;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-lg); padding: 10px;
}
.account-panel ul { list-style: none; margin: 6px 0; padding: 0; }
.account-panel li a { display: block; padding: 7px 10px; border-radius: var(--r-sm); color: var(--fg); font-size: 14px; }
.account-panel li a:hover { background: var(--bg-3); text-decoration: none; }
.account-role { margin: 0 0 4px; font-size: 12px; color: var(--fg-3); display: flex; align-items: center; gap: 6px; }
.role-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #888; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--r-sm); border: 1px solid transparent;
  background: var(--bg-3); color: var(--fg); font: inherit; font-size: 14px;
  font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.3;
  transition: background .12s, border-color .12s, transform .06s;
}
.btn:hover { text-decoration: none; background: color-mix(in srgb, var(--fg) 8%, var(--bg-3)); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 84%, #000); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--fg-2); }
.btn-ghost:hover { color: var(--fg); border-color: var(--fg-3); }
.btn-danger { background: transparent; border-color: var(--err); color: var(--err); }
.btn-danger:hover { background: var(--err); color: #fff; }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.link-danger { background: none; border: 0; padding: 0; color: var(--err); font: inherit; cursor: pointer; }
.link-danger:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- forms */

input, select, textarea, .filter-bar input, .filter-bar select {
  width: 100%; padding: 9px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--bg-2); color: var(--fg);
  font: inherit; font-size: 15px;
}
input::placeholder, textarea::placeholder { color: var(--fg-3); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--fg-3) 50%), linear-gradient(135deg, var(--fg-3) 50%, transparent 50%); background-position: right 15px center, right 10px center; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
input[type="color"] { padding: 2px; height: 38px; cursor: pointer; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--accent); }
textarea { resize: vertical; min-height: 70px; }

label { display: block; font-size: 14px; font-weight: 600; color: var(--fg-2); margin-bottom: 12px; }
label > input, label > select, label > textarea { margin-top: 5px; }
.check-line { display: flex; align-items: flex-start; gap: 9px; font-weight: 500; color: var(--fg-2); }
.check-line input { margin-top: 4px; flex: none; }

.check-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.check-chip {
  display: inline-flex; align-items: center; gap: 6px; margin: 0;
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-2); font-size: 13px; font-weight: 500; cursor: pointer;
}
.check-chip:has(input:checked) { background: var(--accent-soft); border-color: var(--accent-line); color: var(--fg); }
.check-chip input { margin: 0; }

.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row > label { flex: 1 1 140px; min-width: 0; }
.field-row > label.grow { flex: 2 1 240px; }

/* ---------------------------------------------------------------- flashes */

.flash-stack { margin-bottom: 18px; }
.flash {
  display: flex; align-items: flex-start; gap: 12px; justify-content: space-between;
  padding: 12px 14px; border-radius: var(--r-sm); margin-bottom: 8px;
  border: 1px solid var(--line); background: var(--bg-2); font-size: 14.5px;
  animation: flash-in .2s ease-out;
}
@keyframes flash-in { from { opacity: 0; transform: translateY(-4px); } }
.flash-success { border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok) 10%, var(--bg-2)); }
.flash-error   { border-color: color-mix(in srgb, var(--err) 45%, transparent); background: color-mix(in srgb, var(--err) 10%, var(--bg-2)); }
.flash-warn    { border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 10%, var(--bg-2)); }
.flash-info    { border-color: color-mix(in srgb, var(--info) 45%, transparent); background: color-mix(in srgb, var(--info) 10%, var(--bg-2)); }
.flash-x { background: none; border: 0; color: inherit; opacity: .55; cursor: pointer; font-size: 20px; line-height: 1; padding: 0 2px; }
.flash-x:hover { opacity: 1; }

.notice {
  padding: 11px 14px; border-radius: var(--r-sm); margin-bottom: 16px;
  background: var(--bg-2); border: 1px solid var(--line); font-size: 14.5px; color: var(--fg-2);
}
.notice-warn { border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 8%, var(--bg-2)); }

.toast-stack { position: fixed; right: 16px; bottom: 16px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 11px 15px; border-radius: var(--r-sm); background: var(--bg-2);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: 14px;
  animation: flash-in .2s ease-out; max-width: 340px;
}
.toast.is-ok { border-color: var(--ok); }
.toast.is-err { border-color: var(--err); }

/* ---------------------------------------------------------------- search */

.search-box { display: flex; gap: 8px; }
.search-box input { flex: 1; }
.search-go { background: none; border: 0; cursor: pointer; font-size: 16px; padding: 0 6px; opacity: .6; }
.search-go:hover { opacity: 1; }

/* ---------------------------------------------------------------- filters */

.filter-bar {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; margin-bottom: 24px;
}
.filter-search { margin-bottom: 12px; }
.filter-fields { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filter-field { margin: 0; flex: 1 1 130px; min-width: 0; }
.filter-field > span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--fg-3); margin-bottom: 4px; }
.filter-fields .btn { flex: 0 0 auto; }
.result-count { color: var(--fg-3); font-size: 14px; margin: 0 0 14px; }

.pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 32px; }
.pager-step { padding: 8px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--fg-2); }
.pager-step:hover { color: var(--fg); border-color: var(--fg-3); text-decoration: none; }
.pager-step.is-off { opacity: .35; pointer-events: none; }
.pager-of { color: var(--fg-3); font-size: 14px; }

/* ---------------------------------------------------------------- lists */

.song-list { list-style: none; margin: 0; padding: 0; }
.song-list-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
}
@media (max-width: 1000px) { .song-list-grid { grid-template-columns: repeat(minmax(1, 2), minmax(0, 1fr)) !important; } }
@media (max-width: 600px)  { .song-list-grid { grid-template-columns: 1fr !important; } }

.song-item { min-width: 0; }
.song-link {
  display: flex; gap: 12px; align-items: flex-start; height: 100%;
  padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--bg-2); border: 1px solid var(--line-soft); color: var(--fg);
  transition: border-color .12s, background .12s, transform .08s;
}
.song-link:hover { text-decoration: none; border-color: var(--accent-line); background: var(--bg-3); transform: translateY(-1px); }
.song-key {
  flex: none; min-width: 44px; text-align: center;
  font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--chord);
  background: color-mix(in srgb, var(--chord) 12%, transparent);
  border-radius: 6px; padding: 3px 6px;
}
.song-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.song-title { font-weight: 600; font-size: 15px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.song-artist { font-size: 13px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-meta { font-size: 12px; color: var(--fg-3); opacity: .8; }

.song-list-list .song-item + .song-item { margin-top: 6px; }
.song-list-compact .song-link { padding: 7px 10px; background: transparent; border-color: transparent; }
.song-list-compact .song-link:hover { background: var(--bg-2); border-color: var(--line-soft); }
.song-list-compact .song-key { min-width: 38px; font-size: 12px; padding: 2px 5px; }
.song-list-compact .song-title { -webkit-line-clamp: 1; font-size: 14px; }

.artist-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.artist-list-card { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
.artist-list-list { grid-template-columns: 1fr; }
.artist-list-cloud { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
@media (max-width: 900px) { .artist-list-card { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 480px) { .artist-list-card { grid-template-columns: 1fr !important; } }
.artist-item a {
  display: flex; flex-direction: column; gap: 3px; height: 100%;
  padding: 13px 15px; border-radius: var(--r-sm);
  background: var(--bg-2); border: 1px solid var(--line-soft); color: var(--fg);
}
.artist-item a:hover { text-decoration: none; border-color: var(--accent-line); }
.artist-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); margin-bottom: 6px; background: var(--bg-3); }
.artist-name { font-weight: 600; font-size: 14.5px; }
.artist-count { font-size: 12px; color: var(--fg-3); }
.artist-list-cloud .artist-item a { padding: 6px 10px; flex-direction: row; gap: 6px; align-items: baseline; }

.genre-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.genre-list-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.genre-list-card { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
.genre-list-list { grid-template-columns: 1fr; }
@media (max-width: 900px) { .genre-list-card { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
.genre-item a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 13px; border-radius: 999px;
  background: color-mix(in srgb, var(--g, var(--accent)) 10%, var(--bg-2));
  border: 1px solid color-mix(in srgb, var(--g, var(--accent)) 26%, transparent);
  color: var(--fg); font-size: 14px; font-weight: 600;
}
.genre-item a:hover { text-decoration: none; border-color: var(--g, var(--accent)); }
.genre-count { margin-left: auto; font-size: 12px; color: var(--fg-3); font-weight: 500; }
.genre-desc { font-size: 12.5px; color: var(--fg-3); font-weight: 400; line-height: 1.5; }
.genre-list-card .genre-item a { flex-direction: column; align-items: flex-start; border-radius: var(--r); }

.key-browser { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.key-browser a, .key-pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--fg-2);
  font-family: var(--mono); font-size: 13px; font-weight: 600;
}
.key-browser a:hover, .key-pill:hover { color: var(--fg); border-color: var(--accent); text-decoration: none; }

.rank-list, .setlist, .archive-list, .album-list { list-style: none; margin: 0; padding: 0; }
.rank-list li a, .setlist li a, .archive-list li a, .album-list li a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px;
  border-radius: var(--r-sm); color: var(--fg); font-size: 14px;
}
.rank-list li a:hover, .setlist li a:hover, .archive-list li a:hover, .album-list li a:hover { background: var(--bg-2); text-decoration: none; }
.rank-name, .setlist-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-count, .album-count { font-size: 12px; color: var(--fg-3); }
.setlist-key, .rank-list .rank-count { font-family: var(--mono); font-size: 12px; color: var(--chord); min-width: 34px; }
.archive-list, .album-list { display: flex; flex-wrap: wrap; gap: 5px; }

.stats-panel { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
@media (max-width: 720px) { .stats-panel { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
.stat a {
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
  padding: 16px 10px; border-radius: var(--r); background: var(--bg-2);
  border: 1px solid var(--line-soft); color: var(--fg);
}
.stat a:hover { text-decoration: none; border-color: var(--accent-line); }
.stat-num { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.stat-label { font-size: 12px; color: var(--fg-3); }

.tabs { display: flex; gap: 3px; background: var(--bg-3); padding: 3px; border-radius: var(--r-sm); }
.tabs a { padding: 6px 13px; border-radius: 6px; font-size: 13.5px; font-weight: 600; color: var(--fg-3); }
.tabs a:hover { color: var(--fg); text-decoration: none; }
.tabs a.is-active { background: var(--bg-2); color: var(--fg); }

.alpha-index { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 20px; }
.alpha-index a {
  min-width: 30px; text-align: center; padding: 4px 7px; border-radius: 6px;
  font-size: 13px; font-weight: 600; color: var(--fg-3); background: var(--bg-2);
}
.alpha-index a:hover { color: var(--fg); text-decoration: none; }
.alpha-index a.is-active { background: var(--accent); color: #fff; }

.browse-head { margin-bottom: 22px; }
.browse-title { font-size: clamp(24px, 4vw, 34px); margin: 0 0 4px; }
.browse-sub { color: var(--fg-3); margin: 0 0 14px; font-size: 15px; }
.browse-search { display: flex; gap: 8px; max-width: 460px; }

/* ---------------------------------------------------------------- entities */

.entity-head { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 26px; }
.entity-image { width: 132px; height: 132px; border-radius: var(--r); object-fit: cover; background: var(--bg-3); flex: none; }
.entity-head-text { min-width: 0; }
.entity-kind { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--g, var(--accent)); font-weight: 700; margin: 0 0 4px; }
.entity-name { font-size: clamp(24px, 4.5vw, 38px); margin: 0 0 6px; }
.entity-facts { color: var(--fg-3); font-size: 14.5px; margin: 0 0 8px; }
.entity-bio { color: var(--fg-2); font-size: 15px; }
.entity-links { margin: 8px 0 0; font-size: 14px; display: flex; gap: 14px; }
.entity-keys { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.entity-keys-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--fg-3); }
.entity-albums { margin-bottom: 26px; }
.unused-genres { margin-top: 26px; }
.unused-genres summary { cursor: pointer; color: var(--fg-3); font-size: 14px; margin-bottom: 10px; }

.home-popular, .home-genres, .home-artists, .home-stats { margin-bottom: 34px; }
.home-popular h2, .home-genres h2, .home-artists h2 { font-size: 18px; }

.mod-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.mod-heading { font-size: 15px; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-3); margin: 0; font-weight: 700; }
.mod-sub { font-size: 13.5px; color: var(--fg-3); margin: 0; flex: 1; }
.mod-more { font-size: 13px; margin-left: auto; font-weight: 600; white-space: nowrap; }

/* Editor-only chrome. Modules::module() only emits .mod-tools for the layout
   editor's preview, so these rules never apply on the public site. */
.mod { position: relative; }
.mod-tools {
  position: absolute; z-index: 5; top: 0; left: 0;
  display: none; align-items: center; gap: 6px;
  padding: 2px 6px 2px 4px; border-radius: 0 0 var(--r-sm) 0;
  background: var(--accent); color: #fff;
  font: 700 9.5px/1.7 var(--sans); letter-spacing: .05em; text-transform: uppercase;
}
.mod:hover > .mod-tools, .mod:focus-within > .mod-tools { display: flex; }
.mod-grip { cursor: grab; letter-spacing: -1px; }
.mod-grip:active { cursor: grabbing; }
.mod-cfg { color: #fff; text-decoration: none; opacity: .8; font-size: 11px; }
.mod-cfg:hover { opacity: 1; }
.mod-locked > .mod-tools { background: var(--fg-3); }

.mod-body > *:first-child { margin-top: 0; }
.mod-body > *:last-child { margin-bottom: 0; }
.rail-item .mod-heading { font-size: 12.5px; }

/* ---------------------------------------------------------------- hero */

.hero {
  border-radius: var(--r-lg); padding: clamp(30px, 6vw, 62px) clamp(20px, 4vw, 46px);
  background:
    radial-gradient(120% 140% at 12% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 62%),
    radial-gradient(100% 120% at 92% 100%, color-mix(in srgb, var(--info) 20%, transparent), transparent 60%),
    var(--bg-2);
  border: 1px solid var(--line-soft);
  margin-bottom: 28px;
  overflow: hidden;
}
.hero-inner { max-width: 68ch; }
.hero-sm { padding-top: 30px; padding-bottom: 30px; }
.hero-lg { padding-top: clamp(46px, 9vw, 92px); padding-bottom: clamp(46px, 9vw, 92px); }
.hero-eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .16em; color: var(--accent); font-weight: 700; margin: 0 0 10px; }
.hero-headline { font-size: clamp(26px, 5.2vw, 46px); margin: 0 0 12px; max-width: 18ch; letter-spacing: -.025em; }
.hero-text { font-size: clamp(15px, 2vw, 18px); color: var(--fg-2); max-width: 56ch; margin: 0 0 22px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- misc */

.callout { padding: 15px 17px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--info); }
.callout-warn { border-left-color: var(--warn); }
.callout-good { border-left-color: var(--ok); }
.callout-plain { border-left-color: var(--fg-3); }
.callout-title { font-weight: 700; margin: 0 0 4px; font-size: 14.5px; }
.callout-body { font-size: 14.5px; color: var(--fg-2); }
.callout-body p:last-child { margin-bottom: 0; }

.prose { color: var(--fg-2); font-size: 15.5px; }
.prose h1, .prose h2, .prose h3 { color: var(--fg); margin-top: 1.2em; }
.md-list { padding-left: 1.1em; }
.md-bullet { color: var(--accent); margin-right: 4px; }

.page-title { margin-bottom: 20px; }
.page-heading { font-size: clamp(22px, 4vw, 32px); margin: 0 0 4px; }
.page-sub { color: var(--fg-3); margin: 0; }
.page-rule { display: block; width: 46px; height: 3px; background: var(--accent); border-radius: 2px; margin-top: 12px; }

.divider { margin: 22px 0; }
.divider-line { height: 1px; background: var(--line); }
.divider-fade { height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); }
.divider-dots { text-align: center; color: var(--fg-3); letter-spacing: .5em; }
.divider-space { height: 22px; }
.divider-label { display: block; text-align: center; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--fg-3); margin-bottom: 8px; }
.divider-dots .divider-label + * { display: none; }
.divider-line .divider-label { border-bottom: 1px solid var(--line); padding-bottom: 8px; }

.social-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.social-links a { font-size: 13.5px; padding: 4px 10px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); color: var(--fg-2); }
.social-links a:hover { color: var(--fg); text-decoration: none; border-color: var(--fg-3); }

.empty-state {
  text-align: center; padding: 60px 24px; border-radius: var(--r-lg);
  background: var(--bg-2); border: 1px dashed var(--line);
}
.empty-state h2 { font-size: 20px; }
.empty-state p { color: var(--fg-3); max-width: 46ch; margin: 0 auto 18px; }
.empty-state .btn { margin: 0 5px; }

.auth-card {
  max-width: 420px; margin: 40px auto; padding: 28px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.auth-card h1 { font-size: 24px; }
.auth-card form .btn { width: 100%; margin-top: 8px; }
.auth-alt { text-align: center; font-size: 14px; color: var(--fg-3); margin: 18px 0 0; }

.account-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-bottom: 18px; }
.panel-title { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-3); margin: 0 0 14px; }
.panel-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-head .panel-title { margin: 0; }
.panel-tools { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }

.perm-list summary, .cp-help summary, .wb-help summary { cursor: pointer; font-size: 14px; color: var(--fg-2); }
.perm-list ul { list-style: none; padding: 0; margin: 10px 0 0; }
.perm-list li { padding: 5px 0; font-size: 13.5px; border-bottom: 1px solid var(--line-soft); }
.perm-list li em { display: block; font-size: 12px; color: var(--fg-3); font-style: normal; }

/* ---------------------------------------------------------------- comments */

.comment-list { list-style: none; margin: 0; padding: 0; }
.comment { padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.comment-meta { margin: 0 0 4px; font-size: 13px; color: var(--fg-3); display: flex; gap: 8px; align-items: baseline; }
.comment-meta strong { color: var(--fg); font-size: 14px; }
.comment-body { font-size: 14.5px; color: var(--fg-2); }
.comment-body p:last-child { margin-bottom: 0; }
.comment-form { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; }
.comment-form .btn { align-self: flex-start; }

/* ---------------------------------------------------------------- footer */

.site-footer { margin-top: auto; border-top: 1px solid var(--line-soft); background: var(--bg-2); padding: 40px 0 26px; }
.footer-grid { display: grid; gap: 26px; }
.footer-cols-1 { grid-template-columns: 1fr; }
.footer-cols-2 { grid-template-columns: 1fr 1fr; }
.footer-cols-3 { grid-template-columns: 1.4fr 1fr 1fr; }
.footer-cols-4 { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-name { font-weight: 800; font-size: 17px; margin: 0 0 2px; }
.footer-tagline { color: var(--fg-3); font-size: 13.5px; margin: 0; }
.footer-note { font-size: 14px; color: var(--fg-2); }
.footer-note p:last-child { margin-bottom: 0; }
.footer-extra:empty { display: none; }
.footer-extra .mod { margin-top: 12px; }
.footer-legal {
  display: flex; gap: 14px; flex-wrap: wrap; justify-content: space-between;
  margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line-soft);
  font-size: 12.5px; color: var(--fg-3);
}
.footer-notice { opacity: .85; max-width: 70ch; }

/* Header modules that do not match a named slot still get rendered, in a
   row under the header. Hidden would mean a module could be placed, saved,
   and then be invisible -- which is worse than untidy. */
.header-extras {
  display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--line-soft);
}
.header-extras > .mod { flex: 0 1 auto; }

/* ---------------------------------------------------------------- errors */

.error-page { max-width: 520px; margin: 12vh auto; text-align: center; padding: 0 20px; }
.error-code { font-size: 72px; font-weight: 800; margin: 0; color: var(--accent); letter-spacing: -.04em; line-height: 1; }
.error-title { font-size: 24px; margin: 8px 0 10px; }
.error-msg { color: var(--fg-3); }
.error-actions { display: flex; gap: 10px; justify-content: center; margin-top: 24px; }

/* ---------------------------------------------------------------- tags */

.tag {
  display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 11.5px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  background: color-mix(in srgb, var(--g, var(--fg-3)) 16%, transparent);
  color: var(--g, var(--fg-2)); border: 1px solid color-mix(in srgb, var(--g, var(--fg-3)) 30%, transparent);
}
.tag-published { --g: var(--ok); }
.tag-draft { --g: var(--warn); }
.tag-suspended { --g: var(--err); }
.tag-pending { --g: var(--warn); }
.tag-approved { --g: var(--ok); }
.tag-spam { --g: var(--err); }
.tag-star { --g: var(--chord); }
.tag-live { --g: var(--accent); }
.row-tags { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: 1px; }

.widget-raw { font-size: 14.5px; }
.widget-frame { width: 100%; border: 0; display: block; min-height: 40px; }

/* ---------------------------------------------------------------- print */

@media print {
  .site-header, .site-footer, .transpose-bar, .rail, .toast-stack,
  .song-edit-bar, .skip-link, .chord-diagrams, .mod-tools, .fav-btn { display: none !important; }
  body { background: #fff; color: #000; }
  .shell { display: block; padding: 0; }
  .wrap { max-width: 100%; padding: 0; }
  .song-sheet { font-size: 12pt; }
  .cp-chord { color: #000 !important; background: none !important; font-weight: 700; }
  a[href]::after { content: ""; }
}
