:root {
  --cream: #fff8eb;
  --sand: #f4dfb2;
  --gold: #f2b84b;
  --orange: #eb7a34;
  --red-clay: #bb4f2f;
  --grass: #2f6a4f;
  --grass-deep: #1f4b3a;
  --ink: #1d2730;
  --white: #ffffff;
  --line: rgba(29, 39, 48, 0.12);
  --shadow: 0 20px 40px rgba(24, 33, 41, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Nunito", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.16)),
    url("site-body-background.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
}

body.board-page {
  background:
    linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
    url("board-background.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.teams-page {
  background:
    linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1)),
    url("teams-background.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.finance-page {
  background:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
    url("finance-background.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.registration-page {
  background:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
    url("registration-background.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.sponsors-page {
  background:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
    url("sponsors-background.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.commissioner-page {
  background:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
    url("commissioner-background.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.vote-page {
  background:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
    url("vote-background.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.merchandise-page {
  background:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
    url("merchandise-background.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.social-page {
  background:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
    url("social-background.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.documents-page {
  background:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
    url("site-body-background.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.board-page .page-intro,
body.board-page .page-intro h1,
body.board-page .page-intro p,
body.board-page .page-intro .eyebrow {
  color: #bb1f22;
  text-shadow: none;
}

body.board-page .site-header,
body.board-page .site-header a,
body.board-page .site-header strong,
body.board-page .site-header small,
body.board-page .main-nav .nav-link,
body.board-page .site-footer,
body.board-page .site-footer p,
body.board-page .site-footer strong,
body.board-page .site-footer a {
  color: #bb1f22;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background:
    linear-gradient(rgba(255, 248, 235, 0.24), rgba(255, 248, 235, 0.24)),
    url("header-background.png");
  background-size: 100% 100%;
  background-position: center bottom;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--line);
}

.header-inner,
.footer-inner,
.page-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
  justify-self: start;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

#header-player-logout {
  color: var(--white);
  background: linear-gradient(135deg, #d83232, #8f1111);
}

.brand img {
  width: 60px;
  height: 60px;
}

.brand-text strong,
h1,
h2,
h3 {
  font-family: "Bree Serif", serif;
}

.brand-text span,
.brand-text small {
  display: block;
}

.brand-text small {
  color: rgba(29, 39, 48, 0.7);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.nav-stack {
  display: grid;
  gap: 0.6rem;
  justify-items: center;
}

.nav-row {
  width: 100%;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  border: 1px solid transparent;
  overflow: hidden;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease, width 180ms ease, height 180ms ease, padding 180ms ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  background: var(--white);
  border-color: rgba(187, 79, 47, 0.2);
  transform: translateY(-1px);
}

.nav-link.is-softball {
  width: 64px;
  min-width: 64px;
  height: 64px;
  padding: 0;
  border-radius: 50%;
  color: transparent;
  border-color: rgba(187, 79, 47, 0.45);
  background: radial-gradient(circle at 35% 35%, #fff7a8 0%, #f7e55f 38%, #efc92e 72%, #d4a510 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    0 10px 18px rgba(24, 33, 41, 0.18);
  transform: translateY(-1px) scale(1.06);
}

.nav-link.is-softball::before,
.nav-link.is-softball::after {
  content: "";
  position: absolute;
  top: 13px;
  bottom: 13px;
  width: 18px;
  border-left: 3px solid #bb1f22;
  border-radius: 50%;
  transform: rotate(-12deg);
}

.nav-link.is-softball::before {
  left: 14px;
}

.nav-link.is-softball::after {
  right: 14px;
  transform: scaleX(-1) rotate(-12deg);
}

.page-shell {
  padding: 2rem 0 3rem;
}

.hero,
.panel,
.info-card,
.team-rank-card,
.schedule-card,
.league-form,
.submission-card,
.jersey-card,
.ad-space {
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(29, 39, 48, 0.08);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  padding: 2rem;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(47, 106, 79, 0.95), rgba(31, 75, 58, 0.92)),
    var(--grass);
  color: var(--white);
}

.hero-home {
  position: relative;
  min-height: 560px;
  grid-template-columns: 1fr;
  align-content: end;
  background:
    linear-gradient(180deg, rgba(8, 18, 44, 0.24), rgba(8, 18, 44, 0.78)),
    url("home-background.png"),
    linear-gradient(140deg, rgba(47, 106, 79, 0.95), rgba(31, 75, 58, 0.92));
  background-size: 100% 100%;
  background-position: center;
}

.hero-home .hero-copy {
  max-width: 720px;
  padding: 1rem;
  border-radius: 24px;
  background: rgba(10, 18, 33, 0.38);
  backdrop-filter: blur(8px);
}

.hero-photo-frame {
  padding: 1rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-actions,
.stack-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  font-weight: 800;
  border: none;
  cursor: pointer;
}

.button-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--orange), var(--red-clay));
}

.button-secondary {
  color: var(--ink);
  background: var(--sand);
}

.eyebrow {
  margin: 0 0 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 800;
}

.hero h1,
.page-intro h1 {
  margin: 0 0 0.7rem;
  line-height: 1.08;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.7rem);
}

.hero-text,
.page-intro p {
  font-size: 1.05rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 1.4rem;
  margin-top: 1.5rem;
}

.social-layout {
  display: grid;
  gap: 1.4rem;
}

.documents-layout {
  display: grid;
  gap: 1.4rem;
}

.social-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.social-feed {
  display: grid;
  gap: 1rem;
}

.social-post {
  padding: 1rem;
  border-radius: 20px;
  background: rgba(244, 223, 178, 0.25);
  border: 1px solid rgba(29, 39, 48, 0.08);
}

.social-post img,
.social-post video {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 18px;
  margin-top: 0.8rem;
}

.chat-stream {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.chat-message {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(29, 39, 48, 0.08);
}

.documents-list {
  display: grid;
  gap: 1rem;
}

.document-card {
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(29, 39, 48, 0.08);
}

.panel,
.league-form,
.submission-card {
  padding: 1.5rem;
}

.news-list,
.card-grid,
.schedule-list {
  display: grid;
  gap: 1rem;
}

.news-card {
  padding: 1rem 1.1rem;
  border-radius: 20px;
  background: rgba(244, 223, 178, 0.28);
  border: 1px solid rgba(47, 106, 79, 0.08);
}

.quick-links {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.quick-links a {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(47, 106, 79, 0.08);
  font-weight: 700;
}

.ad-space {
  padding: 1.3rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(244, 223, 178, 0.65));
}

.ad-label {
  margin: 0;
  color: var(--red-clay);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
}

.inner-page .page-intro {
  margin-bottom: 1.5rem;
}

.card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-card,
.schedule-card {
  padding: 1.4rem;
}

.team-rankings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.team-rank-card {
  position: relative;
  padding: 1.4rem;
}

.rank-badge {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--white);
  font-weight: 900;
}

.form-layout {
  display: grid;
  gap: 1.2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.league-form label,
.league-form legend {
  font-weight: 800;
}

.league-form input,
.league-form select,
.league-form textarea {
  width: 100%;
  margin-top: 0.45rem;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(29, 39, 48, 0.16);
  font: inherit;
  background: rgba(255, 255, 255, 0.95);
}

.league-form fieldset {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid rgba(29, 39, 48, 0.12);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.8rem;
}

.checkbox-grid label,
.jersey-card {
  font-weight: 700;
}

.checkbox-grid input,
.jersey-card input {
  width: auto;
  margin-right: 0.5rem;
}

.field-note {
  margin-top: 0.65rem;
  color: rgba(29, 39, 48, 0.72);
}

.commissioner-box {
  margin: 1rem 0 1.5rem;
  padding: 1rem;
  border-radius: 20px;
  background: rgba(187, 79, 47, 0.08);
  border: 1px dashed rgba(187, 79, 47, 0.35);
}

.admin-card {
  background: rgba(47, 106, 79, 0.08);
}

.commissioner-layout {
  gap: 1.5rem;
}

.commissioner-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.data-table th,
.data-table td {
  padding: 0.8rem 0.75rem;
  border-bottom: 1px solid rgba(29, 39, 48, 0.12);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  font-family: "Bree Serif", serif;
  background: rgba(47, 106, 79, 0.08);
}

.rating-input {
  min-width: 90px;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(29, 39, 48, 0.16);
  font: inherit;
}

.table-input,
.table-select {
  width: 100%;
  min-width: 110px;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(29, 39, 48, 0.16);
  font: inherit;
  background: rgba(255, 255, 255, 0.96);
}

.admin-section {
  margin-top: 1.5rem;
}

.admin-chip-list,
.schedule-admin-list {
  display: grid;
  gap: 1rem;
}

.admin-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(29, 39, 48, 0.12);
}

.admin-chip-main {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-chip-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.team-crest-thumb {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(29, 39, 48, 0.1);
}

.team-crest-placeholder {
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  color: #6b4b3c;
}

.crest-showcase {
  margin-bottom: 1.4rem;
}

.crest-grid {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.crest-card {
  width: min(180px, 100%);
  text-align: center;
  padding: 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(29, 39, 48, 0.12);
}

.crest-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 0.75rem;
  background: rgba(255, 255, 255, 0.95);
}

.schedule-admin-card {
  padding: 1rem 1.1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(29, 39, 48, 0.12);
}

.schedule-admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.schedule-print-list {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

.schedule-print-list li {
  margin-bottom: 0.55rem;
}

.team-game-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.55rem;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(9, 12, 18, 0.56);
  z-index: 1000;
}

.confirm-dialog {
  width: min(460px, 100%);
  padding: 1.5rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(29, 39, 48, 0.12);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.22);
}

.confirm-dialog h2 {
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.dialog-input {
  width: 100%;
  margin-top: 0.45rem;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(29, 39, 48, 0.16);
  font: inherit;
  background: rgba(255, 255, 255, 0.95);
}

.welcome-dialog {
  width: min(520px, 100%);
  padding: 1.7rem;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(29, 39, 48, 0.12);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.24);
}

.welcome-dialog h2 {
  margin: 0.2rem 0 0.7rem;
}

.hidden {
  display: none;
}

.jersey-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.jersey-card {
  padding: 1rem;
}

.jersey-preview {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  margin: 0.8rem 0;
  border-radius: 22px;
}

.jersey-photo {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 5;
  object-fit: contain;
  margin: 0.8rem 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.75);
}

.jersey-one {
  background: linear-gradient(180deg, #f9a03f, #c94f2d);
}

.jersey-two {
  background: linear-gradient(180deg, #2f6a4f, #9ad2b1);
}

.jersey-three {
  background:
    repeating-linear-gradient(90deg, #fff8eb, #fff8eb 16px, #bb4f2f 16px, #bb4f2f 20px);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 248, 235, 0.88);
}

.footer-inner {
  padding: 1.5rem 0 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.footer-brand img {
  width: 46px;
  height: 46px;
}

@media (max-width: 900px) {
  .header-inner,
  .hero,
  .content-grid,
  .card-grid,
  .team-rankings,
  .form-grid,
  .jersey-grid,
  .schedule-admin-grid {
    grid-template-columns: 1fr;
  }

  .header-inner {
    grid-template-columns: 1fr;
  }

  .nav-stack {
    justify-items: stretch;
  }

  .main-nav {
    justify-content: center;
  }

  .header-actions {
    justify-self: center;
  }

  .footer-inner {
    flex-direction: column;
  }
}
