/* =====================================================================
   community.css — Sección Comunidad (módulo aislado).

   Namespace .pgmpe-community / .cmm-*. SOLO consume design tokens de
   main.css (var(--color-*), var(--radius-*), var(--shadow-*),
   var(--font-*)); no redefine nada global. Coherente con .project-card
   y .badge--* del tema.
   ===================================================================== */

.pgmpe-community {
  --cmm-accent: var(--color-primary);
  --cmm-gap: 22px;
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.cmm-hero {
  text-align: center;
  padding: clamp(28px, 6vw, 56px) 0 clamp(20px, 4vw, 34px);
}
.cmm-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.1rem);
  margin: 0 0 .35em;
  line-height: 1.05;
}
.cmm-hero__subtitle {
  color: var(--color-text-secondary);
  font-size: clamp(1rem, 2.2vw, 1.18rem);
  max-width: 60ch;
  margin: 0 auto clamp(18px, 3vw, 26px);
}
.cmm-hero__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Filtros (chips) ──────────────────────────────────────────────── */
.cmm-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 0 clamp(22px, 4vw, 34px);
}
.cmm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-default);
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s ease;
}
.cmm-chip:hover { border-color: var(--color-border-hover); color: var(--color-text-primary); transform: translateY(-1px); }
.cmm-chip.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #1a1a20;
  font-weight: 600;
}

/* ── Grid ─────────────────────────────────────────────────────────── */
.cmm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: var(--cmm-gap);
}

/* ── Card ─────────────────────────────────────────────────────────── */
.cmm-card {
  position: relative; /* ancla la bandeja de compartir del pie */
  display: flex;
  flex-direction: column;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s ease, border-color .3s ease;
}
.cmm-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-border-hover);
}
.cmm-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--color-bg-elevated), var(--color-bg-surface));
  overflow: hidden;
}
.cmm-card__media-link { display: block; width: 100%; height: 100%; }
.cmm-card__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.22,1,.36,1); }
.cmm-card:hover .cmm-card__img { transform: scale(1.07); }
.cmm-card__ph {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; opacity: .35; color: var(--color-text-muted);
}
.cmm-card__ph svg { width: 42px; height: 42px; }
.cmm-card__badge {
  position: absolute; bottom: 10px; left: 10px; z-index: 2;
  padding: 4px 10px; border-radius: var(--radius-full);
  background: rgba(0,0,0,.62); color: #fff; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  font-size: .72rem; font-weight: 600; letter-spacing: .02em;
}

/* Autor sobre la portada (arriba-izquierda) */
.cmm-card__author {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  display: inline-flex; align-items: center; gap: 7px; max-width: calc(100% - 70px);
  padding: 4px 10px 4px 4px; border-radius: var(--radius-full);
  background: rgba(10,10,14,.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff; text-decoration: none; font-size: .76rem; font-weight: 600;
  transition: background .2s ease;
}
.cmm-card__author:hover { background: rgba(10,10,14,.82); }
.cmm-card__avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.cmm-card__author-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Compartir (partial reutilizable: card + single) ──
   Importante: main.css aplica a TODO <details><summary> un marcador "+"
   (::after naranja) y un padding 18px 52px de acordeón. Lo anulamos aquí para
   el botón de compartir (igual que hace el componente FAQ). */
.cmm-share > summary { list-style: none; padding: 0; }
.cmm-share > summary::-webkit-details-marker { display: none; }
.cmm-share > summary::after { content: none; display: none; }
.cmm-share__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.cmm-share__btn svg { width: 17px; height: 17px; flex: 0 0 auto; }
.cmm-share__btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* Variante card: botón compacto en el PIE de la card (junto a "Explorar") que
   despliega una bandeja de redes que sube desde el fondo, sin desbordar (la
   card recorta con overflow:hidden y la bandeja se ancla dentro). */
.cmm-card__actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
/* main.css estiliza TODO <details> como una caja (border + fondo + radius +
   margin). Hay que anularla aquí: si no, el botón de compartir hereda esa caja
   blanca grande. Lo dejamos como un simple contenedor en línea. */
.cmm-share--card {
  position: static; display: inline-flex;
  margin: 0; padding: 0; border: 0; background: none; border-radius: 0;
}
/* Icono sutil, del tamaño de las stats; resalta solo al hover/abierto. */
.cmm-share__btn--card {
  width: 26px; height: 26px; border-radius: 50%;
  background: transparent; border: 0; color: var(--color-text-muted);
}
.cmm-share__btn--card svg { width: 15px; height: 15px; }
.cmm-share__btn--card:hover,
.cmm-share--card[open] .cmm-share__btn--card { background: var(--color-primary-dim); color: var(--color-primary); }
.cmm-share__menu--card {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 12;
  flex-direction: column; gap: 9px; width: auto; max-width: none; padding: 12px 14px;
}
.cmm-share__menu--card .cmm-share__menu-title { font-size: .76rem; font-weight: 700; color: var(--color-text-muted); letter-spacing: .02em; text-transform: uppercase; }
.cmm-share__menu--card .cmm-share__opts { display: flex; flex-wrap: wrap; gap: 7px; }

/* Variante row (single): iconos de redes DIRECTOS y visibles, integrados */
.cmm-share--row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 2px 0 22px; }
.cmm-share__label { color: var(--color-text-muted); font-size: .82rem; font-weight: 600; }
.cmm-share__opts { display: flex; flex-wrap: wrap; gap: 7px; }
.cmm-share--row .cmm-share-opt {
  width: 32px; height: 32px; background: var(--color-bg-elevated);
}

.cmm-share__menu {
  z-index: 20; display: flex; flex-wrap: wrap; gap: 6px; width: max-content; max-width: 232px;
  padding: 8px; border-radius: var(--radius-md);
  background: var(--color-bg-elevated); border: 1px solid var(--color-border-default);
  box-shadow: var(--shadow-card-hover); animation: cmmShareIn .16s ease;
}
@keyframes cmmShareIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.cmm-share-opt {
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: var(--color-bg-card); color: var(--color-text-secondary); text-decoration: none;
  transition: background .2s ease, color .2s ease, transform .15s ease;
}
.cmm-share-opt svg { width: 17px; height: 17px; }
.cmm-share-opt:hover { transform: translateY(-2px); }
.cmm-share-opt--x:hover         { background: #000;     color: #fff; }
.cmm-share-opt--facebook:hover  { background: #1877f2;  color: #fff; }
.cmm-share-opt--whatsapp:hover  { background: #25d366;  color: #fff; }
.cmm-share-opt--telegram:hover  { background: #229ed9;  color: #fff; }
.cmm-share-opt--reddit:hover    { background: #ff4500;  color: #fff; }
.cmm-share-opt--pinterest:hover { background: #e60023;  color: #fff; }
.cmm-share-opt--linkedin:hover  { background: #0a66c2;  color: #fff; }
.cmm-share-opt--email:hover     { background: #6b7280;  color: #fff; }
.cmm-share-opt--discord:hover   { background: #5865f2;  color: #fff; }
.cmm-share-opt--copy:hover      { background: var(--color-primary); color: #1a1a20; }
.cmm-share-opt.is-copied { background: var(--color-success, #2ecc71); color: #fff; }
.cmm-share-opt:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* Contador de favoritos por proyecto (en el botón de favorito del single) */
.cmm-fav__count {
  margin-left: 2px; padding-left: 8px; font-weight: 700;
  border-left: 1px solid var(--color-border-default); opacity: .85;
}
.cmm-fav.is-fav .cmm-fav__count { color: var(--color-primary); opacity: 1; border-left-color: var(--color-primary-dim); }

/* Tags (versión / rating) */
.cmm-card__tags { display: flex; flex-wrap: wrap; gap: 7px; }
.cmm-card__tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: var(--radius-full);
  background: var(--color-bg-elevated); color: var(--color-text-secondary);
  font-size: .74rem; font-weight: 600;
}
.cmm-card__tag svg { width: 13px; height: 13px; flex: 0 0 auto; }
.cmm-card__tag--rating { color: #ffc83d; background: rgba(255,200,61,.12); }
.cmm-card__tag--prog { color: var(--color-primary); background: var(--color-primary-dim); }

/* Subtítulo (resolución · versión · fecha) y contador de imágenes en portada */
.cmm-card__sub { color: var(--color-text-muted); font-size: .8rem; margin: 0; }
/* Clúster de metadatos sobre la portada (esquina inf. derecha): agrupa la
   calificación y el contador de galería en una sola fila para que NO se
   solapen (antes ambos estaban en bottom:10/right:10 y quedaban uno encima
   del otro). */
.cmm-card__media-meta {
  position: absolute; bottom: 10px; right: 10px; z-index: 2;
  display: flex; align-items: center; gap: 6px;
}
.cmm-card__count {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: var(--radius-full);
  background: rgba(0,0,0,.62); color: #fff; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  font-size: .72rem; font-weight: 600;
}
.cmm-card__count svg { width: 12px; height: 12px; }

/* Stats con iconos limpios (no emoji) */
.cmm-card__stats { display: flex; flex-wrap: wrap; gap: 12px; }
.cmm-card__stat { display: inline-flex; align-items: center; gap: 5px; color: var(--color-text-muted); font-size: .78rem; }
.cmm-card__stat svg { width: 14px; height: 14px; flex: 0 0 auto; opacity: .9; }

/* Foco del enlace de portada hacia DENTRO (el overflow:hidden de la portada
   recortaría el outline exterior global) */
.cmm-card__media-link:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -3px; box-shadow: none; }

/* Galería bajo el vídeo/hero (los gaps los controla .cmm-single__media). */
.cmm-gallery.cmm-gallery--media { margin: 0; }

/* Scrollbar tematizada (igual que la global del sitio) en el editor —modo
   Código = textarea— y en áreas con scroll propio del módulo. El modo Visual
   se estiliza vía content_style (iframe). */
.cmm-field--editor textarea,
.cmm-field--editor .wp-editor-area,
.cmm-lb__thumbs {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,166,0,.22) transparent;
}
.cmm-field--editor textarea::-webkit-scrollbar,
.cmm-field--editor .wp-editor-area::-webkit-scrollbar,
.cmm-lb__thumbs::-webkit-scrollbar { width: 6px; height: 6px; }
.cmm-field--editor textarea::-webkit-scrollbar-track,
.cmm-field--editor .wp-editor-area::-webkit-scrollbar-track,
.cmm-lb__thumbs::-webkit-scrollbar-track { background: transparent; }
.cmm-field--editor textarea::-webkit-scrollbar-thumb,
.cmm-field--editor .wp-editor-area::-webkit-scrollbar-thumb,
.cmm-lb__thumbs::-webkit-scrollbar-thumb { background: rgba(255,166,0,.22); border-radius: 3px; }
.cmm-field--editor textarea::-webkit-scrollbar-thumb:hover,
.cmm-field--editor .wp-editor-area::-webkit-scrollbar-thumb:hover,
.cmm-lb__thumbs::-webkit-scrollbar-thumb:hover { background: rgba(255,166,0,.40); }
.cmm-card__body { display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 14px; flex: 1; }
.cmm-card__title { font-family: var(--font-display); font-size: 1.12rem; margin: 0; line-height: 1.25; }
.cmm-card__title a { color: var(--color-text-primary); text-decoration: none; }
.cmm-card__title a:hover { color: var(--color-primary); }
.cmm-card__meta { color: var(--color-text-muted); font-size: .82rem; margin: 0; }
.cmm-card__excerpt { color: var(--color-text-secondary); font-size: .9rem; line-height: 1.5; margin: 0; }
.cmm-card__foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 10px;
  border-top: 1px solid var(--color-border-subtle);
}
.cmm-card__cta { display: inline-flex; align-items: center; gap: 4px; color: var(--color-primary); font-weight: 600; font-size: .85rem; text-decoration: none; white-space: nowrap; }
.cmm-card__cta:hover { text-decoration: underline; }

/* ── Estado vacío ─────────────────────────────────────────────────── */
.cmm-empty {
  text-align: center; color: var(--color-text-secondary);
  padding: clamp(40px, 9vw, 90px) 20px;
  border: 1px dashed var(--color-border-default);
  border-radius: var(--radius-lg);
}

/* ── Paginación ───────────────────────────────────────────────────── */
.cmm-pager { display: flex; justify-content: center; gap: 12px; margin-top: clamp(26px, 5vw, 40px); }
.cmm-pager a, .cmm-pager span {
  padding: 9px 18px; border-radius: var(--radius-md);
  border: 1px solid var(--color-border-default);
  background: var(--color-bg-card); color: var(--color-text-secondary);
  text-decoration: none; font-size: .9rem;
}
.cmm-pager a:hover { border-color: var(--color-border-hover); color: var(--color-text-primary); }
.cmm-pager .is-disabled { opacity: .4; pointer-events: none; }

/* ── Tira "conviértete en creador" ────────────────────────────────── */
.cmm-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  flex-wrap: wrap;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: clamp(26px, 5vw, 42px) 0;
}
.cmm-cta__text h3 { margin: 0 0 .2em; font-family: var(--font-display); font-size: 1.2rem; }
.cmm-cta__text p { margin: 0; color: var(--color-text-secondary); font-size: .92rem; max-width: 56ch; }
.cmm-cta__note { color: var(--color-text-muted); font-size: .9rem; margin: 0; }
.cmm-cta--ok { border-color: var(--color-success-dim); }
.cmm-cta__auth { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Formulario de publicación ────────────────────────────────────── */
.cmm-form-wrap { max-width: 760px; margin: 0 auto; }
.cmm-form { display: flex; flex-direction: column; gap: 20px; }
.cmm-field { display: flex; flex-direction: column; gap: 7px; }
.cmm-field > label { font-weight: 600; font-size: .92rem; color: var(--color-text-primary); }
.cmm-field__req { color: var(--color-primary); font-weight: 700; }
.cmm-field__hint { color: var(--color-text-muted); font-size: .82rem; margin: 0; }
.cmm-input, .cmm-textarea, .cmm-select {
  width: 100%; padding: 12px 14px; font: inherit;
  background: var(--color-bg-card); color: var(--color-text-primary);
  border: 1px solid var(--color-border-default); border-radius: var(--radius-md);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.cmm-input:focus, .cmm-textarea:focus, .cmm-select:focus {
  outline: none; border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-dim);
}
.cmm-textarea { min-height: 150px; resize: vertical; }
.cmm-checks { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.cmm-check { display: inline-flex; align-items: center; gap: 7px; font-size: .9rem; color: var(--color-text-secondary); }
.cmm-file { font-size: .9rem; color: var(--color-text-secondary); }
.cmm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.cmm-form__actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cmm-form__msg { font-weight: 600; font-size: .92rem; }
.cmm-form__msg.is-error { color: var(--color-danger); }
.cmm-form__msg.is-ok { color: var(--color-success); }

.cmm-notice {
  padding: 14px 18px; border-radius: var(--radius-md);
  background: var(--color-primary-dim); border: 1px solid var(--color-border-default);
  color: var(--color-text-primary); font-size: .92rem; margin: 0 0 22px;
}
.cmm-notice--ok { background: var(--color-success-dim); }
.cmm-notice--error { background: var(--color-danger-dim); }

.cmm-success { text-align: center; padding: clamp(36px, 8vw, 70px) 20px; }
.cmm-success__icon { font-size: 3rem; }
.cmm-success h2 { font-family: var(--font-display); margin: .3em 0; }
.cmm-success p { color: var(--color-text-secondary); max-width: 50ch; margin: 0 auto 1.4em; }

/* ── Single ───────────────────────────────────────────────────────── */
.cmm-single__layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(20px, 4vw, 40px); align-items: start; }
/* Bloque multimedia (vídeo/portada + carrusel): gaps internos uniformes y un
   margen claro respecto al título → jerarquía limpia, sin "pegarse". */
.cmm-single__media { display: flex; flex-direction: column; gap: 14px; margin: 0 0 clamp(24px, 4.5vw, 38px); }
/* Los gaps internos los da el flex .cmm-single__media → anular los márgenes
   propios de vídeo/hero (si no, el caso vídeo+galería duplicaría el espacio). */
.cmm-single__media .cmm-single__hero,
.cmm-single__media .cmm-single__video { margin: 0; }
.cmm-single__hero { border-radius: var(--radius-lg); overflow: hidden; margin: 0; background: var(--color-bg-elevated); aspect-ratio: 16/9; }
.cmm-single__hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cmm-single__title { font-family: var(--font-display); font-size: clamp(1.75rem, 4vw, 2.55rem); line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .35em; }
.cmm-single__meta { color: var(--color-text-muted); margin: 0 0 1.4em; font-size: .95rem; }
.cmm-single__desc { color: var(--color-text-primary); line-height: 1.7; }
.cmm-single__desc h3, .cmm-single__desc h4 { font-family: var(--font-display); }
.cmm-panel {
  background: var(--color-bg-card); border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg); padding: 20px;
}
.cmm-panel h3 { font-family: var(--font-display); margin: 0 0 .8em; font-size: 1.05rem; }
.cmm-panel ul { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cmm-panel li { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; }
.cmm-panel li span { color: var(--color-text-muted); }
.cmm-panel li strong { color: var(--color-text-primary); text-align: right; }
/* Botón de descarga (exclusivo): base naranja + onda expansiva al hover +
   velo de degradado + "press" al pulsar. El icono/texto van en .cmm-dl-btn__lbl
   por encima de la onda (.cmm-dl-btn__ripple). */
.cmm-dl-btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; padding: 13px 18px; border-radius: var(--radius-md);
  background: var(--color-primary); color: #1a1a20; font-weight: 700;
  text-decoration: none; border: 1px solid transparent;
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
}
.cmm-dl-btn__ripple {
  position: absolute; left: 50%; top: 50%; z-index: 0;
  width: 0; height: 0; border-radius: 9999px;
  background: rgba(255, 234, 178, .55);
  transform: translate(-50%, -50%); pointer-events: none;
  transition: width .5s cubic-bezier(0,0,.2,1), height .5s cubic-bezier(0,0,.2,1);
}
.cmm-dl-btn::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  border-radius: inherit;
  background-image: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0), rgba(0,0,0,.22));
}
.cmm-dl-btn__lbl { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 9px; }
/* El icono hereda currentColor (texto oscuro) → contraste correcto sobre el naranja. */
.cmm-dl-btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.cmm-dl-btn:hover { background: var(--color-primary-hover); color: #1a1a20; transform: translateY(-1px); box-shadow: 0 6px 18px var(--color-primary-glow); }
.cmm-dl-btn:hover .cmm-dl-btn__ripple { width: 20em; height: 20em; }
.cmm-dl-btn:active { transform: scale(.97); box-shadow: none; }
.cmm-dl-btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .cmm-dl-btn__ripple { transition: none; }
}
/* Bloque de descarga (botón + alternativa + nota): separado del contenido de
   arriba (chips/etiquetas) y de los enlaces de abajo; dentro, la descarga
   alternativa queda pegada al botón principal. */
.cmm-dl-group { margin: 22px 0 20px; }
.cmm-ext-note { display: block; text-align: center; color: var(--color-text-muted); font-size: .78rem; margin-top: 8px; }
.cmm-dl-alt {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 11px 18px; margin-top: 10px; border-radius: var(--radius-md);
  background: transparent; border: 1px solid var(--color-border-default);
  color: var(--color-text-secondary); font-weight: 600; text-decoration: none;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.cmm-dl-alt svg { width: 17px; height: 17px; flex: 0 0 auto; }
.cmm-dl-alt:hover { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-primary-dim); }
.cmm-dl-alt:active { background: transparent; }
.cmm-dl-alt:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
.cmm-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.cmm-chips span {
  padding: 4px 10px; border-radius: var(--radius-full);
  background: var(--color-bg-elevated); color: var(--color-text-secondary); font-size: .8rem;
}
.cmm-status-banner {
  padding: 12px 16px; border-radius: var(--radius-md); margin: 0 0 18px;
  font-weight: 600; font-size: .92rem;
  background: var(--color-primary-dim); border: 1px solid var(--color-border-default);
}
.cmm-status-banner--rejected { background: var(--color-danger-dim); }
.cmm-back { display: inline-flex; align-items: center; gap: 6px; color: var(--color-text-secondary); text-decoration: none; font-size: .9rem; margin-bottom: 14px; }
.cmm-back:hover { color: var(--color-primary); }

@media (max-width: 860px) {
  .cmm-single__layout { grid-template-columns: 1fr; }
  .cmm-panel { position: static; }
}

/* ── Acceso rápido a "Publicar proyecto" desde el single ──────────────
   Desktop: tarjeta CTA al inicio del sidebar (muy visible al cargar).
   Móvil: botón flotante (FAB) siempre accesible sin volver al índice. */
/* CTA "Publicar proyecto": marco de degradado dorado animado (se desplaza al
   hover) con panel interior oscuro y texto/icono en dorado. El gradiente vive
   en el <a> y el contenido en .cmm-sidebar-cta__inner. */
.cmm-sidebar-cta {
  display: block; margin-bottom: 16px; padding: 3px; border-radius: 13px;
  background: linear-gradient(to right, #77530a, #ffd277, #77530a, #77530a, #ffd277, #77530a);
  background-size: 250%; background-position: left;
  text-decoration: none; transition: background-position 1s ease, transform .15s ease;
}
.cmm-sidebar-cta:hover { background-position: right; }
.cmm-sidebar-cta:active { transform: scale(.97); }
.cmm-sidebar-cta:focus-visible { outline: 2px solid #ffd277; outline-offset: 2px; }
.cmm-sidebar-cta__inner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 10px;
  background: rgba(0,0,0,.86); color: #ffd277;
}
.cmm-sidebar-cta__icon { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,210,119,.14); color: #ffd277; flex: 0 0 auto; }
.cmm-sidebar-cta__icon svg { width: 20px; height: 20px; }
.cmm-sidebar-cta__text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.cmm-sidebar-cta__text strong { font-family: var(--font-display); font-size: .98rem; color: #ffd277; }
.cmm-sidebar-cta__text small { font-size: .78rem; color: rgba(255,210,119,.72); }
@media (prefers-reduced-motion: reduce) {
  .cmm-sidebar-cta { transition: transform .15s ease; }
}

.cmm-fab-publish {
  position: fixed; right: 16px; bottom: 16px; z-index: 60; display: none;
  padding: 3px; border-radius: 9999px;
  background: linear-gradient(to right, #77530a, #ffd277, #77530a, #77530a, #ffd277, #77530a);
  background-size: 250%; background-position: left;
  text-decoration: none; box-shadow: 0 8px 22px rgba(0,0,0,.32);
  transition: background-position 1s ease, transform .15s ease;
}
.cmm-fab-publish:hover { background-position: right; transform: translateY(-2px); }
.cmm-fab-publish:active { transform: scale(.96); }
.cmm-fab-publish:focus-visible { outline: 2px solid #ffd277; outline-offset: 2px; }
.cmm-fab-publish__inner {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px; border-radius: 9999px;
  background: rgba(0,0,0,.86); color: #ffd277; font-weight: 700;
}
.cmm-fab-publish__inner svg { width: 20px; height: 20px; flex: 0 0 auto; }
@media (max-width: 860px) {
  /* En móvil el CTA del sidebar queda al final (tras la descripción): el FAB
     evita tener que desplazarse para publicar. */
  .cmm-fab-publish { display: inline-block; }
  .cmm-sidebar-cta { display: none; }
}
@media (max-width: 420px) {
  .cmm-fab-publish__label { display: none; }
  .cmm-fab-publish__inner { padding: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .cmm-fab-publish { transition: transform .15s ease; }
}

/* Aviso de imágenes descartadas por exceder el peso máximo */
.cmm-gallery-warn { color: var(--color-danger); margin: 0; }

/* ── Fase 2: reglas, grid de campos, galería, vídeo, lightbox ──────── */
.cmm-rules {
  max-width: 760px; margin: 0 auto 22px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  padding: 4px 18px;
}
.cmm-rules > summary {
  cursor: pointer; padding: 12px 0; font-weight: 600; color: var(--color-text-primary);
  list-style-position: inside;
}
.cmm-rules[open] > summary { border-bottom: 1px solid var(--color-border-subtle); margin-bottom: 10px; }
.cmm-rules ul { margin: 0 0 12px; padding-left: 20px; color: var(--color-text-secondary); }
.cmm-rules li { margin: 6px 0; font-size: .9rem; line-height: 1.5; }

.cmm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .cmm-grid-2 { grid-template-columns: 1fr; } }

.cmm-gallery-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
/* Galería actual (solo lectura) en modo edición */
.cmm-current-gallery { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.cmm-current-gallery img { width: 84px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--color-border-subtle); }
.cmm-gp__item { position: relative; width: 96px; height: 64px; margin: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--color-bg-elevated); cursor: grab; }
.cmm-gp__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cmm-gp__primary { position: absolute; left: 4px; bottom: 4px; padding: 2px 6px; border-radius: var(--radius-full); background: var(--color-primary); color: #1a1a20; font-size: .62rem; font-weight: 700; }
.cmm-gp__item.is-dragging { opacity: .4; }
.cmm-gp__remove {
  position: absolute; top: 3px; right: 3px; width: 18px; height: 18px;
  padding: 0; line-height: 16px; text-align: center; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .62); color: #fff; font-size: 13px; cursor: pointer;
}
.cmm-gp__remove:hover { background: var(--color-danger); }

.cmm-single__video { position: relative; aspect-ratio: 16/9; border-radius: var(--radius-lg); overflow: hidden; margin: 0 0 22px; background: #000; }
.cmm-single__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.cmm-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 22px; }
.cmm-gallery__img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius-md); cursor: zoom-in; border: 1px solid var(--color-border-subtle); transition: transform .2s ease, border-color .2s ease; }
.cmm-gallery__img:hover { transform: scale(1.02); border-color: var(--color-border-hover); }

/* ── Carrusel horizontal de imágenes (single) ─────────────────────────
   Una sola fila desplazable: scroll-snap + gestos táctiles nativos + flechas.
   Sustituye a la grilla multifila para compactar y dar protagonismo al
   contenido. El lightbox sigue funcionando (las imágenes conservan data-cm-lightbox). */
.cmm-carousel { position: relative; }
.cmm-carousel__track.cmm-gallery--media {
  display: flex; gap: 10px; margin: 0;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  padding-bottom: 4px;
  scrollbar-width: thin; scrollbar-color: rgba(255,166,0,.22) transparent;
}
.cmm-carousel__track::-webkit-scrollbar { height: 6px; }
.cmm-carousel__track::-webkit-scrollbar-track { background: transparent; }
.cmm-carousel__track::-webkit-scrollbar-thumb { background: rgba(255,166,0,.22); border-radius: 3px; }
.cmm-carousel__track::-webkit-scrollbar-thumb:hover { background: rgba(255,166,0,.40); }
.cmm-carousel__track .cmm-gallery__img {
  flex: 0 0 auto; width: clamp(150px, 30%, 210px); aspect-ratio: 16/10;
  scroll-snap-align: start; margin: 0;
}
.cmm-carousel__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(10,10,14,.72); color: #fff;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
  transition: background .2s ease, color .2s ease, opacity .2s ease;
}
.cmm-carousel__nav svg { width: 20px; height: 20px; }
.cmm-carousel__nav--prev { left: 6px; }
.cmm-carousel__nav--next { right: 6px; }
.cmm-carousel__nav:hover { background: var(--color-primary); color: #1a1a20; }
.cmm-carousel__nav:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.cmm-carousel__nav[hidden] { display: none; }
.cmm-carousel__nav:disabled { opacity: .35; pointer-events: none; }
@media (hover: none) and (pointer: coarse) {
  /* En táctil el desplazamiento es por gesto; ocultamos las flechas. */
  .cmm-carousel__nav { display: none; }
}

.cmm-chips--soft span { background: var(--color-primary-dim); color: var(--color-text-secondary); }
.cmm-panel__link { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; color: var(--color-primary); text-decoration: none; font-size: .9rem; font-weight: 600; }
.cmm-panel__link svg { width: 16px; height: 16px; flex: 0 0 auto; }
.cmm-panel__link:hover { text-decoration: underline; }
.cmm-panel__link:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: var(--radius-sm); }
.cmm-panel__credit { margin: 12px 0 0; color: var(--color-text-muted); font-size: .82rem; }

/* ── Lightbox / galería moderna ───────────────────────────────────── */
.cmm-lb {
  position: fixed; inset: 0; z-index: 100000; display: none; flex-direction: column;
  background: rgba(10, 10, 14, .92);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .2s ease; overscroll-behavior: contain;
}
.cmm-lb.is-open { display: flex; opacity: 1; }
.cmm-lb__stage { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; min-height: 0; touch-action: pan-y; }
.cmm-lb__img {
  max-width: 94vw; max-height: 100%; border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  user-select: none; -webkit-user-drag: none;
  transition: transform .25s ease, opacity .2s ease; cursor: zoom-in; will-change: transform;
}
.cmm-lb__img.is-zoomed { cursor: zoom-out; max-width: none; max-height: none; transform: scale(2); }
.cmm-lb__img.is-loading { opacity: .3; }
.cmm-lb__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--radius-full); background: rgba(20, 20, 28, .55); color: #fff; cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.cmm-lb__nav:hover { background: var(--color-primary); color: #1a1a20; }
.cmm-lb__nav:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.cmm-lb__nav svg { width: 24px; height: 24px; }
.cmm-lb__nav--prev { left: 16px; }
.cmm-lb__nav--next { right: 16px; }
.cmm-lb__x {
  position: absolute; top: 14px; right: 16px; z-index: 2;
  width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--radius-full); background: rgba(20, 20, 28, .55); color: #fff; cursor: pointer;
  transition: background .2s ease;
}
.cmm-lb__x:hover { background: var(--color-danger); }
.cmm-lb__x:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.cmm-lb__x svg { width: 22px; height: 22px; }
.cmm-lb__counter {
  position: absolute; top: 20px; left: 20px; z-index: 2; padding: 4px 12px;
  border-radius: var(--radius-full); background: rgba(20, 20, 28, .55); color: #fff; font-size: .82rem; font-weight: 600;
}
.cmm-lb__thumbs {
  flex: 0 0 auto; display: flex; gap: 8px; justify-content: center;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  overflow-x: auto; scrollbar-width: thin; scroll-behavior: smooth;
}
.cmm-lb__thumb {
  flex: 0 0 auto; width: 76px; height: 50px; padding: 0; border-radius: var(--radius-sm); overflow: hidden;
  border: 2px solid transparent; background: none; opacity: .5; cursor: pointer;
  transition: opacity .2s ease, border-color .2s ease;
}
.cmm-lb__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cmm-lb__thumb:hover { opacity: .85; }
.cmm-lb__thumb.is-active { opacity: 1; border-color: var(--color-primary); }
.cmm-lb__thumb:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.cmm-lb--single .cmm-lb__nav,
.cmm-lb--single .cmm-lb__thumbs,
.cmm-lb--single .cmm-lb__counter { display: none; }
@media (max-width: 600px) {
  .cmm-lb__nav { width: 40px; height: 40px; background: rgba(20, 20, 28, .4); }
  .cmm-lb__thumb { width: 60px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .cmm-lb, .cmm-lb__img { transition: none; }
}

/* ── Fase 3: barra de interacciones (favorito + valoración + seguir) ──
   Panel unificado: chips de acción (favorito/seguir) + tarjeta de valoración
   con dos zonas claramente separadas — promedio de la comunidad (solo lectura)
   y "Tu valoración" (interactiva). Evita la confusión de ver dos filas de
   estrellas iguales sin contexto. */
.cmm-actions {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px;
  margin: 0 0 22px; padding: 14px 16px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
}

/* Chips de acción (favorito / seguir) */
.cmm-fav {
  display: inline-flex; align-items: center; gap: 7px; align-self: center;
  padding: 9px 15px; border-radius: var(--radius-full);
  border: 1px solid var(--color-border-default); background: rgba(255,255,255,.03);
  color: var(--color-text-secondary); font-size: .88rem; font-weight: 600; cursor: pointer;
  transition: border-color .2s ease, color .2s ease, transform .15s ease, background .2s ease;
}
.cmm-fav:hover { border-color: var(--color-border-hover); color: var(--color-text-primary); }
.cmm-fav.is-fav { color: #ef4d6b; border-color: rgba(239,77,107,.4); background: rgba(239,77,107,.08); }
.cmm-fav.is-pulse { transform: scale(1.08); }
.cmm-fav svg { transition: transform .2s ease; }
.cmm-fav.is-fav svg { transform: scale(1.1); }

/* Columna lateral: las acciones del visitante (favorito / seguir) apiladas,
   del mismo ancho y centradas frente a la tarjeta de valoración. Antes
   «Seguir» era hijo directo de .cmm-actions (align-items: stretch) y se
   estiraba a toda la altura de la tarjeta. */
.cmm-actions__side {
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
  flex: 0 0 auto; min-width: 168px;
}
.cmm-actions__side .cmm-fav,
.cmm-actions__side .cmm-follow { justify-content: center; align-self: stretch; }
/* Misma métrica que el chip de favorito para que ambos lean como pareja. */
.cmm-actions__side .cmm-follow { padding: 9px 15px; font-size: .88rem; }
.cmm-actions__side .cmm-follow__count {
  margin-left: 2px; padding-left: 8px; font-weight: 700;
  border-left: 1px solid rgba(26,26,32,.25);
}
.cmm-actions__side .cmm-follow.is-following .cmm-follow__count { border-left-color: var(--color-border-default); }
.cmm-actions__side .cmm-follow__static { justify-content: center; padding: 9px 15px; }
.cmm-follow__icon { flex: 0 0 auto; }
.cmm-follow__icon--on,
.cmm-follow.is-following .cmm-follow__icon--add { display: none; }
.cmm-follow.is-following .cmm-follow__icon--on { display: inline; }

/* Tarjeta de valoración: dos zonas apiladas con separador */
.cmm-rate {
  display: flex; flex-direction: column; gap: 0;
  flex: 1 1 260px; min-width: 230px;
  border: 1px solid var(--color-border-subtle); border-radius: var(--radius-md);
  overflow: hidden; background: rgba(255,255,255,.015);
}
/* Eyebrow: micro-etiqueta que distingue cada zona ("Valoración" / "Tu valoración") */
.cmm-rate__eyebrow {
  display: block; margin: 0 0 5px;
  font-size: .62rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Zona 1 — Promedio de la comunidad (solo lectura). El número es el ancla. */
.cmm-rate__avg { display: flex; flex-direction: column; padding: 10px 14px; }
.cmm-rate__avg-body { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.cmm-rate__avg-stars {
  position: relative; display: inline-block; white-space: nowrap; align-self: center;
  font-size: .95rem; letter-spacing: 1px; color: var(--color-text-soft);
}
.cmm-rate__avg-stars::before {
  content: "\2605\2605\2605\2605\2605"; position: absolute; left: 0; top: 0;
  width: var(--pct, 0%); overflow: hidden; color: #ffc83d;
}
.cmm-rate__avg-num { font-size: .82rem; color: var(--color-text-muted); }
.cmm-rate__avg-num strong { color: var(--color-text-primary); font-size: 1.32rem; font-weight: 800; }
.cmm-rate__count { color: var(--color-text-muted); font-size: .8rem; }

/* Zona 2 — Tu valoración (interactiva). Tinte cálido + separador para que se
   lea como una acción distinta del promedio. */
.cmm-rate__you {
  display: flex; flex-direction: column; padding: 10px 14px;
  border-top: 1px solid var(--color-border-subtle); background: rgba(255,200,61,.06);
}
.cmm-rate__you .cmm-rate__eyebrow { color: var(--color-text-secondary); }
.cmm-rate__you-body { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cmm-rate__stars { display: inline-flex; gap: 3px; }
.cmm-rate__star {
  background: none; border: 0; padding: 0 1px; cursor: pointer; line-height: 1;
  font-size: 1.32rem; color: var(--color-text-soft); transition: color .12s ease, transform .12s ease;
}
.cmm-rate__star:hover { transform: scale(1.18); }
.cmm-rate__star.is-on { color: #ffc83d; }
.cmm-rate[data-rated]:not([data-rated="0"]) .cmm-rate__star { cursor: default; }
.cmm-rate__summary { color: var(--color-text-muted); font-size: .82rem; }
.cmm-rate__summary strong { color: var(--color-text-primary); }
.cmm-rate__msg { color: var(--color-success); font-size: .82rem; font-weight: 700; }

@media (max-width: 560px) {
  .cmm-actions { gap: 10px; padding: 12px; }
  .cmm-rate { flex-basis: 100%; }
  .cmm-fav, .cmm-follow, .cmm-follow__static { align-self: flex-start; }
  /* En móvil la columna lateral pasa a una fila de dos chips a todo el ancho. */
  .cmm-actions__side { flex-direction: row; flex-basis: 100%; min-width: 0; }
  .cmm-actions__side > * { flex: 1 1 0; min-width: 0; }
}

/* ── Borrado permanente ───────────────────────────────────────────────
   Botón circular discreto (icono papelera) que se expande a una píldora roja
   con la etiqueta (data-label) al hover. Accesible: aria-label + title. */
.cmm-delete {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  width: 50px; height: 50px; margin: 18px auto 0; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgb(22,22,26); color: #fff;
  box-shadow: 0 0 20px rgba(0,0,0,.16);
  transition: width .3s ease, border-radius .3s ease, background-color .3s ease, transform .15s ease;
}
.cmm-delete svg { width: 14px; height: 14px; flex: 0 0 auto; transition: transform .3s ease; }
.cmm-delete svg path { fill: #fff; }
.cmm-delete::before {
  position: absolute; top: 50%; left: 0; right: 0; content: attr(data-label);
  color: #fff; font-size: 2px; font-weight: 700; text-align: center; opacity: 0;
  transform: translateY(-50%); pointer-events: none;
  transition: font-size .3s ease, opacity .3s ease, transform .3s ease;
}
.cmm-delete:not(:disabled):hover { width: 200px; border-radius: 26px; background-color: rgb(231,76,60); }
.cmm-delete:not(:disabled):hover svg { transform: translateX(-66px); }
.cmm-delete:not(:disabled):hover::before { font-size: .82rem; opacity: 1; transform: translate(14px, -50%); }
.cmm-delete:active { transform: scale(.96); }
.cmm-delete:focus-visible { outline: 2px solid var(--color-danger); outline-offset: 3px; }
.cmm-delete:disabled { opacity: .6; cursor: default; }
.cmm-delete__note { margin: 10px 0 0; color: var(--color-text-muted); font-size: .76rem; text-align: center; }
@media (prefers-reduced-motion: reduce) {
  .cmm-delete, .cmm-delete svg, .cmm-delete::before { transition: none; }
}
.cmm-delete__pending {
  margin-top: 18px; padding: 10px 14px; border-radius: var(--radius-md);
  background: var(--color-primary-dim); border: 1px solid var(--color-border-default);
  color: var(--color-text-secondary); font-size: .82rem; text-align: center; font-weight: 600;
}

/* ── Reportar contenido ───────────────────────────────────────────── */
.cmm-report { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--color-border-subtle); }
.cmm-report__toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--color-text-muted); font-size: .82rem; font-weight: 600;
}
.cmm-report__toggle svg { width: 14px; height: 14px; flex: 0 0 auto; }
.cmm-report__toggle:hover { color: var(--color-danger); }
.cmm-report__toggle:focus-visible { outline: 2px solid var(--color-danger); outline-offset: 2px; border-radius: var(--radius-sm); }
.cmm-report__form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.cmm-report__form .cmm-select, .cmm-report__form .cmm-input { font-size: .85rem; padding: 8px 10px; }
.cmm-report__send { align-self: flex-start; font-size: .82rem; padding: 7px 14px; }
.cmm-report__msg { margin: 0; font-size: .8rem; font-weight: 600; color: var(--color-success); }

/* ── Fase 4.2: seguimiento de creadores + perfil ──────────────────── */
.cmm-author-link { color: inherit; text-decoration: none; }
.cmm-author-link:hover { color: var(--color-primary); text-decoration: underline; }

.cmm-follow {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: var(--radius-full);
  border: 1px solid var(--color-primary); background: var(--color-primary); color: #1a1a20;
  font-size: .85rem; font-weight: 700; cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.cmm-follow:hover { background: var(--color-primary-hover); }
.cmm-follow.is-following { background: transparent; color: var(--color-text-secondary); border-color: var(--color-border-default); }
.cmm-follow.is-following:hover { border-color: var(--color-danger); color: var(--color-danger); }
.cmm-follow__count { font-weight: 600; opacity: .85; }
.cmm-follow.is-following .cmm-follow__count { opacity: 1; }
.cmm-follow__static { display: inline-flex; align-items: center; gap: 6px; color: var(--color-text-muted); font-size: .85rem; }
.cmm-follow__static svg { width: 16px; height: 16px; flex: 0 0 auto; }

.cmm-creator-head {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--color-bg-card); border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg); padding: 18px 20px; margin: 0 0 clamp(20px, 4vw, 32px);
}
.cmm-creator-head__avatar { width: 72px; height: 72px; border-radius: var(--radius-full); object-fit: cover; }
.cmm-creator-head__info { flex: 1; min-width: 0; }
.cmm-creator-head__name { font-family: var(--font-display); margin: 0 0 .2em; font-size: 1.35rem; }
.cmm-creator-head__meta { margin: 0; color: var(--color-text-muted); font-size: .9rem; }

/* ── Editor enriquecido (wp_editor) dentro del formulario ─────────── */
.cmm-field--editor .wp-editor-wrap { border-radius: var(--radius-md); overflow: hidden; }
.cmm-field--editor .wp-editor-container,
.cmm-field--editor .wp-editor-area { max-width: 100%; }

/* Modo oscuro del editor (el chrome vive en el documento; el área de edición
   es un iframe estilado por content_style + la clase pgmpe-dark de community.js). */
[data-theme="dark"] .cmm-field--editor .mce-tinymce,
[data-theme="dark"] .cmm-field--editor .wp-editor-container,
[data-theme="dark"] .cmm-field--editor .wp-editor-wrap { border-color: var(--color-border-default); }
[data-theme="dark"] .cmm-field--editor .wp-editor-tools { background: var(--color-bg-card); border-color: var(--color-border-default); }
[data-theme="dark"] .cmm-field--editor .wp-switch-editor { background: var(--color-bg-elevated); color: var(--color-text-secondary); border-color: var(--color-border-default); }
[data-theme="dark"] .cmm-field--editor .wp-switch-editor:hover { color: var(--color-text-primary); }
[data-theme="dark"] .cmm-field--editor .mce-panel { background-color: var(--color-bg-card); border-color: var(--color-border-default); }
[data-theme="dark"] .cmm-field--editor .mce-toolbar-grp,
[data-theme="dark"] .cmm-field--editor .mce-menubar,
[data-theme="dark"] .cmm-field--editor .mce-statusbar { background: var(--color-bg-card); border-color: var(--color-border-subtle); }
[data-theme="dark"] .cmm-field--editor .mce-btn button,
[data-theme="dark"] .cmm-field--editor .mce-ico,
[data-theme="dark"] .cmm-field--editor .mce-menubtn span,
[data-theme="dark"] .cmm-field--editor .mce-path .mce-path-item,
[data-theme="dark"] .cmm-field--editor .mce-wordcount { color: var(--color-text-secondary) !important; }
[data-theme="dark"] .cmm-field--editor .mce-btn:hover button,
[data-theme="dark"] .cmm-field--editor .mce-btn.mce-active button { background: var(--color-bg-elevated); }
[data-theme="dark"] .cmm-field--editor .mce-btn.mce-listbox button { background: var(--color-bg-elevated); color: var(--color-text-primary); border-color: var(--color-border-default); }
[data-theme="dark"] .cmm-field--editor .mce-toolbar .mce-btn-group { border-color: var(--color-border-subtle); }
[data-theme="dark"] .cmm-field--editor .quicktags-toolbar { background: var(--color-bg-card); border-color: var(--color-border-default); }
[data-theme="dark"] .cmm-field--editor .quicktags-toolbar input.button { background: var(--color-bg-elevated); color: var(--color-text-secondary); border-color: var(--color-border-default); }
[data-theme="dark"] .cmm-field--editor .wp-editor-area { background: #202028 !important; color: #e2e8f0 !important; }
/* Menús flotantes de TinyMCE (dropdown Párrafo, color, etc.) — se anclan al body */
[data-theme="dark"] .mce-menu, [data-theme="dark"] .mce-floatpanel { background: var(--color-bg-card) !important; border-color: var(--color-border-default) !important; }
[data-theme="dark"] .mce-menu .mce-text, [data-theme="dark"] .mce-menu .mce-menu-item .mce-text,
[data-theme="dark"] .mce-menu .mce-ico { color: var(--color-text-secondary) !important; }
[data-theme="dark"] .mce-menu-item:hover, [data-theme="dark"] .mce-menu-item.mce-selected { background: var(--color-bg-elevated) !important; }

/* ── Contenido enriquecido renderizado en el single ───────────────── */
.cmm-single__desc img { max-width: 100%; height: auto; border-radius: var(--radius-md); margin: 12px 0; }
.cmm-single__desc figure { margin: 16px 0; }
.cmm-single__desc figure img { margin: 0; }
.cmm-single__desc figcaption { color: var(--color-text-muted); font-size: .82rem; text-align: center; margin-top: 6px; }
.cmm-single__desc ul, .cmm-single__desc ol { padding-left: 22px; margin: 12px 0; }
.cmm-single__desc li { margin: 5px 0; }
.cmm-single__desc blockquote {
  margin: 16px 0; padding: 10px 18px; border-left: 3px solid var(--color-primary);
  background: var(--color-bg-surface); border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--color-text-secondary);
}
.cmm-single__desc hr { border: 0; border-top: 1px solid var(--color-border-default); margin: 22px 0; }
.cmm-single__desc a { color: var(--color-primary); }
.cmm-single__desc pre, .cmm-single__desc code {
  font-family: var(--font-mono); font-size: .88em;
  background: var(--color-bg-elevated); border-radius: var(--radius-sm);
}
.cmm-single__desc code { padding: 2px 6px; }
.cmm-single__desc pre { padding: 14px 16px; overflow-x: auto; margin: 14px 0; }
.cmm-single__desc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .92rem; }
.cmm-single__desc th, .cmm-single__desc td { border: 1px solid var(--color-border-default); padding: 8px 12px; text-align: left; }
.cmm-single__desc th { background: var(--color-bg-elevated); font-weight: 600; }
.cmm-single__desc .wp-block-image, .cmm-single__desc .gallery { margin: 16px 0; }

/* ── Registro de cambios (changelog público) ─────────────────────── */
.cmm-changelog {
  margin: clamp(28px, 4.5vw, 40px) 0 0;
  padding-top: clamp(24px, 4vw, 34px);
  border-top: 1px solid var(--color-border-subtle);
}
.cmm-changelog__title {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-size: 1.25rem; margin: 0 0 20px;
}
.cmm-changelog__title svg { width: 22px; height: 22px; color: var(--color-primary); flex: 0 0 auto; }
.cmm-changelog__list { list-style: none; margin: 0; padding: 0; position: relative; }
.cmm-changelog__list::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(to bottom, var(--color-primary-dim), transparent);
}
.cmm-changelog__entry { position: relative; padding: 0 0 22px 32px; }
.cmm-changelog__entry::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--color-bg-elevated);
  border: 2px solid var(--color-border-default);
}
.cmm-changelog__entry.is-latest::before { border-color: var(--color-primary); background: var(--color-primary-dim); }
.cmm-changelog__entry:last-child { padding-bottom: 0; }
.cmm-changelog__head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.cmm-changelog__ver { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--color-text-primary); }
.cmm-changelog__badge {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--color-primary); background: var(--color-primary-dim);
  padding: 2px 8px; border-radius: var(--radius-full);
}
.cmm-changelog__date { color: var(--color-text-muted); font-size: .82rem; margin-left: auto; }
.cmm-changelog__body { color: var(--color-text-secondary); line-height: 1.65; font-size: .92rem; }
.cmm-changelog__body p { margin: 0 0 8px; }
.cmm-changelog__body p:last-child { margin-bottom: 0; }
.cmm-changelog__body ul, .cmm-changelog__body ol { margin: 6px 0; padding-left: 20px; }
.cmm-changelog__body li { margin: 3px 0; }
.cmm-changelog__body a { color: var(--color-primary); }
.cmm-changelog__body blockquote {
  margin: 8px 0; padding-left: 12px; border-left: 3px solid var(--color-primary-dim);
  color: var(--color-text-muted);
}
@media (max-width: 520px) {
  .cmm-changelog__date { margin-left: 0; width: 100%; }
}

/* ── Bloque de versión + changelog en el formulario ──────────────── */
.cmm-version-block__sublabel { display: block; margin-top: 14px; }
.cmm-input--version { max-width: 220px; }
.cmm-version-history {
  margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-md);
  background: var(--color-bg-elevated); border: 1px solid var(--color-border-subtle);
}
.cmm-version-history__title {
  display: block; font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .03em; color: var(--color-text-muted); margin-bottom: 8px;
}
.cmm-version-history ul {
  list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column;
  gap: 6px; max-height: 160px; overflow-y: auto;
}
.cmm-version-history li { display: flex; justify-content: space-between; gap: 12px; font-size: .85rem; }
.cmm-version-history__ver { font-weight: 600; color: var(--color-text-primary); }
.cmm-version-history time { color: var(--color-text-muted); }

/* ── Auto-alojo: archivo actual del pack (formulario) ────────────── */
.cmm-current-pack {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 8px; padding: 8px 12px; font-size: .9rem;
  background: var(--color-bg-elevated); border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md); color: var(--color-text-secondary);
}
.cmm-current-pack__hint { color: var(--color-text-muted); font-size: .82rem; }

/* ── Etiquetas: chips clicables ──────────────────────────────────── */
.cmm-tag-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .8rem; line-height: 1; padding: 5px 10px;
  border-radius: var(--radius-full); text-decoration: none;
  background: var(--color-bg-elevated); color: var(--color-text-secondary);
  border: 1px solid var(--color-border-subtle);
}
.cmm-tag-chip--link { transition: background .15s, color .15s, border-color .15s; }
.cmm-tag-chip--link:hover { background: var(--color-primary-dim); color: var(--color-primary); border-color: var(--color-primary-dim); }
.cmm-tag-chip__n { color: var(--color-text-muted); font-size: .72rem; }
.cmm-tag-chip__x {
  border: 0; background: none; cursor: pointer; color: inherit; opacity: .7;
  font-size: 1.05em; line-height: 1; padding: 0 0 0 2px; text-decoration: none;
}
.cmm-tag-chip__x:hover { opacity: 1; }
.cmm-tags-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 4px; }

.cmm-card__taglist { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 4px; }
.cmm-card__tag-link {
  font-size: .72rem; color: var(--color-text-muted); text-decoration: none;
  padding: 2px 8px; border-radius: var(--radius-full); background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-subtle); transition: color .15s, border-color .15s;
}
.cmm-card__tag-link:hover { color: var(--color-primary); border-color: var(--color-primary-dim); }

/* ── Editor de etiquetas (formulario) ────────────────────────────── */
.cmm-tags-input {
  position: relative; display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 8px 10px; min-height: 46px; cursor: text;
  background: var(--color-bg-elevated); border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
}
.cmm-tags-input:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-dim); }
.cmm-tags-input__chips { display: contents; }
.cmm-tag-chip--active { background: var(--color-primary-dim); color: var(--color-primary); border-color: transparent; font-weight: 600; }
.cmm-tags-input__entry {
  flex: 1; min-width: 120px; border: 0; background: none; outline: none;
  color: var(--color-text-primary); font-size: .92rem; padding: 4px 2px;
}
.cmm-tags-input__entry:disabled { cursor: not-allowed; }
.cmm-tags-suggest {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30;
  background: var(--color-bg-surface); border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md); box-shadow: var(--shadow-card); overflow: hidden auto;
  max-height: min(240px, 50vh);
}
.cmm-tags-suggest.is-above { top: auto; bottom: calc(100% + 4px); }
.cmm-tags-suggest__opt {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  width: 100%; text-align: left; border: 0; background: none; cursor: pointer;
  padding: 9px 12px; color: var(--color-text-primary); font-size: .88rem;
}
.cmm-tags-suggest__opt:hover { background: var(--color-primary-dim); color: var(--color-primary); }
.cmm-tags-suggest__opt small { color: var(--color-text-muted); font-size: .75rem; }
.cmm-tags-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.cmm-tags-presets__label { font-size: .78rem; color: var(--color-text-muted); margin-right: 2px; }
.cmm-tag-chip--add { cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.cmm-tag-chip--add:hover { border-color: var(--color-primary-dim); color: var(--color-primary); }
.cmm-tag-chip--add.is-on { background: var(--color-primary-dim); color: var(--color-primary); border-color: transparent; font-weight: 600; }
.cmm-field__hint.is-warn { color: var(--color-primary); }

/* ── Nube de etiquetas + filtro activo (índice / archivo) ────────── */
.cmm-activetag { margin: 6px 0 14px; }
.cmm-tagcloud { margin: 22px 0 4px; }
.cmm-tagcloud--inline { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin: 12px 0 20px; }
.cmm-tagcloud__label { font-size: .8rem; color: var(--color-text-muted); margin-right: 2px; }
.cmm-tagcloud__title { font-family: var(--font-display); font-size: 1.1rem; margin: 0 0 12px; }
.cmm-tagcloud__list { display: flex; flex-wrap: wrap; gap: 8px; }
.cmm-hero__eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; color: var(--color-primary); font-weight: 700; margin: 0 0 4px; }

/* ── Perfil público de creador (Fase D) ──────────────────────────── */
.cmm-profile { margin-bottom: 26px; }
.cmm-profile__banner {
  height: clamp(120px, 22vw, 220px); border-radius: var(--radius-lg, 16px);
  background-size: cover; background-position: center;
  background-color: var(--color-bg-elevated);
}
.cmm-profile__banner.is-empty {
  background-image: linear-gradient(120deg, var(--color-primary-dim), var(--color-bg-elevated) 62%);
}
.cmm-profile__bar { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-top: -46px; padding: 0 8px; }
.cmm-profile__avatar {
  width: 108px; height: 108px; border-radius: 50%; object-fit: cover; flex: 0 0 auto;
  border: 4px solid var(--color-bg-base); background: var(--color-bg-elevated);
}
.cmm-profile__id { flex: 1; min-width: 200px; padding-bottom: 4px; }
.cmm-profile__name { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0; }
.cmm-profile__since { color: var(--color-text-muted); font-size: .85rem; margin: 2px 0 0; }
.cmm-profile__socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cmm-profile__social {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full); color: var(--color-text-secondary);
  background: var(--color-bg-elevated); border: 1px solid var(--color-border-subtle);
  transition: color .15s, border-color .15s, transform .15s;
}
.cmm-profile__social svg { width: 18px; height: 18px; }
.cmm-profile__social:hover { color: var(--color-primary); border-color: var(--color-primary-dim); transform: translateY(-2px); }
.cmm-profile__action { padding-bottom: 6px; }
.cmm-profile__bio { margin: 16px 4px 0; color: var(--color-text-secondary); line-height: 1.6; max-width: 70ch; white-space: pre-line; }
.cmm-profile__stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 4px 0; }
.cmm-profile__stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; min-width: 92px;
  padding: 12px 16px; background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-subtle); border-radius: var(--radius-md);
}
.cmm-profile__stat-icon { color: var(--color-primary); }
.cmm-profile__stat-icon svg { width: 20px; height: 20px; }
.cmm-profile__stat-value { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.cmm-profile__stat-label { color: var(--color-text-muted); font-size: .76rem; }

.cmm-section-title { font-family: var(--font-display); font-size: 1.2rem; margin: 26px 0 14px; }
.cmm-section-title--all { margin-top: 30px; }

/* Reputación + insignias en el perfil público (Fase E) */
.cmm-profile__rep { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 4px 0; }
.cmm-profile__level { font-weight: 700; font-size: .85rem; color: var(--color-primary); background: var(--color-primary-dim); padding: 5px 12px; border-radius: var(--radius-full); }
.cmm-profile__badges { display: flex; flex-wrap: wrap; gap: 7px; }
.cmm-profile__badge {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--color-bg-elevated); border: 1px solid var(--color-border-subtle);
}
.cmm-profile__badge svg { width: 17px; height: 17px; }
.cmm-profile__badge.tier-bronze { color: #cd7f32; }
.cmm-profile__badge.tier-silver { color: #c7cdd9; }
.cmm-profile__badge.tier-gold { color: #ffd277; }

@media (prefers-reduced-motion: reduce) {
  .cmm-profile__social { transition: none; }
}

/* ── R4: ranking de creadores + temporada + retos ─────────────────────── */
.cmm-ranking { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; margin: 6px 0 30px; }
@media (max-width: 760px) { .cmm-ranking { grid-template-columns: 1fr; gap: 20px; } }
.cmm-ranking__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cmm-ranking__season { font-size: .78rem; font-weight: 700; color: var(--color-primary); background: var(--color-primary-dim); padding: 4px 12px; border-radius: 100px; }
.cmm-ranking__list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.cmm-ranking__item { display: grid; grid-template-columns: 32px 1fr auto auto; align-items: center; gap: 10px; padding: 7px 12px; border-radius: var(--radius-md); transition: background .15s ease; }
.cmm-ranking__item:hover { background: var(--color-bg-elevated); }
.cmm-ranking__item.is-you { background: var(--color-primary-dim); }
.cmm-ranking__pos { font-weight: 800; color: var(--color-text-muted); text-align: center; }
.cmm-ranking__item.pos-1 .cmm-ranking__pos { color: #ffd277; }
.cmm-ranking__item.pos-2 .cmm-ranking__pos { color: #c7cdd9; }
.cmm-ranking__item.pos-3 .cmm-ranking__pos { color: #cd7f32; }
.cmm-ranking__creator { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: inherit; }
.cmm-ranking__avatar { border-radius: 50%; flex: 0 0 auto; }
.cmm-ranking__name { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-text-primary); }
.cmm-ranking__featured { margin-left: 6px; font-size: .64rem; font-weight: 700; color: var(--color-primary); white-space: nowrap; }
.cmm-ranking__lvl { font-size: .76rem; color: var(--color-text-muted); white-space: nowrap; }
.cmm-ranking__xp { font-size: .82rem; font-weight: 700; color: var(--color-text-secondary); white-space: nowrap; }
.cmm-ranking__you, .cmm-ranking__empty { margin: 10px 2px 0; font-size: .82rem; color: var(--color-text-muted); }
@media (max-width: 480px) { .cmm-ranking__lvl { display: none; } }
.cmm-challenges__list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cmm-challenge { background: var(--color-bg-card); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-md); padding: 12px 14px; }
.cmm-challenge__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cmm-challenge__title { font-size: .9rem; }
.cmm-challenge__reward { font-size: .72rem; font-weight: 800; color: var(--color-primary); background: var(--color-primary-dim); padding: 3px 9px; border-radius: 100px; white-space: nowrap; }
.cmm-challenge__desc { margin: 6px 0 8px; font-size: .8rem; color: var(--color-text-muted); line-height: 1.4; }
.cmm-challenge__bar { height: 6px; border-radius: 3px; background: var(--color-bg-elevated); overflow: hidden; }
.cmm-challenge__bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--color-primary), #ffc861); border-radius: 3px; }
.cmm-challenge__ends { display: block; margin-top: 6px; font-size: .7rem; color: var(--color-text-muted); }

/* Botón "Enviar mensaje" en el perfil del creador. */
.cmm-msgbtn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 100px; border: 1px solid var(--color-border-subtle); background: var(--color-bg-elevated); color: var(--color-text-primary); font-size: .85rem; font-weight: 600; text-decoration: none; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.cmm-msgbtn:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* ═══════════════════════════════════════════════════════════════════════
   HOME (rediseño de portada) — hero útil, tiles de categorías, tabs de
   descubrimiento, toolbar del grid y "Cargar más".
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Hero útil ── */
/* Hero "content-forward": el contenido (banner destacado) pesa más que el texto. */
.cmm-home-hero { display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); gap: clamp(22px, 3.4vw, 40px); align-items: center; margin-bottom: 38px; }
.cmm-home-hero--solo { grid-template-columns: minmax(0, 1fr); max-width: 720px; }
.cmm-home-hero__title { font-family: var(--font-display); font-size: clamp(1.45rem, 2.7vw, 2.05rem); line-height: 1.13; letter-spacing: -.01em; margin: 0 0 12px; color: var(--color-text-primary); }
.cmm-home-hero__sub { font-size: clamp(.88rem, 1.3vw, .96rem); line-height: 1.55; color: var(--color-text-secondary); margin: 0 0 18px; max-width: 46ch; }
.cmm-home-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 18px; }
.cmm-home-hero__feature { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cmm-home-hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--color-primary); }
.cmm-home-hero__eyebrow::before { content: ""; width: 16px; height: 2px; border-radius: 2px; background: var(--color-primary); }
.cmm-home-hero__publish { display: inline-flex; align-items: center; gap: 7px; padding: 11px 18px; border-radius: 100px; border: 1px solid var(--color-border-default); background: transparent; color: var(--color-text-primary); font-weight: 700; font-size: .9rem; text-decoration: none; transition: border-color .15s ease, color .15s ease, transform .15s ease; }
.cmm-home-hero__publish:hover { border-color: var(--color-primary); color: var(--color-primary); transform: translateY(-1px); }
.cmm-home-hero__stats { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; }
.cmm-home-hero__chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 14px; border-radius: 100px; background: var(--color-bg-card); border: 1px solid var(--color-border-subtle); font-size: .8rem; color: var(--color-text-secondary); }
.cmm-home-hero__chip strong { font-size: .95rem; color: var(--color-primary); font-weight: 800; }

.cmm-home-hero__spotlight { position: relative; display: block; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--color-border-default); background: var(--color-bg-card); text-decoration: none; box-shadow: var(--shadow-card); transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s ease, border-color .3s ease; }
.cmm-home-hero__spotlight:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); border-color: var(--color-border-hover); }
.cmm-home-hero__spotlight-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.cmm-home-hero__spotlight-flag { position: absolute; top: 12px; left: 12px; z-index: 2; padding: 4px 11px; border-radius: 100px; background: var(--color-primary); color: #1a1a20; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.cmm-home-hero__spotlight-info { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; }
.cmm-home-hero__spotlight-title { font-family: var(--font-display); font-size: 1.05rem; color: var(--color-text-primary); }
.cmm-home-hero__spotlight-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: .78rem; color: var(--color-text-muted); }
.cmm-home-hero__spotlight-rating { display: inline-flex; align-items: center; gap: 4px; color: #ffd277; font-weight: 700; }
.cmm-home-hero__spotlight-rating svg { width: 12px; height: 12px; }

/* ═══ Banner destacado (carrusel) — reemplaza el spotlight único ═══════════ */
.cmm-banner { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--color-border-default); background: var(--color-bg-card); box-shadow: var(--shadow-card); }
.cmm-banner__viewport { overflow: hidden; }
.cmm-banner__track { display: flex; will-change: transform; transition: transform .55s cubic-bezier(.22,1,.36,1); }
.cmm-banner__slide { position: relative; flex: 0 0 100%; display: block; aspect-ratio: 16 / 9; text-decoration: none; color: #fff; }
.cmm-banner__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cmm-banner__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,6,12,.88) 0%, rgba(8,6,12,.45) 34%, rgba(8,6,12,0) 62%); pointer-events: none; }
.cmm-banner__badge { position: absolute; top: 12px; left: 12px; z-index: 2; padding: 4px 11px; border-radius: 100px; background: var(--color-primary); color: #1a1a20; font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.cmm-banner__overlay { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-direction: column; gap: 7px; padding: 16px 18px; }
.cmm-banner__title { font-family: var(--font-display); font-size: clamp(1.05rem, 2.2vw, 1.35rem); line-height: 1.2; color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cmm-banner__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: .8rem; color: rgba(255,255,255,.82); }
.cmm-banner__sub { font-style: italic; color: rgba(255,255,255,.9); }
.cmm-banner__author { display: inline-flex; align-items: center; gap: 6px; }
.cmm-banner__avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.cmm-banner__rating { display: inline-flex; align-items: center; gap: 4px; color: #ffd277; font-weight: 700; }
.cmm-banner__rating svg { width: 13px; height: 13px; }
.cmm-banner__cta { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; padding: 7px 14px; border-radius: 100px; background: var(--color-primary); color: #1a1a20; font-weight: 700; font-size: .82rem; transition: transform .15s ease, filter .15s ease; }
.cmm-banner__slide:hover .cmm-banner__cta { filter: brightness(1.06); transform: translateX(2px); }
.cmm-banner__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; background: rgba(12,10,16,.55); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .2s ease, background .2s ease; }
.cmm-banner:hover .cmm-banner__nav, .cmm-banner__nav:focus-visible { opacity: 1; }
.cmm-banner__nav:hover { background: rgba(12,10,16,.82); }
.cmm-banner__nav svg { width: 20px; height: 20px; }
.cmm-banner__nav--prev { left: 10px; }
.cmm-banner__nav--next { right: 10px; }
.cmm-banner__nav:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.cmm-banner__dots { position: absolute; top: 12px; right: 12px; z-index: 3; display: flex; align-items: center; gap: 6px; }
.cmm-banner__pause { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 4px; padding: 0; border: 0; border-radius: 50%; background: rgba(12,10,16,.62); color: #fff; cursor: pointer; }
.cmm-banner__pause[hidden] { display: none; }
.cmm-banner__pause svg { width: 14px; height: 14px; }
.cmm-banner__pause .cmm-banner__play-ico,
.cmm-banner__pause.is-paused .cmm-banner__pause-ico { display: none; }
.cmm-banner__pause.is-paused .cmm-banner__play-ico { display: block; }
.cmm-banner__pause:hover { background: rgba(12,10,16,.85); }
.cmm-banner__pause:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.cmm-banner__dot { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 100px; cursor: pointer; background: rgba(255,255,255,.5); transition: width .25s ease, background .25s ease; }
.cmm-banner__dot.is-active { width: 20px; background: var(--color-primary); }
.cmm-banner__dot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
[data-theme="light"] .cmm-banner__nav { background: rgba(20,14,6,.5); }
[data-theme="light"] .cmm-banner__nav:hover { background: rgba(20,14,6,.75); }
@media (hover: none) { .cmm-banner__nav { opacity: 1; background: rgba(12,10,16,.5); } }
@media (prefers-reduced-motion: reduce) { .cmm-banner__track, .cmm-banner__cta { transition: none; } }

/* ── Tiles de categorías ── */
.cmm-cats { margin-bottom: 44px; }
.cmm-cats__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
/* Tile vertical: cabecera (icono + nombre) · descripcion a todo el ancho ·
   chip de conteo anclado abajo. El grid estira las tiles a la misma altura,
   asi que los chips quedan alineados sin importar cuanto ocupe la descripcion. */
.cmm-cats__tile { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--radius-md); background: var(--color-bg-card); border: 1px solid var(--color-border-subtle); text-decoration: none; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.cmm-cats__tile:hover { transform: translateY(-3px); border-color: var(--cat-c, var(--color-primary)); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.cmm-cats__head { display: flex; align-items: center; gap: 12px; }
.cmm-cats__icon { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; color: var(--cat-c, var(--color-primary)); background: color-mix(in srgb, var(--cat-c, #ffa600) 14%, transparent); }
.cmm-cats__icon svg { width: 22px; height: 22px; }
.cmm-cats__name { min-width: 0; font-size: 1rem; font-weight: 700; line-height: 1.2; color: var(--color-text-primary); }
/* Descripcion fijada a 2 lineas: alturas homogeneas y sin desbordes raros. */
.cmm-cats__desc { font-size: .82rem; line-height: 1.45; color: var(--color-text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cmm-cats__count { margin-top: auto; align-self: flex-start; font-size: .72rem; font-weight: 700; color: var(--color-text-secondary); background: var(--color-bg-elevated); padding: 4px 11px; border-radius: 100px; white-space: nowrap; }
.cmm-cats__count.is-empty { color: var(--color-primary); background: var(--color-primary-dim); }

/* ── Tabs de descubrimiento ── */
.cmm-discovery { margin-bottom: 44px; }
.cmm-feedtabs { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-bottom: 18px; }
.cmm-feedtabs__title { margin: 0; }
.cmm-feedtabs__nav { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.cmm-feedtabs__nav::-webkit-scrollbar { display: none; }
.cmm-feedtabs__tab { scroll-snap-align: start; white-space: nowrap; padding: 8px 16px; border-radius: 100px; font-size: .84rem; font-weight: 600; color: var(--color-text-secondary); background: var(--color-bg-card); border: 1px solid var(--color-border-subtle); text-decoration: none; transition: color .15s ease, border-color .15s ease, background .15s ease; }
.cmm-feedtabs__tab:hover { color: var(--color-text-primary); border-color: var(--color-border-hover); }
.cmm-feedtabs__tab.is-active { color: #1a1a20; background: var(--color-primary); border-color: var(--color-primary); font-weight: 800; }
.cmm-grid--discovery { min-height: 120px; }
.cmm-grid--discovery.is-loading { opacity: .45; pointer-events: none; }

/* ── Variante compacta de tarjeta ── */
.cmm-card--compact .cmm-card__body { padding: 12px 14px; }
.cmm-card--compact .cmm-card__title { font-size: 1rem; }
.cmm-card--compact .cmm-card__foot { margin-top: 8px; }

/* ── Flags NUEVO / ACTUALIZADO + rating en overlay ── */
.cmm-card__flag { position: absolute; bottom: 44px; left: 10px; z-index: 2; padding: 3px 9px; border-radius: 100px; font-size: .62rem; font-weight: 800; letter-spacing: .07em; }
.cmm-card__flag--new { background: var(--color-primary); color: #1a1a20; }
.cmm-card__flag--updated { background: #4aa3ff; color: #0c1622; }
.cmm-card__rating { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 100px; background: rgba(20, 20, 26, .78); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); color: #ffd277; font-size: .74rem; font-weight: 800; }
.cmm-card__rating svg { width: 11px; height: 11px; }
.cmm-card__title a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Toolbar del grid principal ── */
.cmm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 16px; scroll-margin-top: 90px; }
.cmm-toolbar__title { margin: 0; flex: 1 1 auto; }
.cmm-toolbar__search { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; height: 40px; border-radius: 100px; background: var(--color-bg-card); border: 1px solid var(--color-border-subtle); color: var(--color-text-muted); transition: border-color .15s ease; min-width: 220px; }
.cmm-toolbar__search:focus-within { border-color: var(--color-primary); }
.cmm-toolbar__search svg { width: 15px; height: 15px; flex: 0 0 auto; }
.cmm-toolbar__search input { flex: 1 1 auto; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--color-text-primary); font-size: .86rem; font-family: var(--font-body); }
.cmm-toolbar__search input::placeholder { color: var(--color-text-muted); }
.cmm-toolbar__sortform { display: inline-flex; align-items: center; gap: 8px; }
.cmm-toolbar__sort { height: 40px; padding: 0 34px 0 14px; border-radius: 100px; background-color: var(--color-bg-card); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238f93a5' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; border: 1px solid var(--color-border-subtle); color: var(--color-text-primary); font-size: .84rem; font-weight: 600; appearance: none; cursor: pointer; transition: border-color .15s ease; }
.cmm-toolbar__sort:hover, .cmm-toolbar__sort:focus { border-color: var(--color-border-hover); outline: 0; }
.cmm-toolbar__apply { height: 40px; padding: 0 16px; border-radius: 100px; border: 1px solid var(--color-border-default); background: var(--color-bg-elevated); color: var(--color-text-primary); font-weight: 700; cursor: pointer; }
.cmm-hero--slim { margin-bottom: 26px; }
.cmm-hero--slim .cmm-hero__title { margin-bottom: 6px; }

/* ── Cargar más ── */
.cmm-more { display: flex; justify-content: center; margin: 26px 0 6px; }
.cmm-more__btn { display: inline-flex; align-items: center; gap: 9px; padding: 12px 26px; border-radius: 100px; border: 1px solid var(--color-border-default); background: var(--color-bg-card); color: var(--color-text-primary); font-size: .9rem; font-weight: 700; cursor: pointer; transition: border-color .15s ease, color .15s ease, transform .15s ease; }
.cmm-more__btn:hover { border-color: var(--color-primary); color: var(--color-primary); transform: translateY(-1px); }
.cmm-more__btn[disabled] { opacity: .55; cursor: default; transform: none; }
.cmm-more__btn .pgmpe-spin { width: 14px; height: 14px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: cmmMoreSpin .7s linear infinite; }
@keyframes cmmMoreSpin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 900px) {
  .cmm-home-hero { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-bottom: 30px; }
  /* En móvil el contenido destacado va primero; el texto queda debajo. */
  .cmm-home-hero__feature { order: 1; }
  .cmm-home-hero__value { order: 2; }
  .cmm-home-hero__spotlight { max-width: 560px; }
}
@media (max-width: 600px) {
  .cmm-cats__grid { grid-template-columns: 1fr; }
  .cmm-toolbar { align-items: stretch; }
  .cmm-toolbar__title { flex-basis: 100%; }
  .cmm-toolbar__search { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .cmm-home-hero__spotlight, .cmm-cats__tile, .cmm-more__btn { transition: none; }
  .cmm-more__btn .pgmpe-spin { animation: none; }
}

/* ── Strip de comunidad (v2): top creadores + reto + actividad ── */
.cmm-strip { margin: 44px 0; }
.cmm-strip__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 16px; }
.cmm-strip__head .cmm-section-title { margin: 0; flex: 1 1 auto; }
.cmm-strip__more { font-size: .84rem; font-weight: 700; color: var(--color-primary); text-decoration: none; }
.cmm-strip__more:hover { text-decoration: underline; }
.cmm-strip__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.cmm-strip__card { background: var(--color-bg-card); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-md); padding: 16px 18px; }
.cmm-strip__card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; font-size: .92rem; font-weight: 800; color: var(--color-text-primary); }
.cmm-strip__season { font-size: .72rem; font-weight: 600; color: var(--color-text-muted); }
.cmm-strip__creators { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cmm-strip__creator { display: flex; align-items: center; gap: 10px; font-size: .84rem; }
.cmm-strip__pos { flex: 0 0 28px; font-weight: 800; color: var(--color-text-muted); }
.cmm-strip__creator.pos-1 .cmm-strip__pos { color: #ffd277; }
.cmm-strip__creator.pos-2 .cmm-strip__pos { color: #c7cdd9; }
.cmm-strip__creator.pos-3 .cmm-strip__pos { color: #cd7f32; }
.cmm-strip__person { display: inline-flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto; color: var(--color-text-primary); text-decoration: none; }
.cmm-strip__person:hover .cmm-strip__name { color: var(--color-primary); }
.cmm-strip__avatar { border-radius: 50%; width: 30px; height: 30px; flex: 0 0 auto; }
.cmm-strip__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cmm-strip__xp { flex: 0 0 auto; font-size: .76rem; font-weight: 700; color: var(--color-text-secondary); }
.cmm-strip__activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cmm-strip__event { font-size: .82rem; line-height: 1.45; }
.cmm-strip__event a { color: var(--color-text-secondary); text-decoration: none; }
.cmm-strip__event a:hover { color: var(--color-text-primary); }
.cmm-strip__event strong { color: var(--color-text-primary); }
.cmm-strip__when { display: block; font-size: .72rem; color: var(--color-text-muted); margin-top: 2px; }

/* ── Página de ranking (v2) ── */
.cmm-seasons { margin-top: 36px; }
.cmm-seasons__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.cmm-seasons__card { background: var(--color-bg-card); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-md); padding: 14px 16px; }
.cmm-seasons__id { margin: 0 0 10px; font-size: .9rem; font-weight: 800; color: var(--color-primary); }
.cmm-seasons__podium { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: .84rem; }
.cmm-seasons__podium li { display: flex; align-items: center; gap: 8px; }
.cmm-seasons__podium a { color: var(--color-text-primary); text-decoration: none; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmm-seasons__podium a:hover { color: var(--color-primary); }
.cmm-seasons__xp { font-size: .74rem; color: var(--color-text-muted); }
.cmm-backlink { margin-top: 30px; }
.cmm-backlink a { color: var(--color-text-secondary); text-decoration: none; font-size: .88rem; }
.cmm-backlink a:hover { color: var(--color-primary); }

/* Toolbar en archivos de taxonomía: solo el select, alineado a la derecha. */
.cmm-toolbar--archive { justify-content: flex-end; margin-top: -8px; }

/* Light theme — superficies de la home */
[data-theme="light"] .cmm-card__rating { background: rgba(255, 255, 255, .85); color: #b07300; }

/* ═════════════════════════════════════════════════════════════════════
   CENTRO DE CONTACTO Y SOPORTE (/contacto/ en mcbe)
   ═════════════════════════════════════════════════════════════════════ */
.cmm-support { padding-bottom: 30px; }

/* Hero */
.cmm-support-hero { padding: 46px 0 10px; }
.cmm-support-hero h1 { margin: 6px 0 12px; }
.cmm-support-hero p { max-width: 640px; color: var(--color-text-secondary); line-height: 1.6; }

/* Categorías */
.cmm-support-cats { padding: 26px 0 8px; }
.cmm-support-cats h2 { font-size: 1.15rem; margin-bottom: 16px; }
.cmm-support-cats__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.cmm-support-cat { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-md); background: var(--color-bg-card); border: 1px solid var(--color-border-subtle); text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.cmm-support-cat:hover { border-color: var(--color-border-hover); transform: translateY(-2px); }
.cmm-support-cat.is-active { border-color: var(--color-primary); }
.cmm-support-cat__icon { font-size: 1.25rem; line-height: 1.4; flex: 0 0 auto; }
.cmm-support-cat__body { min-width: 0; }
.cmm-support-cat__body strong { display: block; color: var(--color-text-primary); font-size: .9rem; margin-bottom: 3px; }
.cmm-support-cat__body span { display: block; color: var(--color-text-muted); font-size: .78rem; line-height: 1.45; }

/* Layout formulario + aside */
.cmm-support-form-section { padding: 30px 0 10px; scroll-margin-top: 90px; }
.cmm-support-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 22px; align-items: start; }

.cmm-support-form-card { background: var(--color-bg-card); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-lg); padding: 26px 28px; }
.cmm-support-form-card h2 { font-size: 1.15rem; margin-bottom: 18px; }
.cmm-support-form p { margin: 0 0 14px; }
.cmm-support-form label { display: block; font-size: .8rem; font-weight: 700; color: var(--color-text-secondary); margin-bottom: 6px; }
.cmm-support-form input[type="text"],
.cmm-support-form input[type="email"],
.cmm-support-form input[type="url"],
.cmm-support-form select,
.cmm-support-form textarea { width: 100%; padding: 11px 14px; border-radius: var(--radius-sm, 8px); background: var(--color-bg-elevated); border: 1px solid var(--color-border-default); color: var(--color-text-primary); font-size: .9rem; font-family: var(--font-body); transition: border-color .15s ease; }
.cmm-support-form input:focus,
.cmm-support-form select:focus,
.cmm-support-form textarea:focus { border-color: var(--color-primary); outline: 0; }
.cmm-support-form textarea { resize: vertical; min-height: 150px; }
.cmm-support-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cmm-support-form__row p { margin: 0; }
.cmm-support-form__actions { margin-top: 6px; }
/* honeypot: reutiliza .cmm-hp ya definida arriba (formulario de publicación) */

.cmm-support-notice { padding: 12px 16px; border-radius: var(--radius-md); font-size: .88rem; font-weight: 600; margin-bottom: 18px; }
.cmm-support-notice--ok { background: rgba(111, 178, 111, .12); border: 1px solid rgba(111, 178, 111, .45); color: #b8e6b8; }
.cmm-support-notice--err { background: rgba(224, 92, 92, .1); border: 1px solid rgba(224, 92, 92, .45); color: #f3b3b3; }
[data-theme="light"] .cmm-support-notice--ok { color: #2e7d32; }
[data-theme="light"] .cmm-support-notice--err { color: #b3362c; }

/* Aside: DMCA + canales */
.cmm-support-aside { display: flex; flex-direction: column; gap: 16px; }
.cmm-support-dmca,
.cmm-support-channels { background: var(--color-bg-card); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-lg); padding: 20px 22px; }
.cmm-support-dmca h3,
.cmm-support-channels h3 { font-size: .95rem; margin-bottom: 10px; }
.cmm-support-dmca p { font-size: .84rem; color: var(--color-text-secondary); line-height: 1.55; margin-bottom: 14px; }
.cmm-support-channel { display: block; padding: 12px 14px; border-radius: var(--radius-md); border: 1px solid var(--color-border-subtle); text-decoration: none; transition: border-color .15s ease; }
.cmm-support-channel + .cmm-support-channel { margin-top: 10px; }
.cmm-support-channel:hover { border-color: var(--color-primary); }
.cmm-support-channel strong { display: block; color: var(--color-text-primary); font-size: .88rem; margin-bottom: 2px; overflow-wrap: anywhere; }
.cmm-support-channel span { display: block; color: var(--color-text-muted); font-size: .76rem; }

/* FAQ */
.cmm-support-faq { padding: 34px 0 20px; }
.cmm-support-faq h2 { font-size: 1.15rem; margin-bottom: 6px; }
.cmm-support-faq__desc { color: var(--color-text-muted); font-size: .88rem; margin-bottom: 18px; }
.cmm-support-faq__list { display: flex; flex-direction: column; gap: 10px; max-width: 860px; }
.cmm-support-faq__item { background: var(--color-bg-card); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-md); }
.cmm-support-faq__item summary { padding: 14px 18px; cursor: pointer; font-weight: 700; font-size: .9rem; color: var(--color-text-primary); list-style: none; position: relative; padding-right: 40px; }
.cmm-support-faq__item summary::-webkit-details-marker { display: none; }
.cmm-support-faq__item summary::after { content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.1rem; color: var(--color-text-muted); }
.cmm-support-faq__item[open] summary::after { content: '−'; color: var(--color-primary); }
.cmm-support-faq__item[open] summary { border-bottom: 1px solid var(--color-border-subtle); }
.cmm-support-faq__answer { padding: 14px 18px; font-size: .86rem; color: var(--color-text-secondary); line-height: 1.6; }
.cmm-support-faq__answer a { color: var(--color-primary); }

/* Responsive */
@media (max-width: 860px) {
  .cmm-support-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cmm-support-form__row { grid-template-columns: 1fr; gap: 0; }
  .cmm-support-form__row p { margin-bottom: 14px; }
  .cmm-support-form-card { padding: 20px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .cmm-support-cat { transition: none; }
}

/* =====================================================================
   ZONAS PUBLICITARIAS (AdSense via plugin pgmpe-ads) — reserva anti-CLS.

   El plugin emite <div class="pgmpe-ad-zone pgmpe-ad-zone--{zona}"> con el
   <ins> de AdSense dentro. Aquí reservamos altura para que el relleno del
   anuncio NO desplace el contenido (Core Web Vitals · CLS). El colapso de
   slots no rellenados ya lo cubre main.css (data-ad-status="unfilled").

   Solo dentro de .pgmpe-community → cero impacto fuera de la plataforma
   comunitaria. min-height por zona alineado con el min_h del mapa del plugin.
   ===================================================================== */
.pgmpe-community .pgmpe-ad-zone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  margin-block: 36px;          /* separación generosa de botones/CTAs vecinos */
  padding: 26px 12px 12px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Rótulo "Publicidad" discreto (transparencia recomendada por Google),
   traducido por idioma de la plataforma (ES/EN/PT vía <html lang>). */
.pgmpe-community .pgmpe-ad-zone::before {
  content: "Publicidad";
  position: absolute;
  top: 8px;
  left: 14px;
  font: 600 0.6rem/1 var(--font-body, sans-serif);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  pointer-events: none;
}
html[lang^="en"] .pgmpe-community .pgmpe-ad-zone::before { content: "Advertisement"; }
html[lang^="pt"] .pgmpe-community .pgmpe-ad-zone::before { content: "Publicidade"; }

.pgmpe-community .pgmpe-ad-zone ins.adsbygoogle { width: 100%; }

/* Altura reservada por zona (= min_h del mapa del plugin). */
.pgmpe-ad-zone--cm_home_bottom,
.pgmpe-ad-zone--cm_perfil_bottom,
.pgmpe-ad-zone--cm_proyecto_contenido,
.pgmpe-ad-zone--cm_categoria_bottom,
.pgmpe-ad-zone--cm_etiqueta_bottom { min-height: 280px; }

.pgmpe-ad-zone--cm_proyecto_comments,
.pgmpe-ad-zone--cm_proyecto_lateral,
.pgmpe-ad-zone--cm_ranking_bottom { min-height: 250px; }

@media (max-width: 640px) {
  .pgmpe-community .pgmpe-ad-zone[class*="--cm_"] { min-height: 250px; margin-block: 28px; }
}
/* ═══════════════════════════════════════════════════════════════════════════
   BIENVENIDA (template-parts/community/welcome.php) — diálogo de primera visita
   ═══════════════════════════════════════════════════════════════════════════ */
.cmm-welcome {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.cmm-welcome[hidden] {
  display: none;
}

.cmm-welcome__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 14, 0.62);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cmm-welcome__dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 30px 30px 26px;
  border: 1px solid var(--color-border-default);
  border-radius: 22px;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(255, 140, 31, 0.16), transparent 60%),
    var(--color-bg-surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 140, 31, 0.08);
  color: var(--color-text-primary);
  opacity: 0;
  transform: translateY(18px) scale(0.97);
  transition: opacity 0.32s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.cmm-welcome.is-open .cmm-welcome__backdrop {
  opacity: 1;
}

.cmm-welcome.is-open .cmm-welcome__dialog {
  opacity: 1;
  transform: none;
}

.cmm-welcome__dialog:focus {
  outline: none;
}

.cmm-welcome__x {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.cmm-welcome__x:hover {
  background: var(--color-bg-elevated);
  color: var(--color-text-primary);
}

.cmm-welcome__head {
  text-align: center;
}

.cmm-welcome__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border: 1px solid rgba(255, 140, 31, 0.35);
  border-radius: 999px;
  background: rgba(255, 140, 31, 0.1);
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cmm-welcome__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-primary);
  animation: cmm-welcome-pulse 2.4s ease-out infinite;
}

@keyframes cmm-welcome-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 140, 31, 0.6); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(255, 140, 31, 0); }
}

.cmm-welcome__title {
  margin: 14px 0 6px;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 1.1rem + 1.4vw, 1.9rem);
  line-height: 1.15;
  text-wrap: balance;
}

.cmm-welcome__lead {
  margin: 0 auto;
  max-width: 40ch;
  color: var(--color-text-secondary);
  text-wrap: balance;
}

.cmm-welcome__body {
  margin-top: 18px;
  font-size: 0.94rem;
  line-height: 1.6;
}

.cmm-welcome__body p {
  margin: 0 0 10px;
}

.cmm-welcome__steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.cmm-welcome__step {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 12px;
  border: 1px solid var(--color-border-default);
  border-radius: 14px;
  background: var(--color-bg-card);
  font-size: 0.82rem;
  line-height: 1.4;
}

.cmm-welcome__step strong {
  font-size: 0.88rem;
}

.cmm-welcome__step > span:last-child {
  color: var(--color-text-secondary);
}

.cmm-welcome__step-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 4px;
  border-radius: 10px;
  background: rgba(255, 140, 31, 0.12);
  color: var(--color-primary);
}

.cmm-welcome__step-n {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #1a1209;
  font-size: 10.5px;
  font-weight: 800;
}

.cmm-welcome__note {
  margin: 16px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 140, 31, 0.1);
  color: var(--color-text-primary);
  font-size: 0.86rem;
}

.cmm-welcome__actions .btn-primary,
.cmm-welcome__actions .btn-primary:hover,
.cmm-welcome__actions .btn-primary:focus,
.cmm-welcome__actions .btn-primary:focus-visible {
  color: #fff;
}

.cmm-welcome__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

html.cmm-welcome-lock {
  overflow: hidden;
}

@media (max-width: 560px) {
  .cmm-welcome {
    align-items: end;
    padding: 0;
  }

  .cmm-welcome__dialog {
    padding: 26px 18px 20px;
    border-radius: 22px 22px 0 0;
    max-height: 92dvh;
  }

  .cmm-welcome__steps {
    grid-template-columns: 1fr;
  }

  .cmm-welcome__step {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 12px;
    align-items: center;
  }

  .cmm-welcome__step-icon {
    grid-row: span 2;
    margin: 0;
  }

  .cmm-welcome__actions > * {
    flex: 1 1 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cmm-welcome__dialog,
  .cmm-welcome__backdrop {
    transition: opacity 0.2s ease;
    transform: none;
  }

  .cmm-welcome__dot {
    animation: none;
  }
}
