:root {
  --bg: #121212;
  --panel: #1b1b1b;
  --panel-2: #242424;
  --line: #2e2e2e;
  --text: #f2f2f2;
  --muted: #9a9a9a;
  --accent: #ff5500;
  --accent-soft: #a8481b;
  --wave: #5c5c5c;
  --radius: 6px;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body.has-player { padding-bottom: 64px; }
a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
svg { width: 1em; height: 1em; fill: currentColor; stroke: currentColor; stroke-width: 0; }
.muted { color: var(--muted); }
h1 { font-size: 22px; margin: 8px 0 4px; }
h2 { font-size: 17px; margin: 24px 0 12px; }
h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 22px 0 8px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; height: 52px; padding: 0 24px; background: #0b0b0b; border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: .12em; font-size: 17px; }
.logo.big { font-size: 24px; justify-content: center; margin-bottom: 4px; }
.logo-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 18px; }
.logo-bars i { width: 3px; background: var(--accent); border-radius: 1px; }
.logo-bars i:nth-child(1) { height: 40%; } .logo-bars i:nth-child(2) { height: 75%; } .logo-bars i:nth-child(3) { height: 100%; }
.logo-bars i:nth-child(4) { height: 60%; } .logo-bars i:nth-child(5) { height: 85%; }
.topbar nav { display: flex; gap: 18px; color: var(--muted); font-weight: 600; font-size: 14px; }
.search { flex: 1; max-width: 520px; display: flex; background: var(--panel-2); border-radius: 4px; }
.search input { flex: 1; background: none; border: 0; color: var(--text); padding: 8px 12px; font: inherit; font-size: 14px; outline: none; }
.search button { background: none; border: 0; color: var(--muted); padding: 0 12px; cursor: pointer; }
.search svg { fill: none; stroke-width: 2; width: 18px; height: 18px; }
.top-right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.user-chip { background: var(--panel-2); padding: 5px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; }

/* ---------- buttons / forms ---------- */
.btn { background: var(--text); color: #111; border: 0; border-radius: 4px; padding: 9px 18px; font: inherit; font-weight: 700; cursor: pointer; }
.btn:hover { background: #fff; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-ghost:hover { border-color: #555; }
.btn-ghost.danger:hover { border-color: #c33; color: #f66; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 14px; color: #ddd; }
input:not([type=checkbox]):not([type=range]):not([type=file]), textarea { display: block; width: 100%; margin-top: 6px; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 4px; padding: 9px 11px; font: inherit; font-size: 14px; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
input[type=file] { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
label.check { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.flash { padding: 10px 14px; border-radius: 4px; margin: 0 0 16px; font-size: 14px; }
.flash.ok { background: #16351f; border: 1px solid #22693a; }
.flash.error { background: #3a1616; border: 1px solid #7a2626; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 22px 24px; margin-bottom: 24px; }
.card h2:first-child { margin-top: 0; }

/* ---------- layout ---------- */
.container { max-width: 1240px; margin: 0 auto; padding: 24px; }
.narrow { max-width: 460px; }
.layout { display: grid; grid-template-columns: 220px 1fr; gap: 40px; }
.side { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 150px); overflow: auto; }
.side h3:first-child { margin-top: 22px; }
.side .side-group:first-child h3 { margin-top: 4px; }
.side-link { display: flex; justify-content: space-between; padding: 6px 12px; border-radius: 4px; font-size: 14px; font-weight: 600; color: #ddd; }
.side-link small { color: var(--muted); font-weight: 500; }
.side-link.active { background: var(--text); color: #111; }
.side-link.active small { color: #555; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-cloud a, .tag-pill { background: var(--panel-2); border-radius: 99px; padding: 4px 10px; font-size: 12px; color: #ccc; white-space: nowrap; }
.tag-cloud a:hover, .tag-pill:hover { background: #333; color: #fff; }
.feed-title { margin-top: 0; }
.feed > .muted { margin: 0 0 20px; font-size: 14px; }
.feed > .muted a { color: var(--accent); }
.empty { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; }
.empty a { color: var(--accent); }

/* ---------- mix row ---------- */
.mix { display: grid; grid-template-columns: 160px 1fr; gap: 24px; padding: 20px 0; border-bottom: 1px solid #1f1f1f; }
.cover img, .cover-ph { width: 160px; height: 160px; object-fit: cover; border-radius: 3px; display: block; background: var(--panel-2); }
.cover-ph { display: grid; place-items: center; font-size: 48px; color: #444; }
.mix-body { min-width: 0; display: flex; flex-direction: column; }
.mix-head { display: flex; align-items: flex-start; gap: 12px; }
.play-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--text); color: #111; display: grid; place-items: center; cursor: pointer; font-size: 18px; transition: transform .1s; }
.play-btn:hover { transform: scale(1.06); }
.play-btn.big { width: 60px; height: 60px; font-size: 24px; background: var(--accent); color: #fff; }
.mix.current .play-btn { background: var(--accent); color: #fff; }
.play-btn .i-pause, .pb-play .i-pause { display: none; }
.play-btn.playing .i-play, .pb-play.playing .i-play { display: none; }
.play-btn.playing .i-pause, .pb-play.playing .i-pause { display: block; }
.mix-names { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.artist { color: var(--muted); font-size: 14px; font-weight: 600; }
.title { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mix-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12px; color: var(--muted); }
.wave { position: relative; height: 64px; margin: 14px 0 12px; }
.wave.big { height: 110px; }
.wave canvas { width: 100%; height: 100%; display: block; cursor: pointer; }
.wave-time { position: absolute; right: 0; top: 68%; transform: translateY(-100%); font-size: 11px; background: rgba(0,0,0,.75); padding: 1px 4px; color: #ccc; pointer-events: none; }
.mix-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.like-btn, .icon-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 4px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.like-btn:hover, .icon-btn:hover { border-color: #555; }
.like-btn.on { color: var(--accent); border-color: var(--accent-soft); }
.icon-btn svg { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
a.icon-btn { text-decoration: none; }
.icon-btn.done { color: #4c4; border-color: #4c4; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; min-width: 0; }
.tags a, .tags span { color: var(--muted); }
.tags a:hover { color: var(--accent); }
.tags.big { margin: 16px 0; font-size: 14px; gap: 10px; }
.plays { margin-left: auto; display: inline-flex; gap: 4px; align-items: center; font-size: 12px; color: var(--muted); }
.plays svg { width: 10px; }

/* ---------- mix page hero ---------- */
.hero { position: relative; border-radius: 8px; overflow: hidden; background: linear-gradient(135deg, #3a2a20, #15151c); }
.hero::before { content: ""; position: absolute; inset: -40px; background: var(--cover, none) center/cover; filter: blur(40px) brightness(.45); }
.hero-inner { position: relative; display: flex; gap: 30px; padding: 30px; align-items: stretch; }
.hero-text { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
.hero-cover { width: 300px; height: 300px; object-fit: cover; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.hl { background: rgba(0,0,0,.8); padding: 4px 8px; align-self: flex-start; display: inline-block; }
.hero h1.hl { font-size: 24px; margin: 4px 0 0; }
.mix-detail { padding: 18px 4px; max-width: 900px; }
.description { white-space: pre-wrap; line-height: 1.6; color: #ccc; font-size: 14px; }

/* ---------- bottom player ---------- */
.playerbar { position: fixed; left: 0; right: 0; bottom: 0; height: 56px; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 0 24px; background: #1a1a1a; border-top: 1px solid var(--line); }
.playerbar[hidden] { display: none; }
.pb-controls { display: flex; align-items: center; gap: 6px; }
.pb-controls button { background: none; border: 0; color: var(--text); cursor: pointer; font-size: 18px; padding: 6px; display: grid; place-items: center; }
.pb-controls .pb-play { font-size: 22px; }
.pb-controls button.small { font-size: 11px; font-weight: 700; color: var(--muted); }
.pb-controls button:hover { color: var(--accent); }
.pb-time { font-size: 12px; color: var(--accent); width: 56px; text-align: center; font-variant-numeric: tabular-nums; }
#pb-dur { color: var(--text); }
#pb-seek { flex: 1; accent-color: var(--accent); }
.pb-vol { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.pb-vol svg path:last-child { fill: none; stroke-width: 2; }
.pb-vol input { width: 80px; accent-color: var(--accent); }
.pb-now { display: flex; align-items: center; gap: 10px; width: 260px; min-width: 0; }
.pb-now img { width: 36px; height: 36px; object-fit: cover; }
.pb-now span { display: flex; flex-direction: column; min-width: 0; }
.pb-now small, .pb-now b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-now small { color: var(--muted); font-size: 12px; }
.pb-now b { font-size: 13px; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at top, #2a1608, var(--bg) 60%); }
.login { width: 100%; max-width: 360px; text-align: center; }
.login label { text-align: left; }
.login .btn { width: 100%; margin-top: 6px; background: var(--accent); color: #fff; }

/* ---------- admin ---------- */
.admin-tabs { display: flex; gap: 10px; margin: 6px 0 20px; }
.admin-tabs a { background: var(--panel-2); padding: 6px 14px; border-radius: 99px; font-size: 13px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.cover-drop { position: relative; width: 220px; height: 220px; border: 2px dashed #444; border-radius: 6px; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 13px; overflow: hidden; }
.cover-drop:hover { border-color: var(--accent); }
.cover-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.analyse { font-size: 13px; margin: -6px 0 12px; min-height: 1em; }
.progress { position: relative; height: 22px; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; margin-bottom: 12px; overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.progress span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 8px; border-bottom: 1px solid #222; vertical-align: middle; }
.table .thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 3px; font-size: 18px; }
.table .tags span { white-space: nowrap; }
.table td.actions { text-align: right; white-space: nowrap; }
.actions form { display: inline; margin-left: 4px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input:not([type=checkbox]):not([type=range]):not([type=file]) { display: inline-block; width: 200px; margin: 0; padding: 6px 10px; }
.table .inline-form input:not([type=checkbox]):not([type=range]):not([type=file]) { width: 150px; }
.table .inline-form { flex-wrap: nowrap; }
.badge { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }

/* ---------- desktop: things only phones use ---------- */
.btn-ghost .ico { display: none; }
.btn-ghost .ico { width: 18px; height: 18px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- tablet (and phone) ---------- */
@media (max-width: 900px) {
  .topbar nav { display: none; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .layout > * { min-width: 0; }                      /* let the button rows scroll instead of widening the page */
  .side { position: static; max-height: none; overflow: visible; }
  .side h3 { display: none; }
  .side-group { margin-bottom: 8px; }
  /* Browse / DJs / Tags become rows of buttons you swipe sideways */
  .side-items { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding-bottom: 2px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .side-items::-webkit-scrollbar { display: none; }
  .side-link { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px;
    background: var(--panel-2); font-size: 13px; white-space: nowrap; }
  .tag-cloud a { flex: none; padding: 8px 12px; font-size: 13px; }
  .hero-inner { flex-direction: column-reverse; } .hero-cover { width: 100%; height: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .pb-vol { display: none; }                         /* phones/tablets have volume buttons */
  .pb-now { width: 220px; }
  .playerbar { gap: 10px; padding: 0 16px; }
}

/* ---------- phone ---------- */
@media (max-width: 640px) {
  /* header: logo + buttons, then a full-width search box */
  .topbar { flex-wrap: wrap; height: auto; padding: 8px 12px 10px; gap: 8px; }
  .logo { font-size: 16px; }
  .top-right { gap: 6px; }
  .user-chip { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .btn-ghost.logout { padding: 6px 8px; display: grid; place-items: center; }
  .btn-ghost .ico { display: block; }
  .btn-ghost .btn-text { display: none; }
  .search { order: 3; flex: 1 1 100%; max-width: none; }
  .search input { font-size: 16px; padding: 10px 12px; }   /* 16px: phones don't zoom in when typing */
  .search input::placeholder { font-size: 14px; }

  .container { padding: 14px 12px; }
  .feed-title { font-size: 20px; }
  .feed-bar { margin-bottom: 8px; }
  .sort-form select { font-size: 15px; padding: 7px 8px; }

  /* mix rows: titles get two lines, date + tag go underneath */
  .mix { grid-template-columns: 76px 1fr; gap: 12px; padding: 16px 0; }
  .cover img, .cover-ph { width: 76px; height: 76px; }
  .mix-head { flex-wrap: wrap; gap: 4px 10px; }
  .play-btn { width: 42px; height: 42px; }
  .title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
  .mix-meta { order: 3; flex: 1 1 100%; flex-direction: row; align-items: center; gap: 8px; padding-left: 52px; }
  .wave { height: 52px; margin: 10px 0; }
  .mix-foot { gap: 6px; }
  .mix-foot .tags { display: none; }                 /* tags are one tap away in the Tags row */

  /* mix page */
  .hero-inner { padding: 16px; gap: 16px; }
  .hero h1.hl { font-size: 19px; }
  .play-btn.big { width: 52px; height: 52px; }

  /* player bar: what's playing + buttons on top, a full-width slider with both times below */
  body.has-player { padding-bottom: calc(118px + env(safe-area-inset-bottom)); }
  .playerbar { height: auto; display: grid; grid-template-columns: auto 1fr auto;
    grid-template-areas: "now now controls" "cur seek dur"; align-items: center; gap: 4px 10px;
    padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); }
  .pb-now { grid-area: now; width: auto; min-width: 0; }
  .pb-now img { width: 44px; height: 44px; border-radius: 3px; }
  .pb-now b { font-size: 14px; }
  .pb-controls { grid-area: controls; gap: 0; }
  .pb-controls .small { display: none; }
  .pb-controls button { padding: 8px; font-size: 22px; }
  .pb-controls .pb-play { font-size: 30px; }
  #pb-cur { grid-area: cur; } #pb-dur { grid-area: dur; }
  #pb-seek { grid-area: seek; width: 100%; min-width: 0; }
  .pb-time { width: auto; min-width: 46px; font-size: 12px; }
  .sticky-save { bottom: calc(118px + env(safe-area-inset-bottom)); }

  /* admin pages: wide tables scroll sideways instead of squashing */
  .card { padding: 16px; }
  .table { display: block; overflow-x: auto; white-space: nowrap; }
  .admin-row, .inline-form { flex-wrap: wrap; }
}

/* fingers instead of a mouse: slightly bigger buttons */
@media (pointer: coarse) {
  .like-btn, .icon-btn { padding: 9px 14px; }
  #pb-seek { height: 28px; }
}
}

/* ---------- sorting / dates ---------- */
.feed-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 20px; }
.feed-bar p { margin: 0; }
.sort-form label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--muted); }
.sort-form select { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 4px;
  padding: 6px 8px; font: inherit; font-size: 13px; }
.date-field { position: relative; display: flex; align-items: center; gap: 6px; max-width: 220px; margin-top: 6px; }
.date-field input[name=mix_date] { margin-top: 0 !important; }
.cal-btn { flex: none; display: grid; place-items: center; width: 38px; height: 38px; background: var(--panel-2);
  color: var(--text); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; font-size: 18px; }
.cal-btn:hover { border-color: var(--accent); }
.cal-btn svg { fill: none; stroke-width: 2; stroke-linecap: round; }
.date-picker { position: absolute; right: 0; bottom: 0; width: 38px; height: 38px; opacity: 0; pointer-events: none; color-scheme: dark; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.feed-bar .muted { font-size: 14px; }
.feed-bar .muted a { color: var(--accent); }
.date-field input[type=text] { margin-top: 0 !important; }
.table .date-field { margin-top: 0; }
input.invalid { border-color: #c33 !important; }
small.err { display: block; color: #f66; margin-top: 4px; }
.sticky-save { position: sticky; bottom: 64px; padding: 14px 0 4px; background: linear-gradient(transparent, var(--panel) 40%); }
.admin-row form { display: flex; gap: 8px; align-items: center; }

/* ---------- login page logo ---------- */
.login-logo { display: block; max-width: 260px; max-height: 160px; width: auto; height: auto; margin: 0 auto 10px; object-fit: contain; }
.brand-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.brand-preview { min-width: 200px; padding: 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  display: grid; place-items: center; gap: 4px; }
.brand-preview img { max-width: 220px; max-height: 120px; object-fit: contain; }

/* ---------- stats ---------- */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0 24px; }
.stat-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.stat-tile b { display: block; font-size: 24px; font-weight: 800; }
.stat-tile small { color: var(--muted); font-size: 12px; }
.stat-tile.warn b { color: #f66; }
.pill-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.pill-nav a { background: var(--panel-2); border-radius: 99px; padding: 5px 12px; font-size: 13px; font-weight: 600; color: #ccc; }
.pill-nav a:hover { background: #333; color: #fff; }
.pill-nav a.active { background: var(--text); color: #111; }
.pct-bar { display: inline-block; width: 64px; height: 6px; background: var(--panel-2); border-radius: 3px; vertical-align: middle; margin-right: 6px; overflow: hidden; }
.pct-bar i { display: block; height: 100%; background: var(--accent); }
.badge.fail { background: #7a2626; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--wave); margin-right: 8px; vertical-align: middle; }
.live-dot.on { background: #2ecc71; box-shadow: 0 0 0 0 rgba(46, 204, 113, .6); animation: live 1.6s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(46, 204, 113, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); } }
.stats-mix-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.stats-mix-head h1 { margin: 2px 0; }
.stats-mix-head p { margin: 4px 0 0; }
.thumb.big { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; }
.table a:hover { color: var(--accent); }

/* ---------- equaliser ---------- */
.pb-controls .pb-eq { font-size: 11px; font-weight: 800; letter-spacing: .5px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 3px 6px; margin-left: 4px; }
.pb-controls .pb-eq.on { color: var(--accent); border-color: var(--accent); }
.eq-panel { position: fixed; right: 16px; bottom: 66px; z-index: 30; width: min(460px, calc(100vw - 24px)); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 10px; box-shadow: 0 12px 40px rgba(0,0,0,.55); }
.eq-panel[hidden] { display: none; }
.eq-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.eq-head b { font-size: 15px; }
.eq-x { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; }
.eq-x:hover { color: var(--text); }
.eq-switch { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--muted); }
.eq-switch input { display: none; }
.eq-switch span { width: 34px; height: 18px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line); position: relative; transition: background .15s; }
.eq-switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.eq-switch input:checked + span { background: var(--accent-soft); border-color: var(--accent); }
.eq-switch input:checked + span::after { transform: translateX(16px); background: #fff; }
.eq-switch em { font-style: normal; min-width: 22px; }
.eq-note { margin: 0 0 10px; font-size: 12px; color: #e0b070; }
.eq-row { display: flex; gap: 8px; align-items: center; }
.eq-row select, .eq-row input[type=text] { flex: 1; min-width: 0; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 5px; padding: 6px 8px; font: inherit; font-size: 13px; }
.eq-btn { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 5px; padding: 6px 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.eq-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.eq-btn:disabled { opacity: .4; cursor: default; }
.eq-sliders { display: grid; grid-template-columns: repeat(11, 1fr); gap: 2px; margin: 12px 0; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eq-band { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.eq-band output { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; height: 13px; }
.eq-band label { font-size: 10px; color: var(--muted); }
.eq-band input[type=range] { writing-mode: vertical-lr; direction: rtl; width: 22px; height: 120px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.eq-pre { border-right: 1px solid var(--line); }
.eq-pre label { color: var(--text); font-weight: 600; }
.eq-panel.off .eq-sliders { opacity: .45; }
.eq-save { margin-bottom: 6px; }
.eq-foot { margin: 0; font-size: 11px; color: var(--muted); }
.eq-foot.msg { color: var(--accent); }
@media (max-width: 760px) {
  .eq-panel { right: 12px; left: 12px; width: auto; bottom: calc(126px + env(safe-area-inset-bottom)); }
  .eq-band input[type=range] { height: 110px; width: 20px; }
}
