/* 旧改设计列表 */
.dl-viewport {
  display: flex;
  flex-direction: column;
  background: #f1f5f9;
  min-height: 0;
}

.dl-header {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  padding: 0 8px;
  min-height: 48px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.dl-header-title {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.dl-header-spacer {
  width: 40px;
}

.dl-toolbar {
  flex-shrink: 0;
  padding: 10px 12px 12px;
  background: #f1f5f9;
  border-bottom: none;
}

.dl-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dl-search {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  min-height: 40px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.dl-more-filter-btn {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.dl-more-filter-btn i {
  font-size: 15px;
}

.dl-more-filter-btn.has-active {
  border-color: #93c5fd;
  background: #eff6ff;
  color: var(--primary);
}

.dl-more-filter-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.35);
}

.dl-search i {
  color: #94a3b8;
  font-size: 14px;
}

.dl-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  min-width: 0;
}

.dl-search input:focus {
  outline: none;
}

.dl-search input::placeholder {
  color: #94a3b8;
}

.dl-filter-bar {
  display: flex;
  gap: 0;
  margin-top: 10px;
  padding: 3px;
  background: #e2e8f0;
  border-radius: 10px;
}

.dl-filter {
  flex: 1;
  min-height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.dl-filter.is-active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.dl-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 12px 88px;
}

.dl-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 左滑删除 */
.dl-swipe-row {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  list-style: none;
}

.dl-swipe-delete {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 72px;
  border: none;
  padding: 0;
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  z-index: 0;
  -webkit-tap-highlight-color: transparent;
}

.dl-swipe-delete:active {
  filter: brightness(0.92);
}

.dl-swipe-surface {
  position: relative;
  z-index: 1;
  width: 100%;
  background: #fff;
  touch-action: pan-y;
  will-change: transform;
}

.dl-swipe-surface .dl-card {
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.dl-card {
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dl-card:active {
  border-color: #93c5fd;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.dl-card--anon {
  border-left: 3px solid #fbbf24;
}

.dl-card-thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 22px;
}

.dl-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dl-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dl-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.dl-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dl-card-title.is-anon {
  color: #334155;
}

.dl-card-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  line-height: 1.2;
}

.dl-card-badge--draft {
  background: #f1f5f9;
  color: #64748b;
}

.dl-card-badge--selecting {
  background: #eff6ff;
  color: #2563eb;
}

.dl-card-badge--done {
  background: #ecfdf5;
  color: #059669;
}

.dl-card-sub {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dl-tag--share-viewed,
.dl-tag--share-pending {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  font-weight: 700;
  font-size: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.dl-tag--share-viewed i,
.dl-tag--share-pending i {
  font-size: 10px;
}

.dl-tag--share-viewed {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border: 1px solid #34d399;
  color: #065f46;
}

.dl-tag--share-viewed i {
  color: #059669;
}

.dl-tag--share-pending {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #fbbf24;
  color: #92400e;
}

.dl-tag--share-pending i {
  color: #d97706;
}

.dl-card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #94a3b8;
}

.dl-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.dl-tag {
  padding: 2px 6px;
  border-radius: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 10px;
  font-weight: 500;
}

.dl-tag--warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.dl-tag--code {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.dl-card-time {
  flex-shrink: 0;
}

.dl-empty {
  padding: 48px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

.dl-fab {
  position: absolute;
  right: 16px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0));
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
  cursor: pointer;
  text-decoration: none;
}

.dl-fab:active {
  transform: scale(0.98);
}

.dl-fab i {
  font-size: 16px;
}

/* 更多筛选 · 底部抽屉 */
.dl-mf-layer {
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}

.dl-mf-layer.is-open {
  pointer-events: auto;
}

.dl-mf-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.dl-mf-layer.is-open .dl-mf-backdrop {
  opacity: 1;
}

.dl-mf-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(88%, 560px);
  background: #fff;
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.12);
}

.dl-mf-layer.is-open .dl-mf-sheet {
  transform: translateY(0);
}

.dl-mf-handle {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: #e2e8f0;
  margin: 10px auto 0;
  flex-shrink: 0;
}

.dl-mf-head {
  display: grid;
  grid-template-columns: 64px 1fr 40px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 10px;
  flex-shrink: 0;
  border-bottom: 1px solid #f1f5f9;
}

.dl-mf-head h2 {
  margin: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.dl-mf-reset {
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 8px 4px;
  justify-self: start;
}

.dl-mf-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  justify-self: end;
}

.dl-mf-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 16px 16px;
  -webkit-overflow-scrolling: touch;
}

.dl-mf-block {
  margin-top: 16px;
}

.dl-mf-block:first-child {
  margin-top: 8px;
}

.dl-mf-label {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.dl-mf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dl-mf-chip {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.dl-mf-chip.is-on {
  background: #eff6ff;
  border-color: #93c5fd;
  color: var(--primary);
}

.dl-mf-foot {
  flex-shrink: 0;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #f1f5f9;
  background: #fff;
}

.dl-mf-apply {
  width: 100%;
  min-height: 46px;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}