/* Live roster + protest form. Builds on styles.css tokens (jersey black, electric blue). */
:root {
  --ava: 64px;
  --sheet-gap: 2px;
  --bar-bg: rgba(11, 11, 11, 0.92);
}

/* ---------- Compact hero for the inner pages ---------- */
.hero.slim { padding-bottom: clamp(40px, 7vw, 72px); }
.hero.slim h1 { margin-top: clamp(24px, 5vw, 48px); font-size: clamp(3rem, 1.6rem + 7vw, 6rem); }
.hero.slim .tag { max-width: 52ch; }
.back-link { color: var(--muted); font-size: var(--text-sm); font-weight: 600; text-decoration: none; }
.back-link:hover, .back-link:focus-visible { color: var(--white); }

/* ---------- Shared avatar ---------- */
.ava {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--ava);
  height: var(--ava);
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(160deg, var(--ink-3), #062c55);
  box-shadow: 0 0 0 2px var(--line);
  transition: box-shadow var(--duration-fast), transform var(--duration-normal) var(--ease-out-expo);
}
.ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ava-init { font-family: var(--font-display); font-weight: 900; font-style: italic; font-size: calc(var(--ava) * 0.36); color: var(--blue); letter-spacing: 0.02em; }
.ava.lg { --ava: 88px; box-shadow: 0 0 0 3px var(--blue); }

/* ---------- Sticky filter bar ---------- */
.roster-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 14px 0 12px;
  background: var(--bar-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.roster-bar .wrap { display: grid; gap: 10px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  min-height: 40px;
  padding: 0 14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--ink-2);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: color var(--duration-fast), border-color var(--duration-fast), background var(--duration-fast);
}
.seg button:hover { color: var(--white); border-color: #3d444c; }
.seg button[aria-pressed="true"] { color: var(--white); background: var(--blue); border-color: var(--blue); }
.seg button .n { margin-left: 6px; font-weight: 600; opacity: 0.75; }
.bar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.bar-row input[type="search"] {
  flex: 1 1 220px;
  min-height: 42px;
  padding: 8px 14px;
  font: inherit;
  color: var(--white);
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.bar-row input[type="search"]:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-glow); }
.meta-line { font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(47, 209, 139, 0.6); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(47, 209, 139, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 209, 139, 0); } }

/* ---------- Bracket blocks ---------- */
.div-block { display: grid; gap: clamp(28px, 4vw, 44px); }
.roster { display: grid; gap: clamp(36px, 5vw, 56px); padding-top: clamp(28px, 4vw, 44px); }
.division-title {
  margin: 0 0 -12px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(2.4rem, 1.6rem + 3.5vw, 4rem);
  line-height: 0.9;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--blue);
}
.bk { display: grid; gap: 12px; }
.bk-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 20px; padding-bottom: 10px; border-bottom: 2px solid var(--white); }
.bk-head h2 { margin: 0; font-family: var(--font-display); font-weight: 900; font-size: var(--text-h2); line-height: 1; text-transform: uppercase; color: var(--white); }
.bk-head h2 small { display: block; margin-bottom: 4px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.24em; color: var(--blue); }
.fill { display: grid; gap: 6px; min-width: 150px; text-align: right; }
.fill b { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--white); line-height: 1; font-variant-numeric: tabular-nums; }
.fill b span { font-size: 1rem; color: var(--muted); }
.fill i { display: block; height: 4px; background: var(--line); overflow: hidden; }
.fill i::after { content: ""; display: block; height: 100%; width: 100%; background: var(--blue); transform-origin: left; transform: scaleX(var(--pct, 0)); transition: transform var(--duration-normal) var(--ease-out-expo); }

.sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--sheet-gap); background: var(--line); border: 1px solid var(--line); }
.team-row { display: grid; grid-template-columns: 34px 1fr 1fr; align-items: stretch; background: var(--ink-2); }
.team-row .no {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--muted);
  background: var(--ink);
  border-right: 1px solid var(--line);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.08em;
}
.pl {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  padding: 14px 8px 12px;
  font: inherit;
  color: var(--text);
  text-align: center;
  background: none;
  border: 0;
  cursor: zoom-in;
}
.pl + .pl { border-left: 1px dashed var(--line); }
.pl b { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; line-height: 1.1; color: var(--white); overflow-wrap: anywhere; }
.pl:hover .ava, .pl:focus-visible .ava { box-shadow: 0 0 0 3px var(--blue); transform: translateY(-2px) scale(1.04); }
.pl:focus-visible { outline: 2px solid var(--blue); outline-offset: -4px; }
.pl.no-zoom { cursor: default; }
.pl mark { background: rgba(8, 156, 246, 0.3); color: var(--white); padding: 0 1px; }
.empty-bk { padding: 28px 18px; color: var(--muted); background: var(--ink-2); border: 1px dashed var(--line); text-align: center; }
.no-results { padding: 48px 16px; text-align: center; color: var(--muted); }
.no-results b { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--white); text-transform: uppercase; }

/* ---------- Photo viewer ---------- */
dialog.lb {
  width: min(760px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  border-top-width: 4px;
  overflow: hidden;
}
dialog.lb[open] { animation: lb-in var(--duration-normal) var(--ease-out-expo) both; }
@keyframes lb-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
dialog.lb::backdrop { background: rgba(0, 0, 0, 0.88); }
.lb-stage { position: relative; display: grid; place-items: center; background: #050505; min-height: 240px; }
.lb-stage img { width: 100%; height: auto; max-height: min(68dvh, 640px); object-fit: contain; animation: rise var(--duration-normal) var(--ease-out-expo) both; }
.lb-stage .ava { --ava: 200px; margin: 40px auto; box-shadow: 0 0 0 4px var(--blue); }
.lb-nav {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 64px;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--white);
  background: rgba(11, 11, 11, 0.7);
  border: 1px solid var(--line);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background var(--duration-fast), border-color var(--duration-fast);
}
.lb-nav:hover, .lb-nav:focus-visible { background: var(--blue); border-color: var(--blue); }
.lb-nav.prev { left: 8px; }
.lb-nav.next { right: 8px; }
.lb-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; font-size: 1.6rem; color: var(--white); background: rgba(11, 11, 11, 0.7); border: 1px solid var(--line); cursor: pointer; }
.lb-x:hover, .lb-x:focus-visible { background: var(--blue); }
.lb-cap { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; padding: 16px 18px 18px; }
.lb-cap h3 { margin: 0; font-family: var(--font-display); font-weight: 900; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); line-height: 1; text-transform: uppercase; color: var(--white); }
.lb-cap p { margin: 6px 0 0; font-size: 0.88rem; color: var(--muted); }
.lb-cap .count { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.12em; color: var(--muted); font-size: 0.85rem; }
.lb-cap a { font-size: 0.85rem; font-weight: 700; }

/* ---------- Protest form ---------- */
.reasons { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.reason { position: relative; display: grid; gap: 4px; padding: 14px 16px 14px 48px; background: var(--ink); border: 1px solid var(--line); cursor: pointer; transition: border-color var(--duration-fast), background var(--duration-fast); }
.reason input { position: absolute; left: 16px; top: 16px; width: 20px; height: 20px; accent-color: var(--blue); }
.reason b { color: var(--white); font-family: var(--font-display); font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.04em; }
.reason span { font-size: 0.82rem; color: var(--muted); line-height: 1.45; }
.reason:hover { border-color: #3d444c; }
.reason:has(input:checked) { border-color: var(--blue); background: linear-gradient(180deg, rgba(8, 156, 246, 0.12), var(--ink) 80%); }
.reason:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
textarea {
  width: 100%;
  min-height: 150px;
  padding: 12px 14px;
  font: inherit;
  line-height: 1.5;
  color: var(--white);
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  resize: vertical;
}
textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-glow); }
.field.invalid textarea { border-color: var(--bad); }
.counter { justify-self: end; font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.target-card { display: flex; align-items: center; gap: 16px; padding: 14px; background: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--bad); }
.target-card b { display: block; font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--white); line-height: 1.05; }
.target-card small { display: block; color: var(--muted); font-size: 0.85rem; }
.shots { display: flex; flex-wrap: wrap; gap: 10px; }
.shot { position: relative; width: 96px; height: 96px; border: 1px solid var(--line); background: var(--ink); overflow: hidden; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot button { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; font-size: 1rem; line-height: 1; color: var(--white); background: rgba(0, 0, 0, 0.75); border: 1px solid var(--line); cursor: pointer; }
.shot button:hover, .shot button:focus-visible { background: var(--bad); }
.done-panel { border-top: 4px solid var(--ok); }
.done-panel .ref { font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: clamp(3rem, 2rem + 4vw, 4.5rem); line-height: 0.9; color: var(--white); }
.steps-next { margin: 12px 0 0; padding-left: 1.2em; color: #c9d3dd; display: grid; gap: 6px; }

@media (max-width: 420px) {
  :root { --ava: 56px; }
  .pl b { font-size: 1rem; }
  .lb-nav { width: 40px; height: 56px; }
}
.check.invalid { border-color: var(--bad); }
.fill { margin-left: auto; }

/* Phones: one scrolling row per filter, and the bar scrolls away instead of covering the list. */
@media (max-width: 720px) {
  .roster-bar { position: static; }
  .seg { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .seg::-webkit-scrollbar { display: none; }
  .seg button { flex: none; min-height: 38px; padding: 0 12px; font-size: 0.88rem; }
}
/* The reason cards sit inside .field, so undo the uppercase field-label style. */
.field .reason { font-family: var(--font-body); font-size: var(--text-base); font-weight: 400; letter-spacing: normal; text-transform: none; color: var(--text); }
.field .reason b { font-family: var(--font-display); font-weight: 800; }
/* Division header: name + total players (no bracket sizes on the public roster). */
.div-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 6px 16px; margin-bottom: -12px; }
.div-head .division-title { margin: 0; }
.div-count { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-size: 0.9rem; }
.div-count b { font-size: 1.5rem; font-weight: 900; color: var(--white); letter-spacing: 0; margin-right: 4px; }
