/* Sift Web 2.0 - Authentic Explorer Styles (100% matched from content.ts) */
:root {
  color-scheme: dark;
  --sift-range-min: 0%;
  --sift-range-max: 100%;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #000;
  color: #f5f5f5;
  font-family: Arial, sans-serif;
  color-scheme: dark;
}
button, input, select, a { font: inherit; color: inherit; }

.sift-brand-mark, .sift-empty-mark {
  display: grid;
  place-items: center;
  background: #58e0b1;
  color: #07130f;
  font-weight: 900;
}

/* Fullscreen Web Container */
.sift-web-shell {
  width: 100vw;
  height: 100vh;
  display: flex;
  padding: 14px;
  background: #000;
  overflow: hidden;
}

.sift-panel {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: #111;
  color: #f5f5f5;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
}

.sift-layout {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: stretch;
  gap: 16px;
}

/* Sidebar */
.sift-sidebar {
  width: 320px;
  flex: 0 0 320px;
  min-height: 0;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: #1a1a1a;
  transition: width 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), flex-basis 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sift-sidebar::-webkit-scrollbar { width: 6px; }
.sift-sidebar::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(255, 255, 255, 0.12); }
.sift-sidebar:hover::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.22); }

.sift-sidebar-title {
  min-height: 34px;
  padding: 0 6px 5px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sift-sidebar-title strong {
  min-width: 0;
  flex: 1;
  font-size: 17px;
  line-height: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: left;
}
.sift-sidebar-brand-home {
  min-width: 0;
  flex: 1;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.sift-sidebar-brand-home:focus-visible, .sift-collapsed-main-title:focus-visible {
  outline: 2px solid #58e0b1;
  outline-offset: 2px;
}
.sift-sidebar-title-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}
.sift-sidebar-title-actions button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #a0a0a0;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.sift-sidebar-title-actions button:hover { background: rgba(255, 255, 255, 0.06); }
.sift-sidebar-title-actions button svg, .sift-filter-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sift-brand-mark {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 7px;
  font-size: 15px;
  line-height: 1;
}

.sift-presets-heading {
  min-height: 28px;
  padding: 6px 12px 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8a8a8a;
}
.sift-presets-heading strong {
  flex: 1;
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sift-presets-heading button {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #a0a0a0;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.sift-presets-heading button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sift-heading-icon {
  width: 12px;
  height: 12px;
  display: grid;
  place-items: center;
}
.sift-heading-icon svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sift-settings-collapsed { display: none; }

.sift-presets {
  padding: 0 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sift-preset {
  width: 100%;
  min-height: 48px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: #222;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.sift-preset:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: #262626;
}
.sift-preset:active { transform: scale(0.99); }
.sift-preset:focus-visible { outline: 2px solid #58e0b1; outline-offset: 2px; }
.sift-preset.active {
  border-color: rgba(88, 224, 177, 0.35);
  background: rgba(88, 224, 177, 0.1);
}
.sift-preset i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #c0c0c0;
  font-style: normal;
  font-size: 14px;
}
.sift-preset i svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sift-preset.active i {
  background: rgba(88, 224, 177, 0.18);
  color: #8cebc9;
}
.sift-preset > span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sift-preset strong {
  overflow: hidden;
  color: #e8e8e8;
  font-size: 13px;
  line-height: 18px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sift-preset-check {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  color: #8cebc9;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.15s ease, transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sift-preset-check svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sift-preset.active .sift-preset-check { opacity: 1; transform: scale(1); }

/* Custom Filters Accordion */
.sift-custom-filter-section {
  margin-top: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.sift-custom-filter {
  width: 100%;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #8a8a8a;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.sift-custom-filter:hover { background: rgba(255, 255, 255, 0.04); color: #c7c7c7; }
.sift-custom-filter-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sift-custom-filter-title svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sift-custom-filter strong {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sift-custom-filter-title i {
  width: 6px;
  height: 6px;
  display: none;
  border-radius: 999px;
  background: #58e0b1;
  box-shadow: 0 0 0 3px rgba(88, 224, 177, 0.1);
}
.sift-custom-filter-title i[data-active="true"] { display: block; }
.sift-custom-filter > b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease;
}
.sift-custom-filter > b svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sift-custom-filter[aria-expanded="true"] > b { transform: rotate(180deg); }
.sift-custom-filter-panel[hidden] { display: none; }
.sift-custom-filter-panel { padding: 0 12px; }

.sift-video-type-filter, .sift-range-filter {
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.sift-filter-field {
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sift-video-type-filter > span, .sift-range-filter > span, .sift-filter-field > span {
  color: #d0d0d0;
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
}
.sift-video-type-filter > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.sift-video-type-filter button {
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: #222;
  color: #d8d8d8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.sift-video-type-filter button.active {
  border-color: rgba(88, 224, 177, 0.55);
  background: rgba(88, 224, 177, 0.12);
  color: #baf4df;
}

.sift-dual-range {
  position: relative;
  height: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.sift-dual-range::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.1) 0 var(--sift-range-min), #58e0b1 var(--sift-range-min) var(--sift-range-max), rgba(255, 255, 255, 0.1) var(--sift-range-max) 100%);
}
.sift-dual-range input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 20px;
  margin: 0;
  border: 0;
  outline: 0;
  background: transparent;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
}
.sift-dual-range input::-webkit-slider-runnable-track { height: 4px; background: transparent; }
.sift-dual-range input::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border: 0;
  border-radius: 999px;
  background: #58e0b1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  cursor: grab;
  appearance: none;
  -webkit-appearance: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sift-dual-range input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 0 4px rgba(88, 224, 177, 0.2), 0 2px 8px rgba(0, 0, 0, 0.5);
}
.sift-dual-range input::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.2);
}
.sift-range-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}
.sift-range-values output {
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: #1a1a1a;
  color: #ededed;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sift-filter-field select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  outline: 0;
  background: #222 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a0a0a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center / 16px;
  color: #f1f1f1;
  color-scheme: dark;
  font-size: 13px;
  font-weight: 500;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.sift-filter-field select:focus {
  border-color: rgba(88, 224, 177, 0.6);
  box-shadow: 0 0 0 2px rgba(88, 224, 177, 0.1);
}
.sift-custom-filter-reset-wrap {
  padding-top: 14px;
  display: flex;
}
.sift-custom-filter-reset-wrap button {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: #242424;
  color: #d0d0d0;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.sift-custom-filter-reset-wrap button:hover {
  background: #2c2c2c;
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.sift-sidebar-actions {
  position: sticky;
  bottom: -4px;
  z-index: 2;
  margin-top: auto;
  padding: 12px 12px 4px;
  display: flex;
  gap: 8px;
  background: #1a1a1a;
}
.sift-sidebar-actions button {
  min-width: 0;
  flex: 1;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: #242424;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  color: #d0d0d0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.sift-sidebar-actions button svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sift-sidebar-actions .sift-sidebar-return-home {
  max-width: 42px;
}
.sift-sidebar-actions button:hover {
  background: #2c2c2c;
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.sift-sidebar-actions button:disabled { opacity: 0.35; cursor: not-allowed; }
.sift-custom-filter-section:has(.sift-custom-filter[aria-expanded="true"]) + .sift-sidebar-actions .sift-sidebar-reset { display: none; }

/* Collapsed Sidebar Styles */
.sift-sidebar.collapsed { width: 56px; flex-basis: 56px; }
.sift-sidebar.collapsed .sift-sidebar-title { padding: 0 6px; justify-content: center; }
.sift-sidebar.collapsed .sift-sidebar-brand-home { display: none; }
.sift-sidebar.collapsed .sift-sidebar-title-actions { gap: 0; }
.sift-sidebar.collapsed .sift-sidebar-title button { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; }
.sift-sidebar.collapsed .sift-brand-mark,
.sift-sidebar.collapsed .sift-sidebar-title strong,
.sift-sidebar.collapsed .sift-presets-heading,
.sift-sidebar.collapsed .sift-preset > span,
.sift-sidebar.collapsed .sift-preset > b,
.sift-sidebar.collapsed .sift-custom-filter-section { display: none; }
.sift-sidebar.collapsed .sift-presets { flex: 0 0 auto; padding: 8px 1px; align-items: center; gap: 8px; }
.sift-sidebar.collapsed .sift-preset { width: 40px; min-width: 40px; height: 40px; min-height: 40px; aspect-ratio: 1; padding: 0; flex: 0 0 40px; display: grid; grid-template-columns: 40px; place-items: center; gap: 0; overflow: hidden; border-color: rgba(255, 255, 255, 0.06); border-radius: 10px; background: rgba(255, 255, 255, 0.05); cursor: pointer; }
.sift-sidebar.collapsed .sift-preset.active { border-color: rgba(88, 224, 177, 0.5); background: rgba(88, 224, 177, 0.16); }
.sift-sidebar.collapsed .sift-preset:focus-visible { outline: 0; box-shadow: inset 0 0 0 2px #58e0b1; }
.sift-sidebar.collapsed .sift-preset i { width: 40px; height: 40px; border-radius: 9px; background: transparent; }
.sift-sidebar.collapsed .sift-settings-collapsed { width: 40px; height: 40px; margin: 0 auto; padding: 0; display: grid; place-items: center; flex: 0 0 40px; border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 10px; background: rgba(255, 255, 255, 0.05); color: #a8a8a8; cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.sift-sidebar.collapsed .sift-settings-collapsed:hover { border-color: rgba(255, 255, 255, 0.16); background: #262626; color: #fff; }
.sift-sidebar.collapsed .sift-settings-collapsed svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sift-sidebar.collapsed .sift-sidebar-actions { margin-top: 0; padding: 2px 1px 4px; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.sift-sidebar.collapsed .sift-sidebar-actions::before { content: ''; width: 28px; height: 1px; margin: 2px 0; flex: 0 0 1px; background: rgba(255, 255, 255, 0.08); }
.sift-sidebar.collapsed .sift-sidebar-actions button { width: 40px; height: 40px; flex: 0 0 40px; padding: 0; display: flex; border-color: rgba(255, 255, 255, 0.06); background: rgba(255, 255, 255, 0.05); }
.sift-sidebar.collapsed .sift-sidebar-actions .sift-sidebar-reset { display: none; }
.sift-sidebar.collapsed .sift-sidebar-actions svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sift-sidebar.collapsed .sift-preset:not(.active):hover { border-color: rgba(255, 255, 255, 0.16); background: #262626; color: #fff; }
.sift-sidebar.collapsed .sift-sidebar-actions button:not(:disabled):hover { border-color: rgba(255, 255, 255, 0.16); background: #2c2c2c; color: #fff; }

/* Pre-collapsed state: applied before JS runs to prevent FOUC */
html.sidebar-pre-collapsed #sidebar { width: 56px; flex-basis: 56px; }
html.sidebar-pre-collapsed #siftLayout .sift-collapsed-main-title { display: flex; }


.sift-main {
  min-width: 0;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sift-toolbar {
  padding-right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.sift-toolbar-left, .sift-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sift-toolbar-left { min-width: 0; flex: 1; }
.sift-toolbar-right { flex: 0 0 auto; }

.sift-collapsed-main-title {
  padding: 0;
  display: none;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  border: 0 !important;
  background: transparent !important;
  cursor: pointer;
}
.sift-collapsed-main-title strong {
  color: #f5f5f5;
  font-size: 17px;
  line-height: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.sift-layout.sidebar-collapsed .sift-collapsed-main-title { display: flex; }

.sift-toolbar button, .sift-search {
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: #1a1a1a;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.sift-toolbar button:hover {
  background: #222222;
  border-color: rgba(255, 255, 255, 0.14);
}

.sift-sort-menu-wrap { position: relative; flex: 0 0 auto; }
.sift-sort {
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.sift-sort strong { color: #fff; font-size: 13px; font-weight: 700; }
.sift-sort-popover[hidden] { display: none; }
.sift-sort-popover {
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  left: 0;
  min-width: 140px;
  width: max-content;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: #161616;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 4px 12px rgba(0, 0, 0, 0.35);
}
.sift-sort-popover button {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d6d6d6;
  text-align: left;
  cursor: pointer;
}
.sift-sort-popover button:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.sift-sort-popover button.active > span { color: #fff; font-weight: 700; }
.sift-sort-popover button > b {
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  opacity: 0;
  flex-shrink: 0;
}
.sift-sort-popover button.active > b { opacity: 1; }
.sift-sort-popover button > b svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; }

.sift-filter-icon {
  width: 38px;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #e0e0e0;
}
.sift-filter-icon svg { transition: transform 0.2s ease; }
.sift-filter-icon.ascending svg { transform: rotate(180deg); }

.sift-search {
  width: min(320px, 35vw);
  min-width: 160px;
  display: flex;
  align-items: center;
  padding: 0 10px 0 12px;
}
.sift-search:hover { border-color: rgba(255, 255, 255, 0.14); }
.sift-search:focus-within { border-color: rgba(255, 255, 255, 0.18); }
.sift-search > span {
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  color: #8a8a8a;
}
.sift-search > span svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.sift-search input {
  min-width: 0;
  flex: 1;
  height: 100%;
  padding: 0 6px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 13px;
}
.sift-search input::placeholder { color: #8a8a8a; }

/* Keyword Chips */
.sift-search-keyword-chips {
  min-width: 0;
  min-height: 32px;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sift-search-keyword-chips::-webkit-scrollbar { display: none; }
.sift-search-keyword-chip {
  position: relative;
  min-width: 48px;
  height: 32px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: #272727;
  color: #fff;
  overflow: hidden;
  user-select: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.sift-search-keyword-chip:hover { background: #3f3f3f; }
.sift-search-keyword-chip[data-active="true"] { background: #f1f1f1; color: #0f0f0f; font-weight: 700; }
.sift-search-keyword-chip .sift-search-keyword-open {
  min-width: 48px;
  height: 32px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  white-space: nowrap;
}

.sift-all-filters {
  position: relative;
  width: 36px;
  flex: 0 0 36px;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #d5d7d8;
}
.sift-all-filters svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sift-all-filters[aria-expanded="true"], .sift-all-filters[data-active="true"] {
  border-color: rgba(88, 224, 177, 0.34);
  background: rgba(88, 224, 177, 0.1);
  color: #8cebc9;
}
.sift-all-filters-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: none;
  place-items: center;
  border: 2px solid #111;
  border-radius: 999px;
  background: #58e0b1;
  color: #07130f;
  font-size: 9px;
  line-height: 1;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.sift-all-filters-count[data-active="true"] { display: grid; }

.sift-result-count {
  color: #a0a0a0;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Filter Chips (Selected tags) */
.sift-filter-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  flex-wrap: wrap;
}
.sift-filter-chips:empty { display: none; }
.sift-filter-chips button {
  padding: 4px 8px 4px 10px;
  display: flex;
  gap: 6px;
  align-items: center;
  border: 1px solid transparent;
  background: transparent;
  color: #a0a0a0;
  font-size: 12px;
  cursor: pointer;
}
.sift-filter-chips button:not(.sift-clear-all) {
  border-color: rgba(88, 224, 177, 0.3);
  border-radius: 999px;
  background: rgba(88, 224, 177, 0.1);
  color: #8cebc9;
}
.sift-filter-chips .sift-clear-all { border: 0; color: #a0a0a0; font-weight: 700; }
.sift-filter-chips .sift-clear-all:hover { color: #fff; }
.sift-filter-chips strong { color: #fff; }
.sift-filter-chips b {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-align: center;
  line-height: 16px;
  font-size: 11px;
}

/* Grid & Cards */
.sift-results-scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
}
.sift-results-scroll::-webkit-scrollbar { width: 6px; }
.sift-results-scroll::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(255, 255, 255, 0.12); }
.sift-results-scroll:hover::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.22); }

.sift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  align-content: start;
  gap: 12px;
  width: 100%;
}

.sift-video-card {
  min-width: 0;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: #161616;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.sift-video-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: #1a1a1a;
}

.sift-thumbnail-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  background: #0a0a0a;
}
.sift-thumbnail-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.sift-thumbnail-play-target {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.sift-folder-badge {
  position: absolute;
  z-index: 2;
  top: 7px;
  left: 7px;
  max-width: calc(100% - 60px);
  height: 25px;
  padding: 0 9px 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  cursor: pointer;
  user-select: none;
}
.sift-folder-badge:hover {
  background: rgba(0, 0, 0, 0.66);
  border-color: rgba(255, 255, 255, 0.22);
}
.sift-folder-badge.pinned {
  height: 24px;
  padding-right: 8px;
  padding-left: 7px;
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.86);
  color: #111;
  cursor: grab;
}
.sift-folder-badge.pinned:active {
  cursor: grabbing;
}
.sift-folder-badge svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  fill: currentColor;
}
.sift-folder-badge b {
  min-width: 0;
  overflow: hidden;
  font-size: 10.5px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sift-thumbnail-metrics {
  position: absolute;
  z-index: 2;
  top: 6px;
  right: 6px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.sift-thumbnail-metric {
  width: auto;
  min-width: 36px;
  height: 20px;
  margin: 0;
  padding: 0 7px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #34343a;
  border-radius: 6px;
  background: #202124;
  color: #f8f9fa;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 5px rgba(0, 0, 0, 0.34);
  font: 700 11px/18px system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sift-performance-badge {
  border-color: #414145;
  background: #292a2d;
  color: #f1f3f4;
}
.sift-performance-badge.outlier-blue { border-color: #4389ed; background: #1469e8; color: #fff; }
.sift-performance-badge.outlier-purple { border-color: #936fff; background: #7047eb; color: #fff; }
.sift-performance-badge.outlier-red { border-color: #ef4b72; background: #d41445; color: #fff; }

.sift-duration {
  position: absolute;
  z-index: 2;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 11px;
  line-height: 14px;
  pointer-events: none;
}

.sift-card-content {
  min-width: 0;
  padding: 10px;
  display: flex;
  gap: 10px;
}
.sift-channel-avatar {
  width: 28px;
  height: 28px;
  margin-top: 2px;
  flex: 0 0 28px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #2a2a2a;
  color: #d0d0d0;
  font-size: 12px;
  font-weight: 800;
}
.sift-channel-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }

.sift-card-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sift-card-copy h3 {
  min-height: 36px;
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  color: #f0f0f0;
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.sift-channel {
  min-width: 0;
  min-height: 16px;
  margin: 0 0 2px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #909090;
  font-size: 12px;
  line-height: 16px;
}
.sift-channel > span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sift-subscriber-badge {
  min-width: 0;
  flex: 0 0 auto;
  padding: 1px 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  background: #18181b;
  color: #b7b7bd;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  font-size: 10px;
  line-height: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.sift-meta {
  min-height: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #808080;
  font-size: 12px;
  line-height: 16px;
}
.sift-meta > p {
  min-width: 0;
  flex: 1;
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* All Filters Modal (정렬 및 필터) */
.sift-all-filter-overlay[hidden] { display: none; }
.sift-all-filter-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: start center;
  padding: 74px 32px 32px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}
.sift-all-filter-overlay[data-open="true"] { opacity: 1; pointer-events: auto; }
.sift-all-filter-dialog {
  width: min(840px, 100%);
  max-height: calc(100% - 8px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  outline: none;
  background: rgba(28, 28, 28, 0.985);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.6), 0 2px 10px rgba(0, 0, 0, 0.4);
  transform: translateY(-8px) scale(0.985);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sift-all-filter-overlay[data-open="true"] .sift-all-filter-dialog { transform: translateY(0) scale(1); }
.sift-all-filter-header {
  min-height: 68px;
  padding: 0 18px 0 22px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}
.sift-all-filter-header > i {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(88, 224, 177, 0.11);
  color: #8cebc9;
}
.sift-all-filter-header > i svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.sift-all-filter-title { min-width: 0; flex: 1; }
.sift-all-filter-title strong { color: #f3f3f3; font-size: 14px; line-height: 18px; letter-spacing: -0.01em; display: block; }
.sift-all-filter-title span { margin-top: 2px; color: #777; font-size: 9px; line-height: 12px; display: block; }
.sift-all-filter-close {
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #999;
  cursor: pointer;
}
.sift-all-filter-close:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.sift-all-filter-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

.sift-all-filter-body { min-height: 0; flex: 1; overflow-y: auto; padding: 22px; }
.sift-all-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 20px; }
.sift-all-filter-group > strong {
  display: block;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #f0f0f0;
  font-size: 12px;
  line-height: 18px;
  font-weight: 750;
}
.sift-all-filter-options { padding-top: 7px; display: flex; flex-direction: column; gap: 2px; }
.sift-all-filter-options button {
  min-height: 34px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #999;
  font-size: 12px;
  line-height: 18px;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.sift-all-filter-options button:hover { background: rgba(255, 255, 255, 0.055); color: #e8e8e8; }
.sift-all-filter-options button[aria-pressed="true"] { color: #f4f4f4; font-weight: 750; }
.sift-all-filter-options button[aria-pressed="true"]::after {
  content: '';
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #58e0b1;
  box-shadow: 0 0 0 3px rgba(88, 224, 177, 0.1);
}
.sift-all-filter-footer {
  margin-top: 20px;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
}
.sift-all-filter-footer span { color: #777; font-size: 10px; line-height: 15px; }
.sift-all-filter-footer button {
  height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: #242424;
  color: #d8d8d8;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.sift-all-filter-footer button:hover { background: #2b2b2b; color: #fff; }

/* Modal Player */
.sift-player-overlay[hidden] { display: none; }
.sift-player-overlay { position: fixed; inset: 0; z-index: 2147483647; padding: 48px 32px; display: grid; place-items: center; overflow: auto; background: rgba(0, 0, 0, 0.96); opacity: 0; pointer-events: none; transition: opacity 0.18s ease; font-family: Arial, sans-serif; }
.sift-player-overlay[data-open="true"] { opacity: 1; pointer-events: auto; }
.sift-player-dialog { width: min(1280px, calc(100vw - 64px)); display: flex; flex-direction: column; gap: 20px; outline: none; opacity: 0; transform: translateY(10px) scale(0.97); transition: opacity 0.28s ease, transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1); }
.sift-player-overlay[data-open="true"] .sift-player-dialog { opacity: 1; transform: translateY(0) scale(1); }
.sift-player-frame-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px; background: #000; box-shadow: 0 28px 90px rgba(0, 0, 0, 0.72); }
.sift-player-frame-wrap iframe { width: 100%; height: 100%; display: block; border: 0; opacity: 0; transition: opacity 0.35s ease; }
.sift-player-overlay[data-loaded="true"] .sift-player-frame-wrap iframe { opacity: 1; }
.sift-player-loading { position: absolute; inset: 0; display: grid; place-items: center; background: #000; opacity: 1; visibility: visible; transition: opacity 0.25s ease, visibility 0.25s ease; pointer-events: none; }
.sift-player-loading i { width: 40px; height: 40px; border: 2px solid rgba(255, 255, 255, 0.12); border-top-color: rgba(255, 255, 255, 0.82); border-radius: 999px; animation: sift-player-spin 0.8s linear infinite; }
@keyframes sift-player-spin { 100% { transform: rotate(360deg); } }
.sift-player-overlay[data-loaded="true"] .sift-player-loading { opacity: 0; visibility: hidden; }
.sift-player-fallback { position: absolute; inset: 0; z-index: 2; padding: 24px; display: none; place-items: center; align-content: center; gap: 10px; background: #0b0b0b; color: #fff; text-align: center; }
.sift-player-overlay[data-fallback="true"] .sift-player-fallback { display: grid; }
.sift-player-overlay[data-fallback="true"] .sift-player-loading { display: none; }
.sift-player-fallback .sift-brand-mark { width: 44px; height: 44px; border-radius: 12px; font-size: 20px; }
.sift-player-fallback strong { font-size: 17px; }
.sift-player-fallback p { margin: 0; color: #929292; font-size: 13px; }
.sift-player-fallback button { margin-top: 6px; padding: 10px 14px; border: 0; border-radius: 10px; background: #58e0b1; color: #07130f; font-weight: 800; cursor: pointer; }
.sift-player-close { position: fixed; z-index: 2; top: 22px; right: 24px; width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.72); cursor: pointer; transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease; }
.sift-player-close:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.sift-player-close:active { transform: scale(0.96); }
.sift-player-close:focus-visible { outline: 2px solid #58e0b1; outline-offset: 2px; }
.sift-player-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.sift-player-details { min-width: 0; padding: 0 8px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: #fff; }
.sift-player-identity { min-width: 0; display: flex; align-items: center; gap: 14px; }
.sift-player-avatar { width: 46px; height: 46px; flex: 0 0 46px; overflow: hidden; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.48); font-size: 13px; font-weight: 800; }
.sift-player-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.sift-player-copy { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.sift-player-copy h2 { margin: 0; overflow: hidden; color: rgba(255, 255, 255, 0.95); font-size: clamp(17px, 2vw, 24px); line-height: 1.2; font-weight: 750; letter-spacing: -0.02em; white-space: nowrap; text-overflow: ellipsis; }
.sift-player-copy p { min-width: 0; margin: 0; display: flex; align-items: center; gap: 8px; overflow: hidden; color: rgba(255, 255, 255, 0.5); font-size: 13px; line-height: 18px; white-space: nowrap; }
.sift-player-copy p strong { min-width: 0; overflow: hidden; color: rgba(255, 255, 255, 0.72); font-weight: 600; text-overflow: ellipsis; }
.sift-player-copy p > span { width: 3px; height: 3px; flex: 0 0 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.22); }
.sift-player-copy p small { overflow: hidden; font: inherit; text-overflow: ellipsis; }
.sift-player-open { flex: 0 0 auto; padding: 8px 11px; display: flex; align-items: center; gap: 7px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.72); text-decoration: none; transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.sift-player-open:hover { border-color: rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.12); color: #fff; }
.sift-player-open:focus-visible { outline: 2px solid #58e0b1; outline-offset: 2px; }
.sift-player-open i { position: relative; width: 18px; height: 13px; flex: 0 0 18px; border-radius: 3px; background: #ff0033; }
.sift-player-open i::after { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-top: 3px solid transparent; border-bottom: 3px solid transparent; border-left: 5px solid #fff; transform: translate(-38%, -50%); }

/* Login Modal */
.sift-login-view {
  grid-column: 1 / -1;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sift-login-card {
  width: min(420px, 100%);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: #18181b;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.sift-login-mark {
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #58e0b1;
  color: #07130f;
  font-size: 22px;
  font-weight: 900;
}
.sift-login-card h3 { font-size: 18px; margin-bottom: 6px; }
.sift-login-card p { font-size: 13px; color: #888; margin-bottom: 24px; line-height: 1.4; }
.account-btn {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #242428;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.account-btn:hover { background: #2f2f35; border-color: rgba(88, 224, 177, 0.4); }

/* --- Additional Full Chrome Extension Styles (Quick Actions, Popovers, Settings Modal) --- */
.sift-metric-popover[hidden] { display: none; }
.sift-metric-popover {
  position: absolute;
  z-index: 5;
  top: 25px;
  right: 0;
  width: 148px;
  padding: 7px;
  overflow: hidden;
  display: grid;
  gap: 2px;
  border: 1px solid #3c4043;
  border-radius: 9px;
  background: #202124;
  color: #f1f3f4;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.sift-metric-popover > span {
  position: relative;
  z-index: 1;
  min-height: 23px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 5px;
}
.sift-metric-popover b {
  color: #9aa0a6;
  font: 600 10px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.sift-metric-popover strong {
  color: #f8f9fa;
  font: 700 11px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}
.sift-growth-backdrop {
  position: absolute;
  z-index: 0;
  inset: 7px;
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  opacity: 0.34;
  pointer-events: none;
}

.sift-quick-actions {
  position: absolute;
  z-index: 3;
  left: 6px;
  bottom: 6px;
  padding: 2px;
  display: flex;
  align-items: center;
  gap: 1px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: auto;
}
.sift-thumbnail-wrap:hover .sift-quick-actions,
.sift-quick-actions:hover,
.sift-quick-actions:focus-within {
  opacity: 1;
  transform: translateY(0);
}
.sift-quick-actions button {
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.sift-quick-actions button:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.sift-quick-actions button.active { background: #fff; color: #111; }
.sift-quick-actions button[data-status="done"] { background: #fff; color: #111; }
.sift-quick-actions button[data-status="error"] { color: #ff6b7a; }
.sift-quick-actions svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

button.sift-thumbnail-metric { cursor: pointer; }
button.sift-thumbnail-metric:hover {
  filter: brightness(1.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 3px 8px rgba(0, 0, 0, 0.38);
}
button.sift-thumbnail-metric:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.9); outline-offset: 2px; }

/* Settings Modal & Overlay */
.sift-settings-overlay[hidden] { display: none; }
.sift-settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  padding: 28px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.78);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.sift-settings-overlay[data-open="true"] { opacity: 1; pointer-events: auto; }
.sift-settings-dialog {
  position: relative;
  width: min(920px, calc(100% - 32px));
  height: min(700px, calc(100% - 32px));
  min-height: 480px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 22px;
  outline: none;
  background: linear-gradient(145deg, rgba(35, 35, 35, 0.94), rgba(18, 18, 18, 0.96));
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.66), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sift-settings-overlay[data-open="true"] .sift-settings-dialog { opacity: 1; transform: translateY(0) scale(1); }
.sift-settings-header {
  height: 68px;
  padding: 0 22px 0 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sift-settings-title { display: flex; align-items: center; gap: 12px; }
.sift-settings-title i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(88, 224, 177, 0.13);
  color: #78e8c0;
}
.sift-settings-title i svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sift-settings-title h2 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 750; letter-spacing: -0.02em; }
.sift-settings-summary { margin-left: auto; color: #8d8d8d; font-size: 12px; font-variant-numeric: tabular-nums; }
.sift-settings-summary strong { color: #e9e9e9; }
.sift-settings-close {
  width: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #969696;
  cursor: pointer;
}
.sift-settings-close:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sift-settings-close svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.sift-settings-tabs { height: 50px; padding: 0 26px; display: flex; gap: 28px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.sift-settings-tabs button {
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8f8f8f;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.sift-settings-tabs button::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: #58e0b1;
  opacity: 0;
  transform: scaleX(0.55);
  transition: opacity 0.15s ease, transform 0.2s ease;
}
.sift-settings-tabs button:hover { color: #d8d8d8; }
.sift-settings-tabs button[aria-selected="true"] { color: #fff; }
.sift-settings-tabs button[aria-selected="true"]::after { opacity: 1; transform: scaleX(1); }
.sift-settings-body { min-height: 0; flex: 1; overflow: auto; padding: 22px 26px 28px; }
.sift-settings-body::-webkit-scrollbar { width: 6px; }
.sift-settings-body::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(255, 255, 255, 0.14); }
.sift-settings-toolbar {
  position: sticky;
  z-index: 2;
  top: -22px;
  margin: -22px -26px 18px;
  padding: 18px 26px 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(24, 24, 24, 0.96);
}
.sift-settings-search {
  min-width: 0;
  flex: 1;
  height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 11px;
  outline: 0;
  background: rgba(255, 255, 255, 0.035);
  color: #f2f2f2;
  font: 500 12px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.sift-settings-search:focus { border-color: rgba(88, 224, 177, 0.5); box-shadow: 0 0 0 3px rgba(88, 224, 177, 0.08); }
.sift-settings-button {
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #c9c9c9;
  font: 700 11px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}
.sift-settings-button:hover { border-color: rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.09); color: #fff; }
.sift-settings-button.primary { border-color: rgba(88, 224, 177, 0.34); background: rgba(88, 224, 177, 0.14); color: #8cebc9; }
.sift-settings-button.danger:hover { border-color: rgba(255, 115, 125, 0.35); background: rgba(255, 74, 87, 0.1); color: #ff9ca4; }
.sift-settings-button:disabled { opacity: 0.42; cursor: default; }
.sift-settings-icon-button {
  width: 31px;
  height: 31px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #777;
  cursor: pointer;
}
.sift-settings-icon-button:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sift-settings-icon-button.danger:hover { background: rgba(255, 74, 87, 0.1); color: #ff8f98; }
.sift-settings-row-actions { display: flex; align-items: center; gap: 2px; opacity: 0.35; transition: opacity 0.15s ease; }
.sift-settings-row:hover .sift-settings-row-actions, .sift-settings-row-actions:focus-within { opacity: 1; }

.sift-settings-state { min-height: 100%; display: grid; place-items: center; color: #818181; font-size: 13px; text-align: center; }
.sift-settings-state[data-error="true"] { color: #ff9d9d; }
.sift-settings-list { display: flex; flex-direction: column; gap: 8px; }
.sift-settings-group-block { display: flex; flex-direction: column; gap: 5px; }
.sift-settings-group-block[hidden], .sift-settings-channel-row[hidden] { display: none !important; }
.sift-settings-group-channels { display: flex; flex-direction: column; gap: 4px; }
.sift-settings-row {
  min-height: 58px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}
.sift-settings-row:hover { border-color: rgba(255, 255, 255, 0.11); background: rgba(255, 255, 255, 0.045); }
.sift-settings-channel-row { min-height: 50px; padding-top: 7px; padding-bottom: 7px; border-color: rgba(255, 255, 255, 0.045); background: rgba(0, 0, 0, 0.12); }
.sift-settings-channel-row:hover { border-color: rgba(88, 224, 177, 0.14); background: rgba(88, 224, 177, 0.035); }
.sift-settings-channel-row .sift-settings-row-icon { width: 30px; height: 30px; flex-basis: 30px; }
.sift-settings-channel-row .sift-settings-row-copy strong { font-size: 12px; }
.sift-settings-channel-row .sift-settings-row-copy span { margin-top: 0; font-size: 10px; }
.sift-settings-row-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #bdbdbd;
  font-size: 12px;
  font-weight: 800;
}
.sift-settings-row-icon.round { border-radius: 999px; }
.sift-settings-row-icon img { width: 100%; height: 100%; object-fit: cover; }
.sift-settings-row-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sift-settings-row-copy { min-width: 0; flex: 1; }
.sift-settings-row-copy strong { display: block; overflow: hidden; color: #ececec; font-size: 13px; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.sift-settings-row-copy span { display: block; margin-top: 2px; overflow: hidden; color: #777; font-size: 11px; line-height: 15px; text-overflow: ellipsis; white-space: nowrap; }
.sift-settings-depth { width: calc(var(--sift-folder-depth, 0) * 18px); flex: 0 0 calc(var(--sift-folder-depth, 0) * 18px); }

.sift-settings-sheet { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: 24px; background: rgba(0, 0, 0, 0.72); }
.sift-settings-sheet-card {
  width: min(430px, 100%);
  max-height: min(560px, calc(100% - 20px));
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background: #1c1c1c;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}
.sift-settings-sheet-card h3 { margin: 0; color: #f5f5f5; font-size: 16px; line-height: 22px; }
.sift-settings-sheet-card p { margin: 7px 0 18px; color: #858585; font-size: 11px; line-height: 17px; }
.sift-settings-sheet-card input:not([type="checkbox"]), .sift-settings-sheet-card select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  outline: 0;
  background: #252525;
  color: #f5f5f5;
  font-size: 12px;
}
.sift-settings-sheet-actions { margin-top: 18px; display: flex; justify-content: flex-end; gap: 8px; }
.sift-settings-checks { max-height: 300px; overflow: auto; padding: 5px; display: flex; flex-direction: column; gap: 3px; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 14px; background: rgba(0, 0, 0, 0.13); }
.sift-settings-check { min-height: 42px; flex: 0 0 auto; padding: 0 11px; display: flex; align-items: center; gap: 11px; border: 1px solid transparent; border-radius: 10px; color: #c5c5c5; font-size: 12px; font-weight: 650; cursor: pointer; }
.sift-settings-check:hover { background: rgba(255, 255, 255, 0.045); color: #f1f1f1; }
.sift-settings-check:has(input:checked) { border-color: rgba(88, 224, 177, 0.18); background: rgba(88, 224, 177, 0.08); color: #e9fff7; }
.sift-settings-check input[type="checkbox"] { width: 18px; height: 18px; accent-color: #58e0b1; cursor: pointer; }

.sift-settings-toast {
  position: absolute;
  right: 22px;
  bottom: 20px;
  z-index: 6;
  max-width: 360px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  background: #292929;
  color: #f2f2f2;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
  font-size: 11px;
}
.sift-settings-toast[data-error="true"] { border-color: rgba(255, 105, 115, 0.32); color: #ffadb3; }

