/* リストビュー（specs/spec-45） */
.list-view .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.list-view {
  height: 100%;
  padding: 18px 22px 28px;
  overflow: auto;
}
.list-toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}
.list-toolbar label {
  display: grid;
  gap: 4px;
  color: var(--text-3);
  font-size: 0.7rem;
  font-weight: 700;
}
.list-toolbar select,
.list-toolbar input {
  min-width: 140px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.list-search-label { flex: 1; }
.list-search-label input { width: 100%; min-width: 180px; }
.list-art-reserve { white-space: nowrap; }
.list-toolbar .binder-stats { margin-left: auto; }
.list-filter-controls { display: contents; }
.list-mobile-sort,
.list-mobile-items { display: none; }
.list-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.list-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.list-table th,
.list-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-2);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
.list-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-2);
  color: var(--text-2);
}
.list-sort {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.list-table tbody tr { cursor: pointer; transition: background 120ms ease; }
.list-table tbody tr:hover,
.list-table tbody tr:focus-visible {
  outline: none;
  background: color-mix(in srgb, var(--brand) 8%, transparent);
}
.list-type { font-weight: 700; }
.list-title { min-width: 230px; white-space: normal; }
.list-title small {
  display: block;
  max-width: 360px;
  margin-top: 2px;
  overflow: hidden;
  color: var(--text-3);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-tags { display: flex; align-items: center; gap: 4px; }
.list-tags .detail-tag { margin: 0; }
.list-more,
.list-empty { color: var(--text-3); }
.list-number { text-align: right; font-variant-numeric: tabular-nums; }
.list-actions > div { display: flex; gap: 4px; }
.list-action {
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.list-action:hover { border-color: var(--line); background: var(--bg-2); }
.list-action.danger:hover { background: #fee2e2; border-color: #fecaca; }
.list-check-col { width: 42px; text-align: center !important; }
.list-check-col input { width: 17px; height: 17px; accent-color: var(--brand); }
.list-table .lv-on { color: var(--brand); }
.list-table .lv-off { color: var(--line); }
.list-no-results { padding: 56px; color: var(--text-3); text-align: center; }
@media (max-width: 900px) {
  .list-toolbar { flex-wrap: wrap; align-items: stretch; }
  .list-toolbar .binder-stats { margin-left: 0; }
}
.art-queue-modal { width: 520px; }
.art-queue-summary { color: var(--text-2); }
.art-style-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}
.art-style-option {
  display: flex;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.art-style-option:has(input:checked) {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, transparent);
}
.art-style-option span,
.art-style-option small { display: block; }
.art-style-option small { margin-top: 2px; color: var(--text-3); }
.art-queue-warning { color: #b45309; font-size: 0.8rem; }
.art-queue-error { min-height: 1.2em; color: #b4232f; font-size: 0.8rem; }

@media (max-width: 768px), (max-height: 480px) and (max-width: 900px) {
  .list-view {
    height: auto;
    min-height: 100%;
    padding: 12px 10px 28px;
    overflow: visible;
  }
  .list-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 12px;
  }
  .list-search-label { order: 1; }
  .list-filter-toggle { order: 2; }
  .list-filter-controls { order: 3; }
  .list-art-reserve { order: 4; }
  .list-toolbar .binder-stats { order: 5; margin: 0 auto; }
  .list-toolbar select,
  .list-toolbar input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    font-size: 16px;
  }
  .list-filter-controls {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .list-filter-controls.is-expanded { display: grid; }
  .list-mobile-sort {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
  }
  .list-mobile-sort .btn { min-width: 92px; }

  .list-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }
  .list-table { display: none; }
  .list-mobile-items {
    display: grid;
    gap: 10px;
  }
  .list-mobile-card {
    display: grid;
    gap: 8px;
    padding: 12px;
    overflow-wrap: anywhere;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-1);
  }
  .list-mobile-card:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 2px;
  }
  .list-mobile-head,
  .list-mobile-footer,
  .list-mobile-meta {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .list-mobile-head { justify-content: space-between; }
  .list-mobile-date { color: var(--text-3); font-size: 0.72rem; }
  .list-mobile-card h3 { margin: 0; font-size: 1rem; line-height: 1.45; }
  .list-mobile-card p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--text-2);
    font-size: 0.8rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .list-mobile-meta {
    flex-wrap: wrap;
    color: var(--text-2);
    font-size: 0.74rem;
  }
  .list-mobile-meta span {
    padding: 3px 7px;
    background: var(--bg-2);
    border-radius: var(--r-full);
  }
  .list-mobile-footer { justify-content: space-between; }
  .list-mobile-card .list-check-col {
    display: flex;
    align-items: center;
    gap: 6px;
    width: auto;
    min-height: 44px;
    padding: 0;
    color: var(--text-3);
    font-size: 0.72rem;
  }
  .list-mobile-card .list-check-col input { width: 22px; height: 22px; }
  .list-mobile-card .list-actions { display: flex; gap: 5px; }
  .list-mobile-card .list-action {
    width: 44px;
    height: 44px;
    background: var(--bg-2);
    border-color: var(--line);
  }
  .list-mobile-card .list-action.danger { background: #fff1f2; }
  .list-no-results { padding: 40px 12px; }
}

@media (max-width: 409px) {
  .list-filter-controls { grid-template-columns: 1fr; }
  .list-mobile-sort { grid-column: auto; }
}
