/* Self-contained tactical tokens; never inherit the legacy pitch span/i rules. */
.tactical-pitch.clean-tactics{height:620px!important;max-width:780px!important;margin:0 auto;position:relative;overflow:hidden;border:0;border-radius:12px;background:repeating-linear-gradient(0deg,#95b58b 0,#95b58b 62px,#9bbb91 62px,#9bbb91 124px);color:#172d36}
.clean-tactics:before,.clean-tactics:after{content:none!important}
.tactics-lines{position:absolute;inset:12px;width:calc(100% - 24px);height:calc(100% - 24px);color:#f8f7e5;opacity:.7;pointer-events:none}
.clean-tactics .tactical-token{position:absolute;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:2px;width:18%;max-width:108px;min-width:0;padding:3px 1px;border:0;border-radius:8px;background:transparent;color:#112d3b;font-family:Arial,sans-serif;font-size:12px;line-height:1.15;z-index:2;touch-action:none;user-select:none;cursor:pointer;box-shadow:none}
.clean-tactics .tactical-token:hover,.clean-tactics .tactical-token:focus-visible{background:#ffffff40;outline:2px solid #fff4d9;outline-offset:1px}
.clean-tactics .token-shirt{display:block;height:25px;width:30px;flex:none;filter:drop-shadow(0 1px 1px #0002)}
.clean-tactics .token-name{display:block;width:100%;font-size:12px;line-height:14px;font-weight:700;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#102d3d;background:#f6f4e9e8;border-radius:3px;padding:2px 3px}
.clean-tactics .token-meta{font-size:10px;font-weight:700;line-height:12px;color:#153544}
.clean-tactics .token-fitness{display:flex;align-items:center;gap:3px;width:90%;height:10px;min-height:0;padding:0;background:transparent}
.clean-tactics .token-track{display:block;height:5px;min-height:0;flex:1;min-width:0;background:#f5f4e7b8;border-radius:3px;overflow:hidden}
.clean-tactics .token-track>span{display:block;height:5px;min-height:0;max-width:100%;border:0;border-radius:3px;padding:0}
.clean-tactics .token-fitness>small{font-size:10px;line-height:10px;color:#102d3d;min-width:25px;background:transparent}
.clean-tactics .token-selected{outline:2px solid #eb6b20!important;background:#fff3de75!important}
.clean-tactics .token-sent-off{opacity:.55}.clean-tactics .token-sent-off .token-meta{color:#92291d}
.clean-tactics .clean-empty-slot{visibility:hidden;pointer-events:none;position:absolute;transform:translate(-50%,-50%);font:700 10px Arial,sans-serif;min-height:28px;min-width:28px;padding:4px;border:1px dashed #fff7e7;border-radius:14px;background:#476e4f;color:#fff;z-index:1}
.clean-tactics.choosing-slot .clean-empty-slot,.dragging-player .clean-tactics .clean-empty-slot{visibility:visible;pointer-events:auto}
.clean-tactics .clean-empty-slot.drop-target{outline:3px solid #fb7b21;background:#263c2c}
.clean-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;padding:10px 0;line-height:1.5}.match-day .clean-actions{color:#405661}.clean-actions>span{font-size:12px}.clean-actions button{min-height:34px}
.clean-tactics .tactical-token.drop-target{outline:3px solid #fb7b21}.clean-tactics .tactical-token.drag-source{opacity:.45}
/* Names remain readable on narrow screens instead of being cut to a few letters. */
.clean-tactics .token-name{white-space:normal;overflow-wrap:normal;display:flex;align-items:center;justify-content:center;min-height:28px;max-height:28px;line-height:12px;overflow:hidden}
@media(max-width:600px){.tactical-pitch.clean-tactics{height:560px!important;max-width:440px!important}.clean-tactics .tactical-token{width:19%;max-width:none;gap:1px}.clean-tactics .token-name{font-size:11px;line-height:13px;padding:2px}.clean-tactics .token-shirt{width:27px;height:23px}.clean-tactics .token-meta{font-size:10px}.clean-tactics .token-fitness{width:96%}.match-day .match-workspace{display:block}.match-day .match-bench{margin-top:12px}}
@media(max-width:600px){.tactical-pitch.clean-tactics{height:620px!important}.clean-tactics .token-name{font-size:11px;line-height:12px;min-height:26px;max-height:26px}.clean-tactics .token-shirt{height:21px}.match-day:has(.clean-tactics) .match-scorebar{position:static}}

/* Prancheta: warm neutral board and playing pieces, distinct from the live grass. */
.tactical-pitch.clean-tactics{background:#dedbd0;color:#303b3d;border:1px solid #cbc7ba;border-radius:8px}
.clean-tactics .tactics-lines{color:#8c9288;opacity:.55}
.clean-tactics .token-piece{display:flex;align-items:center;justify-content:center;width:32px;height:32px;flex:none;border-radius:50%;background:#303b3d;color:#fffaf0;border:2px solid #faf7eb;box-shadow:0 2px 0 #a4a397;font-size:10px;font-weight:800;letter-spacing:.2px}
.clean-tactics .token-keeper{background:#726852}
.clean-tactics .token-name{background:transparent;color:#293335}
.clean-tactics .token-meta,.clean-tactics .token-fitness>small{color:#414a48}
.clean-tactics .token-selected .token-piece{background:#d95818}
.clean-tactics .token-selected{background:#fff5e480!important}
.clean-tactics .clean-empty-slot{background:#fbf8ef;color:#5a625d;border-color:#81867b}
.clean-tactics .tactical-token:hover,.clean-tactics .tactical-token:focus-visible{outline-color:#b85421}
@media(max-width:600px){.clean-tactics .token-piece{width:27px;height:27px;font-size:9px}}

body:has(.match-day) #toast{background:#303b3d;color:#fffaf0;border-left:4px solid #df6427;box-shadow:0 8px 24px #0002}

/* Compact player labels keep every tactical line clear, including libero setups. */
.clean-tactics .tactical-token{gap:1px;padding:1px 0}
.clean-tactics .token-piece{width:28px;height:28px;font-size:9px}
.clean-tactics .token-name{min-height:22px;max-height:22px;font-size:10px;line-height:10px;padding:1px}
.clean-tactics .token-meta{font-size:9px;line-height:10px}
.clean-tactics .token-fitness{height:8px;gap:2px}
.clean-tactics .token-track,.clean-tactics .token-track>span{height:4px}
.clean-tactics .token-fitness>small{font-size:8px;line-height:8px;min-width:21px}
@media(max-width:600px){.clean-tactics .token-piece{width:25px;height:25px}.clean-tactics .token-name{min-height:22px;max-height:22px;font-size:10px;line-height:10px}}

/* U3 / U6: squad blocks (on the pitch, bench, already substituted, unavailable) and queued substitutions. Semantic colours, independent of the club theme. */
.sq-field{--sq:#2f8f57;--sq-bg:rgba(47,143,87,.13)}
.sq-bench{--sq:#3a7fc0;--sq-bg:rgba(58,127,192,.13)}
.sq-left{--sq:#8b9097;--sq-bg:rgba(139,144,151,.16)}
.sq-out{--sq:#cf5148;--sq-bg:rgba(207,81,72,.13)}
.sq-pend{--sq:#d9822b;--sq-bg:rgba(217,130,43,.15)}
.squad-legend{display:flex;flex-wrap:wrap;gap:6px;padding:8px 14px;font-size:11px;line-height:16px}
.sq-chip{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:999px;border:1px solid var(--sq);background:var(--sq-bg);font-weight:700;color:inherit}
.sq-chip:before{content:"";width:8px;height:8px;border-radius:50%;background:var(--sq)}
.roster-section th{text-align:left;font-size:11px;letter-spacing:.05em;text-transform:uppercase;padding:7px 14px;border-left:4px solid var(--sq);background:var(--sq-bg);color:inherit}
.roster-section th span,.bench-group h4 span{opacity:.65;font-weight:600;margin-left:4px}
.roster-row.sq-row td:first-child{border-left:3px solid var(--sq)}
.roster-row.sq-left,.roster-row.sq-out{opacity:.62}
.roster-row.sq-left .player-handle{text-decoration:line-through;text-decoration-thickness:1px}
.roster-row.sq-queued td{background:var(--sq-pend-bg,rgba(217,130,43,.12))}
.sq-state{display:block;font-size:11px;font-weight:700;color:var(--sq);margin-top:2px}
.sq-tag{font-style:normal;font-size:10px;font-weight:800;line-height:14px;padding:1px 6px;border-radius:4px;margin-left:6px;vertical-align:middle;white-space:nowrap}
.sq-tag-out{background:#f6d9d5;color:#8a2a22}
.sq-tag-in{background:#d3ebdc;color:#1d6a3c}
.bench-group h4{margin:12px 0 4px;padding:3px 8px;font-size:11px;letter-spacing:.05em;text-transform:uppercase;border-left:4px solid var(--sq);background:var(--sq-bg)}
.bench-player.sq-row{border-left:3px solid var(--sq)}
.bench-player.sq-left,.bench-player.sq-out{opacity:.6}
.bench-player.sq-queued{background:rgba(217,130,43,.14)!important;border-color:#d9822b}
.pending-subs{margin:10px 0;padding:10px 12px;border:1px solid #d9822b;border-left-width:5px;border-radius:8px;background:rgba(217,130,43,.13);font-size:13px;line-height:1.4;color:inherit}
.pending-subs>b{margin-right:8px}
.pending-subs>small{opacity:.8}
.pending-subs ul{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:6px}
.pending-subs li{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.pending-subs .sub-out{color:#cf5148;font-weight:700}
.pending-subs .sub-in{color:#2f8f57;font-weight:700}
.pending-subs .sub-arrow{opacity:.6}
.pending-subs button{min-height:30px;margin-left:auto}
.clean-tactics .token-sub-flag{position:absolute;top:-6px;right:0;z-index:2;font-size:9px;font-weight:800;line-height:12px;background:#d9822b;color:#fff;padding:1px 6px;border-radius:9px;box-shadow:0 1px 3px #0003;pointer-events:none;white-space:nowrap}
.clean-tactics .token-sub-out .token-piece{box-shadow:0 0 0 3px #d9822b,0 2px 0 #a4a397}

.bench-groups{max-height:calc(100dvh - 365px);min-height:340px;overflow:auto;overscroll-behavior:contain}
.bench-group .bench-list{min-height:0;max-height:none;overflow:visible}
