body:not([data-nav-context="favorite"]) {
  padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important;
}
.library-toolbar-wrap {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0 -8px 10px;
  padding: 8px 8px 9px;
  background: linear-gradient(to bottom, rgba(249, 250, 251, 0.98) 72%, rgba(249, 250, 251, 0));
}
[data-theme="dark"] .library-toolbar-wrap {
  background: linear-gradient(to bottom, rgba(17, 24, 39, 0.98) 72%, rgba(17, 24, 39, 0));
}
.library-toolbar {
  max-width: 760px;
  margin: 0 auto;
}
.library-toolbar-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mode-tabs {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-height: 38px;
  padding: 5px;
  border: 1px solid rgba(35, 34, 30, 0.055);
  border-radius: 15px;
  background: rgba(231, 230, 225, 0.64);
  transition: max-height 180ms ease, margin 180ms ease, padding 180ms ease, opacity 140ms ease;
}
.mode-tabs::-webkit-scrollbar {
  display: none;
}
.mode-tab {
  min-height: 28px;
  border: 0;
  background: transparent;
  color: rgba(35, 34, 30, 0.58);
  border-radius: 10px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 570;
  line-height: 18px;
  white-space: nowrap;
  transition: color 140ms ease, background-color 140ms ease, box-shadow 160ms ease, transform 120ms ease;
}
.mode-tab:hover { color: rgba(35, 34, 30, 0.86); }
.mode-tab:active { transform: scale(0.97); }
.mode-tab:focus-visible {
  outline: 2px solid rgba(35, 34, 30, 0.72);
  outline-offset: 1px;
}
[data-theme="dark"] .mode-tabs {
  border-color: rgba(255, 255, 255, 0.055);
  background: rgba(46, 46, 43, 0.72);
}
[data-theme="dark"] .mode-tab {
  color: rgba(255, 255, 255, 0.58);
}
[data-theme="dark"] .mode-tab:hover { color: rgba(255, 255, 255, 0.9); }
[data-theme="dark"] .mode-tab:focus-visible { outline-color: rgba(255, 255, 255, 0.8); }
.mode-tab.is-active {
  background: rgba(255, 255, 255, 0.9);
  color: #24231f;
  box-shadow: 0 1px 2px rgba(32, 30, 24, 0.09), 0 4px 12px rgba(32, 30, 24, 0.045);
}
[data-theme="dark"] .mode-tab.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 2px 9px rgba(0, 0, 0, 0.12);
}
.library-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  max-height: 0;
  margin-top: 0;
  min-height: 0;
  padding: 0 10px 0 14px;
  border: 1px solid rgba(35, 34, 30, 0.075);
  border-radius: 16px;
  background: rgba(247, 246, 242, 0.92);
  box-shadow: 0 1px 1px rgba(35, 34, 30, 0.025), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  visibility: hidden;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition: max-height 180ms ease, margin 180ms ease, opacity 140ms ease, transform 180ms ease,
    background-color 160ms ease, border-color 160ms ease, box-shadow 180ms ease;
}
.library-toolbar.is-search-open .library-search {
  max-height: 46px;
  margin-top: 6px;
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}
.library-search:focus-within {
  border-color: rgba(35, 34, 30, 0.2);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 2px rgba(35, 34, 30, 0.05), 0 8px 24px rgba(35, 34, 30, 0.07);
}
.library-search-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: rgba(35, 34, 30, 0.42);
  stroke-width: 2;
}
[data-theme="dark"] .library-search {
  border-color: rgba(255, 255, 255, 0.075);
  background: rgba(31, 31, 29, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}
[data-theme="dark"] .library-search:focus-within {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(36, 36, 34, 0.98);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.18);
}
[data-theme="dark"] .library-search-icon { color: rgba(255, 255, 255, 0.42); }
.library-search input {
  min-width: 0;
  height: 44px;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font-size: 14px;
}
.library-search input::-webkit-search-cancel-button { display: none; }
.library-search input::placeholder { color: rgba(35, 34, 30, 0.4); }
[data-theme="dark"] .library-search input::placeholder { color: rgba(255, 255, 255, 0.38); }
.library-search-clear {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  color: rgba(35, 34, 30, 0.48);
  background: rgba(35, 34, 30, 0.07);
  transition: color 140ms ease, background-color 140ms ease, transform 120ms ease;
}
.library-search-clear:hover { color: #24231f; background: rgba(35, 34, 30, 0.11); }
.library-search-clear:active { transform: scale(0.9); }
.library-search-clear:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.library-search-clear svg { width: 15px; height: 15px; stroke-width: 2.2; }
.library-search-clear[hidden] { display: none; }
[data-theme="dark"] .library-search-clear {
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.09);
}
[data-theme="dark"] .library-search-clear:hover { color: #fff; background: rgba(255, 255, 255, 0.14); }
.library-search-toggle {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(35, 34, 30, 0.055);
  border-radius: 13px;
  color: rgba(35, 34, 30, 0.52);
  background: rgba(231, 230, 225, 0.64);
  transition: color 140ms ease, background-color 140ms ease, transform 120ms ease;
}
.library-search-toggle svg { width: 17px; height: 17px; stroke-width: 2; }
.library-search-toggle:hover,
.library-search-toggle[aria-expanded="true"],
.library-toolbar.is-searching .library-search-toggle {
  color: #24231f;
  background: rgba(255, 255, 255, 0.9);
}
.library-search-toggle:active { transform: scale(0.94); }
.library-search-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
[data-theme="dark"] .library-search-toggle {
  border-color: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.58);
  background: rgba(46, 46, 43, 0.72);
}
[data-theme="dark"] .library-search-toggle:hover,
[data-theme="dark"] .library-search-toggle[aria-expanded="true"],
[data-theme="dark"] .library-toolbar.is-searching .library-search-toggle {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}
@media (min-width: 768px) {
  .library-toolbar-wrap { margin-right: -12px; margin-left: -12px; padding-right: 12px; padding-left: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .mode-tabs, .mode-tab, .library-search, .library-search-clear, .library-search-toggle { transition-duration: 0.01ms !important; }
}
.collection-nav {
  display: flex;
  align-items: center;
  padding: 0 0 10px;
}
.collection-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #475569;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.82);
}
.collection-nav-back svg {
  width: 14px;
  height: 14px;
}
[data-theme="dark"] .collection-nav-back {
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(30, 41, 59, 0.8);
}
.collection-identity { display: flex; align-items: center; gap: 14px; padding: 0 2px 16px; }
.collection-identity-cover {
  position: relative;
  flex: 0 0 72px;
  width: 72px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 15px;
  background: #dedbd1;
  box-shadow: inset 0 0 0 1px rgba(35, 34, 30, 0.05), 0 5px 18px rgba(35, 34, 30, 0.08);
}
[data-theme="dark"] .collection-identity-cover { background: #292925; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 5px 18px rgba(0, 0, 0, 0.18); }
.collection-identity-collage { position: absolute; inset: 0; display: grid; gap: 1.5px; background: rgba(248, 247, 242, 0.9); }
[data-theme="dark"] .collection-identity-collage { background: rgba(25, 25, 22, 0.92); }
.collection-identity-collage[data-count="1"] { grid-template-columns: 1fr; }
.collection-identity-collage[data-count="2"] { grid-template-columns: 1.62fr 1fr; }
.collection-identity-collage[data-count="3"] { grid-template: repeat(2, 1fr) / 1.62fr 1fr; }
.collection-identity-collage[data-count="3"] .collection-identity-tile:first-child { grid-row: 1 / 3; }
.collection-identity-collage[data-count="4"] { grid-template: 1.12fr 1fr / 1.18fr 1fr; }
.collection-identity-tile { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.collection-identity-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.collection-identity-empty { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(35, 34, 30, 0.28); }
[data-theme="dark"] .collection-identity-empty { color: rgba(255, 255, 255, 0.28); }
.collection-identity-empty svg { width: 20px; height: 20px; stroke-width: 1.6; }
.collection-identity-copy { min-width: 0; flex: 1; }
.collection-identity-title { margin: 0; color: #292822; font-size: clamp(22px, 5vw, 30px); font-weight: 660; line-height: 1.08; letter-spacing: -0.035em; }
[data-theme="dark"] .collection-identity-title { color: rgba(255, 255, 255, 0.94); }
.collection-identity-count { margin-top: 6px; color: rgba(35, 34, 30, 0.42); font-size: 11px; }
[data-theme="dark"] .collection-identity-count { color: rgba(255, 255, 255, 0.4); }
.collection-identity-description { display: -webkit-box; max-width: 560px; margin-top: 5px; overflow: hidden; color: rgba(35, 34, 30, 0.58); font-size: 12px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
[data-theme="dark"] .collection-identity-description { color: rgba(255, 255, 255, 0.54); }
@media (min-width: 768px) {
  .collection-identity { gap: 18px; padding-bottom: 20px; }
  .collection-identity-cover { flex-basis: 84px; width: 84px; border-radius: 17px; }
}

.masonry-grid {
  --wf-gap: 8px;
  display: flex;
  align-items: flex-start;
  gap: var(--wf-gap);
}
@media (min-width: 768px) {
  .masonry-grid { --wf-gap: 10px; }
}
.waterfall-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--wf-gap);
}
.media-tile {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: #0b0f15;
  cursor: pointer;
}
.media-tile img {
  width: 100%;
  height: auto;
  display: block;
}
.media-tile video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  background: #000;
}
.tile-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.28);
}

.tile-progress::after {
  content: '';
  display: block;
  width: var(--progress);
  height: 100%;
  background: #e18462;
}

.tile-video-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  pointer-events: none;
}
.library-loading {
  text-align: center;
  color: #64748b;
  font-size: 12px;
  padding: 16px 0 8px;
}
.library-status-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}
.library-status-action {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  color: #334155;
  background: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 620;
}
[data-theme="dark"] .library-status-action {
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(148, 163, 184, 0.2);
}
.library-status-action[hidden] { display: none; }
/* Quick Flow Viewer */
#quick-view {
  position: fixed;
  inset: 0;
  z-index: 260;
  background: #000;
  display: none;
  overflow: hidden;
  touch-action: none;
}
#quick-view.active {
  display: block;
}
#quick-feed-layer {
  position: absolute;
  inset: 0;
}
.quick-media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #000;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.quick-media.active {
  display: block;
  opacity: 1;
}
#quick-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
}
#quick-close-top {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.15s ease, background 0.15s ease;
}
#quick-close-top:active {
  transform: scale(0.94);
  background: rgba(0, 0, 0, 0.66);
}
#quick-close-top svg {
  width: 18px;
  height: 18px;
}
.quick-counter {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  left: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 4px 10px;
  z-index: 30;
}
#quick-controls {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  height: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 30;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
#quick-controls.is-hidden {
  display: none;
}
.quick-time {
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  width: 38px;
  text-align: center;
}
.quick-progress-wrap {
  position: relative;
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
}
#quick-progress {
  -webkit-appearance: none;
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 2;
  cursor: pointer;
  margin: 0;
}
#quick-progress:disabled {
  cursor: default;
}
.quick-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
}
.quick-progress-fill {
  position: absolute;
  left: 0;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.95);
  width: 0%;
}
.quick-actions {
  position: absolute;
  right: 14px;
  bottom: calc(130px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 35;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.quick-btn {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  position: relative;
}
.quick-btn:active {
  transform: scale(0.92);
}
.quick-btn svg {
  width: 20px;
  height: 20px;
}
.quick-btn.is-favorited {
  background: rgba(239, 68, 68, 0.92);
  border-color: rgba(239, 68, 68, 0.96);
}
.quick-btn.is-active {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.78);
}
.quick-btn[data-current-cover="true"] {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.78);
  cursor: default;
}
.quick-btn .set-cover-current-icon { display: none; }
.quick-btn[data-current-cover="true"] .set-cover-default-icon { display: none; }
.quick-btn[data-current-cover="true"] .set-cover-current-icon { display: block; }
.quick-btn.is-hidden {
  display: none;
}
.quick-btn .collection-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
.quick-btn.has-collection {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.78);
}
.quick-btn.has-collection .collection-count {
  display: inline-flex;
}
#quick-speed {
  font-size: 14px;
  font-weight: 700;
  font-family: system-ui, -apple-system, sans-serif;
}
.quick-image-tool-wrap {
  position: relative;
}
.quick-zoom-options {
  position: absolute;
  right: 58px;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(8px);
  transition: all 0.2s ease;
}
.quick-zoom-options.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}
.quick-zoom-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.62);
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  font-weight: 700;
}
.quick-zoom-btn.active {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.78);
}
.quick-caption-panel {
  position: absolute;
  left: 16px;
  bottom: calc(114px + env(safe-area-inset-bottom));
  max-width: min(72vw, 420px);
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  z-index: 32;
  display: flex;
  flex-direction: column;
  gap: 8px;
  backdrop-filter: blur(10px);
}
.quick-caption-panel.is-hidden {
  display: none;
}
.quick-caption-title {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
}
.quick-caption-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.quick-caption-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.86);
}
#quick-caption.is-loading::after {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-top-color: transparent;
  animation: quick-caption-spin 0.9s linear infinite;
}
#quick-caption {
  position: relative;
}
#quick-caption.is-loading i {
  opacity: 0.35;
}
#quick-caption.is-error::after {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 999px;
  border: 1.5px solid rgba(248, 113, 113, 0.9);
}
@keyframes quick-caption-spin {
  to { transform: rotate(360deg); }
}
.quick-magnifier {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  background-repeat: no-repeat;
  background-color: #000;
  cursor: grab;
  z-index: 45;
  display: none;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.2s ease, width 0.2s ease, height 0.2s ease;
}
.quick-magnifier.quick-magnifier-large {
  width: 300px;
  height: 300px;
}
.quick-magnifier.active {
  display: block;
  transform: translate(-50%, -50%) scale(1);
}
#quick-play-status {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 28;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
#quick-play-status.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.08);
}
#quick-play-status svg {
  width: 38px;
  height: 38px;
  fill: currentColor;
  stroke: none;
}
.quick-mag-badge {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
}
#quick-view.immersive .quick-actions,
#quick-view.immersive #quick-controls,
#quick-view.immersive .quick-counter,
#quick-view.immersive .quick-caption-panel {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.quick-collection-modal {
  position: fixed;
  inset: 0;
  z-index: 280;
  background: rgba(15, 23, 42, 0.56);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}
.quick-collection-modal.active {
  opacity: 1;
  pointer-events: auto;
}
.quick-collection-card {
  width: min(440px, 100%);
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.98);
  color: #0f172a;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.3);
  padding: 12px;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
.quick-collection-modal.active .quick-collection-card {
  transform: translateY(0);
}
[data-theme="dark"] .quick-collection-card {
  background: rgba(15, 23, 42, 0.98);
  border-color: rgba(148, 163, 184, 0.2);
  color: #f8fafc;
}
.quick-collection-header {
  margin-bottom: 10px;
}
.quick-collection-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.quick-collection-header h3 {
  font-size: 14px;
  font-weight: 700;
}
.quick-collection-meta {
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
}
[data-theme="dark"] .quick-collection-meta {
  color: #94a3b8;
}
.quick-collection-close {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quick-collection-close svg {
  width: 15px;
  height: 15px;
}
.quick-collection-create {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.quick-collection-create input {
  flex: 1;
  min-width: 0;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(248, 250, 252, 0.86);
  color: #0f172a;
  font-size: 13px;
  padding: 8px 10px;
}
[data-theme="dark"] .quick-collection-create input {
  background: rgba(15, 23, 42, 0.82);
  color: #f1f5f9;
  border-color: rgba(148, 163, 184, 0.2);
}
.quick-collection-create button {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
}
[data-theme="dark"] .quick-collection-create button {
  background: rgba(226, 232, 240, 0.94);
  color: #0f172a;
}
.quick-collection-list {
  max-height: min(44vh, 320px);
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(248, 250, 252, 0.78);
}
[data-theme="dark"] .quick-collection-list {
  background: rgba(15, 23, 42, 0.76);
  border-color: rgba(148, 163, 184, 0.2);
}
.quick-collection-item {
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: 1px solid transparent;
}
.quick-collection-item:hover {
  background: rgba(148, 163, 184, 0.12);
}
.quick-collection-item.is-pending {
  opacity: 0.6;
  pointer-events: none;
}
.quick-collection-item.is-selected {
  background: rgba(99, 102, 241, 0.07);
}
.quick-collection-item input[type="checkbox"] {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.quick-collection-item span.coll-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quick-collection-item .coll-icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.12);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #64748b;
}
.quick-collection-item .coll-check {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(148, 163, 184, 0.45);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
.quick-collection-item .coll-check svg { display: none; color: white; }
.quick-collection-item.is-selected .coll-check {
  background: #6366f1;
  border-color: #6366f1;
}
.quick-collection-item.is-selected .coll-check svg { display: block; }
.quick-collection-empty {
  text-align: center;
  font-size: 12px;
  color: #64748b;
  padding: 14px 8px;
}
[data-theme="dark"] .quick-collection-empty {
  color: #94a3b8;
}
.coll-drag-handle {
  width: 36px; height: 4px;
  border-radius: 2px;
  background: rgba(148, 163, 184, 0.35);
  margin: 12px auto 16px;
  display: none;
}
@media (max-width: 540px) {
  .quick-collection-modal {
    align-items: flex-end;
    padding: 0;
  }
  .quick-collection-card {
    width: 100%;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    padding: 0 12px 24px;
  }
  .quick-collection-modal.active .quick-collection-card {
    transform: translateY(0);
  }
  .coll-drag-handle { display: block; }
}
