:root {
  color-scheme: light;
  font-family: system-ui, "Segoe UI", sans-serif;
  color: #172a21;
  background: #f2f4ee;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ink: #172a21;
  --muted: #55675c;
  --line: #dce4d9;
  --surface: #fcfdf9;
  --canvas: #f2f4ee;
  --green: #102b22;
  --green-raised: #214a37;
  --lime: #dbf47b;
  --radius: 1.25rem;
  --gutter: clamp(1rem, 3vw, 2rem);
  --page: 74rem;
  --shadow: 0 1px 2px #1c312c0a, 0 8px 24px #1c312c06;
}

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

[hidden] {
  display: none !important;
}

body {
  min-width: 0;
  min-height: 100dvh;
  margin: 0;
  line-height: 1.5;
}

button, input, select, textarea {
  font: inherit;
}

button, a, input, select, textarea {
  -webkit-tap-highlight-color: #47734720;
}

a {
  color: #20523a;
  text-underline-offset: .18em;
}

:focus-visible {
  outline: 3px solid #4d8152;
  outline-offset: 3px;
}

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

h1, h2, h3, p {
  margin: 0;
  overflow-wrap: anywhere;
}

h1, h2, h3, strong {
  line-height: 1.18;
}

h1 {
  font-size: clamp(1.8rem, 1.5rem + 1.9vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -.056em;
}

h2 {
  font-size: clamp(1.22rem, 1.1rem + .6vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -.033em;
}

h3 {
  font-size: 1.055rem;
  letter-spacing: -.018em;
}

small, .small {
  font-size: .85rem;
}

.muted {
  color: var(--muted);
}

.shell {
  min-height: 100dvh;
}

.header {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  min-height: 4.45rem;
  padding: max(.65rem, env(safe-area-inset-top)) var(--gutter) .65rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner,
.header > .container {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  width: min(100%, var(--page));
  min-width: 0;
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -.04em;
  text-decoration: none;
}

.brand-mark,
.brand > img:first-child {
  display: grid;
  flex: 0 0 2.45rem;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  color: var(--lime);
  background: var(--green);
  border-radius: .68rem;
  overflow: hidden;
}

.brand-mark svg,
.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-copy {
  display: grid;
  min-width: 0;
  gap: .1rem;
}

.brand small {
  color: var(--muted);
  font-size: .77rem;
  font-weight: 600;
  letter-spacing: 0;
}

.main {
  width: min(100%, calc(var(--page) + var(--gutter) * 2));
  min-width: 0;
  margin-inline: auto;
  padding: clamp(1.2rem, 4vw, 3rem) var(--gutter) calc(6rem + env(safe-area-inset-bottom));
}

.main > * + * {
  margin-block-start: 1rem;
}

.screen-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: .75rem 1.25rem;
  margin-block-end: clamp(.85rem, 2vw, 1.35rem);
}

.screen-heading p {
  margin-block-start: .3rem;
  color: var(--muted);
}

.nav {
  position: fixed;
  z-index: 12;
  inset: auto 0 0;
  display: flex;
  align-items: stretch;
  gap: .16rem;
  padding: .36rem max(.55rem, env(safe-area-inset-right)) calc(.36rem + env(safe-area-inset-bottom)) max(.55rem, env(safe-area-inset-left));
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  background: #fcfdf9;
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px #172a2110;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav ul {
  display: flex;
  flex: 1;
  align-items: stretch;
  gap: inherit;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav li {
  display: flex;
  min-width: 0;
}

.nav a,
.nav button {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .16rem;
  min-width: 3.5rem;
  min-height: 3.05rem;
  padding: .25rem .55rem;
  border: 0;
  border-radius: .75rem;
  color: var(--muted);
  background: transparent;
  font-size: .81rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.nav svg {
  width: 1.28rem;
  height: 1.28rem;
  flex-shrink: 0;
}

.nav a[aria-current="page"],
.nav button[aria-current="page"],
.nav .active,
.nav [aria-selected="true"] {
  color: #173b2b;
  background: #e6eedd;
}

.card, .hero {
  min-width: 0;
  padding: clamp(1rem, 3vw, 1.65rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card > h2 + *,
.card > h3 + *,
.card > header + * {
  margin-block-start: .85rem;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #f7fbef;
  border-color: #254b3a;
  background:
    radial-gradient(85% 110% at 100% 0%, #345c42 0%, transparent 72%),
    linear-gradient(135deg, #102b22, #163a2d 74%, #173c2c);
  box-shadow: 0 10px 26px #17392a1c;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: clamp(-3.6rem, -6vw, -1rem);
  top: -4.5rem;
  width: clamp(11rem, 43vw, 25rem);
  aspect-ratio: 1.45;
  opacity: .26;
  transform: rotate(-22deg);
  border: 1px solid #d4e4aa;
  border-radius: .55rem;
  pointer-events: none;
  background:
    radial-gradient(circle at center, transparent 0 15%, #d4e4aa 15.4% 15.8%, transparent 16.2%),
    linear-gradient(to right, transparent 49.75%, #d4e4aa 50%, transparent 50.25%);
}

.hero :is(h1, h2) {
  color: #fff;
}

.hero .muted,
.hero .small,
.hero small {
  color: #d1e1d1;
}

.hero a:not(.button, .btn) {
  color: var(--lime);
}

.hero :focus-visible {
  outline-color: var(--lime);
}

.hero .button.primary,
.hero .btn.primary {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--green);
}

.stack, .grid, .split {
  display: grid;
  gap: .9rem;
  min-width: 0;
}

.stack > *, .grid > *, .split > *, .row > * {
  min-width: 0;
}

.grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

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

.grid.cols-3,
.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.split {
  align-items: start;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem .7rem;
}

.row.between,
.row.space-between {
  justify-content: space-between;
}

.row.end {
  justify-content: flex-end;
}

.row.start {
  align-items: flex-start;
}

.row.nowrap {
  flex-wrap: nowrap;
}

.button,
.btn,
button:not([class]):not(.nav button) {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .45rem;
  min-height: 2.75rem;
  padding: .61rem .85rem;
  color: var(--green);
  background: #ecf1e7;
  border: 1px solid #d9e5d6;
  border-radius: .73rem;
  font-weight: 750;
  line-height: 1.22;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s, color .16s, border-color .16s;
}

.button.primary, .btn.primary, button.primary {
  color: #fbfff2;
  background: var(--green);
  border-color: var(--green);
}

.button.secondary, .btn.secondary, button.secondary {
  background: var(--surface);
  color: var(--green);
  border-color: #bdcdbd;
}

.button.danger, .btn.danger, button.danger {
  color: #8b2725;
  background: #fff7f4;
  border-color: #efcdc7;
}

.button.ghost, .btn.ghost, button.ghost {
  color: inherit;
  background: transparent;
  border-color: transparent;
}

.button.block, .btn.block, button.block {
  width: 100%;
}

.button :is(svg, img), .btn :is(svg, img), button :is(svg, img) {
  flex: 0 0 1.1rem;
  width: 1.1rem;
  height: 1.1rem;
}

.button[aria-pressed="true"], .btn[aria-pressed="true"], button[aria-pressed="true"] {
  color: #173a28;
  background: #e3f0d6;
  border-color: #87a783;
}

.button:disabled, .btn:disabled, button:disabled {
  opacity: .52;
  cursor: not-allowed;
}

.tag, .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .32rem;
  width: fit-content;
  max-width: 100%;
  min-height: 1.72rem;
  padding: .22rem .6rem;
  color: #384d3f;
  background: #edf1e9;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .81rem;
  font-weight: 750;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

:is(.tag, .pill):is(.success, .good, .yes, .going, .accepted, .confirmed) {
  color: #215331;
  background: #e1f0d9;
  border-color: #d1e6c9;
}

:is(.tag, .pill):is(.warning, .maybe, .waiting, .pending) {
  color: #6b4616;
  background: #f7ebce;
  border-color: #ead9b1;
}

:is(.tag, .pill):is(.danger, .no, .declined) {
  color: #862f28;
  background: #f9e6df;
  border-color: #eed2ca;
}

:is(.tag, .pill).black {
  background: #21282b;
  color: #fff;
}

:is(.tag, .pill).white {
  color: #1c3428;
  background: #fff;
  border-color: #c5d4c7;
}

.hero :is(.tag, .pill).neutral {
  color: #e8f5dc;
  background: #ffffff14;
  border-color: #ffffff2b;
}

.list {
  display: grid;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .35rem .7rem;
  min-width: 0;
  min-height: 3.2rem;
  padding: .66rem 0;
  border-bottom: 1px solid var(--line);
}

.list-row:first-child {
  padding-top: .4rem;
}

.list-row:last-child {
  border-bottom: 0;
}

.list-row > * {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.avatar {
  display: inline-grid;
  flex: 0 0 2.2rem;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  color: #284d35;
  background: #e7efe1;
  border: 1px solid #dbe6d8;
  border-radius: 50%;
  font-size: .77rem;
  font-weight: 800;
  object-fit: cover;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.empty {
  padding: clamp(1.05rem, 4vw, 1.8rem);
  color: var(--muted);
  background: #f4f7f1;
  border: 1px dashed #c7d5c5;
  border-radius: .9rem;
  text-align: center;
}

.empty > * + * {
  margin-block-start: .45rem;
}

.form {
  display: grid;
  gap: .8rem;
  min-width: 0;
}

label {
  display: block;
  color: var(--ink);
  font-size: .91rem;
  font-weight: 700;
}

label:has(input[type="checkbox"], input[type="radio"]) {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  min-height: 2.65rem;
}

.input,
input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="range"], [type="color"], [type="submit"]),
select,
textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  padding: .57rem .7rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c9d6c7;
  border-radius: .65rem;
  font-size: 1rem;
  line-height: 1.35;
}

label > :is(.input, input:not([type="checkbox"], [type="radio"]), select, textarea) {
  margin-block-start: .3rem;
}

select {
  appearance: none;
  padding-inline-end: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 18 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m4 7 5 5 5-5' stroke='%23324e3d' fill='none' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .65rem center;
  background-size: 1.1rem;
}

textarea {
  min-height: 5rem;
  resize: vertical;
}

input:is([type="checkbox"], [type="radio"]) {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: #29583d;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: .55rem .75rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
}

legend {
  padding: 0 .25rem;
  font-size: .91rem;
  font-weight: 750;
}

progress {
  appearance: none;
  display: block;
  width: 100%;
  height: .54rem;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #dbe5d9;
  accent-color: #537749;
}

progress::-webkit-progress-bar {
  border-radius: inherit;
  background: #dbe5d9;
}

progress::-webkit-progress-value {
  border-radius: inherit;
  background: #537749;
}

progress::-moz-progress-bar {
  border-radius: inherit;
  background: #537749;
}

.hero progress,
.hero progress::-webkit-progress-bar {
  background: #ffffff22;
}

.hero progress::-webkit-progress-value {
  background: var(--lime);
}

.hero progress::-moz-progress-bar {
  background: var(--lime);
}

.pitch {
  --chalk: #e0eed1a8;
  position: relative;
  isolation: isolate;
  width: min(100%, 37rem);
  margin-inline: auto;
  padding: .8rem;
  overflow: hidden;
  color: #f6fbf3;
  border: 1px solid #123d2d;
  border-radius: .95rem;
  background:
    repeating-linear-gradient(0deg, #deed9d0a 0 9.8%, transparent 9.8% 19.6%),
    radial-gradient(100% 80% at 50% 5%, #3b7750, #245639);
}

.pitch::before {
  position: absolute;
  z-index: -1;
  content: "";
  inset: .8rem;
  border: 1px solid var(--chalk);
  pointer-events: none;
}

.pitch::after {
  position: absolute;
  z-index: -1;
  content: "";
  top: 50%;
  left: 50%;
  width: 19%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid var(--chalk);
  border-radius: 50%;
  pointer-events: none;
}

.pitch-half {
  position: relative;
  isolation: isolate;
  min-height: clamp(16.5rem, 61vw, 20rem);
  text-align: center;
}

.pitch-half + .pitch-half {
  border-top: 1px solid var(--chalk);
}

.pitch-half::before,
.pitch-half::after {
  position: absolute;
  z-index: -1;
  content: "";
  top: 0;
  left: 50%;
  width: 43%;
  height: 26%;
  transform: translateX(-50%);
  pointer-events: none;
  border: 1px solid var(--chalk);
  border-top: 0;
}

.pitch-half::after {
  width: 25%;
  height: 12%;
}

.pitch-half + .pitch-half::before,
.pitch-half + .pitch-half::after {
  top: auto;
  bottom: 0;
  border: 1px solid var(--chalk);
  border-bottom: 0;
}

.pitch-half > :is(.tag, .pill) {
  position: absolute;
  top: .38rem;
  left: .38rem;
  z-index: 2;
}

.player-marker {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  display: grid;
  justify-items: center;
  gap: .08rem;
  width: min(var(--player-width, 24%), 9rem);
  padding: 0;
  transform: translate(-50%, -50%);
  color: #fff;
  border: 0;
  background: transparent;
  font-size: clamp(.71rem, 2.5vw, .94rem);
  font-weight: 750;
  line-height: 1.12;
  text-align: center;
  text-shadow: 0 1px 2px #091d12, 0 1px 5px #133b25;
  overflow-wrap: anywhere;
}

button.player-marker {
  min-height: 2.75rem;
  align-content: center;
  cursor: pointer;
}

.player-marker .pitch-name {
  max-width: calc(100% - .13rem);
  padding: .11rem .2rem;
  border-radius: .23rem;
  background: #102e24de;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.player-marker .pitch-name.compact {
  font-size: .89em;
}

.player-marker[aria-pressed="true"] > .shirt {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

.shirt {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: clamp(1.52rem, 6vw, 2.1rem);
  height: clamp(1.4rem, 5.5vw, 1.95rem);
  padding: .12rem;
  clip-path: polygon(26% 0, 40% 0, 45% 13%, 55% 13%, 60% 0, 74% 0, 99% 22%, 88% 47%, 76% 40%, 76% 100%, 24% 100%, 24% 40%, 12% 47%, 1% 22%);
  color: #1f372a;
  background: #fff;
  font-size: .66rem;
  font-weight: 800;
  text-shadow: none;
}

.shirt.black, .shirt[data-team="black"] {
  color: #fff;
  background: #11171b;
}

.shirt.white, .shirt[data-team="white"] {
  color: #15261e;
  background: #fff;
}

.auth-shell {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1.15rem;
  min-height: 100dvh;
  padding: max(1.6rem, env(safe-area-inset-top)) var(--gutter) max(1.6rem, env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse at 50% 0%, #e4ecda, transparent 65%),
    var(--canvas);
}

.auth-shell > * {
  width: min(100%, 29rem);
}

.auth-shell > .brand {
  width: auto;
}

.auth-shell .card {
  display: grid;
  gap: .9rem;
  padding: clamp(1.15rem, 5vw, 2.2rem);
}

.auth-shell h1 {
  font-size: clamp(1.7rem, 6vw, 2.6rem);
}

.auth-shell .card > h2 + * {
  margin-block-start: 0;
}

dialog.modal, dialog {
  width: min(calc(100% - 1.5rem), 36rem);
  max-height: min(88dvh, 49rem);
  padding: clamp(1rem, 4vw, 1.6rem);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 70px #12281947;
}

dialog::backdrop {
  background: #11271eb0;
}

dialog > * + * {
  margin-block-start: .8rem;
}

.modal img {
  width: min(100%, 25rem);
  max-height: 59dvh;
  margin-inline: auto;
  border-radius: .75rem;
  object-fit: contain;
}

.table-wrap {
  min-width: 0;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: .91rem;
  text-align: left;
}

th, td {
  padding: .61rem .55rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 750;
}

summary {
  min-height: 2.75rem;
  padding: .58rem .1rem;
  font-weight: 750;
  cursor: pointer;
}

.error, .alert {
  padding: .65rem .8rem;
  color: #882d25;
  background: #fff1ea;
  border: 1px solid #eed4c8;
  border-radius: .65rem;
  overflow-wrap: anywhere;
}

#toast:empty {
  display: none;
}

#toast {
  position: fixed;
  z-index: 30;
  inset: auto 1rem calc(4.75rem + env(safe-area-inset-bottom)) auto;
  width: max-content;
  max-width: min(24rem, calc(100% - 2rem));
  padding: .73rem .95rem;
  border: 1px solid #35654a;
  border-radius: .78rem;
  color: #f7ffef;
  background: var(--green);
  box-shadow: 0 8px 24px #12291f32;
  font-size: .93rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

noscript {
  display: block;
  margin: 2rem auto;
  max-width: 30rem;
  padding-inline: var(--gutter);
}

@media (hover: hover) {
  .button:hover, .btn:hover, button:not([class]):hover {
    filter: brightness(.96);
  }

  .nav a:hover, .nav button:hover {
    background: #e9efe5;
    color: var(--green);
  }
}

@media (max-width: 375px) {
  :root {
    --gutter: .85rem;
  }

  .nav a, .nav button {
    padding-inline: .44rem;
  }

  .button, .btn {
    padding-inline: .65rem;
  }

  .pitch {
    padding: .65rem;
  }

  .pitch::before {
    inset: .65rem;
  }
}

@media (min-width: 760px) {
  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header {
    min-height: 4.75rem;
    padding-inline: max(var(--gutter), calc((100% - var(--page)) / 2));
  }

  .nav {
    position: static;
    justify-content: center;
    padding: .32rem;
    border: 0;
    border-radius: .9rem;
    background: #eef2e9;
    box-shadow: none;
  }

  .shell > .nav {
    justify-content: flex-start;
    width: fit-content;
    max-width: calc(100% - var(--gutter) * 2);
    margin: 1rem auto 0;
    border: 1px solid var(--line);
    background: var(--surface);
  }

  .nav a, .nav button {
    flex: 0 0 auto;
    flex-direction: row;
    gap: .42rem;
    min-height: 2.45rem;
    padding: .35rem .7rem;
    font-size: .88rem;
  }

  .nav svg {
    width: 1.04rem;
    height: 1.04rem;
  }

  .main {
    padding-bottom: 3rem;
  }

  #toast {
    bottom: 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .001ms !important;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.match-picker select { max-width: 100%; }
.match-hero { gap: 0.85rem; }
.match-kicker { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 650; }
.match-kicker svg { width: 1rem; height: 1rem; }
.date::first-letter { text-transform: uppercase; }
.match-date { font-size: clamp(2rem, 5vw, 3.7rem); line-height: 1.05; max-width: 20ch; }
.match-count strong, .hero-number { font-size: clamp(2rem, 5vw, 3.65rem); line-height: 1.05; }
.match-count span { font-weight: 650; }
.match-hero progress { max-width: 30rem; }
.match-place { min-height: 1em; }
.rsvp-buttons .button { flex: 1 1 auto; }
.player-meta { display: block; margin-top: 0.14rem; }
.kit-badge { display: flex; align-items: center; gap: 0.6rem; width: fit-content; padding: 0.45rem 0.75rem;
  border-radius: 0.65rem; color: #11251b; background: #e4f6b9; font-weight: 750; }
.kit-badge.black { background: #233129; color: #fff; outline: 1px solid #839589; }
.kit-badge.reserve .shirt { display: none; }
.share-card { display: block; width: min(100%, 360px); height: auto; margin-inline: auto; border-radius: 0.65rem; }
.money-totals { gap: 1rem; }
.money-totals strong { display: block; margin-top: 0.25rem; }
.score { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.score strong { font-size: clamp(1.8rem, 5vw, 2.75rem); white-space: nowrap; }
.position-choice { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; }
.shirt-photo { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.player-option form { gap: 0.35rem; }
.player-option select { width: auto; }
.guest-row .row { justify-content: flex-end; }
#alignment { scroll-margin-top: 5.7rem; }
@media (max-width: 520px) {
  .match-hero .row.between .pill { font-size: 0.72rem; }
  .match-count strong { font-size: 2.7rem; }
  .match-picker { width: 100%; }
  .guest-row, .player-option { flex-wrap: wrap; }
  .guest-row .row { justify-content: flex-start; }
}

.profile-button {
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  padding: .15rem;
  place-items: center;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  cursor: pointer;
}

.club-footer {
  display: flex;
  width: min(100% - var(--gutter) * 2, var(--page));
  margin-inline: auto;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: 1.25rem 0 2.4rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .86rem;
}
.club-footer img { width: 35px; height: 35px; object-fit: contain; }
.auth-shell:has(+ .club-footer) { min-height: calc(100dvh - 6rem); }

.attendance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.attendance-control {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: .45rem;
  color: var(--ink);
  background: transparent;
  text-align: start;
  cursor: pointer;
}

.attendance-control.pending {
  justify-content: center;
  padding-inline: .65rem;
  min-height: 40px;
  border-radius: 1rem;
  color: #5d3a11;
  background: #f5ebd5;
  font-size: .82rem;
  font-weight: 750;
}

.attendance-control.pending[aria-expanded="true"] {
  background: #eed699;
  box-shadow: inset 0 0 0 1px #8c631f;
}

#attendance-panel { padding-top: .45rem; }
.attendance-section { border-top: 1px solid var(--line); }
.attendance-section .attendance-control { width: 100%; padding-inline: .14rem; font-size: .94rem; font-weight: 690; }
.attendance-count {
  margin-inline-start: auto;
  min-width: 1.55rem;
  padding: .12rem .35rem;
  border: 1px solid var(--line);
  border-radius: .45rem;
  color: var(--muted);
  font-size: .84rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.attendance-chevron {
  flex: 0 0 .47rem;
  height: .47rem;
  margin-inline: .15rem .24rem;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-.14rem) rotate(45deg);
}

.attendance-control[aria-expanded="true"] .attendance-chevron { transform: translateY(.12rem) rotate(225deg); }
.attendance-pending-list:not([hidden]) { padding-bottom: .4rem; }
.attendance-invite, .attendance-guest-actions { margin-top: .65rem; }
.roster-entry { display: grid; grid-template-columns: minmax(0, 1fr) max-content; align-items: start; }
.roster-entry.single { grid-template-columns: minmax(0, 1fr); }
.roster-person { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: .65rem; align-items: center; }
.roster-person > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.roster-entry .pill { align-self: center; }
.rsvp-buttons .button { flex: 1 1 0; min-width: 0; padding-inline: .3rem; font-size: .93rem; }
.rsvp-buttons .rsvp-going { --status: #1b613f; --pale: #e0f5e3; --stroke: #7cbe8d; }
.rsvp-buttons .rsvp-maybe { --status: #75490d; --pale: #fff0c6; --stroke: #d0a64c; }
.rsvp-buttons .rsvp-no { --status: #8b2725; --pale: #fce9e8; --stroke: #d69791; }
.hero .rsvp-buttons .button { color: var(--status); background: var(--pale); border-color: var(--stroke); }
.hero .rsvp-buttons .button[aria-pressed="true"] {
  color: white;
  background: var(--status);
  border-color: var(--pale);
  box-shadow: 0 0 0 1px var(--pale);
}

.team-lists h3 { display: flex; align-items: center; gap: .45rem; }
.team-column { min-width: 0; }
.team-player.list-row {
  display: grid;
  justify-content: stretch;
  align-content: start;
  min-height: 3.55rem;
  gap: .22rem;
  padding-block: .55rem;
}

@supports (grid-template-rows: subgrid) {
  .team-lists { row-gap: 0; }
  .team-column { display: grid; grid-row: 1 / span var(--team-rows); grid-template-rows: subgrid; }
  .team-roster { grid-row: 2 / -1; grid-template-rows: subgrid; row-gap: 0; }
}
.shirt-outline { width: 1.8rem; height: 1.8rem; flex: 0 0 auto; padding: 1px; overflow: visible; }
.shirt-outline.white { fill: #fff; stroke: #526a5c; stroke-width: 1.8; stroke-linejoin: round; }
.shirt-outline.black { fill: #151a1e; stroke: #78837d; stroke-width: 1.5; stroke-linejoin: round; }
.method-choice { display: grid; gap: .15rem; }
.method-choice label { min-height: 44px; }

dialog.modal { padding: 0; overflow: auto; overscroll-behavior: contain; }
.dialog-head {
  position: sticky;
  z-index: 2;
  inset-block-start: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .7rem clamp(.85rem, 4vw, 1.55rem);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 { min-width: 0; }
.dialog-head .button { flex: 0 0 auto; }
.dialog-body { padding: .85rem clamp(.85rem, 4vw, 1.55rem) 1.15rem; margin: 0; }
.share-modes { display: flex; flex-wrap: wrap; gap: .4rem; }
.share-modes .button[aria-pressed="true"] { color: #173a28; background: #e3f0d6; border-color: #7fa080; }
.share-previews { display: grid; gap: .95rem; }
.share-preview { min-width: 0; display: grid; align-content: start; gap: .55rem; margin: 0; }
.share-preview .share-card { width: 100%; margin: 0; max-height: 36dvh; object-position: center; }
.share-preview.share-overview { grid-column: 1 / -1; justify-items: center; }
@media (min-width: 520px) {
  .share-previews.by-team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.finance-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 5.5rem), 1fr)); gap: .36rem; }
label.finance-month-chip {
  justify-content: start; align-content: center; min-width: 0; min-height: 44px; padding: .32rem .42rem;
  border: 1px solid var(--line); border-radius: .65rem; font-size: .82rem;
}
.finance-month-chip:has(input:checked) { border-color: #78a989; background: #e3f0d6; color: #173a28; }
.finance-month-chip small { font-size: .73rem; }
.finance-month-summary { font-size: .91rem; }

@media (max-width: 759px) {
  .nav ul { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .nav li { justify-content: center; }
  .nav button { min-width: 0; width: 100%; padding-inline: .18rem; font-size: .76rem; }
  .main { padding-bottom: 1.4rem; }
  .club-footer { padding-bottom: calc(5.45rem + env(safe-area-inset-bottom)); }
  .auth-shell + .club-footer { padding-bottom: 1.6rem; }
  dialog.modal {
    inset: auto 0 max(.45rem, env(safe-area-inset-bottom));
    margin: 0 auto;
    max-height: calc(100dvh - max(1.05rem, env(safe-area-inset-top)) - max(.45rem, env(safe-area-inset-bottom)));
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  color: #e5eee8;
  background: #121a17;
  --ink: #e5eee8;
  --muted: #b0c1b8;
  --line: #384b42;
  --surface: #1e2b25;
  --canvas: #121a17;
  --green: #24483a;
  --green-raised: #3b6350;
  --shadow: 0 6px 22px #0002;
}
[data-theme="dark"] :is(.header, .nav) { background: var(--surface); }
[data-theme="dark"] a { color: #bdeab9; }
[data-theme="dark"] :is(.button.secondary, .button:not(.primary, .secondary, .ghost, .danger), .nav button) { color: var(--ink); }
[data-theme="dark"] .button.secondary { border-color: #6a8a78; }
[data-theme="dark"] .share-modes .button[aria-pressed="true"] { color: #e7f8ec; background: #315744; border-color: #7fac92; }
[data-theme="dark"] .button.primary { border-color: #5c8e70; }
[data-theme="dark"] .nav button[aria-current="page"] { background: #365945; color: #f1fff1; }
[data-theme="dark"] :is(input:not([type="checkbox"],[type="radio"]), select, textarea) {
  background-color: #15221c; border-color: #647d6d; color: var(--ink);
}
[data-theme="dark"] select {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 18 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m4 7 5 5 5-5' stroke='%23c5ded0' fill='none' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
[data-theme="dark"] .auth-shell { background: radial-gradient(ellipse at 50% 0%, #26382d, transparent 65%), var(--canvas); }
[data-theme="dark"] .empty { background: #26352d; border-color: var(--line); }
[data-theme="dark"] :is(.tag, .pill).neutral:not(.hero *) { color: #d3ded6; background: #34453b; }
[data-theme="dark"] .shirt-outline.black { stroke: #b7c5bd; }
[data-theme="dark"] .finance-month-chip:has(input:checked) { background: #2b533e; color: #e4ffeb; }
