:root {
  --surface: #f2f4f7;
  --surface-strong: #e9edf2;
  --ink: #1a1f24;
  --accent: #4ef29a;
  --good: #4ef29a;
  --bad: #ff7c7c;
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  --action-font-size: clamp(1.6rem, 5.8vw, 1.95rem);
  --action-height: 150px;
  --action-inline-padding: 25px;
  --action-box-shadow: 10px 10px rgba(0, 0, 0, 0.2);
}
* {
  box-sizing: border-box;
}
body {
  max-height: 100vh;
  position: relative;
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background: #ffffff;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-content: center;
}
.auth-container, .membership-request {
  width: 100%;
  text-align: center;
}
.membership-request {
  margin: auto;
  width: fit-content;
}
.auth-container h1, .membership-request h1 {
  margin: 0 0 2rem 0;
  font-family: "Bangers", "Impact", sans-serif;
  font-size: clamp(2.2rem, 8vw, 3rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.auth-form {
  display: flex;
  gap: 1rem;
  flex-direction: column;
  width: fit-content;
}
.auth-btn {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  background: var(--accent);
  color: #111111;
  cursor: pointer;
  transition: background-color 150ms ease;
}
.obf-surname {
  display: inline-block;
  filter: blur(4px);
  -webkit-filter: blur(4px);
  user-select: none;
}
.auth-btn:hover,
.auth-btn:focus-visible {
  filter: brightness(1.2);
  outline: none;
}
.auth-error {
  margin: 0;
  font-size: 0.9rem;
  color: var(--bad);
  font-weight: 500;
}
.app-shell {
  max-height: 100%;
  overflow: auto;
  padding: 8px;
  min-height: calc(100vh - 10rem);
  animation: float-in 350ms ease-out;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.app-shell>* {
  width: min(680px, 100%);
  margin-left: auto;
  margin-right: auto;
}
#info-box {
  flex-grow: 1;
  font-size: 16px;
}
pre#info-box {
  text-wrap: wrap;
  font-family: inherit;
}
.backups-shell {
  gap: 1rem;
}
.backups-panel {
  display: grid;
  gap: 1rem;
}
.backups-panel h1 {
  margin: 0;
}
.notifications-shell {
  gap: 1rem;
}
.notifications-shell h1 {
  margin: 0;
}
#notification-list {
  list-style: none;
  padding: 0;
  display: grid;
}
.notification-item.read {
  background: #dbdbdb;
  border-color: rgba(0,0,0,0.1);
}
.notification-item.read a {
  color: inherit;
}
.notification-item {
  border: 1.5px solid rgba(0, 0, 0, 0.25);
  padding: 10px;
  border-top-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.notification-item.clickable { cursor: pointer; }
.notification-item:first-child {
  border-top-width: 1.5px;
}
.notification-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.notification-type {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  background: #dbe9ff;
  color: #0b356c;
}
.notification-type-game {
  background: #e8ddff;
  color: #4a2a8a;
}
.notification-type-payment {
  background: #ffe4d2;
  color: #8a3b00;
}
.notification-date {
  font-size: 0.9rem;
  opacity: 0.75;
}
.notification-body {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
  color: #182028;
}
.notification-actions {
  display: flex;
  justify-content: flex-end;
  flex-grow: 1;
  gap: 10px;
}
.btn {
  border: 2px solid;
  border-radius: 6px;
  padding: 0.48rem 0.7rem;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  transition: transform 120ms ease, filter 120ms ease;
}
.btn:hover,
.btn:focus-visible {
    filter: brightness(1.2);
    outline: none;
}
.btn .material-symbols-outlined { font-size: 1.15rem; line-height: 1; }
.centered-flex {
  display: flex;
  align-items: center;
  justify-content: center;
}
.invite-link-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.invite-link-box {
  border: 3px dashed #ccc;
  padding: 0.5rem 0.75rem;
  border-radius: 15px;
  background: #fff;
  min-width: 220px;
  max-width: 480px;
  overflow: hidden;
  display: flex;
  align-items: center;
  cursor: copy;
}
.invite-link-text {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.95rem;
}
.invite-input-row {
  display: flex;
  flex-direction: column;
  align-self: end;
  gap: 0;
  max-width: 50%;
}
.invite-name-input {
  border: 3px dashed rgba(0,0,0,0.12);
  padding: 0.5rem 0.75rem;
  border-radius: 15px 0 0 15px;
  outline: none;
  font-size: 0.95rem;
  flex: 1 1 auto;
  max-width: 100%;
}
.invite-name-input:focus {
  box-shadow: 0 0 0 3px rgba(10, 90, 200, 0.06);
  border-color: #aaa !important;
}
.invite-name-input.input-error {
  color: red;
}
.invite-input-btn {
  border: 3px solid #aaa;
  border-left: none;
  border-radius: 0 6px 6px 0;
  padding: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  background: #afa;
  outline: none;
}
.invite-input-btn:active,
.invite-input-btn:focus {
  outline: none;
}
.input-wrap.pending-approval input, .input-wrap.pending-approval select {
  background: #f6c5cd;
}
.notification-btn--open { background: #dbe9ff; color: #0b356c; }
.notification-btn--mark-read { background: #d6f6e4; color: #0e5a33; }
.notification-item.read .notification-btn--mark-read { background: #dbdbdb; color: #8a4b00; }
.notification-item.read .notification-btn--open { color: inherit; background: #dbdbdb; }
.btn:disabled, .btn[disabled] {
  opacity: 0.6;
  cursor: default;
  filter: none;
}
.notification-empty {
  text-align: center;
  color: rgba(0, 0, 0, 0.6);
  background: #f7f9fb;
  border: 1px dashed rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 1.25rem 1rem;
}
.backup-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}
.backup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  background: linear-gradient(135deg, #f2f4f7 0%, #e8ecf2 100%);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}
.backup-details {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}
.backup-title {
  margin: 0;
  font-weight: 700;
  font-size: 1rem;
  color: #182028;
}
.backup-subtitle {
  margin: 0;
  opacity: 0.75;
  font-size: 0.9rem;
}
.backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}
.backup-btn { background: #f2f4f7; }
.backup-btn-download { color: #0b356c; }
.backup-btn-restore { color: #7d1021; }
@media (max-width: 720px) {
  .backup-item {
    flex-direction: column;
    align-items: stretch;
  }
  .backup-actions {
    justify-content: stretch;
  }
  .backup-btn {
    flex: 1 1 120px;
    justify-content: center;
  }
}
#comparison-area {
  position: relative;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.app-header {
  margin-left: auto;
  margin-right: auto;
  display: flex;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--surface);
  box-shadow: 0 2px 4px var(--shadow);
}
.header-brand {
  text-align: center;
  flex: 1;
  align-self: center;
}
.gear-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 2.25rem;
  line-height: 1;
  padding: 0.35rem;
  touch-action: manipulation;
}
.gear-link:focus-visible,
.gear-link:hover {
  background: var(--surface);
  outline: none;
}
.player-name-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  padding: 0 0.75rem;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  margin-right: 0.5rem;
}
.registration-player.unapproved .registration-name {
  color: var(--bad);
  font-weight: 700;
}
.header-menu-link.disabled,
.player-name-display.disabled {
  opacity: 0.55;
  pointer-events: none;
  cursor: default;
}
.approval-banner {
  background: #fff3f3;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  color: var(--bad);
  padding: 0.6rem 0.9rem;
  text-align: center;
  font-weight: 600;
  margin: auto;
}
.header-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 6.5rem;
  line-height: 1;
  padding: 0.35rem;
  touch-action: manipulation;
  transition: background-color 150ms ease;
}
.back-link {
  min-width: 3rem;
  font-size: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: var(--surface);
  padding: 0.45rem 0.7rem;
  align-self: flex-start;
}

/* Styled backups link used on the admin page */
.backup-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border-radius: 9px;
  border: 1px solid rgba(0,0,0,0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fb 100%);
  box-shadow: 0 6px 18px rgba(15, 23, 34, 0.06);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.backup-link:hover,
.backup-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(15, 23, 34, 0.10);
  outline: none;
}
.backup-link .material-symbols-outlined {
  font-size: 1.05rem;
  color: #0b356c;
}

/* Icon adjustments for backups link (no inline styles) */
.backup-link .backup-icon {
  font-size: 1.1rem;
  vertical-align: middle;
  margin-right: 0.35rem;
}
.input-icon {
  width: 40px;
  text-align: center;
  position: absolute;
  top: 0;
  height: min(100%, 52px);
  display: flex !important;
  align-items: center;
  font-size: 20px !important;
  justify-content: center;
}
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
}
.input-wrap>input {
  flex: 1 1 auto;
}
.phone-warning {
  color: #a33;
  font-size: 0.9rem;
  margin-top: 0.25rem;
  display: none;
}
.app-header h1 {
  margin: 0;
  font-family: "Bangers", "Impact", sans-serif;
  font-size: clamp(1.9rem, 7vw, 2rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.kicker {
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.85;
}
.attribute-panel {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0;
  padding: 0.35rem 1rem;
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
}
#current-attribute {
  color: var(--accent);
  font-family: "Bangers", "Impact", sans-serif;
  font-size: clamp(2rem, 12vw, 4rem);
  letter-spacing: 0.08em;
  line-height: 0.82;
  text-transform: uppercase;
}
#current-attribute[data-attribute="FORWARD"] {
  color: #d7263d;
}
#current-attribute[data-attribute="DEFENDER"] {
  color: #1f9d55;
}
#current-attribute[data-attribute="GOALKEEPER"] {
  color: #6a0dad;
}
.cards {
  display: grid;
  gap: 0;
  height: 50vh;
  position: relative;
}
.skip-btn {
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0;
  background: #d6d9de;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.25rem;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
}
.skip-btn:hover,
.skip-btn:focus-visible {
  background: #c6cad1;
  outline: none;
}
#comparison-area .player-card {
  overflow: hidden;
  position: absolute;
  width: 60%;
  border-radius: 0;
  color: inherit;
  text-align: center;
  cursor: default;
  display: grid;
  place-items: center;
  transition: background-color 180ms ease, border-color 180ms ease;
}
.player-name {
  font-weight: 700;
  font-size: clamp(2.07rem, 9vw, 2.7rem);
}
.player-pic {
  width: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.player-pic[data-is-default="true"] {
  filter: grayscale(100%);
  opacity: 0.7;
}
.vs-chip {
  justify-self: center;
  font-family: "Bangers", "Impact", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 9vw, 3.25rem);
  line-height: 1;
  letter-spacing: 0.08em;
  /* Let's make the background a bit foggy so we can still see the players behind
   * it, but it needs to be opaque enough to keep the text legible */
  background: rgba(255, 255, 255, 0.85);
  border-radius: 0;
  padding: 0.05rem 0.45rem;
}
.action-row {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.top-action-row {
  justify-content: flex-end;
  top: 0;
  right: 0;
}
.bottom-action-row {
  justify-content: flex-start;
  bottom: 0;
  left: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.action-btn {
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 0;
  font-weight: 700;
  letter-spacing: 0.03em;
  justify-content: center;
  text-align: center;
}
.player-action {
  background: var(--accent);
  color: #1d1d1d;
  font-size: var(--action-font-size);
  height: var(--action-height);
  padding-left: var(--action-inline-padding);
  padding-right: var(--action-inline-padding);
  z-index: 1;
  box-shadow: var(--action-box-shadow);
  border: none;
}
.action-player-top,
.action-player-bottom {
  gap: 0.5rem;
  width: max-content;
  max-width: 100%;
}
.action-icon {
  font-size: 1.35em;
  line-height: 1;
}
.action-btn:hover,
.action-btn:focus-visible {
  filter: brightness(1.04);
  outline: none;
}
.admin-shell {
  gap: 1rem;
}
.admin-header {
  margin-bottom: 0.5rem;
  position: sticky;
  top: 0;
  z-index: 20;
  background: #ffffff;
  padding-bottom: 0.75rem;
}
.admin-panel {
  display: grid;
  gap: 1rem;
}
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}
.admin-toolbar h2 {
  margin: 0;
}
.admin-toolbar-buttons {
  display: flex;
  gap: 0.5rem;
}
.admin-status {
  min-height: 1.5rem;
}
.admin-status[data-error="true"] {
  color: #d7263d;
}
.player-admin-list {
  display: grid;
  gap: 0;
}
.payment-buttons {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.payment-btn {
  border: none;
  background: linear-gradient(180deg, #ffffff 0%, #f6f8fa 100%);
  padding: 0.75rem var(--action-inline-padding);
  border-radius: 10px;
  box-shadow: var(--action-box-shadow);
  cursor: pointer;
  font-weight: 700;
  font-size: var(--action-font-size);
  color: var(--ink);
  min-width: 110px;
  text-align: center;
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.payment-btn:hover,
.payment-btn:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  outline: none;
}
.payment-btn.owed-btn {
  background: linear-gradient(180deg, #fffaf0 0%, #fff1d9 100%);
  border: 1px solid rgba(0,0,0,0.06);
  color: #8a3b00;
}
@media (max-width: 600px) {
  .payment-btn { flex: 1 1 calc(50% - 0.6rem); min-width: 0; }
  .payment-buttons { gap: 0.5rem; }
}
.player-admin-table {
  display: grid;
  gap: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
}
.player-admin-head,
.player-admin-row {
  display: grid;
  grid-template-columns: minmax(0, 0.5fr) 200px 100px;
}
.player-admin-head {
  background: #e7ebf0;
  font-weight: 700;
}
.player-admin-head > div,
.player-admin-cell {
  padding: 0.85rem 1rem;
  border-right: 1px solid rgba(0, 0, 0, 0.12);
}
.player-admin-head > div:last-child,
.player-admin-cell:last-child {
  border-right: 0;
}
.player-admin-row {
  background: var(--surface);
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}
.account-profile-section {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.profile-pic-container {
  flex: 0 0 auto;
}
.account-unmod-info p { margin: 0.25rem 0; color: #333; font-size: 0.95rem; text-align: right; }
.dotted-date {
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  cursor: help;
  text-decoration-color: #999;
}
.player-admin-cell {
  display: flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}
.player-admin-input {
  width: 100%;
  padding: 0.85rem 0.8rem;
  font: inherit;
  background: #fff;
  margin: 0;
  border: none;
  outline: none;
}
.player-admin-input[data-saving="true"] {
  background: #fff7db;
}
.player-admin-select {
  width: 100%;
  padding: 0.85rem 0.8rem;
  font: inherit;
  background: #fff;
  margin: 0;
  border: none;
  outline: none;
  cursor: pointer;
}
.player-admin-select:focus {
  background: #f0f5ff;
}
.player-admin-photo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Admin list on information page */
.admin-list {
  display: flex;
  align-items: center;
  margin-top: 1rem;
  flex-wrap: wrap;
  gap: 25px;
}
.admin-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.admin-avatar {
  width: 48px !important;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--surface-strong);
  background: var(--surface);
  object-position: top center;
}
.admin-name {
  font-size: 0.85rem;
  margin-top: 0.25rem;
  text-align: center;
}
.treasurer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.75rem;
}
.treasurer .revtag {
  font-size: 0.9rem;
  color: #333;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: 20px;
}
.player-admin-file {
  display: none;
}
.admin-upload {
  width: 2.8rem;
  min-width: 2.8rem;
  height: 2.8rem;
  padding: 0;
  font-size: 1rem;
}
.admin-upload svg {
  width: 1.35rem;
  height: 1.35rem;
}
.admin-delete {
  width: 2.8rem;
  min-width: 2.8rem;
  height: 2.8rem;
  padding: 0;
  background: #f3d4d8;
  color: #6d1020;
  font-size: 1rem;
}

/* Import file list styles */
#files-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.5rem;
  position: relative;
  flex-direction: row-reverse;
}
.files-list-item {
  padding: 0;
  transform: rotate(-3.5deg);
  margin: -35px;
}
.files-list-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid rgba(0,0,0,0.06);
  padding: 0.5rem;
  border-radius: 8px;
  position: relative;
}
.file-preview-thumb {
  width: 100px;
  object-fit: cover;
  border-radius: 10px;
  aspect-ratio: 1;
  height: 100px;
  border: 3px inset #f7e0b5;
  border-style: ridge;
  box-shadow: 0 0 1px 2px black;
}
.file-preview-spacer {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}
.file-actions {
  margin-left: auto;
  position: absolute;
  top: 0;
  right: 0;
}
.btn-small {
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
}
.admin-delete .material-symbols-outlined {
  font-size: 1.3rem;
  line-height: 1;
}
.admin-claim {
  background-color: transparent;
  color: #1f9d55;
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border: 1px solid #1f9d55;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.admin-claim:hover {
  background-color: #1f9d55;
  color: white;
}
.admin-claim:active {
  transform: scale(0.98);
}
.player-actions-menu-btn {
  height: 2.8rem;
  border: 2px solid gray;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: lightgray;
  padding: 10px;
}
.player-actions-menu-btn:hover {
  background-color: var(--surface);
  border-color: var(--ink);
}
.player-actions-menu-btn:active {
  transform: scale(0.98);
}
.player-actions-menu-btn .material-symbols-outlined {
  font-size: 1.3rem;
  line-height: 1;
}
.player-actions-modal-content {
  max-width: 400px;
}
.player-actions-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.player-action-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--surface-strong);
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: background-color 0.2s, border-color 0.2s;
}
.unregistered-icon {
  border-bottom: 3px dotted #aaa;
  margin-left: 6px;
  font-size: 18px;
  vertical-align: middle;
  cursor: default;
}
.invite-tooltip {
  margin-top: 0.25rem;
  color: #555;
  font-size: 0.92rem;
  border-bottom: 2px dotted #aaa;
  display: inline-block;
  padding-bottom: 2px;
}
.player-action-item:hover {
  background-color: var(--surface-strong);
  border-color: var(--ink);
}
.player-action-item:active {
  transform: scale(0.98);
}
.player-action-item .material-symbols-outlined {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}
.player-action-item span:last-child {
  flex: 1;
  font-weight: 500;
}
.player-action-delete {
  color: #6d1020;
  background: #f3d4d8;
  border-color: #d4a5ac;
}
.player-action-delete:hover {
  background-color: #e8bec5;
  border-color: #6d1020;
}
.player-search-box {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  font-family: inherit;
  background: #fff;
}
.player-search-box:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.2);
}
.player-admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.admin-shell .player-card {
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  position: relative;
}
.admin-shell .player-card-banned {
  background: linear-gradient(180deg, #fff5f5 0%, #ffecec 100%);
  border-color: rgba(128, 0, 0, 0.15);
  opacity: 0.95;
}
.admin-shell .player-card-banned .player-card-profile {
  filter: grayscale(40%) contrast(0.9);
  opacity: 0.95;
}
.player-action-unban {
  border: 0;
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #ffdede;
  color: #7d1021;
}
.player-action-unban:hover,
.player-action-unban:focus-visible {
  filter: brightness(0.98);
  transform: translateY(-1px);
  outline: none;
}
.admin-shell .player-card-profile {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
  background: var(--surface-strong);
  border-radius: 4px;
  overflow: hidden;
}
.player-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.player-card-icon {
  font-size: 3.5rem;
  color: rgba(0, 0, 0, 0.3);
}
.player-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.player-card-name {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--ink);
}
.player-card-name-input {
  width: 100%;
  padding: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  font-family: inherit;
  background: #fff;
}
.player-card-name-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.2);
}
.player-card-name-input[data-saving="true"] {
  background: #fff7db;
}
.player-card-checkbox-input {
  width: 25px;
  height: 25px;
  margin: 0;
}
.player-card-checkbox {
  display: flex;
  justify-content: right;
  gap: 10px;
  width: 150px;
}
.player-card-select {
  padding: 0.5rem;
  font-size: 0.95rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  font-family: inherit;
  background: #fff;
  cursor: pointer;
}
.player-card-select:focus {
  outline: none;
  background: #f0f5ff;
  border-color: var(--accent);
}
.player-card-actions {
  display: flex;
  justify-content: flex-end;
}
.player-admin-file {
  display: none;
}
.app-header span.material-symbols-outlined {
  font-size: 40px !important;
}
.game-header {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  width: 100%;
}
.games-panel {
  display: grid;
  gap: 1rem;
}
.games-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.games-toolbar h2 {
  margin: 0;
}
/* Admin dashboard tiles */
.admin-dashboard {
  padding: 1.25rem;
}
.admin-dashboard h1 {
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
  color: var(--ink);
}
.admin-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  align-items: stretch;
}
.admin-tile {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.1rem 0.75rem;
  min-height: 110px;
  background: var(--surface);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
  text-align: center;
}
.admin-tile:focus,
.admin-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.14);
  outline: none;
}
.admin-tile[disabled] {
  opacity: 0.6;
  cursor: default;
  transform: none;
  box-shadow: none;
}
.admin-tile .tile-icon {
  font-size: 2.25rem;
  line-height: 1;
  color: var(--accent);
}
.admin-tile .tile-label {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
}
.admin-tile.tile-action {
  width: 100%;
}
/* Make sure buttons inside tiles inherit the tile look */
button.admin-tile {
  border: 0;
  background: transparent;
  width: 100%;
  padding: 1.1rem 0.75rem;
}
@media (max-width: 520px) {
  .admin-tiles {
    grid-template-columns: 1fr 1fr;
  }
}
.games-toolbar h2 {
  margin: 0;
}
.toolbar-buttons {
  display: flex;
  gap: 0.5rem;
}
.games-status[data-error="true"] {
  color: #d7263d;
}
.games-list {
  display: grid;
  gap: 1rem;
}
.game-card {
  background: var(--surface);
  border-radius: 8px;
  display: grid;
  position: relative;
  overflow: hidden;
  box-shadow: 0px 0px 6px 5px rgba(0,0,0,0.21);
}
.game-card-cancelled {
  filter: grayscale(100%);
  opacity: 0.6;
}

/* Swap mode: highlight a single game card and dim others */
.swap-mode-active .game-card:not(.swap-active-card) {
  filter: blur(2px);
  opacity: 0.6;
  pointer-events: none;
}
.swap-active-card {
  position: relative;
  z-index: 10000;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}
/* On small screens make the active card fill the viewport */
@media (max-width: 800px) {
  .swap-active-card {
    position: fixed !important;
    top: 0; left: 0; right: 0; bottom: 0;
    margin: 0; border-radius: 0; overflow: auto;
  }
}
.registration-item.swap-keep { opacity: 1; }

/* Swap visuals */
.registration-item.swap-selected .registration-name {
  box-shadow: 0 0 12px 3px rgba(255, 200, 0, 0.9);
  border-radius: 4px;
  background: #ffdb16;
}
.registration-item.swap-opposing { opacity: 1; }
.registration-item.swap-opposing .swap-icon {
  margin-left: 8px;
  font-size: 18px;
  vertical-align: middle;
}
.registration-item.swap-blur {
  pointer-events: none;
  cursor: default;
  filter: grayscale(0.6);
  opacity: 0.5;
}

/* Hide the original action buttons while swap overlay is shown */
.swap-original-hidden { display: none !important; }

/* Container for the temporary Exit Swap Mode button */
.swap-action-overlay { display: inline-flex; gap: 8px; align-items: center; }
.swap-action-overlay .cancel-swap-btn {
  background: #fff3bf;
  border: 1px solid #ffda6a;
  color: #5a3700;
  padding: 6px 10px;
  border-radius: 4px;
}
.registration-item.swap-opposing { pointer-events: auto; cursor: pointer; }

.games-section {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}
.games-section-heading {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
}
.games-section-cancelled .games-section-heading {
  border-bottom-color: rgba(0, 0, 0, 0.2);
  color: rgba(0, 0, 0, 0.6);
}
.games-section-past .games-section-heading {
  border-bottom-color: rgba(100, 100, 100, 0.3);
  color: rgba(100, 100, 100, 0.8);
}
.games-section-cancellations .games-section-heading {
  border-bottom-color: rgba(200, 100, 100, 0.3);
  color: rgba(150, 100, 100, 0.8);
  margin-top: 1rem;
  padding-top: 0.5rem;
}
.game-header {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: end;
  padding: 1.25rem;
}
.game-datetime {
  display: flex;
  gap: 10px;
  min-width: 300px;
}
.game-date {
  font-weight: 600;
  font-size: 1.1rem;
}
.game-time {
  font-size: 0.9rem;
  color: var(--ink);
  opacity: 0.75;
}
.game-cost-range {
  margin-left: 0.5rem;
  font-size: 0.9rem;
  color: rgba(0,0,0,0.65);
}
.game-body {
  display: flex;
  flex-grow: 1;
  justify-content: end;
}
.registration-count {
  display: flex;
  flex-grow: 1;
  align-items: center;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}
.signup-status {
  font-size: 1.2rem;
}
.registrations-list {
  display: grid;
  gap: 1rem;
  padding-top: 0 !important;
  padding: 1.25rem;
}
.no-registrations {
  font-style: italic;
  color: rgba(0, 0, 0, 0.5);
  padding: 0.5rem 0;
}
.teams-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.team-column {
  display: grid;
  padding-bottom: 2px;
  padding-top: 2px;
}
.team-header {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  justify-content: center;
  border: 2px solid #000;
  height: fit-content;
  border-radius: 50vh;
}
.team-lights .team-header {
  color: #000;
  background: #fff;
}
.team-darks .team-header {
  color: #fff;
  background: #000;
}
.registration-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
}
.game-card, .game-card *:not(drag-box) {
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none; /* Safari/iOS */
  -webkit-touch-callout: none; /* Disable iOS callout menu */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* IE/old Edge */
}
.small-icon-btn {
  background: transparent;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  border-radius: 4px;
}
.registration-delete-btn { color: #d7263d; }
.no-show-btn { color: #000; }
.registration-delete-btn:hover { background-color: rgba(215, 38, 61, 0.1); }
.no-show-btn:hover { background-color: rgba(0, 0, 0, 0.1); }
/* Visual treatment for players marked as no-show on past games */
.registration-player.no-show {
  text-decoration: line-through;
}
.registration-item:hover .small-icon-btn { opacity: 1; visibility: visible; }
.small-icon-btn.visible { opacity: 1; visibility: visible; }
@media (max-width: 767px) {
  .small-icon-btn {
    opacity: 0;
    visibility: hidden;
  }
  .player-admin-cards {
    grid-template-columns: 1fr;
  }
  .player-search-box {
    width: 100%;
  }
  #bulk-selected-count {
    display: none !important;
  }
}
.registration-number {
  font-weight: 600;
  text-align: center;
  font-size: 0.9rem;
  padding: 10px;
}
.registration-player {
  font-weight: 500;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  padding-top: 1px;
  padding-bottom: 3px;
}
.no-games {
  text-align: center;
  padding: 2rem 1rem;
  color: rgba(0, 0, 0, 0.5);
  font-style: italic;
}
@media (max-width: 720px) {
  .teams-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .player-admin-head,
  .player-admin-row {
    grid-template-columns: 1fr;
  }
  .player-admin-head {
    display: none;
  }
  .player-admin-cell {
    border-right: 0;
  }
  .player-admin-row {
    border-top: 1px solid rgba(0, 0, 0, 0.12);
  }
}
.who-btn {
  border: none;
  border-bottom: 2px dashed #999999;
  background: transparent;
  color: #999999;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.2rem 0.3rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color 150ms ease, border-color 150ms ease;
}
.who-btn:hover,
.who-btn:focus-visible {
  color: #666666;
  border-bottom-color: #666666;
  outline: none;
}
.modal {
  flex-direction: column;
  position: fixed;
  inset: 0;
  z-index: 2000;
}
/* Invite modal footnote */
.invite-footnote {
  margin-top: 6px;
  font-size: 0.9em;
  color: #666;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
}
.modal-content {
  position: relative;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  padding: 2rem;
  max-width: 100%;
  animation: modal-slide-up 250ms ease-out;
  width: 600px;
  height: fit-content;
  overflow: hidden;
}
@media (max-width: 767px) {
    .modal-content {
        height: 100% !important;
        width: 100% !important;
        border-radius: 0 !important;
        padding: 1rem !important;
    }
    .modal {
        height: 100% !important;
        width: 100% !important;
        border-radius: 0 !important;
    }
}
.modal-body {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
  overflow: hidden;
  border-radius: 4px;
}
#modal-question {
  position: absolute;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  text-align: center;
  z-index: 2;
  padding: 1rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  max-width: 90%;
}
.modal-pic {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  z-index: 1;
}
.modal-actions {
  display: flex;
  gap: 0.75rem;
}

.modal-close-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(0,0,0,0.6);
  font-size: 1.6rem;
}
.modal-close-btn:hover {
  color: rgba(0,0,0,0.9);
}
.modal-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}
.modal-yes-btn {
  background: #e8f5e9;
  color: #1b5e20;
  border-color: #a5d6a7;
}
#signup-modal .modal-body {
  min-height: auto;
  display: block;
  padding: 0;
  overflow: visible;
}
#new-player-modal .modal-body {
  min-height: auto;
  display: block;
  padding: 0;
  overflow: visible;
}
.player-name-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  font-family: inherit;
  background: #ffffff;
}
.player-name-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.2);
}
.claim-player-name {
  margin-bottom: 1rem;
  font-weight: 500;
  color: #333;
}
#claim-player-modal .modal-body {
  min-height: auto;
  display: block;
  padding: 0;
  overflow: visible;
}
.signup-btn {
  white-space: nowrap;
}
.signup-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.game-action-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.icon-btn {
  background: transparent;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  border-radius: 4px;
  transition: background-color 150ms ease, color 150ms ease;
}
.icon-btn:hover:not(:disabled) {
  background-color: rgba(0, 0, 0, 0.08);
}
.icon-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.icon-btn .material-symbols-outlined {
  font-size: 1.5rem;
}
.cancel-game-btn {
  color: #d32f2f;
}
.cancel-game-btn:hover:not(:disabled) {
  background-color: rgba(211, 47, 47, 0.1);
  color: #b71c1c;
}
.schedule-btn {
  color: #3baf3b;
}
.schedule-btn:hover:not(:disabled) {
  background-color: rgba(255, 209, 102, 0.15);
  color: #b8860b;
}
.share-game-btn {
  color: #2196f3;
}
.share-game-btn:hover:not(:disabled) {
  background-color: rgba(33, 150, 243, 0.1);
  color: #1976d2;
}
.refresh-btn:hover:not(:disabled) {
  background-color: rgba(0, 0, 0, 0.12);
  transform: rotate(180deg);
  transition: background-color 150ms ease, transform 500ms ease;
}
.modal-yes-btn:hover,
.modal-yes-btn:focus-visible {
  background: #c8e6c9;
  outline: none;
}
.modal-no-btn {
  background: #ffebee;
  color: #b71c1c;
  border-color: #ef9a9a;
}
.modal-no-btn:hover,
.modal-no-btn:focus-visible {
  background: #ffcdd2;
  outline: none;
}
@keyframes modal-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: fit-content;
  min-width: min(250px, 100%);
}
.form-group.inline {
  flex-direction: row;
}
.form-group label {
  font-weight: 500;
  font-size: 0.95rem;
}
.form-group input, .form-group select {
  padding-left: 40px !important;
}
.form-group>* {
  border: 3px solid #aaa;
  border-top-width: 0;
}
.form-group>* input,
.form-group>* select {
  border: 0;
}
.form-group input, .form-group select {
  padding: 0.75rem;
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #ffffff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.cost-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.cost-section h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}
.cost-mode-btn {
  padding: 0.75rem;
  background: #f0f0f0;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 150ms ease;
}
.cost-mode-btn:hover {
  border-color: #999;
  background: #fafafa;
}
.cost-mode-btn.cost-mode-active {
  background: var(--accent);
}
.cost-mode-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.cost-panels-container {
  position: relative;
  height: 100px;
  overflow: hidden;
  border-radius: 4px;
}
.cost-panel {
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  visibility: hidden;
  transition: all 300ms ease;
  transform: translateX(100%);
}
.cost-panel.cost-panel-active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}
.cost-panel.cost-panel-prev {
  transform: translateX(-100%);
}
@media (min-width: 720px) {
  .cards {
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
  }
}
#middle-stack {
  z-index: 2;
  text-align: center;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  height: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -35px;
}
@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
#bottom-card {
  left: 0;
  bottom: 0;
  top: 5vh;
  transform: rotate(-20deg);
}
#top-card {
  right: 0;
  top: 0;
  bottom: 5vh;
  transform: rotate(20deg);
}
.leaderboard-panel {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}
.leaderboard-pic {
  width: 60px;
  height: 60px;
  object-fit: cover;
  object-position: top center;
  border-radius: 60px;
  margin-left: 10px;
  margin-right: 10px;
  display: flex;
}
.leaderboard-pic, .profile-pic {
  border: 2px solid #888;
}
.leaderboard-item {
  display: flex;
  align-items: center;
}
.leaderboard-info {
  flex-grow: 1;
  text-align: center;
  margin-left: 7px;
}
.leaderboard-rank {
  font-family: "Bangers", "Impact", sans-serif;
  background-color: #ffffff;
  padding: 0.25rem 0.5rem;
  min-width: 40px;
  height: 40px;
  border-radius: 40px;
  font-size: 1.1rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.leaderboard-section {
  flex-grow: 1;
  min-width: 40%;
}
.leaderboard-list {
  margin-left: 20px;
  margin-right: 20px;
  padding-left: 20px;
  padding-right: 20px;
  padding-top: 10px;
  padding-bottom: 10px;
  border-radius: 20px;
}
.leaderboard-list .leaderboard-item:not(:last-child) {
  margin-bottom: 4px;
}
#goalkeeper-list {
  background: rgba(106, 13, 173, 0.4);
}
#defending-list {
  background: rgba(31, 157, 85, 0.4);
}
#attacking-list {
  background: rgba(215, 38, 61, 0.4);
}
#midfield-list {
  background: rgba(64, 123, 255, 0.4);
}
h2 {
  text-align: center;
  font-family: "Bangers", "Impact", sans-serif;
  font-size: 35px;
}
.leaderboard-placeholder {
  flex: 1;
  text-align: center;
  border-radius: 50%;
  background: white;
}
.material-symbols-outlined.as-text {
  font-size: unset !important;
}
.admin-toolbar-controls {
  display: flex;
  justify-content: start;
  gap: 10px;
  width: fit-content;
}
.player-card-balance-input {
  border: 3px solid lightgray;
  border-radius: 50vh;
  padding: 10px;
  padding-left: 20px;
  position: relative;
  width: 100px;
  background: transparent;
}
.player-card-balance-input:focus {
  outline: none;
}
.player-card-balance {
  display: flex;
  align-items: center;
  gap: 10px;
}
.player-card-balance-currency {
  width: 0;
  margin: -55px;
}
.substitutes-items {
  display: flex;
  flex-direction: column;
}
.reg-star {
  color:#1976d2;
}
.past-reg-star {
  color: #d2691e;
}
.past-reg-star, .reg-star {
  margin-left: 5px;
}
span.def {
  background: #4f9d75;
  border-color: #1f5d55;
}
span.fwd {
  background: #d7363d;
  border-color: #a71c1c;
}
span.mid {
  background: #407bff;
  border-color: #0056b3;
}
span.gkp {
  background: #4a3d8d;
  border-color: #4b0073;
}
span.fwd, span.mid, span.def, span.gkp {
  border-width: 3px;
  border-style: solid;
  border-radius: 50vh;
  display: inline-table;
  width: 20px;
  height: 20px;
  padding: 5px;
  font-family: monospace;
  color: white;
  font-weight: bold;
  margin-right: 7px;
}
.player-stats-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.player-stats-part {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom: 3px dotted #bbb;
  padding-bottom: 2px;
}
.stat-icon {
  font-size: 16px;
  line-height: 1;
}
.stat-value {
  font-weight: 600;
}
.stat-sep {
  color: #666;
}
.stat-green { color: #28a745; }
.stat-yellow { color: #ffc107; }
.stat-red { color: #dc3545; }
/* zero-state: muted gray background with darker text */
.player-stats-part.stat-zero {
  background: #eee;
  color: #555;
  border-radius: 4px;
  padding: 2px 6px;
}
.player-stats-part.stat-zero .stat-icon { color: #666; }
.player-stats-part.stat-zero .stat-value { color: #333; }
.player-card-balance.positive-balance {
  color: #22863a;
  font-weight: bold;
}
.player-card-balance.positive-balance input {
  border-color: #28a745;
  color: #22863a;
}
.player-card-balance.negative-balance {
  color: #cb2431;
  font-weight: bold;
}
.player-card-balance.negative-balance input {
  border-color: #d73a49;
  color: #cb2431;
}
.registration-item-buttons {
  display: flex;
  flex-direction: row;
}
.time-buttons-container {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 60px;
  justify-content: flex-end;
}
.registration-time {
  flex: 1;
  text-align: right;
  transition: opacity 0.2s, visibility 0.2s;
  color: #888;
  font-style: italic;
}
.registration-item:hover .registration-time {
  opacity: 0;
  visibility: hidden;
}
.registration-item:hover .time-buttons-container .registration-item-buttons {
  opacity: 1;
  visibility: visible;
}
.time-buttons-container .registration-item-buttons {
  position: absolute;
  right: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.cancellation-time {
  color: #888;
  font-style: italic;
  margin-left: 12px;
}
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
}
.toast {
  background: var(--good);
  color: #1a1f24;
  padding: 16px 24px;
  border-radius: 8px;
  font-weight: 500;
  box-shadow: var(--shadow);
  max-width: 90vw;
  word-wrap: break-word;
  animation: slideUp 0.3s ease-out;
  pointer-events: auto;
}
.toast-error {
  background: var(--bad);
  color: white;
}
.toast-fade-out {
  animation: slideDown 0.3s ease-out forwards;
}
@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes slideDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(20px);
    opacity: 0;
  }
}
.header-slot.header-slot-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.header-menu-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.notification-badge {
  background: red;
  color: white;
  height: 22px;
  align-items: center;
  justify-content: center;
  font-size: 0.75em;
  border-radius: 50vh;
  display: flex;
  font-weight: 1000;
  width: fit-content;
  min-width: 22px;
}
*[hidden] {
  display: none !important;
}
.hamburger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  color: var(--ink);
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.35rem;
  touch-action: manipulation;
  transition: background-color 150ms ease;
  position: relative;
}
.hamburger-btn:hover {
  background-color: var(--surface-variant);
}

.hamburger-notification-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: red;
  box-shadow: 0 0 0 3px rgba(255,0,0,0.05);
}
.header-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--surface);
  border-bottom: 1px solid var(--outline);
  box-shadow: 0 4px 12px var(--shadow);
  overflow-y: auto;
  animation: slideDown 200ms ease-out;
  z-index: 100;
  height: 100vh;
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.header-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.header-menu-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: background-color 150ms ease;
}
.header-menu-link:hover {
  background-color: var(--surface-variant);
}
.header-menu-link .material-symbols-outlined {
  font-size: 1.5rem;
}

/* Icon-only header menu links (e.g., RSS) */
.header-menu-link-icon {
  padding: 0.5rem 0.75rem;
  justify-content: center;
}
.header-menu-link-icon .material-symbols-outlined {
  font-size: 1.25rem;
}
.account-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.account-profile-section {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
  width: 100%;
  gap: 30px;
}
.profile-pic-container {
  position: relative;
  width: 120px;
  height: 120px;
}
.profile-pic {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
  object-position: top center;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: first baseline;
}
.profile-pic-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(0, 0, 0, 0.3);
}
.change-pic-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 1.2rem;
  box-shadow: var(--shadow);
  transition: background-color 150ms ease, transform 150ms ease;
}
.change-pic-btn:hover {
  background: #ffc94d;
  transform: scale(1.05);
}
.change-pic-btn:active {
  transform: scale(0.95);
}
.account-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.form-group label {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
}
.form-group input:disabled {
  background: var(--surface);
  color: #999;
}
.balance-display {
  padding: 0.75rem;
  border: 1px solid var(--surface-strong);
  border-radius: 6px;
  background: var(--surface);
  font-size: 1rem;
  display: flex;
  align-items: center;
}
.positive-balance {
  color: var(--good);
  font-weight: 500;
}
.negative-balance {
  color: var(--bad);
  font-weight: 500;
}
.save-btn {
  padding: 1rem;
  background: var(--accent);
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease;
  margin-top: 1rem;
}
.save-btn:hover {
  background: #ffc94d;
}
.save-btn:not(:disabled):active {
  transform: scale(0.98);
}
.save-btn:disabled {
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.5;
  color: black;
}
.score-container {
  flex-grow: 1;
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: end;
}
.save-score-btn {
  border: 3px solid #070;
  background: #6f6;
}
.banned-player {
  background: #d36f77 !important;
  opacity: 0.7;
}
#invite-name {
  border-bottom-left-radius: 0;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}
#invite-phone {
	border-top-left-radius: 0;
	border-top: 0;
    border-bottom-left-radius: 15px;
}
#invite-input-wrapper {
    display: flex;
}
#invite-share-outside {
  height: 57px;
  border-left: 0;
}
#invite-others {
    min-width: 30px;
    height: 30px;
}
.invite-input-checkbox label {
  display: flex;
  align-items: center;
  margin-left: 10px;
  margin-right: 10px;
  border-bottom: 2px dotted #aaa;
}
.invite-input-checkbox {
  display: flex;
  margin-bottom: 6px;
  align-items: center;
}
.player-details-container {
  display: flex;
  align-items: center;
}
.player-stats-line span.material-symbols-outlined {
  font-size: 20px !important;
}
.player-details-container span.material-symbols-outlined {
  font-size: 25px !important;
}
.invite-tooltip .material-symbols-outlined {
  font-size: 20px !important;
}
.invite-tooltip {
    margin-left: 25px;
    width: fit-content;
}
#last-updated {
  font-style: italic;
  text-align: right;
  color: #888;
}
img.rev-icon {
    width: 20px !important;
    height: 20px !important;
}
.info-shell {
    margin-bottom: 80px;
}
#auth-screen > div {
  padding: 40px;
  flex-grow: 1;
  width: fit-content;
}
.form-group > :last-child, .form-group > :last-child .input-wrap {
  border-bottom-right-radius: 15px;
}
.form-group > :first-child, .form-group > :first-child, .form-group > :first-child .input-wrap {
  border-top-width: 3px;
  border-top-left-radius: 15px;
}
.input-wrap.form-group {
  align-items: baseline;
  flex-direction: column;
}
#auth-screen {
  flex-wrap: wrap;
  position: relative;
  width: fit-content;
}
.input-description, .input-wrap label {
  position: absolute;
  right: 10px;
  color: #777;
}
.leaderboard-pic span {
  display: flex;
  font-size: 36px;
}
.profile-pic-container #position-badge {
  position: absolute;
}
#profile-pic-fallback .material-symbols-outlined {
  font-size: 55px;
}
.registration-name {
  overflow: clip;
  max-width: 140px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.cost-mode-buttons button {
  width: 120px;
  border: 0;
  border-radius: 0;
}
.cost-mode-buttons {
  display: flex;
  height: 48px;
  z-index: 99999;
}
.form-group-inline label {
  display: block;
  width: fit-content;
  font-weight: 1000;
}
.form-group-inline {
  height: 48px;
  display: flex;
  align-items: center;
  padding: 5px;
  gap: 15px;
  flex-direction: row !important;
  width: fit-content;
}
.input-icon > img {
  max-width: 50%;
}
#invite-input-wrapper input {
  border: 3px solid #aaa;
  padding: 15px;
}
#invite-input-wrapper div:last-child input {
  border-top: none;
}
#invite-input-wrapper .form-group>*:last-child {
    border-radius: 0 !important;
}
.input-wrap select {
  width: fit-content;
}
header button {
  border: none;
  cursor: pointer;
  background: inherit !important;
}
#account-form .input-wrap {
  min-width: 320px;
}
#player-name-display-header {
  font-size: x-large;
  padding: 0;
  margin: 0;
  margin-right: 10px;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-position: under;
  text-decoration-style: dotted;
  text-decoration-color: #959595;
}
label.invite-tooltip {
  display: flex;
  gap: 5px;
  cursor: pointer;
}
.modal:not(.multi-select) .modal-body > button:last-child,
.modal:not(.multi-select) .modal-body > div:not(.actions) > button:last-child, .submit-btn {
  position: absolute;
  right: 0;
  bottom: 0;
  border-radius: 0 !important;
  border-top-left-radius: 15px !important;
  box-shadow: -3px -3px 0 3px #33603c !important;
  border-bottom: 0 !important;
  border-right: 0 !important;
}
.modal:not(.multi-select) .modal-body > button:last-child,
.modal:not(.multi-select) .modal-body > div:not(.actions) > button:last-child, .save-btn, .submit-btn {
  padding: 20px;
  background: #7efa97;
  border-radius: 15px;
  box-shadow: 0 0 0 6px #33603c;
  border: 6px solid #61b271;
  color: black;
  font-weight: 1000;
  font-size: 17px;
}
.input-wrap textarea {
  font-size: 1rem;
  font-family: inherit;
  border: none;
  resize: vertical;
  padding-left: 40px;
  padding-right: 10px;
  padding-top: 6px;
  outline: none !important;
}
header * {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}
header li {
  display: flex;
}
header li a:first-child {
  flex-grow: 1;
}
.modal-body > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.modal h3 {
  width: 100%;
}
#invite-input-wrapper .input-wrap {
  border: 0;
}
button.gold {
    background: #fae17e !important;
    box-shadow: -3px -3px 0 3px #646135 !important;
    border-color: #b2a561 !important;
}
.slide-down {
    animation: slideDown 0.4s ease-out;
}
.substitutes-section .registration-player,
.substitutes-section .registration-name {
  max-width: 100% !important;
}
header img.avatar {
  max-height: 75%;
  object-fit: cover;
  object-position: top center;
  margin-right: 5px;
}
#identifier-step {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.welcome-shell {
  justify-content: center;
  align-items: center;
  display: flex;
}
#back-btn {
  width: fit-content;
  border: 1px solid;
  left: 0;
  top: -30px;
}
#dob-month {
  width: fit-content;
  text-align: center;
  padding-left: 0 !important;
}
#dob-year {
  width: 80px;
  padding-left: 10px !important;
}
#dob-day {
  width: 110px;
}
.input-wrap.no-flex * {
  flex-grow: 0;
}
select:focus {
  background: #ff9;
  outline: none;
}
input:focus, textarea:focus {
  outline: 5px solid #ff9 !important;
  outline-offset: -5px !important;
  border-color: transparent;
  background: transparent;
}
.notification-recipients {
  display: flex;
  list-style: none;
  align-items: end;
}
.notification-recipients li {
  height: 30px;
  aspect-ratio: 1;
  margin-left: -10px;
  position: relative;
}
.notification-recipients img {
  width: 100%;
  border-radius: 50vh;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border: 3px solid #aaa;
  background: white;
}
.notification-recipients li.read-by {
    margin-right: 20px;
}
.notification-recipients li.read-by .material-symbols-outlined {
  position: absolute;
  bottom: 0;
  left: -10px;
  border-radius: 50%;
  background: #52a352;
  color: white;
  width: 20px;
  height: 20px;
  font-size: 20px;
}
#pending-change-note {
  color: red;
  font-size: small;
  margin-left: 20px;
}
.pending-approval {
  background: #f6c5cd;
}
.inline-btns button, .vertical-btns button {
  background: #a1fffb;
  border: 6px solid #3fa9f5;
  box-shadow: #1283c7 0px -0px 0 6px;
  border-radius: 6px;
}
.inline-btns {
  display: flex;
  flex-direction: row !important;
  gap: 20px;
  margin-top: 10px;
}
.vertical-btns {
  display: flex;
  flex-direction: column !important;
  gap: 20px;
  margin-top: 10px;
}
.save-btn {
  background-color: #28a745 !important;
  color: #fff !important;
  border: none;
  padding: 6px 10px;
  margin-right: 8px;
  border-radius: 4px;
}
.game-created-by {
  color: #999;
  text-decoration: underline dotted;
  font-style: italic;
}
#add-files-btn {
  width: 100%;
  flex-grow: 1;
  border: 10px #aaa dashed;
  border-radius: 80px;
  justify-content: center;
  font-size: xx-large;
  border-style: dashed;
  color: #777;
}
select {
  font-size: 20px;
  border: 3px solid #aaa;
  padding: 10px;
  border-radius: 10px;
}
.swapped span.registration-name {
    text-decoration: underline wavy black;
    padding-bottom: 2px;
}
details.game-card:not([open]) {
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
details.game-card[open] {
  opacity: 1 !important;
  transition: opacity 0.3s ease-in-out;
}
details.game-card .registrations-list {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 300ms ease;
}

details.game-card[open] .registrations-list {
  grid-template-rows: 1fr;
}
.import-dashboard
.registration-item {
  border-left-width: 6px;
  border-left-style: solid;
  padding-left: 10px;
}
.import-dashboard
.registration-item.registration-added {
  border-left-color: #7f7;
}
.import-dashboard
.registration-item.registration-cancelled {
  border-left-color: #f77;
}
.import-dashboard
.registration-item.registration-updated {
  border-left-color: #77f;
}
.import-dashboard
.registration-item.registration-updated .registration-time {
  font-weight: bold;
}
.import-dashboard
.registration-item.registration-unchanged {
  border-left-color: #fff;
}
.btn-circle {
  border-radius: 50vh;
  aspect-ratio: 1;
}
.btn-danger {
  color: white;
  background: #d23030;
}
.files-list-item:hover {
  z-index: 999;
}
.import-legend {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
  margin-left: 1rem;
  width: fit-content;
  margin-top: 16px;
}
.import-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: #222;
}
.import-legend-square {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex: 0 0 12px;
}
.import-legend-square.updated { background: #0b74de; }
.import-legend-square.new { background: #28a745; }
.import-legend-square.cancelled { background: #dc3545; }
.import-legend-label { line-height: 1; }
.player-card input[type="checkbox"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 48px;
  aspect-ratio: 1;
}
#bulk-actions {
  position: absolute;
  top: 0;
  z-index: 1001;
  background: #4c9a58;
  left: calc(50% - min(340px, 50%));
  height: 56px;
  display: flex;
}
span.spacer {
    flex-grow: 1;
}
#bulk-actions>button {
  background: transparent;
  color: white;
  border-width: 3px;
  border-radius: 0;
  border-style: solid;
  border-top-width: 0;
  border-bottom-width: 0;
  border-color: rgba(34, 102, 35, 0.4);
  border-left-width: 0;
}
#bulk-actions>button:last-child {
  border-right-width: 0 !important;
  border-left-width: 3px;
}
div.icon-dropdown select {
  display: block;
  width: 100%;
  border: 0;
  color: transparent;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
div.icon-dropdown > .icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: -1;
}
div.icon-dropdown {
  position: relative;
  aspect-ratio: 1;
  height: 48px;
  width: 48px;
  cursor: pointer;
}
.players-shell #back-btn {
  width: fit-content;
  border: 1px solid;
  position: unset;
}
.player-card.selected {
  box-shadow: 0 0 0 10px #3584e4 !important
}
body>*:not(.app-shell) {
  width: min(100%, 680px);
  margin-left: auto;
  margin-right: auto;
}
#bulk-selected-count {
  color: white;
  align-self: center;
  font-weight: 700;
}
.merge-photo {
  width: 64px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  aspect-ratio: 1;
  margin: 20px;
  object-position: top center;
}
.merge-photo.selected {
  box-shadow: 0 0 0 10px #3584e4;
}
.merge-photo-area {
  flex-direction: row !important;
}
.btn.clear-selection {
  background: white !important;
  color: black !important;
  margin: 10px;
  border-radius: 50vh !important;
  display: flex;
  border: 3px solid #ccc !important;
}
player-avatar {
  height: 100%;
  display: flex;
  align-items: center;
}
img.avatar {
  aspect-ratio: 1;
  object-fit: cover;
  object-position: top center;
  border-radius: 50vh;
  border: 3px solid #aaa;
}
.info-shell .avatar {
  max-width: 48px;
}
#import-form {
  display: flex;
  gap: 20px;
  flex-grow: 1;
  flex-direction: column;
}
.import-dashboard {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 10px;
}
.insert-below:not(.drag-ghost,.dragging) {
  box-shadow: 2px 2px 0 0 red;
}
.insert-above:not(.drag-ghost,.dragging) {
  box-shadow: 2px -2px 0 0 red;
}
.insert-below:not(.drag-ghost,.dragging) .right-caret {
  background: red;
  bottom: -6px;
  right: 0;
}
.insert-above:not(.drag-ghost,.dragging) .right-caret {
  background: red;
  top: -6px;
  right: 0;
}
.insert-below:not(.drag-ghost,.dragging) .left-caret {
  background: red;
  bottom: -6px;
  left: 0;
}
.insert-above:not(.drag-ghost,.dragging) .left-caret {
  background: red;
  top: -6px;
  left: 0;
}
drag-box.dragging {
  opacity: 0.5;
}
.left-caret, .right-caret {
  position: absolute;
  height: 10px;
  width: 2px;
  background: transparent;
}
.substitutes-items .fwd, .substitutes-items .mid, .substitutes-items .def, .substitutes-items .gkp {
  display: none;
}
.score-input {
  width: 50px;
  margin: 0 !important;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  text-align: center;
  border-radius: 50vh;
  border: 3px double #aaa;
}
