body.classic-theme { margin:0; }
.classic-theme .modal-backdrop { background:#061a20b8; backdrop-filter:blur(1px); padding:12px; }
.classic-theme .modal.tactics-modal { width:min(1200px,100%); max-width:1200px; max-height:calc(100dvh - 24px); border:2px solid #0a2817; border-radius:0; background:#7f8d7d; }
.classic-theme .tactics-modal .modal-head { min-height:30px; padding:4px 10px; background:#193b20; color:#fff7c3; border:0; }
.classic-theme .tactics-modal .modal-head h2 { font:700 13px Tahoma,Arial,sans-serif; color:inherit; }
.classic-theme .tactics-modal .modal-head .icon-btn { color:#fff; width:24px;height:24px; }
.classic-theme .tactics-modal .modal-body { padding:0; overflow:auto; }
.tactics-content { font:12px Tahoma,Arial,sans-serif; color:#fff; }
.tactics-tabs { display:flex; align-items:stretch; gap:3px; padding:4px 5px 0; background:#193921; }
.tactics-tabs button { display:flex; align-items:center; gap:8px; background:#536d58; border:1px solid #789379; color:#fff; padding:4px 16px; min-height:34px; font-size:12px; }
.tactics-tabs button[aria-selected=true] { background:#134c85; border-bottom-color:#134c85; box-shadow:inset 0 2px #a8c9f1; font-weight:bold; }
.tactics-tabs button b { font-size:16px; margin-left:14px; }
.tactics-tabs>span { margin-left:auto; align-self:center; padding:0 10px; color:#fff7c4; font-size:11px; }
.tactics-instruction { padding:6px 10px; font-size:10px; background:#364934; color:#fff4c0; min-height:26px; }
.tactics-layout { display:grid; grid-template-columns:minmax(330px, .85fr) minmax(350px,1.15fr); gap:7px; padding:7px; align-items:stretch; }
.tactics-field { min-width:0; background:#3a7f2c; border:1px solid #2a4c22; }
.tactics-pitch { height:clamp(400px,calc(100dvh - 300px),620px); min-height:400px; position:relative; margin:0 8px; overflow:visible; background:repeating-linear-gradient(0deg,#286c29 0 10%,#30782d 10% 20%); }
.tactics-pitch::before { content:''; pointer-events:none; position:absolute; inset:0; opacity:.16; background-image:repeating-linear-gradient(35deg,#c9dc86 0 1px,transparent 1px 4px); }
.tactics-pitch .pitch-lines { inset:4% 3%; border:2px solid #e8edb3bb; }
.tactics-pitch .pitch-lines:before { background:#e8edb3bb; }
.tactics-pitch .pitch-lines:after { border-color:#e8edb3bb; width:24%; }
.tactics-pitch .pitch-goal { border-color:#e8edb3bb; width:65%; height:19%; }
.tactics-pitch .pitch-goal:after { border-color:#e8edb3bb; width:52%; }
.tactics-pitch .goal-top { top:4%; }
.tactics-pitch .goal-bottom { bottom:4%; }
.kit-player { display:flex; flex-direction:column; align-items:center; justify-content:center; border:0; background:none; color:white; margin:0; padding:2px; font:10px/1.1 Tahoma,Arial,sans-serif; text-align:center; cursor:grab; text-shadow:0 1px 2px #000; user-select:none; -webkit-user-select:none; touch-action:none; }
.kit-player .kit-shirt { width:42px; height:43px; display:block; flex-shrink:0; filter:drop-shadow(1px 2px 1px #0007); }
.kit-shirt .kit-body { fill:var(--kit-primary); stroke:#121b2a; stroke-width:1.1; }
.kit-shirt .kit-trim { fill:var(--kit-secondary); }
.kit-shirt .kit-shade { fill:#000; opacity:.16; }
.kit-shirt .kit-seam { fill:none; stroke:#ffffff; opacity:.22; stroke-width:1; }
.kit-shirt text { fill:var(--kit-ink); font:bold 18px Arial,sans-serif; stroke:none; text-shadow:0 1px 1px #0008; }
.kit-player strong { max-width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:10px; line-height:12px; }
.kit-player small { font-size:9px; line-height:11px; color:inherit; white-space:nowrap; }
.kit-player .kit-role { font-size:8px; line-height:10px; }
.field-kit { position:absolute; transform:translate(-50%,-50%); width:100px; max-width:24%; z-index:2; }
.field-kit strong { background:#0c3a1977; padding:0 2px; }
.kit-player.selected,.kit-player.drop-target { outline:2px solid #fff06b; outline-offset:-2px; background:#ffec5624; z-index:4; }
.kit-player.out-of-position { color:#ffeb3b; }
.kit-player.out-of-position strong,.kit-player.out-of-position small,.kit-player.out-of-position .kit-shirt text { color:#ffeb3b; fill:#ffeb3b; }
.kit-player.kit-unavailable { opacity:1; cursor:not-allowed; color:#ff9696; background:#261a20e8; border:1px solid #b0444d; border-radius:3px; }
.kit-player.kit-unavailable .kit-shirt { opacity:.6; }
.kit-player.kit-unavailable strong,.kit-player.kit-unavailable small { color:#ff9696; }
.tactics-pitch-footer { display:flex; align-items:center; gap:12px; justify-content:space-between; min-height:25px; padding:4px 8px; font-size:10px; color:#fff9bb; background:#235422; }
.tactics-pitch-footer .position-warning { color:#ffeb3b; font-size:9px; }
.tactics-bench { background:#7f8e7e; overflow:auto; min-width:0; max-height:calc(clamp(400px,calc(100dvh - 300px),620px) + 25px); border:1px solid #435a3d; }
.tactics-bench h3 { font-size:11px; padding:4px 7px; background:#315900; margin:0; position:sticky; top:0; z-index:3; color:#fff9ba; font-weight:400; }
.tactics-bench h3 span { float:right; }
.bench-shirt-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(115px,1fr)); align-content:start; gap:12px 10px; padding:12px; }
.reserve-kit { width:100%; min-width:0; min-height:106px; padding:6px 4px; }
.reserve-kit strong { margin:4px 0 3px; }
.reserve-kit small { line-height:14px; }
.field-kit { width:94px;max-width:20%; }
.field-kit strong { margin:2px 0; }
.kit-player small.kit-detail { white-space:normal;line-height:12px; }
.kit-player small.kit-condition { font-size:9px;line-height:12px; }
.kit-player.kit-minor-injury { border:1px solid #edbd6f;background:#6a4b1cbb; }
.tactical-drop-slot { display:none;position:absolute;transform:translate(-50%,-50%);width:60px;height:58px;z-index:6;border:1px dashed #e3edb2;background:#1a4721c7;color:#eaffc3;font:10px Tahoma,Arial;cursor:pointer; }
.tactical-drop-slot svg { width:26px;height:28px;opacity:.35;display:block;margin:auto; }
.tactics-pitch.show-drop-slots .tactical-drop-slot { display:block; }
.tactical-drop-slot.drop-target { background:#688d27;border:2px solid #fff073; }
.classic-theme .archive-modal { width:min(1100px,96vw);max-width:1100px; }
.archive-score { display:flex;align-items:center;justify-content:center;gap:18px;padding:10px;background:#173e52;color:white; }
.archive-controls { display:flex;justify-content:space-between;gap:10px;align-items:center;margin:8px 0; }
.archive-controls label { display:flex;gap:8px;align-items:center;font-size:12px; }
.archive-controls select { padding:8px; }
.archive-columns { display:grid;grid-template-columns:minmax(400px,1fr) minmax(280px,.85fr);gap:16px; }
.archive-columns .archive-pitch { margin:0;min-height:420px;height:clamp(420px,calc(100dvh - 245px),620px); }
.archive-columns aside { min-width:0;font-size:12px;max-height:clamp(420px,calc(100dvh - 245px),620px);overflow:auto; }
.archive-events { max-height:160px;overflow:auto;margin-top:12px;background:#e6ebee;padding:8px; }
.archive-events p { margin:4px 0; }
.archive-empty { position:absolute;top:40%;padding:25px;color:white;text-align:center; }
@media(max-width:750px){.archive-columns{grid-template-columns:1fr}.archive-controls{flex-wrap:wrap}.archive-columns .archive-pitch{height:620px}.tactics-pitch{min-height:560px}.field-kit{max-width:21%}}
.tactics-bench .bench-unavailable-title { background:#333831; }
.tactics-empty { font-size:11px; padding:8px; color:#f0f2df; grid-column:1/-1; }
.tactics-game-info { min-width:0; padding:7px; background:#294819; border:1px solid #122c12; font-size:10px; }
.tactics-mini-score { display:flex; justify-content:space-around; align-items:center; background:#112e19; padding:7px; font-size:23px; }
.tactics-game-info p { margin:8px 0; color:#f7f8cf; line-height:1.6; }
.tactics-game-info p span { display:block; }
.tactics-events { min-height:130px; max-height:210px; overflow:auto; background:#082a0d; padding:6px; margin:10px 0; line-height:1.4; }
.tactics-events>div { margin-bottom:9px; }
.tactics-events b { color:#fcf5ab; }
.tactics-stat { display:flex; justify-content:space-between; gap:4px; padding:4px 0; }
.during-match .tactics-layout { grid-template-columns:minmax(170px,.48fr) minmax(360px,1.1fr) minmax(180px,.55fr); }
.during-match .tactics-bench { grid-column:1; grid-row:1; background:#19392c; }
.during-match .tactics-field { grid-column:2; grid-row:1; }
.during-match .bench-shirt-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.during-match .tactics-game-info { grid-column:3; grid-row:1; }
.tactics-controls-row { display:flex; flex-wrap:wrap; gap:9px; padding:7px 10px; background:#bcc5b6; color:#162d37; }
.tactics-controls-row label { display:flex; flex:1; min-width:120px; flex-direction:column; gap:3px; font-size:11px; }
.tactics-controls-row select { border:1px solid #7a8a95; border-radius:0; background:linear-gradient(#fff,#dce4ed); color:#172e48; font:11px Tahoma,Arial; min-height:27px; padding:3px; }
.tactics-actions { display:flex; align-items:center; gap:8px; padding:6px 10px; background:#bcc5b6; color:#163425; }
.tactics-actions>span { margin-right:auto; font-size:11px; }
.classic-theme .tactics-actions .btn { min-height:30px; padding:6px 12px; font:11px Tahoma,Arial; border:1px solid #8098aa; border-radius:0; background:linear-gradient(#fff,#c1d5e8); color:#123258; }
.classic-theme .tactics-actions .btn-primary { background:linear-gradient(#4d8048,#255c26); color:white; border-color:#203c1c; }
.tactics-ready-note { padding:3px 10px 5px; font-size:10px; color:#25402a; background:#bcc5b6; }
.opponent-tab .kit-player { cursor:pointer; touch-action:auto; }
.classic-theme .management-modal { max-width:1100px; width:95vw; background:#e8edf2; }
.classic-theme .management-modal .modal-head { padding:9px 14px; background:#133a65; color:white; }
.classic-theme .management-modal .modal-head h2 { font-size:15px; color:white; }
.classic-theme .management-modal .modal-head .icon-btn { color:white; }
.classic-theme .management-modal .modal-body { padding:12px; }
.select-team-shell { padding:18px; max-width:1280px; margin:auto; }
.select-team-shell>.brand { color:#163b64; margin-bottom:20px; }
.saved-tactic-list { display:grid; gap:8px; margin-top:15px; }
.saved-tactic-list button { text-align:left; }
.tactics-saving-note { font-size:11px; line-height:1.5; color:#51626d; margin:8px 0; }
@media(max-width:1000px) { .during-match .tactics-layout { grid-template-columns:minmax(175px,.55fr) minmax(330px,1fr); } .during-match .tactics-game-info { display:none; } .tactics-tabs button { padding:4px 9px; } }
@media(max-width:650px) { .classic-theme .modal.tactics-modal { max-height:98dvh; } .classic-theme .modal-backdrop { padding:5px; } .tactics-tabs>span { font-size:9px; padding:0 4px; } .tactics-tabs button { padding:4px 5px; gap:3px; font-size:10px; } .tactics-tabs button .crest { display:none; } .tactics-layout,.during-match .tactics-layout { display:flex; flex-direction:column; } .tactics-field { order:0; } .tactics-bench { order:1; max-height:240px; } .during-match .bench-shirt-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } .tactics-pitch { height:480px; } .tactics-actions { flex-wrap:wrap; gap:5px; } .tactics-actions>span { width:100%; } .tactics-controls-row label { min-width:40%; } .tactics-controls-row { gap:6px; } .field-kit { max-width:25%; } .kit-player .kit-shirt { width:36px; height:39px; } }
.tactics-layout { grid-template-columns:minmax(460px,1.1fr) minmax(300px,.9fr); }
.during-match .tactics-layout { grid-template-columns:minmax(210px,.6fr) minmax(460px,1.3fr) minmax(175px,.5fr); }
.tactics-pitch { min-height:560px;height:clamp(560px,calc(100dvh - 300px),660px); }
.kit-player .kit-detail,.kit-player .kit-condition { max-width:100%;overflow:hidden;text-overflow:ellipsis; }
.tactics-blocked { color:#ffb0ae; }

/* Legibility: each player's details stay within an individual slot. */
.tactics-layout { grid-template-columns:minmax(460px,1.1fr) minmax(300px,.9fr); }
.during-match .tactics-layout { grid-template-columns:minmax(210px,.6fr) minmax(460px,1.3fr) minmax(175px,.5fr); }
.tactics-pitch { min-height:560px;height:clamp(560px,calc(100dvh - 300px),660px); }
.during-match .bench-shirt-grid { gap:12px 8px;padding:10px; }
.kit-player small.kit-detail,.kit-player small.kit-condition { white-space:normal;line-height:12px;max-width:100%; }
.tactics-blocked { color:#ffb0ae; }
@media(max-width:1000px){.during-match .tactics-layout,.tactics-layout{grid-template-columns:minmax(360px,1.1fr) minmax(245px,.9fr)}.during-match .tactics-field{grid-column:1}.during-match .tactics-bench{grid-column:2}.during-match .tactics-game-info{display:none}}
@media(max-width:700px){.tactics-layout,.during-match .tactics-layout{display:flex;flex-direction:column}.tactics-pitch{height:560px;min-height:560px}.during-match .bench-shirt-grid{grid-template-columns:repeat(auto-fill,minmax(110px,1fr))}.tactics-bench{max-height:300px}}

.tactics-pitch{height:clamp(420px,calc(100dvh - 275px),620px);min-height:420px}.field-kit .kit-shirt{width:32px;height:33px}.field-kit strong{font-size:9px;line-height:11px;margin:1px 0}.field-kit small.kit-detail,.field-kit small.kit-condition{font-size:8px;line-height:10px}.kit-role:empty{display:none}.archive-pitch .field-kit .kit-shirt{width:42px;height:43px}@media(max-width:700px){.tactics-pitch{height:500px;min-height:500px}}
