/* ═══════════════════════════════════════════════════════════════
   Card Modal Redesign - Compact Two-Panel Layout
   ═══════════════════════════════════════════════════════════════ */

.card-modal-redesign {
  max-width: 1000px;
  max-height: 90vh;
}

.card-modal-body {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  padding: 20px;
  align-items: start;
}

/* Left Panel - Card Image */
.card-modal-left {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-modal-left .modal-image {
  display: flex;
  justify-content: center;
}

.card-modal-left .modal-image img {
  max-width: 100%;
  max-height: 400px;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  cursor: zoom-in;
}

/* Modal Header with External Links */
.card-modal-redesign .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
}

.modal-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  position: relative;
}

.modal-header-left h2 {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-header-links {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.header-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  color: white;
  transition:
    opacity 0.2s,
    transform 0.2s;
}

.header-link-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
}


.header-link-btn.cm {
  background: #e74c3c;
}
.header-link-btn.tcgp {
  background: #2980b9;
}
.header-link-btn.wiki {
  background: #4a5568;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.header-link-btn.wiki-multi {
  gap: 2px;
  padding: 0px 0px 0px 9px;
}

.wiki-flag-img {
  width: 20px;
  height: auto;
  display: block;
}

.wiki-flag-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 6px;
  margin-left: 3px;
  border-radius: 4px;
  transition: background 0.15s;
}

.wiki-flag-link:hover {
  background: rgba(255, 255, 255, 0.3);
}
.header-link-btn.psa {
  background: #c0392b;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.header-link-btn.psa.psa-multi {
  gap: 2px;
  padding: 0 0 0 9px;
}
.header-link-btn.psa .header-link-icon {
  width: 32px;
  height: 16px;
  background: #e8e0d8;
  border-radius: 3px;
  padding: 1px 2px;
}

.card-modal-actions {
  padding: 12px;
  background: #f8f9fa;
  border-radius: 10px;
}

/* Market Prices in Left Panel */
.card-modal-prices {
  padding: 12px;
  background: #f8f9fa;
  border-radius: 10px;
  margin-top: 0;
}

/* Global price estimate + rarity */
.global-price-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.global-price-bar {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color, #e5e7eb);
}

.global-price-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 14px;
  flex: 1;
  min-width: 0;
}

.global-price-label {
  color: var(--text-secondary, #888);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 600;
  margin-bottom: 1px;
}

.global-price-range {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary, #333);
}

.global-price-range.global-price-na {
  font-weight: 500;
  font-size: 13px;
  color: var(--text-muted, #999);
  font-style: italic;
}

.global-price-lang {
  margin-left: 4px;
  font-size: 12px;
  vertical-align: middle;
}

.global-price-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  flex-shrink: 0;
  border-left: 1px solid var(--border-color, #e5e7eb);
}

.rarity-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary, #888);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

.rarity-dots {
  display: flex;
  gap: 4px;
}

.rarity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-color, #ddd);
}

.rarity-dot-filled {
  background: #f59e0b !important;
}

/* PSA Population — vertical stack of one .psa-pop-bar per lang that
   carries pop data. Each bar is its own bordered row. */
.psa-pop-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.psa-pop-bar {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color, #e5e7eb);
}
/* Top row: PSA POPULATION (flag) <total> graded — full-width header that
   replaces the previous left-side panel. Chart sits beneath at full width
   for legibility on cards with 100+ copies in any grade. */
.psa-pop-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  background: rgba(0, 0, 0, 0.02);
}
.psa-pop-title {
  color: var(--text-secondary, #888);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 600;
}
.psa-pop-header .flag-icon {
  width: 16px;
  height: auto;
  border-radius: 2px;
  vertical-align: middle;
}
.psa-pop-total {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary, #333);
}
.psa-auth {
  font-size: 10px;
  color: var(--text-secondary, #888);
  margin-top: 2px;
}
.psa-pop-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 10px 12px;
}
.psa-grade {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 2px;
}
.psa-bar-track {
  width: 100%;
  height: 32px;
  display: flex;
  align-items: flex-end;
}
.psa-bar-fill {
  width: 100%;
  min-height: 1px;
  background: #c0392b;
  border-radius: 2px 2px 0 0;
  transition: height 0.3s;
}
.psa-count {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-primary, #333);
  line-height: 1;
}
.psa-label {
  font-size: 8px;
  color: var(--text-secondary, #888);
  line-height: 1;
}

.card-modal-prices .card-section-header {
  margin-bottom: 10px;
}

.card-modal-prices .market-prices-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}

.card-modal-prices .market-price-card {
  padding: 8px 10px;
}

.card-modal-prices .market-price-main {
  font-size: 18px;
}

.card-modal-prices .market-price-source {
  font-size: 9px;
}

/* Right Panel - Card Details */
.card-modal-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* Info Grid - Compact 2-column layout for basic info */
.card-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 16px;
}

/* 3-column variant for basic info (Stage/HP/Type + Number/Illustrator/Pokemon) */
.card-info-grid-3col {
  grid-template-columns: repeat(3, 1fr);
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-label {
  font-size: 11px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.info-hp {
  font-weight: 700;
  color: #e74c3c;
  font-size: 16px;
}

.info-item-full {
  grid-column: 1 / -1;
}
.info-item-2col {
  grid-column: span 2;
}

/* Linked-print chips — clickable refs to a sibling card (asian/western
   regional split, same Pokémon different number). Shows the sibling's
   card number plus a flag icon per lang the sibling is printed in. */
.linked-prints-prefix {
  font-size: 11px;
  color: var(--text-secondary, #888);
  font-style: italic;
  margin: 0 6px 0 4px;
  text-transform: lowercase;
}
.linked-print-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 4px;
  background: rgba(88, 166, 255, 0.10);
  border: 1px solid rgba(88, 166, 255, 0.35);
  color: #58a6ff;
  text-decoration: none;
  margin-right: 4px;
  vertical-align: middle;
}
.linked-print-chip:hover {
  background: rgba(88, 166, 255, 0.22);
  border-color: rgba(88, 166, 255, 0.6);
}
.linked-print-chip .flag-icon {
  width: 14px;
  height: auto;
  border-radius: 2px;
  display: inline-block;
}

/* Special property badges */
.special-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.special-badge--shiny {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
}

.special-badge--lenticular {
  background: linear-gradient(135deg, #dbeafe, #c7d2fe);
  color: #3730a3;
}

.special-badge--redacted {
  background: #1f2937;
  color: #f9fafb;
}

.special-badge--frame {
  background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
  color: #6b21a8;
}

/* Tag badges (merged super_set + special) */
.special-badge--COR,
.special-badge--BES {
  background: linear-gradient(135deg, #fef9c3, #fde047);
  color: #854d0e;
}
.special-badge--FAN {
  background: linear-gradient(135deg, #fce7f3, #f9a8d4);
  color: #9d174d;
}
.special-badge--PKC {
  background: linear-gradient(135deg, #fee2e2, #fca5a5);
  color: #991b1b;
}
.special-badge--BOX {
  background: linear-gradient(135deg, #e0e7ff, #a5b4fc);
  color: #3730a3;
}
.special-badge--25A {
  background: linear-gradient(135deg, #fef3c7, #f59e0b);
  color: #78350f;
}
.special-badge--tag-team {
  background: linear-gradient(135deg, #d1fae5, #6ee7b7);
  color: #065f46;
}
.special-badge--trio {
  background: linear-gradient(135deg, #cffafe, #67e8f9);
  color: #155e75;
}
.special-badge--birthday {
  background: linear-gradient(135deg, #fce7f3, #f472b6);
  color: #831843;
}
.special-badge--tera {
  background: linear-gradient(135deg, #e0f2fe, #38bdf8);
  color: #0c4a6e;
}
.special-badge--movie {
  background: linear-gradient(135deg, #f5f3ff, #a78bfa);
  color: #4c1d95;
}
.special-badge--legend {
  background: linear-gradient(135deg, #fef3c7, #fbbf24);
  color: #78350f;
}
.special-badge--mega {
  background: linear-gradient(135deg, #fce4ec, #f48fb1);
  color: #880e4f;
}
.special-badge--break {
  background: linear-gradient(135deg, #fff3e0, #ffb74d);
  color: #e65100;
}
.special-badge--v-union {
  background: linear-gradient(135deg, #e8eaf6, #7986cb);
  color: #1a237e;
}
.special-badge--write-name {
  background: linear-gradient(135deg, #f3e5f5, #ce93d8);
  color: #6a1b9a;
}
.special-badge--multi-scene {
  background: linear-gradient(135deg, #e8f5e9, #81c784);
  color: #1b5e20;
}
.special-badge--in-store {
  background: linear-gradient(135deg, #fff8e1, #ffe082);
  color: #f57f17;
}
.special-badge--rainbow {
  background: linear-gradient(135deg, #ff9a9e, #fad0c4, #a1c4fd, #c2e9fb);
  color: #4a148c;
}
.special-badge--tournament {
  background: linear-gradient(135deg, #e3f2fd, #64b5f6);
  color: #0d47a1;
}
.special-badge--full-art {
  background: linear-gradient(135deg, #efebe9, #a1887f);
  color: #3e2723;
}
.special-badge--magazine-promo {
  background: linear-gradient(135deg, #f3e5f5, #ba68c8);
  color: #4a148c;
}
.special-badge--event {
  background: linear-gradient(135deg, #fff3e0, #ffb74d);
  color: #e65100;
}

/* New tags */
.special-badge--delta-species {
  background: linear-gradient(135deg, #e0f2fe, #7dd3fc);
  color: #0c4a6e;
}
.special-badge--unusual-size {
  background: linear-gradient(135deg, #fef9c3, #fcd34d);
  color: #713f12;
}
.special-badge--cutout {
  background: linear-gradient(135deg, #f0fdf4, #86efac);
  color: #14532d;
}
.special-badge--lang-exclusive {
  background: linear-gradient(135deg, #f5f3ff, #c4b5fd);
  color: #5b21b6;
}
.special-badge--single-color-foil {
  background: linear-gradient(135deg, #fdf4ff, #e879f9);
  color: #701a75;
}
.special-badge--ancient-future {
  background: linear-gradient(135deg, #ecfdf5, #2dd4bf, #818cf8, #fde68a);
  color: #134e4a;
}

.special-badge--ancient-trait {
  background: linear-gradient(135deg, #f0fdf4, #6ee7b7, #059669);
  color: #022c22;
}
.special-badge--teach-cards {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #78350f;
}
.special-badge--boss {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  color: #e0e7ff;
}
.special-badge--high-hp {
  background: linear-gradient(135deg, #fef2f2, #f87171, #dc2626);
  color: #fff;
}
.special-badge--primal {
  background: linear-gradient(135deg, #ecfdf5, #34d399, #059669);
  color: #022c22;
}
.special-badge--multi-type {
  background: linear-gradient(135deg, #dbeafe, #818cf8, #c084fc);
  color: #1e1b4b;
}
.special-badge--fake {
  background: linear-gradient(135deg, #fef2f2, #fca5a5);
  color: #991b1b;
}
.special-badge--gold {
  background: linear-gradient(135deg, #fef9c3, #eab308, #d97706);
  color: #422006;
}
.special-badge--EX {
  background: linear-gradient(135deg, #fef2f2, #f87171);
  color: #7f1d1d;
}

/* Stamp badges — ink/seal aesthetic with shared base */
.special-badge--stamp {
  background: linear-gradient(135deg, #fef2f2, #fecaca);
  color: #991b1b;
}
.special-badge--winner-stamp {
  background: linear-gradient(135deg, #fef9c3, #fcd34d);
  color: #713f12;
}
.special-badge--game-stamp {
  background: linear-gradient(135deg, #ede9fe, #a78bfa);
  color: #4c1d95;
}
.special-badge--movie-stamp {
  background: linear-gradient(135deg, #fce7f3, #f9a8d4);
  color: #831843;
}
.special-badge--pokemon-center-stamp {
  background: linear-gradient(135deg, #fee2e2, #f87171);
  color: #7f1d1d;
}
.special-badge--japan-event-stamp {
  background: linear-gradient(135deg, #fff7ed, #fdba74);
  color: #7c2d12;
}
.special-badge--beams-stamp {
  background: linear-gradient(135deg, #f0fdf4, #4ade80);
  color: #14532d;
}
.special-badge--shop-stamp {
  background: linear-gradient(135deg, #ecfeff, #67e8f9);
  color: #164e63;
}
.special-badge--legendary-pokemon-stamp {
  background: linear-gradient(135deg, #fefce8, #facc15);
  color: #713f12;
}
.special-badge--set-stamp {
  background: linear-gradient(135deg, #eef2ff, #818cf8);
  color: #312e81;
}
.special-badge--strike-stamp {
  background: linear-gradient(135deg, #fef2f2, #ef4444);
  color: #7f1d1d;
}
.special-badge--25th-anniv-stamp {
  background: linear-gradient(135deg, #fffbeb, #f59e0b);
  color: #78350f;
}
.special-badge--media-stamp {
  background: linear-gradient(135deg, #f0f9ff, #38bdf8);
  color: #0c4a6e;
}
.special-badge--trainer-stamp {
  background: linear-gradient(135deg, #faf5ff, #c084fc);
  color: #581c87;
}

/* Virtual suffix tags */
.special-badge--GX {
  background: linear-gradient(135deg, #dbeafe, #60a5fa);
  color: #1e3a5f;
}
.special-badge--V {
  background: linear-gradient(135deg, #f5f3ff, #8b5cf6);
  color: #2e1065;
}
.special-badge--VMAX {
  background: linear-gradient(135deg, #fdf2f8, #ec4899);
  color: #701a75;
}
.special-badge--VSTAR {
  background: linear-gradient(135deg, #fffbeb, #f59e0b);
  color: #78350f;
}

/* Virtual tag indicator (subtle dashed border) */
.special-badge.virtual-tag {
  border: 1px dashed currentColor;
  opacity: 0.85;
}

.multi-type-container {
  display: inline-flex;
  gap: 6px;
}

.type-badge-compact {
  padding: 4px 10px;
  font-size: 12px;
  align-self: flex-start;
  border-radius: 20px;
}

.type-badge-compact .type-icon {
  width: 18px;
  height: 18px;
}

/* Modal lang flags - clickable language filter buttons */
.modal-lang-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.modal-lang-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: var(--radius-full, 9999px);
  background: var(--bg-primary, #ffffff);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary, #6b7280);
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s,
    color 0.15s;
  text-decoration: none;
}

.modal-lang-flag:hover {
  border-color: var(--color-primary, #667eea);
  background: var(--color-primary, #667eea);
  color: #fff;
}

.modal-lang-flag .flag-icon {
  width: 14px;
  height: 10px;
}

/* Card Sections */
.card-section {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 14px;
  border: 1px solid #e9ecef;
}

.card-section-compact {
  padding: 12px;
}

.card-section-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.card-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Card Trivia (collector notes section) ────────────────────── */

.card-trivia-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-trivia-entry {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-secondary, #f8f9fa);
  border-left: 3px solid var(--color-primary, #6c5ce7);
  border-radius: 0 8px 8px 0;
}

.card-trivia-icon {
  font-size: 18px;
  line-height: 1;
  flex: 0 0 auto;
  padding-top: 1px;
}

.card-trivia-text {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.45;
}

.card-trivia-title {
  font-weight: 600;
  margin-bottom: 3px;
  color: var(--text-primary, #1e293b);
}

.card-trivia-body {
  color: var(--text-secondary, #475569);
}

.card-trivia-links {
  margin-top: 6px;
  font-size: 12px;
}

.card-trivia-links a {
  color: var(--color-primary, #6c5ce7);
  text-decoration: none;
}

.card-trivia-links a:hover { text-decoration: underline; }

/* Per-kind accent colors for the left stripe */
.card-trivia-entry.card-trivia-rarity        { border-left-color: #d4af37; }
.card-trivia-entry.card-trivia-debate        { border-left-color: #ef4444; }
.card-trivia-entry.card-trivia-lang_size     { border-left-color: #3b82f6; }
.card-trivia-entry.card-trivia-release       { border-left-color: #10b981; }

body.dark-mode .card-trivia-entry {
  background: rgba(255, 255, 255, 0.04);
}
body.dark-mode .card-trivia-title { color: #f1f5f9; }
body.dark-mode .card-trivia-body  { color: #cbd5e1; }
body.dark-mode .card-trivia-links a { color: #a29bfe; }

/* ── Owned / Ordered Instance Blocks ──────────────────────────── */

.instance-block {
  padding: 6px 10px;
  border-radius: var(--radius-md, 6px);
  background: var(--bg-secondary, #f8f9fa);
  border-left: 3px solid transparent;
}

.instance-block--owned {
  border-left-color: var(--color-success, #10b981);
}

.instance-block--ordered {
  border-left-color: var(--color-primary, #667eea);
}

.instance-block-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* Ordered instance: structured header row */
.instance-block-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.instance-block-source {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #333);
  white-space: nowrap;
}

.source-favicon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  vertical-align: middle;
}

.instance-block-date {
  font-size: 12px;
  color: var(--text-secondary, #6b7280);
  white-space: nowrap;
}

/* Details row beneath the header */
.instance-block-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.inst-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: var(--text-secondary, #6b7280);
  white-space: nowrap;
}

/* Wishlist priority selector + price-movement row */
.wl-prio {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.wl-prio-label {
  font-size: 12px;
  color: var(--text-secondary, #6b7280);
}
.wl-prio-btn {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full, 9999px);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: transparent;
  color: var(--text-secondary, #6b7280);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.wl-prio-btn:hover {
  border-color: var(--color-warning, #f59e0b);
  color: var(--text, #e5e7eb);
}
.wl-prio-btn.active {
  background: var(--color-warning, #f59e0b);
  border-color: var(--color-warning, #f59e0b);
  color: #1a1330;
  font-weight: 600;
}
.wl-trend-row {
  margin-top: 6px;
}
.wl-trend-label {
  font-size: 11px;
  color: var(--text-secondary, #6b7280);
}

/* Subtle separator between tags */
.inst-tag + .inst-tag::before {
  content: '·';
  margin-right: 6px;
  color: var(--text-tertiary, #9ca3af);
  font-weight: 700;
}

.inst-tag .flag-icon {
  width: 14px;
  height: 10px;
}

.inst-tag--link {
  text-decoration: none;
  cursor: pointer;
}

.inst-tag--link:hover {
  opacity: 0.8;
}

.order-ext-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

.order-ext-link:hover {
  text-decoration: underline;
}

/* Edit button pushed to the right */
.instance-edit-btn {
  margin-left: auto;
  flex-shrink: 0;
  padding: 2px 6px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

.instance-actions-group {
  display: inline-flex;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}

.instance-actions-group .instance-edit-btn {
  margin-left: 0;
}

/* ── Codex-style instance action icon buttons ──────────────────────
   Replaces the legacy emoji-in-btn-secondary chips in owned + ordered
   instance rows + the orders list. Stroke SVGs, transparent bg,
   hairline border, accent tint on hover. */
.inst-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  margin-left: auto;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.inst-icon-btn:hover {
  background: var(--surface2);
  border-color: var(--border-hi);
  color: var(--text);
}
.inst-icon-btn:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}
.inst-icon-btn svg {
  display: block;
}

/* Per-action accent variants */
.inst-icon-btn--success {
  color: var(--pos);
  border-color: color-mix(in srgb, var(--pos) 35%, var(--border));
}
.inst-icon-btn--success:hover {
  background: color-mix(in srgb, var(--pos) 14%, transparent);
  border-color: var(--pos);
  color: var(--pos);
}
.inst-icon-btn--danger {
  color: var(--neg);
  border-color: color-mix(in srgb, var(--neg) 35%, var(--border));
}
.inst-icon-btn--danger:hover {
  background: color-mix(in srgb, var(--neg) 14%, transparent);
  border-color: var(--neg);
  color: var(--neg);
}

/* Inside an .instance-actions-group, the buttons sit side-by-side —
   drop the auto-left margin so they stay tightly grouped. */
.instance-actions-group .inst-icon-btn {
  margin-left: 0;
}

.instance-notes {
  margin-top: 4px;
  padding-left: 2px;
  font-size: 12px;
  font-style: italic;
  color: var(--text-tertiary, #9ca3af);
}

/* Combat Stats Row (Weakness/Resistance/Retreat) */
.combat-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.combat-stat {
  text-align: center;
  padding: 8px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.combat-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.combat-stat-value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.combat-stat-value .type-icon-mini {
  width: 20px;
  height: 20px;
}

.retreat-cost {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.retreat-cost .energy-icon {
  width: 16px;
  height: 16px;
}

/* Abilities List */
.abilities-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ability-item {
  background: white;
  border-radius: 8px;
  padding: 10px 12px;
  border-left: 3px solid #9b59b6;
}

.ability-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.ability-type {
  font-size: 11px;
  font-weight: 700;
  color: #9b59b6;
  text-transform: uppercase;
  background: #f3e8ff;
  padding: 2px 6px;
  border-radius: 4px;
}

.ability-name {
  font-size: 14px;
  font-weight: 700;
  color: #333;
}

.ability-effect {
  font-size: 12px;
  color: #555;
  line-height: 1.4;
}

/* Attacks List */
.attacks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.attack-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
}

.attack-content {
  flex: 1;
  min-width: 0;
}

.attack-cost {
  display: flex;
  align-items: center;
  gap: 2px;
}

.attack-cost .energy-icon {
  width: 18px;
  height: 18px;
}

.attack-cost .boss-cost {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid #1a1a1a;
  background: #888;
  color: #333;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.attack-cost .boss-cost[data-cost="1"] {
  background: radial-gradient(circle at 35% 35%, #fff176, #fdd835 40%, #f9a825);
}

.attack-cost .boss-cost[data-cost="2"] {
  background: radial-gradient(circle at 35% 35%, #ffcc80, #fb8c00 40%, #e65100);
}

.attack-cost .boss-cost[data-cost="3"] {
  background: radial-gradient(circle at 35% 35%, #ef9a9a, #e53935 40%, #b71c1c);
}

/* Triangle layout (3 costs): 2 on top, 1 centered below */
.attack-cost.cost-triangle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  width: fit-content;
  justify-items: center;
}

.attack-cost.cost-triangle > :nth-child(3) {
  grid-column: 1 / -1;
  justify-self: center;
}

/* Square layout (4 costs): 2×2 grid */
.attack-cost.cost-square {
  display: grid;
  grid-template-columns: auto auto;
  gap: 1px;
  width: fit-content;
}

.attack-name {
  font-size: 14px;
  font-weight: 700;
  color: #333;
}

.attack-damage {
  font-size: 18px;
  font-weight: 800;
  color: #e74c3c;
  text-align: right;
  flex-shrink: 0;
}

.attack-effect {
  font-size: 12px;
  color: #555;
  line-height: 1.4;
}

/* Inline effect: name and effect text flow on same line (box toppers, best-of-game) */
.attack-inline .attack-effect {
  display: inline;
  margin-top: 0;
}

.attack-cost .energy-icon[alt="Free"] {
  opacity: 0.5;
}

/* Inline energy icons in attack/ability text */
.energy-icon-inline {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  display: inline;
  margin: 0 1px;
}

/* GX Attack Special Styling */
.attack-item.attack-gx {
  border-left: 3px solid #1e3a5f;
  border-color: #e0e0e0;
  border-left-color: #1e3a5f;
}

.attack-type-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
}

.attack-type-badge.gx {
  background: #1e3a5f;
  color: #7dd3fc;
}

.attack-type-badge.vstar {
  background: #854d0e;
  color: #fde68a;
}

/* V-UNION Section */
.v-union-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.v-union-rule {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  font-style: italic;
}

.v-union-pieces {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.v-union-pieces-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.v-union-piece {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-secondary, rgba(0, 0, 0, 0.06));
  color: var(--text-primary);
  font-family: var(--font-mono, monospace);
}

/* Moves Language Bar */
.moves-lang-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

/* When relocated into the section-header, the bar is layout-flattened
   via display:contents so its children (lang switch + notice) become
   direct flex children of the header. Lets the title, switcher, and
   notice all sit on one line — notice's margin-left:auto pushes to
   the far right. */
.card-section-header > .moves-lang-bar {
  display: contents;
}

.lang-switch-sm {
  padding: 2px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.06);
}

#movesLangSwitch,
#movesTranslationNotice {
  margin-top: -10px;
}

.lang-switch-sm .lang-switch-option {
  width: 24px;
  height: 20px;
}

.lang-switch-sm .lang-switch-option .flag-icon {
  width: 16px;
  height: 11px;
}

.lang-switch-sm .lang-switch-slider {
  width: 24px;
  height: 20px;
  top: 2px;
  left: 2px;
  border-radius: 4px;
}

.moves-translation-notice,
.names-translation-notice {
  font-size: 11px;
  font-style: italic;
  color: #888;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.moves-translation-notice::before,
.names-translation-notice::before {
  content: 'ⓘ';
  font-style: normal;
  font-size: 12px;
  color: #aaa;
}

/* Merged Moves Section Wrappers */
#modalAbilitiesWrapper {
  margin-bottom: 14px;
}

#modalAttacksWrapper {
  margin-bottom: 14px;
}

#modalCombatStatsWrapper {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
}

/* Suffix Badge (EX, GX, etc.) */
.suffix-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 6px;
}

.suffix-badge.ex {
  background: #fef3c7;
  color: #d97706;
}
.suffix-badge.gx {
  background: #dbeafe;
  color: #2563eb;
}
.suffix-badge.tag-team-gx {
  background: #ede9fe;
  color: #7c3aed;
}
.suffix-badge.legend {
  background: #fce7f3;
  color: #db2777;
}
.suffix-badge.v {
  background: #f0fdf4;
  color: #16a34a;
}
.suffix-badge.vmax {
  background: #ecfeff;
  color: #0891b2;
}
.suffix-badge.vstar {
  background: #fef9c3;
  color: #ca8a04;
}

/* Special Badge (shiny, redacted, etc.) */
.special-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-left: 4px;
}

.special-badge.shiny {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
}
.special-badge.lenticular {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: white;
}
.special-badge.redacted {
  background: #1f2937;
  color: white;
}
.special-badge.frame {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  color: white;
}

/* Stage Badge */
.stage-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e5e7eb;
  color: #374151;
}

/* Collection Info Content */
.collection-info-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.collection-info-content .text-muted-xs {
  color: #999;
  font-style: italic;
}

/* Market Prices in new layout */
.card-section .market-prices-grid {
  grid-template-columns: 1fr 1fr;
}

/* Source section adjustments */
.card-section .source-section-content {
  margin-top: 0;
}

/* Card Names — inline toggle + dropdown in header */
.modal-name-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.modal-name-row h2 {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-names-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1.5px solid var(--border-color, #444);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary, #999);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.modal-names-toggle:hover {
  color: var(--text-primary, #eee);
  border-color: var(--text-secondary, #888);
  background: var(--hover-bg, rgba(255,255,255,0.05));
}

.modal-names-toggle.active {
  color: var(--accent-color, #6cb4ee);
  border-color: var(--accent-color, #6cb4ee);
  background: rgba(108, 180, 238, 0.1);
}

.modal-names-icon {
  width: 16px;
  height: 16px;
}

.modal-names-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  min-width: 280px;
  max-width: min(420px, calc(100vw - 60px));
  background: var(--card-bg, var(--surface));
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  animation: namesDropdownIn 0.15s ease-out;
}

@keyframes namesDropdownIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* The notice now lives inside the Card-Info section-header, floating
   to the right of the section title. Shared visual styling
   (italic + ⓘ) comes from .names-translation-notice above; here we
   only set placement.
   The legacy `.modal-names-dropdown .names-translation-notice` block
   was removed when the names list moved into the card-info-grid. */
.card-section-header .names-translation-notice {
  margin-top: 0;
  margin-left: auto; /* push to right edge of the section header */
}

/* Card Names List — flex-wrap so the row tries to fit every entry
   on one line and only spills to additional rows when content needs
   it. Each entry's intrinsic width drives the layout; min-width
   keeps the line readable on narrow modals. */
.card-names-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}
.card-names-list > .card-name-entry {
  flex: 1 1 auto;
  min-width: 0;
}

.card-name-entry {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px 0;
  font-size: 13px;
}

.card-name-lang {
  display: flex;
  align-items: center;
  gap: 4px;
  /* min-width is set inline by renderModalNamesSection: scales with
     the number of flags in this row so multi-lang groups don't get
     squeezed against the name value. */
  flex-shrink: 0;
  color: var(--text-secondary, #888);
}

.card-name-lang .flag-icon {
  width: 16px;
  height: 12px;
}

.card-name-value {
  color: var(--text-primary, #eee);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.card-name-unofficial {
  font-size: 11px;
  color: #9ca3af;
  flex-shrink: 0;
}

.card-name-entry--unofficial .card-name-value {
  opacity: 0.7;
}

.source-translation-notice {
  margin-left: auto;
}

.source-entry--unofficial {
  opacity: 0.7;
}

/* External links adjustments */
.card-section .external-links-row {
  margin-top: 0;
}

.card-section .external-link {
  padding: 5px 10px;
  font-size: 11px;
}

/* Fake/Real Cross-Reference Section */
.fake-ref-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fake-ref-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  line-height: 1.4;
}

.fake-ref-warning .fake-ref-item {
  background: rgba(234, 179, 8, 0.08);
  border: 1px solid rgba(234, 179, 8, 0.25);
}

.fake-ref-info .fake-ref-item {
  background: rgba(234, 179, 8, 0.08);
  border: 1px solid rgba(234, 179, 8, 0.25);
}

.fake-ref-icon {
  font-size: 16px;
  flex-shrink: 0;
  color: #f59e0b;
}

.fake-ref-text {
  flex: 1;
  color: var(--text-secondary, #888);
}

.fake-ref-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.fake-ref-actions .btn {
  font-size: 11px;
  padding: 4px 10px;
}

/* Fake Comparison Modal */
.fake-compare-modal {
  background: var(--modal-bg, white);
  border-radius: 12px;
  max-width: 1000px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.fake-compare-body {
  padding: 16px 20px 20px;
  overflow-y: auto;
}

.fake-compare-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.fake-compare-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.fake-compare-col img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border-color, #e5e7eb);
  cursor: zoom-in;
  transition: opacity 0.15s;
}

.fake-compare-col img:hover {
  opacity: 0.85;
}

.fake-compare-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 12px;
  border-radius: 10px;
}

.fake-compare-real {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.fake-compare-fake {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.fake-compare-diffs h4 {
  font-size: 13px;
  margin: 0 0 8px;
}

.fake-diffs-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fake-diff-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--card-bg, rgba(0,0,0,0.02));
}

.fake-diff-real,
.fake-diff-fake {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.fake-diff-badge-real,
.fake-diff-badge-fake {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
  flex-shrink: 0;
}

.fake-diff-badge-real {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.fake-diff-badge-fake {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.fake-diffs-empty {
  font-size: 12px;
  color: var(--text-secondary, #888);
  text-align: center;
  padding: 12px;
  font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .card-modal-body {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .card-modal-left {
    position: relative;
  }

  .card-modal-left .modal-image img {
    max-height: 300px;
  }

  .card-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-info-grid-3col {
    grid-template-columns: repeat(2, 1fr);
  }

  .combat-stats-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 500px) {
  .card-modal-redesign {
    max-width: 100%;
    margin: 5px;
    max-height: calc(100vh - 10px);
  }

  .card-modal-redesign .modal-header {
    padding: 12px 15px;
  }

  .card-modal-redesign .modal-header h2 {
    font-size: 16px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .modal-header-links {
    gap: 4px;
  }

  .header-link-btn {
    padding: 4px 8px;
    font-size: 10px;
  }

  .card-modal-body {
    padding: 12px;
  }

  .card-modal-left .modal-image img {
    max-height: 250px;
  }

  /* Fix action buttons on mobile */
  .card-modal-actions {
    padding: 10px;
  }

  .card-modal-actions .btn {
    padding: 10px 12px;
    font-size: 13px;
  }

  .card-modal-actions > div {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .card-modal-actions .btn-sm {
    flex: none !important;
    width: 100%;
  }

  .card-info-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .card-info-grid-3col {
    grid-template-columns: 1fr 1fr;
  }

  .combat-stats-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .combat-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
  }

  .combat-stat-label {
    margin-bottom: 0;
  }

  /* Navigation buttons */
  .modal-nav-buttons {
    flex-wrap: wrap;
    gap: 8px;
  }

  .modal-nav-buttons .btn {
    flex: 1;
    min-width: 120px;
    font-size: 12px;
    padding: 10px;
  }
}

/* Keyboard Helper (above search) */
.keyboard-helper kbd {
  background: #f0f0f0;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  font-weight: 600;
  color: #666;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Keyboard Shortcuts Help */
.keyboard-shortcuts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.shortcut-section h3 {
  font-size: 16px;
  color: var(--color-primary);
  margin: 0 0 15px 0;
  font-weight: 600;
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #666;
}

.shortcut-item kbd {
  background: #f0f0f0;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  min-width: 40px;
  text-align: center;
}

@media (max-width: 768px) {
  .keyboard-shortcuts-grid {
    grid-template-columns: 1fr;
  }

  .quick-filters-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .filter-section,
  .ownership-filters,
  .language-filters {
    width: 100%;
    justify-content: center;
  }

  .filter-section {
    align-items: center;
  }

  .quick-filters-row .divider-vertical {
    display: none;
  }

  .btn-toggle-advanced {
    margin-left: 0;
    flex: 1 1 100%;
    min-width: unset;
  }

  .display-count-bar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
  }

  .segmented-control {
    max-width: 100%;
  }

  .status-buttons {
    grid-template-columns: repeat(2, 1fr);
  }

  .status-label {
    font-size: 11px;
  }

  .filter-search-row {
    flex-direction: column;
  }
}

/* Modal Image Tabs */
.modal-image-tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 0;
  flex-wrap: wrap;
}

.modal-tab {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 10px;
  border: 1px solid var(--border-color, #ddd);
  border-radius: 16px;
  background: var(--bg-secondary, #f5f5f5);
  color: var(--text-secondary, #666);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.modal-tab:hover {
  background: var(--bg-tertiary, #eee);
  color: var(--text-primary, #333);
}

.modal-tab.active {
  /* Codex tokens — accent tint on the panel surface, accent text +
     border. The legacy white-on-light-blue combo (#667eea bg + white
     text) had poor contrast (~3:1) and was unreadable in dark mode. */
  background: color-mix(in srgb, var(--accent, #667eea) 22%, var(--surface));
  color: var(--accent, #2563eb);
  border-color: var(--accent, #667eea);
  font-weight: 600;
}

/* Report Card Error Notice */
.card-report-notice {
  text-align: center;
  padding: 0;
  font-size: 12px;
  color: #999;
}

.card-report-link {
  background: none;
  border: none;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 12px;
  margin-left: 4px;
  cursor: pointer;
  padding: 0;
}

.card-report-link:hover {
  text-decoration: underline;
}

/* ── Card modal: profile slot grid ─────────────────────────── */
.modal-profile-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.modal-profile-slot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border);
}
.modal-profile-slot.is-fulfilled {
  border-color: rgba(22,163,74,0.45);
  background: rgba(22,163,74,0.10);
  color: #166534;
}
.modal-profile-slot.is-missing {
  border-color: rgba(220,38,38,0.45);
  background: rgba(220,38,38,0.08);
  color: #b91c1c;
}
.modal-profile-slot-lang {
  font-variant-numeric: tabular-nums;
}
