/* ── Checklist Toolbar ── */
.checklist-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-box__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
  transition: color 200ms ease;
}

.search-box input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 0.92rem;
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
  outline: none;
  transition: border-color 200ms ease, box-shadow 200ms ease;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(0, 225, 255, 0.12);
}

.search-box input:focus ~ .search-box__icon,
.search-box:focus-within .search-box__icon {
  color: var(--accent);
}

/* ── Filter Chips Bar ── */
.filter-chips-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.filter-chips-bar::-webkit-scrollbar { display: none; }

.filter-chip {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.76rem;
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 200ms ease;
  white-space: nowrap;
}

.filter-chip:hover {
  border-color: var(--line-glow);
  color: var(--text);
}

.filter-chip.active {
  background: rgba(0, 225, 255, 0.1);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(0, 225, 255, 0.15);
}

/* ── Sort Bar ── */
.sort-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-bar__label {
  font-size: 0.76rem;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
}

.sort-bar__select {
  padding: 8px 32px 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 0.78rem;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.04em;
  outline: none;
  cursor: pointer;
  transition: border-color 200ms ease, box-shadow 200ms ease;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2388889a' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.sort-bar__select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(0, 225, 255, 0.1);
}

.bulk-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 200ms ease;
}

.ghost-button:hover {
  border-color: var(--line-glow);
  color: var(--text);
  box-shadow: 0 0 12px rgba(0, 225, 255, 0.08);
}

.btn-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.danger-text {
  color: var(--danger);
}
.danger-text:hover {
  border-color: rgba(255, 58, 110, 0.4);
  box-shadow: 0 0 12px rgba(255, 58, 110, 0.08);
}

/* ── Checklist List (sprite-grouped) ── */
.checklist-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cl-sprite {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  transition: border-color 250ms ease, box-shadow 250ms ease;
}

.cl-sprite:hover { border-color: var(--line-glow); }

.cl-sprite--open {
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(0, 225, 255, 0.08);
}

.cl-sprite__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  transition: background 200ms ease;
}

.cl-sprite__header:hover { background: rgba(255, 255, 255, 0.02); }

.cl-sprite__avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cl-sprite__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.cl-sprite__info { flex: 1; min-width: 0; }

.cl-sprite__name {
  font-size: 0.95rem;
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cl-sprite__meta {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 2px;
  font-family: var(--font-heading);
  letter-spacing: 0.04em;
}

.cl-sprite__effect,
.cl-sprite__progress > span {
  display: none;
}

.cl-sprite__progress {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.cl-sprite__inline-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.cl-sprite__rarity,
.cl-sprite__priority,
.cl-sprite__master {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cl-sprite__master {
  color: #ffdc73;
  font-size: 0.72rem;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(255, 202, 67, 0.42);
}

.cl-sprite__quick {
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 200ms ease, color 200ms ease, background 200ms ease;
}

.cl-sprite__quick svg { width: 15px; height: 15px; }
.cl-sprite__quick:hover { border-color: var(--line-glow); color: var(--text); }
.cl-sprite__quick--priority.is-active { color: var(--warning); border-color: rgba(255, 204, 0, 0.58); background: rgba(255, 204, 0, 0.08); }
.cl-sprite__quick--owned.is-active { color: var(--success); border-color: rgba(0, 255, 135, 0.58); background: rgba(0, 255, 135, 0.08); }

.cl-confidence {
  display: inline-block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  margin-left: 4px;
}

.cl-confidence--official { color: #4ade80; border-color: rgba(74, 222, 128, 0.4); background: rgba(74, 222, 128, 0.08); }
.cl-confidence--confirmed { color: #60a5fa; border-color: rgba(96, 165, 250, 0.4); background: rgba(96, 165, 250, 0.08); }
.cl-confidence--observed { color: #fbbf24; border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.08); }
.cl-confidence--estimated { color: #fb923c; border-color: rgba(251, 146, 60, 0.4); background: rgba(251, 146, 60, 0.08); }
.cl-confidence--unverified { color: #f87171; border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.08); }
.cl-confidence--unknown { color: #9ca3af; border-color: rgba(156, 163, 175, 0.4); background: rgba(156, 163, 175, 0.08); }

.cl-sprite__bar {
  width: 60px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  flex-shrink: 0;
}

.cl-sprite__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #00ff87);
  border-radius: inherit;
  transition: width 400ms ease;
}

.cl-sprite__chevron {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 300ms ease, color 200ms ease;
}

.cl-sprite--open .cl-sprite__chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

/* ── Checklist detail button ── */
.cl-sprite__detail {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 200ms ease;
  flex-shrink: 0;
}

.cl-sprite__detail:hover {
  border-color: var(--accent);
  background: rgba(0, 225, 255, 0.06);
}

.cl-sprite__detail svg {
  width: 16px;
  height: 16px;
}

/* ── Variant rows (expanded) ── */
.cl-sprite__body {
  border-top: 1px solid var(--line);
  padding: 8px 12px 12px;
}

.cl-variant {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 10px;
  transition: background 150ms ease;
}

.cl-variant:hover { background: rgba(255, 255, 255, 0.03); }

.cl-variant__left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.cl-variant__thumb {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.cl-variant__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.3));
}

.cl-variant__name {
  font-size: 0.84rem;
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cl-variant__status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--muted);
  min-width: 90px;
}

.cl-variant__status .status-icon { width: 14px; height: 14px; }

.cl-variant__mastery {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 126px;
}

.cl-variant__mastery-label {
  min-width: 49px;
  color: #8dd6ff;
  font-family: var(--font-heading);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cl-variant__mastery--master .cl-variant__mastery-label {
  color: #ffdc73;
  text-shadow: 0 0 9px rgba(255, 205, 65, 0.42);
}

.cl-variant__mastery-levels { display: flex; gap: 3px; }

.cl-mastery-btn {
  width: 21px;
  height: 21px;
  padding: 0;
  border: 1px solid rgba(116, 141, 212, 0.26);
  border-radius: 6px;
  color: #65729b;
  background: rgba(255, 255, 255, 0.025);
  font-family: var(--font-heading);
  font-size: 0.55rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 150ms ease, color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.cl-mastery-btn:hover { transform: translateY(-1px); border-color: #44cfff; color: #e3f9ff; }
.cl-mastery-btn.is-active { border-color: rgba(29, 204, 255, 0.7); color: #e6fbff; background: rgba(27, 175, 255, 0.24); }
.cl-mastery-btn.is-master { color: #c89e43; }
.cl-mastery-btn.is-master.is-active { border-color: #ffd35c; color: #ffe48a; background: rgba(255, 194, 38, 0.25); box-shadow: 0 0 8px rgba(255, 190, 35, 0.24); }

.cl-variant__actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.cl-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 200ms ease;
}

.cl-btn svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
  transition: color 200ms ease;
}

.cl-btn:hover { border-color: var(--line-glow); }

.cl-btn--owned.active { border-color: #00ff87; background: rgba(0, 255, 135, 0.1); }
.cl-btn--owned.active svg { color: #00ff87; }
.cl-btn--missing.active { border-color: #ff3a6e; background: rgba(255, 58, 110, 0.1); }
.cl-btn--missing.active svg { color: #ff3a6e; }
.cl-btn--priority.active { border-color: #ffcc00; background: rgba(255, 204, 0, 0.1); }
.cl-btn--priority.active svg { color: #ffcc00; }
.cl-btn--unsure.active { border-color: #8d7cff; background: rgba(141, 124, 255, 0.1); }
.cl-btn--unsure.active svg { color: #8d7cff; }
