:root {
  --bg: #0f1115; --panel: #161a21; --panel2: #1d222b; --panel3: #252b36; --line: #2b313d;
  --text: #ebe6da; --muted: #9aa1ad; --accent: #d9a441; --accent-ink: #1a1408; --arcane: #8a6cff; --danger: #e06363; --ok: #5fbf7f;
  --r: 14px; --nav: 210px;
  --fantasy: linear-gradient(140deg, #2d3a24, #1b2216);
  --horror: linear-gradient(140deg, #173033, #10181b);
  --scifi: linear-gradient(140deg, #232a4a, #141729);
  --custom: linear-gradient(140deg, #3b2740, #1d1522);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body { font-size: 15px; line-height: 1.4; -webkit-tap-highlight-color: transparent; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: Cinzel, Georgia, serif; font-weight: 700; letter-spacing: .02em; margin: 0; }
h2 { font-size: 22px; } h3 { font-size: 16px; color: var(--accent); margin: 22px 0 10px; }
a { color: var(--accent); }

#app { display: grid; height: 100dvh; grid-template-columns: var(--nav) 1fr; grid-template-rows: auto 1fr auto auto; grid-template-areas: "nav head" "nav main" "nav quick" "nav player"; }
header.top { grid-area: head; display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--panel); min-width: 0; }
header.top .title { font-family: Cinzel, serif; font-size: 18px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
nav.side { grid-area: nav; background: #0b0d10; border-right: 1px solid var(--line); padding: 16px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-family: Cinzel, serif; font-size: 20px; color: var(--accent); }
.brand img { width: 30px; height: 30px; }
nav.side button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; cursor: pointer; text-align: left; color: var(--muted); font-weight: 500; }
nav.side button .ic { font-size: 18px; width: 22px; text-align: center; }
nav.side button:hover { background: var(--panel2); color: var(--text); }
nav.side button.on { background: var(--panel3); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
main { grid-area: main; overflow-y: auto; padding: 20px 24px 40px; min-width: 0; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--panel3); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.icon { padding: 7px 9px; }
.btn:disabled { opacity: .45; cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-size: 13.5px; color: var(--muted); }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
input[type=text], input[type=search], input[type=number], select, textarea { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 22px; background: none; cursor: pointer; min-width: 60px; }
input[type=range]::-webkit-slider-runnable-track { height: 5px; border-radius: 9px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), var(--panel3) var(--p, 50%)); }
input[type=range]::-moz-range-track { height: 5px; border-radius: 9px; background: var(--panel3); }
input[type=range]::-moz-range-progress { height: 5px; border-radius: 9px; background: var(--accent); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5.5px; border-radius: 50%; background: var(--text); border: 0; }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--text); border: 0; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hint { color: var(--muted); font-size: 13.5px; margin: 4px 0 12px; max-width: 70ch; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.head-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r); }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.card { position: relative; border-radius: var(--r); padding: 14px 12px 12px; min-height: 104px; border: 1px solid var(--line); cursor: pointer; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; background: var(--panel2); transition: transform .12s, box-shadow .12s, border-color .12s; user-select: none; text-align: left; }
.card:hover { transform: translateY(-2px); border-color: #3a4150; }
.card .emo { font-size: 30px; line-height: 1; margin-bottom: auto; }
.card .nm { font-weight: 600; font-size: 14px; }
.card .sub { font-size: 12px; color: var(--muted); }
.card.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 6px 24px -8px rgba(217, 164, 65, .5); }
.card.on::after { content: ''; position: absolute; top: 12px; right: 12px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }
.card .fav { position: absolute; top: 6px; right: 6px; border: 0; background: none; cursor: pointer; font-size: 15px; opacity: .35; padding: 4px; }
.card .fav.on, .card:hover .fav { opacity: 1; }
.card.on .fav { right: 26px; }
.card.fantasy { background: var(--fantasy); } .card.horror { background: var(--horror); } .card.scifi { background: var(--scifi); } .card.custom { background: var(--custom); }
@keyframes pulse { 50% { opacity: .3; } }

.sfx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.sfx { position: relative; border: 1px solid var(--line); background: var(--panel2); border-radius: 12px; padding: 12px 8px 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 13px; user-select: none; }
.sfx .emo { font-size: 26px; }
.sfx:hover { background: var(--panel3); }
.sfx:active, .sfx.flash { transform: scale(.96); border-color: var(--accent); background: #2c2617; }
.sfx .star { position: absolute; top: 4px; right: 4px; border: 0; background: none; cursor: pointer; opacity: .3; font-size: 13px; }
.sfx .star.on, .sfx:hover .star { opacity: 1; }

/* layers panel */
.live { margin-bottom: 20px; }
.live .head-row h2 { font-size: 20px; }
.layer { display: grid; grid-template-columns: minmax(120px, 1.3fr) auto minmax(90px, 2fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.layer:last-child { border-bottom: 0; }
.layer .nm { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.layer.off .nm { color: var(--muted); text-decoration: line-through; }
.badges { display: flex; gap: 4px; }
.badge { font-size: 11px; padding: 2px 6px; border-radius: 6px; background: var(--panel3); color: var(--muted); }
.sliders { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 20px; margin: 10px 0 12px; }
.sl { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: 13.5px; }
.sl .lab { color: var(--muted); min-width: 22px; }
.sl .val { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; min-width: 32px; text-align: right; }

/* quick bar */
.quick { grid-area: quick; display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-top: 1px solid var(--line); background: var(--panel); min-width: 0; }
.quick-sc { display: flex; gap: 6px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.transport { flex: 0 1 560px; min-width: 300px; display: flex; align-items: center; gap: 6px; padding-left: 12px; border-left: 1px solid var(--line); }
.transport[hidden] { display: none; }
.transport .tr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.transport .tr-top { display: flex; align-items: center; gap: 6px; font-size: 12.5px; min-width: 0; }
.transport .tr-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.transport .tr-time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.transport input[type=range] { width: 100%; height: 14px; }
.transport .tr-pick { max-width: 150px; padding: 4px 8px; font-size: 12.5px; }
@media (max-width: 860px) { .quick { flex-wrap: wrap; } .transport { flex: 1 1 100%; border-left: 0; padding-left: 0; min-width: 0; } }
.quick .q { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; font-size: 13px; user-select: none; }
.quick .q:active, .quick .q.flash { border-color: var(--accent); background: #2c2617; }
.quick .q kbd { font-size: 10.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-family: inherit; }
.quick .lbl { flex: 0 0 auto; align-self: center; font-size: 12px; color: var(--muted); padding-right: 4px; }

/* player */
footer.player { grid-area: player; display: flex; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #0b0d10; border-top: 1px solid var(--line); overflow-x: auto; align-items: stretch; scrollbar-width: none; }
footer.player::-webkit-scrollbar, .quick::-webkit-scrollbar { display: none; }
.pb { flex: 1 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 200px; }
.pb .t { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.pb .now { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.pb .now .x { margin-left: auto; }
.pb .sl { font-size: 12.5px; }
.pb select { padding: 4px 8px; font-size: 13px; }
.pb.vols { min-width: 230px; }
.pb .meter { height: 4px; border-radius: 4px; background: var(--panel3); overflow: hidden; }
.pb .meter i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .08s; }
.pb.stop { justify-content: center; min-width: auto; }

.room-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: #1f2a1f; border: 1px solid #36513a; color: #b6e3bf; font-size: 13px; cursor: pointer; }
.room-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 1.6s infinite; }
.code-big { font-family: Cinzel, serif; font-size: 44px; letter-spacing: .15em; color: var(--accent); }

/* lists */
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.item .emo { font-size: 24px; }
.item .meta { flex: 1; min-width: 160px; }
.item .meta .nm { font-weight: 600; }
.scenes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.scene { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.scene .play { display: flex; gap: 10px; align-items: center; cursor: pointer; border: 0; background: none; text-align: left; padding: 0; }
.scene .play .emo { font-size: 30px; }
.scene .play .nm { font-weight: 600; }
.scene .desc { font-size: 12.5px; color: var(--muted); }
.scene.on { border-color: var(--accent); }
.scene .tools { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }

.drop { border: 2px dashed var(--line); border-radius: var(--r); padding: 26px; text-align: center; color: var(--muted); cursor: pointer; }
.drop.over { border-color: var(--accent); color: var(--text); }
.ed-layer { display: grid; grid-template-columns: minmax(150px, 2fr) minmax(90px, 1.5fr) auto auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ed-layer label { font-size: 12.5px; color: var(--muted); display: inline-flex; gap: 3px; align-items: center; }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 10px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }

/* receiver */
.recv { grid-column: 1 / -1; grid-row: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; background: radial-gradient(ellipse at top, #241c35, var(--bg) 60%); overflow-y: auto; }
.recv .big { font-size: 64px; }
.recv .card-now { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px 22px; min-width: min(420px, 100%); display: flex; flex-direction: column; gap: 10px; text-align: left; }
.recv .card-now .r { display: flex; gap: 12px; align-items: center; }
.recv .card-now .r .emo { font-size: 26px; width: 34px; text-align: center; }
.recv input.code { font-size: 28px; letter-spacing: .3em; text-align: center; width: 230px; font-family: Cinzel, serif; }

.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; width: min(460px, 100%); max-height: 90dvh; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.modal .btns { display: flex; justify-content: flex-end; gap: 8px; }
#toasts { position: fixed; bottom: 150px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; pointer-events: none; width: max-content; max-width: calc(100% - 32px); }
.toast { background: var(--panel3); border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, .4); animation: tin .2s; }
.toast.err { border-color: var(--danger); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }
.unlock { position: fixed; inset: 0; z-index: 70; background: rgba(8, 9, 12, .85); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px; cursor: pointer; text-align: center; padding: 20px; }

@media (max-width: 860px) {
  #app { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto auto auto; grid-template-areas: "head" "main" "quick" "player" "nav"; }
  nav.side { flex-direction: row; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); overflow-x: auto; gap: 0; scrollbar-width: none; }
  nav.side .brand { display: none; }
  nav.side button { flex-direction: column; gap: 2px; font-size: 10.5px; padding: 6px 8px; min-width: 64px; text-align: center; }
  nav.side button.on { box-shadow: inset 0 2px 0 var(--accent); }
  footer.player { padding-bottom: 10px; }
  header.top { padding: 10px 16px; }
  main { padding: 16px 16px 30px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .layer { grid-template-columns: 1fr auto; }
  .layer .badges { display: none; }
  .layer input[type=range] { grid-column: 1 / -1; grid-row: 2; }
  .ed-layer { grid-template-columns: 1fr auto; }
  .pb { min-width: 180px; }
  #toasts { bottom: 200px; }
}

/* ---- mood wheel ---- */
.music-view { --size: min(76vw, 52dvh, 420px); --stone: #6b665d; --ink: #f3eee2;
  --c-happy: #c9c24a; --c-epic: #e0932e; --c-sad: #c8642c; --c-tense: #a82a22; --c-creepy: #38434c; --c-mystic: #4f6178; --c-magical: #8c3c96; --c-funny: #d4a83a; --c-mid: #6f6a60;
  margin: -20px -24px 0; padding: 18px 24px 30px; min-height: 100%;
  background: radial-gradient(120% 70% at 50% 10%, #5b574f 0%, #3c3a35 55%, #2a2926 100%); transition: background .8s; }
.music-view.fight { --stone: #6b4a42;
  --c-happy: #c47a2e; --c-epic: #d2532a; --c-sad: #7d2430; --c-tense: #a0161a; --c-creepy: #3b1a1f; --c-mystic: #55263f; --c-magical: #7f2a54; --c-funny: #b5602e; --c-mid: #6a3e36;
  background: radial-gradient(120% 70% at 50% 10%, #6e3d36 0%, #4a2824 55%, #2c1716 100%); }
.wh-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 560px; margin: 0 auto; }
.wh-title { text-align: center; min-width: 0; }
.wh-kind { font-family: Cinzel, serif; color: #cfc7b6; font-size: 15px; letter-spacing: .08em; }
.wh-name { font-family: Cinzel, serif; font-weight: 700; color: var(--ink); font-size: clamp(24px, 6vw, 36px); line-height: 1.15; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.wh-side { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 64px; padding: 8px 0; border: 0; border-radius: 14px; background: none; color: #d9d2c3; font-size: 26px; cursor: pointer; opacity: .75; }
.wh-side span { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.wh-side:hover, .wh-side.on { opacity: 1; background: rgba(255,255,255,.08); }
.music-view.fight .wh-side.on:first-child { background: rgba(220,60,40,.28); }
.wheel { position: relative; width: var(--size); height: var(--size); margin: 46px auto 40px; }
.wh-lab { position: absolute; left: 50%; top: 50%; font-family: Georgia, 'Times New Roman', serif; font-size: 17px; color: #e4ddcf; white-space: nowrap; pointer-events: none;
  transform: translate(-50%, -50%) rotate(var(--a)) translateY(calc(var(--size) / -2 - 30px)) rotate(var(--flip)); text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.wh-ring { position: absolute; inset: -13px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(from 3deg, #c9a581 0 10.5deg, #8d6c4f 10.5deg 11.25deg), radial-gradient(circle, #d3b08a, #a8835f);
  background-blend-mode: multiply;
  -webkit-mask: radial-gradient(circle, transparent calc(50% - 14px), #000 calc(50% - 13px)); mask: radial-gradient(circle, transparent calc(50% - 14px), #000 calc(50% - 13px));
  box-shadow: 0 6px 22px rgba(0,0,0,.45); }
.wh-disc { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; clip-path: circle(50%); -webkit-mask-image: -webkit-radial-gradient(white, black); isolation: isolate; cursor: grab; touch-action: none; box-shadow: inset 0 0 26px rgba(0,0,0,.55); }
.wh-disc.drag { cursor: grabbing; }
.wh-paint { position: absolute; inset: -12%; filter: blur(16px) saturate(1.05);
  background:
    radial-gradient(circle closest-side, var(--c-mid) 0%, color-mix(in srgb, var(--c-mid) 75%, transparent) 25%, transparent 62%),
    conic-gradient(from -22.5deg, var(--c-happy) 0deg 25deg, var(--c-epic) 45deg 70deg, var(--c-sad) 90deg 115deg, var(--c-tense) 135deg 160deg,
      var(--c-creepy) 180deg 205deg, var(--c-mystic) 225deg 250deg, var(--c-magical) 270deg 295deg, var(--c-funny) 315deg 340deg, var(--c-happy) 360deg);
  transition: filter .6s; }
.wh-disc::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(118deg, rgba(255,255,255,.05) 0 2px, transparent 2px 7px, rgba(0,0,0,.05) 7px 9px, transparent 9px 15px); mix-blend-mode: overlay; }
.wh-knob { position: absolute; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; border: 3px solid #f4efe4; z-index: 1;
  display: grid; place-items: center; background: rgba(0,0,0,.08); box-shadow: 0 0 0 1px rgba(0,0,0,.2), 0 3px 10px rgba(0,0,0,.35); transition: left .08s, top .08s; }
.wh-knob i { width: 15px; height: 15px; background: #f4efe4; transform: rotate(45deg); border-radius: 2px; }
.wh-knob:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.wh-now { text-align: center; color: #e2dbcc; min-height: 1.4em; }
.wh-hint { margin: 6px auto 16px; text-align: center; color: #bfb7a7; }
.wh-lib { max-width: 860px; margin: 0 auto; background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.08); border-radius: var(--r); padding: 12px 16px; }
.wh-lib summary { cursor: pointer; font-family: Cinzel, serif; font-size: 16px; color: var(--ink); }
.wh-zone { margin: 8px 0 12px; } .wh-zone > .small { margin: 0 0 6px 2px; text-transform: uppercase; letter-spacing: .06em; }
.wh-lib .item { background: rgba(0,0,0,.25); padding: 7px 10px; }
.item.dis { opacity: .5; }
.music-view > h3 { max-width: 860px; margin-left: auto; margin-right: auto; }
.btn.fight-on { background: #7a2a22; border-color: #a33a2e; color: #fff; }
@media (max-width: 860px) { .music-view { margin: -16px -16px 0; padding: 14px 16px 26px; } .wheel { margin: 40px auto 34px; } .wh-lab { font-size: 15px; } }

/* player bar pickers */
.row.nowrap { flex-wrap: nowrap; }
.row.nowrap select { flex: 1; min-width: 0; }
.btn.power { font-size: 15px; line-height: 1; color: var(--muted); }
.btn.power.on { color: var(--accent); border-color: var(--accent); }

/* track library */
.wh-lib .filters .chips { margin: 8px 0 0; gap: 6px; }
.wh-lib .filters .chip { padding: 4px 10px; font-size: 12.5px; }
.wh-lib .filters { margin-bottom: 10px; }
.wh-lib input[type=search] { width: min(280px, 100%); }
.item.trk select { padding: 4px 8px; font-size: 13px; max-width: 170px; }
.item.trk .meta { min-width: 180px; }
.lib-panel .filters .chips { margin: 8px 0 0; gap: 6px; }
.lib-panel .filters .chip { padding: 4px 10px; font-size: 12.5px; }
.lib-panel .filters { margin-bottom: 10px; }
.lib-panel input[type=search] { width: min(280px, 100%); }
.src-badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px 1px 5px; border-radius: 999px; background: var(--panel3); color: var(--text); font-size: 11.5px; vertical-align: 1px; }
.src-badge .src-ic { display: inline-flex; font-size: 11px; }
.src-badge svg { width: 18px; height: 11px; }
.src-badge.src-sc { background: rgba(255, 85, 0, .16); color: #ffb08a; }

/* YouTube players must stay visible while they play */
#yt-dock { position: fixed; right: 16px; top: 64px; z-index: 50; display: flex; gap: 8px; pointer-events: none; }
#yt-dock .yt-box { display: none; width: 200px; height: 200px; border-radius: 12px; overflow: hidden; background: #000; box-shadow: 0 6px 24px rgba(0,0,0,.5); pointer-events: auto; }
#yt-dock .yt-box.on { display: block; }
#yt-dock iframe { width: 200px; height: 200px; display: block; }
.src-badge.src-yt { background: rgba(255, 0, 51, .15); color: #ff9aa9; }
.src-badge.src-yt svg { width: 16px; height: 11px; }

/* phones: the control panel folds away so the wheel gets the screen; the header button opens it */
.mob-only { display: none; }
@media (max-width: 860px) {
  .mob-only { display: inline-flex; }
  .mob-only.on { background: var(--panel3); border-color: var(--accent); }
  footer.player:not(.open) { display: none; }
}
