/* ================================================================
   DUGOUT — broadcast/jumbotron design system
   Player = control room · Remote = premium mobile app
   ================================================================ */
@font-face { font-family: "Anton"; src: url("../public/fonts/Anton-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Oswald"; src: url("../public/fonts/Oswald-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Oswald"; src: url("../public/fonts/Oswald-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Oswald"; src: url("../public/fonts/Oswald-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #070b0d;
  --panel: #10171b;
  --panel2: #17212700;      /* not used raw */
  --surface: #141e22;
  --surface2: #1b282e;
  --line: #26363d;
  --line2: #33474f;
  --text: #eef6f4;
  --dim: #8fa6a6;
  --faint: #5f7377;
  --green: #37e08b;
  --green-deep: #0e3b28;
  --amber: #ffb23e;
  --amber-deep: #3a2a0d;
  --red: #ff4d5e;
  --live: #ffd24a;
  --accent: #37e08b;
  --spotify: #1db954;
  --font-display: "Anton", system-ui, sans-serif;
  --font-ui: "Oswald", system-ui, sans-serif;
  --font-body: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --r: 16px;
  --shadow: 0 20px 50px rgba(0,0,0,.55);
  --glow-green: 0 0 0 1px rgba(55,224,139,.4), 0 0 30px rgba(55,224,139,.25);
  --glow-amber: 0 0 0 1px rgba(255,178,62,.4), 0 0 30px rgba(255,178,62,.25);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  color: var(--text);
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 500px at 50% -8%, rgba(55,224,139,.10), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(255,178,62,.06), transparent 55%),
    radial-gradient(1000px 700px at 10% 100%, rgba(55,224,139,.05), transparent 55%),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none; user-select: none;
}
body:not(.remote) { display: flex; flex-direction: column; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--line2); }
kbd { font-family: var(--font-ui); background: var(--surface2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 7px; font-size: 12px; }
body.keyflash { outline: 3px solid var(--green); outline-offset: -3px; }

.pill { width: 9px; height: 9px; border-radius: 99px; background: var(--green); box-shadow: 0 0 10px var(--green); }

/* ===================== ARM / GATE ===================== */
#gate { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1000px 600px at 50% -10%, rgba(55,224,139,.12), transparent 60%), var(--bg); }
.gate-card { width: min(720px, 100%); background: linear-gradient(180deg, var(--surface), var(--panel));
  border: 1px solid var(--line); border-radius: 24px; padding: 34px; box-shadow: var(--shadow); }
.gate-card h1 { font-family: var(--font-display); font-size: 60px; letter-spacing: .01em; margin: 0 0 2px;
  text-transform: uppercase; line-height: .95; background: linear-gradient(180deg, #fff, #9fe9c4);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.gate-card h1 span { -webkit-text-fill-color: var(--faint); color: var(--faint); font-family: var(--font-ui); font-weight: 600; font-size: 22px; }
.sub { color: var(--dim); margin: 4px 0 22px; font-size: 15px; }
.ready { background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.ready-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; color: var(--dim); font-family: var(--font-ui); text-transform: uppercase; letter-spacing: .05em; font-size: 13px; }
.ready-head strong { font-family: var(--font-display); font-size: 20px; color: var(--text); }
.ready-track { height: 8px; background: #0a0f11; border-radius: 99px; overflow: hidden; }
#ready-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--green), #7ef0b6); box-shadow: 0 0 14px rgba(55,224,139,.6); transition: width .25s; }
#ready-list { list-style: none; margin: 12px 0 0; padding: 0; max-height: 180px; overflow: auto; font-size: 12.5px; font-family: var(--font-ui); }
#ready-list li { display: flex; align-items: center; gap: 8px; padding: 3px 0; color: var(--dim); }
#ready-list .dot { width: 7px; height: 7px; border-radius: 99px; background: var(--line2); flex: none; }
#ready-list li.ok .dot { background: var(--green); box-shadow: 0 0 8px var(--green); }
#ready-list li.err { color: var(--red); } #ready-list li.err .dot { background: var(--red); }
#ready-list .p { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spotify-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 6px;
  padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.sp-left { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.sp-dot { width: 10px; height: 10px; border-radius: 99px; background: var(--amber); flex: none; }
.sp-btn { padding: 11px 18px; border: 0; border-radius: 10px; background: var(--spotify); color: #04120a; font-weight: 700; cursor: pointer; font-family: var(--font-ui); text-transform: uppercase; letter-spacing: .03em; }
.sp-btn:hover { filter: brightness(1.1); }
.output-row { margin: 16px 0 8px; color: var(--dim); font-size: 14px; }
.output-row select { margin-left: 8px; background: var(--surface2); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; }
#arm { width: 100%; margin-top: 14px; padding: 18px; font-size: 20px; font-weight: 400; cursor: pointer;
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em; color: #04140c; border: 0; border-radius: 14px;
  background: linear-gradient(180deg, #56f0a2, var(--green)); box-shadow: 0 10px 30px rgba(55,224,139,.35); }
#arm:disabled { background: var(--surface2); color: var(--faint); box-shadow: none; cursor: default; }
#arm:not(:disabled):hover { filter: brightness(1.06); transform: translateY(-1px); }
.remote-info { margin: 16px 0 4px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; font-size: 13px; color: var(--dim); }
.remote-info code { font-family: var(--font-ui); background: #0a0f11; padding: 3px 8px; border-radius: 6px; color: var(--green); }
.hint { color: var(--faint); font-size: 12.5px; margin: 14px 0 0; line-height: 1.7; }

/* ===================== PLAYER TOPBAR ===================== */
.topbar { display: flex; align-items: center; gap: 18px; padding: 14px 22px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20,30,34,.9), rgba(16,23,27,.6)); backdrop-filter: blur(8px); }
.brand { font-family: var(--font-display); font-size: 24px; text-transform: uppercase; letter-spacing: .02em; }
.status { flex: 1; display: flex; align-items: center; gap: 12px; }
.state { display: none; }
.np { display: none; }
.conn-wrap { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 13px; font-family: var(--font-ui); text-transform: uppercase; letter-spacing: .04em; }

/* ===================== JUMBOTRON (now playing) ===================== */
.nowbar { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 22px;
  margin: 18px; padding: 22px 26px; border-radius: 22px; border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--panel)); transition: box-shadow .3s, border-color .3s; }
.nowbar::before { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .4s;
  background: radial-gradient(600px 200px at 20% 0%, rgba(55,224,139,.18), transparent 70%); }
.nowbar.walkup { border-color: rgba(55,224,139,.5); box-shadow: var(--glow-green); }
.nowbar.walkup::before { opacity: 1; }
.nowbar.announce { border-color: rgba(255,178,62,.5); box-shadow: var(--glow-amber); }
.nowbar.announce::before { opacity: 1; background: radial-gradient(600px 200px at 20% 0%, rgba(255,178,62,.18), transparent 70%); }
.nb-left { position: relative; z-index: 1; min-width: 0; }
.nb-phase { font-family: var(--font-ui); font-weight: 700; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.nowbar.announce .nb-phase { color: var(--amber); }
.nowbar.walkup .nb-phase { color: var(--green); }
.nb-name { font-family: var(--font-display); font-size: clamp(34px, 5vw, 60px); line-height: .95; text-transform: uppercase; margin-top: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowbar.walkup .nb-name { text-shadow: 0 0 30px rgba(55,224,139,.4); }
.nowbar.announce .nb-name { text-shadow: 0 0 30px rgba(255,178,62,.35); }
.nb-prog { position: relative; z-index: 1; grid-column: 1 / -1; margin-top: 6px; }
.nb-track { height: 10px; background: #0a0f11; border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
#nb-bar { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--green), #8ef3bf); box-shadow: 0 0 14px rgba(55,224,139,.55); transition: width .12s linear; }
.nowbar.announce #nb-bar { background: linear-gradient(90deg, var(--amber), #ffd48a); box-shadow: 0 0 14px rgba(255,178,62,.5); }
.nb-time { margin-top: 7px; font-family: var(--font-ui); font-variant-numeric: tabular-nums; color: var(--dim); font-size: 13px; letter-spacing: .05em; }
.nb-bed { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 12.5px; font-family: var(--font-ui);
  text-transform: uppercase; letter-spacing: .04em; padding: 8px 12px; background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 99px; align-self: start; }
#nb-bed-dot { width: 8px; height: 8px; border-radius: 99px; background: var(--faint); }
.nb-bed.spotify #nb-bed-dot { background: var(--spotify); box-shadow: 0 0 8px var(--spotify); }
.nb-bed.fallback #nb-bed-dot { background: var(--amber); }

/* ===================== ROSTER GRID ===================== */
main { flex: 1; padding: 0 18px 18px; overflow: auto; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); }
.tile { position: relative; aspect-ratio: 1/1; border: 1px solid var(--line); border-radius: 20px; cursor: pointer;
  background: linear-gradient(165deg, var(--surface2), var(--panel)); color: var(--text); overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  transition: transform .09s ease, box-shadow .18s, border-color .18s, filter .12s; }
.tile::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120px 80px at 50% 12%, rgba(255,255,255,.06), transparent 70%); pointer-events: none; }
.tile:hover { transform: translateY(-4px); border-color: var(--line2); box-shadow: 0 16px 34px rgba(0,0,0,.45); }
.tile:active { transform: scale(.96); }
.tile.live { border-color: var(--live); box-shadow: 0 0 0 2px var(--live), 0 0 44px rgba(255,210,74,.35); animation: livepulse 1.4s ease-in-out infinite; }
@keyframes livepulse { 0%,100% { box-shadow: 0 0 0 2px var(--live), 0 0 30px rgba(255,210,74,.28);} 50% { box-shadow: 0 0 0 2px var(--live), 0 0 55px rgba(255,210,74,.5);} }
.tile .avatar { width: 66px; height: 66px; border-radius: 99px; display: grid; place-items: center; font-family: var(--font-display); font-size: 26px;
  color: #04140c; background: linear-gradient(160deg, #6bf0ad, var(--green)); box-shadow: 0 8px 20px rgba(55,224,139,.3); }
.tile.live .avatar { background: linear-gradient(160deg, #ffe08a, var(--live)); color: #241a00; box-shadow: 0 8px 22px rgba(255,210,74,.45); }
.tile .name { font-family: var(--font-ui); font-weight: 700; font-size: 22px; text-transform: uppercase; letter-spacing: .02em; }
.tile .key { position: absolute; top: 9px; left: 12px; font-family: var(--font-ui); font-size: 12px; color: var(--faint); }
.tile .badges { position: absolute; top: 9px; right: 11px; font-size: 12px; }
.tile .len { position: absolute; bottom: 9px; right: 11px; font-family: var(--font-ui); font-variant-numeric: tabular-nums; font-size: 12px;
  color: var(--dim); background: rgba(0,0,0,.35); padding: 2px 8px; border-radius: 99px; }
.tile.missing { opacity: .45; }

/* ===================== EFFECTS ===================== */
.fx-block { margin-top: 24px; }
.fx-block h2 { font-family: var(--font-ui); font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--faint); margin: 0 0 12px; }
.fx-row { display: flex; flex-wrap: wrap; gap: 10px; }
.fx { position: relative; padding: 15px 24px; border-radius: 14px; border: 1px solid var(--line); cursor: pointer;
  background: linear-gradient(180deg, var(--surface2), var(--panel)); color: var(--text); font-family: var(--font-ui); font-weight: 600; font-size: 16px;
  text-transform: uppercase; letter-spacing: .03em; transition: transform .08s, border-color .15s, filter .12s; }
.fx:hover { border-color: var(--line2); filter: brightness(1.08); }
.fx:active, .fx.is-active { transform: scale(.95); filter: brightness(.85); }
.fx .key { position: absolute; top: 6px; left: 9px; font-size: 11px; color: var(--faint); }

/* ===================== TRANSPORT FOOTER ===================== */
.transport { display: flex; align-items: center; gap: 12px; padding: 14px 20px; flex-wrap: wrap;
  border-top: 1px solid var(--line); background: linear-gradient(0deg, var(--panel), rgba(16,23,27,.6)); backdrop-filter: blur(8px); }
.stop { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em; padding: 15px 30px; font-size: 20px; color: #fff; cursor: pointer;
  border: 0; border-radius: 13px; background: linear-gradient(180deg, #ff6474, var(--red)); box-shadow: 0 8px 24px rgba(255,77,94,.35); }
.stop:hover { filter: brightness(1.06); } .stop:active, .stop.is-active { transform: scale(.97); }
.fade { font-family: var(--font-ui); text-transform: uppercase; letter-spacing: .03em; padding: 14px 18px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface2); color: var(--text); cursor: pointer; }
.fade:hover { border-color: var(--line2); }
.bed { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(0,0,0,.2); }
.bed button { width: 40px; height: 40px; display: grid; place-items: center; background: var(--surface2); color: var(--text); border: 1px solid var(--line); border-radius: 99px; cursor: pointer; font-size: 15px; transition: transform .08s, filter .12s; }
.bed button:hover { filter: brightness(1.1); } .bed button:active { transform: scale(.92); }
.bed-track { font-family: var(--font-ui); font-size: 13px; color: var(--text); max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transport label { color: var(--faint); font-size: 12px; font-family: var(--font-ui); text-transform: uppercase; letter-spacing: .05em; display: flex; align-items: center; gap: 7px; }
.master { margin-left: auto; }
input[type=range] { accent-color: var(--green); }
.soundcheck { font-family: var(--font-ui); text-transform: uppercase; letter-spacing: .04em; padding: 12px 16px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface2); color: var(--text); cursor: pointer; }
.soundcheck:hover { border-color: var(--line2); }

/* ---- live search (player, opens upward) ---- */
.queue { display: flex; align-items: center; gap: 8px; position: relative; }
.queue input { width: 250px; background: var(--surface2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px; font-size: 14px; font-family: var(--font-body); }
.queue input:focus { outline: none; border-color: var(--green); }
.queue-next { font-size: 12px; color: var(--faint); font-family: var(--font-ui); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-results { position: absolute; bottom: calc(100% + 10px); left: 0; width: 400px; max-height: 360px; overflow-y: auto;
  background: linear-gradient(180deg, var(--surface), var(--panel)); border: 1px solid var(--line2); border-radius: 14px; padding: 6px; box-shadow: var(--shadow); z-index: 40; }
.qr-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 8px; border: 0; border-radius: 10px; background: transparent; color: var(--text); cursor: pointer; }
.qr-row:hover { background: var(--surface2); }
.qr-row img, .qr-noart { width: 46px; height: 46px; border-radius: 8px; flex: none; background: var(--line); object-fit: cover; box-shadow: 0 3px 10px rgba(0,0,0,.4); }
.qr-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.qr-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-artist { color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-add { color: var(--spotify); font-weight: 800; font-size: 22px; padding: 0 8px; }
.qr-msg { color: var(--dim); padding: 16px; text-align: center; font-size: 13px; }
.qr-label { font-family: var(--font-ui); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; color: var(--faint); padding: 9px 8px 4px; }
.qr-row.current { background: rgba(55,224,139,.09); }
.qr-row.current .qr-artist { color: var(--green); }
.queue-panel-wrap { position: relative; }
/* drag-to-reorder + remove (shared by player & remote queue) */
.q-handle { flex: none; cursor: grab; color: var(--faint); font-size: 15px; letter-spacing: -3px; padding: 0 8px 0 2px; touch-action: none; -webkit-user-select: none; user-select: none; }
.q-handle:active { cursor: grabbing; }
.q-remove { flex: none; background: transparent; border: 0; color: var(--faint); font-size: 15px; width: 32px; height: 36px; border-radius: 8px; cursor: pointer; }
.q-remove:hover { color: var(--red); background: rgba(255,77,94,.12); }
.qr-row[data-idx], .rs-row[data-idx] { transition: transform .13s ease; }
.qr-row.dragging, .rs-row.dragging { transition: none; opacity: .97; box-shadow: 0 14px 34px rgba(0,0,0,.6); position: relative; z-index: 5; }
.rs-row .q-remove { width: 42px; height: 46px; font-size: 17px; }

/* ===================== TOASTS / BANNER ===================== */
#toast, #r-toast { position: fixed; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 60;
  background: linear-gradient(180deg, var(--surface2), var(--surface)); color: var(--text); border: 1px solid var(--line2);
  border-radius: 12px; padding: 12px 20px; font-weight: 600; max-width: 90%; text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
#toast { bottom: 96px; } #r-toast { bottom: calc(94px + env(safe-area-inset-bottom)); }
#toast.show, #r-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#banner { position: fixed; top: 0; left: 0; right: 0; z-index: 70; background: linear-gradient(180deg, #ffd27a, var(--amber)); color: #241700; text-align: center; padding: 13px; font-weight: 700; cursor: pointer; }

/* ================================================================
   REMOTE (phone)
   ================================================================ */
:root { --app-h: 100vh; }
@supports (height: 100svh) { :root { --app-h: 100svh; } }
body.remote { position: fixed; inset: 0; height: var(--app-h); display: grid;
  grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr auto;  /* pin column to viewport, no max-content blowout */
  overflow: hidden; overscroll-behavior: none; touch-action: manipulation; }
body.remote > * { min-width: 0; }
body.remote button { -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.r-top { display: flex; align-items: center; justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 14px max(18px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--surface), rgba(16,23,27,.6)); }
.r-brand { font-family: var(--font-display); font-size: 22px; text-transform: uppercase; letter-spacing: .02em; }
.conn-wrap { font-family: var(--font-ui); }
.r-now { position: relative; overflow: hidden; padding: 20px max(18px, env(safe-area-inset-right)) 20px max(18px, env(safe-area-inset-left));
  background: var(--panel); border-bottom: 1px solid var(--line); transition: background .3s; }
.r-now::before { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .4s; background: radial-gradient(400px 160px at 15% 0%, rgba(55,224,139,.2), transparent 70%); }
.r-now.walkup::before { opacity: 1; } .r-now.announce::before { opacity: 1; background: radial-gradient(400px 160px at 15% 0%, rgba(255,178,62,.2), transparent 70%); }
#r-phase { position: relative; z-index: 1; font-family: var(--font-ui); font-weight: 700; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.r-now.walkup #r-phase { color: var(--green); } .r-now.announce #r-phase { color: var(--amber); }
#r-name { position: relative; z-index: 1; display: block; font-family: var(--font-display); font-size: 40px; line-height: 1; text-transform: uppercase; margin-top: 4px; }
.r-main { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 16px max(16px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left)); }
.r-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.r-grid .tile { aspect-ratio: 1/1; min-height: 48px; min-width: 0; }
.conn-wrap { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-grid .avatar { width: 60px; height: 60px; font-size: 24px; }
.r-grid .name { font-size: 22px; }
.r-grid .tile.is-active { transform: scale(.95); filter: brightness(.82); }
.r-h2 { font-family: var(--font-ui); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--faint); margin: 22px 2px 12px; }
.r-fx { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.r-fx .fx { min-height: 58px; min-width: 0; display: grid; place-items: center; padding: 16px; font-size: 17px; }
.r-fx .fx.is-active { transform: scale(.95); filter: brightness(.82); }
.r-search-open { width: 100%; margin-top: 22px; padding: 17px; border-radius: 14px; border: 1px dashed var(--line2);
  background: transparent; color: var(--dim); font-family: var(--font-ui); font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.r-search-open.is-active { filter: brightness(.8); }
.r-foot { display: flex; align-items: center; gap: 10px; background: linear-gradient(0deg, var(--panel), rgba(16,23,27,.7)); border-top: 1px solid var(--line);
  padding: 12px max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
.r-foot .stop { flex: 1; min-width: 0; min-height: 64px; font-size: 22px; }
.r-foot .fade { min-height: 58px; padding: 18px 15px; }
.r-bed { display: flex; gap: 6px; }
.r-bed button { min-width: 52px; min-height: 58px; display: grid; place-items: center; border-radius: 13px; border: 1px solid var(--line); background: var(--surface2); color: var(--text); font-size: 17px; transition: transform .06s; }
.r-bed button.is-active { transform: scale(.92); }

/* search sheet */
.r-sheet { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: grid; grid-template-rows: auto 1fr; }
.rs-head { display: flex; gap: 8px; padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 12px max(14px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); background: var(--surface); }
.rs-head input { flex: 1; font-size: 16px; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); color: var(--text); }
.rs-head input:focus { outline: none; border-color: var(--green); }
.rs-head button { padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); color: var(--text); font-size: 18px; }
.rs-results { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 8px max(10px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
.rs-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px; margin-bottom: 6px; border: 0; border-radius: 12px; background: var(--surface2); color: var(--text); }
.rs-row:active { filter: brightness(.85); } .rs-row.queued { opacity: .5; }
.rs-row img, .rs-noart { width: 52px; height: 52px; border-radius: 8px; flex: none; background: var(--line); object-fit: cover; box-shadow: 0 3px 10px rgba(0,0,0,.4); }
.rs-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.rs-name { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-artist { color: var(--dim); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-add { font-size: 26px; font-weight: 800; color: var(--spotify); padding: 0 8px; }
.rs-msg { color: var(--dim); text-align: center; padding: 26px; }
.rs-label { font-family: var(--font-ui); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; color: var(--faint); padding: 14px 6px 6px; }
.rs-row.current { background: rgba(55,224,139,.1); box-shadow: inset 0 0 0 1px rgba(55,224,139,.3); }
.rs-row.current .rs-artist { color: var(--green); }
