:root {
  --ink: #173321;
  --muted: #587263;
  --paper: #f5f0df;
  --paper-deep: #e8dfc6;
  --field: #176c3a;
  --field-dark: #0d4927;
  --ocean: #087f8c;
  --ocean-dark: #07505a;
  --foam: #dffcff;
  --lime: #d8f26a;
  --orange: #ed7d31;
  --line: rgba(23, 51, 33, 0.22);
  --shadow: 8px 8px 0 rgba(13, 73, 39, 0.25);
  --mono: "IBM Plex Mono", monospace;
  --display: "VT323", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--mono);
  background:
    radial-gradient(circle at 10% 10%, rgba(216, 242, 106, 0.16), transparent 22rem),
    repeating-radial-gradient(
      ellipse at 50% 115%,
      transparent 0 36px,
      rgba(255, 255, 255, 0.07) 38px 42px,
      transparent 44px 78px
    ),
    linear-gradient(145deg, var(--ocean), var(--ocean-dark));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  border: 12px solid rgba(255, 255, 255, 0.16);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.signup-shell {
  width: min(calc(100% - 2rem), 1040px);
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.signup-header,
.board-heading,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.signup-header {
  margin-bottom: 1.25rem;
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.signup-header p,
.eyebrow,
.game-meta,
footer p {
  margin: 0;
}

.site-mark {
  display: inline-flex;
  padding: 0.65rem 0.8rem;
  border: 2px solid white;
  color: white;
  text-decoration: none;
}

.intro-panel,
.board,
.form-panel {
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  background:
    radial-gradient(circle at 92% 14%, rgba(255, 255, 255, 0.72) 0 5px, transparent 6px),
    radial-gradient(circle at 86% 23%, rgba(255, 255, 255, 0.62) 0 8px, transparent 9px),
    linear-gradient(135deg, transparent 75%, rgba(99, 202, 211, 0.42) 75%),
    var(--paper);
}

.eyebrow {
  color: var(--field);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

h1,
h2,
.game-date {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  line-height: 0.92;
}

h1 {
  margin-top: 0.8rem;
  font-size: clamp(4.3rem, 11vw, 7.5rem);
}

h2 {
  margin-top: 0.4rem;
  font-size: clamp(2.4rem, 6vw, 4rem);
}

.intro-copy,
.form-heading > p:last-child {
  max-width: 42rem;
  margin: 1.25rem 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.team-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.3rem;
}

.team-tags span {
  padding: 0.5rem 0.7rem;
  border: 2px solid var(--ink);
  background: var(--foam);
  font-size: 0.72rem;
  font-weight: 700;
}

.shark-mascot {
  position: relative;
  display: grid;
  width: clamp(7rem, 17vw, 11rem);
  aspect-ratio: 1;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background:
    linear-gradient(180deg, var(--foam) 0 48%, #72d3dc 49% 100%);
  transform: rotate(8deg);
  box-shadow: 7px 7px 0 var(--ocean-dark);
}

.shark {
  font-size: clamp(4rem, 10vw, 7rem);
  transform: translate(-0.25rem, -0.1rem);
}

.soccer-ball {
  position: absolute;
  right: -0.65rem;
  bottom: -0.35rem;
  font-size: clamp(2rem, 5vw, 3.4rem);
  filter: drop-shadow(3px 3px 0 rgba(23, 51, 33, 0.3));
}

.board,
.form-panel {
  margin-top: 1.5rem;
  padding: clamp(1.25rem, 4vw, 2.4rem);
}

.refresh-button,
.text-button {
  border: 0;
  background: transparent;
  color: var(--field);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.25rem;
}

.status-message {
  margin-top: 1.4rem;
  padding: 1rem;
  border: 2px dashed var(--line);
  color: var(--muted);
  line-height: 1.6;
}

.status-message:empty {
  display: none;
}

.schedule-table-wrap {
  overflow-x: auto;
  margin-top: 1.4rem;
  border: 2px solid var(--ink);
  background: #fffdf5;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.schedule-table th,
.schedule-table td {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.schedule-table thead th {
  background: var(--ocean-dark);
  color: white;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.schedule-table thead th:first-child,
.game-date-cell {
  width: 48%;
}

.schedule-table tbody tr:last-child th,
.schedule-table tbody tr:last-child td {
  border-bottom: 0;
}

.schedule-table tbody tr.is-claimed {
  background: var(--paper-deep);
}

.schedule-table tbody tr.is-open:hover {
  background: var(--foam);
}

.game-date-cell {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

.signup-cell {
  height: 4.5rem;
}

.signup-names {
  display: grid;
  gap: 0.3rem;
}

.signup-names strong {
  color: var(--field-dark);
  font-size: 0.9rem;
}

.signup-names span {
  color: var(--muted);
  font-size: 0.78rem;
}

.table-signup-button {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.6rem 0.8rem;
  border: 2px dashed var(--ocean);
  background: transparent;
  color: var(--ocean-dark);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: left;
}

.table-signup-button:hover,
.table-signup-button:focus-visible {
  border-style: solid;
  background: var(--lime);
}

.primary-button {
  min-height: 2.9rem;
  padding: 0.65rem 1rem;
  border: 2px solid var(--ink);
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 4px 4px 0 var(--ink);
}

.primary-button:hover,
.primary-button:focus-visible {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.form-panel {
  background: #fffdf5;
}

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

label {
  display: grid;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
}

label span {
  color: var(--muted);
  font-weight: 400;
}

input {
  width: 100%;
  min-height: 3rem;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  padding: 0.7rem 0.8rem;
}

input:focus {
  outline: 3px solid var(--lime);
  outline-offset: 2px;
}

.form-actions,
.form-result {
  grid-column: 1 / -1;
}

.form-actions {
  justify-content: flex-start;
  margin-top: 0.35rem;
}

.form-result {
  min-height: 1.5rem;
  margin: 0;
  color: var(--field-dark);
  line-height: 1.5;
}

footer {
  padding: 1.5rem 0 0;
  color: white;
  text-align: center;
  font-size: 0.76rem;
}

footer a {
  display: inline-block;
  margin-top: 0.55rem;
  color: white;
  font-size: 0.92rem;
  font-weight: 700;
  text-underline-offset: 0.25rem;
}

footer a:hover,
footer a:focus-visible {
  color: var(--lime);
}

@media (max-width: 700px) {
  .intro-panel,
  form {
    grid-template-columns: 1fr;
  }

  .schedule-table {
    table-layout: auto;
  }

  .schedule-table th,
  .schedule-table td {
    padding: 0.85rem;
  }

  .schedule-table thead th:first-child,
  .game-date-cell {
    width: 44%;
  }

  .shark-mascot {
    grid-row: 1;
  }

  .board-heading,
  .signup-header {
    align-items: flex-start;
  }

  .signup-header p {
    text-align: right;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
