/* ─── Fonts ─────────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&family=Instrument+Serif:ital@0;1&display=swap');

/* ─── Design tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Dark: near-black, warm. Not #000. */
  --bg:        #0b0b0d;
  --bg-2:      #101013;
  --panel:     #131318;
  --panel-2:   #191921;
  --hairline:  rgba(255,255,255,0.06);
  --hairline-strong: rgba(255,255,255,0.10);
  --row-hover: rgba(255,255,255,0.035);
  --text:      #ececed;
  --text-dim:  #a0a0a8;
  --muted:     #6c6c78;
  --accent:    #6cc38a;
  --accent-2:  #e9d089;
  --danger:    #e88168;
  --excluded:  #e88168;
  --love:      #e37aa0;

  --shadow-1: 0 1px 2px rgba(0,0,0,0.35), 0 8px 24px -8px rgba(0,0,0,0.5);
  --shadow-2: 0 2px 6px rgba(0,0,0,0.4),  0 24px 64px -16px rgba(0,0,0,0.6);

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 22px;
  --r-2xl: 28px;
  --r-full: 999px;

  --ease-out: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 160ms;
  --dur-med:  260ms;
  --dur-slow: 520ms;

  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

:root[data-theme="light"] {
  --bg:        #f6f2ea;
  --bg-2:      #efeadf;
  --panel:     #fbf7ef;
  --panel-2:   #f0eadd;
  --hairline:  rgba(30,20,10,0.08);
  --hairline-strong: rgba(30,20,10,0.14);
  --row-hover: rgba(30,20,10,0.03);
  --text:      #1a1610;
  --text-dim:  #4e463a;
  --muted:     #857b6a;
  --accent:    #2f7a4e;
  --accent-2:  #a97d1c;
  --danger:    #a8452e;
  --excluded:  #a8452e;
  --love:      #b83f6e;
  --shadow-1: 0 1px 2px rgba(60,40,20,0.06), 0 12px 28px -12px rgba(60,40,20,0.14);
  --shadow-2: 0 2px 4px rgba(60,40,20,0.08), 0 32px 72px -20px rgba(60,40,20,0.22);
}

/* ─── Reset & base ─────────────────────────────────────────────────────────── */
* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }

/* The `hidden` attribute must always win. Author `display` rules (.overlay,
   #bulk-bar, button) otherwise override the UA's [hidden]{display:none} and
   the element stays on screen — which silently pinned the generator modal open. */
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--bg); }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  font-feature-settings: 'ss01', 'ss02', 'cv01';
  transition: background var(--dur-med) var(--ease-out), color var(--dur-med) var(--ease-out);
}

/* Ambient glow — dark only */
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(1200px 800px at 85% -10%, rgba(108, 195, 138, 0.06), transparent 60%),
    radial-gradient(900px 600px at -10% 90%, rgba(233, 208, 137, 0.04), transparent 60%);
  pointer-events: none;
  z-index: 0;
  transition: opacity var(--dur-med) var(--ease-out);
}
:root[data-theme="light"] body::before { opacity: 0; }

/* Film grain overlay */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
:root[data-theme="light"] body::after { opacity: 0.05; mix-blend-mode: multiply; }

/* ─── Layout ───────────────────────────────────────────────────────────────── */
header, .controls, main, #bulk-bar, #refresh-log { position: relative; z-index: 1; }

header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 32px 18px;
  border-bottom: 1px solid var(--hairline);
}

h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.015em;
  line-height: 1;
}

.status {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  padding-top: 4px;
}

#btn-theme {
  margin-left: auto;
  width: 34px; height: 34px;
  border-radius: var(--r-full);
  background: var(--panel);
  border: 1px solid var(--hairline);
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
#btn-theme:hover { color: var(--text); border-color: var(--hairline-strong); transform: rotate(30deg); }
#btn-theme:active { transform: rotate(30deg) scale(0.94); }

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.actions, .filters, .tree-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ─── Buttons ──────────────────────────────────────────────────────────────── */
button, .btn {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 8px 14px;
  cursor: pointer;
  transition:
    background var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
button:hover, .btn:hover { background: var(--panel-2); border-color: var(--hairline-strong); }
button:active, .btn:active { transform: scale(0.98); }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
button.ghost { background: transparent; color: var(--text-dim); }
button.ghost:hover { color: var(--text); background: var(--row-hover); }
button.small { padding: 5px 10px; font-size: 11.5px; border-radius: var(--r-sm); }

/* Primary CTA — Generate */
#btn-generate {
  background: var(--accent);
  color: var(--bg);
  border-color: transparent;
  padding: 8px 8px 8px 18px;
  border-radius: var(--r-full);
  font-weight: 600;
  gap: 10px;
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255,255,255,0.18);
}
#btn-generate::after {
  content: "→";
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: var(--r-full);
  background: rgba(0,0,0,0.15);
  font-size: 13px;
  transition: transform var(--dur-fast) var(--ease-out);
}
#btn-generate:hover { background: var(--accent); filter: brightness(1.08); border-color: transparent; }
#btn-generate:hover::after { transform: translateX(2px) translateY(-1px); }

/* ─── Inputs ────────────────────────────────────────────────────────────────── */
input[type="search"], input[type="text"], select {
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 8px 12px;
  min-width: 240px;
  transition: border-color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}
input[type="search"]:focus, input[type="text"]:focus, select:focus {
  outline: none;
  border-color: var(--hairline-strong);
  background: var(--panel-2);
}
input::placeholder { color: var(--muted); }

select {
  min-width: 130px;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4 L6 8 L10 4' fill='none' stroke='%236c6c78' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

/* ─── Bulk bar ─────────────────────────────────────────────────────────────── */
#bulk-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 32px;
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in oklab, var(--accent) 6%, transparent);
}
#bulk-count { font-size: 12px; color: var(--text-dim); font-family: var(--font-mono); }
#btn-bulk-exclude { border-color: var(--danger); color: var(--danger); background: transparent; }
#btn-bulk-exclude:hover { background: color-mix(in oklab, var(--danger) 10%, transparent); }
#btn-bulk-restore { border-color: var(--accent); color: var(--accent); background: transparent; }
#btn-bulk-restore:hover { background: color-mix(in oklab, var(--accent) 10%, transparent); }

/* ─── Refresh log ──────────────────────────────────────────────────────────── */
#refresh-log {
  padding: 12px 32px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
  background: var(--panel);
  border-bottom: 1px solid var(--hairline);
  white-space: pre-wrap;
  line-height: 1.6;
}

/* ─── Library tree ─────────────────────────────────────────────────────────── */
main { padding: 12px 24px 80px; }
.tree { display: flex; flex-direction: column; }
.empty { padding: 40px; text-align: center; color: var(--muted); font-style: italic; }

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--r-md);
  transition: background var(--dur-fast) var(--ease-out);
  cursor: pointer;
}
.row:hover { background: var(--row-hover); }

.row.artist {
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  margin-top: 2px;
}
.row.artist .toggle {
  width: 14px; height: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: transform var(--dur-fast) var(--ease-out);
}
.row.artist.expanded .toggle { transform: rotate(90deg); }
.row.artist .pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--hairline);
  padding: 2px 8px;
  border-radius: var(--r-full);
  letter-spacing: 0.02em;
}

.row.album {
  padding: 8px 16px 8px 44px;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
  border-radius: var(--r-md);
}
.row.album.excluded { opacity: 0.35; text-decoration: line-through; }
.row.album .cover {
  width: 32px; height: 32px;
  object-fit: cover;
  border-radius: var(--r-sm);
  background: var(--panel-2);
}
.row.album .name { color: var(--text); }
.row.album .meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
  margin-left: auto;
}

.kids { display: flex; flex-direction: column; }
.kids[hidden] { display: none; }

/* ─── Generator modal ──────────────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: color-mix(in oklab, var(--bg) 60%, transparent);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  z-index: 50;
  display: grid;
  place-items: start center;
  padding: 40px 20px;
  overflow-y: auto;
  animation: overlay-in var(--dur-med) var(--ease-out);
}
@keyframes overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Double-bezel: outer shell + inner core */
.gen-panel {
  width: 100%;
  max-width: 920px;
  background: var(--panel);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-2);
  padding: 6px;
  border: 1px solid var(--hairline);
  animation: panel-in var(--dur-slow) var(--ease-spring);
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(24px) scale(0.98); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

.gen-header {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 34px 44px 20px;
  border-bottom: 1px solid var(--hairline);
}
.gen-header .eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--muted);
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-full);
  align-self: center;
}
#gen-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 44px;
  letter-spacing: -0.02em;
  line-height: 1;
  text-wrap: balance;
}
#gen-title em { font-style: italic; color: var(--text-dim); }
.gen-header #btn-gen-close { margin-left: auto; align-self: center; }

.gen-form {
  display: flex; flex-direction: column;
  gap: 26px;
  padding: 28px 44px 32px;
  background: var(--bg-2);
  border-radius: calc(var(--r-2xl) - 6px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
:root[data-theme="light"] .gen-form { box-shadow: inset 0 1px 0 rgba(255,255,255,0.7); }

.gen-row { display: grid; grid-template-columns: 130px 1fr; gap: 20px; align-items: start; }
.gen-row > label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  padding-top: 10px;
}
.gen-row[hidden] { display: none; }

.gen-options { display: flex; flex-wrap: wrap; gap: 6px; }
.gen-options button {
  background: var(--panel);
  border: 1px solid var(--hairline);
  padding: 8px 14px;
  border-radius: var(--r-md);
  color: var(--text-dim);
  font-weight: 500;
  min-width: 56px;
  justify-content: center;
}
.gen-options button.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.gen-options button:hover:not(.active) { color: var(--text); border-color: var(--hairline-strong); }

/* Vibe grid */
.gen-vibes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.gen-vibes button {
  display: flex; flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  text-align: left;
  min-height: 76px;
  color: var(--text-dim);
  transition:
    background var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}
.gen-vibes button:hover { background: var(--panel-2); border-color: var(--hairline-strong); color: var(--text); }
.gen-vibes button.active {
  background: color-mix(in oklab, var(--accent) 8%, var(--panel));
  border-color: color-mix(in oklab, var(--accent) 45%, var(--hairline));
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05),
              0 0 0 1px color-mix(in oklab, var(--accent) 30%, transparent);
}
.gen-vibes .v-label { font-family: var(--font-serif); font-size: 17px; letter-spacing: -0.01em; line-height: 1.1; }
.gen-vibes .v-desc { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.gen-vibes button.active .v-desc { color: var(--text-dim); }

/* Seed picker */
.gen-seed { display: flex; flex-direction: column; gap: 10px; width: 100%; }
#gen-seed-search {
  min-width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  border-radius: var(--r-md);
}
.gen-seed-results {
  display: flex; flex-direction: column; gap: 2px;
  max-height: 280px; overflow-y: auto;
  padding: 4px;
  background: var(--bg);
  border-radius: var(--r-md);
  border: 1px solid var(--hairline);
}
.gen-seed-results:empty { display: none; }
.seed-result {
  display: flex; gap: 12px; align-items: center;
  background: transparent; color: var(--text);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  padding: 8px 10px; cursor: pointer; text-align: left; width: 100%;
  font-family: var(--font-sans);
  transition: background var(--dur-fast) var(--ease-out);
}
.seed-result:hover { background: var(--row-hover); border-color: var(--hairline); }
.seed-result img, .seed-result .cover-blank {
  width: 44px; height: 44px; object-fit: cover;
  border-radius: var(--r-sm); background: var(--panel-2);
}
.seed-result .name { font-weight: 500; font-size: 13px; letter-spacing: -0.005em; }
.seed-result .artist { color: var(--muted); font-size: 11.5px; font-family: var(--font-mono); }

.seed-card {
  display: flex; gap: 16px; align-items: center;
  background: var(--panel);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-1);
}
.seed-card img { width: 60px; height: 60px; object-fit: cover; border-radius: var(--r-sm); }
.seed-card .seed-meta { flex: 1; min-width: 0; }
.seed-card .name { font-family: var(--font-serif); font-size: 22px; letter-spacing: -0.015em; line-height: 1.15; }
.seed-card .artist { color: var(--text-dim); font-size: 12px; font-family: var(--font-mono); margin-top: 4px; }

/* Go row */
.gen-go {
  display: flex; align-items: center; gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
}
.gen-go > label { display: none; }
#btn-gen-run {
  background: var(--text);
  color: var(--bg);
  border-color: transparent;
  padding: 10px 10px 10px 22px;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 13px;
  gap: 12px;
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255,255,255,0.12);
  transition: filter var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
#btn-gen-run::after {
  content: "▶";
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  border-radius: var(--r-full);
  background: color-mix(in oklab, var(--bg) 20%, transparent);
  font-size: 9px;
  transition: transform var(--dur-fast) var(--ease-out);
}
#btn-gen-run:hover { filter: brightness(1.08); }
#btn-gen-run:hover::after { transform: translateX(2px) scale(1.08); }
#gen-status { color: var(--text-dim); font-family: var(--font-mono); font-size: 11.5px; }

/* ─── Sequence output ─────────────────────────────────────────────────────── */
.gen-output { padding: 32px 44px 40px; }
.gen-output h3 {
  margin: 0 0 24px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 34px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.gen-output h3 em { color: var(--text-dim); font-style: italic; }

.seq-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 6px;
}
.seq-head h3 { margin: 0; }
.seq-head #btn-seq-regen { margin-left: auto; align-self: center; }

.seq-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  min-height: 17px;
  margin-bottom: 16px;
}
.seq-note.error { color: var(--danger); }

/* Row leaving on a swap */
.seq-item.swapping {
  opacity: 0.4;
  transform: scale(0.99);
}
/* Row arriving from a swap — brief accent pulse so the eye catches it */
.seq-item.just-swapped {
  animation: swapped-in var(--dur-slow) var(--ease-spring) both;
}
@keyframes swapped-in {
  0%   { opacity: 0; transform: translateY(-8px); border-color: var(--accent-2); }
  60%  { border-color: var(--accent-2); }
  100% { opacity: 1; transform: none; border-color: var(--hairline); }
}

.seq-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.seq-item {
  display: grid;
  grid-template-columns: 32px 68px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
  animation: seq-in var(--dur-slow) var(--ease-spring) both;
}
.seq-item:hover { border-color: var(--hairline-strong); }
.seq-item:nth-child(1)  { animation-delay: 40ms; }
.seq-item:nth-child(2)  { animation-delay: 90ms; }
.seq-item:nth-child(3)  { animation-delay: 140ms; }
.seq-item:nth-child(4)  { animation-delay: 190ms; }
.seq-item:nth-child(5)  { animation-delay: 240ms; }
.seq-item:nth-child(6)  { animation-delay: 290ms; }
.seq-item:nth-child(7)  { animation-delay: 340ms; }
.seq-item:nth-child(8)  { animation-delay: 390ms; }
.seq-item:nth-child(9)  { animation-delay: 440ms; }
.seq-item:nth-child(n+10) { animation-delay: 490ms; }
@keyframes seq-in {
  from { opacity: 0; transform: translateY(20px); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
.seq-item.excluded-row { opacity: 0.35; }

.seq-item .pos {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-align: right;
}
.seq-item .cover {
  width: 68px; height: 68px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--panel-2);
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
}
.seq-item .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.seq-item .info { min-width: 0; }
.seq-item .info .name {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: -0.012em;
  line-height: 1.15;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.seq-item .info .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: -0.005em;
  font-variant-numeric: tabular-nums;
}

.seq-item .feedback { display: flex; gap: 4px; align-items: center; }
.seq-item .fb {
  background: transparent; color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: var(--r-full);
  width: 32px; height: 32px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.seq-item .fb:hover { color: var(--text); border-color: var(--hairline-strong); transform: translateY(-1px); }
.seq-item .fb:active { transform: scale(0.94); }
.seq-item .fb.love:hover { color: var(--love); border-color: color-mix(in oklab, var(--love) 40%, transparent); }
.seq-item .fb.love.done { color: var(--love); border-color: color-mix(in oklab, var(--love) 55%, transparent); background: color-mix(in oklab, var(--love) 10%, transparent); }
.seq-item .fb.exclude:hover { color: var(--excluded); border-color: color-mix(in oklab, var(--excluded) 40%, transparent); }
.seq-item .fb.replace:hover { color: var(--accent-2); border-color: color-mix(in oklab, var(--accent-2) 45%, transparent); }
.seq-item .fb.spotify-link:hover { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 45%, transparent); }

/* ─── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 780px) {
  header { padding: 16px 20px 12px; gap: 12px; }
  .controls { padding: 12px 20px; }
  main { padding: 8px 12px 60px; }
  .gen-header { padding: 24px 22px 16px; }
  .gen-form { padding: 22px; }
  .gen-output { padding: 24px 22px 30px; }
  #gen-title { font-size: 30px; }
  .gen-row { grid-template-columns: 1fr; gap: 10px; }
  .gen-row > label { padding-top: 0; }
  .gen-vibes { grid-template-columns: 1fr; }
  .seq-item { grid-template-columns: 24px 56px 1fr; gap: 12px; padding: 10px; }
  .seq-item .feedback { grid-column: 1 / -1; justify-content: flex-end; padding-top: 4px; border-top: 1px dashed var(--hairline); }
  .seq-item .info .name { font-size: 17px; }
}
