/**
 * Admin shell design tokens — mirrors darts-manager `src/scss/app.scss` admin layer
 * for cloud-api when using Tailwind CDN (no @apply / SCSS pipeline).
 */

[x-cloak] {
  display: none !important;
}

/* ----- Typography (matches Syne + JetBrains Mono stack) ----- */
.admin-root {
  font-family: "Syne", ui-sans-serif, system-ui, sans-serif;
  overflow-x: clip;
}

/** Routed admin pages (fixtures view/setup, scoresheets, match consoles, etc.) */
.content-wrapper {
  box-sizing: border-box;
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 1rem;
  overflow-x: clip;
}

@media (min-width: 640px) {
  .content-wrapper {
    padding-inline: 1.5rem;
  }
}

.score-digit {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 12px;
}

@keyframes admin-fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  animation: admin-fade-up 0.25s ease both;
}
.fade-up-2 {
  animation: admin-fade-up 0.25s 0.06s ease both;
}
.fade-up-3 {
  animation: admin-fade-up 0.25s 0.12s ease both;
}

/* ----- Surfaces & cards ----- */
.stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 16px;
}

.chart-panel {
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    rgba(10, 15, 30, 0.82);
  box-shadow:
    0 14px 30px rgba(2, 6, 23, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.stat-pill {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(9, 14, 28, 0.82);
  padding: 1rem;
  box-shadow:
    0 12px 28px rgba(2, 6, 23, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.stat-pill::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.6), rgba(16, 185, 129, 0.45), rgba(244, 63, 94, 0.4));
  opacity: 0.75;
}

.season-highlights .stat-pill {
  padding: 0.5rem 0.625rem;
  border-radius: 0.75rem;
  box-shadow:
    0 8px 18px rgba(2, 6, 23, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
@media (min-width: 640px) {
  .season-highlights .stat-pill {
    padding: 1rem;
    border-radius: 1rem;
    box-shadow:
      0 12px 28px rgba(2, 6, 23, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
}

.app-card {
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.app-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.app-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.75rem 1rem;
}

.app-filter-panel {
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(4px);
}
@media (min-width: 768px) {
  .app-filter-panel {
    padding: 1rem;
  }
}

.app-filter-toolbar {
  display: none;
}

@media (min-width: 640px) {
  .app-filter-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
  }
}

.app-filter-toolbar__search {
  position: relative;
  min-width: 0;
  flex: 1 1 11rem;
  max-width: 20rem;
}

.app-filter-toolbar__search .app-input-dark {
  height: 2.5rem;
  width: 100%;
}

.app-filter-toolbar .app-filter-select,
.app-filter-toolbar select.app-select-dark {
  width: auto;
  min-width: 8.75rem;
  max-width: 11rem;
  flex: 0 0 auto;
  height: 2.5rem;
}

.app-filter-toolbar .app-filter-select--compact {
  min-width: 7rem;
  max-width: 8.5rem;
}

.app-filter-toolbar .app-filter-select--wide {
  min-width: 10rem;
  max-width: 13rem;
}

.app-filter-toolbar__clear {
  flex: 0 0 auto;
  height: 2.5rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  white-space: nowrap;
}

.app-input-dark {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #fff;
}
.app-input-dark::placeholder {
  color: #737373;
}
.app-input-dark:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.4);
}

/* ----- Form selects (all admin pages) ----- */
.admin-root select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  min-height: 2.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(163, 163, 163, 0.55);
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23737373'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.25a.75.75 0 01-1.06 0L5.21 8.27a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 1.125rem 1.125rem;
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  color: #171717;
  cursor: pointer;
  color-scheme: light;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.admin-root select:hover:not(:disabled) {
  border-color: rgba(115, 115, 115, 0.75);
}

.admin-root select:focus {
  outline: none;
  border-color: rgba(14, 165, 233, 0.55);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

.admin-root select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.admin-root select option,
.admin-root select optgroup {
  background-color: #ffffff;
  color: #171717;
}

html.dark .admin-root select,
.dark .admin-root select {
  border-color: rgba(255, 255, 255, 0.14);
  background-color: rgb(23 23 23);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23a3a3a3'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.25a.75.75 0 01-1.06 0L5.21 8.27a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
  color: #f5f5f5;
  color-scheme: dark;
}

html.dark .admin-root select:hover:not(:disabled),
.dark .admin-root select:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.22);
  background-color: rgb(38 38 38);
}

html.dark .admin-root select:focus,
.dark .admin-root select:focus {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

html.dark .admin-root select option,
html.dark .admin-root select optgroup,
.dark .admin-root select option,
.dark .admin-root select optgroup {
  background-color: rgb(23 23 23);
  color: #f5f5f5;
}

/* Beat Tailwind utility backgrounds on <select> in dark admin */
html.dark .admin-root select[class*="bg-white"],
html.dark .admin-root select[class*="bg-neutral"],
html.dark .admin-root select[class*="bg-black"],
.dark .admin-root select[class*="bg-white"],
.dark .admin-root select[class*="bg-neutral"],
.dark .admin-root select[class*="bg-black"] {
  background-color: rgb(23 23 23) !important;
  color: #f5f5f5 !important;
  color-scheme: dark;
}

/* Explicit utility — same chrome, use on new markup */
.app-select,
.app-select-dark {
  appearance: none;
  -webkit-appearance: none;
  min-height: 2.5rem;
  border-radius: 0.5rem;
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  cursor: pointer;
}

.app-select-dark {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background-color: rgb(23 23 23);
  color: #f5f5f5;
  color-scheme: dark;
}

.app-select-dark option,
.app-select-dark optgroup {
  background-color: rgb(23 23 23);
  color: #f5f5f5;
}

.app-select-dark:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-select-dark:focus {
  outline: none;
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Searchable combobox panel (country picker, team builder player pool, etc.) */
.admin-combobox-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 120;
  margin-top: 0.375rem;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background-color: rgb(10 10 10);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.35);
  isolation: isolate;
}

html:not(.dark) .admin-combobox-panel {
  border-color: rgba(163, 163, 163, 0.5);
  background-color: #ffffff;
  box-shadow:
    0 20px 40px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(15, 23, 42, 0.06);
}

.admin-combobox-panel__search {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem;
}

html:not(.dark) .admin-combobox-panel__search {
  border-bottom-color: rgba(163, 163, 163, 0.35);
}

.admin-combobox-panel__list {
  max-height: 13rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.admin-combobox-panel__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem;
}

html:not(.dark) .admin-combobox-panel__toolbar {
  border-bottom-color: rgba(163, 163, 163, 0.35);
}

.admin-combobox-option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  text-align: left;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #e5e5e5;
  transition: background-color 0.12s ease;
}

.admin-combobox-option:hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.08);
}

.admin-combobox-option:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

html:not(.dark) .admin-combobox-option {
  color: #171717;
}

html:not(.dark) .admin-combobox-option:hover:not(:disabled) {
  background-color: rgba(15, 23, 42, 0.06);
}

.admin-combobox-option.is-selected {
  background-color: rgba(16, 185, 129, 0.15);
  color: #d1fae5;
}

html:not(.dark) .admin-combobox-option.is-selected {
  background-color: rgba(16, 185, 129, 0.12);
  color: #065f46;
}

.app-page-title {
  margin-top: 4px;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.page-header-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.3);
}
.page-header h1 {
  margin-top: 4px;
  font-size: 24px;
  font-weight: 700;
}

/* ----- Loaders ----- */
.app-page-loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}
.app-loader-radial {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.07) 0%, transparent 65%);
  pointer-events: none;
}

.app-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 45;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}
.app-loading-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.85), transparent);
  animation: admin-load-sweep 1s ease-in-out infinite;
}
@keyframes admin-load-sweep {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(350%);
  }
}

/* ----- Tables & lists ----- */
.tbl-row {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.1s;
}
.tbl-row:hover {
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}
.tbl-row-me {
  background: rgba(16, 185, 129, 0.07) !important;
  border-left: 2px solid rgba(16, 185, 129, 0.5);
}
.tbl-row-me:hover {
  background: rgba(16, 185, 129, 0.1) !important;
}

.skel {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  animation: admin-pulse 1.4s ease-in-out infinite;
}
@keyframes admin-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* ----- Fixture hero ----- */
.fixture-hero {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
}
.fixture-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.4), transparent);
}

/* ----- Challenges / ladder (shared chrome) ----- */
.challenge-row {
  display: block;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  padding: 12px 16px;
  transition:
    background 0.12s,
    border-color 0.12s;
  text-decoration: none;
}
.challenge-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}
.challenge-row-incoming {
  border-left: 2px solid rgba(251, 191, 36, 0.6);
  padding-left: 14px;
}
.challenge-row-incoming:hover {
  border-left-color: rgba(251, 191, 36, 0.9);
  background: rgba(251, 191, 36, 0.04);
}
.challenge-row-active {
  border-left: 2px solid rgba(16, 185, 129, 0.5);
  padding-left: 14px;
}
.challenge-row-active:hover {
  border-left-color: rgba(16, 185, 129, 0.8);
  background: rgba(16, 185, 129, 0.04);
}

.ladder-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.ladder-row:first-child {
  background: rgba(251, 191, 36, 0.06);
  border-color: rgba(251, 191, 36, 0.15);
}
.ladder-row:nth-child(2) {
  background: rgba(148, 163, 184, 0.05);
  border-color: rgba(148, 163, 184, 0.1);
}
.ladder-row:nth-child(3) {
  background: rgba(180, 120, 60, 0.05);
  border-color: rgba(180, 120, 60, 0.1);
}

.tool-tile {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.tool-tile:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}
.tool-tile i {
  font-size: 15px;
}
.tool-tile span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1;
}
.tool-tile:hover span {
  color: rgba(255, 255, 255, 0.85);
}

.stripe-bg {
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 6px,
    rgba(255, 255, 255, 0.015) 6px,
    rgba(255, 255, 255, 0.015) 12px
  );
}

/* ----- Buttons ----- */
.header-btn {
  font-size: 0.875rem;
  line-height: 1.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  transition:
    background 0.15s,
    border-color 0.15s;
}
.header-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

/** Edit / new forms — link back to the section list (Teams, Players, …). */
.admin-edit-back {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  color: rgb(56 189 248);
  transition: color 0.15s;
}
.admin-edit-back:hover {
  color: rgb(125 211 252);
}
button.admin-edit-back {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.btn-add {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  transition: background 0.15s;
}
.btn-add:hover {
  background: #3b82f6;
}
.dark .btn-add {
  background: #1e3a8a;
}
.dark .btn-add:hover {
  background: #1d4ed8;
}

.btn-edit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.25rem;
  padding: 0.5rem;
  box-shadow: 0 0 0 1px #d4d4d4;
  background: #f5f5f5;
  color: #404040;
  transition:
    color 0.12s,
    background 0.12s;
}
.btn-edit:hover {
  color: #fcd34d;
  background: #451a03;
}
.dark .btn-edit {
  box-shadow: 0 0 0 1px #404040;
  background: transparent;
  color: #d4d4d4;
}
.dark .btn-edit:hover {
  color: #fcd34d;
  background: #451a03;
}

.btn-view {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.25rem;
  padding: 0.5rem;
  box-shadow: 0 0 0 1px #d4d4d4;
  background: #f5f5f5;
  color: #404040;
  transition:
    color 0.12s,
    background 0.12s;
}
.btn-view:hover {
  color: #93c5fd;
  background: #172554;
}
.dark .btn-view {
  box-shadow: 0 0 0 1px #404040;
  background: transparent;
  color: #d4d4d4;
}
.dark .btn-view:hover {
  color: #93c5fd;
  background: #172554;
}

.chip-btn {
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
}
.chip-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-active {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  border: 1px solid rgba(59, 130, 246, 0.2);
}
.dark .nav-active {
  background: rgba(59, 130, 246, 0.1);
  color: #93c5fd;
}

/* ----- Header nav clusters (league / play / admin) ----- */
.header-nav-cluster {
  display: inline-flex;
  align-items: stretch;
  min-height: 2.25rem;
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid #d4d4d4;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.dark .header-nav-cluster {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(23, 23, 23, 0.72);
}

.header-nav-cluster--league {
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 0 0 1px rgba(16, 185, 129, 0.3);
}
.dark .header-nav-cluster--league {
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(52, 211, 153, 0.28);
}
.header-nav-cluster--league.is-open {
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.08),
    0 0 0 2px rgba(16, 185, 129, 0.38);
}
.dark .header-nav-cluster--league.is-open {
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.35),
    0 0 0 2px rgba(52, 211, 153, 0.42);
}

.header-nav-cluster--play {
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 0 0 1px rgba(139, 92, 246, 0.32);
}
.dark .header-nav-cluster--play {
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(167, 139, 250, 0.3);
}

.header-nav-cluster--admin {
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 0 0 1px rgba(100, 116, 139, 0.38);
}
.dark .header-nav-cluster--admin {
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(148, 163, 184, 0.22);
}

/* Dropdown menus (Manage, Settings, profile) extend below the cluster — do not clip panels. */
.header-nav-cluster--menu {
  overflow: visible;
}

.header-nav-seg {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0 0.625rem;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
  color: #404040;
  transition:
    background-color 150ms ease,
    color 150ms ease;
}
@media (min-width: 640px) {
  .header-nav-seg {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}
.header-nav-seg:hover {
  background: #f5f5f5;
  color: #171717;
}
.dark .header-nav-seg {
  color: #e5e5e5;
}
.dark .header-nav-seg:hover {
  background: rgba(38, 38, 38, 0.9);
  color: #fafafa;
}

.header-nav-seg--icon {
  padding-left: 0.625rem;
  padding-right: 0.625rem;
}

/* Account menu: avatar fills the admin cluster tile (no chevron). */
.header-profile-trigger {
  display: block;
  flex: 0 0 auto;
  flex-shrink: 0;
  align-self: center;
  width: 34px;
  height: 34px;
  max-width: 34px;
  max-height: 34px;
  padding: 0;
  border: 0;
  margin: 0 0.2rem;
  background: transparent;
  overflow: hidden;
  border-radius: 9999px;
  line-height: 0;
  cursor: pointer;
  contain: layout style paint;
  transition: opacity 150ms ease;
}
.header-profile-trigger:hover {
  opacity: 0.92;
}
.header-profile-trigger:focus {
  outline: none;
}
.header-profile-trigger:focus-visible {
  outline: 2px solid rgba(52, 211, 153, 0.55);
  outline-offset: -2px;
}
.header-profile-trigger img {
  display: block;
  height: 100%;
  width: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}

.header-nav-seg.is-active-league {
  background: rgba(16, 185, 129, 0.1);
  color: #065f46;
}
.dark .header-nav-seg.is-active-league {
  background: rgba(16, 185, 129, 0.14);
  color: #a7f3d0;
}

.header-nav-seg.is-active-play {
  background: rgba(139, 92, 246, 0.12);
  color: #5b21b6;
}
.dark .header-nav-seg.is-active-play {
  background: rgba(139, 92, 246, 0.18);
  color: #ddd6fe;
}

.header-nav-seg.is-active-admin {
  background: rgba(100, 116, 139, 0.12);
  color: #334155;
}
.dark .header-nav-seg.is-active-admin {
  background: rgba(148, 163, 184, 0.14);
  color: #e2e8f0;
}

.header-nav-seg.is-menu-open {
  background: #f5f5f5;
  color: #171717;
}
.dark .header-nav-seg.is-menu-open {
  background: rgba(38, 38, 38, 0.95);
  color: #fafafa;
}

.header-nav-menu-panel {
  isolation: isolate;
}

.header-nav-menu-panel__inner {
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid rgba(163, 163, 163, 0.45);
  background-color: #ffffff;
  box-shadow:
    0 20px 40px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(15, 23, 42, 0.05);
}

.dark .header-nav-menu-panel__inner {
  border-color: rgba(255, 255, 255, 0.12);
  background-color: rgb(23 23 23);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.35);
}

.header-nav-menu-panel__inner a[role="menuitem"] {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #262626;
  transition: background-color 0.12s ease;
}

.header-nav-menu-panel__inner a[role="menuitem"]:hover {
  background-color: rgba(15, 23, 42, 0.06);
}

.dark .header-nav-menu-panel__inner a[role="menuitem"] {
  color: #f5f5f5;
}

.dark .header-nav-menu-panel__inner a[role="menuitem"]:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.header-nav-divider {
  align-self: stretch;
  width: 1px;
  background: #d4d4d4;
}
.dark .header-nav-divider {
  background: rgba(255, 255, 255, 0.1);
}

/* ----- Admin notification panel (header bell) ----- */
.admin-notification-type--amber {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}
.dark .admin-notification-type--amber {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
}
.admin-notification-type--sky {
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
}
.dark .admin-notification-type--sky {
  background: rgba(14, 165, 233, 0.16);
  color: #7dd3fc;
}
.admin-notification-type--emerald {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}
.dark .admin-notification-type--emerald {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
}
.admin-notification-type--neutral {
  background: rgba(115, 115, 115, 0.12);
  color: #525252;
}
.dark .admin-notification-type--neutral {
  background: rgba(163, 163, 163, 0.14);
  color: #d4d4d4;
}
.admin-notification-card--incoming {
  border-left: 3px solid rgba(245, 158, 11, 0.75);
}
.admin-notification-card--outgoing {
  border-left: 3px solid rgba(14, 165, 233, 0.65);
}
.admin-notification-card--active {
  border-left: 3px solid rgba(16, 185, 129, 0.75);
}

/* ----- Chips & empty ----- */
.empty-state {
  border-radius: 0.75rem;
  border: 1px dashed rgba(255, 255, 255, 0.05);
  padding: 3rem 1rem;
  text-align: center;
}
.empty-state-title {
  font-weight: 700;
  margin-top: 0.75rem;
}
.empty-state-text {
  font-size: 0.875rem;
  color: #737373;
  margin-top: 0.25rem;
}

@keyframes admin-pdl-ping {
  75%,
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}
.pdl-ping {
  animation: admin-pdl-ping 1.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* ----- Forms ----- */
.form-checkbox-lg {
  height: 1.25rem;
  width: 1.25rem;
  border-radius: 0.25rem;
  border: 1px solid #d4d4d4;
  background: #fff;
  accent-color: #059669;
}
.form-checkbox-lg:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.4);
}
.dark .form-checkbox-lg {
  border-color: #525252;
  background: #262626;
  accent-color: #34d399;
}

.form-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.uploader-compact {
  position: relative;
  border-radius: 0.5rem;
  border: 2px dashed #d1d5db;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.75rem;
  padding-top: 1rem;
}
.dark .uploader-compact {
  border-color: #404040;
  background: transparent;
}
.uploader-compact .au-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.75rem;
}
.dark .uploader-compact .au-card {
  border-color: #404040;
}
.uploader-compact .au-thumb {
  height: 4rem;
  width: 4rem;
  border-radius: 0.375rem;
  object-fit: cover;
  background: #f5f5f5;
  box-shadow: 0 0 0 1px #e5e7eb;
}
.dark .uploader-compact .au-thumb {
  background: #262626;
  box-shadow: 0 0 0 1px #404040;
}
@media (max-width: 767px) {
  .uploader-compact .au-editor,
  .uploader-compact .au-advanced {
    display: none !important;
  }
}

/* ----- Footer ----- */
footer {
  min-height: 3.5rem;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  border-top: 1px solid rgba(226, 232, 240, 0.7);
  background: rgba(255, 255, 255, 0.8);
  padding: 0.5rem 1rem;
  text-align: center;
  color: #64748b;
  backdrop-filter: blur(12px);
}
.dark footer {
  border-color: rgba(30, 41, 59, 0.8);
  background: rgba(2, 6, 23, 0.7);
  color: #94a3b8;
}

.app-footer-inner {
  margin-left: auto;
  margin-right: auto;
  max-width: 80rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
}

.app-footer-primary {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.app-footer-primary a {
  font-weight: 600;
  color: #334155;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s;
}
.app-footer-primary a:hover {
  text-decoration-color: currentColor;
}
.dark .app-footer-primary a {
  color: #e2e8f0;
}

.app-footer-secondary {
  font-size: 10px;
  color: #475569;
}
.dark .app-footer-secondary {
  color: #94a3b8;
}

/* Fixture list badges */
.bg-reverse {
  background: #d97706;
  color: #fff;
}
.bg-break {
  background: #e11d48;
  color: #fff;
}
.bg-event {
  background: #0284c7;
  color: #fff;
}

.mic-bar {
  transition: background-color 0.08s;
}

.keypad-btn:active {
  transform: scale(0.92);
}

/* ----- Ambient backdrop (DartsOS) ----- */
.dartboard-bg-img {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #ffffff;
  background-image:
    radial-gradient(ellipse 88% 72% at 38% 50%, rgba(234, 88, 12, 0.07) 0%, transparent 52%),
    radial-gradient(ellipse 88% 72% at 62% 50%, rgba(59, 130, 246, 0.06) 0%, transparent 52%),
    radial-gradient(ellipse 118% 96% at 50% 50%, rgba(252, 252, 253, 0.55) 0%, rgba(248, 248, 250, 0.88) 40%, #ffffff 72%);
}
.dark .dartboard-bg-img {
  background-color: #000000;
  background-image:
    radial-gradient(ellipse 88% 72% at 38% 50%, rgba(234, 88, 12, 0.05) 0%, transparent 42%),
    radial-gradient(ellipse 88% 72% at 62% 50%, rgba(37, 99, 235, 0.04) 0%, transparent 42%),
    radial-gradient(ellipse 118% 96% at 50% 50%, rgba(6, 5, 10, 0.92) 0%, rgba(2, 2, 4, 0.98) 28%, #000000 52%);
}
.dartboard-bg-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/assets/branding/watermark-light.png");
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: clamp(320px, 70vmin, 1000px);
  opacity: 0.075;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}
.dark .dartboard-bg-img::before {
  background-image: url("/assets/branding/watermark-dark.png");
  opacity: 0.04;
}
.dark .dartboard-bg-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

html.dark body {
  background-color: #000000;
}

@media (prefers-reduced-motion: reduce) {
  .fade-up,
  .fade-up-2,
  .fade-up-3,
  .app-loading-bar::after,
  .skel,
  .pdl-ping {
    animation: none !important;
  }
}

/* ----- Player edit arcade profile ----- */
.player-profile-stage .challenge-duel-panel--you {
  width: 100%;
  max-width: 100%;
}

.player-profile-stage .challenge-duel-carousel-slide {
  min-width: 100%;
}

/* ----- Challenge duel / arcade opponent picker ----- */
.challenge-duel-stage {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(16, 185, 129, 0.12), transparent 55%),
    radial-gradient(ellipse 70% 50% at 0% 100%, rgba(56, 189, 248, 0.08), transparent 50%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(244, 63, 94, 0.08), transparent 50%),
    linear-gradient(180deg, rgba(8, 12, 24, 0.95), rgba(4, 6, 14, 0.98));
  padding: 1rem;
  box-shadow:
    0 20px 50px rgba(2, 6, 23, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.challenge-duel-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .challenge-duel-grid {
    grid-template-columns: minmax(13rem, 1fr) minmax(10rem, 12rem) minmax(13rem, 1fr);
    align-items: stretch;
    gap: 0.65rem;
  }
}

.challenge-duel-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 12rem;
  min-width: 0;
  width: 100%;
  padding: 1rem 0.75rem 0.85rem;
  border-radius: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.challenge-duel-panel--you {
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.15);
}

.challenge-duel-panel--foe {
  border-color: rgba(251, 113, 133, 0.35);
  box-shadow: 0 0 24px rgba(244, 63, 94, 0.1);
}

.challenge-duel-panel--foe.is-selected {
  border-color: rgba(251, 113, 133, 0.75);
  box-shadow: 0 0 32px rgba(244, 63, 94, 0.25);
  transform: translateY(-2px);
}

.challenge-duel-panel--empty {
  border-style: dashed;
  opacity: 0.85;
}

.challenge-duel-panel-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.5rem;
}

.challenge-duel-avatar {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 1rem;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.player-field-random-btn {
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
}

.player-avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.625rem;
}

@media (min-width: 768px) {
  .player-avatar-picker-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

.player-avatar-picker-btn {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  border-radius: 9999px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  padding: 0.125rem;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.player-avatar-picker-btn:hover {
  border-color: rgba(52, 211, 153, 0.45);
  transform: scale(1.03);
}

.player-avatar-picker-btn.is-selected {
  border-color: rgb(52, 211, 153);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35), 0 4px 16px rgba(16, 185, 129, 0.25);
}

.player-avatar-picker-img {
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  object-fit: cover;
  display: block;
}

.challenge-duel-name {
  margin-top: 0.65rem;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.challenge-duel-nick {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.challenge-duel-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(3.25rem, 1fr));
  gap: 0.35rem;
  width: 100%;
  margin-top: 0.75rem;
}

.challenge-duel-stat {
  border-radius: 0.5rem;
  padding: 0.35rem 0.2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 0;
}

.challenge-duel-stat-val {
  display: block;
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.challenge-duel-stat-lbl {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0.15rem;
}

.challenge-duel-vs-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.5rem 0;
  min-width: 0;
}

@media (min-width: 768px) {
  .challenge-duel-vs-wrap {
    padding: 0.75rem 0.35rem;
    min-width: 10rem;
    max-width: 12rem;
  }
}

.challenge-duel-filter-groups {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.challenge-duel-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 100%;
}

.challenge-duel-filter-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  padding-left: 0.1rem;
}

.challenge-duel-filters {
  display: flex;
  gap: 0.2rem;
  width: 100%;
  padding: 0.22rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.challenge-duel-filter-btn {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 0.45rem;
  border: 1px solid transparent;
  background: transparent;
  padding: 0.38rem 0.35rem;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.52);
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.challenge-duel-filter-btn.is-active {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.18);
  color: #f0f9ff;
  box-shadow: 0 1px 8px rgba(56, 189, 248, 0.12);
}

.challenge-duel-filter-group--skill .challenge-duel-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.2rem;
}

.challenge-duel-filter-group--skill .challenge-duel-filter-btn {
  flex: none;
  width: 100%;
  padding: 0.34rem 0.25rem;
  font-size: 9px;
  letter-spacing: 0.04em;
}

.challenge-duel-vs {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  background: linear-gradient(180deg, #fef08a 0%, #f59e0b 45%, #ea580c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.35));
}

.challenge-duel-search {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.35);
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  color: #fff;
  outline: none;
}

.challenge-duel-search:focus {
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.challenge-duel-results {
  width: 100%;
  max-height: 14rem;
  overflow: auto;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 10, 20, 0.95);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.challenge-duel-result {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.5rem 0.65rem;
  text-align: left;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background 0.12s;
}

.challenge-duel-result:hover,
.challenge-duel-result.is-highlighted {
  background: rgba(255, 255, 255, 0.06);
}

.challenge-duel-result-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.challenge-duel-result-meta {
  min-width: 0;
  flex: 1;
}

.challenge-duel-result-name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.challenge-duel-result-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
}

.challenge-duel-skill {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.challenge-duel-skill--beginner { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }
.challenge-duel-skill--intermediate { background: rgba(56, 189, 248, 0.2); color: #7dd3fc; }
.challenge-duel-skill--advanced { background: rgba(167, 139, 250, 0.22); color: #c4b5fd; }
.challenge-duel-skill--pro { background: rgba(251, 191, 36, 0.22); color: #fde68a; }

.challenge-duel-carousel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  width: 100%;
  min-height: 0;
  padding: 0 1.75rem;
}

.challenge-duel-carousel-viewport {
  width: 100%;
  overflow: hidden;
  border-radius: 0.75rem;
}

.challenge-duel-carousel-track {
  display: flex;
  width: 100%;
  will-change: transform;
}

.challenge-duel-carousel-track.is-animating {
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.challenge-duel-carousel-slide {
  flex: 0 0 100%;
  min-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.25rem 0.5rem 0.5rem;
  opacity: 0.55;
  transform: scale(0.94);
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.challenge-duel-carousel-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.challenge-duel-carousel-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-top: -1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 12, 24, 0.85);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.challenge-duel-carousel-nav:hover:not(:disabled) {
  border-color: rgba(251, 113, 133, 0.55);
  background: rgba(244, 63, 94, 0.2);
}

.challenge-duel-carousel-nav:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.challenge-duel-carousel-nav--prev { left: 0; }
.challenge-duel-carousel-nav--next { right: 0; }

.challenge-duel-carousel-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.challenge-duel-carousel-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.challenge-duel-carousel-dot.is-active {
  background: rgba(251, 113, 133, 0.9);
  transform: scale(1.25);
}

.challenge-duel-carousel-counter {
  margin-top: 0.35rem;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.4);
}

.challenge-duel-carousel-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  margin-top: 0.65rem;
}

.challenge-duel-select-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  max-width: 14rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(251, 113, 133, 0.45);
  background: rgba(244, 63, 94, 0.12);
  color: #fecdd3;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.challenge-duel-select-btn:hover {
  border-color: rgba(251, 113, 133, 0.75);
  background: rgba(244, 63, 94, 0.22);
}

.challenge-duel-select-btn.is-selected {
  border-color: rgba(52, 211, 153, 0.65);
  background: rgba(16, 185, 129, 0.18);
  color: #a7f3d0;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.challenge-duel-clear-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.6875rem;
  text-decoration: underline;
  cursor: pointer;
}

.challenge-duel-clear-btn:hover {
  color: rgba(255, 255, 255, 0.7);
}

.challenge-duel-carousel-slide--guest {
  padding-top: 0.5rem;
}

.challenge-duel-avatar--guest-pick {
  width: 6.5rem;
  height: 6.5rem;
}

/* Flatpickr — base + dark theme linked from classic-index.html; guard Tailwind preflight */
.flatpickr-calendar.open {
  z-index: 500;
}

.flatpickr-months {
  display: flex;
  align-items: center;
}

.flatpickr-months .flatpickr-month {
  flex: 1 1 auto;
}

.pdl-datetime-field .flatpickr-input[readonly],
.pdl-datetime-wrap .flatpickr-input[readonly] {
  cursor: pointer;
}

.flatpickr-calendar.arrowTop::before,
.flatpickr-calendar.arrowTop::after {
  display: none;
}

/* Tournament bracket (brackets-viewer.js) — transparent canvas, theme-aware headings */
#tournament-bracket-root .brackets-viewer {
  --primary-background: transparent;
  --secondary-background: #f3f4f6;
  --match-background: #fff;
  --font-color: #000;
  --label-color: #374151;
  --hint-color: #6b7280;
  --border-color: #d1d5db;
  --border-hover-color: #9ca3af;
  --border-selected-color: #111827;
  --bracket-heading-color: #0f172a;
  --bracket-round-heading-bg: rgba(15, 23, 42, 0.07);
  --bracket-section-heading-color: #64748b;
  background: transparent !important;
  color: #000;
}

html.dark #tournament-bracket-root .brackets-viewer {
  --bracket-heading-color: #f4f4f5;
  --bracket-round-heading-bg: rgba(255, 255, 255, 0.1);
  --bracket-section-heading-color: rgba(255, 255, 255, 0.55);
}

#tournament-bracket-root .brackets-viewer .opponents,
#tournament-bracket-root .brackets-viewer .participant {
  background: #fff;
  color: #000;
}

#tournament-bracket-root .brackets-viewer .participant .name,
#tournament-bracket-root .brackets-viewer .participant .result {
  color: #000;
}

#tournament-bracket-root .brackets-viewer .participant .name.hint {
  color: var(--hint-color);
}

#tournament-bracket-root .brackets-viewer .opponents > span {
  background: #fff;
  color: var(--label-color);
}

#tournament-bracket-root .brackets-viewer h1 {
  color: var(--bracket-heading-color);
}

#tournament-bracket-root .brackets-viewer h3 {
  background: var(--bracket-round-heading-bg);
  color: var(--bracket-heading-color);
}

#tournament-bracket-root .brackets-viewer .bracket h2,
#tournament-bracket-root .brackets-viewer .round-robin h2 {
  color: var(--bracket-section-heading-color);
}

#tournament-bracket-root .brackets-viewer .participant.hover {
  background: var(--secondary-background) !important;
}

#tournament-bracket-root .brackets-viewer {
  --match-width: 196px;
}

#tournament-bracket-root .brackets-viewer .opponents {
  flex-direction: column;
  align-items: stretch;
}

#tournament-bracket-root .dartsos-match-meta {
  width: 100%;
  border-top: 1px solid #e5e7eb;
  margin-top: 2px;
  padding: 5px 8px 6px;
  font-size: 10px;
  line-height: 1.35;
  color: #111827;
  text-align: left;
}

#tournament-bracket-root .dartsos-match-meta__status {
  font-weight: 700;
  text-transform: capitalize;
}

#tournament-bracket-root .dartsos-match-meta__when,
#tournament-bracket-root .dartsos-match-meta__venue {
  color: #374151;
}

#tournament-bracket-root .match.bracket-match-selected .opponents {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35);
}

#tournament-bracket-root .match .opponents {
  cursor: pointer;
}

/* Tournament bracket arcade hub */
.tournament-bracket-stage {
  border-radius: 1.25rem;
  border: 1px solid rgba(16, 185, 129, 0.25);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, rgba(0, 0, 0, 0.2) 100%);
  padding: 1.25rem 1.5rem 1.5rem;
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.08);
}

.tournament-bracket-canvas {
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.15);
}

.tournament-match-drawer {
  animation: tournament-drawer-in 0.2s ease-out;
}

@keyframes tournament-drawer-in {
  from { transform: translateX(100%); opacity: 0.6; }
  to { transform: translateX(0); opacity: 1; }
}

.tournament-bracket-play-badge {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tournament-bracket-play-badge--ready,
.tournament-bracket-play-badge--pending,
.tournament-bracket-play-badge--scheduled {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.tournament-bracket-play-badge--live {
  background: rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.tournament-bracket-play-badge--completed {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

#tournament-bracket-root .match.bracket-match-yours .opponents {
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.45);
}

#tournament-bracket-root .match.bracket-match-playable .opponents {
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.12);
}
