/* ══════════════════════════════════════════════
   MAZOS VIEW  (css/mazos-view.css)
   Mis Mazos tab — deck management UI
══════════════════════════════════════════════ */

/* ── View container ── */
#view-mazos {
  position: fixed; top: 48px; left: 0; right: 0; bottom: 0;
  background: #111118;
  display: flex; flex-direction: column;
  font-family: system-ui, sans-serif;
  overflow: hidden;
  z-index: 9050;
  color: #e0e0e0;
}

/* ── Sub-views ── */
#mz-grid-view,
#mz-detail-view {
  display: flex; flex-direction: column;
  flex: 1; overflow: hidden;
  min-height: 0;
}
#mz-detail-view { display: none; }

/* ════ DECK GRID VIEW ═════════════════════════════════════════════ */

/* Header bar */
#mz-header {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px 12px;
  background: #1a1a28;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
#mz-title {
  font-family: system-ui, sans-serif;
  font-size: 16px; font-weight: 600;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.02em;
}
#mz-deck-count {
  font-family: system-ui, sans-serif;
  font-size: 12px; font-weight: 700;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.04em;
}
#mz-new-btn {
  margin-left: auto;
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.55);
  font-size: 12px; font-weight: 700;
  font-family: system-ui, sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
#mz-new-btn svg { width: 12px; height: 12px; flex-shrink: 0; }
#mz-new-btn:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.22);
}

/* Scrollable grid body */
#mz-grid-body {
  flex: 1; overflow-y: auto; min-height: 0;
  padding: 20px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent;
}
#mz-grid-body::-webkit-scrollbar { width: 6px; }
#mz-grid-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* Grid layout */
#mz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

/* Empty state */
#mz-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 40px;
  gap: 14px;
  color: rgba(255,255,255,0.25);
  font-size: 15px; text-align: center;
}
#mz-empty svg { width: 48px; height: 48px; opacity: 0.2; }
#mz-empty-hint {
  font-size: 12px; color: rgba(255,255,255,0.18); line-height: 1.6;
}

/* ── Deck card ── */
.mz-deck-card {
  display: flex; flex-direction: column;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #1a1a28;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: border-color 0.18s, transform 0.18s cubic-bezier(0.34,1.4,0.64,1), box-shadow 0.18s;
}
.mz-deck-card:hover {
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.55);
}

/* Stack preview: 3 back layers + front card, like "Mis Mazos" sidebar */
.mz-stack {
  position: relative;
  aspect-ratio: 400/559;
  margin-bottom: 14px;
}
.mz-stack-back {
  position: absolute; inset: 0;
  border-radius: 8px;
  background-size: cover; background-position: center;
  background-color: #252535;
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.22s cubic-bezier(0.34,1.4,0.64,1), opacity 0.22s;
}
.mz-stack-back-3 { transform: translateY(10px); opacity: 0.35; z-index: 0; }
.mz-stack-back-2 { transform: translateY(6px);  opacity: 0.55; z-index: 1; }
.mz-stack-back-1 { transform: translateY(3px);  opacity: 0.78; z-index: 2; }
.mz-stack-front {
  position: absolute; inset: 0; z-index: 3;
  border-radius: 8px;
  background-size: cover; background-position: center;
  background-color: #1a1a2a;
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
}
.mz-stack-front-empty {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e1e30, #252540);
}
.mz-stack-front-empty svg {
  width: 40px; height: 40px; opacity: 0.18;
}
.mz-deck-card:hover .mz-stack-front {
  transform: scale(1.04) translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.65);
  border-color: rgba(255,255,255,0.22);
}
.mz-deck-card:hover .mz-stack-back-1 { transform: translateY(5px);  opacity: 0.85; }
.mz-deck-card:hover .mz-stack-back-2 { transform: translateY(9px);  opacity: 0.6; }
.mz-deck-card:hover .mz-stack-back-3 { transform: translateY(13px); opacity: 0.4; }

/* Hover action overlay — slides up from bottom */
.mz-deck-actions {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.4) 80%, transparent 100%);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.mz-deck-card:hover .mz-deck-actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mz-action-btn {
  display: flex; align-items: center; gap: 5px; justify-content: center;
  padding: 5px 8px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(18,18,28,0.85);
  color: rgba(255,255,255,0.7);
  font-size: 10px; font-weight: 700;
  font-family: system-ui, sans-serif;
  letter-spacing: 0.05em; text-transform: uppercase;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}
.mz-action-btn svg { width: 11px; height: 11px; flex-shrink: 0; }
.mz-action-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* Info area below thumb */
.mz-deck-info {
  padding: 8px 10px 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.mz-deck-name {
  font-family: system-ui, sans-serif;
  font-size: 12px; font-weight: 700;
  color: rgba(255,255,255,0.85);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mz-deck-stats {
  font-size: 10px; color: rgba(255,255,255,0.35);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mz-deck-date {
  font-size: 9px; color: rgba(255,255,255,0.2);
  letter-spacing: 0.02em;
}

/* ════ DECK DETAIL VIEW ══════════════════════════════════════════ */

/* Detail header */
#mz-detail-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px;
  background: #1a1a28;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
#mz-back-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.5);
  font-size: 12px; font-weight: 700;
  font-family: system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
#mz-back-btn:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.85); }
#mz-detail-deck-name-header {
  font-family: system-ui, sans-serif;
  font-size: 14px; font-weight: 600;
  color: rgba(255,255,255,0.85);
}

/* Detail body: two columns */
#mz-detail-body {
  flex: 1; overflow: hidden; min-height: 0;
  display: flex; gap: 0;
}

/* Left: card grid */
#mz-detail-cards-col {
  flex: 0 0 60%;
  overflow-y: auto;
  padding: 16px;
  border-right: 1px solid rgba(255,255,255,0.07);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent;
}
#mz-detail-cards-col::-webkit-scrollbar { width: 6px; }
#mz-detail-cards-col::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* 5-column card grid */
#mz-cards-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

/* Individual card in detail grid */
.mz-detail-card {
  position: relative;
  aspect-ratio: 400/559;
  border-radius: 8px;
  background-size: cover; background-position: center;
  background-color: #252535;
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s;
  overflow: visible;
}
.mz-detail-card:hover {
  transform: scale(1.04) translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.65);
  border-color: rgba(255,255,255,0.22);
  z-index: 2;
}
.mz-detail-card-empty {
  background-color: rgba(255,255,255,0.03);
  border: 1px dashed rgba(255,255,255,0.08);
}
/* Duplicate badge */
.mz-card-count-badge {
  position: absolute; top: -4px; right: -4px;
  background: rgba(18,18,28,0.95);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  font-family: system-ui, sans-serif;
  font-size: 9px; font-weight: 700;
  color: rgba(255,255,255,0.8);
  padding: 1px 4px;
  line-height: 1.3;
  pointer-events: none;
  z-index: 3;
}

/* Section label inside detail */
.mz-section-label {
  font-size: 9px; font-weight: 800;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 6px; margin-top: 12px;
  font-family: system-ui, sans-serif;
}
.mz-section-label:first-child { margin-top: 0; }

/* Right: stats + actions */
#mz-detail-info-col {
  flex: 0 0 40%;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 14px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent;
}
#mz-detail-info-col::-webkit-scrollbar { width: 6px; }
#mz-detail-info-col::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* Deck name editable */
#mz-detail-name {
  font-family: system-ui, sans-serif;
  font-size: 18px; font-weight: 600;
  color: rgba(255,255,255,0.92);
  outline: none;
  border-radius: 6px;
  padding: 2px 4px;
  cursor: text;
  transition: background 0.15s;
  word-break: break-word;
}
#mz-detail-name:focus {
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.15);
}

/* Stats panel */
.mz-stats-panel {
  background: #1a1a28;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.mz-stat-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px;
}
.mz-stat-label {
  color: rgba(255,255,255,0.4);
  font-family: system-ui, sans-serif;
}
.mz-stat-value {
  font-family: system-ui, sans-serif;
  font-weight: 700;
  color: rgba(255,255,255,0.82);
}

/* Type breakdown bar */
.mz-type-bar {
  display: flex; border-radius: 4px; overflow: hidden;
  height: 6px; gap: 1px;
}
.mz-type-bar-poke {
  background: rgba(100,220,100,0.7);
  border-radius: 3px 0 0 3px;
  transition: width 0.3s ease;
}
.mz-type-bar-trainer {
  background: rgba(100,170,255,0.7);
  border-radius: 0 3px 3px 0;
  transition: width 0.3s ease;
}

/* Element dots row */
.mz-element-row {
  display: flex; flex-wrap: wrap; gap: 5px;
}
.mz-el-dot {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600;
  color: rgba(255,255,255,0.5);
  font-family: system-ui, sans-serif;
}
.mz-el-dot-circle {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.mz-el-orb {
  width: 16px; height: 16px; object-fit: contain; flex-shrink: 0;
  border-radius: 50%;   /* los orbes son JPEG sin transparencia → recortar esquinas negras */
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}

/* Stage row */
.mz-stage-row {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.mz-stage-badge {
  padding: 3px 10px; border-radius: 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  font-size: 10px; font-weight: 600;
  color: rgba(255,255,255,0.7);
  font-family: system-ui, sans-serif;
}

/* Action buttons in detail */
#mz-detail-actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 2px 0 6px;
}
.mz-detail-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 42px; height: 42px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.62);
  font-family: system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.mz-detail-btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.mz-detail-btn:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.9); }
/* Solo icono: el texto del botón = tooltip al pasar el ratón (aparece a los 0.5s). */
.mz-detail-btn span {
  position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%);
  background: rgba(14,14,22,0.97); color: rgba(255,255,255,0.9);
  font: 700 11px system-ui, sans-serif; letter-spacing: 0.02em; white-space: nowrap;
  padding: 5px 10px; border-radius: 7px; border: 1px solid rgba(255,255,255,0.1);
  pointer-events: none; opacity: 0; transition: opacity 0.15s 0.5s; z-index: 5;
}
.mz-detail-btn:hover span { opacity: 1; }
.mz-detail-btn.eliminar {
  border-color: rgba(220,60,60,0.2);
  color: rgba(220,100,100,0.6);
}
.mz-detail-btn.eliminar:hover { background: rgba(220,60,60,0.12); color: rgba(240,120,120,0.9); border-color: rgba(220,60,60,0.35); }

/* ── Export toast ── */
#mz-export-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(18,18,28,0.96);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 13px; font-weight: 700; font-family: system-ui, sans-serif;
  color: rgba(255,255,255,0.85);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}
#mz-export-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Responsive: narrow screens ── */
@media (max-width: 600px) {
  #mz-detail-body { flex-direction: column; }
  #mz-detail-cards-col {
    flex: none; max-height: 50vh;
    border-right: none; border-bottom: 1px solid rgba(255,255,255,0.07);
  }
  #mz-detail-info-col { flex: none; }
  #mz-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

/* ══ AESTHETIC UPDATE — align with app design language ══ */

/* Headers transparent — same as Cartas */
#mz-header, #mz-detail-header {
  background: transparent !important;
  border-bottom-color: rgba(255,255,255,0.06) !important;
}

/* Deck cards — less opaque, more subtle */
.mz-deck-card {
  border-radius: 10px !important;
  background: rgba(255,255,255,0.03) !important;
  border-color: rgba(255,255,255,0.07) !important;
}
.mz-deck-card:hover {
  border-color: rgba(255,255,255,0.14) !important;
  background: rgba(255,255,255,0.05) !important;
  box-shadow: 0 10px 32px rgba(0,0,0,0.5) !important;
}

/* Thumbnail fallback — darker */
.mz-stack-front-empty { background: linear-gradient(135deg, #141420, #1c1c2e) !important; }

/* Action buttons — unified border-radius */
.mz-action-btn { border-radius: 8px !important; }

/* Detail back button — match app style */
#mz-back-btn { border-radius: 10px !important; }

/* Stats panel — no heavy surface */
.mz-stats-panel {
  background: rgba(255,255,255,0.025) !important;
  border-radius: 10px !important;
  border-color: rgba(255,255,255,0.06) !important;
}

/* Detail column separator */
#mz-detail-body { gap: 20px !important; }
#mz-detail-cards-col { border-right-color: rgba(255,255,255,0.05) !important; }

/* Grid gap more breathable */
#mz-grid { gap: 14px !important; }

/* ══ SELECTOR DE RIVAL (Probar mazo) — cápsulas horizontales ══ */
.mz-rival-modal { width: 575px; max-width: calc(100vw - 48px); }
.mz-rival-title { text-align: center; font-size: 16px; }
.mz-rival-sub-head { text-align: center; margin-top: -8px; }
.mz-rival-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  max-height: 340px; overflow-y: auto; padding: 2px;
}
.mz-rival-opt {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px; border-radius: 12px;
  border: 1.5px solid transparent;
  background: rgba(255,255,255,0.04);
  cursor: pointer; font-family: system-ui, sans-serif;
  text-align: left; width: 100%;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.mz-rival-opt:hover { background: rgba(255,255,255,0.08); }
.mz-rival-opt:active { transform: scale(0.98); }
.mz-rival-opt.sel { border-color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.08); }
.mz-rival-opt.disabled { opacity: 0.35; cursor: default; }
/* Stack de cartas — mismo lenguaje que Mis Mazos de la sidebar */
.mz-rival-stack {
  width: 52px; height: 73px; flex-shrink: 0;
  position: relative; border-radius: 5px;
}
.mzr-back {
  position: absolute; inset: 0; border-radius: 5px;
  background-size: cover; background-position: center;
}
.mzr-back-3 { transform: translateY(5px); opacity: 0.45; }
.mzr-back-2 { transform: translateY(3.5px); opacity: 0.65; }
.mzr-back-1 { transform: translateY(2px); opacity: 0.82; }
.mzr-front {
  position: absolute; inset: 0; border-radius: 5px;
  background-size: cover; background-position: center;
  background-color: rgba(255,255,255,0.06);
  box-shadow: 0 3px 10px rgba(0,0,0,0.45);
}
.mzr-front-empty {
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
}
.mz-rival-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mz-rival-name {
  font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,0.88);
  line-height: 1.3; word-break: break-word;
}
.mz-rival-sub { font-size: 11px; color: rgba(255,255,255,0.35); }
.mz-rival-section {
  grid-column: 1 / -1;
  font-family: system-ui, sans-serif;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding: 9px 4px 2px;
}
.mz-rival-section:first-child { padding-top: 2px; }
/* Picker: dos pestañas deslizantes (Mis mazos / Mazos meta) */
.mz-pick-tabs {
  position: relative; display: flex; gap: 0;
  background: rgba(255,255,255,0.04); border-radius: 10px; padding: 4px;
  margin-bottom: 4px;
}
.mz-pick-tab {
  position: relative; z-index: 1; flex: 1 1 0;
  padding: 8px 10px; border: none; background: transparent;
  color: rgba(255,255,255,0.5);
  font-family: system-ui, sans-serif; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: color 0.18s;
}
.mz-pick-tab:hover { color: rgba(255,255,255,0.82); }
.mz-pick-tab.active { color: #fff; }
.mz-pick-tab-ind {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px);
  background: rgba(255,255,255,0.1); border-radius: 7px;
  transition: transform 0.24s cubic-bezier(0.4,0,0.2,1);
}
.mz-pick-tabs.on-meta .mz-pick-tab-ind { transform: translateX(100%); }
.mz-pick-empty {
  grid-column: 1 / -1; text-align: center; padding: 34px 12px; white-space: pre-line;
  color: rgba(255,255,255,0.35); font-family: system-ui, sans-serif; font-size: 13px; line-height: 1.5;
}
/* Lado "aleatorio oculto" del selector: dorso de carta (misterio) */
.start-sel-cover.mystery { background-color: rgba(255,255,255,0.04); }

/* ══ SELECTOR DE INICIO X-vs-Y (vertical) ══ */
.start-sel { width: min(380px, calc(100vw - 36px)); gap: 8px; padding: 16px 18px; }
.start-sel-side {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: 13px 14px; border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid color-mix(in srgb, var(--pc) 50%, rgba(255,255,255,0.06));
}
.start-sel-label {
  font-family: system-ui, sans-serif; font-weight: 800; font-size: 12px;
  letter-spacing: 1.4px; text-transform: uppercase; color: var(--pc);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.start-sel-cover {
  position: relative; cursor: pointer;
  width: 94px; aspect-ratio: 367 / 512; border-radius: 8px;
  background-size: cover; background-position: center;
  background-color: rgba(255,255,255,0.05);
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.16s cubic-bezier(0.34,1.3,0.64,1), box-shadow 0.16s, filter 0.16s, border-color 0.16s;
}
.start-sel-cover:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 26px rgba(0,0,0,0.6);
  filter: brightness(1.07);
  border-color: color-mix(in srgb, var(--pc) 60%, rgba(255,255,255,0.12));
}
.start-sel-cover:active { transform: translateY(-1px) scale(0.99); }
.start-sel-cover.empty {
  color: rgba(255,255,255,0.4); font-size: 11px; line-height: 1.4; text-align: center;
  padding: 8px; font-family: system-ui, sans-serif;
}
/* Insignia "cambiar mazo" en la esquina (color del jugador) — clic en el mazo para elegir otro */
.start-sel-edit {
  position: absolute; top: -8px; right: -8px;
  width: 25px; height: 25px; border-radius: 50%;
  background: var(--pc, #4dabff); color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: 2.5px solid #16161f;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  transition: transform 0.16s cubic-bezier(0.34,1.3,0.64,1), box-shadow 0.16s;
}
.start-sel-edit svg { width: 13px; height: 13px; }
.start-sel-cover:hover .start-sel-edit { transform: scale(1.15); box-shadow: 0 3px 11px rgba(0,0,0,0.55); }
.start-sel-deckname {
  font-family: system-ui, sans-serif; font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,0.7); text-align: center; cursor: pointer;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color 0.15s;
}
.start-sel-deckname:hover { color: rgba(255,255,255,0.95); }
.start-sel-vs {
  font-family: system-ui, sans-serif; font-weight: 900; font-size: 19px;
  letter-spacing: 2px; color: rgba(255,255,255,0.45); text-align: center; margin: -1px 0;
}
.start-sel-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.start-sel-actions .pb-btn { display: block; width: 100%; text-align: center; }
.start-sel-begin:disabled { opacity: 0.4; cursor: default; pointer-events: none; }

/* ══ INTRO VS ══ */
#vs-overlay {
  position: fixed; inset: 0; z-index: 999990;
  background: rgba(8,8,14,0);
  display: flex; align-items: center; justify-content: center; gap: 56px;
  pointer-events: none;
  transition: background 0.35s;
}
#vs-overlay.in { background: rgba(8,8,14,0.94); pointer-events: auto; }
.vs-side {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.22,1,0.36,1), opacity 0.4s;
}
.vs-left  { transform: translateX(-56px); }
.vs-right { transform: translateX(56px); }
#vs-overlay.in .vs-side { opacity: 1; transform: translateX(0); }
.vs-cover {
  width: 150px; height: 210px; border-radius: 11px;
  background-size: cover; background-position: center;
  background-color: rgba(255,255,255,0.05);
  box-shadow: 0 18px 48px rgba(0,0,0,0.6);
}
.vs-name {
  font-family: system-ui, sans-serif; font-size: 15px; font-weight: 600;
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vs-name-p1 { color: #4dabff; }
.vs-name-p2 { color: #ff6b6b; }
.vs-text {
  font-family: system-ui, sans-serif; font-size: 44px; font-weight: 800;
  color: rgba(255,255,255,0.95); letter-spacing: 0.04em;
  opacity: 0; transform: scale(1.7); filter: blur(8px);
  transition: transform 0.45s cubic-bezier(0.22,1,0.36,1) 0.18s,
              opacity 0.35s ease 0.18s, filter 0.45s ease 0.18s;
  text-shadow: 0 4px 24px rgba(0,0,0,0.6);
}
#vs-overlay.in .vs-text { opacity: 1; transform: scale(1); filter: blur(0); }
#vs-overlay.out { opacity: 0; transition: opacity 0.3s; }

/* ══ MANO INICIAL: probabilidades por básico ══ */
#mz-start-probs { display: flex; flex-direction: column; gap: 6px; }
.mz-prob-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px; border-radius: 10px;
  background: rgba(255,255,255,0.035);
  transition: background 0.15s;
}
.mz-prob-row:hover { background: rgba(255,255,255,0.07); }
.mz-prob-thumb {
  width: 40px; height: 56px; border-radius: 4px; flex-shrink: 0;
  background-size: cover; background-position: center top;
  background-color: rgba(255,255,255,0.06);
}
.mz-prob-name {
  flex: 1; min-width: 0;
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.85);
  font-family: system-ui, sans-serif;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mz-prob-vals {
  font-size: 11.5px; color: rgba(255,255,255,0.35);
  font-family: system-ui, sans-serif; white-space: nowrap;
}
.mz-prob-vals b { color: rgba(255,255,255,0.78); font-weight: 600; }
.mz-prob-empty { font-size: 11px; color: rgba(255,200,90,0.7); font-family: system-ui, sans-serif; }

/* ── Click = zoom SOLO en la miniatura (no toda la barra); hover en la fila = tooltip. ── */
.mz-prob-thumb, .mz-md-fthumb { cursor: zoom-in; }
.mz-tip {
  position: fixed; z-index: 12000; pointer-events: none;
  max-width: 280px; padding: 9px 12px; border-radius: 10px;
  background: rgba(18,18,26,0.98); border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 30px rgba(0,0,0,0.55);
  font: 12px/1.45 system-ui, sans-serif; color: rgba(255,255,255,0.82);
  opacity: 0; transform: translateY(3px); transition: opacity .12s, transform .12s;
}
.mz-tip.show { opacity: 1; transform: translateY(0); }
.mz-tip b { color: #fff; font-weight: 700; }
.mz-tip::after {
  content: ''; position: absolute; left: var(--mztip-ax, 50%); top: 100%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: rgba(18,18,26,0.98);
}
.mz-tip.below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: rgba(18,18,26,0.98); }

/* Renombrar mazo desde el título de la cabecera (doble clic) */
#mz-detail-deck-name-header.mz-rename { cursor: text; }
#mz-detail-deck-name-header[contenteditable="true"] { outline: 1px solid rgba(255,255,255,0.25); border-radius: 5px; padding: 0 4px; background: rgba(255,255,255,0.04); }

/* Energía del mazo junto al nombre en la cabecera del detalle */
.mz-detail-energy { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; vertical-align: middle; }
.mz-detail-energy .mz-el-orb { width: 18px; height: 18px; }

/* ── Mano inicial: nombre + cifras en una línea (sin barras) ── */
.mz-prob-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }

/* ── Robada para el turno v2: curva acumulada ── */
.mz-turn2-chart { margin-top: 2px; }
.mz-tc-svg { width: 100%; height: auto; display: block; overflow: visible; }
.mz-tc-line { stroke: #6fe6a0; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mz-tc-dot { fill: #6fe6a0; }
.mz-tc-dot.key { fill: #fff; stroke: #6fe6a0; stroke-width: 2; }
.mz-tc-pct { fill: rgba(255,255,255,0.5); font: 700 9px system-ui, sans-serif; }
.mz-tc-pct.key { fill: #fff; font-size: 11px; }
.mz-tc-lbl { fill: rgba(255,255,255,0.4); font: 600 8.5px system-ui, sans-serif; }
.mz-tc-lbl.key { fill: rgba(255,255,255,0.7); }
.mz-tc-mid { stroke: rgba(255,255,255,0.13); stroke-width: 1; stroke-dasharray: 3 3; }
.mz-tc-midlbl { fill: rgba(255,255,255,0.3); font: 600 7.5px system-ui, sans-serif; }

/* Chips del modal de export */
.mz-export-lbl {
  font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.4);
  font-family: system-ui, sans-serif; margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.mz-export-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.mz-export-chip {
  padding: 7px 14px; border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.11);
  background: transparent; color: rgba(255,255,255,0.5);
  font-family: system-ui, sans-serif; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}
.mz-export-chip:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.85); }
.mz-export-chip:active { transform: scale(0.96); }
.mz-export-chip.sel { border-color: rgba(255,255,255,0.85); color: #fff; background: rgba(255,255,255,0.08); }


/* ══ MENÚ COMPARTIR ══ */
.mz-share-modal { width: 320px; }
.mz-share-list { display: flex; flex-direction: column; gap: 7px; }
.mz-share-opt {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; border-radius: 11px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.85);
  font-family: system-ui, sans-serif; font-size: 13px; font-weight: 600;
  cursor: pointer; text-align: left;
  transition: background 0.15s, transform 0.1s;
}
.mz-share-opt:hover { background: rgba(255,255,255,0.09); }
.mz-share-opt:active { transform: scale(0.97); }
.mz-share-opt svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.8; }

/* ══ CALCULADORA «ROBADA PARA EL TURNO» ══ */
.mz-turn-select {
  width: 100%;
  padding: 7px 10px; border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.88);
  font-family: system-ui, sans-serif; font-size: 12px; font-weight: 600;
  cursor: pointer; outline: none;
  margin-bottom: 7px;
}
.mz-turn-select:hover { background: rgba(255,255,255,0.08); }
.mz-turn-select option { background: #16161f; }
.mz-turn-chips { display: flex; gap: 5px; }
.mz-turn-chip {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 5px 2px; border-radius: 8px;
  background: rgba(255,255,255,0.035);
}
.mz-turn-chip-t { font-size: 9.5px; font-weight: 600; color: rgba(255,255,255,0.35); }
.mz-turn-chip b { font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.88); }

/* ════ SECCIÓN META — Mejores mazos (tanda 2) ═════════════════════ */

/* Toggle Mis mazos | Meta (estética Cartas: blanco translúcido) */
#mz-mode-toggle {
  display: inline-flex; padding: 4px; gap: 3px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
}
.mz-mode-btn {
  appearance: none; border: none; cursor: pointer;
  padding: 9px 20px; border-radius: 9px;
  background: transparent; color: rgba(255,255,255,0.55);
  font-family: system-ui, sans-serif;
  font-size: 14px; font-weight: 700; letter-spacing: 0.01em;
  transition: background 0.15s, color 0.15s;
}
.mz-mode-btn:hover { color: rgba(255,255,255,0.8); }
.mz-mode-btn.active {
  background: rgba(255,255,255,0.11);
  color: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

/* Banner del meta (fuente + expansión + fecha) */
#mz-meta-banner {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: -4px 0 16px; padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  font-family: system-ui, sans-serif;
  font-size: 12px; color: rgba(255,255,255,0.55); line-height: 1.5;
}
#mz-meta-banner b { color: rgba(255,255,255,0.85); font-weight: 700; }
#mz-meta-banner .mz-meta-dot { opacity: 0.35; }
#mz-meta-banner .mz-meta-src { margin-left: auto; color: rgba(255,255,255,0.35); }

/* Tarjeta de mazo meta (hereda .mz-deck-card para hover/borde/acciones) */
.mz-meta-card .mz-meta-thumb {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 16px 10px 14px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,0.05), transparent 70%);
}
.mz-meta-rank {
  position: absolute; top: 8px; left: 8px; z-index: 3;
  min-width: 20px; height: 20px; padding: 0 5px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.8);
  font-family: system-ui, sans-serif; font-size: 11px; font-weight: 800;
}

/* Imagen de arquetipo: tamaño carta, corte horizontal, mitad superior de cada protagonista */
.mz-arch {
  position: relative; width: 104px; aspect-ratio: 367/512;
  border-radius: 9px; overflow: hidden; background: #12121c;
  box-shadow: 0 4px 14px rgba(0,0,0,0.45);
}
.mz-arch .mz-arch-h {
  position: absolute; left: 0; right: 0; height: 50%;
  background-size: 100% auto; background-repeat: no-repeat; background-position: center top;
}
.mz-arch .mz-arch-h.top { top: 0; }
.mz-arch .mz-arch-h.bot { bottom: 0; }
.mz-arch .mz-arch-h.full { top: 0; height: 100%; background-size: cover; background-position: center; }
.mz-arch .mz-arch-seam {
  position: absolute; left: 0; right: 0; top: 50%; height: 2px;
  transform: translateY(-1px);
  background: rgba(255,255,255,0.6); box-shadow: 0 0 4px rgba(0,0,0,0.55);
}

/* Línea de stats del meta (uso / victorias) bajo el nombre */
.mz-meta-statline {
  display: flex; align-items: center; gap: 8px;
  font-size: 10px; color: rgba(255,255,255,0.45);
}
.mz-meta-statline .mz-meta-num { color: rgba(255,255,255,0.85); font-weight: 800; }
.mz-meta-statline .mz-meta-dot { opacity: 0.35; }

/* Botón Guardar en Mis Mazos (detalle) — neutro, sutilmente destacado */
.mz-detail-btn.guardar {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.82);
}
.mz-detail-btn.guardar:hover {
  background: rgba(255,255,255,0.13); color: #fff; border-color: rgba(255,255,255,0.3);
}

/* Línea meta dentro del detalle (uso / victorias / partidas) */
.mz-meta-detail-line {
  display: flex; flex-wrap: wrap; gap: 7px; margin: 2px 0 6px;
}
.mz-meta-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 999px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  font-family: system-ui, sans-serif; font-size: 11px; color: rgba(255,255,255,0.6);
}
.mz-meta-chip b { color: #fff; font-weight: 800; }

/* ════ META — tabla ultra-minimalista (estética lista de Cartas) ═══ */
#mz-grid-body.mz-meta-mode #mz-grid { display: block; }
#mz-meta-wrap { overflow-x: auto; }

.mz-meta-table { width: 100%; border-collapse: collapse; font-family: system-ui, sans-serif; font-size: 14px; }
.mz-meta-table th {
  background: #15151f; border-bottom: 1px solid #2a2a3a;
  padding: 9px 14px; text-align: left; color: #888;
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  white-space: nowrap; position: sticky; top: 0; z-index: 2; user-select: none;
}
.mz-meta-table th.num { text-align: right; }
.mz-meta-table th.sortable { cursor: pointer; transition: color .13s; }
.mz-meta-table th.sortable:hover { color: #bbb; }
.mz-meta-table th.sorted { color: #e6e6ee; }
.mz-meta-table th .mz-sort-arrow { font-size: 9px; margin-left: 4px; }

/* Filas relajadas: ~doble de altas, con aire entre mazos */
.mz-meta-table td { padding: 15px 14px; border-bottom: 1px solid #1a1a24; vertical-align: middle; color: #e0e0e0; }
.mz-meta-table td.num { text-align: right; font-variant-numeric: tabular-nums; font-size: 15px; }
.mz-meta-table tr.mz-trow { cursor: pointer; }
.mz-meta-table tr.mz-trow:hover td { background: #1a1a26; }

.mz-meta-table .mz-rk { color: #5e5e6e; font-variant-numeric: tabular-nums; text-align: right; width: 1%; padding-right: 10px; font-size: 14px; }
.mz-meta-table .mz-tcell-thumb { width: 1%; padding-right: 6px; }
/* Las dos cartas protagonistas COMPLETAS, una al lado de otra, sin redondez extra */
.mz-meta-table .mz-tcards { display: flex; gap: 5px; align-items: center; }
.mz-meta-table .mz-tcard { height: 92px; width: auto; display: block; border-radius: 0; box-shadow: 0 2px 7px rgba(0,0,0,.5); }
.mz-meta-table .mz-tname { font-weight: 500; font-size: 15.5px; color: rgba(255,255,255,0.92); white-space: nowrap; }
.mz-meta-table td.wr.pos { color: #6fe6a0; }
.mz-meta-table td.wr.neg { color: #ff8f8f; }

.mz-meta-table .mz-tbar {
  display: inline-block; width: 48px; height: 5px; border-radius: 3px; margin-right: 10px;
  background: rgba(255,255,255,0.08); overflow: hidden; vertical-align: middle;
}
.mz-meta-table .mz-tbar > span { display: block; height: 100%; background: linear-gradient(90deg, rgba(255,255,255,0.55), rgba(255,255,255,0.22)); }

/* Tendencia: COLUMNA propia a la derecha del uso (no empuja el %) */
.mz-meta-table th.mz-tcol-h, .mz-meta-table td.mz-tcol { width: 1%; white-space: nowrap; padding-left: 4px; }
.mz-meta-table .mz-trend {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: default;
}
.mz-meta-table .mz-trend.up   { color: #6fe6a0; }
.mz-meta-table .mz-trend.down { color: #ff8f8f; }
/* Orbe DORADA "nuevo" — brillante y con glow pulsante */
/* Indicador «nuevo» en la lista del meta — badge limpio (sin el punto amarillo) */
.mz-newbadge {
  display: inline-block; padding: 2px 7px; border-radius: 6px; cursor: default;
  font: 700 9px system-ui, sans-serif; letter-spacing: 0.06em; text-transform: uppercase;
  color: #cfe3ff; background: rgba(120,170,255,0.16); border: 1px solid rgba(120,170,255,0.35);
}

/* ── Barra de filtros del meta (estilo Cartas) ── */
#mz-meta-filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
#mz-meta-search {
  flex: 0 0 auto; width: 210px; max-width: 40vw;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 9px; padding: 8px 12px; color: #e8e8ee;
  font-family: system-ui, sans-serif; font-size: 13px; outline: none;
  transition: border-color .15s, background .15s;
}
#mz-meta-search:focus { border-color: rgba(255,255,255,0.28); background: rgba(255,255,255,0.07); }
#mz-meta-search::placeholder { color: rgba(255,255,255,0.34); }
/* Tendencia (Nuevos / En alza / En caída): UNA pill segmentada estilo Cartas (.cv-chip-group),
   con color de estado por segmento. El resto de la apariencia la hereda de cards-view.css. */
.mz-trend-group .cv-chip { gap: 6px; }
.mz-trend-group .cv-chip .mz-fic { font-size: 10px; opacity: 0.85; }
.mz-trend-group .cv-chip[data-q="new"].active     { background: rgba(120,170,255,0.22); color: #cfe3ff; }
.mz-trend-group .cv-chip[data-q="rising"].active  { background: rgba(111,230,160,0.22); color: #aef0c8; }
.mz-trend-group .cv-chip[data-q="falling"].active { background: rgba(255,143,143,0.2);  color: #ffc2c2; }

/* Dropdown «Ajustes avanzados» (mismo look que el de Cartas #cv-advanced) */
#mz-advanced { flex-basis: 100%; width: 100%; margin-top: 2px; }
#mz-adv-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px 6px 11px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.11); background: transparent;
  color: rgba(255,255,255,0.5); cursor: pointer;
  font-family: system-ui, sans-serif; font-size: 12.5px; font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
#mz-adv-toggle:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.82); }
#mz-advanced.open #mz-adv-toggle { color: rgba(255,255,255,0.92); background: rgba(255,255,255,0.06); }
#mz-advanced.open .cv-adv-caret { transform: rotate(90deg); }
#mz-adv-count {
  display: none; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: rgba(255,255,255,0.18); color: #fff; font-size: 10px; font-weight: 800; line-height: 1;
  align-items: center; justify-content: center;
}
#mz-adv-count.on { display: inline-flex; }
#mz-adv-body { display: none; width: 100%; margin-top: 12px; }
#mz-advanced.open #mz-adv-body { display: block; }
.mz-adv-block { margin-bottom: 16px; }
#mz-card-search {
  width: 280px; max-width: 100%;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 9px; padding: 8px 12px; color: #e8e8ee;
  font-family: system-ui, sans-serif; font-size: 13px; outline: none;
  transition: border-color .15s, background .15s;
}
#mz-card-search:focus { border-color: rgba(255,255,255,0.28); background: rgba(255,255,255,0.07); }
#mz-card-search::placeholder { color: rgba(255,255,255,0.34); }

/* Sliders de filtro: MÍNIMO de partidas + VICTORIAS (rango, 2 mangos) */
.mz-sliders { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 18px 32px; margin-top: 6px; }
.mz-slider { display: flex; flex-direction: column; gap: 8px; flex: 1 1 240px; min-width: 210px; max-width: 360px; }
.mz-slider-lbl { font: 600 12px system-ui, sans-serif; color: rgba(255,255,255,0.5); }
.mz-slider-lbl b { color: rgba(255,255,255,0.92); font-weight: 800; font-variant-numeric: tabular-nums; }
.mz-range { position: relative; height: 22px; }
.mz-range-track { position: absolute; top: 50%; left: 0; right: 0; height: 4px; transform: translateY(-50%);
  background: rgba(255,255,255,0.12); border-radius: 3px; }
.mz-range-fill { position: absolute; top: 0; bottom: 0; background: rgba(255,255,255,0.6); border-radius: 3px; }
.mz-range input[type=range] {
  position: absolute; top: 0; left: 0; width: 100%; height: 22px; margin: 0;
  background: none; pointer-events: none; -webkit-appearance: none; appearance: none;
}
.mz-range input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto; width: 15px; height: 15px; border-radius: 50%;
  background: #fff; border: 1px solid rgba(0,0,0,0.35); cursor: grab; box-shadow: 0 1px 3px rgba(0,0,0,0.45);
}
.mz-range input[type=range]::-moz-range-thumb {
  pointer-events: auto; width: 15px; height: 15px; border-radius: 50%; background: #fff; border: none; cursor: grab;
}
.mz-range-dual .mz-range-lo { z-index: 3; }
.mz-range-dual .mz-range-hi { z-index: 4; }
/* Tipos de energía: pill segmentada idéntica a Cartas — .cv-chip-group + .cv-el-icon
   (orbes reales + icono de dragón) heredan todo su estilo de cards-view.css. */
#mz-meta-empty-filter { padding: 50px 20px; text-align: center; color: rgba(255,255,255,0.3); font-size: 14px; }

#mz-meta-more { display: flex; justify-content: center; padding: 16px 0 6px; }
#mz-meta-more button {
  padding: 8px 18px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.6); font-size: 12px; font-weight: 700; font-family: system-ui, sans-serif;
  letter-spacing: .03em; transition: background .15s, color .15s, border-color .15s;
}
#mz-meta-more button:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.85); border-color: rgba(255,255,255,0.22); }

/* ════ DETALLE META (consenso + flex/tech) ════════════════════════ */
#mz-meta-detail { flex: 1 1 auto; width: 100%; overflow-y: auto; padding: 10px 26px 28px; }

.mz-md-head { display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; margin-bottom: 18px; }
.mz-md-art .mz-tcards { display: flex; gap: 6px; }
.mz-md-art .mz-tcard { height: 104px; width: auto; border-radius: 0; box-shadow: 0 4px 14px rgba(0,0,0,.5); }
.mz-md-title { font-family: system-ui, sans-serif; font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 0; }
/* Stats del ARQUETIPO junto al nombre: línea de datos PLANA (no botones: sin borde ni caja). */
.mz-md-chips { display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px; }
.mz-md-chip {
  display: inline-flex; align-items: baseline; gap: 5px; padding: 0; border: none; background: none;
  font-family: system-ui, sans-serif; font-size: 12.5px; color: rgba(255,255,255,0.42);
}
.mz-md-chip b { color: rgba(255,255,255,0.95); font-weight: 800; font-size: 14px; }
.mz-md-chip.wr.pos b { color: #6fe6a0; } .mz-md-chip.wr.neg b { color: #ff8f8f; }
/* Chip de tipos de energía en el detalle meta (orbes reales) */
.mz-md-energychip { gap: 5px; padding: 4px 9px; }
.mz-md-energychip .mz-el-orb { width: 15px; height: 15px; }
.mz-md-chip.trendchip { padding: 0; }
.mz-md-sub { margin-top: 9px; font-family: system-ui, sans-serif; font-size: 11.5px; color: rgba(255,255,255,0.35); }

.mz-md-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 720px) { .mz-md-cols { grid-template-columns: 1fr; } }
.mz-md-col-h {
  font-family: system-ui, sans-serif; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: rgba(255,255,255,0.4); margin-bottom: 10px;
  padding-bottom: 7px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mz-md-sec { margin-bottom: 14px; }
.mz-md-h { font-family: system-ui, sans-serif; font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.5); margin: 0 0 7px 2px; }
.mz-md-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 6px; }
.mz-md-card {
  display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 8px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
}
.mz-md-thumb { width: 30px; height: 42px; object-fit: cover; border-radius: 0; background: #1a1a24; flex: 0 0 auto; }
.mz-md-count { font-family: system-ui, sans-serif; font-size: 13px; font-weight: 800; color: rgba(255,255,255,0.55); font-variant-numeric: tabular-nums; }
.mz-md-name { font-family: system-ui, sans-serif; font-size: 12.5px; color: rgba(255,255,255,0.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; }
.mz-md-flex {
  flex: 0 0 auto; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 999px;
  background: rgba(120,150,255,0.16); color: #b9c4ff; border: 1px solid rgba(120,150,255,0.3);
}
.mz-md-flex.tech { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.5); border-color: rgba(255,255,255,0.12); }

.mz-md-flexhint { font-family: system-ui, sans-serif; font-size: 11.5px; color: rgba(255,255,255,0.4); margin: -2px 0 10px; }
.mz-md-frow { display: flex; align-items: center; gap: 8px; padding: 4px 2px; }
.mz-md-fthumb { width: 24px; height: 33px; object-fit: cover; border-radius: 0; background: #1a1a24; flex: 0 0 auto; }
.mz-md-fname { font-family: system-ui, sans-serif; font-size: 12.5px; color: rgba(255,255,255,0.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; }
.mz-md-fbar { flex: 0 0 70px; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
.mz-md-fbar > span { display: block; height: 100%; background: linear-gradient(90deg, rgba(150,180,255,0.85), rgba(120,150,255,0.5)); }
.mz-md-fbar.tech > span { background: rgba(255,255,255,0.28); }
.mz-md-fpct { flex: 0 0 auto; width: 34px; text-align: right; font-family: system-ui, sans-serif; font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.7); font-variant-numeric: tabular-nums; }
.mz-md-legend { width: 100%; max-width: 680px; margin: 12px auto 0; font-family: system-ui, sans-serif; font-size: 10.5px; color: rgba(255,255,255,0.3); }

/* ── 2ª fila de pestañas: Estadísticas / Enfrentamientos (bajo los botones) ── */
/* Doble clase para ganar al margin de `.mz-md-tabs` (definido después). Mismo ancho completo
   + justify-content:center que las pestañas de versión → quedan centradas igual. */
.mz-md-tabs.mz-md-tabs2 { margin: 28px 0 16px; }
.mz-md-low { width: 100%; }
.mz-md-low .mz-md-prob { max-width: 680px; margin: 18px auto 0; }
.mz-md-low .mz-md-start { display: flex; flex-direction: column; gap: 6px; }
.mz-md-empty { padding: 24px 8px; color: rgba(255,255,255,0.3); font-family: system-ui, sans-serif; font-size: 13px; }

.mz-md-probs { margin-top: 20px; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 12px; }
.mz-md-probs summary {
  cursor: pointer; font-family: system-ui, sans-serif; font-size: 13px; font-weight: 700;
  color: rgba(255,255,255,0.7); list-style: none; user-select: none; padding: 4px 0;
}
.mz-md-probs summary::-webkit-details-marker { display: none; }
.mz-md-probs summary::before { content: '▸ '; color: rgba(255,255,255,0.4); }
.mz-md-probs[open] summary::before { content: '▾ '; }
.mz-md-probsbody { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 12px 2px 2px; }
@media (max-width: 720px) { .mz-md-probsbody { grid-template-columns: 1fr; } }
.mz-md-prob-h { font-family: system-ui, sans-serif; font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.45); margin-bottom: 8px; }

.mz-md-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.mz-md-actions .mz-detail-btn { flex: 0 0 auto; }

/* ── Enfrentamientos (matchups del meta) ── */
.mz-md-mu { width: 100%; max-width: 680px; margin: 22px auto 4px; font-family: system-ui, sans-serif; }
.mz-mu-bar2 { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.mz-mu-title { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(255,255,255,0.55); }
/* Conmutador segmentado (estética Cartas) */
.mz-mu-seg { display: inline-flex; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.10); border-radius: 9px; padding: 2px; gap: 2px; }
.mz-mu-sg { border: none; background: none; cursor: pointer; padding: 5px 12px; border-radius: 7px;
  font: 600 12px system-ui, sans-serif; color: rgba(255,255,255,0.5); transition: background 0.15s, color 0.15s; }
.mz-mu-sg:hover { color: rgba(255,255,255,0.8); }
.mz-mu-sg.on { background: rgba(255,255,255,0.12); color: #fff; }

/* Lista única (1 columna, mejor → peor) + explicación + divisores mejores/peores */
.mz-mu-explain { font-family: system-ui, sans-serif; font-size: 11px; color: rgba(255,255,255,0.4);
  margin: -6px 0 11px; }
.mz-mu-list { display: flex; flex-direction: column; gap: 2px; }
.mz-mu-div { display: flex; align-items: center; gap: 10px; margin: 12px 2px 4px;
  font: 800 10px system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; }
.mz-mu-div:first-child { margin-top: 0; }
.mz-mu-div::before, .mz-mu-div::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.08); }
.mz-mu-div span { flex: 0 0 auto; }
.mz-mu-div.best  span { color: #6fe6a0; }
.mz-mu-div.worst span { color: #ff8f8f; }

/* Fila de enfrentamiento (botón clicable) */
.mz-mu-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: none; border: none; border-radius: 8px; padding: 7px 10px; cursor: pointer;
  font-family: system-ui, sans-serif; transition: background 0.14s; }
.mz-mu-row:hover { background: rgba(255,255,255,0.06); }
.mz-mu-row.nolink { cursor: default; }
.mz-mu-row.nolink:hover { background: none; }
/* Miniatura del rival = formato de mazo de la tierlist (mono/dual, _tlDeckCover).
   Forma de CARTA por defecto: SIN recorte cuadrado ni redondeo. */
.mz-mu-cover { width: 42px; aspect-ratio: 367 / 512; flex-shrink: 0; overflow: hidden;
  background: rgba(255,255,255,0.04); }
.mz-mu-cover .tl-deck-cover { width: 100%; height: 100%; }
.mz-mu-name { flex: 1; min-width: 0; font-size: 13.5px; color: rgba(255,255,255,0.85);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mz-mu-bar { width: 96px; height: 6px; border-radius: 4px; background: rgba(255,255,255,0.08); overflow: hidden; flex-shrink: 0; }
.mz-mu-bar > span { display: block; height: 100%; border-radius: 4px; }
.mz-mu-pct { font-size: 13px; font-weight: 700; width: 44px; text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.mz-mu-n { font-size: 10.5px; color: rgba(255,255,255,0.3); width: 42px; text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* ── Distribución apaisada (deckLayout) ── */
.mz-dl { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mz-dl-row { display: flex; justify-content: center; gap: 8px; flex-wrap: nowrap; }
.mz-dl-row.wrap { flex-wrap: wrap; gap: 16px 13px; max-width: 1180px; align-items: flex-start; }
.mz-dl.big { gap: 16px; }
.mz-dl-card { position: relative; flex: 0 0 auto; }
/* aspect-ratio reserva la caja aunque la imagen tarde/falle → no colapsa ni desplaza al resto */
.mz-dl-card > img { height: 96px; width: auto; aspect-ratio: 367 / 512; object-fit: cover; display: block; border-radius: 0; box-shadow: 0 2px 8px rgba(0,0,0,.5); background: rgba(255,255,255,0.04); }
.mz-dl.big .mz-dl-card > img { height: 200px; }   /* detalle meta ~2x (tuneable) */
.mz-dl-x {
  position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%);
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20,20,28,0.9); border: 1px solid rgba(255,255,255,0.25);
  color: #fff; font-family: system-ui, sans-serif; font-size: 11px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.mz-dl-flag {
  position: absolute; top: 4px; right: 4px;
  padding: 1px 5px; border-radius: 6px;
  background: rgba(120,150,255,0.92); color: #0d0d16;
  font-family: system-ui, sans-serif; font-size: 10px; font-weight: 800;
}
.mz-dl-card.tech .mz-dl-flag { background: rgba(255,200,120,0.92); }

/* ── Selector de variantes ── */
.mz-md-vtabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 4px 0 14px; }
.mz-md-vtab {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 7px 14px; border-radius: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6); font-family: system-ui, sans-serif; font-size: 12.5px; font-weight: 700;
  transition: background .14s, color .14s, border-color .14s;
}
.mz-md-vtab:hover { color: rgba(255,255,255,0.85); border-color: rgba(255,255,255,0.2); }
.mz-md-vtab.active { background: rgba(255,255,255,0.13); color: #fff; border-color: rgba(255,255,255,0.3); }
.mz-md-vt-share { font-size: 11px; font-weight: 800; color: rgba(150,180,255,0.95); font-variant-numeric: tabular-nums; }
.mz-md-vtab.active .mz-md-vt-share { color: #b9c4ff; }

.mz-md-head { text-align: left; margin-bottom: 14px; }
.mz-md-hero { display: flex; justify-content: center; margin: 4px 0 6px; }
.mz-md-vline { text-align: center; font-family: system-ui, sans-serif; font-size: 12.5px; color: rgba(255,255,255,0.55); margin: 6px 0 2px; }
.mz-md-vline b { color: #fff; }
.mz-md-actions { justify-content: center; }
.mz-md-meta { margin-top: 22px; max-width: 560px; margin-left: auto; margin-right: auto; }
.mz-md-fsr { flex: 0 0 auto; margin-left: 8px; font-size: 11px; color: #6fe6a0; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── Mis mazos: mismo lenguaje que el meta (deck apaisado arriba, stats debajo) ── */
#mz-detail-body.mz-mine { flex-direction: column; overflow-y: auto; gap: 18px !important; padding: 18px 20px; align-items: center; }
#mz-detail-body.mz-mine #mz-detail-cards-col {
  flex: none; width: 100%; max-width: 980px; overflow: visible;
  border-right: none; border-bottom: 1px solid rgba(255,255,255,0.07); padding: 6px 0 20px;
}
#mz-detail-body.mz-mine #mz-cards-grid { display: block; }
#mz-detail-body.mz-mine #mz-detail-info-col {
  flex: none; width: 100%; max-width: 720px; overflow: visible; padding: 0;
}

/* Núcleo / slots flexibles dentro del deckLayout */
.mz-dl-sep {
  margin: 16px 0 4px; font-family: system-ui, sans-serif; font-size: 10.5px; font-weight: 800;
  letter-spacing: .09em; text-transform: uppercase; color: rgba(255,205,110,0.95);
  display: flex; align-items: center; gap: 10px; width: 100%; max-width: 560px;
}
.mz-dl-sep::before, .mz-dl-sep::after { content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,205,110,0.4), transparent); }
.mz-dl-flag { font-size: 11px; padding: 1px 6px; }

/* ── Tabs del detalle meta (estilo sidebar: subrayado inferior) ── */
.mz-md-tabs { display: flex; gap: 4px; justify-content: center; border-bottom: 1px solid rgba(255,255,255,0.08); margin: 6px 0 12px; }
.mz-md-tab {
  position: relative; background: none; border: none; cursor: pointer;
  padding: 9px 16px; font-family: system-ui, sans-serif; font-size: 13px; font-weight: 700;
  color: rgba(255,255,255,0.4); transition: color .15s;
}
.mz-md-tab:hover { color: rgba(255,255,255,0.7); }
.mz-md-tab.active { color: #fff; }
.mz-md-tab.active::after {
  content: ''; position: absolute; bottom: -1px; left: 14%; right: 14%;
  height: 2px; background: rgba(255,255,255,0.6); border-radius: 2px 2px 0 0;
}
.mz-md-tshare { font-size: 11px; font-weight: 800; color: rgba(255,255,255,0.5); margin-left: 5px; font-variant-numeric: tabular-nums; }
.mz-md-tab.active .mz-md-tshare { color: rgba(255,255,255,0.92); }
.mz-md-subline { text-align: center; font-family: system-ui, sans-serif; font-size: 12px; color: rgba(255,255,255,0.5); margin: 0 0 10px; }
.mz-md-subline b { color: #fff; }

/* Esquinas redondeadas como las cartas del tablero → el aro del hueco SIGUE la forma de la carta */
.mz-dl.big .mz-dl-card > img { border-radius: 10px; }
/* ── Hueco flexible = marca estilo «spotlight» del tablero (clic derecho), pero VERDE y más fina ── */
.mz-dl-card.flexcard > img {
  box-shadow: 0 0 0 2px #5fd68a, 0 0 18px 5px rgba(95,214,138,0.5);
  transition: box-shadow .18s ease, transform .18s ease;
}
.mz-dl-card.flexcard:hover > img {
  transform: translateY(-5px);
  box-shadow: 0 0 0 2px #6fe6a0, 0 0 22px 7px rgba(95,214,138,0.62), 0 8px 20px rgba(0,0,0,.5);
}

/* ── Lista «Flex y tech» bajo el mazo: miniatura + barra de % de uso + % (restaurada) ── */
.mz-md-flexpanel { width: 100%; max-width: 680px; margin: 20px auto 6px; }
.mz-md-flextitle {
  font-family: system-ui, sans-serif; font-size: 11px; font-weight: 800;
  letter-spacing: .09em; text-transform: uppercase; color: rgba(255,255,255,0.72); margin-bottom: 3px;
}
.mz-md-flexhint { font-family: system-ui, sans-serif; font-size: 11.5px; color: rgba(255,255,255,0.4); margin: 0 0 11px; }
.mz-md-flexlist { display: flex; flex-direction: column; gap: 1px; }
.mz-md-frow { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 8px; transition: background .14s; }
.mz-md-frow:hover { background: rgba(255,255,255,0.05); }
.mz-md-fthumb { width: 40px; height: 56px; object-fit: cover; border-radius: 2px; background: #1a1a24; flex: 0 0 auto; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.mz-md-fname { font-family: system-ui, sans-serif; font-size: 13.5px; color: rgba(255,255,255,0.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; }
.mz-md-fbar { flex: 0 0 120px; height: 7px; border-radius: 4px; background: rgba(255,255,255,0.08); overflow: hidden; }
.mz-md-fbar > span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, rgba(95,214,138,0.95), rgba(95,214,138,0.55)); }
.mz-md-fbar.tech > span { background: rgba(255,255,255,0.3); }
.mz-md-fpct { flex: 0 0 38px; text-align: right; font-family: system-ui, sans-serif; font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.72); font-variant-numeric: tabular-nums; }
