/* ─── Design tokens ──────────────────────────────────────────────────────── */
:root {
  --bg:          #F5F5F8;
  --card:        #FFFFFF;
  --well:        #FAFAFC;
  --line:        #E4E4EC;
  --line-strong: #DCDCE8;
  --line-hover:  #B9B9CC;
  --text:        #17171F;
  --muted:       #6B6B82;
  --faint:       #6E6E85;

  --accent:       #7C3AED;
  --accent-hover: #6D28D9;
  --accent-soft:  #F3EDFE;
  --accent-line:  #E3D5FB;

  --l: #E11D48;   /* left  — crimson */
  --d: #2563EB;   /* down  — blue    */
  --u: #059669;   /* up    — emerald */
  --r: #B45309;   /* right — amber   */

  --success:      #047857;
  --success-bg:   #ECFDF5;
  --success-line: #A7E8CD;

  --radius:    10px;
  --radius-lg: 14px;
  --shadow:    0 1px 2px rgba(23,23,31,.04);

  --sans: 'Archivo', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  padding: 0 0 64px;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ─── Header ─────────────────────────────────────────────────────────────── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}

.brand { display: flex; align-items: center; gap: 14px; }

.arrows {
  display: grid;
  grid-template-columns: repeat(4, 10px);
  gap: 4px;
}
.arrows span { height: 10px; border-radius: 2px; }
.arrow.l { background: var(--l); }
.arrow.d { background: var(--d); }
.arrow.u { background: var(--u); }
.arrow.r { background: var(--r); }

h1 { font-size: 19px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }

.subtitle {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.status::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--u);
}

/* ─── Workspace grid ─────────────────────────────────────────────────────── */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 20px;
  /* stretch, not start: both columns take the height of the taller one so they
     finish level. Which side is taller changes with content — an expanded
     advanced panel on the left, a drift warning on the right — so each column
     nominates one card to absorb its own slack (below) rather than the layout
     assuming a winner. */
  align-items: stretch;
}
.col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* The slack-takers. Chart is the last card in the left column, so growing it
   moves that column's bottom edge; in the right column the waveform grows
   instead of the generate card, which would otherwise become a mostly-empty
   panel with a button in it. */
#sec-options { flex: 1 1 auto; }
#sec-sync    { flex: 1 1 auto; display: flex; flex-direction: column; }

@media (max-width: 880px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
}

/* ─── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* The sync card puts its h2 inside .sync-head so the zoom toolbar can sit
   beside it, which used to take that heading out of reach of the child selector
   below: "03" rendered as a bare 24px browser default h2 with no badge at all,
   while 01 and 02 got the styled chip. Both selectors are listed rather than
   loosening to a descendant match, so a future nested heading has to opt in. */
.card > h2,
.sync-head > h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  padding: 16px 18px 0;
}
.card > h2 .step,
.sync-head > h2 .step {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 6px;
  padding: 3px 7px;
}

.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 18px; }

/* ─── Drop zone / file chip ──────────────────────────────────────────────── */
.drop-zone {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 26px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.drop-zone:hover,
.drop-zone.over { border-color: var(--accent); background: var(--accent-soft); }
.drop-icon { font-size: 22px; color: var(--accent); margin-bottom: 6px; }
.drop-zone p { color: var(--muted); font-size: 13px; }
.drop-zone .small { font-size: 11.5px; color: var(--faint); margin-top: 3px; }

.file-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--well);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.file-chip::before {
  content: '♪';
  width: 38px; height: 38px; flex: none;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  display: grid; place-items: center;
  font-size: 16px; color: var(--accent);
}
.chip-name {
  flex: 1; min-width: 0;
  font-size: 13px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chip-clear {
  background: none; border: none; cursor: pointer;
  color: var(--faint); font-size: 14px; line-height: 1; padding: 4px;
  transition: color .12s;
}
.chip-clear:hover { color: var(--l); }

/* ─── Option groups ──────────────────────────────────────────────────────── */
.opt-group > label,
.sync-field label,
.field-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 6px; }
#modeGroup     { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#diffGroup     { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
#subdivGroup   { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
#rotationGroup { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }

.tog-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 10px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .12s, color .12s, background .12s;
}
.tog-btn:hover { border-color: var(--line-hover); color: var(--text); }
.tog-btn.active {
  background: color-mix(in srgb, var(--accent) 8%, #fff);
  border-color: var(--accent);
  color: var(--accent);
}
#rotationGroup .tog-btn { height: 46px; }
.sub-hint {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  opacity: .8;
  margin-top: 3px;
  pointer-events: none;
}

/* difficulty colour coding */
#diffGroup .tog-btn.active[data-val="Beginner"]  { color: var(--u); border-color: var(--u); background: color-mix(in srgb, var(--u) 8%, #fff); }
#diffGroup .tog-btn.active[data-val="Easy"]      { color: var(--d); border-color: var(--d); background: color-mix(in srgb, var(--d) 8%, #fff); }
#diffGroup .tog-btn.active[data-val="Medium"]    { color: var(--r); border-color: var(--r); background: color-mix(in srgb, var(--r) 8%, #fff); }
#diffGroup .tog-btn.active[data-val="Hard"]      { color: var(--l); border-color: var(--l); background: color-mix(in srgb, var(--l) 8%, #fff); }
#diffGroup .tog-btn.active[data-val="Challenge"] { color: var(--accent); border-color: var(--accent); }

.stream-btn.active,
#subdivGroup .tog-btn.active,
#rotationGroup .tog-btn.active {
  color: var(--r); border-color: var(--r);
  background: color-mix(in srgb, var(--r) 8%, #fff);
}

.hint { color: var(--muted); font-size: 11.5px; line-height: 1.5; margin-top: 9px; text-wrap: pretty; }
.hint.error { color: var(--l); }
#suggestionHint b, #driftHint b, #gridHint b { color: var(--text); font-weight: 600; }

.stream-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 14px;
  background: var(--well);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

textarea {
  width: 100%;
  background: var(--well);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.55;
  padding: 11px 13px;
  min-height: 88px;
  resize: vertical;
  transition: border-color .12s;
}
textarea:focus { outline: none; border-color: var(--accent); }
::placeholder { color: var(--faint); }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.mini-btn {
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  height: 34px;
  padding: 0 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .12s, color .12s;
}
.mini-btn:hover:not(:disabled) { border-color: var(--line-hover); color: var(--text); }
.mini-btn:disabled { opacity: .45; cursor: not-allowed; }
.mini-btn.icon { width: 28px; height: 28px; padding: 0; font-family: var(--sans); font-size: 13px; }
.mini-btn.sm   { height: 28px; padding: 0 10px; font-size: 10px; letter-spacing: .1em; }

.link-btn {
  background: none; border: none; cursor: pointer;
  color: var(--faint); font-family: var(--sans); font-size: 11.5px;
  text-decoration: underline; text-underline-offset: 3px;
  margin-left: auto;
}
.link-btn:hover { color: var(--text); }

.tog-btn#previewPlayBtn {
  height: 34px; padding: 0 16px; font-weight: 600;
  background: var(--text); border-color: var(--text); color: #fff;
}
.tog-btn#previewPlayBtn:hover { background: #000; border-color: #000; color: #fff; }
.tog-btn#previewStopBtn { padding: 0 14px; }

.btn-primary {
  /* Centre the label on any element. A native <button> centres its text for
     free, but these classes are also used on <a> anchors (the landing CTAs, the
     auth pages), where an explicit height with no vertical padding otherwise
     leaves the label pinned to the top of the box. inline-flex fixes it once for
     every button, whatever element and whatever height. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 15px;
  border-radius: 11px;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(124,58,237,.22);
  transition: background .15s, box-shadow .15s;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary:disabled { background: #D9D9E4; color: #fff; box-shadow: none; cursor: not-allowed; }

.btn-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  background: var(--success-bg);
  border: 1px solid var(--success-line);
  color: var(--success);
  padding: 12px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s;
}
.btn-success:hover { background: #D9F7EA; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .12s, color .12s;
}
.btn-ghost:hover { border-color: var(--line-hover); color: var(--text); }

/* ─── Verify sync ────────────────────────────────────────────────────────── */
#sec-sync > h2 { padding-bottom: 14px; }
.sync-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 14px;
}
.sync-head h2 { padding: 0; }

.canvas-toolbar { display: flex; align-items: center; gap: 6px; }
.time-display {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  margin-right: 6px;
}

.canvas-wrap {
  position: relative;
  background: var(--well);
  border-top: 1px solid #EDEDF3;
  border-bottom: 1px solid #EDEDF3;
  flex: 1 1 130px;
  min-height: 130px;
}
.canvas-wrap canvas { display: block; width: 100%; height: 130px; cursor: grab; }
.canvas-wrap canvas:active { cursor: grabbing; }

#syncControls { padding: 16px 18px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
#syncControls > .full { grid-column: 1 / -1; }
#syncControls .hint { margin-top: 0; }

.sync-row { display: contents; }
.sync-field { min-width: 0; }
.sync-field-row { display: flex; align-items: stretch; gap: 6px; }

input[type="number"] {
  flex: 1;
  min-width: 0;
  background: var(--well);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.01em;
  padding: 8px 12px;
  transition: border-color .12s;
}
input[type="number"]:focus { outline: none; border-color: var(--accent); }

.transport {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.divider { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }

/* ─── Sliders ────────────────────────────────────────────────────────────── */
.slider-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2px;
}
.slider-head .field-label { margin-bottom: 0; }
.adv-val { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--text); }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 22px;
  background: transparent;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 3px; background: #DEDEE8; border-radius: 99px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  margin-top: -6.5px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #C9C9D8;
  box-shadow: 0 1px 3px rgba(23,23,31,.18);
  transition: border-color .12s;
}
input[type="range"]:hover::-webkit-slider-thumb { border-color: var(--accent); }
input[type="range"]::-moz-range-track { height: 3px; background: #DEDEE8; border-radius: 99px; }
input[type="range"]::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%;
  background: #fff; border: 1px solid #C9C9D8;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--faint);
  margin-top: -2px;
}

/* ─── Advanced panel ─────────────────────────────────────────────────────── */
#advancedWrap { border-top: 1px solid #EDEDF3; padding-top: 14px; }

.adv-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: color .12s;
}
.adv-toggle:hover { color: var(--text); }
#advArrow { display: inline-block; transition: transform .15s; }
.adv-toggle[aria-expanded="true"] #advArrow { transform: rotate(90deg); }

.adv-panel { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.adv-row label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 2px;
}

.adv-checks { display: flex; flex-direction: column; gap: 12px; }
.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 11.5px;
  color: var(--muted);
}
.check-label > span:nth-of-type(1) { flex: 1; }
.check-label input[type="checkbox"] { accent-color: var(--accent); width: 14px; height: 14px; cursor: pointer; }
.hint-inline { font-family: var(--mono); font-size: 9.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }

/* ─── Output card ────────────────────────────────────────────────────────── */
.output-card { padding: 18px; display: flex; flex-direction: column; gap: 14px; }

.result-row { display: flex; flex-wrap: wrap; gap: 8px; }
.stat {
  display: flex;
  align-items: baseline;
  gap: 7px;
  background: var(--well);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 600;
}

/* A hint that is reporting a problem rather than explaining a control. */
.warn-hint {
  display: flex; align-items: baseline; gap: 10px;
  background: #FFF6F8;
  border: 1px solid #F6D3DC;
  border-radius: 8px;
  padding: 9px 11px;
  color: #9F1239;
}
.warn-hint .mini-btn { flex: none; }

/* Rip-from-URL row: the third way a song gets in, alongside a dropped file and
   a picked folder. */
.rip-row { margin-top: 12px; }
.rip-input { display: flex; gap: 7px; }
.rip-input input[type="url"] {
  flex: 1; min-width: 0;
  background: var(--well);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 9px 11px;
}
.rip-input input[type="url"]:focus { outline: none; border-color: var(--accent); background: var(--card); }
.rip-input input[type="url"]::placeholder { color: var(--faint); }
.rip-input input[type="url"]:disabled { opacity: .55; cursor: not-allowed; }
.rip-progress { margin-top: 10px; }
.rip-progress-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-top: 6px;
  font-family: var(--mono); font-size: 10.5px; color: var(--muted);
}

/* Background video picker. */
.video-row { display: flex; align-items: center; gap: 7px; }
.video-name {
  flex: 1; min-width: 0;
  font-family: var(--mono); font-size: 11px; color: var(--text);
  background: var(--well);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 9px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.video-name.empty { color: var(--faint); }

/* Song info: two fields that are expected to be corrected by hand, so they read
   as inputs rather than as a readout. */
.meta-fields { display: flex; flex-direction: column; gap: 12px; }
/* Tighter than the 8px the label class carries by default: these labels sit on
   their own field rather than heading a whole group. */
.meta-field .field-label { margin-bottom: 4px; }
.meta-fields input[type="text"] {
  width: 100%;
  background: var(--well);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 9px 11px;
}
.meta-fields input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--card);
}
.meta-fields input[type="text"]::placeholder { color: var(--faint); }

/* The picked-region row in the sync panel. */
.sel-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sel-row .field-label { margin-bottom: 0; }
.sel-row .adv-val { flex: 1; }

/* Song-folder entry point, and the report of what a merge did to it. */
.folder-row { margin-top: 12px; }
.folder-row .btn-ghost { width: 100%; }
.folder-row .hint { margin-top: 8px; }
.folder-row code {
  font-family: var(--mono); font-size: 10.5px;
  background: var(--accent-soft); padding: 1px 4px; border-radius: 3px;
}

.file-chip.folder { align-items: flex-start; }
.folder-chip-body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.folder-chip-files {
  font-family: var(--mono); font-size: 10px; color: var(--faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.merge-summary {
  margin-top: 12px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 8px;
  font-size: 11.5px; line-height: 1.65; color: var(--muted);
}
.merge-summary b { color: var(--text); font-weight: 600; }
.merge-summary .row { display: flex; gap: 8px; }
/* A stack writes several charts, listed one per line. Without this the newlines
   between them collapse and seven charts render as one run-on sentence. */
.merge-summary .row > span:not(.k) { white-space: pre-line; }
.merge-summary .row .k {
  font-family: var(--mono); font-size: 9.5px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--faint); min-width: 74px; padding-top: 2px;
}
.merge-summary .warn { color: var(--l); }
.merge-summary .done { color: var(--text); font-weight: 600; }

.stat .k {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.progress-track { height: 3px; background: #EDEDF3; border-radius: 99px; overflow: hidden; }
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--d), var(--accent));
  border-radius: 99px;
  transition: width .35s ease;
}
#progressLabel { font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-top: 8px; }

.result-actions { display: flex; gap: 8px; }

/* ─── Advanced: the chart-stack modal ──────────────────────────────────────── */

/* The label carries a right-aligned link, so it has to be a flex row rather than
   the plain block the other option labels are. */
#singleChartForm .opt-group > label:has(.link-btn),
#stackSummaryGroup > label {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.btn-row-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* The page's primary/ghost buttons are full-width block actions. In the modal
   footer they sit side by side, so they size to their text instead. */
.modal-foot .btn-row-inline { flex-wrap: nowrap; flex: none; }
.modal-foot .btn-primary,
.modal-foot .btn-ghost { width: auto; min-width: 0; padding: 0 18px; height: 38px; font-size: 13px; }

/* ─── The summary shown on the card once a stack is in use ──────────────────── */

.stack-summary {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stack-summary li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 11px;
  font-size: 12.5px;
  border-bottom: 1px solid var(--line);
  background: var(--well);
}
.stack-summary li:last-child { border-bottom: none; }
.stack-summary .slot {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  min-width: 74px;
}
.stack-summary .meter {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  min-width: 20px;
  text-align: right;
}
.stack-summary .what { color: var(--muted); }

/* ─── Modal shell ───────────────────────────────────────────────────────────── */

.modal {
  width: min(760px, calc(100vw - 32px));
  max-height: min(86vh, 900px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--text);
  box-shadow: 0 24px 60px rgba(23, 23, 31, .18);
  /* A dialog is display:none until open, so the flex column only applies then —
     otherwise it would override that and the modal would never be hidden. */
  overflow: hidden;
}
.modal[open] { display: flex; flex-direction: column; }
/* The UA centres a modal dialog with `margin: auto`, which the flex display
   above does not carry over on its own. */
.modal { margin: auto; }
.modal::backdrop { background: rgba(23, 23, 31, .38); backdrop-filter: blur(2px); }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.modal-head h3 { font-size: 15px; font-weight: 600; margin: 0; }

.modal-x {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 14px; line-height: 1;
  padding: 4px 6px; border-radius: 6px;
}
.modal-x:hover { color: var(--text); background: var(--well); }

.modal-body { padding: 4px 18px 18px; overflow-y: auto; flex: 1 1 auto; }

.modal-sec { padding-top: 16px; }
.modal-sec + .modal-sec { margin-top: 8px; border-top: 1px solid var(--line); }
.modal-sec h4 { font-size: 12.5px; font-weight: 600; margin: 0 0 6px; }
.modal-sec .hint { padding: 0; margin: 0 0 12px; }

.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.mini-label {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 12px 0 6px;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
  background: var(--well);
  flex: none;
}
/* A nine-chart summary is longer than the footer is wide. Truncated rather than
   wrapped, so the buttons never move and the table never loses room. */
#stackFootHint {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Multi-select chips ────────────────────────────────────────────────────── */

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  height: 30px;
  padding: 0 11px;
  cursor: pointer;
  transition: border-color .12s, color .12s, background .12s;
}
.chip:hover { border-color: var(--line-hover); color: var(--text); }
.chip[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent) 8%, #fff);
  border-color: var(--accent);
  color: var(--accent);
}

/* Ratings are a dense numeric row, so they get to be square and small. */
.chip-row.ratings .chip { width: 32px; padding: 0; text-align: center; }

.mini-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.mini-btn.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }

/* ─── The stack table ───────────────────────────────────────────────────────── */

.stack-empty {
  padding: 22px 14px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  background: var(--well);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

/* Its own scroller: a wide row must never make the page scroll sideways. */
.stack-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }

.stack-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.stack-table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  padding: 8px 10px;
  background: var(--well);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.stack-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.stack-table tr:last-child td { border-bottom: none; }
.stack-table tr.dupe td { background: #FEF2F2; }

.stack-table select,
.stack-table input[type="number"],
.stack-table input[type="text"] {
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 12px;
  height: 30px;
  padding: 0 7px;
}
.stack-table select:focus,
.stack-table input:focus { outline: none; border-color: var(--accent); }
.stack-table input[type="number"] { width: 62px; }
.stack-table input[type="text"]   { width: 118px; }
.stack-table .cell-opts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.stack-table .row-x {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 13px; line-height: 1;
  padding: 4px 6px; border-radius: 6px;
}
.stack-table .row-x:hover { color: #DC2626; background: #FEF2F2; }

.stack-notes { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.stack-note {
  font-size: 12px;
  line-height: 1.45;
  padding: 8px 11px;
  border-radius: 8px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--text);
}
.stack-note.warn { border-color: #FBD5A5; background: #FFFBEB; }
.stack-note.error { border-color: #FCA5A5; background: #FEF2F2; }

/* ─── Account chip in a page header ─────────────────────────────────────────── */

.acct-chip { display: flex; align-items: center; gap: 12px; }

.acct-credits {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 99px;
  padding: 4px 11px;
  text-decoration: none;
  white-space: nowrap;
}
.acct-credits:hover { border-color: var(--accent); }
.acct-credits.empty { color: #B45309; background: #FFFBEB; border-color: #FBD5A5; }

.acct-email { font-size: 12px; color: var(--muted); text-decoration: none; max-width: 190px;
              overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-email:hover { color: var(--text); }

.acct-admin {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line-strong); border-radius: 6px;
  padding: 3px 8px; text-decoration: none;
}
.acct-admin:hover { color: var(--text); border-color: var(--line-hover); }

.acct-out, .acct-link {
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: var(--sans); font-size: 12px; color: var(--faint);
  text-decoration: underline; text-underline-offset: 3px;
}
.acct-out:hover, .acct-link:hover { color: var(--text); }

/* ─── Standalone pages (sign in, account, admin, landing) ───────────────────── */

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 72px;
}
.page.narrow { max-width: 440px; }

.page-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0 26px;
}
.page-head .brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: inherit; }
.page-head .brand strong { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.page-head .brand span {
  font-family: var(--mono); font-size: 9px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
}

.page h1 { font-size: 25px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 8px; }
.page h2 { font-size: 15px; font-weight: 600; margin: 0 0 12px; }
.page .lede { font-size: 14.5px; line-height: 1.6; color: var(--muted); margin: 0 0 26px; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 18px;
}
.panel > h2 { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }

/* ─── Forms ─────────────────────────────────────────────────────────────────── */

.field { margin-bottom: 15px; }
.field label {
  display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.field input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  height: 42px;
  padding: 0 12px;
}
.field input:focus { outline: none; border-color: var(--accent); }
.field .help { font-size: 12px; color: var(--faint); margin: 6px 0 0; line-height: 1.5; }

.form-note {
  font-size: 13px; line-height: 1.55; padding: 10px 13px; border-radius: 9px; margin: 0 0 16px;
}
.form-note.error   { background: #FEF2F2; border: 1px solid #FCA5A5; color: #991B1B; }
.form-note.ok      { background: var(--success-bg); border: 1px solid var(--success-line); color: var(--success); }
.form-note.info    { background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--text); }
.form-note.warn    { background: #FFFBEB; border: 1px solid #FBD5A5; color: #92400E; }

.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.form-actions .btn-primary { width: auto; padding: 0 20px; height: 42px; }

.alt-action { font-size: 13px; color: var(--muted); margin: 18px 0 0; text-align: center; }
.alt-action a { font-weight: 600; }

/* ─── Stat tiles ────────────────────────────────────────────────────────────── */

.tile {
  background: var(--well);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.tile .k {
  font-family: var(--mono); font-size: 9px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 7px;
}
.tile .v { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.tile .v.sm { font-size: 15px; font-weight: 600; }
.tile .sub { font-size: 11.5px; color: var(--faint); margin-top: 4px; }
.tile.accent { background: var(--accent-soft); border-color: var(--accent-line); }
.tile.accent .v { color: var(--accent); }
.tile.warn { background: #FFFBEB; border-color: #FBD5A5; }

/* ─── Data tables ───────────────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.data th {
  text-align: left; font-family: var(--mono); font-size: 8.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); font-weight: 500;
  padding: 8px 11px; background: var(--well); border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 8px 11px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: var(--well); }
table.data td.num { text-align: right; font-family: var(--mono); font-size: 11.5px; white-space: nowrap; }
table.data td.pos { color: var(--success); }
table.data td.neg { color: var(--l); }
table.data td.mono { font-family: var(--mono); font-size: 11px; color: var(--muted); }
table.data .empty-row { text-align: center; color: var(--muted); padding: 22px; }

.pill {
  display: inline-block; font-family: var(--mono); font-size: 9px; letter-spacing: .09em;
  text-transform: uppercase; padding: 2px 7px; border-radius: 5px;
  border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap;
}
.pill.ok      { color: var(--success); background: var(--success-bg); border-color: var(--success-line); }
.pill.bad     { color: #991B1B; background: #FEF2F2; border-color: #FCA5A5; }
.pill.warn    { color: #92400E; background: #FFFBEB; border-color: #FBD5A5; }
.pill.accent  { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }

/* ─── Credit packs ──────────────────────────────────────────────────────────── */

.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.pack {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 17px;
  text-align: left;
  background: var(--card);
  cursor: pointer;
  transition: border-color .12s, box-shadow .12s;
}
.pack:hover:not(:disabled) { border-color: var(--accent); box-shadow: 0 2px 10px rgba(124,58,237,.09); }
.pack:disabled { opacity: .55; cursor: not-allowed; }
.pack .name {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted);
}
.pack .price { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 7px 0 2px; }
.pack .credits { font-size: 13px; color: var(--text); font-weight: 600; }
.pack .charts { font-size: 11.5px; color: var(--faint); margin-top: 5px; }
.pack .bonus {
  display: inline-block; margin-top: 8px; font-family: var(--mono); font-size: 9px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--success);
  background: var(--success-bg); border: 1px solid var(--success-line);
  border-radius: 5px; padding: 2px 6px;
}

/* ─── Tabs ──────────────────────────────────────────────────────────────────── */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.tab {
  background: none; border: none; cursor: pointer;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); padding: 10px 13px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ─── Landing ───────────────────────────────────────────────────────────────── */

.hero { padding: 46px 0 34px; max-width: 660px; }
.hero h1 { font-size: 40px; line-height: 1.1; letter-spacing: -.03em; margin-bottom: 16px; }
.hero p { font-size: 16px; line-height: 1.65; color: var(--muted); margin: 0 0 26px; }
.hero .cta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hero .cta .btn-primary { width: auto; padding: 0 24px; height: 46px; font-size: 14.5px; }
.hero .cta .btn-ghost { width: auto; padding: 0 20px; height: 46px; font-size: 14px; }

.feature h3 { font-size: 14px; font-weight: 600; margin: 0 0 7px; }
.feature p { font-size: 13.5px; line-height: 1.6; color: var(--muted); margin: 0; }
.feature .icon {
  width: 30px; height: 30px; border-radius: 8px; margin-bottom: 11px;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}

.page-foot {
  border-top: 1px solid var(--line); margin-top: 40px; padding-top: 20px;
  font-size: 12px; color: var(--faint); display: flex; gap: 16px; flex-wrap: wrap;
}

@media (max-width: 640px) {
  .hero h1 { font-size: 30px; }
  .page-head { flex-wrap: wrap; }
}

/* --- Header right side + sign-in notice on the app page ------------------- */

.head-right { display: flex; align-items: center; gap: 16px; }

.auth-notice {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  flex-wrap: wrap;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 20px;
}
.auth-notice strong { font-size: 14px; display: block; margin-bottom: 4px; }
.auth-notice p { font-size: 13px; line-height: 1.55; color: var(--muted); margin: 0; max-width: 60ch; }
.auth-notice-actions { display: flex; gap: 8px; flex-shrink: 0; }
.auth-notice-actions .btn-primary,
.auth-notice-actions .btn-ghost {
  width: auto; padding: 0 18px; height: 38px; font-size: 13px;
  display: inline-flex; align-items: center; text-decoration: none;
}

/* --- Folder inventory modal ------------------------------------------------ */

.file-list { list-style: none; margin: 0; padding: 0; }
.file-list li {
  display: flex; align-items: baseline; gap: 10px;
  padding: 6px 0; font-size: 12.5px;
  border-bottom: 1px solid var(--line);
}
.file-list li:last-child { border-bottom: none; }
.file-list .kind {
  font-family: var(--mono); font-size: 9px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); min-width: 74px;
}
.file-list .fname { color: var(--text); word-break: break-all; }
.file-list .note { color: var(--faint); font-size: 11.5px; margin-left: auto; white-space: nowrap; }
.file-list li.muted .fname { color: var(--muted); }

.mono-inline { font-family: var(--mono); font-size: 11.5px; }

.kv-grid { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 12.5px; }
.kv-grid dt {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); padding-top: 2px;
}
.kv-grid dd { margin: 0; word-break: break-word; }
.kv-grid dd.empty { color: var(--faint); font-style: italic; }

.consequence-list { list-style: none; margin: 0; padding: 0; }
.consequence-list li {
  position: relative; padding: 5px 0 5px 22px;
  font-size: 12.5px; line-height: 1.55; color: var(--text);
}
.consequence-list li::before {
  content: '→'; position: absolute; left: 4px; top: 5px;
  color: var(--muted); font-size: 12px;
}
.consequence-list li.keep::before   { content: '✓'; color: var(--success); }
.consequence-list li.change::before { content: '↻'; color: var(--accent); }
.consequence-list li.gone::before   { content: '✕'; color: var(--l); }

.fate {
  display: inline-block; font-family: var(--mono); font-size: 9px;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 5px; white-space: nowrap;
  border: 1px solid var(--line-strong); color: var(--muted);
}
.fate.kept     { color: var(--success); background: var(--success-bg); border-color: var(--success-line); }
.fate.replaced { color: var(--accent);  background: var(--accent-soft); border-color: var(--accent-line); }
.fate.blocked  { color: #991B1B; background: #FEF2F2; border-color: #FCA5A5; }

/* --- Deleting charts from the folder dialog -------------------------------- */

.btn-danger {
  background: #DC2626;
  border: 1px solid #DC2626;
  border-radius: 9px;
  color: #fff;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  height: 38px;
  padding: 0 18px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-danger:hover:not(:disabled) { background: #B91C1C; border-color: #B91C1C; }
.btn-danger:disabled { opacity: .5; cursor: not-allowed; }

/* A row on its way out reads as struck through rather than merely ticked, so
   the consequence is visible without reading the footer. */
.stack-table tr.removing td { background: #FEF2F2; }
.stack-table tr.removing td:not(:first-child) { text-decoration: line-through; color: var(--muted); }
.stack-table tr.removing .fate { opacity: .45; }

.warn-text { color: #B45309; }


/* --- Editable song info in the folder dialog ------------------------------- */

.tag-form { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: center; }
.tag-form label {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.tag-form input[type="text"],
.tag-form select {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  height: 34px;
  padding: 0 10px;
}
.tag-form input:focus, .tag-form select:focus { outline: none; border-color: var(--accent); }
/* An edited field is marked, so what is about to change is visible without
   remembering what was there before. */
.tag-form input.dirty, .tag-form select.dirty {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 4%, #fff);
}
.tag-form .readonly {
  font-size: 12.5px; color: var(--muted); font-family: var(--mono);
}


/* --- Choosing artwork from a rip's thumbnails ------------------------------ */

.art-group { margin-top: 14px; }
.art-group > label {
  display: block; font-family: var(--mono); font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}

.thumb-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }

.thumb {
  flex: none;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: var(--well);
  line-height: 0;
  transition: border-color .12s;
}
.thumb img { width: 132px; height: 74px; object-fit: cover; display: block; }
.thumb:hover { border-color: var(--line-hover); }
.thumb[aria-pressed="true"] { border-color: var(--accent); }
.thumb.busy { opacity: .5; cursor: progress; }

/* What was actually produced, once one is chosen — the crop, not the source. */
.art-preview {
  display: flex; align-items: center; gap: 12px;
  margin-top: 10px; padding: 10px;
  background: var(--well); border: 1px solid var(--line); border-radius: var(--radius);
}
.art-preview img {
  width: 192px; height: 60px; object-fit: cover;
  border: 1px solid var(--line-strong); border-radius: 5px; display: block;
}
.art-preview .meta { font-size: 12px; color: var(--muted); line-height: 1.5; }
.art-preview .meta strong { color: var(--text); display: block; font-size: 12.5px; }


/* --- Banner crop editor ---------------------------------------------------- */

.banner-slot {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--well);
  overflow: hidden;
  min-height: 52px;
  display: flex; align-items: center; justify-content: center;
}
.banner-slot img { width: 100%; display: block; aspect-ratio: 512 / 160; object-fit: cover; }
.banner-empty { font-size: 12px; color: var(--faint); padding: 16px 12px; text-align: center; }

/* A checkerboard behind the crop window, so a transparent PNG reads as
   transparent rather than as white. */
.crop-stage {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: #FAFAFC;
  background-image:
    linear-gradient(45deg, #EDEDF3 25%, transparent 25%, transparent 75%, #EDEDF3 75%),
    linear-gradient(45deg, #EDEDF3 25%, transparent 25%, transparent 75%, #EDEDF3 75%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
}
#bannerCanvas {
  display: block; width: 100%; height: auto;
  cursor: grab; touch-action: none;
}
#bannerCanvas.grabbing { cursor: grabbing; }

.crop-controls { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.crop-controls label {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.crop-controls input[type="range"] { flex: 1; }
.crop-zoom-value {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  min-width: 48px; text-align: right;
}


/* --- Where a stepfile came from -------------------------------------------- */

.source-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.source-row a {
  font-family: var(--mono); font-size: 11.5px; word-break: break-all;
  flex: 1; min-width: 200px;
}

.file-comments { margin-top: 12px; }
.file-comments div {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  padding: 3px 0; word-break: break-all;
}


/* --- Songs this account has ripped before ---------------------------------- */

.recent-songs { margin-top: 12px; }
.recent-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.recent-head .link-btn { margin-left: 0; font-size: 10px; letter-spacing: 0; }

.recent-songs ul { list-style: none; margin: 0; padding: 0; }
.recent-songs li {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 0; border-bottom: 1px solid var(--line);
}
.recent-songs li:last-child { border-bottom: none; }
.recent-songs .pick {
  flex: 1; text-align: left; background: none; border: none; cursor: pointer;
  font-family: var(--sans); font-size: 12.5px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 0;
}
.recent-songs .pick:hover { color: var(--accent); }
.recent-songs .when {
  font-family: var(--mono); font-size: 10px; color: var(--faint); white-space: nowrap;
}
.recent-songs .made {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--success); background: var(--success-bg); border: 1px solid var(--success-line);
  border-radius: 4px; padding: 1px 5px; white-space: nowrap;
}

/* The account page's fuller list. */
.song-row-actions { display: flex; gap: 6px; }
