/* スタメン予想：ビルダー .ffb-lb とカード .ffb-lcard。 */
.ffb .ffb-lcard { margin: 8px 0 4px; max-width: 440px; border: 1px solid var(--ffb-line); border-left: var(--ffb-bar) solid var(--club); border-radius: var(--ffb-r2); background: var(--ffb-surface); overflow: hidden; }
.ffb .ffb-lcard__head { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px 6px; line-height: 1.4; }
.ffb .ffb-lcard__mode { font-size: 12px; padding: 0 6px; border: 1px solid var(--ffb-text); border-radius: var(--ffb-r1); font-weight: 700; }
.ffb .ffb-lcard__formation { margin-left: auto; font-family: var(--ffb-font-brand); font-weight: 700; font-size: 22px; }
.ffb .ffb-lcard__pitch, .ffb .ffb-lb__pitch { position: relative; overflow: hidden; background: #55875f var(--ffb-turf, url(../pitch/turf.svg)) center / 100% 100% no-repeat; }
.ffb .ffb-lcard__pitch { width: calc(100% - 16px); margin: 0 8px; aspect-ratio: 10 / 8.4; min-height: 280px; border-radius: 6px; }
.ffb .ffb-lb__pitch { width: 100%; max-width: 460px; margin: 0 auto; aspect-ratio: 1 / 1.2; border-radius: 10px; }
.ffb .ffb-pitch-lines { position: absolute; inset: 0; background: var(--ffb-pitchLines, url(../pitch/half-pitch.svg)) center / 100% 100% no-repeat; pointer-events: none; }
.ffb .ffb-kit { position: relative; display: block; }
.ffb .ffb-kit__fill { position: absolute; inset: 0; background: var(--club); -webkit-mask: var(--ffb-kit-mask, url(../kit/kit.svg)) center / contain no-repeat; mask: var(--ffb-kit-mask, url(../kit/kit.svg)) center / contain no-repeat; }
.ffb .ffb-kit__line { position: absolute; inset: 0; width: 100%; height: 100%; }
.ffb .ffb-kit__no { position: absolute; left: 0; right: 0; top: 30%; text-align: center; color: #fff; font-family: var(--ffb-font-brand); font-weight: 700; line-height: 1; }
.ffb .ffb-kit--gk .ffb-kit__fill { background: var(--ffb-gk-color); }
.ffb .ffb-kit--gk .ffb-kit__no { color: var(--ffb-gk-ink); }
.ffb .ffb-gk-badge { position: absolute; left: 100%; top: 4px; padding: 0 2px; border-radius: 2px; background: #182b49; color: #fff; font: 700 8px/12px var(--ffb-font-brand); }
.ffb .ffb-lb__slot { position: absolute; transform: translate(-50%, -50%); width: 19%; max-width: 92px; min-height: 66px; padding: 2px 0; border: 0; border-radius: var(--ffb-r2); background: transparent; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; transition: left .22s, top .22s; }
.ffb .ffb-lb__slot .ffb-kit { width: 38px; height: 38px; border-radius: 50%; }
.ffb .ffb-lb__slot .ffb-kit__no { font-size: 16px; }
.ffb .ffb-lb__slot .ffb-kit--empty { display: grid; place-items: center; border: 1.5px dashed rgba(255,255,255,.9); background: rgba(29,34,39,.25); color: #fff; font-size: 27px; font-weight: 400; line-height: 1; }
.ffb .ffb-lb__label { display: block; width: max-content; max-width: 88px; max-height: 2.6em; overflow: hidden; padding: 1px 4px; border-radius: var(--ffb-r1); background: rgba(255,255,255,.96); font-size: 11.5px; font-weight: 700; line-height: 1.3; text-align: center; word-break: keep-all; overflow-wrap: anywhere; }
.ffb .ffb-lb__slot[data-empty] .ffb-lb__label { background: rgba(29,34,39,.55); color: #fff; font-weight: 400; }
.ffb .ffb-lb__slot[data-state="src"] .ffb-kit { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ffb-text); }
.ffb .ffb-lb__slot[data-state="err"] .ffb-kit { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ffb-error); }
.ffb .ffb-lb__slot[data-state="err"] .ffb-lb__label { background: var(--ffb-error); color: #fff; }
.ffb .ffb-lb__badge { padding: 0 5px; border: 1px solid var(--ffb-text); border-radius: var(--ffb-r1); background: #fff; font-size: 10.5px; font-weight: 700; }
.ffb.ffb-lb { position: fixed; inset: 0; z-index: 70; overflow: auto; overscroll-behavior: contain; background: var(--ffb-surface); min-width: 0; isolation: isolate; }
.ffb .ffb-lb__head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 4px; min-height: 56px; padding: 6px var(--ffb-gutter); border-bottom: 1px solid var(--ffb-line); background: var(--ffb-surface); }
.ffb .ffb-lb__head h2 { flex: 1; min-width: 0; margin: 0 4px; overflow: hidden; font-size: 17px; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }
.ffb .ffb-lb__button { min-height: 44px; padding: 8px 12px; border: 1px solid var(--ffb-line-strong); border-radius: var(--ffb-r2); background: var(--ffb-surface); color: var(--ffb-text); font-size: 14px; line-height: 1.5; cursor: pointer; }
.ffb .ffb-lb__button:hover:not(:disabled) { background: var(--ffb-surface-2); }
.ffb .ffb-lb__button:disabled { cursor: default; color: var(--ffb-text-2); opacity: .65; }
.ffb .ffb-lb__button[aria-pressed="true"] { border-color: var(--club); box-shadow: inset 0 0 0 1px var(--club); font-weight: 700; }
.ffb .ffb-lb__button--primary { border-color: var(--club); background: var(--club); color: #fff; font-weight: 700; }
.ffb .ffb-lb__button--primary:hover:not(:disabled) { background: var(--club); filter: brightness(.9); }
.ffb .ffb-lb__button--danger { color: var(--ffb-error); }
.ffb .ffb-lb__body { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 16px 24px; width: 100%; max-width: 560px; margin: 0 auto; padding: 12px var(--ffb-gutter) calc(96px + env(safe-area-inset-bottom)); }
.ffb .ffb-lb__body > .ffb-lb__message { grid-column: 1 / -1; }
.ffb .ffb-lb__stack { display: flex; min-width: 0; flex-direction: column; gap: 10px; }
.ffb .ffb-lb__stack > p, .ffb .ffb-lb__hint p, .ffb .ffb-lb__message p { margin: 0; }
.ffb .ffb-lb__club { display: flex; gap: 8px; align-items: center; }
.ffb .ffb-lb__club label { flex: none; font-size: 14px; font-weight: 700; }
.ffb .ffb-lb input, .ffb .ffb-lb select, .ffb .ffb-lb textarea { width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid var(--ffb-line-strong); border-radius: var(--ffb-r2); background: var(--ffb-surface); color: var(--ffb-text); font-size: 16px; line-height: 1.5; }
.ffb .ffb-lb textarea { resize: vertical; }
.ffb .ffb-lb label { font-size: 14px; font-weight: 700; }
.ffb .ffb-lb__formations { display: flex; gap: 4px; overflow-x: auto; padding: 2px; }
.ffb .ffb-lb__formations button { flex: 1 0 auto; min-width: 62px; padding: 6px; font-family: var(--ffb-font-brand); font-size: 18px; }
.ffb .ffb-lb__hint { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; color: var(--ffb-text-2); font-size: 14px; line-height: 1.5; }
.ffb .ffb-lb__hint p { flex: 1 1 180px; }
.ffb .ffb-lb__hint button { flex: none; }
.ffb .ffb-lb__swap { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border: 2px solid var(--ffb-text); border-radius: var(--ffb-r2); background: #fff6d0; font-size: 14px; }
.ffb .ffb-lb__swap strong { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ffb .ffb-lb__swap button { flex: none; }
.ffb .ffb-lb__message { margin: 0; padding: 10px 12px; border: 1px solid #9accaa; border-radius: var(--ffb-r2); background: #e5f8ea; color: #196c40; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.ffb .ffb-lb__message--error { border-color: #eeb3ac; background: #ffedeb; color: var(--ffb-error); }
.ffb .ffb-lb__message > button { margin-top: 6px; }
.ffb .ffb-lb__meta, .ffb .ffb-lb__manual { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--ffb-line); border-radius: var(--ffb-r2); }
.ffb .ffb-lb__meta legend, .ffb .ffb-lb__manual legend { padding: 0 4px; font-size: 15px; font-weight: 700; }
.ffb .ffb-lb__bench { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 12px; border: 1px solid var(--ffb-line); border-radius: var(--ffb-r2); }
.ffb .ffb-lb__bench h3, .ffb .ffb-lb__bench p { margin: 0; }
.ffb .ffb-lb__bench h3 { font-size: 16px; }
.ffb .ffb-lb__bench button { text-align: left; overflow-wrap: anywhere; }
.ffb .ffb-lb__bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; gap: 8px; justify-content: center; padding: 8px var(--ffb-gutter) calc(8px + env(safe-area-inset-bottom)); background: var(--ffb-surface); border-top: 1px solid var(--ffb-line-strong); box-shadow: var(--ffb-shadow-dock); }
.ffb .ffb-lb[data-kb] .ffb-lb__bar { display: none; } /* 入力中（キーボード表示中）は下部バーを隠す */
.ffb .ffb-lb[data-sheet] .ffb-lb__bar { pointer-events: none; }
.ffb .ffb-lb__bar button { flex: 1 1 0; max-width: 240px; min-height: 48px; }
.ffb .ffb-sheet { position: fixed; inset: 0; z-index: 80; }
.ffb .ffb-sheet__scrim { position: absolute; inset: 0; background: rgba(16,24,40,.42); }
.ffb .ffb-sheet__panel { position: absolute; left: 0; right: 0; bottom: var(--ffb-lb-keyboard-offset, 0px); max-height: min(86vh, calc(var(--ffb-lb-viewport-height, 100dvh) - 12px)); display: flex; flex-direction: column; background: var(--ffb-surface); border-radius: 14px 14px 0 0; box-shadow: var(--ffb-shadow-pop); padding-bottom: env(safe-area-inset-bottom); }
.ffb .ffb-sheet__head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--ffb-line); }
.ffb .ffb-sheet__head h3 { flex: 1; min-width: 0; margin: 0; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.ffb .ffb-sheet__head button { flex: none; }
.ffb .ffb-sheet__body { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 12px; }
.ffb .ffb-lb__filters { display: flex; gap: 4px; }
.ffb .ffb-lb__filters button { flex: 1; padding: 6px 4px; }
.ffb .ffb-lb__roster-state { font-size: 14px; line-height: 1.6; color: var(--ffb-text-2); }
.ffb .ffb-lb__roster { margin: 0; padding: 0; list-style: none; }
.ffb .ffb-lb__roster li { border-bottom: 1px solid var(--ffb-line); }
.ffb .ffb-lb__roster button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 6px 4px; border: 0; border-radius: var(--ffb-r1); background: transparent; text-align: left; cursor: pointer; }
.ffb .ffb-lb__roster button:hover:not(:disabled) { background: var(--ffb-surface-2); }
.ffb .ffb-lb__roster button:disabled { color: var(--ffb-text-2); cursor: default; }
.ffb .ffb-lb__roster-no { flex: none; width: 30px; font-family: var(--ffb-font-brand); font-size: 19px; text-align: center; }
.ffb .ffb-lb__roster-name { flex: 1; min-width: 0; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.ffb .ffb-lb__roster-name small { display: block; color: var(--ffb-text-2); font-size: 12px; }
.ffb .ffb-lb__pos { flex: none; padding: 0 6px; border: 1px solid var(--ffb-line-strong); border-radius: var(--ffb-r1); font-size: 12px; }
.ffb .ffb-lb__manual-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ffb .ffb-lb__manual-row label { display: flex; flex-direction: column; gap: 4px; }
.ffb .ffb-lb__preview-card .ffb-lcard { width: 100%; margin: 0 auto; }
.ffb .ffb-lb__export { display: flex; flex-wrap: wrap; gap: 8px; }
.ffb .ffb-lb__export button { flex: 1 1 180px; }
.ffb .ffb-lb__summary { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 14px; line-height: 1.7; }
.ffb .ffb-lb details > summary { min-height: 44px; padding: 10px 0; cursor: pointer; }
@media (min-width: 1100px) {
  .ffb .ffb-sheet__panel { left: 50%; right: auto; top: 50%; bottom: auto; width: 560px; transform: translate(-50%, -50%); border-radius: var(--ffb-r3); }
  .ffb .ffb-lb__body { grid-template-columns: minmax(0, 460px) minmax(0, 1fr); max-width: 1100px; }
  .ffb .ffb-lb__body--preview { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
}
@media (prefers-reduced-motion: reduce) { .ffb .ffb-lb__slot { transition: none; } }

/* WordPress外の分離プレビューでも、読み上げ用の補足を視覚表示から外す。 */
.ffb .ffb-lcard .screen-reader-text { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); clip-path:inset(50%); white-space:nowrap; border:0; }
.ffb .ffb-lb [hidden] { display:none; }
