/* ===== Monte o XI — v2 ===== */
.fa-xi { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 32px; align-items: start; }
@media (max-width: 900px) { .fa-xi { grid-template-columns: minmax(0, 1fr); gap: 16px; } }
.fa-xi__field { display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.fa-xi__bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 14px; }
.fa-xi__hint { font-size: 13px; color: var(--text-muted); text-align: center; }

/* Campo: desenhado só com bordas. Sem textura de grama. */
.fa-pitch { position: relative; width: 100%; max-width: max(320px, min(560px, calc((100svh - 400px) * .755))); aspect-ratio: 68 / 90; background: var(--pitch); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
@media (max-width: 720px) { .fa-pitch { max-width: none; aspect-ratio: 68 / 86; } }
.fa-pitch__lines { position: absolute; inset: 4%; border: 1.5px solid var(--pitch-line); border-radius: 4px; pointer-events: none; }
.fa-pitch__half { position: absolute; left: 0; right: 0; top: 50%; border-top: 1.5px solid var(--pitch-line); }
.fa-pitch__circle { position: absolute; left: 50%; top: 50%; width: 26%; aspect-ratio: 1; border: 1.5px solid var(--pitch-line); border-radius: 50%; transform: translate(-50%, -50%); }
.fa-pitch__spot { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--pitch-line); transform: translate(-50%, -50%); }
.fa-pitch__box { position: absolute; left: 50%; width: 58%; height: 16%; border: 1.5px solid var(--pitch-line); transform: translateX(-50%); }
.fa-pitch__box--goal { width: 26%; height: 6.5%; }
.fa-pitch__box--top { top: -1.5px; border-top: 0; }
.fa-pitch__box--bottom { bottom: -1.5px; border-bottom: 0; }

/* Posição no campo. left/top = coordenada da formação (% do campo). */
.fa-slot { position: absolute; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 84px; transform: translate(-50%, -24px); color: var(--text); cursor: pointer; }
.fa-slot__dot { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-pill); border: 1.5px dashed var(--border-strong); background: var(--surface); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; color: var(--text-secondary); font-variant-numeric: tabular-nums; transition: border-color var(--dur-select) var(--ease), background-color var(--dur-select) var(--ease), color var(--dur-select) var(--ease), box-shadow var(--dur-select) var(--ease); }
.fa-slot:hover .fa-slot__dot { border-color: var(--accent-muted); color: var(--text); }
.fa-slot__name { max-width: 100%; padding: 2px 6px; border-radius: 6px; background: var(--slot-label-bg); font-family: var(--font-heading); font-size: 12px; font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: fa-reveal var(--dur-reveal) var(--ease) both; }
.fa-slot--filled .fa-slot__dot { border: 1.5px solid var(--accent-muted); background: var(--surface-hover); color: var(--text); font-family: var(--font-display); font-size: 14px; letter-spacing: 0; }
.fa-slot--best .fa-slot__dot { border-color: var(--accent); color: var(--accent); }
.fa-slot--active .fa-slot__dot { border: 2px solid var(--accent); background: var(--surface-hover); color: var(--accent); box-shadow: 0 0 0 3px var(--pitch), 0 0 0 4px var(--accent-muted); }
@media (max-width: 720px) {
  .fa-slot { width: 70px; transform: translate(-50%, -21px); }
  .fa-slot__dot { width: 42px; height: 42px; font-size: 10px; }
  .fa-slot--filled .fa-slot__dot { font-size: 13px; }
  .fa-slot__name { font-size: 11px; padding: 1px 5px; }
}

/* Picker: coluna lateral no desktop, bottom sheet no mobile/tablet */
.fa-picker { display: flex; flex-direction: column; gap: 16px; padding: 24px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--r-lg); }
.fa-picker__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.fa-picker__titles { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fa-picker__title { font-family: var(--font-heading); font-weight: 800; font-size: 22px; line-height: 1.15; letter-spacing: -0.01em; }
.fa-picker__close, .fa-sheet__handle { display: none; }
.fa-options { display: flex; flex-direction: column; gap: 8px; }
.fa-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 10px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); color: var(--text); text-align: left; cursor: pointer; transition: background-color var(--dur-hover) var(--ease), border-color var(--dur-select) var(--ease), box-shadow var(--dur-select) var(--ease); }
.fa-option:hover:not(:disabled) { background: var(--surface-hover); border-color: var(--accent-muted); }
.fa-option:disabled { cursor: default; }
.fa-option__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fa-option__name { font-family: var(--font-heading); font-weight: 700; font-size: 17px; line-height: 1.2; }
.fa-option__meta { font-size: 12px; color: var(--text-muted); }
.fa-option__stat { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; animation: fa-reveal var(--dur-reveal) var(--ease) both; }
.fa-option__value { font-family: var(--font-display); font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.fa-option__tag { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.fa-option--chosen { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.fa-option--chosen .fa-option__value { color: var(--text); }
.fa-option--best .fa-option__value, .fa-option--best .fa-option__tag { color: var(--accent); }
.fa-option--best { border-color: var(--accent); }

.fa-lineup { display: flex; flex-direction: column; }
.fa-lineup__row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 36px; border-bottom: 1px solid var(--border); font-size: 14px; }
.fa-lineup__pos { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; color: var(--text-muted); }
.fa-lineup__name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fa-lineup__name--empty { color: var(--text-muted); font-weight: 400; }
.fa-lineup__value { font-family: var(--font-display); font-size: 14px; font-variant-numeric: tabular-nums; color: var(--text-secondary); }

@media (max-width: 900px) {
  .fa-picker { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; max-height: 72svh; overflow: auto; padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); border-bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--shadow-lift); transform: translateY(100%); visibility: hidden; transition: transform var(--dur-screen) var(--ease), visibility 0s linear var(--dur-screen); }
  .fa-picker--open { transform: none; visibility: visible; transition: transform var(--dur-screen) var(--ease), visibility 0s; }
  .fa-sheet__handle { display: block; width: 40px; height: 4px; margin: 0 auto 2px; border-radius: var(--r-pill); background: var(--border-strong); }
  .fa-picker__close { display: inline-flex; }
  .fa-picker__idle { display: none; }
  .fa-picker .fa-btn { width: 100%; }
}
