/* ══════════════════════════════════════════
   components.css — Match card, RSVP, games,
                    announcements
   ══════════════════════════════════════════ */

/* ── Match Card ── */
.match-card {
  background: linear-gradient(135deg, #1a1600 0%, var(--surface) 60%);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.2rem;
  position: relative;
  overflow: hidden;
}

.match-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.match-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.8rem;
}

.match-date {
  font-family: var(--font-display);
  font-size: 2.2rem;
  letter-spacing: 0.04em;
  color: var(--white);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.match-time {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold);
  letter-spacing: 0.04em;
}

.match-vs {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.5rem 0 0.3rem;
}

.match-vs strong { color: var(--text); }

.match-details {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.match-details span {
  display: inline-block;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.5rem;
  margin-top: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--gold-light);
}

.countdown {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 1.2rem;
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  display: inline-block;
}

/* ── Match quick links ── */
.match-quick-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

/* When only 2 buttons, both fill naturally side-by-side */
.match-quick-links--two {
  grid-template-columns: 1fr 1fr;
}

.match-quick-links--two .match-btn {
  min-height: 4.2rem;
}

@media (max-width: 699px) {
  .match-quick-links--two {
    grid-template-columns: 1fr 1fr;
  }

  .match-quick-links--two .match-btn {
    min-height: unset;
    padding: 0.6rem 0.5rem;
  }
}

.match-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  user-select: none;
}

.match-btn:hover {
  border-color: var(--gold);
  background: var(--surface3);
}

.match-btn .btn-main {
  font-weight: 600;
  font-size: 0.8rem;
  display: block;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-btn .btn-sub {
  font-size: 0.82rem;
  color: var(--gold);
  font-family: var(--font-mono);
  display: block;
  margin-top: 0.25rem;
  white-space: nowrap;
}

/* ── RSVP ── */
.rsvp-btns {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 1.2rem;
}

.rsvp-yes,
.rsvp-no {
  flex: 1;
  padding: 0.7rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--surface2);
  color: var(--muted);
}

.rsvp-yes:hover,
.rsvp-yes.selected {
  background: rgba(62, 200, 120, 0.12);
  border-color: var(--green);
  border-width: 2px;
  color: var(--green);
}

.rsvp-no:hover,
.rsvp-no.selected {
  background: rgba(224, 82, 82, 0.12);
  border-color: var(--red);
  border-width: 2px;
  color: var(--red);
}

.rsvp-maybe:hover,
.rsvp-maybe.selected {
  background: rgba(232, 201, 106, 0.15);
  border-color: var(--yellow);
  color: var(--yellow);
}

.rsvp-count {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  flex-wrap: wrap;
}

.rsvp-count span { color: var(--muted); }
.rsvp-count strong { color: var(--text); }

.rsvp-list { display: flex; flex-direction: column; gap: 0.5rem; }

.rsvp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.8rem;
  font-size: 0.85rem;
}

.rsvp-name  { font-weight: 500; }

.rsvp-status {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.status-in      { background: rgba(62, 200, 120, 0.15); color: var(--green); }
.status-out     { background: rgba(224, 82, 82, 0.15);  color: var(--red); }
.status-maybe   { background: rgba(232, 201, 106, 0.15); color: var(--yellow); }
.status-sub     { background: rgba(201, 168, 76, 0.15); color: var(--gold); }
.status-pending { background: var(--surface3); color: var(--muted); }

.rsvp-sub-name {
  font-size: 0.72rem;
  color: var(--gold);
  font-family: var(--font-mono);
  margin-left: 0.4rem;
}

/* ── Standings highlight row ── */
.team-highlight td { color: var(--gold); font-weight: 600; }

.row-star {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* ── Games Grid ── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s;
}

.game-card:hover { border-color: var(--gold-dim); }

.game-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-thumb .play-btn {
  position: absolute;
  width: 52px;
  height: 52px;
  background: rgba(201, 168, 76, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: transform 0.2s, background 0.2s;
}

.game-thumb:hover .play-btn {
  transform: scale(1.1);
  background: var(--gold);
}

.game-info  { padding: 1rem; }

.game-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  color: var(--white);
}

.game-meta {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* ── Announcements ── */
.announcement {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.announcement:last-child { border-bottom: none; }

.ann-icon {
  width: 38px;
  height: 38px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.ann-body   { flex: 1; }

.ann-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
  color: var(--white);
}

.ann-text {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.5;
}

.ann-detail {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.6;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  white-space: pre-wrap;
}

.ann-time {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .match-date  { font-size: 1.7rem; }
  .games-grid  { grid-template-columns: 1fr; }
}


/* ══════════════════════════════════════════
   Roster Grid & Player Modal
   ══════════════════════════════════════════ */

/* ── Roster card grid ── */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.roster-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
  position: relative;
}

.roster-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
}

.roster-card-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: var(--surface2);
}

.roster-card-photo-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--muted);
}

.roster-card-number {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold);
  background: rgba(0,0,0,0.65);
  border-radius: 5px;
  padding: 0.1rem 0.4rem;
  line-height: 1;
  letter-spacing: 0.05em;
}

.roster-card-info {
  padding: 0.6rem 0.7rem 0.8rem;
  background: var(--surface);
}

.roster-card-name {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roster-card-pos {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-top: 0.15rem;
}

/* ── Player modal ── */
.player-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.88);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.player-modal.open { display: flex; }

.player-modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding-bottom: 1.5rem;
}

.player-modal-box .modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 10;
}

/* Photo banner */
.player-modal-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--surface2);
  overflow: hidden;
}

.player-modal-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.player-modal-photo[src=""] {
  display: none;
}

.player-modal-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: var(--muted);
}

/* Gold gradient overlay at bottom of photo */
.player-modal-photo-wrap::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(13,13,13,0.95) 0%, transparent 100%);
  pointer-events: none;
}

.player-modal-no {
  position: absolute;
  bottom: 0.8rem;
  left: 1rem;
  font-family: var(--font-display);
  font-size: 3.5rem;
  color: rgba(201,168,76,0.25);
  letter-spacing: 0.04em;
  line-height: 1;
  z-index: 2;
  pointer-events: none;
}

/* Name & position */
.player-modal-name {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.04em;
  color: var(--white);
  padding: 1rem 1.2rem 0.1rem;
  line-height: 1;
}

.player-modal-pos {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  padding: 0 1.2rem 1rem;
  text-transform: uppercase;
}

/* Stats sections */
.player-modal-stats { padding: 0 1.2rem; }

.pm-stats-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.pm-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.pm-stat-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.3rem;
  text-align: center;
}

.pm-stat-value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--gold);
  letter-spacing: 0.04em;
  line-height: 1;
}

.pm-stat-key {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 0.2rem;
}

.player-no-stats {
  display: none;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 1.5rem 1.2rem 0;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .roster-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
  }
  .pm-stats-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 700px) {
  .roster-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}


/* ══════════════════════════════════════════
   Home grid equal-height + RSVP scroll
   ══════════════════════════════════════════ */

/* RSVP player list: scrollable, alphabetical handled in JS */
.rsvp-list {
  overflow-y: auto;
  max-height: 260px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dim) transparent;
}

.rsvp-list::-webkit-scrollbar { width: 4px; }
.rsvp-list::-webkit-scrollbar-track { background: transparent; }
.rsvp-list::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 2px; }

/* ══════════════════════════════════════════
   Season Record Card
   ══════════════════════════════════════════ */

.season-record-card { margin-top: 0; }

.record-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.record-stat {
  text-align: center;
  flex: 1;
  min-width: 60px;
}

.record-value {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.04em;
  color: var(--white);
  line-height: 1;
}

.record-value.record-w { color: var(--green); }
.record-value.record-d { color: var(--yellow); }
.record-value.record-l { color: var(--red); }

.record-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.2rem;
}

.record-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

/* W/D/L progress bar */
.record-bar-wrap {
  margin-bottom: 0.8rem;
}

.record-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--surface2);
  display: flex;
  overflow: hidden;
}

.record-bar-w { background: var(--green); height: 100%; transition: width 0.6s ease; }
.record-bar-d { background: var(--yellow); height: 100%; transition: width 0.6s ease; }
.record-bar-l { background: var(--red); height: 100%; transition: width 0.6s ease; }

/* Last 5 results dots */
.record-last5 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.record-last5-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.3rem;
}

.result-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0;
}

.result-dot.w { background: rgba(62,200,120,0.2); color: var(--green); border: 1px solid var(--green); }
.result-dot.d { background: rgba(232,201,106,0.15); color: var(--yellow); border: 1px solid var(--yellow); }
.result-dot.l { background: rgba(224,82,82,0.15); color: var(--red); border: 1px solid var(--red); }


/* ══════════════════════════════════════════
   Upcoming Schedule
   ══════════════════════════════════════════ */

.schedule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.schedule-row:last-child { border-bottom: none; }
.schedule-row:hover { background: rgba(255,255,255,0.02); border-radius: var(--radius-sm); }

.schedule-row.schedule-urgent { border-left: 2px solid var(--gold); padding-left: 0.8rem; }

.schedule-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.schedule-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.schedule-badge.schedule-urgent {
  color: var(--gold);
  border-color: rgba(201,168,76,0.4);
  background: rgba(201,168,76,0.08);
}

.schedule-info { min-width: 0; }

.schedule-opponent {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.schedule-kit {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--gold-dim);
  margin-top: 0.2rem;
  letter-spacing: 0.05em;
}

.schedule-notes {
  font-size: 0.72rem;
  color: var(--gold);
  margin-top: 0.15rem;
  font-style: italic;
}

.schedule-right { flex-shrink: 0; }

.schedule-film-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  white-space: nowrap;
}

.schedule-film-btn:hover {
  border-color: var(--gold);
  background: rgba(201,168,76,0.1);
  color: var(--gold);
}

.schedule-film-none {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--surface3);
  letter-spacing: 0.08em;
}

/* ══════════════════════════════════════════
   Film Picker Modal Content
   ══════════════════════════════════════════ */

.film-picker-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.5rem 0;
}

.film-picker-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.7rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.film-picker-row:hover {
  border-color: var(--gold);
  background: rgba(201,168,76,0.06);
}

.film-picker-thumb {
  width: 80px;
  height: 52px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background: var(--surface3);
}

.film-picker-thumb-blank {
  width: 80px;
  height: 52px;
  background: var(--surface3);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.film-picker-info { flex: 1; min-width: 0; }

.film-picker-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.film-picker-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.film-picker-play {
  color: var(--gold);
  font-size: 1rem;
  flex-shrink: 0;
}


/* ══════════════════════════════════════════
   Clickable RSVP status chip (own row)
   ══════════════════════════════════════════ */

.rsvp-clickable {
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  user-select: none;
}

.rsvp-clickable:hover {
  opacity: 0.8;
  transform: scale(1.04);
}

.rsvp-clickable:active {
  transform: scale(0.97);
}

/* ══════════════════════════════════════════
   Results tab - Watch film button
   ══════════════════════════════════════════ */

.result-film-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--gold);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.result-film-btn:hover {
  background: rgba(201,168,76,0.12);
  border-color: var(--gold);
}

.result-no-film {
  color: var(--surface3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}


/* ══════════════════════════════════════════
   Season Vote Banner
   ══════════════════════════════════════════ */

#season-vote-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(201,168,76,0.12) 0%, rgba(201,168,76,0.04) 100%);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.season-vote-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: 860px;
}

.season-vote-text { flex: 1; min-width: 200px; }

.season-vote-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--white);
  letter-spacing: 0.03em;
}

.season-vote-sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.season-vote-actions { display: flex; gap: 0.6rem; }

.sv-btn {
  border: none;
  border-radius: var(--radius-md);
  padding: 0.55rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.sv-btn:hover  { opacity: 0.85; transform: translateY(-1px); }
.sv-btn:active { transform: scale(0.97); }

.sv-yes { background: rgba(62,200,120,0.18); color: var(--green); border: 1px solid rgba(62,200,120,0.35); }
.sv-no  { background: rgba(224,82,82,0.12);  color: var(--red);   border: 1px solid rgba(224,82,82,0.3); }

.season-vote-done {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--gold);
  letter-spacing: 0.05em;
}

/* Admin season vote */
.sv-admin-summary {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.8rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.sv-count { font-family: var(--font-mono); font-size: 0.82rem; font-weight: 700; }
.sv-in  { color: var(--green); }
.sv-out { color: var(--red); }

/* Toggle switch */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}
.toggle-row input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--gold);
  cursor: pointer;
}
.toggle-label { font-size: 0.85rem; color: var(--text); }

/* ══════════════════════════════════════════
   Video Banner Player
   Sits below topbar (top:60px) + nav (52px)
   ══════════════════════════════════════════ */

#video-banner {
  position: fixed;
  top: 96px; /* below topbar(60) + ticker(36) */
  left: 0;
  right: 0;
  z-index: 105; /* above nav (99) but below admin (500) */
  background: #000;
  border-bottom: 2px solid var(--gold);
  display: none;
  flex-direction: column;
  animation: vb-slide-down 0.25s ease;
}

#video-banner.open { display: flex !important; }

@keyframes vb-slide-down {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

.vb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 1rem;
  background: rgba(201,168,76,0.07);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.vb-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 200px);
}

.vb-controls { display: flex; gap: 0.5rem; }

.vb-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  padding: 0.25rem 0.7rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.vb-btn:hover { background: rgba(201,168,76,0.12); color: var(--gold); }
.vb-btn.vb-close:hover { background: rgba(224,82,82,0.15); color: var(--red); }

.vb-frame-wrap {
  flex: 1;
  min-width: 0;
  height: 320px;
  position: relative;
  background: #000;
  overflow: hidden;
}

.vb-frame-wrap iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  /* Scale to fill width fully at 16:9, crop top/bottom black bars */
  width: 100%;
  height: calc(100vw * 0.5625);
  transform: translate(-50%, -50%);
  border: none;
}

body.vb-open .nav { transition: top 0.25s; }
/* content offset handled by #banner-spacer sized by JS */

/* mobile banner offset handled by JS adjustBannerOffset() */

/* Mini player updated styles */
#mini-player {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 340px;
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0,0,0,0.7), 0 0 0 1px rgba(201,168,76,0.1);
  z-index: 9999;
  overflow: hidden;
  display: none;
  flex-direction: column;
}

#mini-player.open { display: flex !important; }

.mini-player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: rgba(201,168,76,0.06);
  border-bottom: 1px solid var(--border);
  user-select: none;
}

.mini-player-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.mini-player-controls { display: flex; gap: 0.4rem; }

.mini-close-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  transition: background 0.15s;
}
.mini-close-btn:hover { background: rgba(224,82,82,0.15); color: var(--red); }

#mini-player-iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  display: block;
}

.mini-expand-btn { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 0.7rem; padding: 0.2rem 0.5rem; cursor: pointer; font-family: var(--font-mono); white-space: nowrap; }
.mini-expand-btn:hover { background: rgba(201,168,76,0.12); color: var(--gold); }

/* ══════════════════════════════════════════
   Games filter bar — dropdowns + search
   ══════════════════════════════════════════ */

.games-filters {
  margin-bottom: 1.4rem;
}

.games-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

/* Search box */
.games-search-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
}

.games-search-icon {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  pointer-events: none;
  opacity: 0.5;
}

.games-search-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.82rem;
  font-family: var(--font-body);
  padding: 0.52rem 0.75rem 0.52rem 2rem;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.games-search-input:focus {
  outline: none;
  border-color: var(--gold);
}

.games-search-input::placeholder { color: var(--muted); }

/* Dropdown selects */
.games-filter-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 120px;
}

.games-filter-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.games-filter-select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.82rem;
  font-family: var(--font-body);
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  transition: border-color 0.15s;
}

.games-filter-select:focus {
  outline: none;
  border-color: var(--gold);
}

.games-filter-select option {
  background: var(--surface);
  color: var(--text);
}

@media (max-width: 600px) {
  /* Wrap into two rows: search full width, then filters in one row */
  .games-filter-row { flex-wrap: wrap; gap: 0.5rem; }

  .games-search-wrap {
    width: 100%;
    flex: none;
    order: 0;
  }

  .games-filter-select-wrap {
    flex: 1;
    min-width: 0;
    order: 1;
  }

  .games-filter-label {
    font-size: 0.55rem;
  }

  .games-filter-select {
    font-size: 0.75rem;
    padding: 0.45rem 1.6rem 0.45rem 0.5rem;
  }
}

/* ══════════════════════════════════════════
   Match card dual score layout
   ══════════════════════════════════════════ */

.match-btn-score {
  grid-column: 1 / -1;
}

/* With 3 items total (score + 2 btns), last btn fills remaining space */
.match-quick-links .match-btn:not(.match-btn-score) {
  min-height: 4rem;
}

.match-score-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  gap: 0.5rem;
}

.match-score-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  gap: 0.15rem;
}

.match-score-divider {
  width: 1px;
  height: 2.5rem;
  background: var(--border);
  flex-shrink: 0;
}

.score-val {
  font-size: 1rem !important;
  font-weight: 700;
}

/* Admin hint */
.admin-hint {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.5rem 0;
}


/* ══════════════════════════════════════════
   Mini player embed-blocked error state
   ══════════════════════════════════════════ */

#mini-player-error {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-error-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem;
  text-align: center;
}

.mini-error-icon { font-size: 2rem; }

.mini-error-msg {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

.mini-error-link {
  background: var(--gold);
  color: #000;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  letter-spacing: 0.06em;
  margin-top: 0.3rem;
  transition: opacity 0.15s;
}
.mini-error-link:hover { opacity: 0.85; }


/* ══════════════════════════════════════════
   Fee Due Banner
   ══════════════════════════════════════════ */

#fee-due-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(224,82,82,0.12) 0%, rgba(224,82,82,0.04) 100%);
  border-bottom: 1px solid rgba(224,82,82,0.25);
  padding: 0.7rem 1.5rem;
}

.fee-due-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 860px;
}

.fee-due-icon { font-size: 1.2rem; flex-shrink: 0; }

.fee-due-text {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}

.fee-due-dismiss {
  background: none;
  border: 1px solid rgba(224,82,82,0.3);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
}
.fee-due-dismiss:hover { color: var(--red); border-color: var(--red); }

body.light-mode #fee-due-banner {
  background: linear-gradient(135deg, rgba(180,30,30,0.07) 0%, rgba(180,30,30,0.02) 100%);
}

/* ══════════════════════════════════════════
   Video banner: body layout (video + lineup sidebar)
   ══════════════════════════════════════════ */

.vb-body {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-height: 320px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}

/* Make sidebar match video height */
.vb-lineup {
  align-self: stretch;
}

/* Lineup sidebar — hidden on small screens */
.vb-lineup {
  flex-direction: column;
  width: 200px;
  min-width: 200px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  display: none; /* shown by JS */
  max-height: 320px;
}

/* ── Mobile roster strip ── */
.vb-mobile-roster {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
}

.vb-mobile-roster-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.6rem 0;
}

.vbm-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c9a84c;
}

.vb-mobile-roster-tabs {
  display: flex;
  gap: 0.35rem;
}

.vbm-tab {
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  color: #666;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  padding: 0.2rem 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
}

.vbm-tab.active {
  background: #c9a84c;
  border-color: #c9a84c;
  color: #000;
  font-weight: 700;
}

.vb-mobile-roster-scroll {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.vb-mobile-roster-scroll::-webkit-scrollbar { display: none; }

.vbm-chip {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
  font-size: 0.72rem;
  color: #ccc;
  cursor: default;
  flex-shrink: 0;
}

.vbm-chip.vbm-in   { border-color: rgba(62,200,120,0.35); }
.vbm-chip.vbm-sub  { border-color: rgba(201,168,76,0.35); }
.vbm-chip.vbm-out  { border-color: rgba(224,82,82,0.2); color: #777; }
.vbm-chip.vbm-link { cursor: pointer; }
.vbm-chip.vbm-link:hover { border-color: #c9a84c; color: #c9a84c; }

.vbm-icon { font-size: 0.65rem; }
.vbm-icon.in  { color: #3ec878; }
.vbm-icon.sub { color: #c9a84c; }
.vbm-icon.out { color: #e05252; }

@media (max-width: 860px) {
  /* Video fills full width, reduced height */
  .vb-frame-wrap { width: 100% !important; height: 200px !important; overflow: hidden !important; }
  .vb-body { max-height: 200px !important; }
  /* Oversized iframe — crops ~12% top/bottom to eliminate black bars */
  .vb-frame-wrap iframe {
    width: 120% !important;
    height: 130% !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    position: absolute !important;
  }

  /* Hide desktop sidebar */
  .vb-lineup { display: none !important; }

  /* Show mobile strip */
  .vb-mobile-roster { display: flex !important; }
}

@media (min-width: 861px) {
  /* Hide mobile strip on desktop */
  .vb-mobile-roster { display: none !important; }
}

/* Backdrop (kept for potential future use) */
.vb-drawer-backdrop { display: none; }
.vb-drawer-backdrop.open { display: none; }

.vb-lineup-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.vbl-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #666;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.45rem 0;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}

.vbl-tab:hover { color: #aaa; }

.vbl-tab.active {
  color: #c9a84c;
  border-bottom-color: #c9a84c;
}

.vb-lineup-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  padding: 0.55rem 0.7rem 0.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-transform: uppercase;
}

.vb-lineup-list {
  padding: 0.3rem 0;
}

.vbl-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.vbl-icon {
  font-size: 0.7rem;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}

.vbl-name { color: var(--text); }

.vbl-sub-name {
  font-size: 0.68rem;
  color: var(--gold);
  white-space: nowrap;
  margin-left: 0.3rem;
}

.vbl-in      .vbl-icon { color: var(--green); }
.vbl-out     .vbl-icon { color: var(--red); }
.vbl-sub     .vbl-icon { color: var(--gold); }
.vbl-pending .vbl-icon { color: var(--muted); }
.vbl-out     .vbl-name { color: var(--muted); text-decoration: line-through; }
.vbl-pending .vbl-name { color: var(--muted); }


/* ══════════════════════════════════════════
   Results: Roster column button
   ══════════════════════════════════════════ */

.result-roster-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.result-roster-btn:hover {
  background: rgba(201,168,76,0.12);
  color: var(--gold);
  border-color: var(--gold);
}

/* ══════════════════════════════════════════
   Roster popup modal
   ══════════════════════════════════════════ */

.roster-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 600;
  align-items: center;
  justify-content: center;
}
.roster-popup-overlay.open { display: flex; }

.roster-popup-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: min(380px, 92vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  animation: fadeInUp 0.2s ease;
}

@keyframes fadeInUp {
  from { opacity:0; transform:translateY(16px); }
  to   { opacity:1; transform:translateY(0); }
}

.roster-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
}

.roster-popup-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-transform: uppercase;
}

.roster-popup-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.roster-popup-close:hover { color: var(--red); background: rgba(224,82,82,0.1); }

.roster-popup-list {
  overflow-y: auto;
  padding: 0.4rem 0;
}

.roster-popup-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.85rem;
}

/* Section divider between groups */
.roster-popup-row.rp-sub:first-of-type,
.roster-popup-row.rp-out:first-of-type {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 2px;
}

.rp-in   { background: rgba(62,200,120,0.05); }
.rp-sub  { background: rgba(201,168,76,0.05); }
.rp-out  { background: rgba(224,82,82,0.05); }

.rp-in   .roster-popup-icon { color: var(--green); }
.rp-sub  .roster-popup-icon { color: var(--gold); }
.rp-out  .roster-popup-icon { color: var(--red); }
.rp-pending .roster-popup-icon { color: var(--muted); }

.rp-in   .roster-popup-name { color: var(--green); }
.rp-sub  .roster-popup-name { color: var(--gold); }
.rp-out  .roster-popup-name { color: var(--red); opacity: 0.7; text-decoration: line-through; }
.rp-pending .roster-popup-name { color: var(--muted); }

.roster-popup-icon {
  font-size: 0.72rem;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.roster-popup-name { flex: 1; }

.roster-popup-link {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(201,168,76,0.4);
  transition: color 0.15s;
}
.roster-popup-link:hover { color: var(--gold); }

.roster-popup-sub {
  font-size: 0.72rem;
  color: var(--gold);
  font-family: var(--font-mono);
}

/* Sidebar lineup: clickable name style */
.vbl-link {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(201,168,76,0.35);
  transition: color 0.15s;
}
.vbl-link:hover { color: var(--gold); }


/* ══════════════════════════════════════════
   Archive Tab
   ══════════════════════════════════════════ */

.archive-season-select-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.archive-season-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.archive-season-select {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.45rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  min-width: 180px;
}

.archive-season-select:focus {
  outline: none;
  border-color: var(--gold-dim);
}

.archive-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.archive-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
}

.archive-section-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.archive-record {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: none;
}

/* Admin season tab */
.admin-input {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
}

.admin-input:focus {
  outline: none;
  border-color: var(--gold-dim);
}

/* ── Video banner follows theme ── */
#video-banner { background: var(--bg) !important; }

#video-banner .vb-bar {
  background: var(--surface2) !important;
  border-bottom-color: var(--border) !important;
}

#video-banner .vb-mobile-roster {
  background: var(--surface) !important;
  border-bottom-color: var(--border) !important;
}

#video-banner .vb-title { color: var(--gold) !important; }

#video-banner .vb-btn {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

#video-banner .vb-btn:hover {
  background: rgba(201,168,76,0.12) !important;
  color: var(--gold) !important;
}

#video-banner .vb-btn.vb-close:hover {
  background: rgba(224,82,82,0.15) !important;
  color: var(--red) !important;
}

/* ── Stats / Standings tab toggle ── */
.stats-toggle {
  display: flex;
  gap: 0.25rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.2rem;
}

.stats-toggle-btn {
  padding: 0.35rem 1rem;
  border: none;
  border-radius: calc(var(--radius-md) - 2px);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
}

.stats-toggle-btn.active {
  background: var(--gold);
  color: #000;
}

.stats-toggle-btn:not(.active):hover {
  color: var(--text);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* When section-header has a right-side control (e.g. stats toggle), use space-between */
.section-header.has-control {
  justify-content: space-between;
  align-items: center;
}

/* ══════════════════════════════════════════
   Chat — Floating button + panel
   ══════════════════════════════════════════ */

/* ── FAB button ── */
.chat-fab {
  position: fixed;
  bottom: 4.5rem;  /* sit above admin gear */
  right: 1.5rem;
  z-index: 300;
  width: 46px;
  height: 46px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
  transition: border-color 0.2s, background 0.2s;
  user-select: none;
}

.chat-fab:hover,
.chat-fab.active {
  border-color: var(--gold);
  background: var(--surface3, var(--surface));
}

.chat-fab.has-unread {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.4);
  animation: chat-pulse 1.8s ease-in-out infinite;
}

@keyframes chat-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(201,168,76,0.4); }
  50%       { box-shadow: 0 0 0 7px rgba(201,168,76,0.1); }
}

/* ── Unread badge ── */
.chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg);
}

/* ── Panel ── */
.chat-panel {
  position: fixed;
  bottom: 8rem;
  right: 1.5rem;
  z-index: 400;
  width: 320px;
  height: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  animation: chat-pop 0.18s ease;
}

.chat-panel.open { display: flex; }

@keyframes chat-pop {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

/* ── Header ── */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-header-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-transform: uppercase;
}

.chat-close-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}
.chat-close-btn:hover { color: var(--text); }

/* ── Translate toggle ── */
.chat-translate-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  letter-spacing: 0.04em;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chat-translate-btn:hover {
  background: var(--surface2);
  color: var(--text);
}
.chat-translate-btn.active {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}
.chat-translate-btn.active:hover { opacity: 0.85; }

/* ── Messages ── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.8rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.chat-empty,
.chat-loading {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  margin: auto;
  padding: 1rem;
}

/* ── Message bubbles ── */
.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 82%;
}

.chat-msg.mine  { align-self: flex-end; align-items: flex-end; }
.chat-msg.theirs { align-self: flex-start; align-items: flex-start; }

.chat-name {
  font-size: 0.68rem;
  color: var(--gold);
  font-family: var(--font-mono);
  margin-bottom: 0.2rem;
  padding-left: 0.2rem;
}

.chat-bubble {
  padding: 0.5rem 0.75rem;
  border-radius: 14px;
  font-size: 0.87rem;
  line-height: 1.4;
  word-break: break-word;
  white-space: pre-wrap;
}

.chat-bubble-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.chat-msg.mine .chat-bubble-row  { flex-direction: row-reverse; }

.chat-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
  padding: 0.2rem 0.3rem;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Delete button: always red in both themes */
.chat-delete-btn { color: #e05252; }
.chat-delete-btn:hover { background: rgba(224,82,82,0.18); color: #ff4444; }

/* Edit button: gold in dark mode, darker gold in light mode */
.chat-edit-btn { color: var(--gold); }
.chat-edit-btn:hover { background: rgba(201,168,76,0.18); }
body.light-mode .chat-edit-btn { color: #a07800; }

.chat-msg:hover .chat-action-btn { opacity: 1; }
.chat-action-btn:disabled { opacity: 0.2; cursor: not-allowed; }

/* ── Inline edit ── */
.chat-edit-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.87rem;
  resize: none;
  outline: none;
  min-height: 2.2rem;
  box-sizing: border-box;
}

.chat-edit-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.35rem;
  justify-content: flex-end;
}

.chat-edit-save,
.chat-edit-cancel {
  border: none;
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: opacity 0.15s;
}

.chat-edit-save   { background: var(--gold); color: #000; }
.chat-edit-cancel { background: var(--surface2); color: var(--muted); border: 1px solid var(--border); }
.chat-edit-save:hover   { opacity: 0.85; }
.chat-edit-cancel:hover { color: var(--text); }

.chat-msg.mine .chat-bubble {
  background: var(--gold);
  color: #000;
  border-bottom-right-radius: 4px;
}

.chat-msg.theirs .chat-bubble {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.chat-time {
  font-size: 0.62rem;
  color: var(--muted);
  margin-top: 0.2rem;
  padding: 0 0.2rem;
}

/* ── Composer ── */
.chat-composer {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.65rem 0.8rem;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.5rem 0.85rem;
  color: var(--text);
  font-family: var(--font-body, var(--font-mono));
  font-size: 0.87rem;
  outline: none;
  resize: none;
  max-height: 80px;
  line-height: 1.4;
  transition: border-color 0.2s;
}

.chat-input:focus { border-color: var(--gold); }
.chat-input::placeholder { color: var(--muted); }

.chat-send-btn {
  width: 36px;
  height: 36px;
  background: var(--gold);
  color: #000;
  border: none;
  border-radius: 50%;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.chat-send-btn:hover { background: var(--gold-light); }

/* ── Mobile ── */
@media (max-width: 480px) {
  .chat-panel {
    right: 0.75rem;
    width: calc(100vw - 1.5rem);
    bottom: 7.5rem;
    height: 60vh;
  }
}

/* ══════════════════════════════════════════
   Bulletin Board
   ══════════════════════════════════════════ */

.bulletin-post {
  padding: 0.75rem 0;
}

.bulletin-post-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.bulletin-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.bulletin-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--text);
  font-weight: 600;
  flex: 1;
  min-width: 0;
}

.bulletin-time {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  margin-left: auto;
}

.bulletin-edit-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.2rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  transition: color 0.15s;
  flex-shrink: 0;
}

.bulletin-edit-btn:hover { color: var(--gold); }

.bulletin-body {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
  padding: 0 !important;
}

.bulletin-body p { margin: 0 0 0.4rem; }
.bulletin-body p:last-child { margin-bottom: 0; }
.bulletin-body a { color: var(--gold); }

.bulletin-divider {
  height: 1px;
  background: var(--border);
  margin: 0.25rem 0;
}

/* Quill toolbar dark theme */
.ql-toolbar.ql-snow {
  border-color: var(--border) !important;
  background: var(--surface2);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.ql-container.ql-snow {
  border-color: var(--border) !important;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}
.ql-snow .ql-stroke { stroke: var(--muted) !important; }
.ql-snow .ql-fill  { fill:   var(--muted) !important; }
.ql-snow .ql-picker-label { color: var(--muted) !important; }
.ql-snow .ql-stroke:hover,
.ql-snow button:hover .ql-stroke { stroke: var(--gold) !important; }
.ql-editor { min-height: 140px; }

/* ── Quill tooltip fix inside modal ── */
.ql-tooltip {
  z-index: 700 !important;
  left: 0 !important;
  transform: none !important;
}

.ql-snow .ql-tooltip input[type=text] {
  background: var(--surface2);
  border-color: var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
}

.ql-snow .ql-tooltip a.ql-action,
.ql-snow .ql-tooltip a.ql-remove {
  color: var(--gold);
}

/* ── Bulletin edit modal layout ── */
#bulletin-modal {
  z-index: 600;
  padding: 1rem;
  box-sizing: border-box;
}

#bulletin-modal > div {
  width: min(640px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
}

#bulletin-quill-editor {
  box-sizing: border-box;
}

/* ── Bulletin pagination ── */
.bulletin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.bulletin-page-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.85rem;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.bulletin-page-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.bulletin-page-btn:disabled { opacity: 0.3; cursor: default; }

.bulletin-page-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  min-width: 3rem;
  text-align: center;
}

/* ══════════════════════════════════════════
   Feedback FAB + Modal
   ══════════════════════════════════════════ */

/* Floating button — sits above chat FAB */
.feedback-fab {
  position: fixed;
  bottom: 7.5rem;
  right: 1.5rem;
  z-index: 300;
  width: 46px;
  height: 46px;
  background: var(--gold);
  border: none;
  border-radius: 50%;
  /* display controlled entirely by inline style via JS */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: opacity 0.2s, transform 0.2s;
}
.feedback-fab:hover { opacity: 0.85; transform: scale(1.06); }


/* Modal overlay */
.feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 5rem 0;
}

@media (min-width: 480px) {
  .feedback-modal { align-items: center; padding: 0; }
}

/* Modal box */
.feedback-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: min(480px, 95vw);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.feedback-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem 0.7rem;
  border-bottom: 1px solid var(--border);
}

.feedback-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-transform: uppercase;
}

.feedback-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.feedback-close:hover { color: var(--text); }

/* Type tabs */
.feedback-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
}

.feedback-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 0.65rem 0.5rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.feedback-tab:hover { color: var(--text); }
.feedback-tab.active { color: var(--gold); border-bottom-color: var(--gold); }

/* Textarea */
.feedback-textarea {
  display: block;
  width: 100%;
  min-height: 120px;
  background: var(--surface2);
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-base);
  font-size: 0.88rem;
  padding: 0.9rem 1.1rem;
  resize: none;
  box-sizing: border-box;
  outline: none;
}
.feedback-textarea::placeholder { color: var(--muted); }

/* Footer */
.feedback-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.1rem;
}

.feedback-counter {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.feedback-submit {
  background: var(--gold);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.45rem 1.2rem;
  cursor: pointer;
  transition: opacity 0.15s;
}
.feedback-submit:hover { opacity: 0.85; }
.feedback-submit:disabled { opacity: 0.5; cursor: default; }

/* ── Admin feedback items ── */
.fb-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.fb-item:last-child { border-bottom: none; }
.fb-item-new { border-left: 2px solid var(--gold); padding-left: 0.75rem; }

.fb-item-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.fb-badge {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  letter-spacing: 0.04em;
}
.fb-badge-bug       { background: rgba(239,68,68,0.15); color: #f87171; }
.fb-badge-suggestion{ background: rgba(201,168,76,0.15); color: var(--gold); }

.fb-item-who  { font-size: 0.75rem; color: var(--muted); font-family: var(--font-mono); }
.fb-item-date { font-size: 0.72rem; color: var(--muted); margin-left: auto; }

.fb-dismiss-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.7rem;
  border-radius: var(--radius-sm);
  padding: 0.1rem 0.4rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.fb-dismiss-btn:hover { border-color: var(--red); color: var(--red); }

.fb-item-body {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
}

/* ── Roster Editor Modal ── */
.re-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.2rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.re-row:last-child { border-bottom: none; }

.re-player-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 120px;
  flex: 1;
}

.re-number {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  min-width: 1.5rem;
  text-align: right;
}

.re-name {
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 500;
}

.re-status-btns {
  display: flex;
  gap: 0.3rem;
}

.re-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.re-btn:hover { border-color: var(--text); color: var(--text); }

.re-btn.active-played { background: rgba(34,197,94,0.15); border-color: #22c55e; color: #22c55e; }
.re-btn.active-sub    { background: rgba(201,168,76,0.15); border-color: var(--gold); color: var(--gold); }
.re-btn.active-out    { background: rgba(239,68,68,0.12); border-color: #ef4444; color: #ef4444; }

.re-sub-input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  width: 100%;
  margin-top: 0.3rem;
  box-sizing: border-box;
}

/* ── Chat fits below video banner when open ── */
body.vb-open .chat-panel {
  max-height: 45vh;
}

/* ── Soft-deleted chat messages ── */
.chat-bubble.chat-deleted {
  background: rgba(224,82,82,0.08) !important;
  color: var(--muted) !important;
  font-style: italic;
  border: 1px dashed rgba(224,82,82,0.25);
}
.chat-msg-deleted .chat-time { color: var(--red); opacity: 0.6; }
