/* La Mesa de Commander — Sistema visual «Almanaque de Mesa» */
html {
  scroll-behavior: smooth;
  scrollbar-color: #bcb9b0 #f4f4f0;
  scrollbar-width: thin;
}

.pmtg {
  --bg-page: #f4f4f0;
  --bg-surface: #e9e9e3;
  --bg-card: #ffffff;
  --bg-table: #14181e;
  --bg-table-soft: #1f252e;
  --ink-primary: #181b20;
  --ink-secondary: #4e535c;
  --ink-on-dark: #f3f4f6;
  --ink-on-dark-muted: #c6cbd2;
  --brass: #87590c;
  --brass-hover: #684307;
  --brass-bright: #d9ae57;
  --brass-bright-hover: #e5be6d;
  --line-light: #d7d7cf;
  --line-dark: #2c3440;
  --shadow-card: 0 12px 26px rgb(12 15 20 / 24%);
  background: var(--bg-page);
  color: var(--ink-primary);
  caret-color: var(--brass);
  font: 1.03125rem/1.62 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

.pmtg ::selection {
  background: rgb(217 174 87 / 36%);
  color: var(--ink-primary);
}

.pmtg *,
.pmtg *::before,
.pmtg *::after {
  box-sizing: border-box;
}

.pmtg [hidden] {
  display: none !important;
}

.pmtg :is(h1, h2, h3, h4) {
  color: var(--ink-primary);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.15;
  text-wrap: balance;
}

.pmtg h1 {
  font-size: clamp(2.5rem, 5.2vw, 4.4rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.55rem;
}

.pmtg h2 {
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
}

.pmtg h3 {
  font-size: clamp(1.22rem, 1.8vw, 1.52rem);
  margin: 0 0 0.55rem;
}

.pmtg p {
  margin: 0 0 1rem;
}

.pmtg p:last-child {
  margin-bottom: 0;
}

.pmtg ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.pmtg ul li {
  margin-bottom: 0.5rem;
}

.pmtg a {
  color: var(--brass);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.22em;
  transition: color 140ms ease;
}

.pmtg a:hover {
  color: var(--brass-hover);
}

.pmtg :focus-visible {
  outline: 2.5px solid var(--brass);
  outline-offset: 3px;
}

.pmtg .pmtg-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bg-table);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: 0.35rem;
  z-index: 100;
}

.pmtg .pmtg-skip:focus,
.pmtg .pmtg-skip:hover {
  left: 0.75rem;
  top: 0.75rem;
  color: #ffffff;
}

.pmtg .pmtg-wrap {
  width: min(100% - 2rem, 75rem);
  margin-inline: auto;
}

.pmtg .pmtg-reading {
  max-width: 68ch;
}

.pmtg .pmtg-muted {
  color: var(--ink-secondary);
}

.pmtg .pmtg-inline-svg {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

/* Cabecera opaca */
.pmtg .pmtg-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-table);
  border-bottom: 1px solid var(--line-dark);
}

.pmtg .pmtg-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.35rem;
}

.pmtg .pmtg-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: 0.015em;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
}

.pmtg .pmtg-brand:hover {
  color: var(--brass-bright);
}

.pmtg .pmtg-brand-logo {
  width: 2.15rem;
  height: 2.15rem;
  flex-shrink: 0;
  display: block;
  border-radius: 0.45rem;
  transition: transform 150ms ease;
}

.pmtg .pmtg-brand:hover .pmtg-brand-logo {
  transform: scale(1.05);
}

.pmtg .pmtg-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.25rem;
}

.pmtg .pmtg-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-on-dark-muted);
}

.pmtg .pmtg-nav a:hover,
.pmtg .pmtg-nav a[aria-current="page"] {
  color: #ffffff;
  text-decoration: underline;
}

.pmtg .pmtg-header :focus-visible {
  outline-color: var(--brass-bright);
}

/* Selector de expansiones en /comparativas/ */
.pmtg .pmtg-exp-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-block: 1.5rem 0;
}

.pmtg .pmtg-exp-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.9rem;
  text-align: left;
  text-decoration: none;
  padding: 1.35rem;
  border-radius: 0.65rem;
  border: 1px solid var(--line-light);
  background: var(--bg-card);
  color: var(--ink-primary);
  font: inherit;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, transform 160ms ease;
}

.pmtg .pmtg-exp-card:hover {
  border-color: var(--bg-table);
  background: var(--bg-surface);
  color: var(--ink-primary);
  transform: translateY(-2px);
}

.pmtg .pmtg-exp-thumb {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 0.45rem;
  display: block;
  margin-bottom: 0.85rem;
}

.pmtg .pmtg-exp-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--brass);
}

@media (max-width: 44rem) {
  .pmtg .pmtg-exp-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Portada oscura de mesa de juego */
.pmtg .pmtg-hero {
  position: relative;
  isolation: isolate;
  background: var(--bg-table);
  color: var(--ink-on-dark);
  border-bottom: 3px solid var(--brass-bright);
}

.pmtg .pmtg-hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  z-index: -2;
}

.pmtg .pmtg-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    96deg,
    rgb(16 20 26 / 96%) 0%,
    rgb(16 20 26 / 86%) 52%,
    rgb(16 20 26 / 68%) 100%
  );
}

.pmtg .pmtg-hero h1,
.pmtg .pmtg-hero h2,
.pmtg .pmtg-hero h3 {
  color: #ffffff;
}

.pmtg .pmtg-hero :focus-visible {
  outline-color: var(--brass-bright);
}

.pmtg .pmtg-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(13rem, 17rem);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-block: clamp(2.5rem, 5.5vw, 4.5rem) clamp(2rem, 4vw, 3rem);
}

.pmtg .pmtg-hero-subtitle {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.2rem, 2.1vw, 1.65rem);
  color: var(--brass-bright);
  margin: 0 0 1rem;
}

.pmtg .pmtg-hero-lead {
  font-size: 1.07rem;
  color: var(--ink-on-dark-muted);
  max-width: 56ch;
  margin: 0 0 1.65rem;
}

.pmtg .pmtg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* Botones del sistema */
.pmtg .pmtg-btn-primary,
.pmtg .pmtg-btn-secondary,
.pmtg .pmtg-btn-amazon,
.pmtg .pmtg-btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.6rem 1.2rem;
  border-radius: 0.4rem;
  font: inherit;
  font-size: 0.93rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  overflow-wrap: normal;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 140ms ease, border-color 140ms ease, transform 120ms ease;
}

.pmtg .pmtg-btn-primary,
.pmtg .pmtg-btn-primary:hover {
  background: var(--brass-bright);
  color: #14181e;
}

.pmtg .pmtg-btn-primary:hover {
  background: var(--brass-bright-hover);
}

.pmtg .pmtg-btn-secondary,
.pmtg .pmtg-btn-secondary:hover {
  background: transparent;
  color: #ffffff;
  border-color: rgb(217 174 87 / 62%);
}

.pmtg .pmtg-btn-secondary:hover {
  background: rgb(255 255 255 / 10%);
  border-color: var(--brass-bright);
}

.pmtg .pmtg-btn-dark,
.pmtg .pmtg-btn-dark:hover {
  background: var(--bg-table);
  color: #ffffff;
  border-color: var(--bg-table);
}

.pmtg .pmtg-btn-dark:hover {
  background: var(--bg-table-soft);
}

.pmtg .pmtg-btn-amazon,
.pmtg .pmtg-btn-amazon:hover {
  background: #ffffff;
  color: var(--ink-primary);
  border-color: var(--ink-primary);
}

.pmtg .pmtg-btn-amazon:hover {
  background: var(--bg-surface);
}

.pmtg :is(.pmtg-btn-primary, .pmtg-btn-secondary, .pmtg-btn-dark, .pmtg-btn-amazon, .pmtg-filter-btn):active {
  transform: translateY(1px);
}

/* Métricas de portada */
.pmtg .pmtg-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem 2rem;
  padding-block: 1.35rem 1.85rem;
  border-top: 1px solid var(--line-dark);
}

.pmtg .pmtg-stat {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.pmtg .pmtg-stat-num {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 2.6vw, 2.15rem);
  color: var(--brass-bright);
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pmtg .pmtg-stat-label {
  font-size: 0.9rem;
  color: var(--ink-on-dark-muted);
}

/* Secciones */
.pmtg .pmtg-section {
  padding-block: clamp(2.85rem, 6vw, 4.75rem);
  border-bottom: 1px solid var(--line-light);
  scroll-margin-top: 4.5rem;
}

.pmtg .pmtg-section-dark {
  background: var(--bg-table);
  color: var(--ink-on-dark);
  border-bottom: 1px solid var(--line-dark);
}

.pmtg .pmtg-section-dark :is(h2, h3) {
  color: #ffffff;
}

.pmtg .pmtg-section-dark .pmtg-muted {
  color: var(--ink-on-dark-muted);
}

.pmtg .pmtg-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.25rem 3.25rem;
}

.pmtg .pmtg-columns-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem 2rem;
}

/* Barra interactiva de filtro por expansión y colores de maná */
.pmtg .pmtg-matcher {
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  border-radius: 0.6rem;
  padding: 1.25rem;
  margin-block: 1.25rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.pmtg .pmtg-matcher-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.pmtg .pmtg-matcher-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-secondary);
  margin-right: 0.25rem;
}

.pmtg .pmtg-mana-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  border: 2px solid var(--line-light);
  background: var(--bg-page);
  cursor: pointer;
  transition: border-color 140ms ease, transform 120ms ease, background-color 140ms ease;
}

.pmtg .pmtg-mana-toggle:hover {
  border-color: var(--ink-primary);
}

.pmtg .pmtg-mana-toggle[aria-pressed="true"] {
  border-color: var(--bg-table);
  background: var(--brass-bright);
  transform: scale(1.06);
}

.pmtg .pmtg-mana-toggle img {
  width: 24px;
  height: 24px;
  display: block;
}

.pmtg .pmtg-filter-btn {
  min-height: 40px;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line-light);
  background: var(--bg-card);
  color: var(--ink-primary);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.pmtg .pmtg-filter-btn:hover {
  border-color: var(--bg-table);
  background: var(--bg-surface);
}

.pmtg .pmtg-filter-btn[aria-pressed="true"] {
  background: var(--bg-table);
  color: #ffffff;
  border-color: var(--bg-table);
}

.pmtg .pmtg-search-input {
  min-height: 42px;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line-light);
  border-radius: 0.4rem;
  background: var(--bg-card);
  color: var(--ink-primary);
  font: inherit;
  font-size: 0.93rem;
  min-width: 14rem;
}

.pmtg .pmtg-search-input::placeholder {
  color: var(--ink-secondary);
}

/* Estantería comparativa de precons (gravity-aligned shelf) */
.pmtg .pmtg-shelf {
  display: grid;
  gap: 1.25rem;
}

.pmtg .pmtg-precon-row {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1.35fr) minmax(13.5rem, 0.85fr);
  gap: 1.5rem 2rem;
  align-items: center;
  padding: 1.35rem;
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  border-radius: 0.65rem;
}

.pmtg .pmtg-precon-row.is-featured {
  background: var(--bg-table);
  border-color: var(--brass-bright);
  color: var(--ink-on-dark);
}

.pmtg .pmtg-precon-row.is-featured :is(h3, strong) {
  color: #ffffff;
}

.pmtg .pmtg-precon-row.is-featured .pmtg-muted {
  color: var(--ink-on-dark-muted);
}

.pmtg .pmtg-precon-row.is-featured .pmtg-btn-amazon {
  background: transparent;
  color: #ffffff;
  border-color: rgb(217 174 87 / 65%);
}

.pmtg .pmtg-precon-row.is-featured .pmtg-btn-amazon:hover {
  background: rgb(255 255 255 / 10%);
}

.pmtg .pmtg-precon-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 7;
  object-fit: contain;
  border-radius: 0.55rem;
  display: block;
  box-shadow: var(--shadow-card);
}

.pmtg .pmtg-precon-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.4rem;
}

.pmtg .pmtg-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pmtg .pmtg-status-pill.ready {
  background: var(--brass-bright);
  color: #14181e;
}

.pmtg .pmtg-status-pill.planned {
  background: var(--bg-surface);
  color: var(--ink-secondary);
  border: 1px solid var(--line-light);
}

.pmtg .pmtg-precon-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  font-size: 0.88rem;
  color: var(--ink-secondary);
  margin: 0.65rem 0 0;
  padding: 0;
  list-style: none;
}

.pmtg .pmtg-precon-row.is-featured .pmtg-precon-specs {
  color: var(--ink-on-dark-muted);
}

.pmtg .pmtg-precon-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.pmtg .pmtg-precon-actions > a {
  width: 100%;
}

.pmtg .pmtg-table-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(6.75rem, 1fr));
  gap: 0.5rem;
}

.pmtg .pmtg-table-actions > a {
  width: 100%;
  padding-inline: 0.75rem;
}

/* Accesorios recomendados */
.pmtg .pmtg-accessory-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.pmtg .pmtg-accessory {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  border-radius: 0.55rem;
}

/* Cartas en guía individual */
.pmtg .pmtg-card-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.8vw, 2.25rem);
  align-items: start;
  margin-block: 1.75rem;
}

.pmtg .pmtg-card-row-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
  align-items: start;
  margin-block: 1.5rem 0;
}

.pmtg .pmtg-card {
  margin: 0;
  min-width: 0;
  text-align: center;
}

.pmtg .pmtg-card-open {
  display: block;
  width: min(100%, 15rem);
  padding: 0;
  margin-inline: auto;
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  cursor: zoom-in;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.pmtg .pmtg-card-open:hover {
  transform: translateY(-3px);
}

.pmtg .pmtg-card-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 7;
  object-fit: contain;
  border-radius: 0.65rem;
  box-shadow: var(--shadow-card);
}

.pmtg .pmtg-card figcaption {
  margin-top: 0.7rem;
  font-size: 0.91rem;
  line-height: 1.4;
}

.pmtg .pmtg-role {
  display: block;
  color: var(--brass);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.76rem;
  margin-bottom: 0.15rem;
}

.pmtg .pmtg-hero .pmtg-card figcaption a {
  color: var(--brass-bright);
}

/* Pasos numerados de sinergias */
.pmtg .pmtg-synergy-block {
  padding-block: 2.4rem;
  border-top: 1px solid var(--line-light);
}

.pmtg .pmtg-synergy-block:first-of-type {
  border-top: 0;
  padding-top: 0.4rem;
}

.pmtg .pmtg-synergy-block:last-of-type {
  padding-bottom: 0;
}

.pmtg .pmtg-steps {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0;
  max-width: 72ch;
  counter-reset: step;
}

.pmtg .pmtg-steps li {
  counter-increment: step;
  position: relative;
  padding: 0.5rem 0 0.6rem 3rem;
}

.pmtg .pmtg-steps li::before {
  content: "0" counter(step);
  position: absolute;
  left: 0;
  top: 0.34rem;
  width: 2.3rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.28rem;
  line-height: 1.3;
  color: var(--brass);
  font-variant-numeric: tabular-nums;
}

.pmtg .pmtg-balance {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.75rem;
  padding-block: 1rem;
  margin-block: 1.35rem;
  border-block: 1px solid var(--line-light);
  color: var(--ink-primary);
  font: 1.15rem/1.4 Georgia, "Times New Roman", serif;
  font-variant-numeric: tabular-nums;
}

.pmtg .pmtg-balance .accent {
  color: var(--brass);
  font-weight: 700;
}

.pmtg .pmtg-note {
  border: 1px solid var(--line-light);
  background: var(--bg-surface);
  padding: 1rem 1.2rem;
  margin-block: 1.4rem 0;
  border-radius: 0.5rem;
  max-width: 70ch;
}

/* Curva de maná */
.pmtg .pmtg-curve {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.65rem;
  align-items: end;
  min-height: 11rem;
  padding: 1.25rem 1rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  border-radius: 0.5rem;
  margin-top: 1rem;
}

.pmtg .pmtg-curve-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.pmtg .pmtg-curve-count {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-primary);
  font-variant-numeric: tabular-nums;
}

.pmtg .pmtg-curve-bar {
  width: 100%;
  max-width: 2.5rem;
  background: var(--bg-table);
  border-radius: 0.25rem 0.25rem 0 0;
}

.pmtg .pmtg-curve-mv {
  font-size: 0.8rem;
  color: var(--ink-secondary);
  font-weight: 600;
}

/* Tablas */
.pmtg .pmtg-table-wrap {
  overflow-x: auto;
  margin-top: 1.25rem;
  border: 1px solid var(--line-light);
  border-radius: 0.55rem;
  background: var(--bg-card);
}

.pmtg table.pmtg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.pmtg .pmtg-table th,
.pmtg .pmtg-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line-light);
  vertical-align: top;
  overflow-wrap: normal;
}

.pmtg .pmtg-table-compare td:nth-child(2) {
  white-space: nowrap;
}

.pmtg .pmtg-table-quickref {
  table-layout: fixed;
}

.pmtg .pmtg-table-quickref th:nth-child(1),
.pmtg .pmtg-table-quickref td:nth-child(1) {
  width: 22%;
}

.pmtg .pmtg-table-quickref th:nth-child(2),
.pmtg .pmtg-table-quickref td:nth-child(2),
.pmtg .pmtg-table-quickref th:nth-child(3),
.pmtg .pmtg-table-quickref td:nth-child(3) {
  width: 39%;
}

.pmtg .pmtg-table tr:last-child td {
  border-bottom: 0;
}

.pmtg .pmtg-table th {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink-primary);
  background: var(--bg-surface);
  white-space: nowrap;
  overflow-wrap: normal;
}

/* Lista completa */
.pmtg .pmtg-deck-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 2.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pmtg .pmtg-deck-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--line-light);
}

.pmtg .pmtg-deck-item:hover {
  background: rgb(233 233 227 / 70%);
}

.pmtg .pmtg-deck-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.pmtg .pmtg-deck-qty {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  color: var(--brass);
  min-width: 1.8rem;
  font-variant-numeric: tabular-nums;
}

.pmtg .pmtg-deck-name-btn {
  background: transparent;
  border: 0;
  padding: 0.2rem 0;
  text-align: left;
  font: inherit;
  font-weight: 600;
  color: var(--ink-primary);
  cursor: pointer;
  min-height: 36px;
}

.pmtg .pmtg-deck-name-btn:hover {
  color: var(--brass);
  text-decoration: underline;
}

.pmtg .pmtg-badge-commander {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--brass);
  color: var(--ink-primary);
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  vertical-align: middle;
}

.pmtg .pmtg-deck-meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
  font-size: 0.84rem;
  color: var(--ink-secondary);
}

.pmtg .pmtg-empty-state {
  padding: 2rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  border-radius: 0.55rem;
  text-align: center;
}

/* Símbolos de maná */
.pmtg .pmtg-mana-row {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  vertical-align: -0.18em;
}

.pmtg .pmtg-mana-icon {
  display: inline-block;
  width: 1.12em;
  height: 1.12em;
  vertical-align: -0.18em;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgb(0 0 0 / 24%);
}

.pmtg .pmtg-mana-icon + .pmtg-mana-icon {
  margin-left: 0.12rem;
}

.pmtg .pmtg-mana-colorless {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.12em;
  height: 1.12em;
  vertical-align: -0.18em;
  border-radius: 50%;
  background: #cbc6c0;
  color: #161412;
  box-shadow: 0 1px 2px rgb(0 0 0 / 24%);
}

.pmtg .pmtg-mana-colorless svg {
  width: 0.68em;
  height: 0.68em;
}

/* Visor de carta (<dialog>) */
@keyframes pmtg-dialog-in {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.pmtg .pmtg-dialog {
  max-width: min(94vw, 49rem);
  max-height: 92dvh;
  overflow: auto;
  padding: 1.35rem;
  border: 1px solid var(--line-light);
  border-radius: 0.75rem;
  background: var(--bg-page);
  color: var(--ink-primary);
  box-shadow: 0 24px 60px rgb(10 12 16 / 42%);
}

.pmtg .pmtg-dialog[open] {
  animation: pmtg-dialog-in 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.pmtg .pmtg-dialog::backdrop {
  background: rgb(14 18 24 / 76%);
}

.pmtg .pmtg-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line-light);
}

.pmtg .pmtg-dialog-title {
  margin: 0;
  font-size: 1.35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.pmtg .pmtg-dialog-subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-secondary);
  font-style: italic;
}

.pmtg .pmtg-dialog-close {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0.4rem 0.85rem;
  border-radius: 0.4rem;
  border: 1px solid var(--line-light);
  background: #ffffff;
  color: var(--ink-primary);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.pmtg .pmtg-dialog-close:hover {
  background: var(--bg-surface);
  border-color: var(--ink-primary);
}

.pmtg .pmtg-dialog-body {
  display: grid;
  grid-template-columns: minmax(14rem, 19rem) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.pmtg #dialog-img {
  display: block;
  width: 100%;
  max-height: 70dvh;
  height: auto;
  object-fit: contain;
  border-radius: 0.65rem;
  box-shadow: var(--shadow-card);
}

.pmtg .pmtg-dialog-type {
  font-weight: 700;
  color: var(--ink-primary);
  margin: 0 0 0.7rem;
}

.pmtg .pmtg-dialog-oracle {
  white-space: pre-line;
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  padding: 0.95rem 1.05rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.58;
  margin: 0 0 0.9rem;
}

.pmtg .pmtg-dialog-original {
  margin: 0 0 0.9rem;
  font-size: 0.88rem;
  color: var(--ink-secondary);
}

.pmtg .pmtg-dialog-original summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-primary);
  padding-block: 0.2rem;
}

.pmtg .pmtg-dialog-original-body {
  white-space: pre-line;
  margin-top: 0.45rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line-light);
  border-radius: 0.45rem;
  background: var(--bg-surface);
}

/* Pie de página */
.pmtg .pmtg-footer {
  background: var(--bg-table);
  color: var(--ink-on-dark-muted);
  padding-block: 2.5rem 3.25rem;
  font-size: 0.88rem;
}

.pmtg .pmtg-footer a {
  color: var(--brass-bright);
}

.pmtg .pmtg-footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line-dark);
}

.pmtg .pmtg-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.35rem;
}

.pmtg .pmtg-footer-title {
  font-weight: 700;
  color: var(--ink-on-dark);
  margin: 0 0 0.35rem;
}

.pmtg .pmtg-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: var(--ink-secondary);
  margin-bottom: 1.1rem;
}

.pmtg .pmtg-hero .pmtg-breadcrumbs {
  color: var(--ink-on-dark-muted);
}

.pmtg .pmtg-hero .pmtg-breadcrumbs a {
  color: var(--brass-bright);
}

.pmtg .pmtg-buy-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-table);
  color: var(--ink-on-dark);
  border-radius: 0.6rem;
  margin-top: 2rem;
}

.pmtg .pmtg-buy-strip h3 {
  color: var(--ink-on-dark);
  margin: 0 0 0.25rem;
}

.pmtg .pmtg-buy-strip p {
  color: var(--ink-on-dark-muted);
  margin: 0;
}

.pmtg .pmtg-buy-strip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.pmtg .pmtg-faq {
  margin-top: 1.25rem;
}

.pmtg .pmtg-faq details {
  border-top: 1px solid var(--line-light);
  padding-block: 0.9rem;
}

.pmtg .pmtg-faq details:last-child {
  border-bottom: 1px solid var(--line-light);
}

.pmtg .pmtg-faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink-primary);
}

.pmtg .pmtg-faq details p {
  margin-top: 0.65rem;
  color: var(--ink-secondary);
}

.pmtg .pmtg-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.1rem;
  margin-top: 1.25rem;
}

.pmtg .pmtg-related-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--line-light);
  border-radius: 0.55rem;
  text-decoration: none;
  color: var(--ink-primary);
}

.pmtg .pmtg-related-card:hover {
  border-color: var(--brass);
}

.pmtg .pmtg-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.85rem;
}

.pmtg .pmtg-legal-article {
  max-width: 72ch;
}

/* Responsive */
@media (max-width: 58rem) {
  .pmtg .pmtg-precon-row {
    grid-template-columns: 8.5rem minmax(0, 1fr);
  }
  .pmtg .pmtg-precon-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .pmtg .pmtg-precon-actions > a {
    flex: 1 1 13rem;
    width: auto;
  }
  .pmtg .pmtg-accessory-list,
  .pmtg .pmtg-columns-3,
  .pmtg .pmtg-deck-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .pmtg .pmtg-card-row-4,
  .pmtg .pmtg-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 44rem) {
  .pmtg .pmtg-header {
    position: static;
  }
  .pmtg .pmtg-nav a {
    min-height: 36px;
    font-size: 0.86rem;
  }
  .pmtg .pmtg-hero-grid,
  .pmtg .pmtg-columns,
  .pmtg .pmtg-card-row,
  .pmtg .pmtg-card-row-4,
  .pmtg .pmtg-precon-row,
  .pmtg .pmtg-dialog-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .pmtg .pmtg-precon-thumb {
    max-width: 11rem;
    margin-inline: auto;
  }
  .pmtg .pmtg-table-quickref {
    table-layout: auto;
  }
}

@media (max-width: 30rem) {
  .pmtg .pmtg-brand {
    font-size: 0.98rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .pmtg *, .pmtg *::before, .pmtg *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
