.magic-compare {
  color: var(--tcg-ink);
  width: 100%;
  max-width: none;
  margin: 0;
  padding-bottom: 2rem;
}

.magic-compare__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.magic-compare__title {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 700;
}

.magic-compare__sub {
  margin: 0.35rem 0 0;
  color: var(--tcg-ink-muted);
}

.magic-compare__back,
.magic-compare__link {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--tcg-border);
  border-radius: 0.4rem;
  background: var(--tcg-surface);
  color: var(--tcg-ink);
  font-weight: 600;
  text-decoration: none;
}

.magic-compare__back:hover,
.magic-compare__link:hover {
  background: var(--tcg-surface-muted);
  color: var(--tcg-ink);
  text-decoration: none;
}

.magic-compare__hint,
.magic-compare__empty {
  color: var(--tcg-ink-muted);
  margin-bottom: 0.75rem;
}

.magic-compare__table {
  width: 100%;
  background: var(--tcg-surface);
  border: 1px solid var(--tcg-border);
  border-radius: 0.45rem;
  overflow: hidden;
}

.magic-compare .table-responsive {
  width: 100%;
}

.magic-compare__table th,
.magic-compare__table td {
  vertical-align: middle;
  color: var(--tcg-ink);
  white-space: nowrap;
}

.magic-compare__table thead th[data-sort] {
  user-select: none;
}

.magic-compare__table thead th.is-sorted::after {
  content: ' ▾';
  opacity: 0.7;
}

.magic-compare__table thead th.is-sorted.is-asc::after {
  content: ' ▴';
}

.magic-compare__thumb {
  width: 150px;
  max-width: 150px;
  max-height: 210px;
  height: auto;
  object-fit: contain;
  border-radius: 0.25rem;
}

.magic-compare__muted {
  font-size: 0.78rem;
  color: var(--tcg-ink-muted);
  max-width: 12rem;
  white-space: normal;
}

.magic-compare__badge {
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: var(--tcg-accent);
  color: var(--tcg-on-gold, #1a1a1a);
  font-size: 0.68rem;
  font-weight: 700;
}

.magic-compare__table tr.is-current {
  box-shadow: inset 3px 0 0 var(--tcg-accent);
  background: var(--tcg-surface-muted);
}
