:root {
  --bg: #292929;
  --panel: #333333;
  --panel-2: #3c3c3c;
  --border: #484848;
  --border-strong: #585858;
  --text: #ffffff;
  --text-dim: #b4b4b4;
  --text-faint: #787878;
  --accent: #aa38d8;
  --accent-dim: #7d29a8;
  --danger: #f34144;
  --radius: 8px;
  --mono: 'SF Mono', 'Roboto Mono', Consolas, monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-sans);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select, textarea {
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
}

input, select, textarea {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent-dim); }

button {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  cursor: pointer;
  color: var(--text);
}
button:hover { border-color: var(--border-strong); }
button:active { transform: scale(0.98); }
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 600;
}
button.primary:hover { background: #bf53ed; border-color: #bf53ed; }
button.danger { color: var(--danger); border-color: var(--danger); }
button.danger:hover { background: rgba(243,65,68,0.12); }
button.subtle {
  background: transparent;
  border-color: transparent;
  color: var(--text-dim);
}
button.subtle:hover { color: var(--text); border-color: var(--border); }
button:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
}
.topbar .brand { display: flex; align-items: center; }
.topbar .brand a { display: flex; align-items: center; }
.topbar .brand img { height: 28px; width: auto; }
.topbar .sub { color: var(--text-dim); font-size: 13px; }

/* Discourages right-click > Save image and drag-to-desktop on logos and artwork.
   This is a deterrent only: the image is still reachable via DevTools, the network
   tab and its direct URL. Do not treat it as protection. */
img.logo, .artist-logo, .sah-logo, .art img, .anim-card img, #logoPreview img,
.track-card .art img, .suggestion-art {
  -webkit-user-drag: none; user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none; pointer-events: none;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px 80px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}

.label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 6px;
  display: block;
}

.field { display: flex; flex-direction: column; margin-bottom: 12px; min-width: 0; }
.field input, .field textarea, .field select { width: 100%; min-width: 0; box-sizing: border-box; }

.row { display: flex; gap: 12px; }
.row > .field { flex: 1; min-width: 0; }

.empty {
  color: var(--text-faint);
  font-size: 13px;
  padding: 24px 8px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.toast {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 9px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 200;
}
.toast.show { opacity: 1; }

/* Track pool labels */
.track-label { display:inline-block; font-size:9px; font-weight:700; text-transform:uppercase;
  letter-spacing:0.05em; padding:1px 5px; border-radius:4px; margin-left:6px; vertical-align:middle; }
.label-dup { background:rgba(243,65,68,0.2); color:#f34144; border:1px solid #f34144; }
.label-ver { background:rgba(226,169,38,0.2); color:#e2a926; border:1px solid #e2a926; }
.track-card.in-setlist { opacity:0.4; }
.pool-sep { font-size:11px; color:var(--text-faint); padding:8px 4px 4px; letter-spacing:0.06em; text-transform:uppercase; border-top:1px solid var(--border); margin-top:4px; }


/* ---- Select menus --------------------------------------------------------
   Native selects render with the OS chrome, which looks foreign in a dark UI.
   The closed control is fully themed here; the OPEN list is drawn by the
   operating system and cannot be styled from CSS — only a custom JS listbox
   could change that, at the cost of keyboard and accessibility behaviour. */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 7px 32px 7px 10px;
  cursor: pointer;
  /* Chevron drawn inline so no image request is needed */
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a9aa6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 14px 14px;
  transition: border-color .15s, background-color .15s;
}
select:hover { border-color: var(--accent-dim); }
select:focus { outline: none; border-color: var(--accent); }
select:disabled { opacity: .5; cursor: not-allowed; }
/* Dark option rows where the browser honours it (Chrome/Edge on most platforms) */
select option { background: var(--panel); color: var(--text); }
select option:checked { background: var(--accent); color: #fff; }

/* ---- Custom dropdown (see select.js) --------------------------------------
   The native <select> stays in the DOM as the source of truth but is visually
   hidden; the button and menu below are what the user sees. */
.ms-select { position: relative; display: inline-block; width: 100%; }
.ms-select-native {
  position: absolute; opacity: 0; pointer-events: none; width: 100%; height: 100%;
  left: 0; top: 0; margin: 0;
}
.ms-select-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; box-sizing: border-box;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--radius, 8px); color: var(--text);
  font-family: inherit; font-size: 13px; line-height: 1.25;
  padding: 7px 10px; cursor: pointer; text-align: left;
  transition: border-color .15s;
}
.ms-select-btn:hover { border-color: var(--accent-dim); }
.ms-select-btn:focus { outline: none; border-color: var(--accent); }
.ms-select-btn:disabled { opacity: .5; cursor: not-allowed; }
.ms-select-btn.placeholder { color: var(--text-faint); }
.ms-select-btn svg { flex-shrink: 0; color: var(--text-faint); }
.ms-select-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-select-open .ms-select-btn { border-color: var(--accent); }

.ms-select-menu {
  position: fixed; z-index: 2000; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--border-strong, var(--border));
  border-radius: 10px; padding: 4px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.55);
}
.ms-select-item {
  padding: 7px 10px; border-radius: 6px; font-size: 13px; color: var(--text);
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ms-select-item:hover, .ms-select-item.active { background: var(--panel-2); }
.ms-select-item.selected { background: var(--accent); color: #fff; }
.ms-select-item.disabled { opacity: .4; cursor: default; }

/* ---- Checkboxes -----------------------------------------------------------
   One definition for the whole app. This lived inline on each checkbox, then in
   four separate page stylesheets, and each copy drifted — which is why the
   delete-account, delete-artist, register and remove-artist boxes all looked
   different. style.css is loaded by every page, so this is the only place it
   needs to exist. Add the class; do not add another inline style. */
.checkbox-row { display:flex; align-items:center; gap:8px; margin-bottom:12px; }
.checkbox-row.align-top { align-items:flex-start; }
.checkbox-row.align-top input[type="checkbox"] { margin-top:2px; }
.checkbox-row input[type="checkbox"] {
  width:16px; height:16px; cursor:pointer; accent-color:var(--accent);
  flex-shrink:0; color-scheme:dark; margin:0;
}
.checkbox-row label, .checkbox-row span { color:var(--text-dim); font-size:13px;
  cursor:pointer; line-height:1.4; }
