.tools-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 9px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
}
.tools-row select {
  width: auto; min-width: 150px;
  min-height: 38px; padding: 7px 10px;
  font-size: 13px;
}
.tools-row .btn { min-height: 38px; padding: 7px 12px; font-size: 13px; }
.sleep-info {
  color: var(--accent); font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.logo-img {
  width: 38px; height: 38px; flex: none;
  padding: 3px; border-radius: 9px;
  object-fit: contain; background: var(--avatar-bg);
}
.sub-title {
  margin: 18px 0 10px; color: var(--muted);
  font-size: 11px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
}
.recent-list { max-height: 260px; }
.kbd {
  margin-left: auto; padding: 1px 6px;
  border: 1px solid var(--line); border-radius: 6px;
  color: var(--muted); font-size: 11px;
}
.toast {
  position: fixed; left: 50%; bottom: 24px;
  transform: translateX(-50%);
  max-width: min(92vw, 460px);
  padding: 12px 16px;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 12px; font-size: 13px; line-height: 1.5;
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
  z-index: 300;
  overflow-wrap: anywhere;
}
.search-backdrop {
  position: fixed; inset: 0; z-index: 250;
  display: grid; justify-items: center; align-content: start;
  padding-top: 10vh;
  background: rgba(0,0,0,.55);
}
.search-box {
  width: min(640px, 92vw);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,.45);
}
.search-box .body { padding: 14px; border-bottom: 1px solid var(--line); }
.search-box .body input { margin: 0; }
.search-box .list { max-height: 60vh; padding: 10px; }
.buffer-spinner {
  position: absolute; inset: 0; z-index: 3;
  display: grid; place-content: center; justify-items: center; gap: 10px;
  background: rgba(0, 0, 0, .35); color: #fff;
  font-size: 14px; font-weight: 700;
  pointer-events: none;
}
.spinner {
  width: 38px; height: 38px;
  border: 3px solid rgba(255, 255, 255, .25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
}
.net-info {
  font-size: 12px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.net-info.warn { color: var(--error); }

.saved-row { margin-bottom: 14px; }
.saved-row .row > select { flex: 1 1 200px; min-width: 0; width: auto; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(131, 230, 206, .18);
}

@media (max-width: 760px) {
  .sidebar { flex-wrap: wrap; }
  .sidebar > div:nth-child(2) { flex: 1 1 auto; }
  #searchBtn { min-height: 38px; padding: 8px 10px; }
  #searchBtn > span:nth-child(2), #searchBtn .kbd { display: none; }
  .video-empty { padding-bottom: 56px; }
  .video-empty strong { font-size: 16px; }
  .tools-row { padding: 12px 15px; }
  .tools-row select { flex: 1 1 100%; }
  .tools-row .btn { flex: 1 1 auto; }
}
