/* ==========================================================================
   CPL Arena — design tokens
   Palette: pitch green (primary), floodlight gold (accent), cherry red (alert/live),
   willow cream (light surface). Type: Anton (display / scoreboard headlines),
   Work Sans (body), JetBrains Mono (scores, meta, data).
   ========================================================================== */

:root {
  --pitch: #0B3D2E;
  --pitch-dark: #062219;
  --pitch-light: #12513C;
  --cream: #F2E9D8;
  --cherry: #C1272D;
  --gold: #E8B23A;
  --ink: #16211C;
  --white: #FFFFFF;
  --line: rgba(11, 61, 46, 0.14);

  --font-display: "Anton", "Arial Narrow", sans-serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 10px;
  --shadow-card: 0 8px 24px rgba(11, 61, 46, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, .filter-chip:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------------- */
/* Top utility bar                                                        */
/* ---------------------------------------------------------------------- */

.topbar {
  background: var(--pitch-dark);
  color: rgba(242, 233, 216, 0.85);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 6px 24px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.topbar-item a { text-decoration: underline; text-underline-offset: 3px; }
.topbar-sep { opacity: 0.4; }

/* ---------------------------------------------------------------------- */
/* Header / navigation                                                    */
/* ---------------------------------------------------------------------- */

.site-header {
  background: var(--pitch);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 3px solid var(--gold);
}
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-display);
  color: var(--white);
  letter-spacing: 0.02em;
}
.brand-mark { color: var(--gold); font-size: 1.5rem; }
.brand-name { font-size: 1.5rem; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.main-nav > a {
  color: rgba(242, 233, 216, 0.85);
  padding: 10px 14px;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav > a:hover, .main-nav > a.active {
  background: rgba(232, 178, 58, 0.14);
  color: var(--gold);
}

.nav-dropdown { position: relative; }
.nav-dropdown-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: rgba(242, 233, 216, 0.85);
  padding: 10px 14px;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-dropdown-label i { font-style: normal; font-size: 0.7rem; }
.nav-dropdown-label:hover, .nav-dropdown-label.active {
  background: rgba(232, 178, 58, 0.14);
  color: var(--gold);
}
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  min-width: 190px;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.92rem;
}
.nav-dropdown-menu a:hover { background: var(--cream); color: var(--cherry); }

.nav-toggle { display: none; }
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
}
.nav-burger span { width: 24px; height: 2px; background: var(--gold); }

/* ---------------------------------------------------------------------- */
/* Flash messages                                                         */
/* ---------------------------------------------------------------------- */

.flash-wrap {
  max-width: 1180px;
  margin: 16px auto 0;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.flash {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.92rem;
  border: 1px solid transparent;
}
.flash-success { background: #E5F3EC; color: var(--pitch); border-color: #B9DFC9; }
.flash-error { background: #FBE7E7; color: var(--cherry); border-color: #F3BEC0; }

/* ---------------------------------------------------------------------- */
/* Hero + scoreboard signature element                                    */
/* ---------------------------------------------------------------------- */

.hero { background: var(--pitch); color: var(--white); }
.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 24px 72px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--gold);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.05;
  margin: 14px 0 18px;
  font-weight: 400;
}
.hero-title .accent { color: var(--gold); }
.hero-sub { max-width: 460px; color: rgba(242, 233, 216, 0.82); font-size: 1.02rem; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold); color: var(--pitch-dark); }
.btn-primary:hover { background: #f4c65f; }
.btn-ghost { border-color: rgba(242, 233, 216, 0.4); color: var(--cream); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* Scoreboard */
.scoreboard {
  background: var(--pitch-dark);
  border: 1px solid rgba(232, 178, 58, 0.35);
  border-radius: 12px;
  padding: 26px 26px 20px;
  font-family: var(--font-mono);
  box-shadow: 0 20px 45px rgba(0,0,0,0.35);
}
.scoreboard-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.status-live { background: rgba(193, 39, 45, 0.18); color: #ff6b6f; }
.status-upcoming { background: rgba(232, 178, 58, 0.16); color: var(--gold); }
.status-completed { background: rgba(242, 233, 216, 0.12); color: var(--cream); }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ff4d4f;
  animation: pulse 1.4s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; } 50% { opacity: 0.3; }
}
.scoreboard-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 10px 0;
}
.sb-team { color: var(--cream); font-size: 1.05rem; }
.sb-score { color: var(--gold); font-size: 1.3rem; font-weight: 700; }
.scoreboard-vs {
  text-align: center;
  color: rgba(242, 233, 216, 0.4);
  font-size: 0.7rem;
  border-top: 1px dashed rgba(232, 178, 58, 0.25);
  border-bottom: 1px dashed rgba(232, 178, 58, 0.25);
  padding: 4px 0;
}
.scoreboard-meta {
  margin-top: 16px;
  font-size: 0.72rem;
  color: rgba(242, 233, 216, 0.55);
  border-top: 1px solid rgba(232, 178, 58, 0.18);
  padding-top: 12px;
}
.scoreboard-empty { color: rgba(242, 233, 216, 0.6); text-align: center; padding: 24px 0; }

.scoreboard-players {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(242, 233, 216, 0.7);
  min-height: 16px;
}
.scoreboard-balls { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; min-height: 26px; }
.sb-ball-chip {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(242,233,216,0.1);
  color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
}
.sb-ball-chip-boundary { background: var(--gold); color: var(--pitch-dark); }
.sb-ball-chip-wicket { background: var(--cherry); color: var(--white); }

/* ---------------------------------------------------------------------- */
/* Generic sections                                                       */
/* ---------------------------------------------------------------------- */

.section { padding: 58px 0; }
.section-inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section-inner.narrow { max-width: 820px; }
.section:nth-of-type(even) { background: rgba(11, 61, 46, 0.035); }

.section-head { display: flex; align-items: center; gap: 18px; margin-bottom: 30px; }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.8rem;
  color: var(--pitch);
  margin: 0;
  white-space: nowrap;
}
.section-line { flex: 1; height: 1px; background: repeating-linear-gradient(
  90deg, var(--pitch) 0, var(--pitch) 6px, transparent 6px, transparent 12px
); opacity: 0.35; }

.empty-note { color: rgba(22,33,28,0.55); font-style: italic; }

/* Page head banner used on inner pages */
.page-head { background: var(--pitch); color: var(--cream); }
.page-head-inner { max-width: 1180px; margin: 0 auto; padding: 46px 24px 40px; }
.page-head-inner h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin: 10px 0 8px;
}
.page-head-inner p { color: rgba(242,233,216,0.75); max-width: 560px; }

/* News */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-card);
  border-top: 3px solid var(--gold);
}
.news-date { font-family: var(--font-mono); font-size: 0.72rem; color: var(--cherry); }
.news-card h3 { margin: 10px 0 8px; font-size: 1.08rem; color: var(--pitch); }
.news-card p { font-size: 0.92rem; color: rgba(22,33,28,0.75); margin: 0; }

/* Highlights */
.highlight-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.highlight-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); }
.highlight-frame { aspect-ratio: 16/9; background: var(--pitch-dark); }
.highlight-frame iframe { width: 100%; height: 100%; border: 0; }
.highlight-card h4 { margin: 14px 16px 4px; font-size: 0.98rem; color: var(--pitch); }
.highlight-card p { margin: 0 16px 16px; font-size: 0.86rem; color: rgba(22,33,28,0.65); }

/* Upcoming strip */
.upcoming-strip { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.upcoming-chip {
  flex: 0 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 18px;
  min-width: 240px;
}
.uc-teams { display: block; font-weight: 600; color: var(--pitch); }
.uc-teams em { font-style: normal; color: var(--cherry); margin: 0 6px; font-weight: 400; }
.uc-meta { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 0.72rem; color: rgba(22,33,28,0.55); }

/* Sponsors */
.sponsor-row { display: flex; flex-wrap: wrap; gap: 16px; }
.sponsor-chip {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  min-width: 170px;
}
.sponsor-name { font-weight: 600; color: var(--pitch); }
.sponsor-tier { font-family: var(--font-mono); font-size: 0.68rem; color: var(--cherry); text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------------------------------------------------------------------- */
/* Filter chips (players / matches)                                       */
/* ---------------------------------------------------------------------- */

.filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.filter-chip {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--pitch);
  transition: background 0.15s ease, color 0.15s ease;
}
.filter-chip:hover { background: var(--pitch); color: var(--white); }
.filter-chip.active { background: var(--cherry); color: var(--white); border-color: var(--cherry); }

/* ---------------------------------------------------------------------- */
/* Player cards                                                           */
/* ---------------------------------------------------------------------- */

.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.player-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.player-photo {
  position: relative;
  height: 150px;
  background: linear-gradient(135deg, var(--pitch), var(--pitch-light));
  display: flex; align-items: center; justify-content: center;
}
.player-photo img { width: 100%; height: 100%; object-fit: cover; }
.initials { font-family: var(--font-display); font-size: 2.4rem; color: var(--gold); }
.jersey-badge {
  position: absolute; top: 10px; right: 10px;
  background: var(--gold); color: var(--pitch-dark);
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
  padding: 3px 8px; border-radius: 999px;
}
.player-body { padding: 16px; }
.player-body h3 { margin: 0 0 2px; font-size: 1.05rem; color: var(--pitch); }
.player-role {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--cherry);
  margin-bottom: 10px;
}
.player-facts { font-size: 0.84rem; color: rgba(22,33,28,0.75); display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.status-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}
.status-pending { background: rgba(232,178,58,0.18); color: #a9781f; }
.status-approved { background: rgba(11,61,46,0.12); color: var(--pitch); }

/* ---------------------------------------------------------------------- */
/* Team cards                                                             */
/* ---------------------------------------------------------------------- */

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.team-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-card);
  border-top: 4px solid var(--team-color, var(--pitch));
}
.team-card-top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.team-logo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.team-logo-fallback {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--team-color, var(--pitch));
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.1rem;
  flex-shrink: 0;
}
.team-card h3 { margin: 0; font-size: 1.1rem; color: var(--pitch); }
.team-code { font-family: var(--font-mono); font-size: 0.72rem; color: rgba(22,33,28,0.5); }
.team-desc { font-size: 0.9rem; color: rgba(22,33,28,0.75); margin: 0 0 12px; }
.team-facts { font-size: 0.84rem; display: flex; flex-direction: column; gap: 4px; color: rgba(22,33,28,0.8); }

/* ---------------------------------------------------------------------- */
/* Forms                                                                  */
/* ---------------------------------------------------------------------- */

.form-section { max-width: 760px; }
.form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-card);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; margin-bottom: 24px; }
.form-field { display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; color: var(--ink); }
.form-field-wide { grid-column: 1 / -1; }
.form-field input, .form-field select, .form-field textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
}
.form-field input[type="color"] { padding: 4px; height: 44px; }
.form-field input[type="file"] { background: transparent; padding: 6px 0; border: none; }

/* ---------------------------------------------------------------------- */
/* Matches / Announcements / Notices                                      */
/* ---------------------------------------------------------------------- */

.match-list { display: flex; flex-direction: column; gap: 14px; }
.match-row {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-left: 4px solid var(--line);
}
.match-row.status-live { border-left-color: var(--cherry); }
.match-row.status-upcoming { border-left-color: var(--gold); }
.match-row.status-completed { border-left-color: var(--pitch); }

.match-date-block {
  font-family: var(--font-mono);
  text-align: center;
  min-width: 64px;
  color: var(--pitch);
}
.md-day { display: block; font-size: 1.5rem; font-weight: 700; }
.md-month { display: block; font-size: 0.68rem; text-transform: uppercase; color: rgba(22,33,28,0.5); }

.match-main { flex: 1; }
.match-teams { font-weight: 600; color: var(--pitch); font-size: 1.02rem; }
.match-teams em { font-style: normal; color: var(--cherry); margin: 0 8px; font-weight: 400; }
.match-meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 0.72rem;
  color: rgba(22,33,28,0.55); margin-top: 6px;
}
.match-result { margin-top: 8px; font-size: 0.86rem; color: var(--cherry); font-weight: 500; }

.notice-list { display: flex; flex-direction: column; gap: 16px; }
.notice-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  border-left: 4px solid var(--gold);
}
.notice-card-alt { border-left-color: var(--cherry); }
.notice-date { font-family: var(--font-mono); font-size: 0.7rem; color: rgba(22,33,28,0.5); }
.notice-card h3 { margin: 6px 0 8px; color: var(--pitch); }
.notice-card p { margin: 0; color: rgba(22,33,28,0.78); font-size: 0.93rem; }

/* ---------------------------------------------------------------------- */
/* Contact                                                                */
/* ---------------------------------------------------------------------- */

.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.contact-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease;
}
.contact-card:hover { transform: translateY(-4px); }
.contact-icon { font-size: 1.8rem; }
.contact-card h3 { margin: 10px 0 6px; color: var(--pitch); font-size: 1rem; }
.contact-card p { margin: 0; font-family: var(--font-mono); font-size: 0.82rem; color: rgba(22,33,28,0.65); }

/* ---------------------------------------------------------------------- */
/* Footer                                                                 */
/* ---------------------------------------------------------------------- */

.site-footer { background: var(--pitch-dark); color: rgba(242,233,216,0.75); margin-top: 40px; }
.footer-inner {
  max-width: 1180px; margin: 0 auto; padding: 48px 24px 28px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px;
}
.footer-brand { margin-bottom: 12px; }
.footer-col h4 {
  font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--gold); margin: 0 0 12px;
}
.footer-col a { display: block; padding: 4px 0; font-size: 0.88rem; color: rgba(242,233,216,0.72); }
.footer-col a:hover { color: var(--gold); }
.footer-col p { font-size: 0.86rem; color: rgba(242,233,216,0.6); }
.footer-bottom {
  text-align: center; font-size: 0.75rem; font-family: var(--font-mono);
  color: rgba(242,233,216,0.4);
  padding: 18px 24px; border-top: 1px solid rgba(242,233,216,0.08);
}

/* ---------------------------------------------------------------------- */
/* Responsive                                                             */
/* ---------------------------------------------------------------------- */

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .news-grid, .highlight-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-burger { display: flex; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--pitch);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    border-bottom: 3px solid var(--gold);
  }
  .nav-toggle:checked ~ .main-nav { max-height: 480px; }
  .main-nav > a, .nav-dropdown-label { padding: 14px 24px; border-radius: 0; }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    opacity: 1; visibility: visible; transform: none;
    background: rgba(242,233,216,0.06);
    display: none;
    margin: 0 12px 8px;
  }
  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown.open .nav-dropdown-menu { display: block; }
  .nav-dropdown-menu a { color: var(--cream); }
  .nav-dropdown-menu a:hover { background: rgba(232,178,58,0.15); color: var(--gold); }

  .news-grid, .highlight-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .match-row {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-areas: "date main" "date pill";
    gap: 4px 14px;
    align-items: start;
    padding: 16px;
  }
  .match-date-block { grid-area: date; min-width: 0; }
  .match-main { grid-area: main; min-width: 0; }
  .match-row .status-pill { grid-area: pill; justify-self: start; margin-top: 8px; }
}

/* ---------------------------------------------------------------------- */
/* Public match scorecard page                                            */
/* ---------------------------------------------------------------------- */

.vs-accent { color: var(--gold); font-weight: 400; }
.scorecard-back { font-family: var(--font-mono); font-size: 0.78rem; color: var(--cherry); display: inline-block; margin-bottom: 22px; }
.scorecard-back:hover { text-decoration: underline; }

.scorecard-summary {
  background: var(--pitch-dark);
  color: var(--cream);
  border-radius: 12px;
  padding: 24px 26px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-card);
}
.summary-teams { display: flex; flex-direction: column; gap: 10px; }
.summary-team { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.summary-team-name { font-size: 1.05rem; }
.summary-team-score { font-family: var(--font-mono); font-size: 1.3rem; font-weight: 700; color: var(--gold); }
.summary-result {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px dashed rgba(232,178,58,0.3);
  color: var(--gold);
  font-weight: 600;
}
.summary-live { color: #ff8a8d; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.scorecard-summary .empty-note { color: rgba(242,233,216,0.7); margin: 0; }

.innings-block {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 22px 24px 26px;
  margin-bottom: 26px;
  border-top: 4px solid var(--gold);
}
.innings-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 6px;
}
.innings-head h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.4rem; color: var(--pitch); margin: 0; }
.innings-score { font-family: var(--font-mono); font-weight: 700; color: var(--cherry); font-size: 1.1rem; }
.card-heading {
  font-family: var(--font-mono); font-size: 0.74rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: rgba(22,33,28,0.5); margin: 22px 0 8px;
}

.card-table-wrap { overflow-x: auto; }
.card-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.card-table th {
  text-align: right; font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.04em; color: rgba(22,33,28,0.5); padding: 8px 10px; border-bottom: 2px solid var(--line);
  white-space: nowrap;
}
.card-table td { text-align: right; padding: 10px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.84rem; }
.card-table th:first-child, .card-table td:first-child { text-align: left; }
.card-table-bat th:nth-child(2), .card-table td.card-note { text-align: left; }
.card-table td.card-name { font-family: var(--font-body); font-weight: 600; color: var(--pitch); font-size: 0.92rem; }
.card-table td.card-note { font-family: var(--font-body); color: rgba(22,33,28,0.55); font-size: 0.8rem; }
.card-table td.card-strong { font-weight: 700; color: var(--ink); }
.card-table tfoot td { border-bottom: none; border-top: 2px solid var(--line); }
.notout-star { color: var(--cherry); margin-left: 2px; }


/* Whole-card links: a started match's row, and the live scoreboard, open the full scorecard. */
a.match-row, a.scoreboard-clickable { color: inherit; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a.match-row { transition: transform 0.15s ease, box-shadow 0.15s ease; }
a.match-row:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(11,61,46,0.16); }
a.match-row:active { transform: translateY(0); }
a.scoreboard-clickable { display: block; transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; }
a.scoreboard-clickable:hover { transform: translateY(-2px); border-color: var(--gold); box-shadow: 0 24px 50px rgba(0,0,0,0.42); }
a.scoreboard-clickable:active { transform: translateY(0); }
a.match-row:focus-visible, a.scoreboard-clickable:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { a.match-row:hover, a.scoreboard-clickable:hover { transform: none; } }

/* ---------------------------------------------------------------------- */
/* Photo gallery slider (home page)                                       */
/* ---------------------------------------------------------------------- */

.gallery-slider { position: relative; max-width: 960px; margin: 0 auto; }
.gallery-viewport {
  overflow: hidden;
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  background: var(--pitch-dark);
  border-bottom: 4px solid var(--gold);
}
.gallery-track { display: flex; transition: transform 0.7s cubic-bezier(.65,.05,.25,1); will-change: transform; }
.gallery-slide { position: relative; flex: 0 0 100%; margin: 0; aspect-ratio: 16 / 9; background: var(--pitch-dark); }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-slide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 44px 24px 18px;
  background: linear-gradient(to top, rgba(6,34,25,0.88), rgba(6,34,25,0));
  color: var(--cream);
  font-size: 1rem; font-weight: 500;
}

.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(6,34,25,0.6); color: var(--gold); font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease;
}
.gallery-arrow:hover { background: var(--pitch-dark); }
.gallery-prev { left: 14px; }
.gallery-next { right: 14px; }

.gallery-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.gallery-dot {
  width: 10px; height: 10px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  background: rgba(11,61,46,0.25); transition: background 0.2s ease, transform 0.2s ease;
}
.gallery-dot.active { background: var(--cherry); transform: scale(1.35); }

@media (max-width: 720px) {
  .gallery-arrow { width: 36px; height: 36px; }
  .gallery-prev { left: 8px; } .gallery-next { right: 8px; }
  .gallery-slide figcaption { padding: 32px 16px 12px; font-size: 0.88rem; }
}
@media (prefers-reduced-motion: reduce) { .gallery-track { transition: none; } }

/* Status badges on light cards (match list, admin tables, scorer cards).
   The dark scoreboard keeps its own colours via .scoreboard-status. */
.status-pill.status-live { background: rgba(193, 39, 45, 0.12); color: var(--cherry); }
.status-pill.status-upcoming { background: rgba(232, 178, 58, 0.22); color: #8a6414; }
.status-pill.status-completed { background: rgba(11, 61, 46, 0.10); color: var(--pitch); }
.status-pill .dot { display: inline-block; margin-right: 5px; vertical-align: middle; }
