:root {
  color-scheme: light dark;
  --accent: #0d6efd;
  --border: rgba(0, 0, 0, 0.1);
  --border-dark: rgba(255, 255, 255, 0.2);
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-bg-dark: rgba(30, 30, 30, 0.7);
  --bg: #f4f6fb;
  --bg-dark: #16181d;
  --text: #1c1f25;
  --text-dark: #e6e7ec;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  body {
    background: var(--bg-dark);
    color: var(--text-dark);
  }
  .panel {
    background: var(--card-bg-dark);
    border-color: var(--border-dark);
  }
  .match-card {
    background: rgba(45, 47, 54, 0.65);
    border-color: var(--border-dark);
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-header,
.page-footer {
  padding: 2rem clamp(1rem, 5vw, 4rem);
  text-align: center;
}

.page-header {
  background: linear-gradient(140deg, #002c64, #5bb4ff);
  color: white;
  display: flex;
  justify-content: center;
}

.page-header__inner {
  max-width: 760px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.admin-banner {
  align-self: stretch;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.admin-banner a,
.admin-banner__logout button {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  color: white;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.cast-launcher {
  --disconnected-color: rgba(255, 255, 255, 0.9);
  --inactive-color: rgba(255, 255, 255, 0.6);
  --connected-color: #1dd15a;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 150ms ease;
}

.cast-launcher:hover,
.cast-launcher:focus-visible {
  transform: translateY(-1px);
}

.cast-launcher:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

.admin-banner a:hover,
.admin-banner a:focus-visible,
.admin-banner__logout button:hover,
.admin-banner__logout button:focus-visible {
  background: rgba(255, 255, 255, 0.35);
}

.site-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.site-logo img {
  width: min(240px, 60vw);
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
  border-radius: 18px;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.page-subtitle {
  max-width: 60ch;
  margin: 0.75rem auto 0;
  font-size: 1rem;
  line-height: 1.6;
}


.page-nav a {
  color: white;
  font-weight: 600;
  text-decoration: none;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: background 150ms ease, color 150ms ease;
}

.nav-logout-form {
  display: inline-flex;
  align-items: center;
}

.nav-logout-form button {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: white;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
}

.nav-logout-form button:hover,
.nav-logout-form button:focus-visible {
  background: rgba(255, 255, 255, 0.3);
  color: white;
}

.page-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.2);
}

.page-nav a:hover {
  background: rgba(255, 255, 255, 0.3);
}

[data-lightbox-src] {
  cursor: zoom-in;
}

.lightbox-open {
  overflow: hidden;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 15, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 5vw, 3rem);
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 1600;
}

.lightbox-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top center, rgba(91, 180, 255, 0.25), transparent 55%);
  pointer-events: none;
}

.lightbox-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-overlay__content {
  position: relative;
  max-width: min(90vw, 1200px);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  z-index: 1;
}

.lightbox-overlay__image {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 35px 60px rgba(0, 0, 0, 0.55);
  background: rgba(12, 20, 36, 0.4);
  cursor: zoom-out;
}

.lightbox-overlay__caption {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-align: center;
  color: rgba(244, 247, 255, 0.9);
}

.lightbox-overlay__caption.is-hidden {
  display: none;
}

.lightbox-overlay__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.lightbox-overlay__download {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 999px;
  padding: 0.55rem 1.4rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.lightbox-overlay__download:hover,
.lightbox-overlay__download:focus-visible {
  background: rgba(255, 255, 255, 0.35);
}

.lightbox-overlay__download:disabled {
  opacity: 0.6;
  cursor: progress;
}

.lightbox-overlay__close {
  position: absolute;
  top: -0.75rem;
  right: -0.75rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.35);
}

.lightbox-overlay__close:hover,
.lightbox-overlay__close:focus-visible {
  background: rgba(0, 0, 0, 0.75);
}

.lightbox-overlay__backdrop {
  position: absolute;
  inset: 0;
}

.cast-body {
  margin: 0;
  min-height: 100vh;
  display: block;
  background: radial-gradient(circle at top right, rgba(91, 180, 255, 0.32), rgba(7, 14, 26, 0.96) 58%);
  color: #f5f7ff;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.cast-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 2fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
  padding: clamp(1.25rem, 3vw, 2.75rem);
  height: 100vh;
  box-sizing: border-box;
  align-items: stretch;
  max-width: 1520px;
  margin: 0 auto;
}

.cast-photo {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1rem;
  height: 100%;
}

.cast-photo__frame {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(10, 16, 26, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 28px 45px rgba(0, 0, 0, 0.42);
  flex: 1;
  min-height: 0;
  height: 100%;
  width: 100%;
}

.cast-photo__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 12, 24, 0.05), rgba(6, 12, 24, 0.35));
  pointer-events: none;
}

.cast-photo__image,
[data-cast-photo] {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: rgba(0, 12, 32, 0.4);
  display: block;
}

.cast-photo__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  color: rgba(245, 247, 255, 0.7);
  font-size: 1.1rem;
  line-height: 1.6;
}

.cast-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.cast-info__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: 16px;
  background: rgba(12, 20, 36, 0.7);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.28);
  max-width: 340px;
  width: auto;
  flex: 0 1 clamp(220px, 28vw, 340px);
}

.cast-info__header--stacked {
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
}

.cast-info__header--stacked .cast-info__titles {
  width: 100%;
  text-align: center;
}

.cast-info__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: stretch;
}

.cast-semis {
  background: rgba(15, 24, 44, 0.8);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1 1 420px;
}

.cast-semis__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cast-semis__header h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cast-semis__note {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.65;
  white-space: nowrap;
}

.cast-semis__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

.cast-semis__item {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  padding: 0.35rem 0.2rem;
}

.cast-semis__item--qualified {
  background: rgba(24, 110, 255, 0.08);
  border-radius: 12px;
}

.cast-semis__rank {
  font-weight: 700;
  font-size: 0.95rem;
  color: #7cd5ff;
  min-width: 2rem;
  text-align: center;
}

.cast-semis__body {
  flex: 1;
  padding-bottom: 0.25rem;
}

.cast-semis__headline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.cast-semis__name {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  gap: 0.1rem;
}

.cast-semis__name-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.cast-semis__name p.cast-semis__golf {
  font-size: 0.65rem;
  font-weight: 400;
  opacity: 0.8;
}

.cast-semis__record {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
}

.cast-semis__item:last-child .cast-semis__body {
  border-bottom: none;
}

.cast-semis__meta {
  margin: 0.15rem 0 0;
  font-size: 0.7rem;
  opacity: 0.65;
}

.cast-semis__meta.cast-semis__golf {
  font-size: 0.65rem;
  font-weight: 400;
  opacity: 0.8;
  margin-top: 0.05rem;
}

.cast-info__logo img {
  width: clamp(88px, 11vw, 150px);
  height: auto;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.4));
  display: block;
  margin: 0 auto;
}

.cast-info__titles h1 {
  margin: 0;
  font-size: clamp(1.3rem, 2.2vw, 1.85rem);
}

.cast-games {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  grid-auto-rows: min-content;
  align-content: start;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.cast-card {
  background: rgba(15, 24, 44, 0.74);
  padding: 0.9rem 1rem;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.cast-card h2 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cast-card__section {
  margin-top: 0.6rem;
}

.cast-card__section h3 {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

.cast-card__value {
  margin: 0.3rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.cast-card__matches {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.cast-card__queue-label {
  margin: 1rem 0 0.35rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.65;
}

.cast-card__queue {
  margin: 0;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.95rem;
}

.cast-card--empty {
  text-align: center;
}

.cast-card--empty h2 {
  margin-bottom: 0.75rem;
}

@media (max-width: 860px) {
  .cast-layout {
    grid-template-columns: 1fr;
    height: auto;
    gap: 2rem;
  }

  .cast-photo__frame {
    min-height: clamp(260px, 50vh, 500px);
    max-height: clamp(320px, 65vh, 600px);
  }

  .cast-info__header {
    justify-content: flex-start;
  }

  .cast-info__summary {
    grid-template-columns: 1fr;
  }

  .cast-semis {
    order: 2;
  }

  .cast-semis__list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .cast-info__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .cast-info__logo img {
    width: 90px;
  }

  .cast-card__value {
    font-size: 1rem;
  }
}

.form-hint {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: -0.25rem;
}

.section-intro {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  opacity: 0.75;
}

.team-list__members {
  margin: 0;
  font-size: 0.95rem;
}

.bracket-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.control-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.control-buttons form button {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.6rem;
  font-weight: 600;
  cursor: pointer;
}

.control-buttons form button.secondary {
  background: #555;
}

.control-buttons form button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.control-buttons__logout {
  margin-left: auto;
}

.control-buttons form button.secondary:hover,
.control-buttons form button.secondary:focus-visible {
  filter: brightness(1.15);
}

.control-hint {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.7;
}

.control-hint--warning {
  color: #7a4d00;
  opacity: 1;
  font-weight: 600;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  margin: 0;
}

.flash--success {
  background: rgba(25, 135, 84, 0.15);
  color: #196f54;
  border: 1px solid rgba(25, 135, 84, 0.3);
}

.flash--error {
  background: rgba(192, 57, 43, 0.15);
  color: #8c2f24;
  border: 1px solid rgba(192, 57, 43, 0.3);
}

.flash--warning {
  background: rgba(255, 193, 7, 0.18);
  color: #7a4d00;
  border: 1px solid rgba(255, 193, 7, 0.35);
}

.highlight {
  border-radius: 18px;
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.highlight--champion {
  background: linear-gradient(135deg, rgba(255, 221, 64, 0.25), rgba(255, 105, 180, 0.25));
  border: 1px solid rgba(255, 221, 64, 0.5);
  box-shadow: 0 15px 35px rgba(255, 191, 0, 0.25);
}

.highlight--warning {
  background: rgba(255, 193, 7, 0.15);
  border: 1px solid rgba(255, 193, 7, 0.35);
  box-shadow: 0 10px 25px rgba(255, 193, 7, 0.2);
}

.highlight h2 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
}

.highlight__team {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800;
  margin: 0.5rem 0 0;
}

.highlight__details {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  opacity: 0.85;
}

.highlight__confetti {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin: 0.75rem 0 0;
}

.inline-editor--compact {
  padding: 0.6rem 0.75rem;
}

.playoff-bracket {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.playoff-note {
  font-size: 0.85rem;
  opacity: 0.75;
  margin: 0;
  text-align: center;
}

#playoff-bracket {
  max-width: 420px;
  margin: 0 auto;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 12px;
}

.playoff-final {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.playoff-final .match-score {
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0;
}


.admin-login-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-login-form input {
  font: inherit;
  padding: 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.admin-login-form button {
  align-self: flex-start;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.75rem;
  font-weight: 600;
  cursor: pointer;
}

.admin-locked {
  font-size: 0.9rem;
  opacity: 0.7;
}

.rsvp-card,
.free-agent-card,
.team-list__header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.inline-editor {
  margin-top: 0.75rem;
  border: 1px dashed rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  background: rgba(0, 0, 0, 0.02);
}

.inline-editor summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.inline-editor summary::-webkit-details-marker {
  display: none;
}

.inline-editor summary::after {
  content: "▾";
  margin-left: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.65;
}

.inline-editor[open] {
  background: rgba(13, 110, 253, 0.05);
}

.inline-form {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.inline-form label {
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.inline-form input,
.inline-form textarea,
.inline-form select {
  font: inherit;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.inline-form button {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-weight: 600;
  cursor: pointer;
}

.inline-form .btn-secondary {
  background: rgba(13, 110, 253, 0.15);
  color: var(--accent);
  border: 1px solid rgba(13, 110, 253, 0.25);
}

.inline-form .btn-secondary--danger {
  background: rgba(192, 57, 43, 0.12);
  color: #8a1e14;
  border: 1px solid rgba(192, 57, 43, 0.35);
}

.inline-form .btn-secondary:hover,
.inline-form .btn-secondary:focus-visible {
  background: rgba(13, 110, 253, 0.25);
}

.inline-form .btn-secondary--danger:hover,
.inline-form .btn-secondary--danger:focus-visible {
  background: rgba(192, 57, 43, 0.2);
  border-color: rgba(192, 57, 43, 0.55);
  color: #6d160f;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.inline-form--danger button {
  background: #c0392b;
}

.inline-form--danger button:hover,
.inline-form--danger button:focus-visible {
  filter: brightness(0.9);
}

.rsvp-card + .inline-editor,
.free-agent-card + .inline-editor,
.team-list__header + .inline-editor {
  margin-top: 0.75rem;
}

.team-list__item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.team-list__members {
  margin: 0;
  font-size: 0.95rem;
}

.content {
  flex: 1;
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  padding: clamp(1rem, 5vw, 4rem);
}

.content.content--single {
  display: block;
}

.content.content--single .panel {
  width: min(760px, 100%);
  margin: 0 auto 2rem;
}

.panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 45px -30px rgba(0, 0, 0, 0.45);
  padding: clamp(1.5rem, 5vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.panel--warning {
  border-color: rgba(255, 193, 7, 0.45);
  background: rgba(255, 202, 40, 0.12);
}

.panel h2 {
  margin: 0;
  font-size: 1.4rem;
}

.moderation-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.moderation-list__item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px dashed rgba(255, 193, 7, 0.4);
  background: rgba(255, 193, 7, 0.15);
}

.moderation-change {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 193, 7, 0.35);
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  flex: 1 1 auto;
}

.moderation-change__title {
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: #8a1e14;
}

.moderation-change ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.moderation-change li span {
  font-weight: 600;
}

.moderation-approve {
  margin: 0;
}


.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rsvp-form input,
.rsvp-form textarea {
  font: inherit;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.rsvp-form button {
  align-self: flex-start;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.75rem;
  font-weight: 600;
  cursor: pointer;
}

.rsvp-form button:hover,
.rsvp-form button:focus-visible {
  filter: brightness(1.1);
}

.form-error {
  color: #b00020;
  font-weight: 600;
}

.form-success {
  color: #0f7b3f;
  font-weight: 600;
}

.helper-text {
  font-size: 0.9rem;
  margin-top: 0.25rem;
  color: rgba(0, 0, 0, 0.7);
}

.next-match {
  gap: 0.5rem;
}

.next-match__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.next-match__teams {
  margin: 0;
  font-size: 1.25rem;
}

.current-match-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.current-match-list__item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.current-match-list__game {
  font-weight: 700;
}

.current-match-list__teams {
  font-size: 1rem;
}

.current-match-list__status {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.empty-state {
  font-size: 0.95rem;
  opacity: 0.8;
}

.event-meta {
  list-style: none;
  margin: 0 0 1rem 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.event-meta li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 0.35rem;
}

.event-meta span {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.event-meta strong {
  font-size: 1rem;
}

.event-card__meta {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.8;
}

.event-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.event-photos--preview figure {
  height: 120px;
}

.event-photos figure {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

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

.event-card__actions {
  margin-top: 0.85rem;
}

.event-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--accent);
}

.event-card__link:hover,
.event-card__link:focus-visible {
  text-decoration: underline;
}

.event-card__winner {
  margin: 1rem 0;
  border-radius: 16px;
  overflow: hidden;
  max-height: 260px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.04);
}

.event-card__winner img {
  max-width: 100%;
  max-height: 260px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.photo-gallery {
  column-count: 3;
  column-gap: 1rem;
}

.photo-gallery__item {
  margin: 0 0 1rem;
  break-inside: avoid;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.08);
  position: relative;
}

.photo-gallery__item img {
  width: 100%;
  display: block;
}

.photo-gallery__delete {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}

.photo-gallery__delete-button {
  border: none;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(192, 57, 43, 0.1);
  color: #8a1e14;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.photo-gallery__delete-button:hover,
.photo-gallery__delete-button:focus-visible {
  background: rgba(192, 57, 43, 0.2);
  color: #6d160f;
}

@media (max-width: 900px) {
  .photo-gallery {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .photo-gallery {
    column-count: 1;
  }
}

.events-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}


.event-detail {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.event-detail__meta {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.7;
}

.event-detail__description {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.event-detail__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.event-detail__stats dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
}

.event-detail__stats dd {
  margin: 0.15rem 0 0;
  font-size: 1rem;
  font-weight: 600;
}

.event-detail__winner {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  max-width: 520px;
}

.event-detail__winner img {
  width: 100%;
  height: 100%;
  max-height: 340px;
  object-fit: cover;
  display: block;
}

.event-detail__winner figcaption {
  margin: 0;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.65);
  color: white;
  font-size: 0.85rem;
}

.event-gallery__masonry {
  column-count: 3;
  column-gap: 1rem;
}

.event-gallery__item {
  margin: 0 0 1rem;
  break-inside: avoid;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.08);
  position: relative;
}

.event-gallery__item img {
  width: 100%;
  display: block;
  object-fit: cover;
  max-height: 360px;
}

.event-gallery__delete {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
}

.event-gallery__delete-button {
  border: none;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(192, 57, 43, 0.12);
  color: #8a1e14;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.event-gallery__delete-button:hover,
.event-gallery__delete-button:focus-visible {
  background: rgba(192, 57, 43, 0.22);
  color: #6d160f;
}

@media (max-width: 900px) {
  .event-gallery__masonry {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .event-gallery__masonry {
    column-count: 1;
  }
  .event-gallery__item img {
    max-height: 320px;
  }
}

.rsvp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rsvp-list li {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

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

.rsvp-meta {
  font-size: 0.85rem;
  opacity: 0.7;
}

.rsvp-note {
  margin: 0;
  font-size: 0.9rem;
  font-style: italic;
}

.game-schedule {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.game-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.game-card__header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.game-card__header h3 {
  margin: 0;
  font-size: 1.25rem;
}

.game-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  opacity: 0.7;
}

.match-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.match-list__item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.75rem 0.25rem;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

.match-list__item:last-child {
  border-bottom: none;
}

.match-list__divider {
  font-size: 0.85rem;
  text-transform: uppercase;
  opacity: 0.7;
}

.match-order {
  font-weight: 600;
  margin-right: 0.5rem;
}

.match-status {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.match-score {
  margin: 0;
  font-weight: 600;
}

.match-score-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.match-score-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
}

.match-score-form input {
  font: inherit;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 0.4rem 0.6rem;
  width: 6rem;
}

.match-score-form button {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 0.45rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
}

.match-score-form--bucket {
  flex-direction: column;
  align-items: stretch;
}

.match-score-list {
  margin: 0.35rem 0 0;
  padding-left: 1rem;
  font-size: 0.85rem;
}

.match-score-list li {
  margin: 0;
}

.match-order {
  font-weight: 600;
  margin-right: 0.5rem;
}

.match-status {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.match-score {
  margin: 0;
  font-weight: 600;
}

.match-score-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.match-score-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
}

.match-score-form input {
  font: inherit;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 0.4rem 0.6rem;
  width: 6rem;
}

.match-score-form button {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 0.45rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
}

.bracket {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.bracket__round {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.round-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  margin: 0;
  opacity: 0.7;
}

.round-matches {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.match-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.match-slot {
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.7;
}

.match-teams {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: space-between;
}

.team {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(250, 250, 250, 0.9);
}

.team-seed {
  font-weight: 700;
  min-width: 2ch;
}

.team-name {
  flex: 1;
}

.team--tbd {
  opacity: 0.6;
  border-style: dashed;
  border-color: var(--border);
}

.team--bye {
  background: rgba(255, 255, 255, 0.4);
  font-style: italic;
}

.match-note {
  font-size: 0.8rem;
  opacity: 0.65;
}

.match-bye {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #8a4500;
}

.leaderboard {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.leaderboard__row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.leaderboard__team {
  font-weight: 600;
}

.leaderboard__stat {
  font-size: 0.9rem;
}

.leaderboard__row--playoff {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.3);
}

.playoff-list {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.playoff-list__item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.playoff-list__name {
  font-weight: 600;
}

.playoff-list__stat {
  font-size: 0.9rem;
  opacity: 0.8;
}

.rule-list {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rule-list li {
  line-height: 1.6;
}

.playoff-semis {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.playoff-semis__item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.playoff-semis__team {
  font-weight: 600;
}

.playoff-semis__score {
  font-size: 0.95rem;
  opacity: 0.85;
}

.playoff-semis__lock {
  margin: 0.5rem 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #7a4d00;
}

.playoff-semis__pending {
  font-size: 0.9rem;
  opacity: 0.75;
}

.finalists {
  font-weight: 600;
  margin: 0.5rem 0 0;
}

.page-footer {
  font-size: 0.9rem;
  opacity: 0.85;
  background: rgba(0, 0, 0, 0.05);
}
.text-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.team-form input {
  width: 100%;
  font: inherit;
  padding: 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.team-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.team-list__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
}

.team-list__name {
  font-weight: 600;
}

.team-list__meta {
  font-size: 0.85rem;
  opacity: 0.7;
}

.free-agent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.free-agent-list__item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.free-agent-list__item--paired {
  background: rgba(13, 110, 253, 0.08);
}

.free-agent-name {
  font-weight: 600;
}

.free-agent-meta {
  font-size: 0.85rem;
  opacity: 0.7;
}

.free-agent-note {
  margin: 0;
  font-style: italic;
}

.participants-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.page-nav {
  margin-top: 1.25rem;
  display: inline-flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.upload-field {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

#photo-upload {
  flex: 1 1 220px;
}

.upload-form button {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
}

.file-name {
  font-size: 0.9rem;
  opacity: 0.8;
}

.photo-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.photo-carousel__viewport {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  flex: 1;
  max-height: clamp(220px, 40vw, 360px);
}

.photo-carousel--compact .photo-carousel__viewport {
  max-height: 260px;
  max-width: 560px;
  margin: 0 auto;
}

.photo-slide {
  display: none;
  margin: 0;
  position: relative;
}

.photo-slide.is-active {
  display: block;
}

.photo-slide img {
  width: 100%;
  display: block;
  object-fit: cover;
  height: clamp(220px, 40vw, 360px);
}

.photo-carousel--compact .photo-slide img {
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
}

.photo-slide figcaption {
  margin: 0;
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.carousel-btn {
  border: none;
  background: rgba(0, 0, 0, 0.4);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover,
.carousel-btn:focus-visible {
  background: rgba(0, 0, 0, 0.6);
}

.page-nav a {
  color: white;
  font-weight: 600;
  text-decoration: none;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: background 150ms ease, color 150ms ease;
}

.page-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.2);
}

.page-nav a:hover {
  background: rgba(255, 255, 255, 0.3);
}
