* {
  box-sizing: border-box;
}

:root {
  --bg: #f2f8ef;
  --card: #ffffff;
  --ink: #173421;
  --line: #cde0c8;
  --accent: #2b7b4a;
  --accent-strong: #195636;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top right, #d9edcf, #f2f8ef 48%);
}

body.admin-page {
  background: radial-gradient(circle at top right, #e7dcf8, #f6f1fc 48%);
}

body.admin-page .site-header {
  border-bottom-color: #d8c7ee;
  background: rgba(249, 245, 255, 0.92);
}

body.admin-page .brand {
  color: #5b2f82;
}

body.admin-page .member-chip {
  border-color: #d8c7ee;
  background: #f7f2fd;
}

body.admin-page .menu-button {
  border-color: #d8c7ee;
  background: #f2ebfb;
}

body.admin-page .card,
body.admin-page .dashboard-card {
  border-color: #d8c7ee;
}

body.admin-page .dashboard-card {
  background: #fdfbff;
}

body.admin-page .dashboard-card:hover {
  border-color: #c8afe8;
  box-shadow: 0 10px 20px rgba(65, 35, 94, 0.10);
  background: #f8f4fd;
}

h1,
h2,
h3,
input[name="title"] {
  text-transform: capitalize;
}

.collapse-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(135deg, #edf7e8, #dff0d6);
  color: var(--accent-strong);
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(23, 52, 33, 0.08);
  list-style: none;
}

.event-picker-select.is-today {
  background: #e8f7dd;
  border-color: #9fcb9e;
  color: #245c16;
}

.event-picker-select.is-next-up {
  background: #eef6ff;
  border-color: #b8d0f0;
  color: #244a77;
}

.event-picker-status {
  padding: 8px 10px;
  border-radius: 8px;
}

.event-picker-status.is-today {
  background: #eef9e7;
  color: #245c16;
}

.event-picker-status.is-next-up {
  background: #f1f7ff;
  color: #244a77;
}

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

.collapse-summary::after {
  content: "Expand +";
  font-size: 0.95rem;
  line-height: 1;
  font-weight: 700;
}

details[open] > .collapse-summary::after {
  content: "Collapse –";
}

body.admin-page .collapse-summary {
  border-color: #ccb7e9;
  background: linear-gradient(135deg, #f3ebfd, #e5d8f8);
  color: #5b2f82;
  box-shadow: 0 8px 18px rgba(65, 35, 94, 0.10);
}

.popout-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(23, 52, 33, 0.45);
}

.popout-overlay[hidden] {
  display: none !important;
}

.popout-window {
  width: min(1200px, 96vw);
  height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 18px 40px rgba(23, 52, 33, 0.22);
}

.popout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #f6fbf3;
}

.popout-frame {
  width: 100%;
  flex: 1;
  border: 0;
  background: #fff;
}

body.admin-page .popout-overlay {
  background: rgba(49, 23, 78, 0.42);
}

body.admin-page .popout-window,
body.admin-page .popout-header {
  border-color: #d8c7ee;
}

body.admin-page .popout-header {
  background: #f4ecfd;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  position: sticky;
  top: 0;
}

.header-inner {
  width: min(1080px, 92vw);
  margin: 0 auto;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f6fbf3;
}

.member-chip-name {
  font-weight: 700;
  color: var(--accent-strong);
}

.member-chip-role {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #e6efe2;
  color: #31503f;
}

.member-chip-role.role-admin {
  background: #fff4df;
  color: #7a4b00;
}

.member-chip-role.role-editor {
  background: #e8f0ff;
  color: #294f8a;
}

.member-chip-role.role-user {
  background: #e6efe2;
  color: #31503f;
}

.member-chip-handicap {
  font-size: 0.9rem;
  color: #355845;
}

.member-chip-handicap.handicap-live {
  color: #1e7a33;
}

.member-chip-handicap.handicap-stale {
  color: #b42318;
}

.member-chip .handicap-status-badge {
  margin-left: 0;
  white-space: nowrap;
}

.brand {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
}

.menu-dropdown {
  position: relative;
}

.menu-dropdown summary {
  list-style: none;
}

.menu-dropdown summary::-webkit-details-marker {
  display: none;
}

.menu-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf6ea;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}

.menu-button.has-alert {
  border-color: #e0b158;
  box-shadow: 0 0 0 2px rgba(224, 177, 88, 0.18);
}

.menu-alert-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #d97706;
}

.menu-button::after {
  content: "▾";
  font-size: 0.9rem;
}

.menu-dropdown[open] .menu-button::after {
  content: "▴";
}

.nav {
  display: grid;
  gap: 6px;
}

.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(23, 52, 33, 0.12);
  z-index: 20;
}

.nav a {
  text-decoration: none;
  color: var(--ink);
  padding: 8px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nav a:hover {
  background: #e8f4e2;
}

.nav-link-alert {
  background: #fff4df;
  color: #7a4b00;
  font-weight: 600;
}

.nav-link-alert:hover {
  background: #ffe9c0;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #d97706;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.container {
  width: min(1080px, 92vw);
  margin: 24px auto 40px;
}

.card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.dashboard-card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fdfefd;
  border-radius: 12px;
  padding: 14px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.dashboard-card:hover {
  transform: translateY(-1px);
  border-color: #b7d1b1;
  box-shadow: 0 10px 20px rgba(23, 52, 33, 0.08);
  background: #f6fbf3;
}

.dashboard-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.dashboard-card h2,
.dashboard-card h3 {
  margin: 0;
  color: var(--accent-strong);
  font-size: 1.02rem;
}

.dashboard-card p {
  margin: 0;
  color: #4e6858;
  line-height: 1.5;
}

.rule-card h2 {
  color: var(--accent-strong);
}

.rule-text {
  white-space: normal;
  line-height: 1.7;
}

.help-text {
  font-size: 0.92rem;
  color: #4e6858;
}

h1 {
  margin: 0 0 16px;
}

h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

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

.form-grid .full {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.93rem;
}

.password-field-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.password-field-row input {
  flex: 1;
  min-width: 0;
}

.password-action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.password-mini-button {
  padding: 9px 12px;
  white-space: nowrap;
}

.password-hint {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: #547461;
}

.form-actions-split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.form-actions-right {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

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

input,
select,
textarea {
  border: 1px solid #bfcfbb;
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
}

textarea {
  display: block;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  cursor: pointer;
}

button:hover {
  background: var(--accent-strong);
}

.button-link {
  display: inline-block;
  text-decoration: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  padding: 8px 12px;
  line-height: 1.2;
}

.button-link:hover {
  background: var(--accent-strong);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

th,
td {
  border-bottom: 1px solid #d8e6d3;
  text-align: left;
  padding: 9px 8px;
  white-space: nowrap;
}

th {
  background: #edf6ea;
}

.muted {
  color: #547461;
}

.alert {
  border: 1px solid #a6d0a7;
  background: #ecf8ec;
  color: #1d5d24;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.error {
  border-color: #e2b5b5;
  background: #fdeeee;
  color: #7d1d1d;
}

@media (max-width: 800px) {
  .header-inner {
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 10px 0;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .member-chip {
    max-width: calc(100vw - 140px);
    overflow: hidden;
  }

  .member-chip-name,
  .member-chip-handicap {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

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

  .password-field-row {
    flex-direction: column;
    align-items: stretch;
  }

  .form-actions-split {
    align-items: stretch;
  }

  .form-actions-right {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }
}

.secondary-button {
  background: #edf6ea;
  color: var(--ink);
  border: 1px solid var(--line);
}

.secondary-button:hover {
  background: #dfeeda;
}

.description-cell {
  min-width: 90px;
  white-space: normal;
  text-align: center;
}

.icon-button {
  min-width: 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 1.3rem;
  line-height: 1;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.modal-dialog {
  border: 0;
  border-radius: 14px;
  padding: 0;
  width: min(70vw, 840px);
  max-width: min(70vw, 840px);
}

.modal-dialog::backdrop {
  background: rgba(23, 52, 33, 0.45);
}

.dialog-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 24px;
  width: 100%;
}

.description-editor {
  display: block;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  min-height: 360px;
  box-sizing: border-box;
  border: 1px solid #bfcfbb;
  border-radius: 8px;
  padding: 24px 28px;
  margin: 0;
  background: #fff;
  text-align: justify;
  text-justify: inter-word;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.description-editor:focus {
  outline: 2px solid rgba(25, 86, 54, 0.35);
  outline-offset: 1px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.section-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.admin-results-overview {
  display: grid;
  gap: 10px;
}

.admin-results-step-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #355845;
}

.entry-form-card {
  margin-top: 14px;
}

.confirmation-card {
  border-color: #9bc89d;
  background: linear-gradient(180deg, #f4fbf0 0%, #ffffff 100%);
}

.confirmation-card h2 {
  color: var(--accent-strong);
}

.confirmation-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}

.confirmation-list li {
  padding: 9px 10px;
  border: 1px solid #d8e6d3;
  border-radius: 8px;
  background: #f8fcf6;
}

.competition-checklist {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #d8e6d3;
  border-radius: 8px;
  background: #f8fcf6;
}

.checkbox-option input {
  margin-top: 3px;
}

.entry-summary {
  margin-top: 16px;
}

.results-field-grid {
  align-items: start;
}

.player-entry-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d8e6d3;
  border-radius: 12px;
  background: #f8fcf6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.player-entry-box h4 {
  margin: 0;
  color: var(--accent-strong);
}

.player-entry-fields {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.saved-result-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.saved-result-card {
  width: 100%;
  border: 1px solid #d8e6d3;
  border-radius: 12px;
  background: #fbfef9;
  padding: 12px;
  display: block;
}

.saved-result-card-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.saved-result-card:hover {
  border-color: #b8d7b7;
  box-shadow: 0 8px 18px rgba(23, 52, 33, 0.08);
}

.saved-result-card.is-active {
  border-color: #7ab07f;
  box-shadow: 0 0 0 3px rgba(43, 123, 74, 0.12);
}

.saved-result-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.saved-result-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.saved-result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.saved-result-actions form {
  margin: 0;
}

.saved-result-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.saved-player-cards {
  display: flex;
  width: 100%;
  gap: 12px;
  flex-wrap: nowrap;
  align-items: stretch;
  padding: 2px 0;
}

.saved-player-cards.credit-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  width: 100%;
  gap: 12px;
  align-items: stretch;
}

.saved-player-cards.credit-row.has-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.saved-player-credit-card {
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 82px;
  align-self: stretch;
  padding: 10px 10px 8px;
  border: 1px solid #d8e6d3;
  border-radius: 10px;
  background: linear-gradient(135deg, #fffef7, #f3f7ea);
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  text-align: center;
  white-space: normal;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.saved-player-credit-card:hover {
  border-color: #9fcb9e;
  box-shadow: 0 8px 18px rgba(23, 52, 33, 0.10);
  transform: translateY(-1px);
}

.saved-player-credit-card.is-placeholder {
  visibility: hidden;
  pointer-events: none;
}

.saved-player-credit-card.is-blank {
  min-height: 96px;
  background: linear-gradient(135deg, #fffef7, #f3f7ea);
  pointer-events: none;
}

.saved-player-credit-card.name-only {
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.saved-player-credit-card.is-team-result {
  background: linear-gradient(135deg, #f3f0ff, #ebf4ff);
  border-color: #c9d5f2;
}

.saved-player-credit-card.is-action {
  background: linear-gradient(135deg, #eef6ff, #e5f0ff);
  border-color: #c6d9f5;
}

.saved-player-credit-card.is-action:hover {
  border-color: #8db3ea;
  box-shadow: 0 8px 18px rgba(36, 74, 119, 0.12);
}

.saved-player-credit-card.is-action .saved-player-credit-label {
  color: #244a77;
}

.saved-player-credit-name {
  font-weight: 700;
  color: var(--accent-strong);
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: anywhere;
}

.saved-player-credit-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4e4c7d;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.saved-player-credit-group {
  display: block;
  font-size: 0.78rem;
  color: #547461;
  line-height: 1.1;
  white-space: nowrap;
}

.saved-player-credit-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf6ea;
  color: var(--accent-strong);
  font-weight: 700;
}

.saved-player-credit-meta {
  font-size: 0.76rem;
  color: #547461;
  line-height: 1.15;
  white-space: normal;
}

.tee-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
  background: #999;
  vertical-align: middle;
  flex-shrink: 0;
}

.tee-badge.tee-red,
.tee-badge.tee-ladies {
  background: #d32f2f;
}

.tee-badge.tee-white,
.tee-badge.tee-mens {
  background: #f5f5f5;
  color: #333;
  border: 1px solid #999;
}

.tee-badge.tee-blue,
.tee-badge.tee-championship {
  background: #1f77d9;
}

.tee-badge.tee-yellow,
.tee-badge.tee-forward {
  background: #ffb81c;
  color: #333;
}

.tee-badge.tee-black,
.tee-badge.tee-extreme {
  background: #1a1a1a;
}

.tee-badge.tee-green {
  background: #2e7d32;
}

.tee-badge.tee-gold,
.tee-badge.tee-senior {
  background: #daa520;
}

.tee-badge.tee-orange {
  background: #f57c00;
}

.tee-badge.tee-purple {
  background: #7b1fa2;
}

.saved-result-footer {
  display: grid;
  gap: 4px;
  color: #355845;
}

.entry-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  gap: 8px;
}

.entry-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #d8e6d3;
  border-radius: 8px;
  background: #f8fcf6;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  background: #edf6ea;
  color: var(--ink);
  font-size: 0.82rem;
}

  .status-pill.active {
  background: #e3f3ff;
  color: #0f4d78;
  }

.status-pill.eliminated {
  background: #fdeeee;
  color: #7d1d1d;
}

.status-pill.winner {
  background: #e7f7d9;
  color: #245c16;
}

.status-pill.archived {
  background: #efe9fb;
  color: #5e3c8a;
}

.status-pill.user {
  background: #edf6ea;
  color: #355544;
}

.status-pill.editor {
  background: #e3f3ff;
  color: #0f4d78;
}

.status-pill.admin {
  background: #f8eed7;
  color: #7a5311;
}

.handicap-status-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  vertical-align: middle;
}

.handicap-status-badge.handicap-live {
  background: #e7f7d9;
  color: #245c16;
}

.handicap-status-badge.handicap-stale {
  background: #fdeeee;
  color: #9f1f1f;
}

.handicap-value {
  font-weight: 700;
}

.handicap-value.handicap-live {
  color: #1e7a33;
}

.handicap-value.handicap-stale {
  color: #b42318;
}

.handicap-updated-stale-cell {
  background: #fdeeee;
}

.handicap-updated-flag {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fbd5d5;
  color: #9f1f1f;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.knockout-rounds {
  display: flex;
  gap: 26px;
  margin-top: 12px;
  align-items: stretch;
  overflow-x: auto;
  padding: 8px 6px 16px;
}

.round-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 245px;
  flex: 0 0 245px;
}

.round-match-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-around;
  gap: 18px;
}

.round-depth-1 .round-match-list,
.round-depth-2 .round-match-list,
.round-depth-3 .round-match-list,
.round-depth-4 .round-match-list {
  margin-top: 0;
}

.round-meta {
  display: grid;
  gap: 6px;
}

.round-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: #edf6ea;
  color: var(--accent-strong);
  font-weight: 700;
  text-align: center;
}

.round-play-by {
  font-size: 0.82rem;
  color: #547461;
  text-align: center;
}

.round-deadline-field {
  display: grid;
  gap: 4px;
  font-size: 0.82rem;
  color: #355544;
}

.round-deadline-field input {
  width: 100%;
}

.match-card {
  position: relative;
  border: 1px solid #d8e6d3;
  border-radius: 10px;
  background: #f8fcf6;
  padding: 10px;
  box-shadow: 0 6px 14px rgba(23, 52, 33, 0.06);
  min-height: 92px;
}

.round-column:not(:last-child) .match-card::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -26px;
  width: 26px;
  border-top: 2px solid #cde0c8;
}

.round-column:not(:first-child) .match-card::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -26px;
  width: 26px;
  border-top: 2px solid #cde0c8;
}

.match-meta {
  font-size: 0.8rem;
  color: #547461;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

@media (max-width: 900px) {
  .knockout-rounds {
    gap: 14px;
    padding: 8px 2px 14px;
  }

  .round-column {
    min-width: 210px;
    flex-basis: 210px;
  }

  .round-match-list {
    gap: 12px;
  }

  .winner-depth-1,
  .winner-depth-2,
  .winner-depth-3,
  .winner-depth-4 {
    padding-top: 0;
  }

  .round-column:not(:last-child) .match-card::after {
    right: -14px;
    width: 14px;
  }

  .round-column:not(:first-child) .match-card::before {
    left: -14px;
    width: 14px;
  }
}

.match-line {
  display: block;
  width: 100%;
  padding: 7px 8px;
  border-radius: 7px;
  background: #ffffff;
}

.match-line + .match-line,
.winner-pick-form + .winner-pick-form,
.winner-pick-form + .match-line,
.match-line + .winner-pick-form {
  margin-top: 6px;
}

.match-line.winner {
  background: #e7f7d9;
  font-weight: 700;
}

.match-line.snapshot {
  background: #fff4df;
  border: 1px solid #e6c27a;
  color: #7a5311;
}

.match-line.snapshot.winner {
  background: #f6edd0;
  border-color: #d8b86a;
}

.match-line.tbc {
  color: #6a8575;
  background: #f3f8f1;
}

.admin-match-card {
  display: grid;
  gap: 10px;
}

.clickable-match-card {
  align-content: start;
}

.draw-slot-form {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.draw-save-button {
  justify-self: start;
}

.winner-pick-form {
  margin: 0;
}

.match-pick-button {
  border: 1px solid #cde0c8;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.match-pick-button:hover {
  background: #edf6ea;
  box-shadow: 0 4px 10px rgba(23, 52, 33, 0.08);
  transform: translateY(-1px);
}

.match-pick-button.winner {
  background: #e7f7d9;
  border-color: #b7d7a8;
}

.match-pick-button.snapshot {
  background: #fff4df;
  border-color: #e6c27a;
  color: #7a5311;
}

.match-pick-button.snapshot:hover {
  background: #ffedc3;
}

.match-pick-button.snapshot.winner {
  background: #f6edd0;
  border-color: #d8b86a;
}

.winner-column {
  min-width: 210px;
  flex: 0 0 210px;
}

.winner-depth-1,
.winner-depth-2,
.winner-depth-3,
.winner-depth-4 {
  padding-top: 0;
}

.winner-column .champion-card {
  margin-top: auto;
  margin-bottom: auto;
}

.champion-card {
  background: linear-gradient(180deg, #f4fbf0 0%, #ffffff 100%);
  border-color: #b7d7a8;
}

.champion-card .match-line {
  text-align: center;
  font-size: 1rem;
}
