:root {
  --bg: #f3efe8;
  --ink: #1f2a2c;
  --ink-soft: #42585d;
  --accent: #177f52;
  --accent-deep: #0e5c3c;
  --card: #fff9ee;
  --line: #d9cfbf;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, #fce9cc 0%, transparent 48%),
    radial-gradient(circle at 85% 15%, #d8f0df 0%, transparent 40%),
    var(--bg);
  min-height: 100vh;
  position: relative;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(18px);
  z-index: 0;
  opacity: 0.38;
  pointer-events: none;
}

.orb-1 {
  width: 300px;
  height: 300px;
  background: #fde3b5;
  top: -90px;
  right: -80px;
}

.orb-2 {
  width: 260px;
  height: 260px;
  background: #c7e7d4;
  bottom: -70px;
  left: -60px;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 20px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  text-decoration: none;
  color: var(--ink);
  font-size: clamp(1.2rem, 2.4vw, 1.8rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
}

.brand img {
  width: min(66vw, 420px);
  max-width: 100%;
  height: auto;
}

.top-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.select-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.select-wrap select {
  min-width: 285px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  font-size: 0.92rem;
  font-weight: 600;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px 50px;
}

.hero {
  background: linear-gradient(140deg, #fff9ec 0%, #f5f8f1 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(24px, 5vw, 56px);
  box-shadow: 0 14px 28px rgba(16, 31, 20, 0.08);
  animation: rise-in 520ms ease-out both;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 22px;
  align-items: center;
}

.hero-art {
  width: 100%;
  border-radius: 14px;
  border: 1px solid #cad9cf;
  background: #f6f5ec;
}

.kicker {
  margin: 0;
  color: var(--accent-deep);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.76rem;
}

h1 {
  margin: 10px 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.04;
}

.lede {
  margin: 0;
  max-width: 70ch;
  font-size: clamp(1rem, 2.1vw, 1.2rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  text-decoration: none;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 700;
  border: 1px solid transparent;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
}

.btn.primary:hover {
  background: var(--accent-deep);
}

.btn.ghost {
  border-color: #9ea69e;
  color: #1f3730;
  background: rgba(255, 255, 255, 0.7);
}

.health {
  margin-top: 16px;
  display: inline-block;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
}

.health.pending {
  background: #ece4d3;
  color: #544a3a;
}

.health.ok {
  background: #d6f0e0;
  color: #0c5c39;
}

.health.down {
  background: #f9d8d8;
  color: #7b1f1f;
}

.panel {
  margin-top: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(18px, 3vw, 26px);
  box-shadow: 0 8px 18px rgba(40, 49, 26, 0.06);
  animation: rise-in 620ms ease-out both;
}

.image-cards {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.image-card {
  background: #fffdf4;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 18px rgba(40, 49, 26, 0.06);
}

.image-card img {
  width: 100%;
  display: block;
  border-radius: 11px;
  border: 1px solid #cad9cf;
}

.image-card h3 {
  margin: 12px 0 7px;
  font-size: 1.05rem;
}

.image-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.5;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.panel h2 {
  margin: 0 0 8px;
  font-size: 1.28rem;
}

.league-intro h1 {
  margin-top: 8px;
}

.form-panel {
  padding: clamp(18px, 3vw, 32px);
}

.league-form h2 {
  margin: 18px 0 10px;
  font-size: 1.1rem;
}

.form-grid {
  display: grid;
  gap: 12px;
}

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

.form-grid.one {
  grid-template-columns: 1fr;
}

.league-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.league-form input,
.league-form select {
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 0.98rem;
  color: var(--ink);
  background: #fff;
}

.legal-box {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffef9;
  padding: 12px;
}

.legal-box p {
  margin: 0 0 10px;
  color: var(--ink-soft);
}

.legal-box p:last-child {
  margin-bottom: 0;
}

.check-row {
  margin-top: 10px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink);
}

.check-row input[type="checkbox"] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
}

.form-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.form-status {
  margin-top: 12px;
  font-weight: 700;
  color: #5a5a5a;
}

.form-status.ok {
  color: #0c5c39;
}

.form-status.error {
  color: #7b1f1f;
}

.standings-panel {
  overflow: hidden;
}

.standings-wrap {
  width: 100%;
  overflow-x: auto;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.standings-table th,
.standings-table td {
  border-bottom: 1px solid #ddd6c9;
  padding: 10px 8px;
  text-align: left;
  font-size: 0.95rem;
}

.standings-table th {
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #516564;
}

.standings-table tbody tr:hover {
  background: #fcf8ef;
}

.rsvp-pill {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #c9d2c7;
  background: #f2f6ef;
  color: #2d453e;
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: middle;
}

.standings-table td:nth-child(1),
.standings-table td:nth-child(3),
.standings-table td:nth-child(4),
.standings-table td:nth-child(5),
.standings-table td:nth-child(6),
.standings-table td:nth-child(7),
.standings-table td:nth-child(8) {
  font-variant-numeric: tabular-nums;
}

.oneday-main {
  padding-bottom: 108px;
}

.oneday-tab-panel h2 {
  margin-bottom: 10px;
}

.score-report-form {
  margin-top: 16px;
}

.court-layout {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #ddd6c9;
  border-radius: 12px;
  background: #fffef9;
}

.court-layout h3 {
  margin: 0 0 6px;
}

.court-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.court-cell {
  border: 2px solid #8bb39e;
  border-radius: 10px;
  background: linear-gradient(160deg, #e7f4ec 0%, #f7fcf8 100%);
  color: #1f4c3f;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.court-photo-wrap {
  margin: 14px 0 0;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #cad9cf;
  background: #f4f8f2;
}

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

.court-photo-highlight {
  position: absolute;
  right: 7%;
  bottom: 8%;
  width: 24%;
  aspect-ratio: 1 / 1;
  border: 4px solid #f8d73c;
  border-radius: 6px;
  box-shadow: 0 0 0 2px rgba(15, 36, 31, 0.45);
  pointer-events: none;
}

.league-form textarea {
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 0.98rem;
  color: var(--ink);
  background: #fff;
  resize: vertical;
}

.bottom-tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  background: rgba(243, 239, 232, 0.92);
  backdrop-filter: blur(8px);
  border-top: 1px solid #d6ccb9;
}

.bottom-tab {
  border: 1px solid #b9c2b6;
  background: #fdf8ee;
  border-radius: 12px;
  padding: 11px 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #23453e;
  cursor: pointer;
}

.bottom-tab.active {
  background: #1c7f54;
  color: #fff;
  border-color: #1c7f54;
}

.panel ul {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.signup p {
  margin-top: 6px;
  color: var(--ink-soft);
}

.signup-form {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.signup-form input,
.signup-form button {
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 0.98rem;
}

.signup-form input {
  min-width: 250px;
  flex: 1;
}

.signup-form button {
  background: #143f35;
  color: #fff;
  border-color: #143f35;
  font-weight: 700;
  cursor: pointer;
}

.site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 20px 24px;
  color: #5f6666;
  font-size: 0.9rem;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 820px) {
  .hero-grid,
  .image-cards,
  .form-grid.two,
  .two-col {
    grid-template-columns: 1fr;
  }

  .select-wrap select {
    min-width: 230px;
  }

  .brand img {
    width: min(85vw, 360px);
  }

  .bottom-tabs {
    gap: 6px;
    padding: 8px;
  }

  .bottom-tab {
    font-size: 0.82rem;
    padding: 10px 6px;
  }

  .court-grid {
    gap: 8px;
  }

  .court-cell {
    min-height: 66px;
    font-size: 0.83rem;
  }
}
