/* Squad Builder 1:1 nach App (squad_builder_screen.dart). px = pt der App. Pink #E6197A, Linie #E3E6E8. */

.fi-sqpage .fi-footer { display: none; }
.fi-sqpage .fi-main { padding: 0; background: #fff; }
.fi-sq { --sq-pink: #e6197a; --sq-text: #121212; --sq-muted: #666b78; --sq-line: #e3e6e8; display: flex; flex-direction: column; max-width: 520px; height: 100vh; height: 100dvh; margin: 0 auto; padding-top: env(safe-area-inset-top); color: var(--sq-text); overflow: hidden; }
.fi-sq button { font-family: inherit; color: inherit; }

/* Kopf */
.sq-head { display: flex; align-items: center; gap: 8px; flex: none; padding: 4px 10px 2px 6px; }
.sq-back { display: grid; place-items: center; width: 48px; height: 48px; color: var(--sq-text) !important; }
.sq-titles { flex: 1; min-width: 0; }
.sq-titles h1 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.4px; line-height: 1.25; }
.sq-titles p { margin: 0; overflow: hidden; font-size: 11.5px; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; color: var(--sq-muted); }
.sq-act { display: grid; place-items: center; flex: none; width: 38px; height: 38px; padding: 0; border: 1px solid var(--sq-line); background: transparent; cursor: pointer; }
.sq-act[hidden] { display: none; }
.sq-act.is-pink { border: 0; background: var(--sq-pink); color: #fff !important; }
.sq-act:disabled { opacity: .6; cursor: default; }
.sq-act.is-busy svg { animation: sq-pulse 1s infinite; }
@keyframes sq-pulse { 50% { opacity: .3; } }

/* Wunsch-Elf / Spiel-Vorschau */
.sq-mode { display: flex; flex: none; margin: 2px 16px 8px; border: 1px solid var(--sq-line); }
.sq-mode button { flex: 1; padding: 10px 0; border: 0; background: transparent; font-size: 13px; font-weight: 800; letter-spacing: .2px; color: var(--sq-muted) !important; cursor: pointer; transition: background .15s; }
.sq-mode button + button { border-left: 1px solid var(--sq-line); }
.sq-mode button.is-on { background: var(--sq-pink); color: #fff !important; }

/* Spiele-Leiste */
.sq-strip { display: flex; gap: 8px; flex: none; padding: 0 16px 8px; overflow-x: auto; scrollbar-width: none; }
.sq-strip::-webkit-scrollbar { display: none; }
.sq-strip[hidden] { display: none; }
.sq-mcard { display: flex; align-items: center; gap: 8px; flex: none; padding: 8px 12px; border: 1px solid var(--sq-line); background: #fff; text-align: left; cursor: pointer; }
.sq-mcard.is-on { border: 1.5px solid var(--sq-pink); padding: 7.5px 11.5px; }
.sq-mcard > span:last-child { display: flex; flex-direction: column; width: 136px; }
.sq-mcard b { overflow: hidden; font-size: 12.5px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.sq-mcard small { font-size: 10.5px; white-space: nowrap; color: var(--sq-muted); }
.sq-crest { display: grid; place-items: center; flex: none; width: 24px; height: 24px; padding: 2.4px; overflow: hidden; border-radius: 50%; background: #fff; font-size: 11px; font-weight: 800; color: #23272b; }
.sq-crest img { width: 100%; height: 100%; object-fit: contain; }
.sq-crest.is-l { width: 36px; height: 36px; padding: 3.6px; font-size: 16px; }

/* Bühne: Banner, Rasen, Fußzeile (das ist auch das Teilen-Bild) */
.sq-stage { display: flex; flex-direction: column; flex: 1; min-height: 0; margin: 0 10px; overflow: hidden; }
.sq-banner { display: flex; align-items: center; flex: none; height: 66px; padding: 0 14px; color: #fff; }
.sq-banner[hidden] { display: none; }
.sq-bside { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; width: 72px; }
.sq-bside small { max-width: 72px; overflow: hidden; font-size: 10px; font-weight: 700; letter-spacing: .4px; white-space: nowrap; text-overflow: ellipsis; }
.sq-bmid { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 0; text-align: center; }
.sq-bmid small { max-width: 100%; overflow: hidden; font-size: 9px; font-weight: 700; letter-spacing: 1.1px; white-space: nowrap; text-overflow: ellipsis; color: rgba(255, 255, 255, .65); }
.sq-bmid b { margin-top: 3px; font-size: 14.5px; font-weight: 800; }
.sq-bmid i { margin-top: 2px; font-size: 9.5px; font-style: normal; color: rgba(255, 255, 255, .65); }
.sq-pitch { position: relative; flex: 1; min-height: 360px; overflow: hidden; }
.sq-turf { position: absolute; inset: 0; width: 100%; height: 100%; }
.sq-mark { position: absolute; left: 50%; top: 50%; width: 24%; opacity: .3; transform: translate(-50%, -50%); pointer-events: none; }
.sq-slots { position: absolute; inset: 0; }
.sq-foot { display: flex; align-items: center; gap: 10px; flex: none; height: 30px; padding: 0 14px; color: #fff; }
.sq-foot img { height: 13px; width: auto; filter: brightness(0) invert(1); }
.sq-foot span { flex: 1; min-width: 0; overflow: hidden; font-size: 10.5px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; color: rgba(255, 255, 255, .85); }
.sq-foot b { flex: none; font-size: 11.5px; font-weight: 700; }
.sq-foot b:empty { display: none; }

/* Positionen */
.sq-slot { position: absolute; display: flex; flex-direction: column; align-items: center; width: 88px; margin: -31px 0 0 -44px; padding: 0; border: 0; background: none; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; transition: transform .14s ease-out; }
.sq-slot.is-filled { touch-action: none; }
.sq-slot.is-target { transform: scale(1.08); }
.sq-slot.is-dragging { opacity: .35; }
.sq-empty { display: grid; place-items: center; width: 54px; height: 54px; border: 1.6px solid rgba(255, 255, 255, .7); border-radius: 50%; background: rgba(255, 255, 255, .18); font-size: 30px; font-weight: 300; line-height: 1; color: #fff; }
.sq-label { margin-top: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .8px; color: rgba(255, 255, 255, .8); }
.sq-tok { position: relative; display: block; width: 88px; height: 72px; }
.sq-tok.has-cap { height: 88px; }
.sq-ph { position: absolute; left: 13px; top: 0; display: grid; place-items: center; width: 62px; height: 62px; overflow: hidden; border: 2.5px solid #fff; border-radius: 50%; background: #fff; }
.sq-ph img { width: 100%; height: 100%; object-fit: cover; }
.sq-ph svg { width: 70%; height: 70%; }
.sq-pill { position: absolute; left: 50%; top: 51px; display: flex; align-items: center; gap: 4px; max-width: 92px; padding: 2.5px 6px; border-radius: 7px; background: #fff; white-space: nowrap; transform: translateX(-50%); }
.sq-pill i { font-size: 11px; font-style: normal; font-weight: 800; color: var(--sq-pink); }
.sq-pill b { overflow: hidden; font-size: 11.5px; font-weight: 700; line-height: 1.2; text-overflow: ellipsis; color: #10301e; }
.sq-tok.has-cap .sq-pill b { font-weight: 800; }
.sq-cap { position: absolute; left: 0; right: 0; bottom: 0; overflow: hidden; font-size: 11px; font-weight: 700; line-height: 1.2; white-space: nowrap; text-overflow: ellipsis; color: #fff; text-shadow: 0 0 3px rgba(0, 0, 0, .38); }
.sq-ghost { position: fixed; z-index: 100005; margin: 0; opacity: .92; pointer-events: none; transform: translate(-50%, -70%) scale(1.1); }

/* Werkzeugleiste */
.sq-bar { display: flex; justify-content: flex-start; gap: 8px; flex: none; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); overflow-x: auto; scrollbar-width: none; }
.sq-bar::-webkit-scrollbar { display: none; }
.sq-bar > :first-child { margin-left: auto; }
.sq-bar > :last-child { margin-right: auto; }
.sq-tool { display: flex; align-items: center; gap: 6px; flex: none; padding: 10px 10px 10px 12px; border: 1px solid var(--sq-line); background: #fff; cursor: pointer; }
.sq-tool svg { color: var(--sq-muted); }
.sq-tool b { font-size: 12.5px; font-weight: 800; letter-spacing: -.1px; }
.sq-tool b + svg { margin-left: -4px; }
.sq-swatch { width: 14px; height: 14px; border: 1px solid var(--sq-line); }

/* Blätter */
.sq-sheet { position: fixed; inset: 0; z-index: 100000; }
.sq-sheet[hidden] { display: none; }
.sq-sheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.sq-sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-width: 520px; max-height: 88dvh; margin: 0 auto; padding: 18px 20px calc(28px + env(safe-area-inset-bottom)); overflow-y: auto; background: #fff; animation: sq-in .2s ease-out; }
@keyframes sq-in { from { transform: translateY(40px); } }
.sq-sheet-panel h2 { margin: 0 0 14px; font-size: 20px; font-weight: 800; letter-spacing: -.4px; }
.sq-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.sq-chips button { padding: 10px 15px; border: 1px solid var(--sq-line); background: transparent; font-size: 14px; font-weight: 800; cursor: pointer; }
.sq-chips button.is-on { border-color: var(--sq-pink); background: var(--sq-pink); color: #fff !important; }
.sq-colors { display: flex; gap: 10px; }
.sq-colors button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; }
.sq-colors span { width: 52px; height: 46px; border: 1px solid var(--sq-line); }
.sq-colors .is-on span { border: 2.5px solid var(--sq-pink); }
.sq-colors small { font-size: 11.5px; font-weight: 700; color: var(--sq-muted); }
.sq-colors .is-on small { color: var(--sq-pink); }
.sq-kicker { margin: 18px 0 10px; font-size: 10.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--sq-muted); }
.sq-sheet-panel.is-pick { top: 90px; display: flex; flex-direction: column; max-height: none; padding: 0; }
.sq-pick-head { display: flex; align-items: flex-start; padding: 18px 12px 4px 20px; }
.sq-pick-head div { flex: 1; }
.sq-pick-head h2 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: 0; }
.sq-pick-head p { margin: 0; font-size: 12.5px; color: var(--sq-muted); }
.sq-x { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; background: none; cursor: pointer; }
.sq-filter { display: flex; gap: 8px; padding: 6px 20px 8px; }
.sq-filter button { padding: 7px 13px; border: 1px solid var(--sq-line); border-radius: 18px; background: transparent; font-size: 13px; font-weight: 600; cursor: pointer; }
.sq-filter button.is-on { border-color: var(--sq-text); background: var(--sq-text); color: #fff !important; }
.sq-remove { margin: 0 20px; padding: 10px; border: 0; background: none; font-size: 14px; color: var(--sq-pink) !important; cursor: pointer; }
.sq-list { flex: 1; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.sq-list li + li { border-top: 1px solid var(--sq-line); }
.sq-list button { display: flex; align-items: center; gap: 16px; width: 100%; padding: 10px 16px; border: 0; background: none; text-align: left; cursor: pointer; }
.sq-list button:disabled { cursor: default; }
.sq-lph { display: grid; place-items: center; flex: none; width: 38px; height: 38px; overflow: hidden; border-radius: 50%; background: var(--sq-line); }
.sq-lph img { width: 100%; height: 100%; object-fit: cover; }
.sq-lph svg { width: 70%; height: 70%; }
.sq-lmain { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.sq-lmain b { font-size: 16px; font-weight: 600; }
.sq-lmain small { font-size: 14px; color: var(--sq-muted); }
.sq-list em { font-size: 12px; font-style: normal; font-weight: 800; letter-spacing: .4px; color: var(--sq-muted); }
.sq-list em.is-add { color: var(--sq-pink); }
.sq-sheet-panel.is-dialog { top: 50%; bottom: auto; left: 16px; right: 16px; max-width: 420px; transform: translateY(-50%); animation: none; }
.sq-caption { display: block; width: 100%; padding: 10px 12px; border: 1.5px solid var(--sq-line); font: inherit; font-size: 15px; resize: vertical; }
.sq-caption:focus { border-color: var(--sq-pink); outline: 0; }
.sq-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.sq-tags span { padding: 3px 8px; background: rgba(230, 25, 122, .12); font-size: 12.5px; font-weight: 800; color: var(--sq-pink); }
.sq-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.sq-dialog-actions button { padding: 10px 16px; border: 0; background: none; font-size: 14.5px; font-weight: 700; color: var(--sq-pink) !important; cursor: pointer; }
.sq-dialog-actions .is-pink { background: var(--sq-pink); color: #fff !important; }
.sq-sheet-panel.is-login { padding: 0; }

.sq-toast { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 100006; width: max-content; max-width: calc(100% - 32px); margin: 0; padding: 12px 16px; background: #111; color: #fff; font-size: 14.5px; font-weight: 600; transform: translateX(-50%); }
.sq-toast[hidden] { display: none; }
.sq-toast a { margin-left: 8px; color: #ff7bbd; }

/* ======================= Computer (ab 1024 px): Kader links · Feld · Einstellungen rechts ======================= */
.sq-roster, .sq-opts { display: none; }
@media (max-width: 1023px) { body.fi-sqpage .fi-apphead, body.fi-sqpage .fi-appsearch { display: none !important; } }
@media (min-width: 1024px) {
	.fi-sqpage .fi-footer { display: block; }
	.fi-sqpage .fi-main { background: #f6f6f8; }
	.fi-sq {
		display: grid; grid-template-columns: 380px minmax(0, 1fr) 340px; column-gap: 32px;
		grid-template-areas: "head head head" "roster mode opts" "roster strip opts" "roster stage opts";
		grid-template-rows: auto auto auto 1fr; align-items: start;
		max-width: var(--w-max); height: auto; margin: 0 auto; padding: 0 var(--w-pad) 64px; box-sizing: border-box;
	}
	/* Kopf */
	.sq-head { grid-area: head; display: grid; grid-template-columns: auto; gap: 0; padding: 26px 0 24px; }
	.sq-back { display: inline-flex; width: auto; height: auto; justify-self: start; color: #e6197a !important; font-size: 12px; font-weight: 800; letter-spacing: .12em; }
	.sq-back::after { content: "FANZONE"; }
	.sq-back svg { display: none; }
	.sq-back::before { content: "‹ "; }
	.sq-titles h1 { margin-top: 4px; font-size: 40px; letter-spacing: -.03em; line-height: 1.05; }
	.sq-titles p { margin-top: 4px; font-size: 14px; }
	.sq-head .sq-act { display: none; }
	/* Mitte: Modus, Spiele, Feld – in App-Proportion (auch fürs Teilen-Bild) */
	.sq-mode, .sq-strip, .sq-stage { justify-self: center; width: 600px; max-width: 100%; box-sizing: border-box; }
	.sq-mode { grid-area: mode; margin: 0 0 12px; background: #fff; }
	.sq-mode button { padding: 12px 0; font-size: 14px; }
	.sq-strip { grid-area: strip; padding: 0 0 10px; overflow-x: auto; scrollbar-width: thin; }
	.sq-strip::-webkit-scrollbar { display: block; height: 6px; }
	.sq-strip::-webkit-scrollbar-thumb { background: #d4d6db; }
	.sq-mcard { background: #fff; }
	.sq-mcard:hover { border-color: var(--sq-text); }
	.sq-stage { grid-area: stage; align-self: end; flex: none; margin: 0; }
	.sq-pitch { flex: none; height: 760px; }
	.sq-bar { display: none; }
	/* Positionen: Hover und Ziel beim Ziehen */
	.sq-slot:not(.is-filled):hover .sq-empty, .fi-sq.is-dragging .sq-slot .sq-empty { border-color: #fff; background: rgba(255, 255, 255, .3); }
	.sq-slot.is-filled { cursor: grab; }
	.fi-sq img { -webkit-user-drag: none; user-select: none; }
	.sq-slot.is-target .sq-empty, .sq-slot.is-target .sq-ph, .sq-slot.is-picking .sq-empty, .sq-slot.is-picking .sq-ph { box-shadow: 0 0 0 3px #e6197a, 0 0 0 7px rgba(230, 25, 122, .35); }
	.sq-slot.is-picking .sq-label { color: #fff; }

	/* Kader links */
	/* Kader und Einstellungen genau so hoch wie Umschalter + Feld: oben und unten bündig, Inhalt scrollt in sich */
	.sq-roster, .sq-opts { align-self: stretch; display: flex; flex-direction: column; height: 0; min-height: 100%; box-sizing: border-box; background: #fff; border: 1px solid var(--sq-line); }
	.sq-roster { grid-row: 2 / 5; grid-column: 1; transition: box-shadow .15s; }
	.sq-opts { grid-row: 2 / 5; grid-column: 3; }
	.sq-roster.is-target { box-shadow: inset 0 0 0 2px #e6197a; }
	.sq-roster.is-target .sq-rhint { color: #e6197a; }
	.sq-roster.is-target .sq-rhint::after { content: " Loslassen zum Entfernen."; font-weight: 800; }
	.sq-rtop { flex: none; padding: 18px 18px 10px; border-bottom: 1px solid var(--sq-line); }
	.sq-rtitle { display: flex; align-items: baseline; gap: 10px; }
	.sq-rtitle b, .sq-opts .sq-kicker { font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--sq-text); }
	.sq-rtitle b::before, .sq-opts .sq-kicker::before { content: ""; display: inline-block; width: 4px; height: 13px; margin-right: 9px; vertical-align: -1px; background: #e6197a; }
	.sq-rtitle span { margin-left: auto; color: var(--sq-muted); font-size: 12.5px; font-weight: 700; }
	.sq-rhint { margin: 8px 0 12px; color: var(--sq-muted); font-size: 13px; line-height: 1.35; }
	.sq-rhint b { color: #e6197a; }
	.sq-rhint button { margin-left: 6px; padding: 0; border: 0; background: none; color: var(--sq-text); font-size: 12.5px; font-weight: 700; text-decoration: underline; cursor: pointer; }
	.sq-rsearch { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--sq-line); color: var(--sq-muted); }
	.sq-rsearch input { flex: 1; min-width: 0; height: 40px; padding: 0; border: 0; background: none; color: var(--sq-text); font: inherit; font-size: 14px; outline: 0; }
	.sq-roster .sq-filter { padding: 12px 0 2px; }
	.sq-rlist { flex: 1; min-height: 0; margin: 0; padding: 0 0 8px; overflow-y: auto; list-style: none; scrollbar-width: thin; }
	.sq-rhead { padding: 14px 18px 6px; color: #e6197a; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
	.sq-rnone { padding: 24px 18px; color: var(--sq-muted); font-size: 14px; }
	.sq-rrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 18px; border: 0; background: none; text-align: left; cursor: grab; user-select: none; transition: background .12s; }
	.sq-rrow:hover { background: #f6f6f8; }
	.sq-rrow .sq-lph { width: 40px; height: 40px; }
	.sq-rrow .sq-lmain b { overflow: hidden; font-size: 14.5px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
	.sq-rrow .sq-lmain small { font-size: 12.5px; }
	.sq-rrow em { flex: none; padding: 3px 7px; background: rgba(230, 25, 122, .1); color: #e6197a; font-size: 11px; font-style: normal; font-weight: 800; letter-spacing: .06em; }
	.sq-rrow.is-on .sq-lph, .sq-rrow.is-on .sq-lmain { opacity: .5; }
	.sq-rrow.is-dragging { opacity: .35; }
	.sq-grip { flex: none; width: 10px; height: 16px; background: radial-gradient(circle, #b8bcc4 1.4px, transparent 1.6px) 0 0 / 5px 5.3px; opacity: 0; transition: opacity .12s; }
	.sq-rrow:hover .sq-grip { opacity: 1; }

	/* Einstellungen rechts */
	.sq-opts { overflow-y: auto; scrollbar-width: thin; }
	.sq-osec { padding: 18px 20px; border-bottom: 1px solid var(--sq-line); }
	.sq-osec:last-child { border-bottom: 0; }
	.sq-opts .sq-kicker { margin: 0 0 12px; }
	.sq-opts .sq-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
	.sq-opts .sq-chips button { padding: 9px 0; font-size: 13px; text-align: center; }
	.sq-opts .sq-chips button:not(.is-on):hover { border-color: var(--sq-text); }
	.sq-opts .sq-chips--sm { margin-top: 12px; }
	.sq-opts .sq-chips--sm button { font-size: 12px; }
	.sq-opts .sq-colors button { flex: 1; }
	.sq-opts .sq-colors span { width: 100%; height: 38px; }
	.sq-oact { display: flex; flex-direction: column; gap: 8px; }
	.sq-obtn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--sq-line); background: #fff; font-size: 14px; font-weight: 800; cursor: pointer; }
	.sq-obtn:hover { border-color: var(--sq-text); }
	.sq-obtn--quiet { border-color: transparent; color: var(--sq-muted) !important; font-weight: 700; }
	.sq-obtn.is-pink { margin-top: 4px; border: 0; background: #e6197a; color: #fff !important; }
	.sq-obtn.is-pink:hover { background: #c8126a; }
	.sq-obtn:disabled { opacity: .6; cursor: default; }
	.sq-obtn.is-busy svg { animation: sq-pulse 1s infinite; }
	.sq-toast { bottom: 32px; }
}
@media (min-width: 1024px) { /* Inhalt max. 1280 px (Platz für Skyscraper) → schmalere Seitenspalten */
	.fi-sq { grid-template-columns: 300px minmax(0, 1fr) 260px; column-gap: 20px; padding-inline: var(--w-pad); }
	.sq-mode, .sq-strip, .sq-stage { width: 480px; }
	.sq-pitch { height: 640px; }
	.sq-opts .sq-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
