/* ---------- הקבוצה שלי ---------- */
#myteam {
  justify-content: flex-start;
  align-items: stretch;
  gap: 1.4vh;
  padding: 3vh 2.5vw 2.2vh;
}
#myteam.entering { animation: home-in .8s var(--ease-out) both; }

/* שם הקבוצה: לחיצה עליו מחליפה אותו בשדה עריכה */
.sq-title { min-width: 0; }
.sq-name {
  --u: max(1.5px, .32vh);
  display: flex;
  align-items: center;
  gap: 1vw;
  padding: .4vh 1.2vw;
  border: 0;
  background: none;
  cursor: pointer;
  transition: transform .25s var(--ease-out);
}
body.input-mouse .sq-name:hover, .sq-name.nav-focus { transform: scale(1.05); }
.sq-pencil {
  width: 2.2vh;
  height: 2.2vh;
  flex: none;
  opacity: .6;
  background: linear-gradient(135deg, transparent 0 40%, #cfe3ff 40% 60%, transparent 60%) center / 100% 100% no-repeat;
  clip-path: polygon(0 100%, 0 70%, 70% 0, 100% 30%, 30% 100%);
  transition: opacity .25s;
}
body.input-mouse .sq-name:hover .sq-pencil, .sq-name.nav-focus .sq-pencil { opacity: 1; }
.sq-name-input {
  width: min(34vw, 62vh);
  padding: .8vh 1.2vw;
  border: 0;
  outline: none;
  text-align: center;
  font: 800 clamp(15px, 2.6vh, 26px) "Bahnschrift", "Arial Narrow", "Segoe UI", sans-serif;
  color: #fff;
  caret-color: #ffd54a;
  background: rgba(6, 16, 31, .9);
  box-shadow: inset 0 0 0 3px #ffd54a;
}

/* ---------- שורת מידע ---------- */
.sq-bar {
  flex: none;
  display: flex;
  justify-content: center;
  gap: 1.4vw;
}
.sq-cell {
  display: flex;
  align-items: center;
  gap: 1vw;
  min-height: clamp(34px, 5.4vh, 56px);
  padding: .7vh 1.5vw;
  border: 0;
  color: #fff;
  background: rgba(6, 16, 31, .78);
  box-shadow: inset 0 0 0 3px #1c4fa8, inset 0 0 0 5px rgba(120, 180, 255, .14);
  clip-path: var(--notch);
}
.sq-cell-label { --u: max(1.4px, .28vh); display: flex; }
/* מלא אוטומטית */
.sq-auto { cursor: pointer; background: linear-gradient(180deg, #ffe07a, #f2b134); box-shadow: inset 0 0 0 3px #a8741a; transition: transform .2s var(--ease-out), filter .2s; }
.sq-auto .px { --u: max(1.4px, .29vh); }
body.input-mouse .sq-auto:hover, .sq-auto.nav-focus { transform: translateY(-.3vh); filter: brightness(1.08); outline: none; animation: none; box-shadow: inset 0 0 0 3px #fff3c4; }
.sq-cell .num { font-size: clamp(10px, 1.8vh, 18px); }
.sq-fm { cursor: pointer; transition: transform .25s var(--ease-out), box-shadow .25s, background .25s; }
body.input-mouse .sq-fm:hover, .sq-fm.nav-focus { transform: translateY(-.3vh); background: rgba(40, 90, 190, .6); box-shadow: inset 0 0 0 3px #6fb3ff; }
.sq-fm.nav-focus { outline: none; animation: none; box-shadow: inset 0 0 0 3px #ffd54a; }
.sq-chev {
  width: 1.1vh;
  height: 1.1vh;
  flex: none;
  border-right: .38vh solid #cfe3ff;
  border-bottom: .38vh solid #cfe3ff;
  transform: translateY(-.2vh) rotate(45deg);
}

.sq-stars { display: flex; gap: .35vw; direction: ltr; }
.sq-stars i {
  width: 2.5vh;
  height: 2.4vh;
  background: #26354f;
  clip-path: polygon(50% 0, 62% 35%, 98% 36%, 69% 58%, 80% 94%, 50% 72%, 20% 94%, 31% 58%, 2% 36%, 38% 35%);
}
.sq-stars i.full { background: linear-gradient(180deg, #ffe27a, #ffb300); }
.sq-stars i.half { background: linear-gradient(90deg, #ffcb3d 50%, #26354f 50%); }

.sq-chem-bar { width: 9vw; height: 1.4vh; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 2px rgba(110, 160, 255, .4); }
.sq-chem-bar i {
  display: block;
  height: 100%;
  width: calc(var(--p, 0) * 100%);
  background: linear-gradient(180deg, #7fd0ff, #2f8cff);
  box-shadow: 0 0 1.2vh rgba(70, 150, 255, .6);
  transition: width .5s var(--ease-out);
}

/* ---------- המגרש ---------- */
.sq-field {
  --cw: min(10.4vh, 7.8vw);   /* רוחב קלף על המגרש */
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
}
.sq-pitch { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 1.4vh 2vh rgba(0, 0, 0, .45)); }
/* השכבה עצמה שקופה ללחיצות (היא יושבת מעל משבצת המאמן), ורק המשבצות שבתוכה מקבלות אותן */
.sq-slots { position: absolute; inset: 0; pointer-events: none; }
.sq-slots > .sq-slot { pointer-events: auto; }

.sq-slot {
  position: absolute;
  left: var(--l);
  top: var(--t);
  width: var(--cw);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transform: translate(-50%, -52%) scale(var(--s, 1));
}
.sq-slots.intro .sq-slot { animation: sq-pop .6s cubic-bezier(.34, 1.56, .64, 1) calc(.15s + var(--i, 0) * 45ms) backwards; }
@keyframes sq-pop { from { opacity: 0; transform: translate(-50%, -52%) scale(.4) translateY(4vh); } }

.sq-card { position: relative; width: 100%; aspect-ratio: 728 / 999; transition: transform .25s var(--ease-out), filter .25s; }
body.input-mouse .sq-slot:hover .sq-card,
.sq-slot.nav-focus .sq-card { transform: translateY(-.8vh) scale(1.1); }
body.input-mouse .sq-slot:hover, .sq-slot.nav-focus { z-index: 5; }
.sq-slot.nav-focus { outline: none; animation: none; }
.sq-slot.nav-focus .sq-card { filter: drop-shadow(0 0 .7vh #ffd54a) drop-shadow(0 0 .3vh #ffd54a); }

/* שחקן שנבחר להזזה: מורם, עם הילה כחולה פועמת */
.sq-slot.selected { z-index: 6; }
.sq-slot.selected .sq-card { transform: translateY(-1.4vh) scale(1.14); animation: sq-selected 1s ease-in-out infinite; }
@keyframes sq-selected {
  0%, 100% { filter: drop-shadow(0 0 .6vh #38a8ff) drop-shadow(0 0 .2vh #bfe4ff); }
  50%      { filter: drop-shadow(0 0 1.4vh #38a8ff) drop-shadow(0 0 .5vh #ffffff); }
}

/* שחקן שנכנס להרכב: נוחת מלמעלה, טבעת מתפשטת על הדשא, והיהלומים נדלקים */
.sq-slot.landed .sq-card { animation: sq-land .62s cubic-bezier(.2, .9, .3, 1) backwards; }   /* backwards: אחרי הנחיתה חוזרים לכללים הרגילים, כדי שהריחוף ימשיך לעבוד */
@keyframes sq-land {
  0%   { opacity: 0; transform: translateY(-5.5vh) scale(1.55) rotate(-7deg); filter: brightness(2.4); }
  55%  { opacity: 1; transform: translateY(.7vh) scale(.93) rotate(1.5deg); filter: brightness(1.35); }
  100% { opacity: 1; transform: none; filter: none; }
}
.sq-slot.landed::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(var(--cw) * 1.28);
  width: calc(var(--cw) * 1.6);
  aspect-ratio: 3.4 / 1;
  translate: -50% -50%;
  border: .35vh solid rgba(130, 210, 255, .9);
  border-radius: 50%;
  box-shadow: 0 0 1.2vh rgba(80, 170, 255, .7);
  pointer-events: none;
  animation: sq-ripple .85s ease-out .16s both;
}
@keyframes sq-ripple { from { opacity: .95; transform: scale(.25); } to { opacity: 0; transform: scale(1.55); } }
.sq-slot.landed .sq-pill { animation: sq-pill-in .5s ease-out .24s backwards; }
.sq-slot.landed .sq-dias i.on { animation: sq-dia .5s ease-out .5s backwards; }
@keyframes sq-pill-in { from { opacity: 0; transform: translateY(-.8vh) scale(.7); } }
@keyframes sq-dia { 0% { transform: rotate(45deg) scale(0); } 70% { transform: rotate(45deg) scale(1.7); } 100% { transform: rotate(45deg) scale(1); } }
body.input-mouse .sq-slot:hover .sq-card { filter: drop-shadow(0 0 .8vh rgba(255, 255, 255, .55)); }
.sq-slot:active .sq-card, .sq-slot.pressed .sq-card { transform: scale(.96); }

/* משבצת ריקה: צללית הקלף, כהה */
.sq-empty { position: absolute; inset: 0; display: grid; place-items: center; }
.sq-empty-bg { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: auto; filter: grayscale(1) brightness(.2) contrast(.9); opacity: .92; }
.sq-plus {
  position: relative;
  font: 800 calc(var(--cw) * .5) "Bahnschrift", "Arial Narrow", "Segoe UI", sans-serif;
  color: rgba(255, 255, 255, .22);
  transition: color .25s, transform .25s var(--ease-out);
}
body.input-mouse .sq-slot:hover .sq-plus, .sq-slot.nav-focus .sq-plus { color: #ffd54a; transform: scale(1.2); }

/* תווית העמדה מתחת לקלף, עם יהלומי הכימיה */
.sq-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4vw;
  width: 92%;
  margin: .6vh auto 0;
  padding: .25vh 0;
  font: 800 clamp(9px, 1.55vh, 15px) "Bahnschrift", "Arial Narrow", "Segoe UI", sans-serif;
  letter-spacing: .03em;
  color: #cfe3ff;
  background: rgba(7, 14, 27, .88);
  border-radius: 99px;
  box-shadow: 0 .3vh .5vh rgba(0, 0, 0, .4);
}
.sq-pill-empty { color: #f2b134; }
.sq-pill.chem-0 { color: #ff6a55; }
.sq-pill.chem-1 { color: #ffb13b; }
.sq-pill.chem-2 { color: #8fd2ff; }
.sq-pill.chem-3 { color: #38a8ff; }
.sq-dias { display: flex; gap: .22vw; direction: ltr; }
.sq-dias i { width: .85vh; height: .85vh; background: #2b3a55; transform: rotate(45deg); }
.sq-dias i.on { background: #38a8ff; box-shadow: 0 0 .5vh rgba(56, 168, 255, .9); }

/* מאמן: משבצת בפינה השמאלית העליונה של המגרש */
.sq-coach { position: absolute; left: 1.2vw; top: .6vh; width: var(--cw); }
.sq-coach .sq-slot { position: relative; left: auto; top: auto; width: 100%; transform: none; }
.sq-coach .sq-pill { color: #7cc4ff; }
.sq-coach .sq-pill-empty { color: #f2b134; }
.sq-coach-label { --u: max(1.2px, .24vh); display: flex; justify-content: center; margin-top: .4vh; opacity: .8; }

/* חלון הפרטים: מחיר משוער בשוק, ולידו אם הקלף סחיר */
.modal-market { flex-wrap: wrap; }
.modal-price { font: 800 clamp(16px, 3.2vh, 32px) "Bahnschrift", "Arial Narrow", "Segoe UI", sans-serif; color: #ffd54a; letter-spacing: .02em; }
.modal-status.locked { background: #b3373a; box-shadow: 0 .4vh 0 #7a2124; }

/* ---------- ספסל ורזרבות ---------- */
.sq-tab {
  position: absolute;
  bottom: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: .8vw;
  height: clamp(32px, 5.2vh, 52px);
  padding: 0 2.6vw;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: rgba(8, 16, 30, .92);
  transition: background .25s, transform .25s var(--ease-out);
}
.sq-tab .px { --u: max(1.6px, .32vh); }
.sq-tab .num { font-size: clamp(9px, 1.5vh, 15px); color: #cfe3ff; }
.sq-tab-subs { left: 0; clip-path: polygon(0 0, 78% 0, 100% 100%, 0 100%); padding-right: 4vw; }
.sq-tab-res { right: 0; clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%); padding-left: 4vw; }
.sq-tab .sq-chev { transform: translateY(.25vh) rotate(-135deg); transition: transform .3s var(--ease-out); }
.sq-tab.open .sq-chev { transform: translateY(-.2vh) rotate(45deg); }
body.input-mouse .sq-tab:hover, .sq-tab.nav-focus { background: rgba(28, 79, 168, .92); }
.sq-tab.nav-focus { outline: none; animation: none; box-shadow: inset 0 -.5vh 0 #ffd54a; }
.sq-tab { animation: sq-tab-in .3s var(--ease-out) backwards; }   /* חוזרות כשהמגירה נסגרת */
@keyframes sq-tab-in { from { opacity: 0; transform: translateY(100%); } }

/* כשספסל או רזרבות פתוחים הלשוניות נעלמות, ובמקומן כפתור קטן על המגירה שסוגר אותה */
.sq-field.drawer-open .sq-tab { display: none; }
.sq-drawer-x {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(26px, 4.2vh, 40px);
  height: clamp(26px, 4.2vh, 40px);
  padding: 0;
  border: 0;
  cursor: pointer;
  background: rgba(28, 79, 168, .45);
  box-shadow: inset 0 0 0 2px #1c4fa8;
  transition: background .2s, transform .2s var(--ease-out);
}
.sq-drawer-x .sq-chev { width: 1.3vh; height: 1.3vh; transform: translateY(-.25vh) rotate(45deg); }
body.input-mouse .sq-drawer-x:hover, .sq-drawer-x.nav-focus { background: rgba(40, 90, 190, .85); }
.sq-drawer-x:active { transform: scale(.92); }
.sq-drawer-x.nav-focus { outline: none; animation: none; box-shadow: inset 0 0 0 2px #ffd54a; }

.sq-drawer {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 5;
  translate: -50% 0;
  width: min(58vw, 118vh);   /* צר מספיק כדי לא לחפוף את הלשוניות בפינות */
  padding: 1.6vh 1.6vw 1.4vh;
  background: linear-gradient(180deg, rgba(8, 18, 36, .94), rgba(5, 10, 22, .97));
  box-shadow: inset 0 0 0 3px #1c4fa8, 0 -1vh 3vh rgba(0, 0, 0, .5);
  clip-path: var(--notch);
}
.sq-drawer[hidden] { display: none; }
.sq-drawer { transform-origin: 50% 100%; }
.sq-drawer.enter { animation: sq-rise .5s cubic-bezier(.2, .9, .3, 1.08) backwards; }
.sq-drawer.leaving { animation: sq-drop .26s ease-in forwards; pointer-events: none; }
@keyframes sq-rise { from { opacity: 0; transform: translateY(7vh) scale(.94); clip-path: inset(40% 0 0 0); } }
@keyframes sq-drop { to { opacity: 0; transform: translateY(6vh) scale(.96); } }
.sq-drawer.enter .sq-slot { animation: sq-slot-in .45s cubic-bezier(.34, 1.56, .64, 1) calc(.12s + var(--i, 0) * 38ms) backwards; }
.sq-drawer.enter .sq-drawer-head { animation: sq-fade .4s ease-out .1s backwards; }
@keyframes sq-slot-in { from { opacity: 0; transform: translateY(3.4vh) scale(.6) rotate(-5deg); } }
@keyframes sq-fade { from { opacity: 0; transform: translateY(1vh); } }
.sq-drawer-head { display: flex; align-items: center; gap: 1.4vw; margin-bottom: 1.2vh; }
.sq-drawer-head .px { --u: max(1.6px, .32vh); }
.sq-drawer-head .px:last-child { --u: max(1.3px, .26vh); opacity: .8; }
.sq-drawer-head > span:last-child { margin-inline-start: auto; }   /* "נספר בדירוג" נדחק לקצה השני */
.sq-drawer[data-kind="bench"] .sq-drawer-x { order: 3; }   /* הספסל נפתח מהצד השמאלי, אז הכפתור בקצה השמאלי; הרזרבות מימין */
.sq-drawer-grid {
  --cw: min(8.2vh, 7vw);
  display: grid;
  grid-template-columns: repeat(7, var(--cw));
  justify-content: space-between;
  gap: 1.2vh 0;
  padding: 1.2vh 1vw 0;
}
#myteam .sq-drawer-grid { --cw: min(9.4vh, 7vw); }   /* בספסל וברזרבות של "הקבוצה שלי" הקלפים גדולים יותר (הדראפט משתמש בגודל הרגיל) */
.sq-drawer .sq-slot { position: relative; left: auto; top: auto; transform: none; justify-self: center; }

/* ---------- בחירת שחקן ---------- */
.pk-panel {
  position: relative;
  width: min(92vw, 200vh);
  height: 86vh;
  display: flex;
  flex-direction: column;
  gap: 1.6vh;
  padding: 2.2vh 2vw;
  background: linear-gradient(170deg, rgba(22, 48, 104, .7), rgba(5, 12, 27, .95) 62%);
  box-shadow: inset 0 0 0 4px #1c4fa8, inset 0 0 0 7px rgba(120, 180, 255, .14);
  clip-path: var(--notch);
}
.modal.open .pk-panel, .modal.open .fm-panel { animation: gal-drop .5s var(--ease-out) backwards; }
.pk-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 2vw; }
.pk-title { display: flex; align-items: center; gap: 1.2vw; }
.pk-title .px { --u: max(1.9px, .38vh); }
.pk-pos {
  padding: .5vh 1.2vw;
  font: 800 clamp(16px, 3vh, 30px) "Bahnschrift", "Arial Narrow", "Segoe UI", sans-serif;
  letter-spacing: .05em;
  color: #0a1e4a;
  background: linear-gradient(180deg, #ffe27a, #ffb300);
}
.pk-btns { display: flex; gap: 1.2vw; }
.pk-btn {
  padding: 1.1vh 2vw;
  border: 0;
  cursor: pointer;
  background: rgba(6, 16, 31, .8);
  box-shadow: inset 0 0 0 3px #1c4fa8;
  clip-path: var(--notch);
  transition: transform .25s var(--ease-out), box-shadow .25s;
}
.pk-btn .px { --u: max(1.6px, .32vh); }
.pk-remove { box-shadow: inset 0 0 0 3px #a8321c; }
body.input-mouse .pk-btn:hover, .pk-btn.nav-focus { transform: scale(1.06); box-shadow: inset 0 0 0 3px #6fb3ff; }
body.input-mouse .pk-remove:hover { box-shadow: inset 0 0 0 3px #ff6a55; }
.pk-btn.nav-focus { outline: none; box-shadow: inset 0 0 0 3px #ffd54a; animation: none; }

.pk-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: .4vh .6vw 1vh; scrollbar-width: thin; scrollbar-color: #1c4fa8 transparent; }
.pk-sec + .pk-sec { margin-top: 2.6vh; padding-top: 2vh; border-top: .4vh solid rgba(120, 180, 255, .18); }
.pk-sec-head { display: flex; align-items: baseline; gap: 1.6vw; margin-bottom: 1.2vh; }
.pk-sec-head .px { --u: max(1.7px, .34vh); }
.pk-sec-head .px:last-child { --u: max(1.3px, .26vh); opacity: .8; }
.pk-none { padding: 1vh 0; opacity: .7; }
.pk-none .px { --u: max(1.4px, .28vh); }
.pk-empty { display: grid; place-items: center; height: 100%; }
.pk-empty .px { --u: max(1.8px, .36vh); }
.pk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(96px, 8.2vw, 160px), 1fr));
  gap: 1.4vh .9vw;
  justify-content: center;
}
.pk-card { animation: none; }
.pk-card.here { outline: 3px solid #38a8ff; outline-offset: .2vh; }
.pk-card.nav-focus { outline: 3px solid #ffd54a; }
.pk-tag {
  position: absolute;
  left: 50%;
  bottom: 1.6vh;
  translate: -50% 0;
  z-index: 2;
  padding: .3vh .9vw;
  white-space: nowrap;
  background: rgba(6, 16, 31, .92);
  box-shadow: inset 0 0 0 2px #1c4fa8;
}
.pk-tag.here { background: #1f6fd0; box-shadow: inset 0 0 0 2px #7fd0ff; }
.pk-tag .px { --u: max(1.2px, .24vh); }

/* ---------- בחירת מערך ---------- */
.fm-panel {
  position: relative;
  width: min(62vw, 118vh);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  gap: 1.6vh;
  padding: 2vh 1.6vw 1.8vh;
  background: linear-gradient(170deg, rgba(22, 48, 104, .72), rgba(5, 12, 27, .96) 62%);
  box-shadow: inset 0 0 0 4px #1c4fa8, inset 0 0 0 7px rgba(120, 180, 255, .14), 0 2vh 6vh rgba(0, 0, 0, .55);
  clip-path: var(--notch);
}
.fm-head { flex: none; display: flex; align-items: center; justify-content: space-between; }
.fm-head .px { --u: max(1.7px, .34vh); }
.fm-scroll { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 1.8vh; padding: .4vh .5vw 1vh; scrollbar-width: thin; scrollbar-color: #1c4fa8 transparent; }
.fm-sec-head { --u: max(1.3px, .26vh); display: flex; align-items: center; gap: 1vw; margin-bottom: 1vh; opacity: .9; }
.fm-sec-head::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, rgba(120, 180, 255, .35), transparent); }
.fm-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.2vh .7vw; }
.fm-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7vh;
  padding: .8vh .4vw .8vh;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: rgba(8, 18, 38, .78);
  box-shadow: inset 0 0 0 2px rgba(60, 110, 200, .55);
  clip-path: var(--notch);
  transition: transform .2s var(--ease-out), box-shadow .2s, background .2s;
}
.fm-tile.cur { background: linear-gradient(170deg, rgba(40, 120, 220, .5), rgba(10, 30, 70, .8)); box-shadow: inset 0 0 0 2px #38a8ff, 0 0 1.4vh rgba(56, 168, 255, .35); }
.fm-tile.cur::after { content: ""; position: absolute; top: .6vh; left: .5vw; width: 1.1vh; height: 1.1vh; background: #38a8ff; transform: rotate(45deg); box-shadow: 0 0 .8vh #38a8ff; }
body.input-mouse .fm-tile:hover, .fm-tile.nav-focus { transform: translateY(-.4vh) scale(1.04); background: rgba(40, 90, 190, .6); box-shadow: inset 0 0 0 2px #6fb3ff; z-index: 2; }
.fm-tile.nav-focus { outline: none; animation: none; box-shadow: inset 0 0 0 2px #ffd54a; }
.fm-mini { width: 100%; aspect-ratio: 1.2 / 1; background: radial-gradient(ellipse at 70% 100%, rgba(25, 163, 79, .35), transparent 70%), linear-gradient(160deg, #0a2f44, #0c4a49); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.fm-mini svg { width: 100%; height: 100%; display: block; }
.fm-name { font: 800 clamp(9px, 1.7vh, 16px) "Bahnschrift", "Arial Narrow", "Segoe UI", sans-serif; letter-spacing: .02em; white-space: nowrap; text-align: center; text-shadow: 0 .3vh 0 rgba(0, 0, 0, .5); }

/* ---------- פירוט הכימיה ---------- */
.sq-chem { cursor: pointer; transition: transform .25s var(--ease-out), box-shadow .25s, background .25s; }
body.input-mouse .sq-chem:hover, .sq-chem.nav-focus { transform: translateY(-.3vh); background: rgba(40, 90, 190, .6); box-shadow: inset 0 0 0 3px #6fb3ff; }
.sq-chem.nav-focus { outline: none; animation: none; box-shadow: inset 0 0 0 3px #ffd54a; }

.cm-panel {
  position: relative;
  width: min(54vw, 104vh);
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  gap: 1.4vh;
  padding: 2vh 1.8vw 1.8vh;
  background: linear-gradient(170deg, rgba(22, 48, 104, .72), rgba(5, 12, 27, .96) 62%);
  box-shadow: inset 0 0 0 4px #1c4fa8, inset 0 0 0 7px rgba(120, 180, 255, .14), 0 2vh 6vh rgba(0, 0, 0, .55);
  clip-path: var(--notch);
}
.modal.open .cm-panel { animation: gal-drop .5s var(--ease-out) backwards; }
.cm-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 2vw; }
.cm-title { display: flex; align-items: center; gap: 1.4vw; }
.cm-title .px { --u: max(1.9px, .38vh); }
.cm-total { font-size: clamp(12px, 2.4vh, 24px); color: #7cc4ff; }
.cm-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #1c4fa8 transparent; background: rgba(8, 18, 36, .6); box-shadow: inset 0 0 0 2px rgba(60, 110, 200, .45); }

/* טבלה: כמות בהרכב | נקודות נוכחיות | הסף הבא */
.cm-row {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1.3fr;
  align-items: center;
  border-bottom: 2px solid rgba(60, 110, 200, .3);
}
.modal.open .cm-row:not(.cm-heads) { animation: cm-row-in .45s var(--ease-out) calc(.12s + var(--i, 0) * 45ms) backwards; }
@keyframes cm-row-in { from { opacity: 0; transform: translateX(3vw); } }
.cm-heads { position: sticky; top: 0; z-index: 2; background: rgba(12, 28, 58, .96); }
.cm-heads .px { --u: max(1.4px, .28vh); }
.cm-cell { display: flex; align-items: center; justify-content: center; gap: .6vw; padding: 1.1vh .8vw; min-height: 7.4vh; }
.cm-heads .cm-cell { min-height: 5vh; }
.cm-who { justify-content: flex-start; gap: 1.2vw; padding-inline-start: 1.4vw; }
.cm-emblem { height: 4.6vh; width: 4.6vh; flex: none; object-fit: contain; image-rendering: auto; }
.cm-emblem.flag { border-radius: 50%; box-shadow: 0 .4vh .6vh rgba(0, 0, 0, .4); }
.cm-names { display: flex; flex-direction: column; gap: .6vh; min-width: 0; }
.cm-name { font: 800 clamp(10px, 1.7vh, 17px) "Bahnschrift", "Arial Narrow", "Segoe UI", sans-serif; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-people { display: flex; gap: .35vw; direction: ltr; }

/* אדם (ראש וגוף) ויהלום, מצוירים ב-CSS */
.cm-person { position: relative; display: inline-block; width: 1.5vh; height: 2.2vh; flex: none; opacity: .9; }
.cm-person::before { content: ""; position: absolute; left: 50%; top: 0; width: 1vh; height: 1vh; translate: -50% 0; border-radius: 50%; background: #2d4468; }
.cm-person::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.1vh; border-radius: 1vh 1vh .2vh .2vh; background: #2d4468; }
.cm-person.on::before, .cm-person.on::after { background: #38a8ff; }
.cm-person.coach::before, .cm-person.coach::after { background: #ffd54a; }
.cm-dias { display: flex; gap: .55vw; direction: ltr; }
.cm-dias i { width: 1.9vh; height: 1.9vh; background: #243752; transform: rotate(45deg); }
.cm-dias i.on { background: #38a8ff; box-shadow: 0 0 .8vh rgba(56, 168, 255, .8); }
.cm-next { gap: .7vw; direction: ltr; }
.cm-next .num { font-size: clamp(11px, 2vh, 20px); }
.cm-arrow { width: 1vh; height: 1vh; border-top: .4vh solid #8fb4e8; border-right: .4vh solid #8fb4e8; transform: rotate(45deg); margin: 0 .3vw; }
.cm-max { --u: max(1.5px, .3vh); display: flex; padding: .5vh 1vw; background: #2f9e44; box-shadow: 0 .3vh 0 #1b6a2c; }
.cm-empty { display: grid; place-items: center; padding: 6vh 2vw; text-align: center; }
.cm-notes { display: flex; flex-direction: column; gap: .7vh; padding: 1.4vh 1.4vw 1.6vh; }
.cm-notes .px { --u: max(1.2px, .24vh); opacity: .85; }

@media (prefers-reduced-motion: reduce) {
  .modal.open .cm-row:not(.cm-heads) { animation: none !important; }

  .sq-tab, .sq-slots.intro .sq-slot, .sq-drawer.enter, .sq-drawer.enter .sq-slot, .sq-drawer.leaving, .sq-slot.landed .sq-card, .sq-slot.landed::before, .sq-slot.selected .sq-card { animation: none !important; }
}

/* ============================================================
   "הקבוצה שלי" בגרפיט ושחור, בצבעי הרקע הניטרלי (22.11.2026). תלוי באותו מתג: class="bg-neutral" על <html>.
   רק העמוד הזה והחלונות שלו. הזהב, צבעי הכימיה וטבעת הפוקוס נשארים. המגרש עצמו ב-js/pitch.js (graphite)
   ============================================================ */
html.bg-neutral :is(#myteam, #sq-picker, #sq-formations, #sq-chem-modal, #sq-card-modal) {
  --g-line: #5a606c;
  --g-soft: rgba(210, 216, 228, .14);
  --g-panel: rgba(16, 17, 21, .88);
  --g-grad: linear-gradient(170deg, rgba(64, 68, 78, .76), rgba(13, 14, 17, .97) 62%);
  --g-hover: rgba(112, 119, 133, .62);
  --g-hi: #e2e5ea;
}

/* שורת המידע, חזרה ויתרה */
html.bg-neutral #myteam :is(.sq-cell, .gal-back, .coin-balance) { background: var(--g-panel); }
html.bg-neutral #myteam :is(.sq-cell, .gal-back, .coin-balance):not(.nav-focus) { box-shadow: inset 0 0 0 3px var(--g-line), inset 0 0 0 5px var(--g-soft); }
html.bg-neutral body.input-mouse #myteam :is(.sq-fm, .sq-chem, .gal-back):hover,
html.bg-neutral #myteam :is(.sq-fm, .sq-chem, .gal-back).nav-focus { background: var(--g-hover); }
html.bg-neutral body.input-mouse #myteam :is(.sq-fm, .sq-chem, .gal-back):hover:not(.nav-focus) { box-shadow: inset 0 0 0 3px var(--g-hi); }
html.bg-neutral #myteam .wallet-sep { background: rgba(210, 216, 228, .32); }
html.bg-neutral #myteam .sq-name-input { background: rgba(16, 17, 21, .94); }
html.bg-neutral #myteam .sq-stars i:not(.full):not(.half) { background: #3b3e46; }
html.bg-neutral #myteam .sq-stars i.half { background: linear-gradient(90deg, #ffcb3d 50%, #3b3e46 50%); }
html.bg-neutral #myteam .sq-chem-bar { box-shadow: inset 0 0 0 2px rgba(210, 216, 228, .32); }

/* משבצות על המגרש */
html.bg-neutral #myteam .sq-pill { background: rgba(10, 10, 12, .9); }
html.bg-neutral #myteam .sq-dias i:not(.on) { background: #3b3e46; }

/* ספסל ורזרבות */
html.bg-neutral #myteam .sq-tab { background: rgba(16, 17, 21, .94); }
html.bg-neutral body.input-mouse #myteam .sq-tab:hover, html.bg-neutral #myteam .sq-tab.nav-focus { background: rgba(86, 92, 104, .94); }
html.bg-neutral #myteam .sq-drawer { background: linear-gradient(180deg, rgba(32, 34, 40, .96), rgba(12, 13, 16, .98)); box-shadow: inset 0 0 0 3px var(--g-line), 0 -1vh 3vh rgba(0, 0, 0, .5); }
html.bg-neutral #myteam .sq-drawer-x { background: rgba(112, 119, 133, .35); }
html.bg-neutral #myteam .sq-drawer-x:not(.nav-focus) { box-shadow: inset 0 0 0 2px var(--g-line); }
html.bg-neutral body.input-mouse #myteam .sq-drawer-x:hover, html.bg-neutral #myteam .sq-drawer-x.nav-focus { background: var(--g-hover); }

/* פס הפעולות בטלפון */
html.bg-neutral #myteam .m-actions { background: rgba(16, 17, 21, .96); box-shadow: inset 0 0 0 3px var(--g-line), 0 6px 18px rgba(0, 0, 0, .5); }

/* החלונות: בחירת שחקן, מערך, כימיה, הגדלת קלף */
html.bg-neutral :is(#sq-picker, #sq-formations, #sq-chem-modal, #sq-card-modal) .modal-backdrop { background: radial-gradient(ellipse at center, rgba(34, 36, 42, .86), rgba(5, 5, 7, .95)); }
html.bg-neutral :is(#sq-picker, #sq-formations, #sq-chem-modal) :is(.pk-panel, .fm-panel, .cm-panel) { background: var(--g-grad); box-shadow: inset 0 0 0 4px var(--g-line), inset 0 0 0 7px var(--g-soft), 0 2vh 6vh rgba(0, 0, 0, .55); }
html.bg-neutral :is(#sq-picker, #sq-formations, #sq-chem-modal) :is(.pk-scroll, .fm-scroll, .cm-scroll) { scrollbar-color: var(--g-line) transparent; }
html.bg-neutral :is(#myteam, #sq-picker, #sq-formations, #sq-chem-modal, #sq-card-modal) :is(.pk-btn, .modal-close) { background: var(--g-panel); }
html.bg-neutral :is(#myteam, #sq-picker, #sq-formations, #sq-chem-modal, #sq-card-modal) :is(.pk-btn, .modal-close):not(.pk-remove):not(.nav-focus) { box-shadow: inset 0 0 0 3px var(--g-line); }
html.bg-neutral body.input-mouse :is(#myteam, #sq-picker, #sq-formations, #sq-chem-modal, #sq-card-modal) :is(.pk-btn, .modal-close):hover:not(.pk-remove):not(.nav-focus) { box-shadow: inset 0 0 0 3px var(--g-hi); }

html.bg-neutral #sq-picker .pk-sec + .pk-sec { border-top-color: rgba(210, 216, 228, .16); }
html.bg-neutral #sq-picker .pk-tag:not(.here) { background: rgba(16, 17, 21, .94); box-shadow: inset 0 0 0 2px var(--g-line); }
html.bg-neutral #sq-picker .pk-tag.here { background: #6d7381; box-shadow: inset 0 0 0 2px var(--g-hi); }
html.bg-neutral #sq-picker .pk-card.here:not(.nav-focus) { outline-color: var(--g-hi); }

html.bg-neutral #sq-formations .fm-sec-head::after { background: linear-gradient(90deg, rgba(210, 216, 228, .32), transparent); }
html.bg-neutral #sq-formations .fm-tile { background: rgba(24, 26, 31, .84); }
html.bg-neutral #sq-formations .fm-tile:not(.nav-focus) { box-shadow: inset 0 0 0 2px rgba(120, 127, 140, .55); }
html.bg-neutral #sq-formations .fm-tile.cur { background: linear-gradient(170deg, rgba(120, 127, 140, .55), rgba(30, 32, 38, .9)); }
html.bg-neutral #sq-formations .fm-tile.cur:not(.nav-focus) { box-shadow: inset 0 0 0 2px var(--g-hi), 0 0 1.4vh rgba(226, 229, 234, .25); }
html.bg-neutral #sq-formations .fm-tile.cur::after { background: var(--g-hi); box-shadow: 0 0 .8vh var(--g-hi); }
html.bg-neutral body.input-mouse #sq-formations .fm-tile:hover, html.bg-neutral #sq-formations .fm-tile.nav-focus { background: var(--g-hover); }
html.bg-neutral body.input-mouse #sq-formations .fm-tile:hover:not(.nav-focus) { box-shadow: inset 0 0 0 2px var(--g-hi); }
html.bg-neutral #sq-formations .fm-mini { background: radial-gradient(ellipse at 70% 100%, rgba(169, 180, 200, .22), transparent 70%), linear-gradient(160deg, #17191e, #2a2d35); }

html.bg-neutral #sq-chem-modal .cm-scroll { background: rgba(20, 21, 25, .66); box-shadow: inset 0 0 0 2px rgba(120, 127, 140, .45); }
html.bg-neutral #sq-chem-modal .cm-row { border-bottom-color: rgba(120, 127, 140, .3); }
html.bg-neutral #sq-chem-modal .cm-heads { background: rgba(38, 40, 47, .97); }
html.bg-neutral #sq-chem-modal .cm-person:not(.on):not(.coach)::before,
html.bg-neutral #sq-chem-modal .cm-person:not(.on):not(.coach)::after { background: #474b54; }
html.bg-neutral #sq-chem-modal .cm-dias i:not(.on) { background: #3b3e46; }
html.bg-neutral #sq-chem-modal .cm-arrow { border-color: #aab0bb; }
