/* Scoped styles for /tools/sports/football-formation-builder/ */

.football-formation-page {
  background:
    linear-gradient(180deg, #ffffff 0, #f5fbf7 420px),
    #f7f8fb;
}

.football-formation-page .site-container {
  max-width: 1260px;
}

.football-formation-page .eyebrow {
  border-color: rgba(5, 150, 105, 0.2);
  background: #dcfce7;
  color: #047857;
}

.football-formation-page .btn-primary,
.football-formation-page .btn-open {
  background: #059669;
  box-shadow: 0 10px 22px rgba(5, 150, 105, 0.2);
}

.football-formation-page .btn-primary:hover,
.football-formation-page .btn-open:hover {
  background: #047857;
}

.football-formation-page .btn svg,
.football-formation-page .btn-secondary svg,
.football-formation-page .btn-primary svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.football-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 18px 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.football-breadcrumbs a {
  color: #475569;
}

.football-breadcrumbs a:hover {
  color: #047857;
}

.football-breadcrumbs span[aria-hidden="true"] {
  color: #94a3b8;
}

.ffb-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(310px, 0.74fr);
  gap: 30px;
  align-items: center;
  overflow: hidden;
  margin-top: 12px;
  padding: 44px;
  border: 1px solid rgba(5, 150, 105, 0.16);
  border-radius: 14px;
  background:
    radial-gradient(circle at 86% 14%, rgba(34, 197, 94, 0.2), transparent 28%),
    linear-gradient(135deg, #ecfdf5 0%, #f7fee7 42%, #ffffff 100%);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.075);
}

.ffb-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(5, 150, 105, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(5, 150, 105, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.36), transparent 74%);
}

.ffb-hero-copy,
.ffb-hero-preview {
  position: relative;
  z-index: 1;
}

.ffb-hero h1 {
  margin: 0;
  color: #0f172a;
  font-size: 4rem;
  line-height: 0.98;
  font-weight: 950;
}

.ffb-hero .lead {
  max-width: 680px;
  margin-top: 18px;
}

.ffb-hero-preview {
  overflow: hidden;
  border: 1px solid rgba(5, 150, 105, 0.16);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(5, 150, 105, 0.08), rgba(255, 255, 255, 0) 58%),
    #ffffff;
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.1);
  padding: 18px;
}

.ffb-preview-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.ffb-preview-top p,
.ffb-preview-top strong {
  display: block;
  margin: 0;
}

.ffb-preview-top p {
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 800;
}

.ffb-preview-top strong {
  color: #0f172a;
  font-size: 1.08rem;
  line-height: 1.2;
}

.ffb-ball-icon {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 16px 16px 20px 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0 26%, transparent 26% 74%, rgba(0, 0, 0, 0.1) 74%),
    linear-gradient(180deg, #22c55e, #047857);
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 950;
  letter-spacing: 0;
  text-shadow: 0 1px 2px rgba(3, 46, 31, 0.32);
  box-shadow: 0 12px 24px rgba(5, 95, 55, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.ffb-ball-icon::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  width: 24px;
  height: 8px;
  border-radius: 0 0 999px 999px;
  background: rgba(255, 255, 255, 0.34);
  transform: translateX(-50%);
  z-index: -1;
}

.ffb-ball-icon::after {
  content: "";
  position: absolute;
  inset: 7px 9px auto;
  height: 20px;
  border-radius: 11px 11px 4px 4px;
  background: rgba(255, 255, 255, 0.08);
  z-index: -1;
}

.ffb-mini-board {
  position: relative;
  min-height: 286px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.76);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.055) 50%, transparent 50%) 0 0 / 46px 100%,
    linear-gradient(180deg, #12804b, #075f38);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26), 0 18px 34px rgba(5, 95, 55, 0.2);
}

.ffb-mini-board::before,
.ffb-mini-board::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 2px solid rgba(255, 255, 255, 0.7);
}

.ffb-mini-board::before {
  top: 50%;
  width: 94px;
  height: 94px;
  margin-top: -47px;
  border-radius: 999px;
}

.ffb-mini-board::after {
  top: 50%;
  width: 100%;
  height: 0;
  border-width: 1px 0 0;
}

.ffb-mini-board span {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: #16a34a;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 950;
  transform: translate(-50%, -50%);
  box-shadow: 0 10px 18px rgba(2, 44, 34, 0.26);
}

.ffb-tool-shell {
  position: relative;
  overflow: hidden;
  margin-top: 28px;
  padding: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(5, 150, 105, 0.06), rgba(255, 255, 255, 0) 42%),
    #ffffff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.1);
}

.ffb-tool-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(5, 150, 105, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(5, 150, 105, 0.055) 1px, transparent 1px);
  background-size: 38px 38px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.48), transparent 58%);
}

.ffb-tool-head,
.ffb-workspace {
  position: relative;
  z-index: 1;
}

.ffb-tool-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.ffb-tool-head h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 2rem;
  line-height: 1.12;
}

.ffb-tool-head p:not(.eyebrow) {
  margin: 0;
  color: #475569;
  line-height: 1.65;
}

.ffb-tool-badge {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid rgba(5, 150, 105, 0.16);
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-weight: 900;
}

.ffb-tool-badge span {
  margin-right: 5px;
}

.ffb-workspace {
  display: grid;
  grid-template-columns: minmax(290px, 0.35fr) minmax(0, 0.65fr);
  gap: 24px;
  align-items: start;
}

.ffb-controls {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.ffb-control-card,
.ffb-info-card,
.ffb-formation-card,
.ffb-faq-item {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.ffb-control-card {
  padding: 18px;
}

.ffb-field {
  display: grid;
  gap: 7px;
}

.ffb-field + .ffb-field,
.ffb-color-grid,
.ffb-formation-chips {
  margin-top: 14px;
}

.ffb-field span,
.ffb-custom-color span {
  color: #334155;
  font-size: 0.88rem;
  font-weight: 850;
}

.ffb-field input,
.ffb-field select,
.ffb-custom-color input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  padding: 10px 12px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.ffb-field input:focus,
.ffb-field select:focus,
.ffb-custom-color input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14);
}

.ffb-color-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ffb-custom-color {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.ffb-custom-color[hidden] {
  display: none !important;
}

.ffb-custom-color input {
  height: 44px;
  padding: 4px;
  cursor: pointer;
}

.ffb-formation-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ffb-formation-chip {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 900;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.ffb-formation-chip:hover,
.ffb-formation-chip.is-active {
  border-color: rgba(5, 150, 105, 0.28);
  background: #dcfce7;
  color: #047857;
  transform: translateY(-1px);
}

.ffb-action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 16px;
}

.ffb-action-grid .btn {
  width: 100%;
}

.ffb-summary-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.04rem;
}

.ffb-summary-list {
  display: grid;
  gap: 9px;
  margin: 14px 0;
}

.ffb-summary-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.065);
  border-radius: 8px;
  background: #f8fafc;
}

.ffb-summary-list dt,
.ffb-summary-list dd {
  margin: 0;
}

.ffb-summary-list dt {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 850;
}

.ffb-summary-list dd {
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 950;
  text-align: right;
}

.ffb-summary-card p {
  margin: 0 0 14px;
  color: #475569;
  line-height: 1.62;
}

.ffb-preview-column {
  min-width: 0;
}

.ffb-lineup-card {
  overflow: hidden;
  border: 1px solid rgba(5, 150, 105, 0.2);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(5, 150, 105, 0.08), rgba(255, 255, 255, 0) 42%),
    #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.11);
}

.ffb-lineup-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background:
    linear-gradient(135deg, #052e1d, #0f7a46 58%, #16a34a);
  color: #ffffff;
}

.ffb-lineup-meta p {
  margin: 0;
  max-width: 34ch;
  overflow-wrap: anywhere;
  font-size: 1.16rem;
  font-weight: 950;
}

.ffb-lineup-meta span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 800;
}

.ffb-lineup-meta strong {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.92rem;
}

.ffb-pitch {
  position: relative;
  width: 100%;
  aspect-ratio: 7 / 10;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 50%, transparent 50%) 0 0 / 58px 100%,
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05), transparent 32%),
    linear-gradient(180deg, #15834d 0%, #086238 54%, #064d2f 100%);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.78), inset 0 0 34px rgba(0, 0, 0, 0.18);
}

.ffb-pitch-lines,
.ffb-player-layer {
  position: absolute;
  inset: 0;
}

.ffb-line,
.ffb-box,
.ffb-spot {
  position: absolute;
  pointer-events: none;
}

.ffb-line,
.ffb-box {
  border-color: rgba(255, 255, 255, 0.76);
}

.ffb-line.halfway {
  left: 0;
  top: 50%;
  width: 100%;
  height: 0;
  border-top: 2px solid rgba(255, 255, 255, 0.76);
}

.ffb-line.center-circle {
  left: 50%;
  top: 50%;
  width: 28%;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.76);
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.ffb-line.center-dot,
.ffb-spot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  transform: translate(-50%, -50%);
}

.ffb-line.center-dot {
  left: 50%;
  top: 50%;
}

.ffb-box {
  left: 22%;
  width: 56%;
  height: 15%;
  border: 2px solid rgba(255, 255, 255, 0.76);
}

.ffb-box.top-box {
  top: 0;
  border-top: 0;
}

.ffb-box.bottom-box {
  bottom: 0;
  border-bottom: 0;
}

.ffb-box.top-goal,
.ffb-box.bottom-goal {
  left: 36%;
  width: 28%;
  height: 7%;
}

.ffb-box.top-goal {
  top: 0;
  border-top: 0;
}

.ffb-box.bottom-goal {
  bottom: 0;
  border-bottom: 0;
}

.ffb-spot.top-spot {
  left: 50%;
  top: 11%;
}

.ffb-spot.bottom-spot {
  left: 50%;
  top: 89%;
}

.ffb-player-token {
  --kit-color: #16a34a;
  --player-text: #ffffff;
  position: absolute;
  z-index: 2;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 4px;
  align-items: center;
  justify-items: center;
  width: 112px;
  min-height: 122px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--player-text);
  cursor: grab;
  touch-action: none;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.25));
  transition: filter 160ms ease;
}

.ffb-player-token:active {
  cursor: grabbing;
}

.ffb-player-token:hover,
.ffb-player-token:focus-visible,
.ffb-player-token.is-active {
  filter: drop-shadow(0 0 9px rgba(250, 204, 21, 0.44)) drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
  outline: none;
}

.ffb-player-token.is-dragging {
  z-index: 5;
  transition: none;
}

.ffb-player-shirt {
  position: relative;
  display: grid;
  place-items: center;
  width: 80px;
  height: 66px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0 24%, transparent 24% 74%, rgba(0, 0, 0, 0.1) 74%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0.08)),
    var(--kit-color);
  clip-path: polygon(18% 0, 35% 0, 42% 10%, 58% 10%, 65% 0, 82% 0, 100% 20%, 86% 39%, 78% 31%, 78% 100%, 22% 100%, 22% 31%, 14% 39%, 0 20%);
  color: var(--player-text);
  filter: drop-shadow(0 4px 9px rgba(0, 0, 0, 0.28));
}

.ffb-player-shirt::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 27px;
  height: 7px;
  border-radius: 0 0 999px 999px;
  background: rgba(255, 255, 255, 0.25);
  transform: translateX(-50%);
}

.ffb-player-shirt::after {
  content: "";
  position: absolute;
  inset: 6px 13px auto;
  height: 21px;
  border-radius: 11px 11px 5px 5px;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.ffb-player-token.is-goalkeeper .ffb-player-shirt {
  filter: brightness(0.96) saturate(1.1);
}

.ffb-player-number {
  position: relative;
  z-index: 1;
  font-size: 1.42rem;
  line-height: 1;
  font-weight: 950;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.ffb-player-name,
.ffb-player-position {
  max-width: 100%;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.ffb-player-name {
  min-width: 58px;
  max-width: 112px;
  min-height: 23px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.74rem;
  line-height: 1.12;
  font-weight: 950;
}

.ffb-player-name.is-empty {
  display: none;
}

.ffb-player-position {
  min-width: 34px;
  min-height: 16px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.58rem;
  line-height: 1;
  font-weight: 950;
}

.ffb-captain-badge {
  position: absolute;
  top: -5px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #f59e0b;
  color: #111827;
  font-size: 0.72rem;
  font-weight: 950;
  box-shadow: 0 8px 14px rgba(15, 23, 42, 0.2);
}

.ffb-pitch-note,
.ffb-status {
  margin: 10px 0 0;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.5;
  text-align: center;
}

.ffb-status {
  min-height: 22px;
  color: #047857;
  font-weight: 850;
}

.ffb-lineup-footer {
  padding: 9px 14px 11px;
  border-top: 1px solid rgba(5, 150, 105, 0.12);
  background: #f8fafc;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 850;
  text-align: center;
}

.ffb-player-dialog {
  width: min(460px, calc(100% - 32px));
  max-height: calc(100dvh - 34px);
  overflow: auto;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 28px 74px rgba(15, 23, 42, 0.28);
}

.ffb-player-dialog::backdrop {
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(3px);
}

.ffb-player-form {
  padding: 20px;
}

.ffb-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.ffb-dialog-head h2 {
  margin: 0;
  font-size: 1.45rem;
}

.ffb-icon-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
}

.ffb-icon-button:hover {
  background: #f8fafc;
}

.ffb-icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.ffb-dialog-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.ffb-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  color: #334155;
  font-weight: 850;
}

.ffb-check input {
  width: 20px;
  height: 20px;
  accent-color: #059669;
}

.ffb-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.ffb-content-section {
  padding-top: 34px;
}

.ffb-content-stack {
  display: grid;
  gap: 18px;
}

.ffb-info-card {
  padding: 24px;
}

.ffb-info-card h2 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 1.55rem;
  line-height: 1.18;
}

.ffb-info-card p {
  margin: 0;
  color: #475569;
  line-height: 1.74;
}

.ffb-info-card p + p {
  margin-top: 12px;
}

.ffb-about-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.ffb-about-list li {
  position: relative;
  padding: 12px 12px 12px 34px;
  border: 1px solid rgba(5, 150, 105, 0.11);
  border-radius: 9px;
  background: #f8fafc;
  color: #475569;
  line-height: 1.55;
  font-weight: 750;
}

.ffb-about-list li::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 18px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.13);
}

.ffb-steps {
  margin: 0;
  padding-left: 22px;
  color: #475569;
  line-height: 1.78;
}

.ffb-steps li + li {
  margin-top: 6px;
}

.ffb-formation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.ffb-formation-card {
  position: relative;
  overflow: hidden;
  min-height: 158px;
  padding: 18px;
  width: 100%;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(5, 150, 105, 0.05), rgba(255, 255, 255, 0) 54%),
    #ffffff;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.ffb-formation-card:hover,
.ffb-formation-card:focus-visible {
  border-color: rgba(5, 150, 105, 0.24);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
  transform: translateY(-2px);
  outline: none;
}

.ffb-formation-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #059669, #f59e0b);
  opacity: 0.75;
}

.ffb-formation-card span {
  display: inline-grid;
  place-items: center;
  min-width: 62px;
  min-height: 34px;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #052e1d;
  color: #ffffff;
  font-weight: 950;
}

.ffb-mini-formation {
  display: grid;
  gap: 6px;
  min-height: 118px;
  margin: 4px 0 14px;
  padding: 12px;
  border: 1px solid rgba(5, 150, 105, 0.12);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.08) 50%, transparent 50%) 0 0 / 32px 100%,
    linear-gradient(180deg, #14824e, #086238);
}

.ffb-mini-formation div {
  display: grid;
  grid-template-columns: repeat(var(--count), 18px);
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.ffb-mini-formation i {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(2, 44, 34, 0.24);
}

.ffb-formation-card p {
  margin: 0;
  color: #475569;
  line-height: 1.64;
}

.ffb-faq-list {
  display: grid;
  gap: 12px;
}

.ffb-faq-item {
  padding: 0;
  overflow: hidden;
}

.ffb-faq-item summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 16px 18px;
  color: #0f172a;
  cursor: pointer;
  font-weight: 900;
}

.ffb-faq-item summary::marker {
  color: #059669;
}

.ffb-faq-item p {
  margin: 0;
  padding: 0 18px 18px;
  color: #475569;
  line-height: 1.7;
}

.football-formation-page .tools-related-icon.green {
  background: #dcfce7;
  color: #047857;
}

@media (max-width: 1040px) {
  .ffb-hero {
    grid-template-columns: 1fr;
  }

  .ffb-hero h1 {
    font-size: 3.1rem;
  }

  .ffb-hero-preview {
    max-width: 560px;
  }

  .ffb-workspace {
    grid-template-columns: 1fr;
  }

  .ffb-preview-column {
    order: -1;
  }

  .ffb-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ffb-control-card:first-child {
    grid-column: 1 / -1;
  }

  .ffb-summary-card {
    grid-column: 1 / -1;
  }

  .ffb-action-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ffb-formation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .football-breadcrumbs {
    margin-top: 14px;
  }

  .ffb-hero {
    padding: 26px 18px;
    border-radius: 12px;
  }

  .ffb-hero h1 {
    font-size: 2.45rem;
    line-height: 1.04;
  }

  .ffb-mini-board {
    min-height: 228px;
  }

  .ffb-tool-shell {
    padding: 16px;
    border-radius: 12px;
  }

  .ffb-tool-head {
    display: grid;
  }

  .ffb-tool-head h2 {
    font-size: 1.6rem;
  }

  .ffb-tool-badge {
    width: fit-content;
  }

  .ffb-controls,
  .ffb-content-stack,
  .ffb-formation-grid,
  .ffb-color-grid,
  .ffb-about-list {
    grid-template-columns: 1fr;
  }

  .ffb-action-grid {
    grid-template-columns: 1fr;
  }

  .ffb-lineup-meta {
    align-items: flex-start;
    padding: 14px;
  }

  .ffb-lineup-meta p {
    font-size: 1rem;
  }

  .ffb-pitch {
    aspect-ratio: 7 / 10.4;
  }

  .ffb-player-token {
    width: 90px;
    min-height: 100px;
  }

  .ffb-player-shirt {
    width: 64px;
    height: 53px;
  }

  .ffb-player-number {
    font-size: 1.12rem;
  }

  .ffb-player-name {
    max-width: 90px;
    min-height: 19px;
    padding: 3px 7px;
    border-radius: 7px;
    font-size: 0.62rem;
  }

  .ffb-player-position {
    min-height: 15px;
    padding: 2px 7px;
    font-size: 0.52rem;
  }

  .ffb-captain-badge {
    width: 20px;
    height: 20px;
    right: 8px;
    font-size: 0.66rem;
  }

  .ffb-dialog-grid {
    grid-template-columns: 1fr;
  }

  .ffb-dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ffb-info-card {
    padding: 20px;
  }
}

@media (max-width: 420px) {
  .ffb-hero h1 {
    font-size: 2.1rem;
  }

  .ffb-lineup-meta {
    gap: 10px;
  }

  .ffb-lineup-meta strong {
    font-size: 0.82rem;
  }

  .ffb-player-token {
    width: 82px;
    min-height: 94px;
  }

  .ffb-player-shirt {
    width: 60px;
    height: 50px;
  }

  .ffb-player-name {
    max-width: 82px;
    font-size: 0.58rem;
  }

}
