/*
 * Proyecto Isaías — Teen UI 11.0.0 «Poka-Yoke»
 * -------------------------------------------------------------------------
 * Capa canónica de navegación y de seguridad de uso para adolescentes.
 * Se carga DESPUÉS de game-ui-v1000 y decision-ui-v1030.
 *
 * Principios:
 *  - Una sola navegación, siempre en el mismo lugar.
 *  - Cada zona tiene un color: lo ves en la barra, en las pestañas y en el título.
 *  - Objetivos táctiles de 48 px, texto base de 16 px, contraste AA.
 *  - Una acción principal por pantalla; lo destructivo nunca parece principal.
 */

/* ---------------------------------------------------------------------- */
/* 1. Tokens                                                               */
/* ---------------------------------------------------------------------- */
.fj-v11-shell {
  --v11-font: "Lexend", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --v11-canvas: 1180px;
  /* Ancho de las secciones: 90 % en escritorio, 98 % en tabletas y teléfonos. */
  --v11-width: 90%;
  --v11-gutter: 16px;
  --v11-topbar-h: 68px;
  --v11-dock-h: 72px;
  --v11-radius: 18px;
  --v11-radius-sm: 12px;
  --v11-bg: #f3f5fb;
  --v11-surface: #ffffff;
  --v11-surface-2: #f6f8fc;
  --v11-ink: #121a2f;
  --v11-ink-2: #34405a;
  --v11-muted: #56627b;
  --v11-line: #d8dfeb;
  --v11-line-strong: #b8c4d8;
  --v11-shadow: 0 1px 2px rgba(18, 26, 47, .06), 0 8px 24px rgba(18, 26, 47, .06);
  --v11-shadow-lg: 0 18px 50px rgba(18, 26, 47, .18);
  --v11-focus: #1d6fe8;
  --v11-danger: #c0283f;
  --v11-danger-soft: #fdecef;
  --v11-ok: #157a4f;
  --v11-ok-soft: #e3f6ec;
  --v11-warn: #8a5a00;
  --v11-warn-soft: #fff4d6;
  /* tono por defecto (índigo); cada zona lo sobrescribe */
  --tone: #5b3ee4;
  --tone-strong: #4528c9;
  --tone-ink: #3b22b0;
  --tone-soft: #eeeaff;
  --tone-line: #cfc4ff;
  color: var(--v11-ink);
  font-family: var(--v11-font) !important;
}

/* Tonos de zona: un color = un lugar. */
.fj-v11-shell .is-tone-indigo,  .fj-v11-shell.is-tone-indigo  { --tone: #5b3ee4; --tone-strong: #4528c9; --tone-ink: #3b22b0; --tone-soft: #eeeaff; --tone-line: #cfc4ff; }
.fj-v11-shell .is-tone-emerald, .fj-v11-shell.is-tone-emerald { --tone: #0e8a63; --tone-strong: #0a7352; --tone-ink: #075e43; --tone-soft: #e1f6ee; --tone-line: #a9e2cc; }
.fj-v11-shell .is-tone-amber,   .fj-v11-shell.is-tone-amber   { --tone: #c76a00; --tone-strong: #a85900; --tone-ink: #874700; --tone-soft: #fff1dc; --tone-line: #f6cf97; }
.fj-v11-shell .is-tone-sky,     .fj-v11-shell.is-tone-sky     { --tone: #1f6fd6; --tone-strong: #165cb6; --tone-ink: #124c97; --tone-soft: #e3effd; --tone-line: #b3d0f6; }
.fj-v11-shell .is-tone-rose,    .fj-v11-shell.is-tone-rose    { --tone: #c42f6a; --tone-strong: #a82358; --tone-ink: #8c1c49; --tone-soft: #fde7f0; --tone-line: #f3b5ce; }
.fj-v11-shell .is-tone-slate,   .fj-v11-shell.is-tone-slate   { --tone: #4b5874; --tone-strong: #3b465e; --tone-ink: #2f3a51; --tone-soft: #eaedf3; --tone-line: #c6cddb; }

html[data-fj-theme="night"] .fj-v11-shell {
  --v11-bg: #0b1222;
  --v11-surface: #141e33;
  --v11-surface-2: #1a2640;
  --v11-ink: #f4f7ff;
  --v11-ink-2: #d9e1f1;
  --v11-muted: #b3bfd6;
  --v11-line: #2c3a57;
  --v11-line-strong: #43537a;
  --v11-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .28);
  --v11-shadow-lg: 0 22px 60px rgba(0, 0, 0, .55);
  --v11-focus: #7db3ff;
  --v11-danger: #ff8a9b;
  --v11-danger-soft: #45202a;
  --v11-ok: #74e0ad;
  --v11-ok-soft: #133628;
  --v11-warn: #ffd27a;
  --v11-warn-soft: #3e3218;
}
html[data-fj-theme="night"] .fj-v11-shell .is-tone-indigo,  html[data-fj-theme="night"] .fj-v11-shell.is-tone-indigo  { --tone: #8c74ff; --tone-strong: #6f55f0; --tone-ink: #c9bdff; --tone-soft: #2a2350; --tone-line: #4b3f8a; }
html[data-fj-theme="night"] .fj-v11-shell .is-tone-emerald, html[data-fj-theme="night"] .fj-v11-shell.is-tone-emerald { --tone: #3fcf9c; --tone-strong: #1fa577; --tone-ink: #9df0cf; --tone-soft: #123a2f; --tone-line: #23664f; }
html[data-fj-theme="night"] .fj-v11-shell .is-tone-amber,   html[data-fj-theme="night"] .fj-v11-shell.is-tone-amber   { --tone: #ffad42; --tone-strong: #e58c17; --tone-ink: #ffd49a; --tone-soft: #3f2c12; --tone-line: #6e4c1c; }
html[data-fj-theme="night"] .fj-v11-shell .is-tone-sky,     html[data-fj-theme="night"] .fj-v11-shell.is-tone-sky     { --tone: #5aa2ff; --tone-strong: #2f80ec; --tone-ink: #b5d5ff; --tone-soft: #142e4f; --tone-line: #25507f; }
html[data-fj-theme="night"] .fj-v11-shell .is-tone-rose,    html[data-fj-theme="night"] .fj-v11-shell.is-tone-rose    { --tone: #ff6fa6; --tone-strong: #e64a87; --tone-ink: #ffc1d8; --tone-soft: #43192c; --tone-line: #7a2c4d; }
html[data-fj-theme="night"] .fj-v11-shell .is-tone-slate,   html[data-fj-theme="night"] .fj-v11-shell.is-tone-slate   { --tone: #9aa8c4; --tone-strong: #7b8aa8; --tone-ink: #d5ddec; --tone-soft: #232e45; --tone-line: #3c4a66; }

/* ---------------------------------------------------------------------- */
/* 2. Modo app: una sola navegación (oculta cabecera/pie/título del tema)  */
/* ---------------------------------------------------------------------- */
body.fj-v11-app-mode :where(
  .wp-site-blocks > header, .wp-site-blocks > footer,
  header.wp-block-template-part, footer.wp-block-template-part,
  #masthead, .site-header, #colophon, .site-footer,
  #main-header, #top-header, #main-footer, .et-l--header, .et-l--footer,
  #et-top-navigation, #et-secondary-menu
) { display: none !important; }
body.fj-v11-app-mode .wp-site-blocks > main > .wp-block-group:has(> .wp-block-post-title) { display: none !important; }
body.fj-v11-app-mode #page-container { padding-top: 0 !important; margin-top: 0 !important; }
body.fj-v11-app-mode :where(.wp-site-blocks, .wp-site-blocks > main, main.wp-block-group, .entry-content, .wp-block-post-content, #main-content, #content-area, .container) {
  max-width: none !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
body.fj-teen-ui-v1100 :where(.wp-block-post-title, .entry-title, .et_pb_title_container, .page-header) { display: none !important; }
body.fj-teen-ui-v1100 { background: var(--v11-bg, #f3f5fb) !important; }
html[data-fj-theme="night"] body.fj-teen-ui-v1100 { background: #0b1222 !important; }

/* ---------------------------------------------------------------------- */
/* 3. Contenedor                                                           */
/* ---------------------------------------------------------------------- */
.fj-app-shell.fj-v11-shell {
  display: block !important;
  min-height: 100vh;
  padding: 0 !important;
  margin: 0 !important;
  background: var(--v11-bg) !important;
  font-size: 16px;
  line-height: 1.55;
}
.fj-v11-shell .fj-v11-icon { width: 22px; height: 22px; flex: 0 0 auto; display: block; }
.fj-v11-shell .screen-reader-text {
  position: absolute !important; width: 1px !important; height: 1px !important;
  overflow: hidden !important; clip: rect(1px, 1px, 1px, 1px) !important; white-space: nowrap !important;
}
.fj-v11-shell .fj-app-main.fj-v11-main {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 0 48px !important;
  background: transparent !important;
}
.fj-v11-shell .fj-v11-canvas,
.fj-v11-shell .fj-v11-canvas.fj-system-fullwidth-host {
  width: var(--v11-width, 90%) !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding-top: 20px;
}
.fj-v11-shell .fj-v11-body.fj-system-fullwidth-host { width: 100% !important; }
.fj-v11-shell :where(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--v11-focus) !important;
  outline-offset: 3px !important;
  box-shadow: none !important;
}

/* ---------------------------------------------------------------------- */
/* 4. Barra superior                                                       */
/* ---------------------------------------------------------------------- */
.fj-v11-shell .fj-v11-topbar {
  position: sticky;
  top: 0;
  z-index: 900;
  background: color-mix(in srgb, var(--v11-surface) 94%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--v11-line);
}
.admin-bar .fj-v11-shell .fj-v11-topbar { top: 32px; }
@media (max-width: 782px) { .admin-bar .fj-v11-shell .fj-v11-topbar { top: 0; } }
.fj-v11-shell .fj-v11-topbar__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: var(--v11-width, 90%);
  min-height: var(--v11-topbar-h);
  margin: 0 auto;
}
.fj-v11-shell .fj-v11-brand {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  color: var(--v11-ink) !important;
  text-decoration: none !important;
}
.fj-v11-shell .fj-v11-brand__mark {
  width: 40px; height: 40px; flex: 0 0 40px;
  overflow: hidden; border-radius: 12px;
  background: #0f1830;
  box-shadow: 0 4px 12px rgba(18, 26, 47, .18);
}
.fj-v11-shell .fj-v11-brand__mark img { width: 100%; height: 100%; display: block; object-fit: cover; }
.fj-v11-shell .fj-v11-brand__mark.fj-logo-fit-contain img { object-fit: contain; }
.fj-v11-shell .fj-v11-brand__copy { display: grid; line-height: 1.1; }
.fj-v11-shell .fj-v11-brand__copy strong { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.fj-v11-shell .fj-v11-brand__copy small { font-size: 12px; color: var(--v11-muted); font-weight: 500; }

.fj-v11-shell .fj-v11-zones {
  display: flex;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}
.fj-v11-shell .fj-v11-zone {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  color: var(--v11-ink-2) !important;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.fj-v11-shell .fj-v11-zone .fj-v11-icon { color: var(--tone); }
.fj-v11-shell .fj-v11-zone:hover { background: var(--v11-surface-2); color: var(--v11-ink) !important; }
.fj-v11-shell .fj-v11-zone.is-active {
  background: var(--tone-soft);
  color: var(--tone-ink) !important;
}
.fj-v11-shell .fj-v11-zone.is-active::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: -11px;
  height: 3px; border-radius: 3px 3px 0 0;
  background: var(--tone);
}

.fj-v11-shell .fj-v11-topbar__end { display: flex; align-items: center; gap: 10px; }
.fj-v11-shell .fj-v11-hud {
  display: flex; gap: 6px; margin: 0 !important; padding: 0 !important; list-style: none !important;
}
.fj-v11-shell .fj-v11-hud li {
  display: inline-flex; align-items: center; gap: 5px;
  height: 36px; margin: 0 !important; padding: 0 10px;
  border: 1px solid var(--v11-line); border-radius: 999px;
  background: var(--v11-surface-2);
  font-size: 14px; color: var(--v11-ink);
}
.fj-v11-shell .fj-v11-hud li b { font-weight: 700; }
.fj-v11-shell .fj-v11-hud .fj-v11-icon { width: 17px; height: 17px; }
.fj-v11-shell .fj-v11-hud .is-level .fj-v11-icon { color: #c48a00; }
.fj-v11-shell .fj-v11-hud .is-talentos .fj-v11-icon { color: #1f6fd6; }
.fj-v11-shell .fj-v11-hud .is-coronas .fj-v11-icon { color: #c42f6a; }

/* Menú personal */
.fj-v11-shell .fj-v11-user { position: relative; }
.fj-v11-shell .fj-v11-user > summary { list-style: none; }
.fj-v11-shell .fj-v11-user > summary::-webkit-details-marker { display: none; }
.fj-v11-shell .fj-v11-user__trigger {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 4px 10px 4px 4px;
  border: 1px solid var(--v11-line); border-radius: 999px;
  background: var(--v11-surface); color: var(--v11-ink);
  cursor: pointer; font-size: 14px; font-weight: 600;
}
.fj-v11-shell .fj-v11-user__trigger:hover { border-color: var(--v11-line-strong); }
.fj-v11-shell .fj-v11-user__trigger > .fj-v11-icon { width: 18px; height: 18px; color: var(--v11-muted); transition: transform .15s ease; }
.fj-v11-shell .fj-v11-user[open] .fj-v11-user__trigger > .fj-v11-icon { transform: rotate(180deg); }
.fj-v11-shell .fj-v11-user__name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fj-v11-shell .fj-v11-user__avatar {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; flex: 0 0 38px;
  overflow: hidden; border-radius: 50%;
  background: var(--tone-soft);
}
.fj-v11-shell .fj-v11-user__avatar > *,
.fj-v11-shell .fj-v11-user__avatar img,
.fj-v11-shell .fj-v11-user__avatar .fj-identity-avatar {
  width: 100% !important; height: 100% !important; margin: 0 !important;
  border-radius: 50% !important; object-fit: cover; font-size: 13px !important;
}
.fj-v11-shell .fj-v11-user__avatar.is-lg { width: 48px; height: 48px; flex-basis: 48px; }
.fj-v11-shell .fj-v11-user__panel {
  position: absolute; right: 0; top: calc(100% + 10px);
  z-index: 950;
  width: min(320px, calc(100vw - 24px));
  padding: 10px;
  border: 1px solid var(--v11-line);
  border-radius: var(--v11-radius);
  background: var(--v11-surface);
  box-shadow: var(--v11-shadow-lg);
}
.fj-v11-shell .fj-v11-user__head { display: flex; align-items: center; gap: 12px; padding: 8px 8px 12px; }
.fj-v11-shell .fj-v11-user__head strong { display: block; font-size: 16px; line-height: 1.25; }
.fj-v11-shell .fj-v11-user__head small { display: block; font-size: 13px; color: var(--v11-muted); }
.fj-v11-shell .fj-v11-user__stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  margin: 0 0 8px !important; padding: 0 !important;
}
.fj-v11-shell .fj-v11-user__stats div {
  padding: 8px; border-radius: 12px; background: var(--v11-surface-2); text-align: center;
}
.fj-v11-shell .fj-v11-user__stats dt {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  margin: 0; font-size: 12px; color: var(--v11-muted); font-weight: 500;
}
.fj-v11-shell .fj-v11-user__stats dt .fj-v11-icon { width: 14px; height: 14px; }
.fj-v11-shell .fj-v11-user__stats dd { margin: 2px 0 0 !important; font-size: 17px; font-weight: 700; }
.fj-v11-shell .fj-v11-user__item {
  display: flex !important; align-items: center; gap: 12px;
  width: 100%; min-height: 48px !important;
  margin: 0 !important; padding: 0 12px !important;
  border: 0 !important; border-radius: 12px !important;
  background: transparent !important; box-shadow: none !important;
  color: var(--v11-ink) !important;
  font-size: 15px !important; font-weight: 500 !important;
  text-align: left; text-decoration: none !important;
  cursor: pointer; transform: none !important;
}
.fj-v11-shell .fj-v11-user__item:hover { background: var(--v11-surface-2) !important; filter: none !important; }
.fj-v11-shell .fj-v11-user__item > span { flex: 1; }
.fj-v11-shell .fj-v11-user__item.is-exit { color: var(--v11-danger) !important; }
.fj-v11-shell .fj-v11-user__season { margin: 4px 12px 4px !important; font-size: 12px !important; color: var(--v11-muted); }
.fj-v11-shell .fj-v11-switch {
  position: relative; width: 44px; height: 26px; flex: 0 0 44px;
  border-radius: 999px; background: var(--v11-line-strong);
  transition: background-color .15s ease;
}
.fj-v11-shell .fj-v11-switch i {
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .15s ease;
}
.fj-v11-shell [data-fj-v11-theme][aria-pressed="true"] .fj-v11-switch { background: var(--tone); }
.fj-v11-shell [data-fj-v11-theme][aria-pressed="true"] .fj-v11-switch i { transform: translateX(18px); }

/* ---------------------------------------------------------------------- */
/* 5. Pestañas de zona                                                     */
/* ---------------------------------------------------------------------- */
.fj-v11-shell .fj-v11-tabs { margin: 0 0 14px; }
.fj-v11-shell .fj-v11-tabs__track {
  display: flex; gap: 6px;
  width: max-content; max-width: 100%;
  padding: 5px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  border: 1px solid var(--v11-line);
  border-radius: 16px;
  background: var(--v11-surface);
  box-shadow: var(--v11-shadow);
}
.fj-v11-shell .fj-v11-tabs__track::-webkit-scrollbar { display: none; }
.fj-v11-shell .fj-v11-tab {
  display: inline-flex !important; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border-radius: 12px;
  color: var(--v11-ink-2) !important;
  font-size: 15px; font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  scroll-snap-align: center;
}
.fj-v11-shell .fj-v11-tab .fj-v11-icon { width: 20px; height: 20px; color: var(--tone); }
.fj-v11-shell .fj-v11-tab:hover { background: var(--v11-surface-2); color: var(--v11-ink) !important; }
.fj-v11-shell .fj-v11-tab.is-active { background: var(--tone-strong); color: #fff !important; box-shadow: 0 4px 12px color-mix(in srgb, var(--tone) 35%, transparent); }
.fj-v11-shell .fj-v11-tab.is-active .fj-v11-icon { color: #fff; }
html[data-fj-theme="night"] .fj-v11-shell .fj-v11-tab.is-active { color: #0b1222 !important; }
html[data-fj-theme="night"] .fj-v11-shell .fj-v11-tab.is-active .fj-v11-icon { color: #0b1222; }

/* ---------------------------------------------------------------------- */
/* 6. Encabezado de pantalla                                               */
/* ---------------------------------------------------------------------- */
.fj-v11-shell .fj-v11-head {
  position: relative;
  margin: 0 0 20px;
  padding: 16px 22px 20px;
  border: 1px solid var(--v11-line);
  border-radius: var(--v11-radius);
  background:
    linear-gradient(135deg, var(--tone-soft) 0%, transparent 46%),
    var(--v11-surface);
  box-shadow: var(--v11-shadow);
  overflow: hidden;
}
.fj-v11-shell .fj-v11-head::before {
  content: "";
  position: absolute; inset: 0 auto 0 0;
  width: 5px; background: var(--tone);
}
.fj-v11-shell .fj-v11-head__where {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  margin-bottom: 12px;
}
.fj-v11-shell .fj-v11-back {
  display: inline-flex !important; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 14px 0 10px;
  border: 1px solid var(--v11-line); border-radius: 999px;
  background: var(--v11-surface);
  color: var(--v11-ink) !important;
  font-size: 14px; font-weight: 600;
  text-decoration: none !important;
}
.fj-v11-shell .fj-v11-back .fj-v11-icon { width: 18px; height: 18px; }
.fj-v11-shell .fj-v11-back:hover { border-color: var(--tone); color: var(--tone-ink) !important; }
.fj-v11-shell .fj-v11-crumbs {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  margin: 0 !important; padding: 0 !important; list-style: none !important;
  font-size: 14px; color: var(--v11-muted);
}
.fj-v11-shell .fj-v11-crumbs li { margin: 0 !important; display: inline-flex; align-items: center; gap: 4px; font-size: 14px !important; }
.fj-v11-shell .fj-v11-crumbs li + li::before { content: "›"; color: var(--v11-line-strong); font-weight: 700; padding: 0 2px; }
.fj-v11-shell .fj-v11-crumbs a { color: var(--tone-ink) !important; font-weight: 600; text-decoration: none !important; }
.fj-v11-shell .fj-v11-crumbs a:hover { text-decoration: underline !important; }
.fj-v11-shell .fj-v11-crumbs [aria-current] { color: var(--v11-ink-2); font-weight: 600; }

.fj-v11-shell .fj-v11-head__main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}
.fj-v11-shell .fj-v11-head__icon {
  display: grid; place-items: center;
  width: 60px; height: 60px; border-radius: 18px;
  background: var(--tone-strong); color: #fff;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--tone) 35%, transparent);
}
.fj-v11-shell .fj-v11-head__icon .fj-v11-icon { width: 30px; height: 30px; }
html[data-fj-theme="night"] .fj-v11-shell .fj-v11-head__icon { color: #0b1222; }
.fj-v11-shell .fj-v11-head__title {
  margin: 0 0 4px !important;
  color: var(--v11-ink) !important;
  font-family: var(--v11-font) !important;
  font-size: clamp(26px, 3.2vw, 36px) !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  letter-spacing: -.02em !important;
}
.fj-v11-shell .fj-v11-head__lead {
  margin: 0 !important;
  max-width: 62ch;
  color: var(--v11-ink-2) !important;
  font-size: 17px !important;
  line-height: 1.45 !important;
}
.fj-v11-shell .fj-v11-head__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.fj-v11-shell .fj-v11-start,
.fj-v11-shell .fj-v11-help,
.fj-v11-shell .fj-v11-guide__ok {
  display: inline-flex !important; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px !important;
  padding: 0 20px !important;
  border-radius: 14px !important;
  font-family: var(--v11-font) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  cursor: pointer;
  transform: none !important;
  filter: none !important;
  white-space: nowrap;
}
.fj-v11-shell .fj-v11-start[hidden] { display: none !important; }
.fj-v11-shell .fj-v11-start,
.fj-v11-shell .fj-v11-guide__ok {
  border: 0 !important;
  background: var(--tone-strong) !important;
  color: #fff !important;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--tone) 32%, transparent) !important;
}
.fj-v11-shell .fj-v11-start:hover,
.fj-v11-shell .fj-v11-guide__ok:hover { background: var(--tone-ink) !important; }
html[data-fj-theme="night"] .fj-v11-shell :is(.fj-v11-start, .fj-v11-guide__ok) { color: #0b1222 !important; }
.fj-v11-shell .fj-v11-help {
  border: 1px solid var(--v11-line-strong) !important;
  background: var(--v11-surface) !important;
  color: var(--v11-ink) !important;
  box-shadow: none !important;
}
.fj-v11-shell .fj-v11-help:hover,
.fj-v11-shell .fj-v11-help[aria-expanded="true"] { border-color: var(--tone) !important; color: var(--tone-ink) !important; background: var(--tone-soft) !important; }
.fj-v11-shell .fj-v11-help .fj-v11-icon { color: var(--tone); }

.fj-v11-shell .fj-v11-guide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 14px;
  border: 2px dashed var(--tone-line);
  border-radius: 16px;
  background: var(--v11-surface);
}
.fj-v11-shell .fj-v11-guide[hidden] { display: none !important; }
.fj-v11-shell .fj-v11-guide__steps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
  margin: 0 !important; padding: 0 !important; list-style: none !important;
  counter-reset: none;
}
.fj-v11-shell .fj-v11-guide__steps li {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0 !important;
  font-size: 15px !important; line-height: 1.4 !important;
  color: var(--v11-ink);
}
.fj-v11-shell .fj-v11-guide__steps b {
  display: grid; place-items: center;
  width: 30px; height: 30px; flex: 0 0 30px;
  border-radius: 50%;
  background: var(--tone-soft); color: var(--tone-ink);
  font-size: 15px; font-weight: 700;
}

/* ---------------------------------------------------------------------- */
/* 7. Cuerpo y ritmo                                                       */
/* ---------------------------------------------------------------------- */
.fj-v11-shell .fj-v11-body {
  display: block;
  min-width: 0;
}
.fj-v11-shell .fj-v11-body > * + * { margin-top: 0; }
/* «hidden» siempre oculta: evita mensajes vacíos contradictorios. */
.fj-v11-shell .fj-v11-body [hidden]:not(.fj-xp-disclosure-body[data-fj-keep]) { display: none !important; }

/* Ancla de inicio («Empezar aquí»). */
.fj-v11-shell .fj-xp-focus-zone { scroll-margin-top: calc(var(--v11-topbar-h) + 24px); }
.fj-v11-shell .fj-v11-flash { animation: fjV11Flash 1.4s ease-out 1; }
@keyframes fjV11Flash {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tone) 55%, transparent); }
  100% { box-shadow: 0 0 0 18px transparent; }
}

/* ---------------------------------------------------------------------- */
/* 8. Barra inferior (teléfonos)                                           */
/* ---------------------------------------------------------------------- */
.fj-v11-shell .fj-v11-dock { display: none; }
.fj-v11-shell .fj-v11-totop {
  position: fixed; right: 16px; bottom: 20px; z-index: 880;
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--v11-line);
  background: var(--v11-surface); color: var(--v11-ink) !important;
  box-shadow: var(--v11-shadow-lg);
  text-decoration: none !important;
}
.fj-v11-shell .fj-v11-totop[hidden] { display: none !important; }

/* ---------------------------------------------------------------------- */
/* 9. Normalización poka-yoke del contenido                                */
/* ---------------------------------------------------------------------- */

/* Texto legible: nada esencial por debajo de 13 px. */
.fj-v11-shell .fj-v11-body :where(p, li, label, td, th, dd, dt) { font-size: max(15px, 1em); }
.fj-v11-shell .fj-v11-body :where(small) { font-size: max(13px, .85em); }
.fj-v11-shell .fj-v11-body :where(h1, h2, h3, h4, h5, h6, button, input, select, textarea, label, .fj-btn) { font-family: var(--v11-font) !important; }
.fj-v11-shell .fj-v11-body :where(h1, h2) { font-size: clamp(22px, 2.4vw, 28px) !important; line-height: 1.15 !important; letter-spacing: -.015em !important; }

/* Botones: 48 px, sin saltos raros, jerarquía clara. */
.fj-v11-shell .fj-v11-body :where(.fj-btn, button:not(.fj-v11-raw), input[type="submit"], input[type="button"]) {
  min-height: 48px !important;
  font-size: 15px !important;
  border-radius: 13px !important;
  touch-action: manipulation;
}
.fj-v11-shell .fj-v11-body :where(.fj-btn-sm) { min-height: 42px !important; font-size: 14px !important; }
.fj-v11-shell .fj-v11-body :where(.fj-btn, button, input[type="submit"]):hover { transform: none !important; }
.fj-v11-shell .fj-v11-body :where(.fj-btn, button, input[type="submit"]):active { transform: translateY(1px) !important; }

/* Jerarquía de botones con el color de la zona:
 *  - Principal (lleno): .fj-btn-ok / .fj-btn-primary / botón de envío.
 *  - Secundario (contorno): cualquier otro .fj-btn.
 *  - Peligro (contorno rojo): ver más abajo. */
.fj-v11-shell .fj-v11-body :is(.fj-btn-ok, .fj-btn-primary, .fj-btn-success, button[type="submit"].fj-btn, input[type="submit"]):not(.fj-btn-secondary):not(.fj-btn-ghost):not(.fj-btn-danger):not(.fj-xp-danger-action):not(.fj-v11-raw):not([role="tab"]) {
  border: 2px solid var(--tone-strong) !important;
  background: var(--tone-strong) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--tone) 26%, transparent) !important;
}
.fj-v11-shell .fj-v11-body :is(.fj-btn-ok, .fj-btn-primary, .fj-btn-success, button[type="submit"].fj-btn, input[type="submit"]):not(.fj-btn-secondary):not(.fj-btn-ghost):not(.fj-btn-danger):not(.fj-xp-danger-action):not(.fj-v11-raw):not([role="tab"]):hover {
  border-color: var(--tone-ink) !important;
  background: var(--tone-ink) !important;
}
.fj-v11-shell .fj-v11-body .fj-btn:not(.fj-btn-ok):not(.fj-btn-primary):not(.fj-btn-success):not([type="submit"]):not(.fj-btn-danger):not(.fj-xp-danger-action):not(.fj-v11-raw):not([role="tab"]),
.fj-v11-shell .fj-v11-body :is(.fj-btn-secondary, .fj-btn-ghost) {
  border: 2px solid var(--tone-line) !important;
  background: var(--v11-surface) !important;
  color: var(--tone-ink) !important;
  box-shadow: none !important;
}
.fj-v11-shell .fj-v11-body .fj-btn:not(.fj-btn-ok):not(.fj-btn-primary):not(.fj-btn-success):not([type="submit"]):not(.fj-btn-danger):not(.fj-xp-danger-action):not(.fj-v11-raw):not([role="tab"]):hover,
.fj-v11-shell .fj-v11-body :is(.fj-btn-secondary, .fj-btn-ghost):hover {
  border-color: var(--tone) !important;
  background: var(--tone-soft) !important;
}
html[data-fj-theme="night"] .fj-v11-shell .fj-v11-body :is(.fj-btn-ok, .fj-btn-primary, .fj-btn-success, button[type="submit"].fj-btn, input[type="submit"]):not(.fj-btn-secondary):not(.fj-btn-ghost):not(.fj-btn-danger):not(.fj-xp-danger-action):not(.fj-v11-raw):not([role="tab"]) {
  border-color: var(--tone) !important; background: var(--tone) !important; color: #0b1222 !important;
}

/* Lo destructivo nunca se parece al botón principal. */
.fj-v11-shell .fj-v11-body .fj-xp-danger-action:not(.fj-v11-keep-style) {
  border: 2px solid var(--v11-danger) !important;
  background: var(--v11-surface) !important;
  color: var(--v11-danger) !important;
  box-shadow: none !important;
}
.fj-v11-shell .fj-v11-body .fj-xp-danger-action:not(.fj-v11-keep-style):hover { background: var(--v11-danger-soft) !important; }

/* Botón ocupado (evita doble envío). */
.fj-v11-shell .is-v11-busy {
  position: relative;
  pointer-events: none !important;
  opacity: .78 !important;
  cursor: progress !important;
}
.fj-v11-shell .is-v11-busy::after {
  content: "";
  display: inline-block;
  width: 16px; height: 16px; margin-left: 8px;
  vertical-align: -3px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: fjV11Spin .7s linear infinite;
}
@keyframes fjV11Spin { to { transform: rotate(360deg); } }

/* Campos: 48 px y 16 px (evita el zoom automático en iPhone). */
.fj-v11-shell .fj-v11-body :where(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="hidden"]):not([type="range"]):not([type="color"]), select) {
  min-height: 48px !important;
  font-size: 16px !important;
  border-radius: 12px !important;
}
.fj-v11-shell .fj-v11-body textarea { font-size: 16px !important; border-radius: 12px !important; min-height: 110px; }
.fj-v11-shell .fj-v11-body :where(input[type="checkbox"], input[type="radio"]) { width: 22px !important; height: 22px !important; accent-color: var(--tone); }
.fj-v11-shell .fj-v11-body :where(input, select, textarea):focus { border-color: var(--v11-focus) !important; }

/* Marcas de campo obligatorio (decision-ui) más claras. */
.fj-v11-shell .fj-xp-required-mark {
  margin-left: 6px !important;
  padding: 2px 8px !important;
  border-radius: 999px !important;
  background: var(--v11-warn-soft) !important;
  color: var(--v11-warn) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.fj-v11-shell .fj-xp-field-error :where(input, select, textarea) { border: 2px solid var(--v11-danger) !important; background: var(--v11-danger-soft) !important; }
.fj-v11-shell .fj-xp-form-status {
  display: inline-flex !important; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px !important;
  border-radius: 12px !important;
  background: var(--v11-warn-soft) !important; color: var(--v11-warn) !important;
  font-size: 14px !important;
}
.fj-v11-shell .fj-xp-form-status.is-ready { background: var(--v11-ok-soft) !important; color: var(--v11-ok) !important; }
.fj-v11-shell .fj-xp-form-status strong { color: inherit !important; font-size: 14px !important; }
.fj-v11-shell .fj-xp-form-status > span {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: currentColor; color: inherit;
}
.fj-v11-shell .fj-xp-form-status > span { color: var(--v11-surface) !important; background: var(--v11-warn) !important; font-size: 13px; font-weight: 700; }
.fj-v11-shell .fj-xp-form-status.is-ready > span { background: var(--v11-ok) !important; }

/* Etiqueta «AHORA»: lo más importante se ve primero. */
.fj-v11-shell .fj-xp-zone-label {
  display: inline-flex !important; align-items: center; gap: 6px;
  min-height: 30px; padding: 0 12px !important;
  border-radius: 999px !important;
  background: var(--tone-strong) !important; color: #fff !important;
  font-size: 13px !important; font-weight: 700 !important; letter-spacing: .04em !important;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--tone) 30%, transparent) !important;
}
.fj-v11-shell .fj-xp-zone-label i { color: #fff !important; font-style: normal; }
html[data-fj-theme="night"] .fj-v11-shell .fj-xp-zone-label,
html[data-fj-theme="night"] .fj-v11-shell .fj-xp-zone-label i { color: #0b1222 !important; }
.fj-v11-shell .fj-xp-focus-zone {
  border-color: var(--tone-line) !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone) 12%, transparent), var(--v11-shadow) !important;
}
.fj-v11-shell .fj-xp-focus-zone::before { background: var(--tone) !important; }

/* Pestañas y selectores dentro de los módulos: la opción elegida SIEMPRE se lee. */
.fj-v11-shell .fj-v11-body :is(.fj-xp-choice-rail, [role="tablist"]) > :is(a, button, [role="tab"]) { min-height: 48px !important; }
.fj-v11-shell .fj-v11-body :is(.fj-xp-choice-rail, [role="tablist"]) :is(.is-active, .active, [aria-selected="true"], .nav-tab-active) {
  outline: 2px solid var(--tone) !important;
  outline-offset: -2px;
}
html:not([data-fj-theme="night"]) .fj-v11-shell .fj-v11-body :is(.fj-xp-choice-rail, [role="tablist"]) :is(.is-active, .active, [aria-selected="true"]) :is(small, span, em, i):not(.dashicons):not([class*="badge"]):not([class*="pill"]) {
  color: var(--v11-ink-2) !important;
  opacity: 1 !important;
}

/* Estados vacíos: tranquilos y explícitos. */
.fj-v11-shell .fj-xp-empty-state {
  border: 2px dashed var(--v11-line-strong) !important;
  background: var(--v11-surface-2) !important;
  box-shadow: none !important;
}

/* Bloqueado: se ve bloqueado y explica por qué (title → tooltip). */
.fj-v11-shell .fj-v11-body :where(button, input, .fj-btn):disabled,
.fj-v11-shell .fj-v11-body .fj-btn.is-disabled {
  cursor: not-allowed !important;
  opacity: .55 !important;
  filter: grayscale(.4) !important;
  box-shadow: none !important;
}
.fj-v11-shell .fj-v11-why {
  display: block;
  margin-top: 6px !important;
  font-size: 13px !important;
  color: var(--v11-muted) !important;
}

/* Mensajes del sistema (éxito / error): visibles y con icono. */
.fj-v11-shell .fj-v11-body :where(.fj-msg, .fj-notice, .fj-alert) {
  border-radius: 14px !important;
  font-size: 15px !important;
}

/* Divulgación «Ver detalle» (decision-ui) como control grande. */
.fj-v11-shell .fj-xp-disclosure-toggle {
  min-height: 44px !important;
  padding: 0 16px !important;
  border: 1px solid var(--v11-line-strong) !important;
  border-radius: 999px !important;
  background: var(--v11-surface) !important;
  color: var(--v11-ink) !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}
.fj-v11-shell .fj-v11-body details > summary { min-height: 48px; cursor: pointer; }

/* Héroes de módulo con fondos partidos: un solo fondo continuo y legible. */
.fj-v11-shell .fj-store636-hero { background: linear-gradient(135deg, #3b1782 0%, #5b2bc9 100%) !important; }
.fj-v11-shell .fj-store636-hero-copy :is(h2, p, .fj-store636-kicker) { color: #fff !important; }
.fj-v11-shell .fj-store636-hero-copy .fj-store636-kicker { opacity: .85; }

/* La etiqueta «AHORA» flota sobre el borde: nunca ocupa una celda de la cuadrícula. */
.fj-v11-shell .fj-xp-focus-zone { position: relative !important; overflow: visible !important; margin-top: 22px !important; }
.fj-v11-shell .fj-xp-focus-zone > .fj-xp-zone-label {
  position: absolute !important;
  top: -15px !important; left: 18px !important;
  z-index: 3 !important;
  margin: 0 !important;
  grid-column: auto !important;
}

/* Centro Staff: «Lo que necesita atención» es un panel, no una cuadrícula de 3. */
.fj-v11-shell .fj-sp649-priorities { display: block !important; }
.fj-v11-shell .fj-sp649-priorities > :is(.fj-sp649-section-head, .fj-sp649-priority-list, .fj-sp649-good) { padding: 0 !important; border: 0 !important; background: transparent !important; }
.fj-v11-shell .fj-sp649-priorities > .fj-sp649-good { padding: 16px !important; border: 1px solid #a7f3d0 !important; background: #ecfdf5 !important; }

/* Encabezados de sección sin envoltorio: el antetítulo, el título y el texto
 * se apilan (antes quedaban en columnas estrechas y el texto se partía). */
.fj-v11-shell .fj-v11-body :is([class*="-section-head"], .fj-section-head) { flex-wrap: wrap !important; }
.fj-v11-shell .fj-v11-body :is([class*="-section-head"], .fj-section-head) > :is(span, small, em):first-child:not(:only-child),
.fj-v11-shell .fj-v11-body :is([class*="-section-head"], .fj-section-head) > :is(h2, h3, h4) + :is(p, small, span) { flex: 1 0 100% !important; }
.fj-v11-shell .fj-v11-body :is([class*="-section-head"], .fj-section-head) > :is(h2, h3, h4) { flex: 1 1 auto; min-width: 0; }

/* Ranking: la fila tiene 5 piezas; la cuadrícula también. */
.fj-v11-shell .fj-ranking-row { grid-template-columns: 56px minmax(0, 1.5fr) auto auto auto !important; position: relative; }
@media (max-width: 760px) {
  .fj-v11-shell .fj-ranking-row { grid-template-columns: 40px minmax(0, 1fr) auto !important; row-gap: 10px !important; }
  .fj-v11-shell .fj-ranking-row > .fj-ranking-row-rank { grid-column: 1; grid-row: 1 / span 3; align-self: start; }
  .fj-v11-shell .fj-ranking-row > .fj-ranking-row-main { grid-column: 2 / -1; grid-row: 1; display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 8px; }
  .fj-v11-shell .fj-ranking-row > .fj-ranking-row-result { grid-column: 2; grid-row: 2; }
  .fj-v11-shell .fj-ranking-row > .fj-btn { grid-column: 3; grid-row: 2; align-self: center; }
  .fj-v11-shell .fj-ranking-row > .fj-ranking-row-meta { grid-column: 2 / -1; grid-row: 3; display: flex !important; gap: 8px; }
  .fj-v11-shell .fj-ranking-row .fj-ranking-person strong { white-space: normal !important; }
}

/* Tienda: el encabezado del panel respira y no queda bajo la etiqueta «AHORA». */
.fj-v11-shell .fj-store636-section-head { padding: 26px 18px 16px !important; }
.fj-v11-shell .fj-xp-focus-zone > .fj-xp-zone-label + * { margin-top: 8px; }

/* Plantilla de la Dinastía: el avatar nunca invade el nombre. */
.fj-v11-shell .fj-dynasty-avatar-stage { grid-template-columns: 1fr !important; overflow: hidden; }

/* Elementos «pegajosos» de los módulos: debajo de la barra superior y
 * encima de la barra inferior, nunca tapados. */
.fj-v11-shell :is(.fj-store636-tabs, .fj-desafio-tabs, .fj-intake653-toolbar, .fj-eq655-form-rail, .fj-wall641-sidebar, .fj-apply-side) {
  top: calc(var(--v11-topbar-h) + 10px) !important;
}
.admin-bar .fj-v11-shell :is(.fj-store636-tabs, .fj-desafio-tabs, .fj-intake653-toolbar, .fj-eq655-form-rail, .fj-wall641-sidebar, .fj-apply-side) {
  top: calc(var(--v11-topbar-h) + 42px) !important;
}
@media (max-width: 960px) {
  .fj-v11-shell :is(.fj-sys659-savebar, .fj-att-savebar) { bottom: calc(var(--v11-dock-h) + 10px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* ---------------------------------------------------------------------- */
/* 10. Identidad del Dinasta: una sola vez, sin repetir                    */
/* ---------------------------------------------------------------------- */
/* En Mi ficha la explicación ya está en el encabezado. */
.fj-v11-shell .fj-dinasta-hero .fj-dinasta-hero__copy > p { display: none !important; }
.fj-v11-shell .fj-dinasta-hero .fj-dinasta-hero__eyebrow { display: none !important; }
.fj-v11-shell .fj-dinasta-hero__copy h2 { font-size: clamp(24px, 2.6vw, 30px) !important; margin: 0 0 6px !important; }

/* En el resto de pantallas: tira compacta (avatar, nombre, recursos). */
.fj-v11-shell:not(.fj-v11-screen-ficha) .fj-dinasta-hero .fj-dinasta-hero__badges,
.fj-v11-shell:not(.fj-v11-screen-ficha) .fj-dinasta-hero .fj-dinasta-hero__summary > span:nth-child(2) { display: none !important; }
.fj-v11-shell:not(.fj-v11-screen-ficha) .fj-dinasta-hero .fj-dinasta-hero__top { padding-top: 16px !important; padding-bottom: 14px !important; }
.fj-v11-shell:not(.fj-v11-screen-ficha) .fj-dinasta-hero .fj-dinasta-hero__avatar :is(img, .fj-avatar, span) { max-width: 56px; max-height: 56px; }
.fj-v11-shell:not(.fj-v11-screen-ficha) .fj-dinasta-hero .fj-dinasta-metric { padding-top: 12px !important; padding-bottom: 12px !important; }
.fj-v11-shell:not(.fj-v11-screen-ficha) .fj-dinasta-hero__copy h2 { font-size: 22px !important; }

/* ---------------------------------------------------------------------- */
/* 11. Responsive                                                          */
/* ---------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .fj-v11-shell { --v11-width: 98%; }
}
@media (max-width: 1280px) {
  .fj-v11-shell .fj-v11-hud { display: none; }
}
@media (max-width: 960px) {
  .fj-v11-shell { --v11-topbar-h: 60px; }
  .fj-v11-shell .fj-v11-zones { display: none; }
  .fj-v11-shell .fj-v11-topbar__inner { grid-template-columns: minmax(0, 1fr) auto; }
  .fj-v11-shell .fj-app-main.fj-v11-main { padding-bottom: calc(var(--v11-dock-h) + 32px + env(safe-area-inset-bottom, 0px)) !important; }

  .fj-v11-shell .fj-v11-dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
    display: grid;
    grid-template-columns: repeat(var(--fj-v11-dock-count, 5), minmax(0, 1fr));
    height: calc(var(--v11-dock-h) + env(safe-area-inset-bottom, 0px));
    padding: 6px 6px env(safe-area-inset-bottom, 0px);
    border-top: 1px solid var(--v11-line);
    background: color-mix(in srgb, var(--v11-surface) 96%, transparent);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 -6px 20px rgba(18, 26, 47, .08);
  }
  .fj-v11-shell .fj-v11-dock__item {
    display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-width: 0; height: 60px;
    color: var(--v11-muted) !important;
    text-decoration: none !important;
  }
  .fj-v11-shell .fj-v11-dock__pill {
    display: grid; place-items: center;
    width: 56px; height: 32px; border-radius: 999px;
    transition: background-color .15s ease;
  }
  .fj-v11-shell .fj-v11-dock__label {
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 12px; font-weight: 600; line-height: 1.1;
  }
  .fj-v11-shell .fj-v11-dock__item.is-active { color: var(--tone-ink) !important; }
  .fj-v11-shell .fj-v11-dock__item.is-active .fj-v11-dock__pill { background: var(--tone-soft); color: var(--tone-ink); }
  .fj-v11-shell .fj-v11-dock__item.is-active .fj-v11-dock__label { font-weight: 700; }
  .fj-v11-shell .fj-v11-totop { bottom: calc(var(--v11-dock-h) + 16px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 720px) {
  .fj-v11-shell .fj-v11-canvas { padding-top: 14px; }
  .fj-v11-shell .fj-v11-user__name,
  .fj-v11-shell .fj-v11-user__trigger > .fj-v11-icon { display: none; }
  .fj-v11-shell .fj-v11-user__trigger { padding: 4px; }
  .fj-v11-shell .fj-v11-head { padding: 14px 16px 16px 18px; }
  .fj-v11-shell .fj-v11-head__main { grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; }
  .fj-v11-shell .fj-v11-head__icon { width: 48px; height: 48px; border-radius: 14px; align-self: start; }
  .fj-v11-shell .fj-v11-head__icon .fj-v11-icon { width: 24px; height: 24px; }
  .fj-v11-shell .fj-v11-head__lead { font-size: 16px !important; }
  .fj-v11-shell .fj-v11-head__actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; justify-content: stretch; }
  .fj-v11-shell .fj-v11-head__actions:has(.fj-v11-start[hidden]) { grid-template-columns: 1fr; }
  .fj-v11-shell .fj-v11-help span { display: none; }
  .fj-v11-shell .fj-v11-help { width: 50px; padding: 0 !important; }
  .fj-v11-shell .fj-v11-head__actions:has(.fj-v11-start[hidden]) .fj-v11-help { width: auto; padding: 0 18px !important; justify-self: start; }
  .fj-v11-shell .fj-v11-head__actions:has(.fj-v11-start[hidden]) .fj-v11-help span { display: inline; }
  .fj-v11-shell .fj-v11-start { width: 100%; }
  .fj-v11-shell .fj-v11-guide { grid-template-columns: 1fr; }
  .fj-v11-shell .fj-v11-guide__steps { grid-template-columns: 1fr; }
  .fj-v11-shell .fj-v11-guide__ok { width: 100%; }
  .fj-v11-shell .fj-v11-back span { max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fj-v11-shell .fj-v11-tabs__track { width: 100%; box-shadow: none; }
}
@media (max-width: 380px) {
  .fj-v11-shell { --v11-gutter: 12px; }
  .fj-v11-shell .fj-v11-brand__copy small { display: none; }
  .fj-v11-shell .fj-v11-dock__pill { width: 48px; }
}

/* ---------------------------------------------------------------------- */
/* 12. Diálogo de confirmación y avisos                                    */
/* ---------------------------------------------------------------------- */
.fj-v11-dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: #fff;
  color: #121a2f;
  box-shadow: 0 30px 80px rgba(10, 16, 32, .35);
  font-family: "Lexend", Inter, ui-sans-serif, system-ui, sans-serif;
}
.fj-v11-dialog::backdrop { background: rgba(10, 16, 32, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.fj-v11-dialog__body { padding: 24px 24px 8px; text-align: center; }
.fj-v11-dialog__icon {
  display: grid; place-items: center;
  width: 60px; height: 60px; margin: 0 auto 12px;
  border-radius: 50%;
  background: #fff4d6; color: #8a5a00;
}
.fj-v11-dialog.is-danger .fj-v11-dialog__icon { background: #fdecef; color: #c0283f; }
.fj-v11-dialog.is-spend .fj-v11-dialog__icon { background: #e3effd; color: #1f6fd6; }
.fj-v11-dialog__icon svg { width: 30px; height: 30px; }
.fj-v11-dialog h2 { margin: 0 0 8px !important; font-size: 22px !important; line-height: 1.2 !important; color: #121a2f !important; font-family: inherit !important; }
.fj-v11-dialog p { margin: 0 !important; font-size: 16px !important; line-height: 1.5 !important; color: #34405a !important; white-space: pre-line; }
.fj-v11-dialog__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 20px 24px 24px; }
.fj-v11-dialog__actions button {
  min-height: 52px !important; border-radius: 14px !important;
  font: 600 16px/1 "Lexend", Inter, system-ui, sans-serif !important;
  cursor: pointer; transform: none !important; filter: none !important;
}
.fj-v11-dialog__cancel { border: 1px solid #b8c4d8 !important; background: #fff !important; color: #121a2f !important; box-shadow: none !important; }
.fj-v11-dialog__ok { border: 0 !important; background: #5b3ee4 !important; color: #fff !important; box-shadow: none !important; }
.fj-v11-dialog.is-danger .fj-v11-dialog__ok { background: #c0283f !important; }
.fj-v11-dialog.is-spend .fj-v11-dialog__ok { background: #1f6fd6 !important; }
.fj-v11-dialog button:focus-visible { outline: 3px solid #1d6fe8 !important; outline-offset: 3px !important; }
html[data-fj-theme="night"] .fj-v11-dialog { background: #141e33; color: #f4f7ff; }
html[data-fj-theme="night"] .fj-v11-dialog h2 { color: #f4f7ff !important; }
html[data-fj-theme="night"] .fj-v11-dialog p { color: #d9e1f1 !important; }
html[data-fj-theme="night"] .fj-v11-dialog__cancel { background: #1a2640 !important; color: #f4f7ff !important; border-color: #43537a !important; }
@media (max-width: 420px) { .fj-v11-dialog__actions { grid-template-columns: 1fr; } .fj-v11-dialog__ok { order: -1; } }

.fj-v11-toast {
  position: fixed; left: 50%; top: 84px; z-index: 99999;
  display: flex; align-items: center; gap: 10px;
  max-width: min(520px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 14px;
  background: #121a2f; color: #fff;
  box-shadow: 0 16px 40px rgba(10, 16, 32, .3);
  font: 500 15px/1.4 "Lexend", Inter, system-ui, sans-serif;
  transform: translate(-50%, -12px);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.fj-v11-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.fj-v11-toast svg { width: 22px; height: 22px; flex: 0 0 22px; }

@media (prefers-reduced-motion: reduce) {
  .fj-v11-shell *, .fj-v11-dialog, .fj-v11-toast { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------------- */
/* 13. Impresión: solo el contenido                                        */
/* ---------------------------------------------------------------------- */
@media print {
  .fj-v11-shell :is(.fj-v11-topbar, .fj-v11-tabs, .fj-v11-dock, .fj-v11-totop, .fj-v11-head__actions, .fj-v11-guide, .fj-v11-back) { display: none !important; }
}
