  /* ===================== TOKENS ===================== */
  #ffp-root {
    --bg: #0d0f14;
    --panel: #12141a;
    --panel-2: rgba(15, 23, 42, 0.6);
    --line: #2a2f3a;
    --line-soft: rgba(148, 163, 184, 0.18);
    --text: #f5f7fa;
    --muted: #9aa4b2;
    --dim: #64748b;
    --amber: #ff9d00;
    --amber-deep: #ff6f00;
    --green: #22c55e;
    --green-soft: #86efac;
    --red: #ff8f8f;
    --r-lg: 16px;
    --r-md: 12px;
    --r-sm: 9px;

    max-width: 920px;
    margin: 24px auto;
    color: var(--text);
    font-family:
      "Inter",
      -apple-system,
      BlinkMacSystemFont,
      "Segoe UI",
      Roboto,
      Arial,
      sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }
  #ffp-root *,
  #ffp-root *::before,
  #ffp-root *::after {
    box-sizing: border-box;
  }
  #ffp-root p,
  #ffp-root h3,
  #ffp-root h4 {
    margin: 0;
  }
  #ffp-root a {
    text-decoration: none;
  }
  #ffp-root :focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 2px;
    border-radius: 6px;
  }

  /* ===================== BUSCADOR ===================== */
  .ffp-search {
    background: linear-gradient(160deg, #1c1f26, #0d0f14);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  }
  .ffp-title {
    color: #fff;
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.01em;
  }
  .ffp-sub {
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    margin-top: 6px !important;
    margin-bottom: 18px !important;
  }
  .ffp-label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
  }
  .ffp-field {
    position: relative;
  }
  .ffp-input {
    width: 100%;
    padding: 14px 44px 14px 16px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
    transition:
      border-color 0.15s,
      box-shadow 0.15s;
  }
  .ffp-input::placeholder {
    color: #5b6472;
    letter-spacing: normal;
  }
  .ffp-input:focus {
    outline: none;
    border-color: var(--amber-deep);
    box-shadow: 0 0 0 3px rgba(255, 111, 0, 0.15);
  }
  .ffp-input.is-invalid {
    border-color: #7f2d2d;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
  }
  .ffp-clear {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
  }
  .ffp-clear:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
  }
  .ffp-hint {
    font-size: 12px;
    color: var(--dim);
    margin: 8px 0 16px !important;
  }
  .ffp-hint.is-error {
    color: var(--red);
  }
  .ffp-btn {
    width: 100%;
    padding: 15px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    background: linear-gradient(90deg, var(--amber), var(--amber-deep));
    color: #111;
    font: inherit;
    font-weight: 800;
    font-size: 16px;
    transition:
      filter 0.15s,
      transform 0.06s;
  }
  .ffp-btn:hover:not(:disabled) {
    filter: brightness(1.06);
  }
  .ffp-btn:active:not(:disabled) {
    transform: translateY(1px);
  }
  .ffp-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
  }

  /* ===================== PROGRESO ===================== */
  .ffp-progress {
    margin-top: 16px;
    padding: 18px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    text-align: center;
    animation: ffpFade 0.25s ease;
  }
  .ffp-track {
    position: relative;
    height: 8px;
    border-radius: 999px;
    background: #22262f;
    overflow: hidden;
    margin-bottom: 12px;
  }
  .ffp-bar {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--amber), var(--amber-deep));
    box-shadow: 0 0 10px rgba(255, 111, 0, 0.5);
    transition: width 0.4s ease;
  }
  .ffp-msg {
    font-size: 13px;
    font-weight: 700;
    color: #c9ced6;
    min-height: 18px;
    transition: opacity 0.2s ease;
  }
  @keyframes ffpFade {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  /* ===================== TARJETA ===================== */
  .ffp-out > * {
    animation: ffpFade 0.3s ease;
  }
  .ffp-error {
    margin-top: 16px;
    padding: 18px;
    border: 1px solid #5a2a2a;
    border-radius: 14px;
    background: #2a1616;
    color: #ffb3b3;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
  }
  .ffp-error strong {
    display: block;
    color: #fff;
    font-size: 15px;
    margin-bottom: 4px;
  }

  .ffp-card {
    position: relative;
    overflow: hidden;
    margin-top: 16px;
    padding: 20px;
    border: 1px solid #9c7a08;
    border-radius: var(--r-lg);
    background: linear-gradient(145deg, #0b1220 0%, #121826 58%, #25170f 100%);
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.35);
  }
  .ffp-card-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.14;
    filter: saturate(1.2);
    pointer-events: none;
  }
  .ffp-card > *:not(.ffp-card-bg) {
    position: relative;
    z-index: 1;
  }

  .ffp-status {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    font-weight: 900;
    color: #dbeafe;
    margin-bottom: 18px;
  }
  .ffp-dot {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.16);
  }
  .ffp-tag-live {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, 0.28);
    background: rgba(34, 197, 94, 0.1);
    color: var(--green-soft);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  /* ---- cabecera ---- */
  .ffp-head {
    display: flex;
    gap: 16px;
    align-items: center;
  }
  .ffp-avatar {
    position: relative;
    flex: 0 0 76px;
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    border: 2px solid #f49d16;
    overflow: hidden;
    background: linear-gradient(135deg, #1f2937, #020617);
    box-shadow: 0 0 0 3px rgba(244, 157, 22, 0.18);
  }
  .ffp-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .ffp-avatar span {
    color: #facc15;
    font-size: 30px;
    font-weight: 900;
  }
  .ffp-name-wrap {
    min-width: 0;
    flex: 1;
  }
  .ffp-name {
    display: block;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.15;
    color: #fff;
    overflow-wrap: anywhere;
  }
  .ffp-uid {
    margin-top: 4px !important;
    font-size: 13px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
  }
  .ffp-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
  }
  .ffp-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 7px;
    border: 1px solid var(--line-soft);
    background: var(--panel-2);
    color: #bfdbfe;
    font-size: 12px;
    font-weight: 700;
  }
  .ffp-badge.gold {
    color: #fcd34d;
    border-color: rgba(244, 157, 22, 0.28);
    background: rgba(244, 157, 22, 0.08);
  }

  /* ---- acciones ---- */
  .ffp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
  }
  .ffp-action {
    flex: 1 1 150px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transition: background 0.15s;
  }
  .ffp-action:hover {
    background: rgba(255, 255, 255, 0.16);
  }
  .ffp-action.primary {
    border: 0;
    color: #111;
    background: linear-gradient(90deg, var(--amber), var(--amber-deep));
  }

  /* ---- bloque genérico ---- */
  .ffp-block {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: rgba(2, 6, 23, 0.5);
  }
  .ffp-block h4 {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 12px !important;
  }

  /* ---- rejilla clave/valor ---- */
  .ffp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
  }
  .ffp-kv {
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: var(--r-sm);
    background: var(--panel-2);
    min-width: 0;
  }
  .ffp-kv dt {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .ffp-kv dd {
    margin: 6px 0 0;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    overflow-wrap: anywhere;
  }
  .ffp-kv dd.amber {
    color: var(--amber);
  }

  /* ---- rango ---- */
  .ffp-ranks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
  }
  .ffp-rank {
    padding: 14px;
    border: 1px solid var(--line-soft);
    border-radius: var(--r-sm);
    background: var(--panel-2);
    text-align: center;
  }
  .ffp-rank .mode {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--amber);
  }
  .ffp-rank img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    margin: 10px auto 6px;
    display: block;
  }
  .ffp-rank .tier {
    font-size: 15px;
    font-weight: 900;
    color: #fff;
  }
  .ffp-rank .pts {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px !important;
  }

  /* ---- equipamiento ---- */
  .ffp-gear {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
  }
  .ffp-gear-item {
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: var(--r-sm);
    background: var(--panel-2);
    text-align: center;
  }
  .ffp-gear-item .slot {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--amber);
  }
  .ffp-gear-item img {
    width: 100%;
    max-width: 72px;
    aspect-ratio: 1;
    object-fit: contain;
    margin: 8px auto;
    display: block;
    border-radius: 8px;
  }
  .ffp-gear-item .name {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    overflow-wrap: anywhere;
  }
  .ffp-gear-item .sub {
    font-size: 11px;
    color: var(--dim);
    margin-top: 2px !important;
  }

  /* ---- estadísticas ---- */
  .ffp-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
  }
  .ffp-tab {
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid var(--line-soft);
    background: transparent;
    color: var(--muted);
    transition: 0.15s;
  }
  .ffp-tab:hover {
    color: #fff;
  }
  .ffp-tab[aria-selected="true"] {
    background: rgba(244, 157, 22, 0.14);
    border-color: rgba(244, 157, 22, 0.45);
    color: #fcd34d;
  }
  .ffp-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
  }
  .ffp-stat {
    padding: 10px;
    border: 1px solid var(--line-soft);
    border-radius: var(--r-sm);
    background: var(--panel-2);
  }
  .ffp-stat dt {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .ffp-stat dd {
    margin: 4px 0 0;
    font-size: 15px;
    font-weight: 900;
    color: #fff;
    font-variant-numeric: tabular-nums;
  }
  .ffp-empty {
    font-size: 13px;
    color: var(--dim);
    padding: 8px 0;
  }

  .ffp-foot {
    margin-top: 16px;
    text-align: center;
    font-size: 12px;
    color: var(--dim);
  }
  .ffp-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 12px 18px;
    border-radius: 10px;
    background: #12141a;
    border: 1px solid var(--line);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: ffpFade 0.2s ease;
  }

  /* ===================== MÓVIL ===================== */
  @media (max-width: 600px) {
    #ffp-root {
      font-size: 14px;
      margin: 16px auto;
    }
    .ffp-search,
    .ffp-card {
      padding: 16px;
    }
    .ffp-title {
      font-size: 18px;
    }
    .ffp-head {
      align-items: flex-start;
    }
    .ffp-avatar {
      flex: 0 0 60px;
      width: 60px;
      height: 60px;
    }
    .ffp-name {
      font-size: 18px;
    }
    .ffp-action {
      flex: 1 1 100%;
    }
    .ffp-stats {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  @media (prefers-reduced-motion: reduce) {
    #ffp-root *,
    .ffp-out > * {
      animation: none !important;
      transition: none !important;
    }
  }

  /* ===================== AVISO DEMO ===================== */
  #ffp-root .ffp-demo-note {
    margin: 0 0 14px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 176, 32, 0.45);
    border-left: 3px solid #ffb020;
    border-radius: 8px;
    background: rgba(255, 176, 32, 0.08);
    color: #ffcf7a;
    font-size: 0.86rem;
    line-height: 1.45;
  }
