/*
 * Proyecto Isaías — Contenido 11.1.0
 * -------------------------------------------------------------------------
 * Normalización visual del CONTENIDO de cada sección (no del shell).
 * Se carga después de teen-ui-v1100.css.
 *
 *  1. Ritmo: todas las secciones respiran igual (espacios, radios, padding).
 *  2. Tipografía: sin títulos gritados en mayúsculas, sin letra diminuta.
 *  3. Chips y filtros: parecen chips, no botones gigantes.
 *  4. Selectores de varias opciones: nunca cortan el texto.
 *  5. Tarjetas y cuadrículas: columnas que se adaptan sin aplastar texto.
 *  6. Correcciones por sección.
 */

/* ---------------------------------------------------------------------- */
/* 1. Ritmo vertical común                                                 */
/* ---------------------------------------------------------------------- */
.fj-v11-shell .fj-v11-body > .fj-wrap,
.fj-v11-shell .fj-v11-body > section,
.fj-v11-shell .fj-v11-body > div { margin-top: 0 !important; }

.fj-v11-shell .fj-v11-body :where(.fj-wrap, .fj-adv-page, .fj-profile-portal, .fj-dashboard) {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
  padding: 0 !important;
}
.fj-v11-shell .fj-v11-body :where(.fj-wrap, .fj-adv-page, .fj-profile-portal, .fj-dashboard) > * { margin-top: 0 !important; margin-bottom: 0 !important; }
.fj-v11-shell .fj-v11-body :where(.fj-wrap, .fj-adv-page) > :where(section, article, .fj-card, header) { min-width: 0; }

/* Tarjetas: un solo lenguaje (borde, radio, sombra suave). */
.fj-v11-shell .fj-v11-body :where(.fj-card, [class$="-panel"], [class*="-panel "]):not([class*="tab"]):not([class*="hero"]) {
  border-radius: 18px !important;
}
.fj-v11-shell .fj-v11-body .fj-card { padding: clamp(16px, 2.2vw, 24px) !important; }

/* Etiquetas de paso numeradas (1 Elige…, 2 Mira…): discretas y legibles. */
.fj-v11-shell .fj-adv-step-label,
.fj-v11-shell [class*="-step-label"] {
  display: flex !important; align-items: center !important; gap: 12px !important;
  margin: 6px 0 -6px !important;
  padding: 0 4px !important;
  border: 0 !important; background: transparent !important; box-shadow: none !important;
}
.fj-v11-shell .fj-adv-step-label > span {
  display: grid !important; place-items: center !important;
  width: 34px !important; height: 34px !important; flex: 0 0 34px !important;
  border-radius: 50% !important;
  background: var(--tone-strong) !important; color: #fff !important;
  font-size: 15px !important; font-weight: 700 !important;
}
.fj-v11-shell .fj-adv-step-label strong { display: block; font-size: 18px !important; font-weight: 700 !important; color: var(--v11-ink) !important; line-height: 1.2 !important; }
.fj-v11-shell .fj-adv-step-label small { display: block; font-size: 14px !important; font-weight: 400 !important; color: var(--v11-muted) !important; }
html[data-fj-theme="night"] .fj-v11-shell .fj-adv-step-label > span { color: #0b1222 !important; background: var(--tone) !important; }

/* ---------------------------------------------------------------------- */
/* 2. Tipografía de contenido                                              */
/* ---------------------------------------------------------------------- */
.fj-v11-shell .fj-v11-body :where(h2, h3) { line-height: 1.2 !important; }
.fj-v11-shell .fj-v11-body h3 { font-size: clamp(18px, 1.7vw, 22px) !important; }
.fj-v11-shell .fj-v11-body h4 { font-size: 17px !important; line-height: 1.25 !important; }
.fj-v11-shell .fj-v11-body :where(p) { line-height: 1.5; }
/* Antetítulos (kickers): pequeños pero legibles. */
.fj-v11-shell .fj-v11-body :where(.fj-eyebrow, [class*="kicker"], [class*="eyebrow"]) {
  font-size: 12px !important;
  letter-spacing: .06em !important;
  font-weight: 700 !important;
}
.fj-v11-shell .fj-v11-body .fj-muted { color: var(--v11-muted) !important; }
/* Números destacados: tabulares, sin saltos. */
.fj-v11-shell .fj-v11-body :where(strong, b) { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------------- */
/* 3. Chips, filtros y reacciones                                          */
/* ---------------------------------------------------------------------- */
.fj-v11-shell .fj-v11-body :is(.fj-adv-filter, .fj-treasury-filter, .fj-bank-filter, .fj-community-chip, .fj-react, .fj-market-filter, [data-fj-filter], [data-filter], [data-cat], [class*="-filters"] > *, [class*="filter-row"] > *):is(button, a) {
  display: inline-flex !important; align-items: center !important; gap: 6px !important;
  min-height: 40px !important;
  padding: 0 14px !important;
  border: 1px solid var(--v11-line-strong) !important;
  border-radius: 999px !important;
  background: var(--v11-surface) !important;
  color: var(--v11-ink-2) !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  white-space: nowrap;
  transform: none !important;
}
.fj-v11-shell .fj-v11-body :is(.fj-adv-filter, .fj-treasury-filter, .fj-bank-filter, .fj-community-chip, .fj-react, .fj-market-filter, [data-fj-filter], [data-filter], [data-cat], [class*="-filters"] > *, [class*="filter-row"] > *):is(button, a):hover { border-color: var(--tone) !important; color: var(--tone-ink) !important; }
.fj-v11-shell .fj-v11-body :is(.fj-adv-filter, .fj-treasury-filter, .fj-bank-filter, .fj-community-chip, .fj-react, .fj-market-filter, [data-fj-filter], [data-filter], [data-cat], [class*="-filters"] > *, [class*="filter-row"] > *):is(button, a):is(.is-active, .active, [aria-pressed="true"]) {
  border-color: var(--tone-strong) !important;
  background: var(--tone-strong) !important;
  color: #fff !important;
}
html[data-fj-theme="night"] .fj-v11-shell .fj-v11-body :is(.fj-adv-filter, .fj-treasury-filter, .fj-bank-filter, .fj-community-chip, .fj-react, .fj-market-filter, [data-fj-filter], [data-filter], [data-cat], [class*="-filters"] > *, [class*="filter-row"] > *):is(button, a):is(.is-active, .active, [aria-pressed="true"]) { background: var(--tone) !important; border-color: var(--tone) !important; color: #0b1222 !important; }
.fj-v11-shell .fj-v11-body :is(.fj-adv-filter, .fj-treasury-filter, .fj-bank-filter, .fj-community-chip) :is(small, span, em, b) {
  display: inline-grid !important; place-items: center;
  min-width: 22px; height: 22px; padding: 0 6px !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, currentColor 14%, transparent) !important;
  color: inherit !important;
  font-size: 12px !important; font-weight: 700 !important;
}
/* Filas de chips: se envuelven, no se desbordan. */
.fj-v11-shell .fj-v11-body :is(.fj-adv-filters, .fj-treasury-filters, .fj-bank-filters, .fj-community-chips, .fj-reactions, [class*="-filters"], [class*="filter-row"]) {
  display: flex !important; flex-wrap: wrap !important; align-items: center !important; gap: 8px !important;
}

/* ---------------------------------------------------------------------- */
/* 4. Selectores de varias opciones (tarjetas-pestaña): nunca cortan       */
/* ---------------------------------------------------------------------- */
.fj-v11-shell .fj-v11-body .fj-adv-vert-tabs {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap: 10px !important;
  overflow: visible !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
.fj-v11-shell .fj-v11-body .fj-adv-vert-tab {
  display: flex !important; flex-direction: column !important; align-items: flex-start !important; gap: 6px !important;
  min-height: 0 !important;
  padding: 14px 14px 12px !important;
  border: 1px solid var(--v11-line) !important;
  border-radius: 14px !important;
  background: var(--v11-surface) !important;
  white-space: normal !important;
  text-align: left !important;
}
.fj-v11-shell .fj-v11-body .fj-adv-vert-tab :is(strong, small, em, span) { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; max-width: 100% !important; }
.fj-v11-shell .fj-v11-body .fj-adv-vert-tab strong { font-size: 15px !important; line-height: 1.25 !important; color: var(--v11-ink) !important; }
.fj-v11-shell .fj-v11-body .fj-adv-vert-tab small { font-size: 13px !important; color: var(--v11-muted) !important; }
.fj-v11-shell .fj-v11-body .fj-adv-vert-tab em {
  font-style: normal !important; font-size: 12px !important; font-weight: 600 !important;
  padding: 3px 9px !important; border-radius: 999px !important;
  background: var(--v11-warn-soft) !important; color: var(--v11-warn) !important;
}
.fj-v11-shell .fj-v11-body .fj-adv-vert-tab-title { display: flex !important; flex-wrap: wrap !important; align-items: center !important; gap: 6px !important; width: 100%; }
.fj-v11-shell .fj-v11-body .fj-adv-vert-tab.is-active {
  border: 2px solid var(--tone-strong) !important;
  background: var(--tone-soft) !important;
  outline: none !important;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--tone) 18%, transparent) !important;
}
.fj-v11-shell .fj-v11-body .fj-adv-vert-tab::after,
.fj-v11-shell .fj-v11-body .fj-adv-vert-tab::before { right: 10px !important; top: 10px !important; }

/* Pestañas de disciplina del Plan (fila superior): legibles y con scroll suave. */
.fj-v11-shell .fj-v11-body .fj-adv-tabs { scrollbar-width: thin; }
.fj-v11-shell .fj-v11-body .fj-adv-tab { min-width: 150px !important; padding: 10px 14px !important; white-space: normal !important; text-align: left !important; }
.fj-v11-shell .fj-v11-body .fj-adv-tab :is(strong, small, span) { white-space: normal !important; }

/* Pestañas grandes de módulos (Tienda, Mercado, Desafío, Ranking): grid sin cortes. */
.fj-v11-shell .fj-v11-body :is(.fj-store636-tabs, .fj-desafio-tabs, .fj-market-tabs, .fj-ranking-switch) {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
  gap: 8px !important;
  overflow: visible !important;
}
.fj-v11-shell .fj-v11-body :is(.fj-store636-tab, .fj-desafio-tabs > button, .fj-market-tab, .fj-ranking-switch > :is(a, button)) {
  min-height: 56px !important;
  white-space: normal !important;
  text-align: center !important;
  justify-content: center !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
}
.fj-v11-shell .fj-v11-body :is(.fj-store636-tab, .fj-desafio-tabs > button, .fj-market-tab, .fj-ranking-switch > :is(a, button)) :is(small, span) { font-size: 13px !important; }

/* ---------------------------------------------------------------------- */
/* 5. Cuadrículas que se adaptan                                           */
/* ---------------------------------------------------------------------- */
/* Tarjetas de métricas: nunca más estrechas de 140 px. */
.fj-v11-shell .fj-v11-body :is([class$="-stats"], [class*="-stats "], [class$="-statgrid"], .fj-sp649-pulse, .fj-community-overview, .fj-treasury-dual-wallet, .fj-bank-wallet-grid, .fj-staff646-stats, .fj-app652-stats, .fj-int653-stats, .fj-att656-stats, .fj-rw657-stats, .fj-tm658-statgrid, .fj-sys659-statgrid, .fj-market-summary-grid, .fj-desafio-hero-stats, .fj-team-hub-stats) {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
  gap: 12px !important;
}
/* Textos largos de tarjeta: se cortan por palabras, nunca por letras. */
.fj-v11-shell .fj-v11-body :where(h2, h3, h4, strong, p, small, span, a) { overflow-wrap: break-word; word-break: normal; hyphens: manual; }

/* ---------------------------------------------------------------------- */
/* 6. Correcciones por sección                                             */
/* ---------------------------------------------------------------------- */

/* Navegación duplicada dentro de los módulos (ya existe en la barra). */
.fj-v11-shell .fj-dashboard-actions-panel,
.fj-v11-shell .fj-team-quick-panel { display: none !important; }
.fj-v11-shell .fj-dashboard-wall-panel:has(+ .fj-dashboard-actions-panel) { grid-column: 1 / -1 !important; }

/* Gráficos: si la librería no carga, no queda un hueco gigante. */
.fj-v11-shell .fj-v11-chart-missing { min-height: 0 !important; height: auto !important; }
.fj-v11-shell .fj-v11-chart-missing > canvas { display: none !important; }
.fj-v11-shell .fj-v11-chart-note {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--v11-surface-2); color: var(--v11-muted);
  font-size: 14px;
}

/* Ranking (móvil): el progreso va debajo del nombre, nunca en una columna implícita. */
@media (max-width: 760px) {
  .fj-v11-shell .fj-ranking-row .fj-ranking-row-main > * { grid-column: 1 / -1 !important; }
  .fj-v11-shell .fj-ranking-row .fj-ranking-person { min-width: 0; }
  .fj-v11-shell .fj-ranking-row .fj-ranking-person > div { min-width: 0; flex: 1 1 auto; }
}

/* Títulos especiales (copas, insignias de campeón): junto al nombre, no dentro del avatar. */
.fj-v11-shell .fj-special-badges.is-v11-moved {
  display: flex !important; flex-wrap: wrap !important; gap: 6px !important;
  margin: 6px 0 2px !important; position: static !important; transform: none !important;
}
.fj-v11-shell .fj-special-badges.is-v11-moved .fj-special-badge {
  width: auto !important; height: auto !important; max-width: 100% !important;
  display: inline-flex !important; align-items: center !important; gap: 5px !important;
  padding: 3px 10px 3px 4px !important; border-radius: 999px !important;
  font-size: 12px !important; font-weight: 600 !important; line-height: 1.2 !important;
}
.fj-v11-shell .fj-special-badges.is-v11-moved .fj-special-badge em { font-style: normal !important; white-space: normal !important; }

/* Tarjetas de cuadrícula: el contenido arriba y el botón al pie, sin estirar cajas. */
.fj-v11-shell .fj-v11-body :is(.fj-community-team-card, .fj-community-card, .fj-community-person-card) {
  display: flex !important; flex-direction: column !important; gap: 12px !important;
}
.fj-v11-shell .fj-v11-body :is(.fj-community-team-card, .fj-community-card, .fj-community-person-card) > * { flex: 0 0 auto !important; }
.fj-v11-shell .fj-v11-body :is(.fj-community-team-card, .fj-community-card, .fj-community-person-card) > :is(a.fj-btn, .fj-btn):last-child,
.fj-v11-shell .fj-v11-body :is(.fj-community-team-card, .fj-community-card, .fj-community-person-card) > :last-child:has(> .fj-btn) { margin-top: auto !important; }

/* Muro: barra de filtros y búsqueda que se adapta al teléfono. */
.fj-v11-shell .fj-wall641-toolbar { display: flex !important; flex-wrap: wrap !important; gap: 10px !important; }
.fj-v11-shell .fj-wall641-toolbar { flex-direction: row !important; }
.fj-v11-shell .fj-wall641-search { flex: 1 1 260px !important; width: auto !important; max-width: 100% !important; height: auto !important; align-self: center !important; }
.fj-v11-shell .fj-wall641-search input { width: 100% !important; }

/* Contenedores de mensajes vacíos (AJAX): invisibles hasta que tengan texto. */
.fj-v11-shell .fj-v11-body :is([class*="-msg"], [class*="notice"], [class*="feedback"], [class*="-alert"], [data-fj-ajax-msg]):empty { display: none !important; }

/* Plantilla de la Dinastía: métricas en columnas que se reparten solas. */
.fj-v11-shell .fj-dynasty-member-metrics { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)) !important; }
.fj-v11-shell .fj-dynasty-member-metrics > * { grid-column: auto !important; }
.fj-v11-shell .fj-dynasty-profile-link { font-size: 13px !important; font-weight: 700 !important; letter-spacing: .02em !important; }

/* Formularios: el aviso «Falta 1 dato» y el botón nunca quedan pegados. */
.fj-v11-shell .fj-xp-form-status { margin: 0 10px 10px 0 !important; vertical-align: middle; }
.fj-v11-shell .fj-xp-form-status + :is(button, input[type="submit"], .fj-btn) { margin-left: 0 !important; }
.fj-v11-shell .fj-v11-body form :is([class*="-actions"], .fj-form-actions) { display: flex !important; flex-wrap: wrap !important; align-items: center !important; gap: 10px !important; }
.fj-v11-shell .fj-v11-body form :is([class*="-actions"], .fj-form-actions) > .fj-xp-form-status { margin: 0 !important; }

/* Seguimiento de la Dinastía: cada integrante en una tarjeta compacta y sus
 * misiones como fichas cortas (código + nombre). */
.fj-v11-shell .fj-team-active-list.is-compact {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 12px !important;
}
.fj-v11-shell .fj-team-active-list.is-compact .fj-team-active-member { padding: 12px !important; border-radius: 14px !important; }
.fj-v11-shell .fj-team-active-list.is-compact .fj-team-active-tasks { display: flex !important; flex-wrap: wrap !important; gap: 6px !important; }
.fj-v11-shell .fj-team-active-list.is-compact .fj-team-active-member a {
  display: inline-flex !important; align-items: center !important; gap: 6px !important;
  width: auto !important; min-height: 36px !important; padding: 4px 10px 4px 4px !important;
  border-radius: 999px !important;
}
.fj-v11-shell .fj-team-active-list.is-compact .fj-team-active-member a small { display: none !important; }
.fj-v11-shell .fj-team-active-list.is-compact .fj-team-active-member a strong { font-size: 13px !important; white-space: nowrap; }
.fj-v11-shell .fj-team-active-list.is-compact .fj-team-active-member a > span { padding: 3px 7px !important; border-radius: 999px !important; font-size: 11.5px !important; }

/* Plan de Adelanto: filtros que se envuelven y resumen en 2 columnas en móvil. */
.fj-v11-shell .fj-adv-task-toolbar { display: flex !important; flex-wrap: wrap !important; align-items: center !important; gap: 8px !important; overflow: visible !important; }
.fj-v11-shell .fj-adv-task-toolbar > span { font-size: 14px !important; font-weight: 600 !important; color: var(--v11-muted) !important; margin-right: 2px; }
.fj-v11-shell .fj-adv-task-toolbar-wrap { display: grid !important; gap: 12px !important; }
.fj-v11-shell .fj-adv-summary { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important; gap: 10px !important; }
.fj-v11-shell .fj-adv-summary > div { min-width: 0 !important; padding: 12px !important; border-radius: 12px !important; background: var(--v11-surface-2) !important; border: 0 !important; }
@media (max-width: 720px) {
  .fj-v11-shell .fj-adv-summary { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .fj-v11-shell .fj-adv-summary > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  /* Métricas genéricas de 1 columna en móvil → 2 columnas. */
  .fj-v11-shell .fj-v11-body :is([class$="-stats"], [class*="-stats "], [class$="-statgrid"], .fj-sp649-pulse, .fj-community-overview, .fj-bank-wallet-grid, .fj-staff646-stats, .fj-app652-stats, .fj-att656-stats, .fj-rw657-stats, .fj-tm658-statgrid, .fj-sys659-statgrid, .fj-market-summary-grid, .fj-desafio-hero-stats, .fj-team-hub-stats) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* Desafío (móvil): las pestañas no se quedan pegadas tapando el contenido. */
@media (max-width: 960px) {
  .fj-v11-shell .fj-desafio-tabs { position: static !important; }
}
.fj-v11-shell .fj-desafio-panel { padding: clamp(14px, 2vw, 22px) !important; }

/* Etiquetas de héroes (Bóveda, Dinastía, Mercado): pastillas en fila. */
.fj-v11-shell .fj-v11-body :is(.fj-treasury-hero-tags, [class*="hero-tags"], [class*="-hero-meta"], .fj-dynasty-meta) {
  display: flex !important; flex-wrap: wrap !important; align-items: center !important; justify-content: flex-start !important; gap: 6px !important;
}
.fj-v11-shell .fj-v11-body :is(.fj-treasury-hero-tags, [class*="hero-tags"]) > span {
  display: inline-flex !important; align-items: center !important;
  min-height: 30px !important; padding: 0 12px !important;
  border: 1px solid var(--v11-line) !important; border-radius: 999px !important;
  background: var(--v11-surface) !important; color: var(--v11-ink-2) !important;
  font-size: 13px !important; font-weight: 600 !important;
}

/* Muro: compositor ordenado (sugerencias arriba, contador + estado + botón abajo). */
.fj-v11-shell .fj-wall641-compose-footer { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 12px !important; margin-top: 10px !important; }
.fj-v11-shell .fj-wall641-prompts { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; }
.fj-v11-shell .fj-wall641-prompts > button {
  min-height: 40px !important; padding: 0 14px !important; border-radius: 999px !important;
  border: 1px solid var(--v11-line-strong) !important; background: var(--v11-surface) !important; color: var(--v11-ink-2) !important;
  box-shadow: none !important; font-size: 14px !important; font-weight: 600 !important; white-space: nowrap !important;
}
.fj-v11-shell .fj-wall641-compose-footer > div:last-child { display: flex !important; flex-wrap: wrap !important; align-items: center !important; justify-content: flex-end !important; gap: 10px !important; }
.fj-v11-shell .fj-wall641-compose-footer > div:last-child > #fj-wall641-count { margin-right: auto !important; font-size: 13px !important; color: var(--v11-muted) !important; white-space: nowrap !important; }
.fj-v11-shell .fj-wall641-compose-footer .fj-xp-form-status { margin: 0 !important; }
@media (max-width: 520px) {
  .fj-v11-shell .fj-wall641-compose-footer > div:last-child > .fj-btn { flex: 1 1 100% !important; }
}
/* Muro: la barra de herramientas no reserva altura vacía. */
.fj-v11-shell .fj-wall641-toolbar { min-height: 0 !important; height: auto !important; align-items: center !important; padding: 12px !important; }
.fj-v11-shell .fj-wall641-toolbar > * { min-height: 0 !important; }

/* Directorio de Dinastas/Dinastías: métricas sin palabras partidas y buscador amplio. */
.fj-v11-shell .fj-community-person-metrics,
.fj-v11-shell .fj-community-team-metrics { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
.fj-v11-shell .fj-community-person-metrics > :nth-child(3):last-child,
.fj-v11-shell .fj-community-team-metrics > :nth-child(3):last-child { grid-column: 1 / -1 !important; }
@media (min-width: 1100px) {
  .fj-v11-shell .fj-community-person-metrics,
  .fj-v11-shell .fj-community-team-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .fj-v11-shell .fj-community-person-metrics > :nth-child(3):last-child,
  .fj-v11-shell .fj-community-team-metrics > :nth-child(3):last-child { grid-column: auto !important; }
}
.fj-v11-shell .fj-community-tools { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important; gap: 12px !important; align-items: end !important; }
.fj-v11-shell .fj-community-search { grid-column: 1 / -1 !important; position: relative !important; width: 100% !important; }
.fj-v11-shell .fj-community-search input { width: 100% !important; padding-left: 44px !important; }
.fj-v11-shell .fj-community-tools select { width: 100% !important; }

/* En cuadrículas de 2 columnas (móvil), el último elemento impar ocupa el ancho completo. */
@media (max-width: 720px) {
  .fj-v11-shell .fj-v11-body :is([class$="-stats"], [class*="-stats "], [class$="-statgrid"], .fj-sp649-pulse, .fj-community-overview, .fj-bank-wallet-grid, .fj-market-summary-grid, .fj-team-hub-stats, .fj-community-person-metrics, .fj-community-team-metrics) > :last-child:nth-child(odd) { grid-column: 1 / -1 !important; }
}

/* Ranking (móvil): podio con avatar en su columna, sin tapar el nombre. */
@media (max-width: 760px) {
  .fj-v11-shell .fj-ranking-podium-card { grid-template-columns: auto 60px minmax(0, 1fr) !important; column-gap: 12px !important; }
  .fj-v11-shell .fj-ranking-podium-avatar { width: 56px !important; height: 56px !important; }
  .fj-v11-shell .fj-ranking-podium-avatar :is(img, .fj-avatar, .fj-team-icon, span) { max-width: 56px !important; max-height: 56px !important; }
}
/* Ranking: las opciones de «¿Qué quieres comparar?» se apilan en lugar de cortarse. */
.fj-v11-shell .fj-ranking-mode-scroll { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important; gap: 10px !important; overflow: visible !important; }
.fj-v11-shell .fj-ranking-mode-scroll > * { min-width: 0 !important; width: auto !important; }

/* Pestañas con icono + título + subtítulo: apiladas, el título nunca se parte. */
.fj-v11-shell .fj-v11-body :is(.fj-store636-tab, .fj-market-tab, .fj-desafio-tabs > button) {
  display: flex !important; flex-direction: column !important; align-items: center !important; gap: 2px !important;
  padding: 10px 12px !important;
}
.fj-v11-shell .fj-v11-body :is(.fj-store636-tab, .fj-market-tab, .fj-desafio-tabs > button) strong { white-space: nowrap !important; font-size: 15px !important; }
.fj-v11-shell .fj-v11-body :is(.fj-store636-tab, .fj-market-tab, .fj-desafio-tabs > button) small { white-space: normal !important; font-weight: 500 !important; }
@media (max-width: 520px) {
  .fj-v11-shell .fj-v11-body :is(.fj-store636-tabs, .fj-desafio-tabs, .fj-market-tabs) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* Barras de herramientas (buscar + filtros + ordenar): una columna en móvil. */
@media (max-width: 720px) {
  .fj-v11-shell .fj-v11-body [class*="-toolbar"]:not(.fj-adv-task-toolbar):not(.fj-wall641-toolbar) { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 10px !important; }
  .fj-v11-shell .fj-v11-body [class*="-toolbar"] > * { min-width: 0 !important; width: 100% !important; }
}
/* Buscadores con icono: el texto no queda debajo de la lupa. */
.fj-v11-shell .fj-v11-body [class*="-search"]:has(> .dashicons) { position: relative !important; }
.fj-v11-shell .fj-v11-body [class*="-search"] > .dashicons { position: absolute !important; left: 14px !important; top: 50% !important; transform: translateY(-50%) !important; pointer-events: none; z-index: 1; }
.fj-v11-shell .fj-v11-body [class*="-search"] > .dashicons ~ input { padding-left: 42px !important; width: 100% !important; }

/* Encabezados de tarjeta con identidad + acción: la identidad nunca se aplasta. */
.fj-v11-shell .fj-v11-body :is(.fj-tm658-card-head, .fj-community-person-head, .fj-sp651-comment-head) { display: flex !important; flex-wrap: wrap !important; align-items: center !important; gap: 10px !important; }
.fj-v11-shell .fj-v11-body .fj-tm658-team-id { display: flex !important; align-items: center !important; gap: 12px !important; flex: 1 1 200px !important; min-width: 0 !important; }
.fj-v11-shell .fj-v11-body .fj-community-person-id { display: flex !important; flex-direction: column !important; align-items: flex-start !important; gap: 2px !important; flex: 1 1 140px !important; min-width: 0 !important; }
.fj-v11-shell .fj-v11-body .fj-tm658-team-id > div { min-width: 0 !important; flex: 1 1 auto !important; }
.fj-v11-shell .fj-v11-body .fj-sp651-comment-head > * { flex: 0 1 auto !important; min-width: 0 !important; white-space: normal !important; }

/* Foco «AHORA»: espacio superior para la etiqueta flotante. */
.fj-v11-shell .fj-xp-focus-zone { padding-top: max(26px, 1.6em) !important; }
.fj-v11-shell .fj-v11-body :is(.fj-tm658-team-id, .fj-community-team-head) > div:not([class*="icon"]):not([class*="avatar"]):not(.fj-community-level) {
  display: flex !important; flex-direction: column !important; align-items: flex-start !important; gap: 2px !important;
}
.fj-v11-shell .fj-v11-body :is(.fj-community-person-id, .fj-community-team-head) h3 { white-space: normal !important; word-break: normal !important; overflow-wrap: break-word !important; }

/* Formularios cortos (responder, seguimiento): campo arriba, aviso y botón abajo. */
.fj-v11-shell .fj-sp651-mini-form { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 8px !important; }
.fj-v11-shell .fj-sp651-mini-form > :is(div, .fj-xp-form-status) { display: flex !important; flex-wrap: wrap !important; align-items: center !important; gap: 8px !important; width: auto !important; }
.fj-v11-shell .fj-sp651-acks, .fj-v11-shell .fj-reactions { display: flex !important; flex-wrap: wrap !important; gap: 6px !important; }

/* Campos: nunca más anchos que su contenedor. */
.fj-v11-shell .fj-v11-body :is(input, select, textarea) { max-width: 100% !important; box-sizing: border-box !important; }

/* Dinastías: fortaleza y área a crecer lado a lado. */
.fj-v11-shell .fj-community-team-focus { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
/* Buscadores: un solo borde (el del campo), no dos cajas anidadas. */
.fj-v11-shell .fj-v11-body [class*="-search"]:has(> input):not(input) { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; min-height: 0 !important; }
.fj-v11-shell .fj-v11-body [class*="-search"] > input { min-height: 48px !important; }
.fj-v11-shell .fj-v11-body [class*="-search"]:has(> input) { position: relative !important; }
.fj-v11-shell .fj-v11-body [class*="-search"] > .fj-v11-search-icon { position: absolute !important; left: 14px !important; top: 50% !important; transform: translateY(-50%) !important; z-index: 1; pointer-events: none; color: var(--v11-muted) !important; }
.fj-v11-shell .fj-v11-body [class*="-search"] > .fj-v11-search-icon ~ input { padding-left: 42px !important; }
