/* Layout A — collectible depth-chart cards (live team view) */
#teamView {
  --dc-border: rgba(255,255,255,0.08);
  --dc-text: #e8ecf2;
  --dc-muted: #7a8498;
  --dc-soft: #9aa3b2;
  --dc-gold: #ffa64d;
  --dc-gold-glow: rgba(255,166,77,0.45);
  --dc-radius: 18px;
  --dc-ease: cubic-bezier(.22,.9,.28,1);
  --team: #E03A3E;
}

#teamView .team-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(220px, 1.2fr) minmax(180px, 0.9fr) auto;
  gap: 0;
  align-items: stretch;
  margin-bottom: 28px;
  padding: 0;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 120% at 12% 50%, var(--thWash28, rgba(224,58,62,0.40)), transparent 55%),
    linear-gradient(115deg, var(--thWash14, rgba(224,58,62,0.22)) 0%, transparent 42%),
    linear-gradient(180deg, #141922 0%, #0c1018 100%) !important;
}
#teamView .team-hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(
      -32deg,
      transparent 0 18px,
      var(--thWash07, rgba(224,58,62,0.10)) 18px 20px
    );
  pointer-events: none;
  opacity: 0.9;
}
#teamView .team-hero::after {
  content: "";
  position: absolute;
  right: 18%; top: 10%; bottom: 10%;
  width: 1px;
  background: rgba(255,255,255,0.08);
  pointer-events: none;
}

#teamView .thero-col {
  position: relative; z-index: 1;
  padding: 22px 24px;
  display: flex; flex-direction: column; justify-content: center;
}
#teamView .thero-col + .thero-col {
  border-left: 1px solid rgba(255,255,255,0.08);
}
#teamView .thero-logo-col {
  padding: 20px 18px 20px 22px;
  align-items: flex-start;
}
#teamView .team-hero .thero-logo {
  width: 96px; height: 96px; border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, var(--thWash42, rgba(224,58,62,0.42)), transparent 60%),
    rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 0 32px var(--thWash38, rgba(224,58,62,0.38));
  display: grid; place-items: center; overflow: hidden; flex-shrink: 0;
  position: relative;
}
#teamView .team-hero .thero-logo img {
  position: relative; inset: auto;
  width: 78%; height: 78%; object-fit: contain;
}
#teamView .team-hero .thero-logo .fb {
  font-size: 22px; font-weight: 900; color: rgba(255,255,255,0.7);
}

#teamView .thero-loc {
  font-size: 11px; font-weight: 800; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--thBgA, var(--team)); margin-bottom: 6px;
}
#teamView .team-hero h2 {
  margin: 0; font-size: 30px; font-weight: 900;
  letter-spacing: 0.5px; text-transform: uppercase; line-height: 1.1;
}
#teamView .team-hero .tsub {
  margin-top: 8px; margin-bottom: 0; color: rgba(255,255,255,0.78); font-size: 14px;
}
#teamView .team-hero .thero-rec {
  font-weight: 800;
}
/* W–L: green above .500, red below, yellow even (incl. 0–0) */
#teamView .team-hero .thero-rec--pos { color: #7be07b; }
#teamView .team-hero .thero-rec--neg { color: #ff6b6b; }
#teamView .team-hero .thero-rec--even { color: #ffd089; }
#teamView .team-hero .coach-info { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
#teamView .team-hero .coach-shot {
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14);
  display: grid; place-items: center; font-weight: 800; color: var(--dc-soft); font-size: 13px;
  overflow: hidden; flex-shrink: 0;
}
#teamView .team-hero .coach-shot img { width: 100%; height: 100%; object-fit: cover; }
#teamView .team-hero .coach-label { font-size: 10px; color: var(--dc-muted); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700; }
#teamView .team-hero .coach-name { font-size: 14px; font-weight: 600; }

#teamView .thero-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 22px;
  align-content: center;
}
#teamView .fact-lbl {
  font-size: 10px; font-weight: 700; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--dc-muted); margin-bottom: 4px;
}
#teamView .fact-val { font-size: 15px; font-weight: 700; color: var(--dc-text); }

#teamView .season-controls {
  display: flex; flex-direction: column; align-items: stretch; gap: 10px;
  min-width: 168px;
}
#teamView .season-lbl {
  font-size: 10px; font-weight: 700; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--dc-muted);
}
#teamView .season-select {
  background: #151b27; color: #6dcea0; border: 1px solid rgba(80,200,120,0.55);
  border-radius: 8px; padding: 9px 12px; font-size: 13px; width: 100%;
  font-weight: 700;
}
#teamView .season-select.season-prev {
  color: #c9b6ff;
  border-color: rgba(168,130,255,0.55);
}
#teamView .season-select option { background: #151b27; color: var(--dc-text); font-weight: 600; }

#teamView .depth-section-head,
#teamView #depthStartersTitle {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 0 0 16px; flex-wrap: wrap;
  font-size: 13px; font-weight: 800; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--dc-text);
}
#teamView .flip-hint {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--dc-gold);
}
#teamView .flip-hint span { opacity: 0.7; font-size: 14px; }

#teamView .dc-starters {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  overflow: visible;
  padding: 8px 4px 28px;
}

#teamView .scard-shell.starter-card,
#teamView .scard-shell.roster-card {
  display: block;
  background: transparent;
  border: none;
  padding: 0;
  align-items: stretch;
  gap: 0;
  text-align: left;
  flex-direction: unset;
  box-shadow: none;
}
#teamView .scard-shell.starter-card:hover,
#teamView .scard-shell.roster-card:hover {
  transform: none;
  background: transparent;
  border: none;
  outline: none;
}
#teamView .scard-shell.roster-card.dim {
  opacity: 1;
}

#teamView .scard-shell {
  position: relative;
  height: 420px;
  perspective: 1100px;
  opacity: 1;
  animation: dcCardIn 420ms var(--dc-ease) forwards;
  z-index: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Beat legacy .depth-chart.starters-row .starter-card mobile flex sizing */
#teamView .dc-starters.depth-chart .scard-shell.starter-card {
  flex: unset;
  width: 100%;
  height: 420px;
  max-width: none;
}
#teamView .dc-starters .scard-shell:nth-child(1) { animation-delay: 40ms; }
#teamView .dc-starters .scard-shell:nth-child(2) { animation-delay: 90ms; }
#teamView .dc-starters .scard-shell:nth-child(3) { animation-delay: 140ms; }
#teamView .dc-starters .scard-shell:nth-child(4) { animation-delay: 190ms; }
#teamView .dc-starters .scard-shell:nth-child(5) { animation-delay: 240ms; }

@keyframes dcCardIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#teamView .scard-hover {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transform: translateY(0) rotateX(var(--rx)) rotateY(var(--ry)) scale(1);
  transition: transform 220ms var(--dc-ease);
}
#teamView .scard-shell:not(.flipped):hover { z-index: 20; }
#teamView .scard-shell:not(.flipped):hover .scard-hover {
  transform: translateY(-12px) rotateX(var(--rx)) rotateY(var(--ry)) scale(1.03);
}
#teamView .scard-shell:not(.flipped):hover .face-front {
  border-color: rgba(255,166,77,0.85);
  box-shadow:
    0 0 0 1px rgba(255,166,77,0.4),
    0 0 32px var(--dc-gold-glow),
    0 20px 40px rgba(0,0,0,0.55);
}
#teamView .scard-shell:not(.flipped):hover .scard-art img {
  transform: translateX(-50%) translateY(-6px) scale(1.03);
}
#teamView .scard-shell--sm:not(.flipped):hover .scard-art img {
  transform: translateX(-50%) translateY(-4px) scale(1.02);
}

#teamView .scard {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transform: rotateY(0deg);
  transition: transform 520ms var(--dc-ease);
  cursor: pointer;
}
#teamView .scard.is-flipped { transform: rotateY(180deg); }
#teamView .scard-shell.flipped { z-index: 21; }
#teamView .scard-shell.flipped .face-back {
  border-color: rgba(255,166,77,0.85);
  box-shadow:
    0 0 0 1px rgba(255,166,77,0.4),
    0 0 32px var(--dc-gold-glow),
    0 18px 40px rgba(0,0,0,0.55);
}

#teamView .face {
  position: absolute; inset: 0;
  border-radius: var(--dc-radius);
  border: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: border-color 220ms, box-shadow 220ms;
  cursor: pointer;
}
#teamView .face-front {
  background:
    linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 100%),
    linear-gradient(145deg, color-mix(in srgb, var(--team) 55%, #1a2030) 0%, var(--team) 42%, #0a0d14 100%);
  display: flex; flex-direction: column;
}
#teamView .face-back {
  background: linear-gradient(180deg, #121722 0%, #0c1018 100%);
  transform: rotateY(180deg);
  padding: 14px 14px 40px;
  display: flex; flex-direction: column;
  gap: 12px;
}

#teamView .scard-badge {
  position: absolute; top: 12px; left: 12px; z-index: 5;
  background: var(--team); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: 0.6px;
  padding: 4px 8px; border-radius: 6px;
}
#teamView .scard-num {
  position: absolute; top: 8px; right: 10px; z-index: 5;
  font-size: 42px; font-weight: 900; line-height: 1;
  color: rgba(255,255,255,0.34); letter-spacing: -1px;
  pointer-events: none; user-select: none;
}
#teamView .scard-art {
  position: relative; z-index: 2;
  height: 230px; flex-shrink: 0;
  overflow: hidden;
}
#teamView .scard-art::after {
  content: "";
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: var(--team);
  opacity: 0.12;
}
#teamView .scard-art img {
  position: absolute; left: 50%; top: 32px;
  width: 100%; height: calc(108% - 22px);
  transform: translateX(-50%) scale(1);
  object-fit: cover;
  object-position: center 18%;
  display: block;
  pointer-events: none;
  transition: transform 220ms var(--dc-ease);
}
#teamView .scard-art .dinit {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 42px; font-weight: 900; color: rgba(255,255,255,0.35); z-index: 1;
}

#teamView .scard-body {
  position: relative; z-index: 4;
  margin-top: -28px;
  padding: 28px 14px 42px;
  background: linear-gradient(180deg, transparent 0%, rgba(8,10,14,0.72) 22%, #0c1018 55%);
  flex: 1;
}
#teamView .scard-fname { font-size: 12px; color: var(--dc-soft); font-weight: 500; }
#teamView .scard-lname { font-size: 18px; font-weight: 800; line-height: 1.15; margin-top: 1px; }
#teamView .scard-vitals {
  margin-top: 6px; font-size: 11px; color: var(--dc-muted);
  display: flex; flex-wrap: wrap; gap: 0 6px;
}
#teamView .scard-vitals span::after { content: "·"; margin-left: 6px; color: rgba(255,255,255,0.2); }
#teamView .scard-vitals span:last-child::after { content: none; }

#teamView .scard-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
#teamView .scard-stats .stat { text-align: center; }
#teamView .scard-stats .stat b { display: block; font-size: 13px; font-weight: 800; color: var(--dc-text); }
#teamView .scard-stats .stat span {
  font-size: 9px; font-weight: 700; letter-spacing: 0.5px;
  color: var(--dc-muted); text-transform: uppercase;
}

#teamView .scard-cta {
  margin-top: 12px; width: 100%;
  background: transparent; color: var(--dc-gold);
  border: 1px solid rgba(255,166,77,0.35);
  border-radius: 10px; padding: 9px 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.3px;
  cursor: pointer; transition: background 180ms, border-color 180ms;
}
#teamView .scard-cta:hover { background: rgba(255,166,77,0.1); border-color: rgba(255,166,77,0.7); }

#teamView .scard-flip-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 30;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255,166,77,0.45);
  background: rgba(8,10,14,0.72);
  color: var(--dc-gold);
  font-size: 15px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  transition: background 160ms, border-color 160ms, transform 160ms, color 160ms;
  /* Sit above the 3D card so flip works every time (front + back) */
  transform: translateZ(40px);
  pointer-events: auto;
}
#teamView .scard-flip-btn:hover {
  background: rgba(255,166,77,0.18);
  border-color: rgba(255,166,77,0.85);
  color: #ffc27a;
  transform: translateZ(40px) scale(1.06);
}
#teamView .scard-flip-btn:focus-visible {
  outline: 2px solid rgba(255,166,77,0.9);
  outline-offset: 2px;
}
#teamView .scard-shell--sm .scard-flip-btn {
  right: 7px;
  bottom: 7px;
  width: 26px;
  height: 26px;
  font-size: 13px;
}
#teamView .back-flip-note {
  text-align: center;
  font-size: 9px; font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase; color: var(--dc-muted);
  padding-right: 34px;
}
/* Only the visible face should receive player-page clicks */
#teamView .scard:not(.is-flipped) .face-back { pointer-events: none; }
#teamView .scard.is-flipped .face-front { pointer-events: none; }

#teamView .back-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
}
#teamView .back-name {
  font-size: 15px; font-weight: 900; letter-spacing: 0.4px;
  text-transform: uppercase; line-height: 1.15;
}
#teamView .back-pos {
  margin-top: 3px; font-size: 10px; font-weight: 800;
  letter-spacing: 0.5px; color: var(--team); text-transform: uppercase;
}
#teamView .back-logo {
  width: 34px; height: 34px; flex-shrink: 0;
  display: grid; place-items: center;
}
#teamView .back-logo img { width: 100%; height: 100%; object-fit: contain; }
#teamView .back-lbl {
  font-size: 9px; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; color: var(--dc-gold); margin-bottom: 4px;
}
#teamView .back-txt { font-size: 11px; color: var(--dc-text); line-height: 1.35; }
#teamView .back-txt.sub { color: var(--dc-soft); font-size: 10.5px; }

#teamView .career-bar {
  display: flex; height: 7px; border-radius: 999px; overflow: hidden;
  margin: 8px 0 6px; background: rgba(255,255,255,0.06);
}
#teamView .career-bar i { display: block; height: 100%; }
#teamView .career-logos {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 2px;
}
#teamView .career-logos img { width: 18px; height: 18px; object-fit: contain; }
#teamView .career-years {
  display: flex; justify-content: space-between; gap: 4px;
  font-size: 9px; color: var(--dc-muted); font-weight: 600;
}

#teamView .contract-salary { font-size: 13px; font-weight: 800; color: var(--dc-text); }
#teamView .contract-exp { font-size: 11px; color: var(--dc-soft); }
#teamView .contract-option { font-size: 10.5px; color: var(--dc-gold); font-weight: 600; }
#teamView .contract-rookie {
  display: inline-block; margin-top: 2px;
  font-size: 9px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase;
  color: #7dd3fc;
  border: 1px solid rgba(125,211,252,0.35);
  border-radius: 6px; padding: 3px 7px; width: fit-content;
}

#teamView .career-stats {
  margin-top: auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  padding: 12px 8px;
  min-height: 64px;
  align-content: center;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 11px;
  background: rgba(255,255,255,0.04);
}
#teamView .cstat { text-align: center; }
#teamView .cstat b { display: block; font-size: 15px; font-weight: 900; letter-spacing: -0.2px; }
#teamView .cstat span {
  display: block; margin-top: 3px;
  font-size: 8px; font-weight: 700; letter-spacing: 0.45px;
  color: var(--dc-muted); text-transform: uppercase;
}

#teamView .bench-wrap { margin-top: 28px; }
#teamView .bench-section-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 0 0 12px; flex-wrap: wrap;
}
#teamView .bench-section-header .depth-section-title,
#teamView .bench-section-header .bench-title {
  margin: 0;
  font-size: 13px; font-weight: 800; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--dc-text);
}
#teamView .dc-bench-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  perspective: 1200px;
  padding: 8px 2px 20px;
  justify-items: center;
  align-items: start;
}

#teamView .scard-shell--sm {
  /* Smaller than starters so the depth chart hierarchy is obvious */
  width: 86%;
  max-width: 210px;
  height: 338px;
  opacity: 1;
  animation: none;
}
/*
  Art well stays tall enough vs card width for height-based cover
  (head + shoulders), while the whole bench card stays smaller than starters.
*/
#teamView .scard-shell--sm .scard-art { height: 168px; }
#teamView .scard-shell--sm .scard-art img {
  top: 22px;
  bottom: auto;
  left: 50%;
  width: 100%;
  height: calc(108% - 14px);
  max-width: none;
  min-width: 0;
  transform: translateX(-50%) scale(1);
  object-fit: cover;
  object-position: center 18%;
}
#teamView .scard-shell--sm .scard-num { font-size: 28px; top: 6px; right: 7px; }
#teamView .scard-shell--sm .scard-badge { top: 7px; left: 7px; font-size: 9px; padding: 3px 6px; }
#teamView .scard-shell--sm .scard-body { margin-top: -14px; padding: 16px 10px 36px; }
#teamView .scard-shell--sm .scard-fname { font-size: 11px; }
#teamView .scard-shell--sm .scard-lname { font-size: 14px; line-height: 1.15; }
#teamView .scard-shell--sm .scard-vitals { font-size: 10.5px; margin-top: 5px; }
#teamView .scard-shell--sm .scard-stats {
  display: grid;
  margin-top: 8px;
  padding-top: 8px;
  gap: 2px;
}
#teamView .scard-shell--sm .scard-stats .stat b { font-size: 12px; }
#teamView .scard-shell--sm .scard-stats .stat span { font-size: 8px; }
#teamView .scard-shell--sm .scard-cta {
  margin-top: 8px; padding: 7px 8px; font-size: 10px; border-radius: 8px;
}
#teamView .scard-shell--sm .face-back { padding: 10px 10px 36px; gap: 8px; }
#teamView .scard-shell--sm .back-name { font-size: 12px; }
#teamView .scard-shell--sm .back-pos { font-size: 9px; }
#teamView .scard-shell--sm .back-logo { width: 24px; height: 24px; }
#teamView .scard-shell--sm .back-lbl { font-size: 8px; margin-bottom: 2px; }
#teamView .scard-shell--sm .back-txt { font-size: 10px; }
#teamView .scard-shell--sm .back-txt.sub { font-size: 9px; }
#teamView .scard-shell--sm .career-logos img { width: 14px; height: 14px; }
#teamView .scard-shell--sm .career-bar { height: 5px; margin: 5px 0 4px; }
#teamView .scard-shell--sm .career-years { font-size: 8px; }
#teamView .scard-shell--sm .contract-salary { font-size: 11px; }
#teamView .scard-shell--sm .contract-exp { font-size: 10px; }
#teamView .scard-shell--sm .contract-option { font-size: 9px; }
#teamView .scard-shell--sm .contract-rookie { font-size: 8px; padding: 2px 5px; }
#teamView .scard-shell--sm .career-stats {
  padding: 8px 4px; gap: 3px; border-radius: 9px; min-height: 48px;
}
#teamView .scard-shell--sm .cstat b { font-size: 12px; }
#teamView .scard-shell--sm .cstat span { font-size: 7px; margin-top: 2px; }
#teamView .scard-shell--sm .back-flip-note { font-size: 8px; }

#teamView .scard-shell--empty {
  height: 420px;
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: var(--dc-radius);
  display: grid; place-items: center;
  background: rgba(255,255,255,0.02);
  opacity: 1; animation: none;
}
#teamView .scard-shell--empty.scard-shell--sm { height: 338px; width: 86%; max-width: 210px; }

#teamView .gleague-wrap { margin-top: 24px; }
#teamView .gleague-wrap .scard-shell--sm {
  opacity: 0.55;
  transition: opacity 220ms var(--dc-ease);
}
#teamView .gleague-wrap .scard-shell--sm:hover,
#teamView .gleague-wrap .scard-shell--sm.flipped { opacity: 0.88; }
#teamView .gleague-wrap .scard-shell--sm .face-front {
  border-color: rgba(255,255,255,0.06);
  filter: grayscale(0.25);
}
#teamView .gleague-wrap .scard-badge { background: #4a5568; opacity: 0.9; }
#teamView .gleague-wrap .scard-art img { opacity: 0.75; }
#teamView .gleague-wrap .scard-lname,
#teamView .gleague-wrap .scard-fname { color: rgba(232,236,242,0.7); }
#teamView .gleague-wrap .scard-cta {
  opacity: 0.7;
  border-color: rgba(255,255,255,0.15);
  color: rgba(255,166,77,0.65);
}

#teamView .scard-shell .roster-delete-btn,
#teamView .scard-shell .roster-gleague-btn,
#teamView .scard-shell .roster-bench-return-btn,
#teamView .scard-shell .inj-return-btn {
  position: absolute; z-index: 30;
}
#teamView .scard-shell .roster-delete-btn { top: 6px; right: 6px; }
#teamView .scard-shell .roster-gleague-btn,
#teamView .scard-shell .starter-gleague-btn {
  bottom: 8px; left: 8px; right: 8px; top: auto;
}
#teamView .scard-shell .dinjury { z-index: 30; }

body.edit-mode #teamView .scard-shell {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: element;
}
body.edit-mode #teamView .scard-shell.dragging { opacity: 0.4; }
body.edit-mode #teamView .scard-shell.drag-over {
  outline: 2px dashed rgba(255,166,77,0.6);
}
body.edit-mode #teamView .scard-shell img,
body.edit-mode #teamView .scard-shell .scard-art,
body.edit-mode #teamView .scard-shell .scard-body {
  -webkit-user-drag: none;
  pointer-events: none;
}
body.edit-mode #teamView .scard-shell button {
  cursor: pointer; pointer-events: auto; -webkit-user-drag: none;
}
body.edit-mode #teamView .scard-shell:not(.flipped):hover .scard-hover {
  transform: none;
}

@media (max-width: 1100px) {
  #teamView .dc-starters,
  #teamView .dc-bench-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  #teamView .team-hero { grid-template-columns: 1fr 1fr; }
  #teamView .team-hero::after { display: none; }
  #teamView .thero-logo-col { grid-column: 1 / -1; }
  #teamView .thero-identity {
    grid-column: 1 / -1;
    border-left: none !important;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
}
@media (max-width: 720px) {
  #teamView .team-hero { grid-template-columns: 1fr; }
  #teamView .thero-col + .thero-col {
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  #teamView .dc-starters {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    gap: 14px; padding: 12px 4px 24px;
  }
  #teamView .dc-starters .scard-shell,
  #teamView .dc-starters .scard-shell.starter-card {
    flex: 0 0 72vw; max-width: 280px; height: 400px; scroll-snap-align: start;
    width: auto;
  }
  /* Bench / injured / G-League: vertical page scroll (2-up), not sideways swipe */
  #teamView .dc-bench-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 10px;
    overflow: visible;
    padding: 4px 2px 20px;
    justify-items: center;
  }
  #teamView .dc-bench-grid .scard-shell--sm,
  #teamView .dc-bench-grid .scard-shell--empty {
    flex: unset;
    width: 100%;
    max-width: 200px;
    height: 330px;
    scroll-snap-align: unset;
  }
}
