:root {
  color-scheme: light;
  --bg: #f2f5f1;
  --ink: #142017;
  --muted: #647268;
  --panel: #ffffff;
  --panel-soft: #f7faf6;
  --line: #d8e2d8;
  --line-strong: #b8c8bc;
  --accent: #16834f;
  --accent-strong: #0d5c37;
  --accent-soft: #e0f1e8;
  --blue: #276f96;
  --orange: #dc7040;
  --gold: #d4a73d;
  --danger: #b33a2b;
  --dark: #0c1711;
  --shadow: 0 18px 42px rgba(28, 48, 34, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(130deg, rgba(22, 131, 79, 0.11), transparent 34%),
    linear-gradient(315deg, rgba(39, 111, 150, 0.1), transparent 32%),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.tournament-active {
  background: #07131f;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

.shell {
  width: min(1840px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.top-sponsors-bar {
  display: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.topbar-brand {
  min-width: 0;
}

.brand-link,
.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-link img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand-pill {
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.brand-pill img {
  width: 92px;
  height: 28px;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 20px;
}

.brand-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.top-actions,
.live-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.icon-button,
.score-cancel {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 10px 14px;
  font-weight: 800;
}

.primary-button {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 20px rgba(22, 131, 79, 0.2);
}

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

.ghost-button,
.icon-button,
.score-cancel {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}

.ghost-button:hover,
.icon-button:hover,
.score-cancel:hover {
  border-color: var(--line-strong);
  background: #fff;
}

.ghost-button input[type="file"] {
  display: none;
}

.small {
  min-height: 32px;
  padding: 7px 10px;
  font-size: 12px;
}

.full {
  width: 100%;
}

.panel,
.hero-panel,
.round-card,
.empty-state,
.share-box,
.history-row,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field.compact {
  margin-bottom: 10px;
}

label,
.field-hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.field-hint {
  font-size: 11px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdf9;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 131, 79, 0.13);
}

.segmented {
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(237, 244, 238, 0.9);
  margin-bottom: 16px;
}

.segment {
  flex: 1;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  font-weight: 900;
}

.segment.active {
  background: var(--ink);
  color: #fff;
}

.hidden {
  display: none;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  border-radius: 8px;
  background: var(--dark);
  color: #fff;
  padding: 12px 16px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.toast.error {
  background: var(--danger);
}

/* ActivitySetupView */

.shell {
  background:
    radial-gradient(circle at 50% 30%, rgba(15, 118, 184, 0.2), transparent 34%),
    radial-gradient(circle at 12% 8%, rgba(63, 198, 255, 0.12), transparent 24%),
    linear-gradient(180deg, #020a14 0%, #04111f 52%, #020812 100%);
}

.topbar {
  display: none;
}

.top-sponsors-bar {
  display: none;
}

.activity-setup-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: start;
  width: 100%;
  max-width: none;
}

.activity-setup-view .app-core {
  display: grid;
  grid-template-columns: minmax(380px, 1fr) minmax(520px, 1.6fr);
  gap: 16px;
  align-items: stretch;
  min-width: 0;
  width: 100%;
  max-width: none;
}

.activity-setup-view .setup-left-column {
  display: grid;
  gap: 0;
  min-width: 0;
  width: auto;
  max-width: none;
}

.activity-setup-view .clubflow-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 2vw, 34px);
  min-width: 0;
  margin: 0 0 14px;
  padding: 2px 4px 12px;
  border-bottom: 1px solid rgba(72, 207, 255, 0.2);
}

.activity-setup-view .clubflow-brand-banner {
  aspect-ratio: 1673 / 820;
  border: 1px solid rgba(72, 207, 255, 0.2);
  border-radius: 8px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
  display: block;
  flex: 0 1 820px;
  height: clamp(150px, 16vw, 260px);
  max-width: min(820px, 58vw);
  object-fit: cover;
  object-position: center top;
  width: min(820px, 58vw);
}

.activity-setup-view .clubflow-brand-main {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.5vw, 22px);
  min-width: 0;
}

.activity-setup-view .clubflow-brand img:not(.clubflow-brand-banner) {
  width: clamp(82px, 6.8vw, 128px);
  height: clamp(82px, 6.8vw, 128px);
  object-fit: contain;
  filter:
    drop-shadow(0 0 18px rgba(68, 198, 255, 0.34))
    drop-shadow(0 10px 22px rgba(0, 0, 0, 0.38));
}

.activity-setup-view .clubflow-brand-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.activity-setup-view .clubflow-brand-copy strong {
  color: #fff;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 0.95;
  font-weight: 950;
  letter-spacing: 0;
  text-shadow:
    0 0 22px rgba(68, 198, 255, 0.22),
    0 6px 20px rgba(0, 0, 0, 0.45);
}

.activity-setup-view .clubflow-brand-copy p {
  margin: 0;
  color: rgba(222, 242, 255, 0.86);
  font-size: clamp(17px, 1.5vw, 23px);
  line-height: 1.12;
  font-weight: 850;
}

.activity-setup-view .clubflow-brand-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
}

.activity-setup-view .clubflow-admin-pill,
.activity-setup-view .clubflow-info-pill,
.activity-setup-view .clubflow-template-pill {
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid rgba(93, 207, 255, 0.28);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 0%, rgba(44, 143, 207, 0.2), transparent 66%),
    rgba(2, 10, 20, 0.58);
  color: rgba(238, 247, 241, 0.9);
  padding: 0 16px;
  font-size: 12px;
  font-weight: 950;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 28px rgba(0, 0, 0, 0.22);
}

.activity-setup-view .clubflow-info-pill {
  border-color: rgba(124, 255, 60, 0.36);
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 255, 60, 0.18), transparent 66%),
    rgba(2, 22, 18, 0.58);
}

.activity-setup-view .clubflow-template-pill {
  border-color: rgba(93, 207, 255, 0.4);
  background:
    radial-gradient(circle at 50% 0%, rgba(93, 207, 255, 0.2), transparent 66%),
    rgba(3, 18, 36, 0.68);
}

.activity-setup-view .setup-panel,
.activity-setup-view .setup-players-panel {
  padding: 14px;
  width: auto;
  max-width: none;
  min-width: 0;
}

.activity-setup-view .settings-card,
.activity-setup-view .players-card {
  border: 1px solid rgba(72, 207, 255, 0.48);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 12%, rgba(24, 137, 207, 0.2), transparent 46%),
    linear-gradient(180deg, rgba(7, 28, 53, 0.96) 0%, rgba(8, 34, 60, 0.94) 52%, rgba(6, 23, 43, 0.96) 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 22px rgba(49, 184, 255, 0.16),
    0 18px 42px rgba(0, 0, 0, 0.28);
}

.activity-setup-view .section-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(93, 207, 255, 0.15);
  padding-bottom: 12px;
}

.activity-setup-view .section-heading h2,
.activity-setup-view .players-header h3 {
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.42);
}

.activity-setup-view .eyebrow {
  color: #7cff3c;
  letter-spacing: 0.08em;
}

.activity-setup-view .field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.activity-setup-view .field-grid .field {
  margin-bottom: 0;
}

.activity-setup-view .ranking-system-field.is-disabled,
.activity-setup-view .ranking-category-field.is-disabled,
.activity-setup-view .ranking-custom-category-field.is-disabled,
.activity-setup-view .ranking-weight-field.is-disabled {
  opacity: 0.48;
}

.activity-setup-view .ranking-system-field.is-disabled select,
.activity-setup-view .ranking-category-field.is-disabled select,
.activity-setup-view .ranking-custom-category-field.is-disabled input,
.activity-setup-view .ranking-weight-field.is-disabled select {
  cursor: not-allowed;
}

.activity-setup-view .setup-config-panel > #generateButton {
  margin-top: 14px;
  min-height: 58px;
  border: 1px solid rgba(151, 255, 84, 0.72);
  background:
    radial-gradient(circle at 50% 0%, rgba(192, 255, 108, 0.28), transparent 62%),
    linear-gradient(135deg, #7cff3c 0%, #36c727 48%, #0b8f42 100%);
  color: #02110a;
  font-size: 17px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0;
  box-shadow:
    0 0 26px rgba(124, 255, 60, 0.28),
    0 14px 34px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.activity-setup-view .player-source-card {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(93, 207, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.activity-setup-view label,
.activity-setup-view .field-hint {
  color: rgba(220, 232, 247, 0.78);
}

.activity-setup-view input,
.activity-setup-view select,
.activity-setup-view textarea {
  border-color: rgba(93, 207, 255, 0.22);
  background: rgba(2, 10, 20, 0.72);
  color: #fff;
}

.activity-setup-view input:focus,
.activity-setup-view select:focus,
.activity-setup-view textarea:focus {
  border-color: rgba(124, 255, 60, 0.72);
  box-shadow: 0 0 0 3px rgba(124, 255, 60, 0.12);
}

.activity-setup-view .segmented {
  border-color: rgba(93, 207, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.activity-setup-view .segment {
  color: rgba(238, 247, 241, 0.68);
}

.activity-setup-view .segment.active {
  background: rgba(124, 255, 60, 0.16);
  color: #7cff3c;
  box-shadow: inset 0 0 0 1px rgba(124, 255, 60, 0.34);
}

body.entry-manual .activity-setup-view .import-player-entry,
body.entry-import .activity-setup-view .manual-player-entry {
  display: none;
}

.activity-setup-view .setup-players-panel {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  gap: 10px;
}

.activity-setup-view .players-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.activity-setup-view .players-header .top-actions {
  align-items: center;
}

.activity-setup-view .version-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(93, 207, 255, 0.24);
  border-radius: 999px;
  background: rgba(2, 10, 20, 0.5);
  color: rgba(222, 242, 255, 0.76);
  padding: 0 10px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.activity-setup-view .players-header h3 {
  font-size: 22px;
}

.activity-setup-view .players-stats-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.activity-setup-view .players-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
  border: 1px solid rgba(124, 255, 60, 0.38);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 255, 60, 0.16), transparent 65%),
    rgba(5, 35, 20, 0.46);
  box-shadow: 0 0 22px rgba(124, 255, 60, 0.09);
}

.activity-setup-view .players-stat strong {
  color: #7cff3c;
  font-size: 20px;
  line-height: 1;
}

.activity-setup-view .players-stat span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.activity-setup-view .add-player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.activity-setup-view .player-count {
  color: rgba(220, 232, 247, 0.78);
  font-size: 13px;
  font-weight: 900;
}

.activity-setup-view .player-list {
  display: grid;
  gap: 8px;
  min-height: 420px;
  max-height: none;
  overflow: auto;
  padding-right: 4px;
}

.activity-setup-view .player-chip {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(93, 207, 255, 0.2);
  border-radius: 8px;
  background: rgba(2, 10, 20, 0.56);
  padding: 9px;
}

.activity-setup-view .player-chip > span:first-child {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(124, 255, 60, 0.16);
  color: #7cff3c;
  font-weight: 900;
}

.activity-setup-view .player-chip strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.activity-setup-view .player-chip.inactive {
  border-color: rgba(255, 193, 85, 0.32);
  background: rgba(29, 22, 8, 0.5);
}

.activity-setup-view .player-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(246, 250, 255, 0.9);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.activity-setup-view .player-status-badge.status-inactive {
  border-color: rgba(255, 193, 85, 0.46);
  background: rgba(255, 193, 85, 0.14);
  color: #ffd27a;
}

.activity-setup-view .player-status-badge.status-removed {
  border-color: rgba(255, 86, 112, 0.46);
  background: rgba(255, 86, 112, 0.13);
  color: #ff9aaa;
}

.activity-setup-view .player-actions-button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(93, 207, 255, 0.24);
  border-radius: 999px;
  background: rgba(7, 28, 53, 0.72);
  color: #f6faff;
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
}

.activity-setup-view .player-actions-button:hover {
  border-color: rgba(124, 255, 60, 0.62);
  box-shadow: 0 0 16px rgba(124, 255, 60, 0.2);
}

.activity-setup-view .inactive-players-panel {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 193, 85, 0.22);
  border-radius: 10px;
  background: rgba(2, 10, 20, 0.54);
}

.activity-setup-view .inactive-players-panel h4 {
  margin: 0;
  color: rgba(246, 250, 255, 0.88);
  font-size: 13px;
  text-transform: uppercase;
}

.activity-setup-view .inactive-player-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  color: rgba(246, 250, 255, 0.86);
  font-size: 13px;
}

.activity-setup-view .inactive-player-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.activity-setup-view .mini-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.activity-setup-view .mini-check input {
  width: 16px;
  height: 16px;
}

.activity-setup-view .remove-player-button {
  border: 0;
  border-radius: 6px;
  background: #f5e7e4;
  color: var(--danger);
  padding: 6px 8px;
  font-weight: 900;
}

.activity-setup-view .player-empty {
  border: 1px dashed rgba(93, 207, 255, 0.34);
  border-radius: 8px;
  padding: 14px;
  color: rgba(220, 232, 247, 0.78);
  font-weight: 800;
}

.activity-setup-view .round-tv-view {
  display: none;
  padding: 0;
}

.activity-setup-view .round-tv-view .live-toolbar {
  display: none;
}

.activity-setup-view .round-tv-view .hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(69, 180, 255, 0.25);
  border-radius: 16px;
  background:
    radial-gradient(circle at 18% 0%, rgba(58, 190, 255, 0.24), transparent 42%),
    linear-gradient(115deg, rgba(7, 28, 53, 0.94), rgba(4, 13, 27, 0.78) 58%, rgba(3, 10, 20, 0.94)),
    #071c35;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 44px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.activity-setup-view .round-tv-view .hero-panel .eyebrow {
  display: none;
}

.activity-setup-view .round-tv-view .hero-panel h2 {
  color: #fff;
  font-size: clamp(28px, 3.1vw, 56px);
  line-height: 0.98;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.42);
}

.activity-setup-view .round-tv-view .hero-panel p {
  margin-top: 4px;
  color: rgba(220, 232, 247, 0.78);
  font-size: clamp(14px, 1.35vw, 24px);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-setup-view .round-tv-view .hero-stats {
  display: grid;
  grid-template-columns: minmax(112px, auto);
  gap: 0;
}

.activity-setup-view .round-tv-view .hero-stats > div:nth-child(n + 2) {
  display: none;
}

.activity-setup-view .round-tv-view .hero-stats > div {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 8px;
  min-width: 112px;
  border: 1px solid rgba(124, 255, 60, 0.55);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 255, 60, 0.2), transparent 65%),
    rgba(5, 35, 20, 0.62);
  padding: 8px 12px;
  box-shadow: 0 0 28px rgba(124, 255, 60, 0.12);
}

.activity-setup-view .round-tv-view .hero-stats strong {
  color: #7cff3c;
  font-size: clamp(32px, 3vw, 54px);
  line-height: 0.9;
}

.activity-setup-view .round-tv-view .hero-stats span {
  color: rgba(255, 255, 255, 0.86);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.activity-setup-view .round-tv-view .live-actions .ghost-button {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #eef7f1;
}

.activity-setup-view .round-tv-view .live-actions .ghost-button,
.activity-setup-view .round-tv-view .live-actions .primary-button {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1;
  box-shadow: none;
}

.activity-setup-view .round-tv-view .setup-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  margin: 0;
}

.activity-setup-view .round-tv-view .tab {
  flex: 1;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(238, 247, 241, 0.68);
  padding: 12px;
  font-weight: 900;
}

.activity-setup-view .round-tv-view .tab.active {
  background: rgba(124, 255, 60, 0.16);
  color: #7cff3c;
  box-shadow: inset 0 0 0 1px rgba(124, 255, 60, 0.34);
}

.activity-setup-view .round-tv-view .view {
  display: none;
}

.activity-setup-view .round-tv-view .view.active {
  display: block;
}

.activity-setup-view .round-tv-view .empty-state {
  padding: 22px;
  box-shadow: none;
}

/* RoundTVView */

body.tournament-active .shell {
  --sponsor-bar-height: 88px;
  width: 100%;
  min-height: 100vh;
  padding: 10px;
  display: block;
  background:
    radial-gradient(circle at 50% 36%, rgba(15, 118, 184, 0.24), transparent 32%),
    radial-gradient(circle at 12% 8%, rgba(63, 198, 255, 0.14), transparent 26%),
    linear-gradient(180deg, #020a14 0%, #04111f 52%, #020812 100%);
}

body.tournament-active .topbar {
  display: none;
}

body.tournament-active .top-sponsors-bar {
  display: flex;
  grid-row: 1;
  align-items: center;
  justify-content: center;
  gap: 14px;
  position: static;
  height: var(--sponsor-bar-height);
  min-height: 88px;
  max-height: 88px;
  border: 1px solid rgba(102, 203, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(12, 39, 64, 0.72), rgba(4, 14, 26, 0.82)),
    rgba(3, 12, 22, 0.74);
  padding: 6px 12px;
  margin: 0;
  overflow: visible;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 34px rgba(0, 0, 0, 0.26);
}

body.tournament-active .top-sponsors-bar:empty {
  display: none;
}

body.tournament-active .top-sponsors-bar .sponsor-rail-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 160px;
  min-width: 160px;
  max-width: 160px;
  min-height: 0;
  height: 72px;
  max-height: 72px;
  border-radius: 7px;
  border: 1px solid rgba(102, 203, 255, 0.18);
  background:
    radial-gradient(circle at 50% 0%, rgba(44, 143, 207, 0.22), transparent 58%),
    linear-gradient(180deg, rgba(8, 29, 48, 0.96), rgba(2, 10, 20, 0.96));
  padding: 8px 12px;
  box-sizing: border-box;
  overflow: visible;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.tournament-active .top-sponsors-bar .sponsor-rail-item img {
  display: block;
  width: auto;
  max-width: 130px;
  height: auto;
  max-height: 52px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.34));
}

body.tournament-active .top-sponsors-bar .sponsor-logo--boost {
  transform: scale(1.15);
  transform-origin: center;
}

body.tournament-active .activity-setup-view {
  display: block;
  grid-row: 2;
  min-width: 0;
  margin: 0;
}

body.tournament-active .activity-setup-view > :not(.round-tv-view) {
  display: none;
}

body.tournament-active .round-tv-view {
  min-height: 0;
  display: grid;
  grid-template-rows: var(--sponsor-bar-height) auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 0;
  margin: 0;
  color: #eef7f1;
}

body.tournament-active .round-tv-view .live-toolbar {
  display: none;
}

body.tournament-active .round-tv-view .live-actions .ghost-button {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #eef7f1;
}

body.tournament-active .round-tv-view .live-actions .ghost-button,
body.tournament-active .round-tv-view .live-actions .primary-button {
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1;
  box-shadow: none;
}

body.tournament-active .round-tv-view .hero-panel {
  display: grid;
  grid-row: 2;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
  margin: 0;
  padding: 10px 14px;
  border-color: rgba(69, 180, 255, 0.25);
  background:
    radial-gradient(circle at 18% 0%, rgba(58, 190, 255, 0.24), transparent 42%),
    linear-gradient(115deg, rgba(7, 28, 53, 0.94), rgba(4, 13, 27, 0.78) 58%, rgba(3, 10, 20, 0.94)),
    #071c35;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 44px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

body.tournament-active .round-tv-view .hero-panel .eyebrow {
  display: none;
}

body.tournament-active .round-tv-view .hero-panel h2 {
  font-size: clamp(30px, 3.25vw, 60px);
  line-height: 0.98;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.42);
}

body.tournament-active .round-tv-view .hero-panel h2 span {
  color: #9ee7be;
}

body.tournament-active .round-tv-view .hero-panel p {
  margin-top: 4px;
  color: rgba(220, 232, 247, 0.78);
  font-size: clamp(16px, 1.45vw, 26px);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.tournament-active .round-tv-view .hero-stats {
  display: grid;
  grid-template-columns: minmax(54px, auto);
  gap: 0;
}

body.tournament-active .round-tv-view .hero-stats > div:nth-child(n + 2) {
  display: none;
}

body.tournament-active .round-tv-view .hero-stats > div {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 8px;
  min-width: 112px;
  border: 1px solid rgba(124, 255, 60, 0.55);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 255, 60, 0.2), transparent 65%),
    rgba(5, 35, 20, 0.62);
  padding: 8px 12px;
  box-shadow: 0 0 28px rgba(124, 255, 60, 0.12);
}

body.tournament-active .round-tv-view .hero-stats strong {
  color: #7cff3c;
  font-size: clamp(32px, 3vw, 54px);
  line-height: 0.9;
}

body.tournament-active .round-tv-view .hero-stats span {
  color: rgba(255, 255, 255, 0.86);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

body.tournament-active .round-tv-view .hero-copy {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

body.tournament-active .round-tv-view .setup-tabs {
  display: flex;
  grid-row: 4;
  gap: 6px;
  margin: 0;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

body.tournament-active .round-tv-view .tab {
  flex: 1;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(238, 247, 241, 0.68);
  padding: 7px 10px;
  font-weight: 900;
}

body.tournament-active .round-tv-view .tab.active {
  background: rgba(255, 255, 255, 0.92);
  color: #0d1c28;
}

body.tournament-active .round-tv-view .view {
  display: none;
  min-height: 0;
}

body.tournament-active .round-tv-view .view.active {
  display: block;
}

body.tournament-active .round-tv-view #scheduleView.view.active {
  grid-row: 3;
  min-height: 0;
  display: grid;
}

body.tournament-active .round-tv-view .round-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin: 0;
}

body.tournament-active .round-tv-view .round-actions .ghost-button {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #eef7f1;
}

body.tournament-active .round-tv-view .round-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 7px;
  min-height: 0;
  height: 100%;
  padding: 8px;
  border-color: rgba(69, 180, 255, 0.15);
  background:
    radial-gradient(circle at 50% 42%, rgba(28, 133, 205, 0.16), transparent 40%),
    rgba(2, 10, 20, 0.44);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.tournament-active .round-tv-view .round-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

body.tournament-active .round-tv-view .round-head h3 {
  font-size: clamp(18px, 1.7vw, 28px);
}

body.tournament-active .round-tv-view .round-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

body.tournament-active .round-tv-view .round-head-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

body.tournament-active .round-tv-view .badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(238, 247, 241, 0.82);
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
}

body.tournament-active .round-tv-view .matches-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
  height: 100%;
}

body.tournament-active .round-tv-view .matches-grid.courts-1 {
  grid-template-columns: minmax(0, 1fr);
}

body.tournament-active .round-tv-view .matches-grid.courts-2,
body.tournament-active .round-tv-view .matches-grid.courts-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.tournament-active .round-tv-view .matches-grid.courts-7,
body.tournament-active .round-tv-view .matches-grid.courts-8 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.tournament-active .round-tv-view .match-card {
  min-width: 0;
  min-height: 0;
  background:
    radial-gradient(circle at 50% 48%, rgba(24, 137, 207, 0.32), transparent 42%),
    linear-gradient(180deg, #071c35 0%, #0c3e6a 52%, #06172b 100%);
  border: 1px solid rgba(72, 207, 255, 0.72);
  border-radius: 16px;
  padding: 10px 14px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(72, 207, 255, 0.16),
    0 0 0 1px rgba(72, 207, 255, 0.08),
    0 0 22px rgba(49, 184, 255, 0.22),
    0 18px 42px rgba(0, 0, 0, 0.32);
}

body.tournament-active .round-tv-view .match-card-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}

body.tournament-active .round-tv-view .court-card-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  width: 100%;
  min-height: 34px;
  border-bottom: 1px solid rgba(93, 207, 255, 0.15);
  padding-bottom: 9px;
}

body.tournament-active .round-tv-view .court-number-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  flex: 0 0 auto;
  color: #7cff3c;
  text-shadow: 0 0 22px rgba(124, 255, 60, 0.36);
  font-weight: 900;
}

body.tournament-active .round-tv-view .court-number-badge span {
  font-size: clamp(15px, 1.12vw, 22px);
  letter-spacing: 0.04em;
}

body.tournament-active .round-tv-view .court-number-badge strong {
  font-size: clamp(26px, 2vw, 40px);
  line-height: 1;
}

body.tournament-active .round-tv-view .court-title-divider {
  width: 1px;
  height: 28px;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.5);
}

body.tournament-active .round-tv-view .court-sponsor-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #fff;
  font-weight: 900;
}

body.tournament-active .round-tv-view .court-custom-name {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(14px, 1.15vw, 24px);
  text-transform: uppercase;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

body.tournament-active .round-tv-view .court-sponsor-logo {
  display: block;
  max-width: min(140px, 14vw);
  max-height: 34px;
  object-fit: contain;
}

body.tournament-active .round-tv-view .match-content {
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  text-align: center;
  min-width: 0;
  min-height: 0;
}

body.tournament-active .round-tv-view .scoreboard-team {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-items: center;
  align-self: center;
  min-width: 0;
  width: 100%;
  padding-block: 5px;
}

body.tournament-active .round-tv-view .scoreboard-team span {
  max-width: 100%;
  display: block;
  overflow-wrap: anywhere;
  text-align: center;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.42);
}

body.tournament-active .round-tv-view .player-name {
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(18px, 1.32vw, 30px);
  line-height: 1.34;
  font-weight: 900;
}

body.tournament-active .round-tv-view .score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: clamp(52px, 4vw, 88px);
  line-height: 1;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.46);
}

body.tournament-active .round-tv-view .court-score {
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
  line-height: 1;
  font-weight: inherit;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}

body.tournament-active .round-tv-view .court-score.empty-score {
  color: rgba(255, 255, 255, 0.62);
}

body.tournament-active .round-tv-view .court-score.winner-score {
  color: #7cff3c;
  text-shadow:
    0 0 22px rgba(124, 255, 60, 0.22),
    0 6px 24px rgba(0, 0, 0, 0.46);
}

body.tournament-active .round-tv-view .score-separator {
  color: rgba(255, 255, 255, 0.82);
}

body.tournament-active .round-tv-view .bye-line {
  min-height: clamp(46px, 6vh, 68px);
  border: 1px solid rgba(255, 49, 88, 0.7);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 49, 88, 0.28), transparent 58%),
    linear-gradient(90deg, rgba(72, 0, 18, 0.82), rgba(104, 9, 31, 0.72), rgba(72, 0, 18, 0.82));
  color: rgba(255, 237, 242, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2vw, 28px);
  padding: 10px 14px;
  font-size: clamp(16px, 1.5vw, 28px);
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 22px rgba(255, 49, 88, 0.18);
}

body.tournament-active .round-tv-view .bye-line strong {
  color: #ff4d73;
  font-size: clamp(18px, 1.8vw, 34px);
  text-shadow: 0 0 20px rgba(255, 49, 88, 0.28);
}

body.tournament-active .round-tv-view .bye-line span {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: center;
}

body.tournament-active .round-tv-view .bye-line-empty {
  min-height: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

body.tournament-active .round-tv-view .empty-state,
body.tournament-active .round-tv-view .share-box,
body.tournament-active .round-tv-view .table-wrap,
body.tournament-active .round-tv-view .history-row {
  padding: 18px;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
}

/* Tables, history, sharing */

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.rank,
.total-cell,
.round-score-cell {
  font-weight: 900;
}

.round-score-cell.best {
  color: var(--accent-strong);
}

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

.share-box,
.history-row {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.share-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.qr-placeholder {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 900;
}

.standings-results-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.standings-results-area .table-wrap {
  border-color: rgba(93, 207, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(7, 28, 53, 0.92), rgba(1, 7, 15, 0.96)),
    #020711;
  color: #f6faff;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.standings-results-area table {
  border-collapse: separate;
  border-spacing: 0;
}

.standings-results-area th,
.standings-results-area td {
  border-bottom: 1px solid rgba(93, 207, 255, 0.14);
  color: rgba(246, 250, 255, 0.9);
}

.standings-results-area th {
  color: rgba(220, 232, 247, 0.64);
  font-weight: 950;
  letter-spacing: 0;
}

.standings-results-area tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.025);
}

.standings-results-area tbody tr:hover {
  background: rgba(93, 207, 255, 0.08);
}

.standings-results-area .rank {
  color: #7cff3c;
}

.standings-results-area .total-cell {
  color: #f6faff;
  font-size: 18px;
}

.standings-results-area .round-score-cell.best {
  color: #7cff3c;
  text-shadow: 0 0 14px rgba(124, 255, 60, 0.2);
}

.standings-results-area .player-history-link {
  color: #7cff3c;
}

body.tournament-active .round-tv-view .standings-results-area .table-wrap {
  padding: 0;
  overflow-x: auto;
  border: 1px solid rgba(93, 207, 255, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(7, 27, 48, 0.98), rgba(1, 8, 17, 0.98));
  color: #f7fbff;
  box-shadow:
    0 24px 54px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.tournament-active .round-tv-view .standings-results-area table {
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
}

body.tournament-active .round-tv-view .standings-results-area th,
body.tournament-active .round-tv-view .standings-results-area td {
  border-bottom: 1px solid rgba(93, 207, 255, 0.14);
  color: rgba(247, 251, 255, 0.88);
}

body.tournament-active .round-tv-view .standings-results-area th {
  background: rgba(2, 15, 28, 0.94);
  color: rgba(184, 211, 232, 0.92);
  font-weight: 900;
}

body.tournament-active .round-tv-view .standings-results-area tbody tr {
  background: rgba(255, 255, 255, 0.025);
}

body.tournament-active .round-tv-view .standings-results-area tbody tr:nth-child(2n) {
  background: rgba(93, 207, 255, 0.045);
}

body.tournament-active .round-tv-view .standings-results-area tbody tr:hover {
  background: rgba(98, 255, 54, 0.08);
}

body.tournament-active .round-tv-view .standings-results-area tbody tr:last-child td {
  border-bottom: 0;
}

body.tournament-active .round-tv-view .standings-results-area .rank,
body.tournament-active .round-tv-view .standings-results-area td:first-child,
body.tournament-active .round-tv-view .standings-results-area td[data-label="#"] {
  color: #62ff36;
  font-weight: 950;
}

body.tournament-active .round-tv-view .standings-results-area .player-history-link,
body.tournament-active .round-tv-view .standings-results-area td[data-label="Gracz"] {
  color: #62ff36;
  font-weight: 950;
}

body.tournament-active .round-tv-view .standings-results-area .total-cell,
body.tournament-active .round-tv-view .standings-results-area td[data-label="Suma"] {
  color: #ffffff;
  font-weight: 950;
}

body.tournament-active .round-tv-view .standings-results-area .round-score-cell.best,
body.tournament-active .round-tv-view .standings-results-area td.round-best {
  color: #62ff36;
  text-shadow: 0 0 14px rgba(98, 255, 54, 0.2);
}

.results-qr-card {
  width: 260px;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(124, 255, 60, 0.55);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 255, 60, 0.16), transparent 42%),
    rgba(2, 10, 20, 0.88);
  box-shadow: 0 0 30px rgba(124, 255, 60, 0.14);
}

.results-qr-frame {
  width: 232px;
  height: 232px;
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 8px;
  background: #fff;
}

.results-qr-frame img {
  width: 220px;
  height: 220px;
  display: block;
  object-fit: contain;
}

.results-qr-card strong {
  color: #f6faff;
  text-align: center;
  font-size: 18px;
  line-height: 1.2;
}

.results-qr-card a {
  color: #7cff3c;
  font-weight: 900;
  text-decoration: none;
}

.public-results-page {
  min-height: 100vh;
  padding: 28px;
  background:
    radial-gradient(circle at 22% 10%, rgba(93, 207, 255, 0.16), transparent 34%),
    linear-gradient(145deg, #020813, #071c35 55%, #01050c);
  color: #f6faff;
}

.public-results-card {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 20px;
  padding: 24px;
  border: 1px solid rgba(93, 207, 255, 0.28);
  border-radius: 8px;
  background: rgba(2, 10, 20, 0.78);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

.public-results-head {
  display: flex;
  align-items: center;
  gap: 18px;
}

.public-results-head img {
  width: 86px;
  height: 86px;
  object-fit: contain;
}

.public-results-head h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 72px);
  line-height: 1;
  color: #fff;
}

.public-results-head span {
  color: rgba(220, 232, 247, 0.74);
  font-size: 20px;
  font-weight: 900;
}

.public-results-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.public-results-podium article {
  padding: 18px;
  border-radius: 8px;
  border: 1px solid rgba(124, 255, 60, 0.32);
  background: linear-gradient(145deg, rgba(7, 28, 53, 0.94), rgba(1, 8, 18, 0.94));
}

.public-results-podium strong,
.public-results-podium b {
  display: block;
  color: #7cff3c;
  font-size: 28px;
}

.public-results-podium span {
  display: block;
  margin: 10px 0;
  font-size: 24px;
  font-weight: 950;
}

.public-results-podium button,
.public-results-table button {
  border: 0;
  background: transparent;
  color: #f6faff;
  padding: 0;
  font: inherit;
  font-weight: 950;
  text-align: left;
  cursor: pointer;
}

.public-results-podium button {
  display: block;
  margin: 10px 0;
  font-size: 24px;
  text-align: center;
}

.public-results-podium button:hover,
.public-results-table button:hover {
  color: #7cff3c;
}

.public-multi-stage {
  display: grid;
  gap: 10px;
}

.public-multi-stage article {
  padding: 12px;
  border: 1px solid rgba(93, 207, 255, 0.22);
  border-radius: 8px;
  background: rgba(7, 28, 53, 0.62);
}

.public-multi-stage strong,
.public-multi-stage span {
  display: block;
}

.public-multi-stage span {
  margin-top: 6px;
  color: rgba(220, 232, 247, 0.76);
  font-weight: 800;
}

.public-multi-stage-matches {
  overflow: auto;
}

.public-multi-stage-matches table {
  width: 100%;
  min-width: 820px;
  margin-top: 10px;
  border-collapse: collapse;
}

.public-multi-stage-matches th,
.public-multi-stage-matches td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(93, 207, 255, 0.14);
  text-align: left;
}

.public-results-table {
  overflow: auto;
}

.public-results-table table {
  width: 100%;
  border-collapse: collapse;
}

.public-results-table th,
.public-results-table td {
  padding: 13px 12px;
  border-bottom: 1px solid rgba(93, 207, 255, 0.16);
  text-align: left;
}

.public-results-table th {
  color: rgba(220, 232, 247, 0.7);
  text-transform: uppercase;
}

.player-history-link,
.player-name-button,
.profile-marker {
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  padding: 0;
  font-weight: 900;
}

.player-name-button {
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.player-name-button:hover,
.player-history-link:hover,
.scoreboard-player-link:hover {
  color: #7cff3c;
}

.scoreboard-player-link {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  font-weight: inherit;
  text-shadow: inherit;
  cursor: pointer;
}

.profile-marker {
  border-radius: 999px;
  background: var(--accent-soft);
  padding: 4px 7px;
  font-size: 11px;
}

.profile-marker.unlinked,
.profile-marker.unmatched-alert {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 64, 96, 0.72);
  background: linear-gradient(145deg, rgba(120, 5, 28, 0.92), rgba(255, 54, 88, 0.76));
  color: #fff;
  box-shadow: 0 0 18px rgba(255, 64, 96, 0.28);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.profile-marker.linked {
  color: #7cff3c;
  border: 1px solid rgba(124, 255, 60, 0.34);
  background: rgba(31, 255, 122, 0.12);
}

.status-pill {
  border-radius: 999px;
  background: rgba(255, 86, 112, 0.13);
  color: #ff9aaa;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 900;
}

.status-pill.status-inactive {
  background: rgba(255, 193, 85, 0.14);
  color: #ffd27a;
}

/* ImportModal */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(8, 14, 12, 0.56);
  padding: 18px;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-card {
  width: min(780px, 100%);
  max-height: min(86vh, 900px);
  overflow: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  padding: 20px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.player-manage-backdrop {
  background:
    radial-gradient(circle at 50% 10%, rgba(93, 207, 255, 0.2), transparent 42%),
    rgba(1, 7, 15, 0.78);
}

.player-manage-modal {
  width: min(560px, 100%);
  border-color: rgba(93, 207, 255, 0.34);
  background:
    radial-gradient(circle at 18% 0%, rgba(58, 190, 255, 0.18), transparent 42%),
    linear-gradient(145deg, rgba(7, 28, 53, 0.98), rgba(3, 10, 20, 0.98));
  color: #f6faff;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.player-manage-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.player-manage-head h2 {
  margin: 2px 0 10px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
}

.player-manage-actions,
.replace-player-form,
.remove-player-confirm {
  display: grid;
  gap: 12px;
}

.player-manage-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.player-manage-actions button,
.replace-player-form button,
.remove-player-confirm button {
  min-height: 48px;
}

.replace-player-form label {
  display: grid;
  gap: 7px;
  color: rgba(220, 232, 247, 0.82);
  font-weight: 900;
}

.replace-player-form input {
  width: 100%;
  border: 1px solid rgba(93, 207, 255, 0.28);
  border-radius: 8px;
  background: rgba(1, 7, 15, 0.62);
  color: #f6faff;
  padding: 12px;
  font: inherit;
  font-weight: 800;
}

.replace-player-form input[readonly] {
  color: rgba(220, 232, 247, 0.72);
}

.remove-player-confirm p {
  margin: 0;
  color: rgba(246, 250, 255, 0.88);
  font-size: 18px;
  font-weight: 900;
}

.remove-player-confirm .confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.danger-action {
  border-color: rgba(255, 86, 112, 0.42);
  color: #ff9aaa;
}

.modal-head p {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 700;
}

.help-modal-card {
  width: min(980px, 100%);
  border-color: rgba(93, 207, 255, 0.34);
  background:
    radial-gradient(circle at 14% 0%, rgba(58, 190, 255, 0.18), transparent 42%),
    radial-gradient(circle at 92% 8%, rgba(124, 255, 60, 0.12), transparent 38%),
    linear-gradient(145deg, rgba(7, 28, 53, 0.98), rgba(2, 9, 18, 0.98));
  color: #f6faff;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.help-modal-head h2 {
  margin: 2px 0 8px;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 0.96;
  font-weight: 950;
}

.help-modal-head p {
  color: rgba(220, 232, 247, 0.74);
  font-weight: 800;
}

.help-layout {
  display: grid;
  grid-template-columns: minmax(210px, 0.34fr) minmax(0, 1fr);
  gap: 14px;
  min-height: 430px;
}

.help-tabs {
  display: grid;
  align-content: start;
  gap: 8px;
}

.help-tabs button {
  min-height: 42px;
  border: 1px solid rgba(93, 207, 255, 0.2);
  border-radius: 8px;
  background: rgba(1, 7, 15, 0.52);
  color: rgba(246, 250, 255, 0.76);
  padding: 9px 11px;
  text-align: left;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.help-tabs button.active {
  border-color: rgba(124, 255, 60, 0.68);
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 255, 60, 0.2), transparent 68%),
    rgba(7, 42, 25, 0.78);
  color: #f6faff;
  box-shadow: 0 0 18px rgba(124, 255, 60, 0.14);
}

.help-content {
  min-width: 0;
}

.help-topic-card {
  display: grid;
  gap: 12px;
  min-height: 100%;
  border: 1px solid rgba(93, 207, 255, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(93, 207, 255, 0.12), transparent 58%),
    rgba(2, 10, 20, 0.55);
  padding: clamp(16px, 2vw, 24px);
}

.help-topic-card h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1;
  font-weight: 950;
}

.help-topic-card p {
  margin: 0;
  color: rgba(220, 232, 247, 0.82);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 800;
}

.help-topic-card ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.help-topic-card li {
  position: relative;
  padding-left: 20px;
  color: rgba(246, 250, 255, 0.9);
  line-height: 1.35;
  font-weight: 850;
}

.help-topic-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #7cff3c;
  box-shadow: 0 0 12px rgba(124, 255, 60, 0.5);
}

.help-topic-card pre {
  margin: 2px 0 0;
  border: 1px solid rgba(93, 207, 255, 0.2);
  border-radius: 8px;
  background: rgba(1, 7, 15, 0.62);
  color: rgba(246, 250, 255, 0.92);
  padding: 12px;
  font: 900 14px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
}

.help-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.ranking-modal-card,
.ranking-player-modal,
.ranking-profiles-modal,
.ranking-export-modal,
.activity-templates-modal,
.template-create-modal {
  width: min(1180px, 100%);
  border-color: rgba(93, 207, 255, 0.34);
  background:
    radial-gradient(circle at 18% 0%, rgba(58, 190, 255, 0.18), transparent 42%),
    radial-gradient(circle at 92% 8%, rgba(124, 255, 60, 0.1), transparent 38%),
    linear-gradient(145deg, rgba(7, 28, 53, 0.98), rgba(2, 9, 18, 0.98));
  color: #f6faff;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ranking-player-modal {
  width: min(900px, 100%);
}

.ranking-profiles-modal {
  width: min(1050px, 100%);
}

.ranking-export-modal {
  width: min(720px, 100%);
}

.activity-templates-modal {
  width: min(980px, 100%);
}

.template-create-modal {
  width: min(640px, 100%);
}

.ranking-head-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.ranking-modal-head h2 {
  margin: 2px 0 8px;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 0.96;
  font-weight: 950;
}

.ranking-modal-head p {
  color: rgba(220, 232, 247, 0.74);
  font-weight: 800;
}

.ranking-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.ranking-filters label {
  display: grid;
  gap: 6px;
  color: rgba(220, 232, 247, 0.76);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ranking-filters select {
  min-height: 42px;
  border: 1px solid rgba(93, 207, 255, 0.28);
  border-radius: 8px;
  background: rgba(1, 7, 15, 0.62);
  color: #f6faff;
  padding: 9px 10px;
  font: inherit;
  font-weight: 900;
}

.ranking-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.ranking-summary > div {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(93, 207, 255, 0.2);
  border-radius: 8px;
  background: rgba(2, 10, 20, 0.48);
  padding: 12px;
}

.ranking-summary strong {
  color: #7cff3c;
  font-size: 30px;
  line-height: 1;
  font-weight: 950;
}

.ranking-summary span {
  color: rgba(220, 232, 247, 0.72);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ranking-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(93, 207, 255, 0.22);
  border-radius: 10px;
  background: rgba(2, 10, 20, 0.42);
}

.ranking-table {
  min-width: 680px;
  color: #f6faff;
}

.ranking-table th,
.ranking-table td {
  border-bottom-color: rgba(93, 207, 255, 0.16);
  padding: 12px;
}

.ranking-table th {
  color: rgba(220, 232, 247, 0.68);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.ranking-table td {
  color: rgba(246, 250, 255, 0.9);
  font-weight: 900;
}

.ranking-table td:first-child {
  color: #7cff3c;
  font-weight: 950;
}

.ranking-table button {
  border: 0;
  background: transparent;
  color: #f6faff;
  padding: 0;
  text-align: left;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.ranking-table button:hover {
  color: #7cff3c;
}

.multi-stage-settings {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(93, 207, 255, 0.24);
  border-radius: 8px;
  background: rgba(7, 28, 53, 0.66);
}

.multi-stage-settings textarea {
  min-height: 92px;
  resize: vertical;
}

.multi-stage-overview {
  margin-bottom: 14px;
}

.multi-stage-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.multi-stage-card {
  padding: 12px;
  border: 1px solid rgba(93, 207, 255, 0.24);
  border-radius: 8px;
  background: rgba(2, 10, 20, 0.58);
}

.multi-stage-card.active {
  border-color: rgba(124, 255, 60, 0.72);
  box-shadow: inset 0 0 0 1px rgba(124, 255, 60, 0.16);
}

.multi-stage-card strong {
  display: block;
  margin-bottom: 8px;
  color: #f6faff;
}

.multi-stage-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.multi-stage-card button,
.activity-player-stage-path span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(124, 255, 60, 0.13);
  color: #7cff3c;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.multi-stage-card button:hover {
  background: rgba(124, 255, 60, 0.24);
}

.multi-stage-group-tables {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.multi-stage-group-table {
  min-width: 0;
  border: 1px solid rgba(93, 207, 255, 0.24);
  border-radius: 8px;
  background: rgba(2, 10, 20, 0.5);
  overflow: hidden;
}

.multi-stage-group-table header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(93, 207, 255, 0.18);
}

.multi-stage-group-table header strong {
  color: #7cff3c;
  font-size: 1rem;
  font-weight: 950;
}

.multi-stage-group-table header span {
  color: rgba(220, 232, 247, 0.72);
  font-size: 0.78rem;
  font-weight: 850;
}

.compact-group-table {
  border-radius: 0;
  background: #071c35;
  color: #f6faff;
}

.compact-group-table table {
  min-width: 620px;
  background: #071c35;
}

.compact-group-table th,
.compact-group-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(93, 207, 255, 0.18);
  font-size: 0.86rem;
}

.compact-group-table th {
  color: rgba(191, 219, 254, 0.9);
}

.compact-group-table td {
  color: #f6faff;
}

.compact-group-table .rank,
.compact-group-table .round-score-cell.best,
.compact-group-table .player-history-link {
  color: #7cff3c;
}

@media (max-width: 1100px) {
  .multi-stage-group-tables {
    grid-template-columns: 1fr;
  }
}

.activity-player-stage-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 16px;
  padding: 12px;
  border: 1px solid rgba(93, 207, 255, 0.22);
  border-radius: 8px;
  background: rgba(2, 10, 20, 0.58);
}

.activity-player-stage-path b {
  color: rgba(220, 232, 247, 0.7);
}

.empty-court-content {
  min-height: 210px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  color: rgba(220, 232, 247, 0.72);
}

.empty-court-content strong {
  color: #f6faff;
  font-size: 1rem;
}

.empty-court-content span {
  max-width: 260px;
  font-size: 0.86rem;
  font-weight: 800;
}

.season-league-list {
  gap: 14px;
}

.season-league-card {
  border: 1px solid rgba(93, 207, 255, 0.22);
  border-radius: 12px;
  background: rgba(2, 10, 20, 0.42);
  display: grid;
  gap: 14px;
  padding: 14px;
}

.season-league-mode {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.season-league-mode label,
.season-league-activity-list label {
  align-items: center;
  border: 1px solid rgba(93, 207, 255, 0.18);
  border-radius: 8px;
  background: rgba(1, 7, 15, 0.42);
  display: flex;
  gap: 9px;
  padding: 9px 10px;
}

.season-league-activity-list {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
}

.season-league-activity-list.muted {
  opacity: 0.62;
}

.season-league-activity-list span {
  color: #f6faff;
  font-weight: 950;
}

.season-league-activity-list small {
  color: rgba(220, 232, 247, 0.62);
  font-weight: 800;
  margin-left: auto;
}

.season-league-table {
  min-width: 980px;
}

.ranking-table tr.counted-result td:last-child {
  color: #7cff3c;
}

.ranking-table tr.rejected-result {
  opacity: 0.68;
}

.ranking-table tr.rejected-result td:last-child {
  color: rgba(255, 214, 117, 0.95);
}

.ranking-context-link,
.global-ranking-metric {
  width: 100%;
  border: 1px solid rgba(93, 207, 255, 0.22);
  border-radius: 10px;
  background: rgba(1, 7, 15, 0.42);
  color: #f6faff;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.ranking-context-link.compact {
  border: 0;
  background: transparent;
  padding: 0;
}

.ranking-context-link strong,
.global-ranking-metric strong {
  display: block;
  color: #7cff3c;
  font-size: 18px;
  line-height: 1.05;
  font-weight: 950;
}

.ranking-context-link span,
.global-ranking-metric span {
  display: block;
  color: rgba(220, 232, 247, 0.68);
  font-size: 11px;
  font-weight: 900;
}

.ranking-context-link:hover,
.ranking-context-link:focus-visible,
.global-ranking-metric:hover,
.global-ranking-metric:focus-visible {
  border-color: rgba(124, 255, 60, 0.54);
  outline: none;
  color: #7cff3c;
}

.player-ranking-list {
  display: grid;
  gap: 10px;
}

.player-ranking-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(93, 207, 255, 0.2);
  border-radius: 12px;
  background: rgba(2, 10, 20, 0.46);
  padding: 12px;
}

.player-ranking-card strong,
.player-ranking-card span {
  display: block;
}

.player-ranking-card strong {
  color: #f6faff;
  font-size: 18px;
  font-weight: 950;
}

.player-ranking-card span {
  color: rgba(220, 232, 247, 0.7);
  font-weight: 850;
}

.ranking-position-change {
  color: rgba(220, 232, 247, 0.72);
  font-weight: 950;
  white-space: nowrap;
}

.ranking-position-change.up {
  color: #7cff3c;
}

.ranking-position-change.down {
  color: #ff7d8f;
}

.ranking-empty {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(93, 207, 255, 0.2);
  border-radius: 10px;
  background: rgba(2, 10, 20, 0.42);
  padding: 28px;
  text-align: center;
}

.ranking-empty h3,
.ranking-empty p {
  margin: 0;
}

.ranking-empty h3 {
  color: #f6faff;
  font-size: 28px;
}

.ranking-empty p {
  color: rgba(220, 232, 247, 0.72);
  font-weight: 800;
}

.ranking-profile-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

.ranking-profile-list {
  display: grid;
  gap: 12px;
}

.ranking-profile-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(93, 207, 255, 0.22);
  border-radius: 10px;
  background: rgba(2, 10, 20, 0.48);
  padding: 12px;
}

.ranking-profile-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.ranking-profile-card-head strong {
  color: #f6faff;
  font-size: 20px;
  font-weight: 950;
}

.ranking-profile-card-head > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

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

.ranking-profile-card label {
  display: grid;
  gap: 6px;
  color: rgba(220, 232, 247, 0.76);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ranking-profile-card input,
.ranking-profile-card select,
.ranking-profile-card textarea {
  width: 100%;
  border: 1px solid rgba(93, 207, 255, 0.28);
  border-radius: 8px;
  background: rgba(1, 7, 15, 0.62);
  color: #f6faff;
  padding: 9px 10px;
  font: inherit;
  font-weight: 850;
  text-transform: none;
}

.ranking-profile-card select[multiple] {
  min-height: 128px;
}

.ranking-profile-card small {
  color: rgba(220, 232, 247, 0.58);
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
}

.ranking-export-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.ranking-export-grid label {
  display: grid;
  gap: 6px;
  color: rgba(220, 232, 247, 0.76);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ranking-export-grid select,
.ranking-export-grid input {
  min-height: 42px;
  border: 1px solid rgba(93, 207, 255, 0.28);
  border-radius: 8px;
  background: rgba(1, 7, 15, 0.62);
  color: #f6faff;
  padding: 9px 10px;
  font: inherit;
  font-weight: 900;
}

.ranking-export-sponsor-field {
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  border: 1px solid rgba(93, 207, 255, 0.18);
  border-radius: 10px;
  background: rgba(2, 10, 20, 0.42);
  padding: 12px;
}

.ranking-export-sponsor-field.hidden {
  display: none;
}

.ranking-export-sponsor-field label {
  min-width: 0;
}

.ranking-export-logo-file input {
  padding: 8px;
}

.ranking-export-sponsor-preview {
  width: min(240px, 100%);
  min-height: 74px;
  border: 1px solid rgba(124, 255, 60, 0.22);
  border-radius: 10px;
  background: rgba(1, 7, 15, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.ranking-export-sponsor-preview.hidden {
  display: none;
}

.ranking-export-sponsor-preview img {
  display: block;
  width: 100%;
  max-width: 190px;
  height: 54px;
  object-fit: contain;
}

.ranking-export-actions {
  display: flex;
  justify-content: flex-end;
}

.activity-summary-export-action {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.activity-summary-export-action .primary-button {
  box-shadow: 0 0 22px rgba(124, 255, 60, 0.18);
}

.correction-notice {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(124, 255, 60, 0.28);
  border-radius: 8px;
  background: rgba(7, 42, 25, 0.42);
  color: #f6faff;
}

.correction-notice span {
  color: rgba(220, 232, 247, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.correction-score-list,
.correction-log-list {
  display: grid;
  gap: 8px;
}

.prize-draw-modal {
  width: min(1120px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
}

.prize-draw-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(260px, 340px);
  gap: 18px;
  align-items: start;
}

.prize-wheel-panel,
.prize-draw-side {
  border: 1px solid rgba(93, 207, 255, 0.18);
  border-radius: 12px;
  background: rgba(2, 10, 20, 0.42);
  padding: 16px;
}

.prize-wheel-shell {
  position: relative;
  display: grid;
  place-items: center;
  width: min(560px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
}

#prizeWheelCanvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.34));
  transition: none;
}

.prize-wheel-logo {
  position: absolute;
  width: 92px;
  height: 92px;
  border: 4px solid rgba(246, 250, 255, 0.9);
  border-radius: 50%;
  background: #f6faff;
  object-fit: contain;
  padding: 10px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
}

.prize-wheel-pointer {
  position: absolute;
  top: -2px;
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 30px solid #7cff3c;
  filter: drop-shadow(0 4px 10px rgba(124, 255, 60, 0.32));
}

.prize-draw-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
}

.prize-logo-upload {
  cursor: pointer;
}

.prize-logo-upload input {
  display: none;
}

.prize-winner-box {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  border: 1px solid rgba(124, 255, 60, 0.24);
  border-radius: 10px;
  background: rgba(7, 42, 25, 0.34);
  padding: 12px;
  text-align: center;
}

.prize-winner-box span,
.prize-draw-side em {
  color: rgba(220, 232, 247, 0.72);
  font-size: 13px;
  font-style: normal;
  font-weight: 850;
}

.prize-winner-box strong {
  color: #7cff3c;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1;
}

.prize-draw-side {
  display: grid;
  gap: 16px;
}

.prize-draw-side h3 {
  margin: 0 0 10px;
  color: #f6faff;
  font-size: 16px;
}

.prize-participant-list,
.prize-winner-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prize-participant-list span,
.prize-winner-list span {
  border: 1px solid rgba(93, 207, 255, 0.2);
  border-radius: 999px;
  background: rgba(8, 25, 42, 0.7);
  color: rgba(246, 250, 255, 0.9);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.prize-confetti-layer {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: visible;
}

.prize-confetti-layer span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(135deg, #7cff3c, #5dcfff);
  animation: prize-confetti 1.15s ease-out forwards;
}

@keyframes prize-confetti {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), -260px) rotate(var(--r)) scale(0.7);
  }
}

@media (max-width: 820px) {
  .prize-draw-layout {
    grid-template-columns: 1fr;
  }

  .prize-wheel-logo {
    width: 74px;
    height: 74px;
  }
}

.correction-score-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(220px, 1.6fr) 72px 72px;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(93, 207, 255, 0.18);
  border-radius: 8px;
  background: rgba(1, 7, 15, 0.42);
}

.correction-score-row span,
.correction-log-entry span,
.correction-log-entry small {
  color: rgba(220, 232, 247, 0.68);
  font-size: 12px;
  font-weight: 800;
}

.correction-score-row input {
  min-height: 38px;
  border: 1px solid rgba(93, 207, 255, 0.28);
  border-radius: 8px;
  background: rgba(1, 7, 15, 0.72);
  color: #f6faff;
  padding: 8px;
  font: inherit;
  font-weight: 900;
}

.correction-log-entry {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid rgba(93, 207, 255, 0.18);
  border-radius: 8px;
  background: rgba(1, 7, 15, 0.38);
}

.start-history-modal {
  width: min(920px, 100%);
}

.start-history-list {
  display: grid;
  gap: 10px;
  max-height: min(62vh, 620px);
  overflow: auto;
}

.start-history-list .history-row {
  border-color: rgba(93, 207, 255, 0.24);
  background:
    radial-gradient(circle at 12% 0%, rgba(93, 207, 255, 0.12), transparent 48%),
    rgba(2, 10, 20, 0.54);
}

.template-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.template-list {
  display: grid;
  gap: 12px;
}

.template-card,
.template-empty {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(93, 207, 255, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(93, 207, 255, 0.08), transparent 60%),
    rgba(7, 28, 53, 0.72);
  padding: 14px;
}

.template-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.template-card-head strong {
  display: block;
  color: #f6faff;
  font-size: 20px;
}

.template-card-head span,
.template-card-head small,
.template-settings-summary span,
.template-empty p {
  color: rgba(229, 238, 247, 0.72);
  font-weight: 850;
}

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

.template-edit-grid {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.template-edit-grid label,
.template-settings-grid label,
.template-create-form label {
  display: grid;
  gap: 6px;
  color: rgba(220, 232, 247, 0.74);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.template-edit-grid input,
.template-settings-grid input,
.template-settings-grid select,
.template-create-form input {
  border: 1px solid rgba(93, 207, 255, 0.22);
  border-radius: 8px;
  background: rgba(2, 10, 20, 0.58);
  color: #f6faff;
  padding: 10px 12px;
  font-weight: 850;
}

.template-settings-summary,
.template-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.template-settings-summary span {
  border: 1px solid rgba(124, 255, 60, 0.22);
  border-radius: 999px;
  background: rgba(2, 22, 18, 0.44);
  padding: 5px 10px;
}

.template-actions {
  justify-content: flex-end;
}

.import-modal {
  background:
    radial-gradient(circle at 50% 10%, rgba(93, 207, 255, 0.2), transparent 40%),
    rgba(1, 7, 15, 0.82);
}

.import-modal .import-card {
  width: min(1180px, 100%);
  border: 1px solid rgba(93, 207, 255, 0.34);
  border-radius: 16px;
  background:
    radial-gradient(circle at 16% 0%, rgba(58, 190, 255, 0.16), transparent 42%),
    linear-gradient(145deg, rgba(7, 28, 53, 0.98), rgba(3, 10, 20, 0.98));
  color: #f6faff;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.import-modal .modal-head h2 {
  margin: 2px 0 4px;
  color: #f6faff;
  font-size: clamp(32px, 3vw, 48px);
  letter-spacing: 0;
}

.import-modal .modal-head p {
  color: rgba(220, 232, 247, 0.76);
}

.import-modal .modal-head .eyebrow {
  margin: 0;
  color: #7cff3c;
}

.import-modal .import-panel {
  display: grid;
  gap: 12px;
}

.import-source-card,
.import-footer {
  grid-column: 1 / -1;
}

.import-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.import-component {
  display: grid;
  gap: 10px;
}

.import-source-card,
.import-modal .club-results,
.import-modal .remote-activities,
.import-modal .activity-lists,
.import-modal .selected-club,
.import-footer {
  border: 1px solid rgba(93, 207, 255, 0.22);
  border-radius: 10px;
  background: rgba(2, 10, 20, 0.54);
  padding: 12px;
}

.import-source-card {
  display: grid;
  gap: 10px;
}

.import-modal .club-results,
.import-modal .remote-activities,
.import-modal .activity-lists,
.import-modal .selected-club {
  display: grid;
  gap: 8px;
}

.import-source-card > label {
  color: #7cff3c;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.import-source-tabs .segment {
  border-color: rgba(93, 207, 255, 0.22);
  background: rgba(7, 28, 53, 0.72);
  color: rgba(246, 250, 255, 0.82);
}

.import-source-tabs .segment.active {
  border-color: rgba(124, 255, 60, 0.66);
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 255, 60, 0.22), transparent 68%),
    rgba(7, 42, 25, 0.78);
  color: #f6faff;
  box-shadow: 0 0 18px rgba(124, 255, 60, 0.16);
}

.import-modal label,
.import-modal .field span {
  color: rgba(220, 232, 247, 0.82);
}

.import-modal input,
.import-modal textarea,
.import-modal select {
  border: 1px solid rgba(93, 207, 255, 0.28);
  background: rgba(1, 7, 15, 0.64);
  color: #f6faff;
  border-radius: 8px;
}

.import-modal input::placeholder,
.import-modal textarea::placeholder {
  color: rgba(220, 232, 247, 0.5);
}

.import-modal input:focus,
.import-modal textarea:focus,
.import-modal select:focus {
  border-color: rgba(124, 255, 60, 0.72);
  box-shadow: 0 0 0 3px rgba(124, 255, 60, 0.12);
}

.import-modal .ghost-button {
  border-color: rgba(93, 207, 255, 0.28);
  background: rgba(7, 28, 53, 0.72);
  color: #f6faff;
}

.import-modal .primary-button {
  border-color: rgba(124, 255, 60, 0.48);
  background:
    radial-gradient(circle at 50% 0%, rgba(192, 255, 108, 0.28), transparent 62%),
    linear-gradient(135deg, #7cff3c 0%, #36c727 48%, #0b8f42 100%);
  color: #02110a;
  box-shadow: 0 0 22px rgba(124, 255, 60, 0.2);
}

.import-modal .club-result,
.import-modal .activity-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-color: rgba(93, 207, 255, 0.22);
  border-style: solid;
  border-width: 1px;
  border-radius: 8px;
  background: rgba(7, 28, 53, 0.54);
  color: #f6faff;
  padding: 10px;
}

.import-modal .club-result span,
.import-modal .activity-list-row span,
.import-modal .activity-list-row small {
  color: rgba(220, 232, 247, 0.68);
}

.import-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.45fr);
  gap: 12px;
  align-items: center;
}

.saved-import-footer {
  grid-template-columns: minmax(0, 1fr);
}

.import-footer span {
  color: rgba(220, 232, 247, 0.82);
  font-size: 18px;
  font-weight: 900;
}

.import-footer .primary-button {
  min-height: 56px;
  justify-content: center;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .import-workspace {
    grid-template-columns: 1fr;
  }

  .import-footer {
    grid-template-columns: 1fr;
  }
}

/* Tournament confirmation modal */

.tournament-confirm-modal {
  background:
    radial-gradient(circle at 50% 20%, rgba(42, 184, 255, 0.18), transparent 34%),
    rgba(2, 8, 16, 0.82);
}

.tournament-confirm-card {
  width: min(720px, 100%);
  border: 1px solid rgba(72, 207, 255, 0.46);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 142, 207, 0.22), transparent 48%),
    linear-gradient(180deg, rgba(7, 28, 53, 0.98) 0%, rgba(5, 18, 34, 0.98) 100%);
  color: #eef7f1;
  box-shadow:
    0 0 34px rgba(49, 184, 255, 0.22),
    0 28px 86px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 22px;
}

.tournament-confirm-content {
  display: grid;
  gap: 16px;
}

.confirm-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 950;
}

.confirm-brand img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(68, 198, 255, 0.4));
}

.confirm-brand span {
  font-size: 24px;
  letter-spacing: 0;
}

.confirm-head {
  border-bottom: 1px solid rgba(93, 207, 255, 0.18);
  padding-bottom: 10px;
}

.confirm-head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(30px, 3.2vw, 42px);
  line-height: 1;
}

.confirm-format {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(124, 255, 60, 0.46);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 255, 60, 0.16), transparent 66%),
    rgba(5, 35, 20, 0.52);
  padding: 16px;
  box-shadow: 0 0 26px rgba(124, 255, 60, 0.16);
}

.confirm-format span {
  color: rgba(222, 242, 255, 0.78);
  font-size: 12px;
  font-weight: 900;
}

.confirm-format strong {
  color: #7cff3c;
  font-size: clamp(38px, 4.2vw, 56px);
  line-height: 0.95;
  font-weight: 950;
}

.confirm-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.confirm-summary div {
  min-width: 0;
  border: 1px solid rgba(93, 207, 255, 0.18);
  border-radius: 8px;
  background: rgba(2, 10, 20, 0.52);
  padding: 10px;
}

.confirm-summary dt {
  color: rgba(222, 242, 255, 0.68);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.confirm-summary dd {
  margin: 4px 0 0;
  color: #fff;
  font-size: 15px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.confirm-question,
.confirm-check {
  border: 1px solid rgba(124, 255, 60, 0.32);
  border-radius: 10px;
  background: rgba(124, 255, 60, 0.08);
  padding: 12px;
}

.confirm-question {
  display: grid;
  gap: 4px;
}

.confirm-question strong {
  color: #fff;
  font-size: 18px;
}

.confirm-question span {
  color: rgba(222, 242, 255, 0.78);
  font-weight: 800;
}

.confirm-check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 900;
}

.confirm-check input {
  width: 22px;
  height: 22px;
  accent-color: #7cff3c;
}

.confirm-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 10px;
}

.confirm-actions .ghost-button,
.confirm-actions .primary-button {
  min-height: 54px;
  justify-content: center;
  font-size: 15px;
}

.confirm-start {
  border-color: rgba(151, 255, 84, 0.72);
  background:
    radial-gradient(circle at 50% 0%, rgba(192, 255, 108, 0.28), transparent 62%),
    linear-gradient(135deg, #7cff3c 0%, #36c727 48%, #0b8f42 100%);
  color: #02110a;
  box-shadow: 0 0 24px rgba(124, 255, 60, 0.24);
}

.confirm-start:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  filter: grayscale(0.7);
  box-shadow: none;
}

/* Admin and secondary modals */

.admin-modal-card {
  width: min(1180px, 100%);
  border-color: rgba(93, 207, 255, 0.36);
  background:
    radial-gradient(circle at 16% 0%, rgba(58, 190, 255, 0.18), transparent 42%),
    radial-gradient(circle at 92% 8%, rgba(124, 255, 60, 0.1), transparent 38%),
    linear-gradient(145deg, rgba(7, 28, 53, 0.99), rgba(2, 9, 18, 0.99));
  color: #f6faff;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.admin-modal-card .modal-head h2 {
  color: #f6faff;
  font-size: clamp(32px, 3.4vw, 52px);
  line-height: 0.98;
  font-weight: 950;
}

.admin-modal-card .modal-head p {
  color: rgba(220, 232, 247, 0.78);
  font-weight: 800;
}

.admin-modal-card .ghost-button,
.admin-modal-card .score-cancel {
  border-color: rgba(93, 207, 255, 0.32);
  background:
    radial-gradient(circle at 50% 0%, rgba(93, 207, 255, 0.14), transparent 66%),
    rgba(2, 10, 20, 0.66);
  color: rgba(246, 250, 255, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 26px rgba(0, 0, 0, 0.2);
}

.admin-modal-card .ghost-button:hover {
  border-color: rgba(124, 255, 60, 0.48);
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 255, 60, 0.16), transparent 66%),
    rgba(5, 35, 20, 0.62);
}

.admin-modal-card .primary-button {
  border-color: rgba(151, 255, 84, 0.72);
  background:
    radial-gradient(circle at 50% 0%, rgba(192, 255, 108, 0.28), transparent 62%),
    linear-gradient(135deg, #7cff3c 0%, #36c727 48%, #0b8f42 100%);
  color: #02110a;
  box-shadow: 0 0 24px rgba(124, 255, 60, 0.22);
}

.admin-modal-card .primary-button:hover {
  filter: brightness(1.07);
}

.login-panel {
  display: grid;
  gap: 14px;
}

.login-panel label {
  display: grid;
  gap: 6px;
}

.public-import-link-box {
  border: 1px solid rgba(93, 207, 255, 0.2);
  border-radius: 10px;
  background: rgba(2, 10, 20, 0.42);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.public-import-link-box > span {
  color: #7cff3c;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.public-import-link-box > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.public-import-link-box small {
  color: rgba(220, 232, 247, 0.68);
  font-weight: 800;
}

.public-import-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 0%, rgba(58, 190, 255, 0.2), transparent 42%),
    radial-gradient(circle at 86% 18%, rgba(124, 255, 60, 0.12), transparent 36%),
    linear-gradient(145deg, #071c35, #020912 72%);
  color: #f6faff;
}

.public-import-card {
  width: min(1180px, 100%);
  border: 1px solid rgba(93, 207, 255, 0.32);
  border-radius: 16px;
  background: rgba(2, 10, 20, 0.78);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
  padding: clamp(24px, 5vw, 44px);
  display: grid;
  gap: 16px;
}

.public-import-card img {
  width: min(220px, 58vw);
  max-height: 92px;
  object-fit: contain;
}

.public-import-card h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 8vw, 58px);
  line-height: 0.98;
  font-weight: 950;
}

.public-import-card p {
  margin: 0;
  color: rgba(220, 232, 247, 0.82);
  font-weight: 850;
}

.public-import-card .primary-button {
  justify-content: center;
  min-height: 58px;
  font-size: 16px;
}

.public-import-message {
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 900;
}

.public-import-message.success {
  border: 1px solid rgba(124, 255, 60, 0.36);
  background: rgba(25, 141, 75, 0.24);
  color: #dfffd5;
}

.public-import-message.error {
  border: 1px solid rgba(255, 119, 119, 0.32);
  background: rgba(129, 22, 34, 0.24);
  color: #ffe2e2;
}

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

.public-mode-card {
  border: 1px solid rgba(93, 207, 255, 0.26);
  border-radius: 14px;
  background: rgba(7, 28, 53, 0.58);
  color: #f6faff;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  min-height: 128px;
  padding: 18px;
  text-align: left;
}

.public-mode-card span {
  color: #fff;
  font-size: 22px;
  font-weight: 950;
}

.public-mode-card small {
  color: rgba(220, 232, 247, 0.7);
  font-weight: 850;
  line-height: 1.35;
}

.public-mode-card.is-active {
  border-color: rgba(124, 255, 60, 0.62);
  background: rgba(25, 141, 75, 0.24);
  box-shadow: inset 0 0 0 1px rgba(124, 255, 60, 0.18);
}

.public-mode-card .primary-button {
  justify-self: start;
  min-height: 42px;
}

.public-mode-card:has(.primary-button:disabled) {
  opacity: 0.56;
}

.public-import-card input,
.public-import-card select,
.public-import-card textarea {
  border: 1px solid rgba(93, 207, 255, 0.28);
  background: rgba(1, 7, 15, 0.74);
  color: #f6faff;
}

.public-import-card input::placeholder,
.public-import-card textarea::placeholder {
  color: rgba(220, 232, 247, 0.48);
}

.public-import-table-card,
.public-imported-activity,
.public-manual-card {
  border: 1px solid rgba(93, 207, 255, 0.24);
  border-radius: 14px;
  background: rgba(1, 7, 15, 0.52);
  overflow: hidden;
}

.public-import-table-head,
.public-imported-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(93, 207, 255, 0.18);
}

.public-import-table-head strong,
.public-imported-head h2 {
  color: #fff;
  font-weight: 950;
}

.public-import-table-head span {
  color: rgba(220, 232, 247, 0.68);
  font-weight: 850;
}

.public-manual-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 16px 0;
}

.public-manual-grid label,
.public-manual-players {
  display: grid;
  gap: 6px;
  color: rgba(220, 232, 247, 0.72);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.public-manual-grid input,
.public-manual-grid select,
.public-manual-players textarea {
  min-height: 44px;
}

.public-manual-players {
  padding: 14px 16px;
}

.public-manual-card > .primary-button {
  margin: 0 16px 16px;
}

.public-imported-head h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1;
}

.public-imported-head span {
  display: block;
  margin-top: 6px;
  color: rgba(220, 232, 247, 0.72);
  font-weight: 850;
}

.public-imported-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.public-activity-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 16px 0;
}

.public-activity-action-card {
  appearance: none;
  border: 1px solid rgba(93, 207, 255, 0.22);
  border-radius: 12px;
  background: rgba(7, 28, 53, 0.52);
  color: #f6faff;
  display: grid;
  gap: 6px;
  min-height: 110px;
  padding: 14px;
  text-align: left;
}

.public-activity-action-card span {
  color: #fff;
  font-weight: 950;
}

.public-activity-action-card small {
  color: rgba(220, 232, 247, 0.66);
  font-weight: 850;
  line-height: 1.32;
}

.public-activity-action-card.is-prize {
  border-color: rgba(124, 255, 60, 0.4);
  background: rgba(25, 141, 75, 0.2);
  cursor: pointer;
}

.public-import-table {
  overflow-x: auto;
}

.public-import-table table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.public-import-table th,
.public-import-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(93, 207, 255, 0.14);
  color: #f6faff;
  font-weight: 850;
  text-align: left;
  vertical-align: middle;
}

.public-import-table th {
  color: rgba(220, 232, 247, 0.68);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.public-import-table td:last-child {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.public-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(93, 207, 255, 0.2);
  border-radius: 999px;
  background: rgba(7, 28, 53, 0.72);
  color: rgba(220, 232, 247, 0.84);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 950;
}

.public-status-pill.is-imported {
  border-color: rgba(124, 255, 60, 0.36);
  background: rgba(25, 141, 75, 0.24);
  color: #dfffd5;
}

.public-activity-settings,
.public-participants-panel,
.public-activity-results-panel,
.public-start-panel {
  margin: 14px 16px;
  border: 1px solid rgba(93, 207, 255, 0.2);
  border-radius: 12px;
  background: rgba(7, 28, 53, 0.42);
  padding: 14px;
}

.public-activity-settings summary {
  cursor: pointer;
  color: #66ff38;
  font-size: 15px;
  font-weight: 950;
}

.public-activity-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.public-activity-settings-grid label {
  display: grid;
  gap: 6px;
  color: rgba(220, 232, 247, 0.72);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.public-activity-settings-grid input,
.public-activity-settings-grid select {
  min-height: 44px;
}

.public-ranking-note {
  border: 1px solid rgba(124, 255, 60, 0.24);
  border-radius: 10px;
  background: rgba(25, 141, 75, 0.16);
  color: rgba(220, 232, 247, 0.74);
  display: grid;
  gap: 5px;
  padding: 10px 12px;
}

.public-ranking-note strong {
  color: #66ff38;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.public-ranking-note span {
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.public-participants-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.public-participants-head strong {
  color: #fff;
}

.public-participants-head span {
  color: rgba(220, 232, 247, 0.62);
  font-size: 12px;
  font-weight: 850;
}

.public-participant-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 10px;
}

.public-participant-list {
  display: grid;
  gap: 8px;
}

.public-participant-row {
  display: grid;
  grid-template-columns: 34px minmax(180px, 1fr) 132px auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(93, 207, 255, 0.14);
  border-radius: 10px;
  background: rgba(1, 7, 15, 0.48);
  color: #f6faff;
  padding: 10px 12px;
}

.public-participant-row span {
  color: #66ff38;
  font-weight: 950;
}

.public-participant-add input,
.public-participant-row input,
.public-participant-row select {
  min-height: 40px;
  border-radius: 8px;
  font-weight: 850;
}

.public-participant-row small {
  color: rgba(220, 232, 247, 0.68);
  font-weight: 850;
}

.public-activity-results-panel strong {
  display: block;
  color: #fff;
  margin-bottom: 6px;
}

.public-activity-results-panel p {
  margin: 0;
  color: rgba(220, 232, 247, 0.68);
  font-weight: 850;
}

.public-schedule-list {
  display: grid;
  gap: 8px;
}

.public-schedule-row {
  display: grid;
  grid-template-columns: 76px minmax(120px, 1fr) 70px 18px 70px minmax(120px, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(93, 207, 255, 0.14);
  border-radius: 10px;
  background: rgba(1, 7, 15, 0.48);
  padding: 10px 12px;
}

.public-schedule-row span,
.public-schedule-row em {
  color: #66ff38;
  font-style: normal;
  font-weight: 950;
}

.public-schedule-row b {
  color: #f6faff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-schedule-row input {
  min-height: 38px;
  text-align: center;
}

.public-start-panel {
  display: grid;
  gap: 14px;
  border-color: rgba(124, 255, 60, 0.38);
  background:
    radial-gradient(circle at 0% 0%, rgba(124, 255, 60, 0.16), transparent 42%),
    rgba(7, 28, 53, 0.5);
}

.public-start-panel h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
}

.public-start-panel span {
  color: rgba(220, 232, 247, 0.72);
  font-weight: 850;
}

.public-start-button {
  min-height: 58px;
  justify-content: center;
  font-size: 18px;
}

@media (max-width: 760px) {
  .public-mode-grid,
  .public-activity-actions,
  .public-manual-grid,
  .public-activity-settings-grid,
  .public-participant-add,
  .public-participant-row,
  .public-schedule-row {
    grid-template-columns: 1fr;
  }

  .public-participant-row span {
    display: none;
  }
}

.public-prize-open {
  justify-content: center;
  min-height: 52px;
}

.public-prize-draw {
  position: relative;
  border: 1px solid rgba(93, 207, 255, 0.22);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 255, 60, 0.12), transparent 58%),
    rgba(1, 7, 15, 0.42);
  padding: 16px;
  display: grid;
  gap: 16px;
}

.public-prize-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.public-prize-head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 6vw, 42px);
  line-height: 1;
}

.public-prize-head span {
  color: rgba(220, 232, 247, 0.72);
  font-weight: 850;
}

.public-prize-wheel-wrap {
  display: grid;
  place-items: center;
}

#publicPrizeWheelCanvas {
  width: min(100%, 420px);
  height: auto;
  aspect-ratio: 1;
  filter: drop-shadow(0 24px 42px rgba(0, 0, 0, 0.36));
}

.public-prize-winner {
  border: 1px solid rgba(124, 255, 60, 0.38);
  border-radius: 12px;
  background: rgba(25, 141, 75, 0.22);
  padding: 14px;
  display: grid;
  gap: 8px;
}

.public-prize-winner span,
.public-prize-history > strong {
  color: #66ff38;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.public-prize-winner strong {
  color: #fff;
  font-size: 28px;
  line-height: 1.05;
}

.public-prize-history {
  display: grid;
  gap: 8px;
}

.public-prize-history ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.public-prize-history li {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 9px;
  background: rgba(7, 28, 53, 0.64);
  padding: 9px 10px;
  color: #f6faff;
  font-weight: 900;
}

.public-prize-history li span {
  color: #66ff38;
  min-width: 34px;
}

.history-prize-draws {
  display: block;
  margin-top: 4px;
  color: rgba(124, 255, 60, 0.82);
  font-weight: 850;
}

.login-actions,
.admin-session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.link-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #9ee9ff;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 0;
  text-align: left;
}

.link-button:hover {
  color: #66ff38;
}

.login-help-link {
  justify-self: start;
}

.super-admin-field-action {
  display: grid;
  gap: 8px;
  align-content: end;
  color: rgba(220, 232, 247, 0.78);
  font-weight: 900;
}

.admin-session-row {
  border: 1px solid rgba(93, 207, 255, 0.18);
  border-radius: 10px;
  background: rgba(2, 10, 20, 0.42);
  color: rgba(220, 232, 247, 0.78);
  padding: 10px 12px;
  margin-bottom: 12px;
  font-weight: 900;
}

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

.saas-stats-grid > div {
  border: 1px solid rgba(93, 207, 255, 0.2);
  border-radius: 10px;
  background: rgba(1, 7, 15, 0.5);
  padding: 14px;
}

.saas-stats-grid strong {
  display: block;
  color: #7cff3c;
  font-size: 34px;
  line-height: 1;
  font-weight: 950;
}

.saas-stats-grid span {
  color: rgba(220, 232, 247, 0.72);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.saas-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(93, 207, 255, 0.18);
  border-radius: 10px;
  background: rgba(1, 7, 15, 0.42);
}

.saas-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.saas-table th,
.saas-table td {
  border-bottom: 1px solid rgba(93, 207, 255, 0.14);
  color: rgba(246, 250, 255, 0.88);
  padding: 12px;
  text-align: left;
  font-weight: 850;
}

.saas-table th {
  color: rgba(220, 232, 247, 0.68);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.club-admin-card,
.sponsor-upload,
.court-setting-card,
.player-profile-admin,
.player-history-row {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(93, 207, 255, 0.24);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 0%, rgba(93, 207, 255, 0.08), transparent 58%),
    rgba(2, 10, 20, 0.48);
  padding: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 16px 36px rgba(0, 0, 0, 0.18);
}

.admin-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.admin-modal-card .admin-head label,
.admin-modal-card .club-admin-card label,
.admin-modal-card .court-setting-card label,
.admin-modal-card .sponsor-upload label {
  color: rgba(220, 232, 247, 0.76);
  font-weight: 900;
}

.admin-modal-card .admin-head strong,
.admin-modal-card .club-admin-card strong {
  color: #f6faff;
  font-weight: 950;
}

.admin-modal-card .club-admin-card p,
.admin-modal-card .ranking-settings-copy {
  color: rgba(220, 232, 247, 0.76);
}

.admin-modal-card input,
.admin-modal-card select,
.admin-modal-card textarea {
  border: 1px solid rgba(93, 207, 255, 0.3);
  border-radius: 8px;
  background: rgba(1, 7, 15, 0.68);
  color: #f6faff;
  caret-color: #7cff3c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.admin-modal-card input::placeholder,
.admin-modal-card textarea::placeholder {
  color: rgba(220, 232, 247, 0.48);
}

.admin-modal-card input:focus,
.admin-modal-card select:focus,
.admin-modal-card textarea:focus {
  outline: none;
  border-color: rgba(124, 255, 60, 0.7);
  box-shadow:
    0 0 0 3px rgba(124, 255, 60, 0.12),
    0 0 20px rgba(93, 207, 255, 0.12);
}

.image-upload-hint {
  color: rgba(220, 232, 247, 0.58);
  display: block;
  font-size: 0.74rem;
  font-weight: 750;
  line-height: 1.32;
  margin-top: 4px;
}

.court-name-grid,
.sponsor-settings,
.profile-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

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

.super-admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.super-admin-tabs button {
  min-height: 38px;
  border: 1px solid rgba(93, 207, 255, 0.22);
  border-radius: 8px;
  background: rgba(7, 28, 53, 0.62);
  color: rgba(246, 250, 255, 0.84);
  padding: 8px 12px;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.super-admin-tabs button.active {
  border-color: rgba(124, 255, 60, 0.58);
  background: rgba(7, 42, 25, 0.76);
  color: #f6faff;
}

.compact-super-admin-head {
  padding-bottom: 12px;
}

.table-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.super-admin-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.super-admin-edit-grid label {
  display: grid;
  gap: 6px;
  color: rgba(220, 232, 247, 0.74);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.super-admin-edit-grid input,
.super-admin-edit-grid select,
.super-admin-edit-grid textarea {
  min-height: 40px;
  border: 1px solid rgba(93, 207, 255, 0.28);
  border-radius: 8px;
  background: rgba(1, 7, 15, 0.66);
  color: #f6faff;
  padding: 8px 10px;
  font: inherit;
  font-weight: 900;
}

.super-admin-wide-field {
  grid-column: 1 / -1;
}

.super-admin-form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.compact-premium-list {
  display: grid;
  gap: 10px;
}

.compact-premium-card {
  padding: 12px;
}

.app-branding-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.app-branding-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(93, 207, 255, 0.2);
  border-radius: 8px;
  background: rgba(1, 7, 15, 0.42);
}

.app-branding-preview {
  aspect-ratio: 2 / 1;
  border: 1px solid rgba(124, 255, 60, 0.18);
  border-radius: 8px;
  background: rgba(2, 10, 20, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  color: rgba(220, 232, 247, 0.56);
  font-size: 12px;
  font-weight: 900;
}

.app-branding-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-branding-copy {
  display: grid;
  gap: 4px;
}

.app-branding-copy strong {
  color: #f6faff;
  font-size: 14px;
  font-weight: 950;
}

.app-branding-copy small {
  color: rgba(220, 232, 247, 0.62);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

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

.app-branding-actions input[type="file"] {
  display: none;
}

.new-club-grid label,
.import-source-settings-grid label {
  display: grid;
  gap: 6px;
}

.admin-import-search {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(93, 207, 255, 0.18);
  border-radius: 8px;
  background: rgba(1, 7, 15, 0.38);
}

.admin-import-search label {
  display: grid;
  gap: 6px;
}

.admin-import-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.admin-import-results .club-results {
  display: grid;
  gap: 8px;
}

.admin-import-results .club-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(93, 207, 255, 0.18);
  border-radius: 8px;
  background: rgba(7, 28, 53, 0.5);
}

.admin-import-results .club-result div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.admin-import-results .club-result strong,
.admin-import-results .club-result span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-import-results .club-result span {
  color: rgba(220, 232, 247, 0.68);
  font-size: 12px;
}

.import-source-settings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.import-config-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(93, 207, 255, 0.18);
  border-radius: 10px;
  background: rgba(1, 7, 15, 0.46);
  padding: 10px 12px;
}

.import-config-summary div {
  display: grid;
  gap: 3px;
}

.import-config-summary strong {
  color: #f6faff;
  font-weight: 950;
}

.import-config-summary span {
  color: rgba(220, 232, 247, 0.68);
  font-weight: 850;
}

.feature-admin-list {
  display: grid;
  gap: 12px;
}

.feature-admin-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(93, 207, 255, 0.22);
  border-radius: 12px;
  background: rgba(1, 7, 15, 0.42);
  padding: 12px;
}

.feature-admin-card small {
  display: block;
  color: rgba(220, 232, 247, 0.68);
  font-weight: 850;
  margin-top: 4px;
}

.feature-admin-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.feature-toggle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.feature-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(93, 207, 255, 0.16);
  border-radius: 8px;
  background: rgba(2, 10, 20, 0.38);
  color: rgba(246, 250, 255, 0.84);
  padding: 8px;
  font-weight: 900;
}

.temporary-password {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(124, 255, 60, 0.42);
  border-radius: 999px;
  background: rgba(37, 255, 83, 0.1);
  color: #7cff3c;
  padding: 3px 8px;
  font-weight: 950;
  letter-spacing: 0;
}

.club-admin-created-notice {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(124, 255, 60, 0.34);
  border-radius: 8px;
  background: rgba(7, 42, 25, 0.46);
  color: #f6faff;
}

.club-admin-created-notice span {
  color: rgba(220, 232, 247, 0.76);
  font-size: 13px;
  font-weight: 850;
}

.club-admin-created-notice code {
  width: fit-content;
  border: 1px solid rgba(124, 255, 60, 0.42);
  border-radius: 999px;
  background: rgba(37, 255, 83, 0.1);
  color: #7cff3c;
  padding: 5px 10px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 950;
}

.pilot-evaluation-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(93, 207, 255, 0.2);
  border-radius: 12px;
  background:
    radial-gradient(circle at 14% 0%, rgba(124, 255, 60, 0.08), transparent 42%),
    rgba(3, 15, 30, 0.58);
  padding: 12px;
}

.pilot-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.pilot-metrics-grid > div {
  border: 1px solid rgba(93, 207, 255, 0.14);
  border-radius: 10px;
  background: rgba(1, 7, 15, 0.44);
  padding: 10px;
}

.pilot-metrics-grid span {
  display: block;
  color: rgba(220, 232, 247, 0.62);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.pilot-metrics-grid strong {
  display: block;
  color: #f6faff;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.15;
  margin-top: 4px;
}

.engagement-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid rgba(93, 207, 255, 0.26);
  border-radius: 999px;
  background: rgba(1, 7, 15, 0.48);
  color: rgba(246, 250, 255, 0.9);
  padding: 5px 10px;
}

.engagement-high {
  border-color: rgba(124, 255, 60, 0.48);
  color: #7cff3c;
}

.engagement-medium {
  border-color: rgba(93, 207, 255, 0.42);
  color: #5dcfff;
}

.engagement-low {
  border-color: rgba(255, 205, 80, 0.46);
  color: #ffd365;
}

.engagement-none {
  border-color: rgba(255, 85, 115, 0.42);
  color: #ff8aa0;
}

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

.pilot-action {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(93, 207, 255, 0.14);
  border-radius: 10px;
  background: rgba(1, 7, 15, 0.32);
  padding: 10px;
}

.pilot-note-action {
  grid-column: 1 / -1;
}

.pilot-inline-action {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pilot-inline-action select,
.pilot-inline-action input {
  min-width: 150px;
}

@media (max-width: 900px) {
  .new-club-grid,
  .super-admin-edit-grid,
  .import-source-settings-grid,
  .feature-toggle-grid,
  .pilot-metrics-grid,
  .pilot-actions-grid {
    grid-template-columns: 1fr;
  }

  .pilot-note-action {
    grid-column: auto;
  }

  .admin-import-search-row,
  .admin-import-results .club-result {
    grid-template-columns: 1fr;
  }
}

.tournament-admin-panel {
  margin-top: 0;
}

.tournament-admin-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.tournament-admin-tabs button {
  min-height: 42px;
  border: 1px solid rgba(93, 207, 255, 0.22);
  border-radius: 8px;
  background: rgba(7, 28, 53, 0.72);
  color: rgba(246, 250, 255, 0.82);
  font-weight: 900;
  cursor: pointer;
}

.tournament-admin-tabs button.active {
  border-color: rgba(124, 255, 60, 0.66);
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 255, 60, 0.22), transparent 68%),
    rgba(7, 42, 25, 0.78);
  color: #f6faff;
  box-shadow: 0 0 18px rgba(124, 255, 60, 0.16);
}

.tournament-admin-section {
  display: none;
}

.tournament-admin-section.active {
  display: grid;
  gap: 10px;
}

.tournament-admin-section.hidden {
  display: none;
}

.admin-player-list {
  display: grid;
  gap: 8px;
  max-height: min(44vh, 460px);
  overflow: auto;
  padding-right: 4px;
}

.admin-player-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(93, 207, 255, 0.2);
  border-radius: 8px;
  background: rgba(2, 10, 20, 0.42);
  padding: 8px;
}

.admin-player-row > span:first-child {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(124, 255, 60, 0.16);
  color: #7cff3c;
  font-weight: 900;
}

.admin-player-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-player-row.status-inactive {
  border-color: rgba(255, 193, 85, 0.32);
}

.admin-player-row.status-removed {
  border-color: rgba(255, 86, 112, 0.32);
}

.tournament-format-admin {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(93, 207, 255, 0.2);
  border-radius: 8px;
  background: rgba(2, 10, 20, 0.42);
  padding: 10px;
}

.tournament-format-admin label {
  color: rgba(220, 232, 247, 0.78);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.tournament-format-admin > strong {
  color: #f6faff;
  font-size: 32px;
  line-height: 1;
}

.admin-format-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.admin-format-row select {
  min-height: 42px;
  border: 1px solid rgba(93, 207, 255, 0.28);
  border-radius: 8px;
  background: rgba(1, 7, 15, 0.62);
  color: #f6faff;
  padding: 9px 10px;
  font: inherit;
  font-weight: 900;
}

.tournament-format-admin p {
  margin: 0;
  color: rgba(220, 232, 247, 0.72);
  font-size: 13px;
  font-weight: 800;
}

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

.tournament-info-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.tournament-info-admin > div {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(93, 207, 255, 0.2);
  border-radius: 8px;
  background: rgba(2, 10, 20, 0.42);
  padding: 12px;
}

.tournament-info-admin span {
  color: rgba(220, 232, 247, 0.68);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.tournament-info-admin strong {
  min-width: 0;
  color: #f6faff;
  overflow-wrap: anywhere;
}

.history-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(93, 207, 255, 0.18);
  border-radius: 8px;
  background: rgba(2, 10, 20, 0.44);
  padding: 10px 12px;
}

.history-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.history-filter-row .ghost-button.active {
  border-color: rgba(124, 255, 60, 0.7);
  background: rgba(124, 255, 60, 0.16);
  color: #f6faff;
}

.archive-readonly-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(124, 255, 60, 0.36);
  border-radius: 8px;
  background: rgba(2, 22, 18, 0.58);
  color: #f6faff;
}

.archive-readonly-banner strong {
  color: #7cff3c;
}

.archive-round-card {
  margin-bottom: 14px;
}

.history-actions-row span,
.backup-row small,
.history-event span {
  color: rgba(229, 238, 247, 0.72);
  font-weight: 800;
}

.history-actions-row strong {
  display: block;
  color: #f6faff;
  font-size: 18px;
}

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

.history-card {
  display: grid;
  gap: 10px;
  min-height: 280px;
  border: 1px solid rgba(93, 207, 255, 0.2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(93, 207, 255, 0.08), transparent 58%),
    rgba(2, 10, 20, 0.52);
  padding: 12px;
}

.history-card h3 {
  margin: 0;
  color: #f6faff;
  font-size: 18px;
}

.history-event-list,
.backup-list {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: min(42vh, 440px);
  overflow: auto;
  padding-right: 4px;
}

.history-event,
.backup-row {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(93, 207, 255, 0.16);
  border-radius: 8px;
  background: rgba(7, 28, 53, 0.54);
  padding: 9px 10px;
}

.history-event {
  grid-template-columns: 52px minmax(0, 1fr);
}

.history-event time {
  color: var(--accent);
  font-weight: 900;
}

.history-event strong,
.backup-row strong {
  display: block;
  color: #f6faff;
}

.backup-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.backup-row span {
  display: block;
  color: rgba(246, 250, 255, 0.86);
  font-weight: 900;
  margin-top: 2px;
}

.empty-note {
  margin: 0;
  color: rgba(229, 238, 247, 0.72);
  font-weight: 800;
}

.action-confirm-modal {
  max-width: 520px;
}

.action-confirm-modal > p {
  margin: 0;
  color: rgba(246, 250, 255, 0.84);
  font-weight: 800;
  line-height: 1.45;
}

.ranking-settings-card {
  margin-top: 12px;
}

.ranking-settings-copy {
  margin: 0;
  color: rgba(220, 232, 247, 0.74);
  font-size: 13px;
  font-weight: 800;
}

.ranking-system-list {
  display: grid;
  gap: 10px;
}

.ranking-system-group {
  display: grid;
  gap: 10px;
}

.ranking-system-group h3 {
  margin: 0;
  color: #f6faff;
  font-size: 16px;
  font-weight: 950;
}

.legacy-group {
  margin-top: 8px;
}

.ranking-system-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(93, 207, 255, 0.2);
  border-radius: 8px;
  background: rgba(2, 10, 20, 0.42);
  padding: 10px;
}

.ranking-category-list {
  display: grid;
  gap: 8px;
}

.ranking-category-card {
  display: grid;
  grid-template-columns: minmax(90px, 0.35fr) minmax(0, 1fr) minmax(120px, 0.35fr);
  gap: 8px;
  border: 1px solid rgba(93, 207, 255, 0.2);
  border-radius: 8px;
  background: rgba(2, 10, 20, 0.42);
  padding: 10px;
}

.ranking-system-fields {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
}

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

.ranking-system-card label,
.ranking-category-card label {
  display: grid;
  gap: 6px;
  color: rgba(220, 232, 247, 0.82);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ranking-system-card input,
.ranking-system-card textarea,
.ranking-category-card input {
  width: 100%;
  border: 1px solid rgba(93, 207, 255, 0.28);
  border-radius: 8px;
  background: rgba(1, 7, 15, 0.62);
  color: #f6faff;
  padding: 9px 10px;
  font: inherit;
  font-weight: 800;
  text-transform: none;
}

.ranking-positions-editor small {
  color: rgba(220, 232, 247, 0.62);
  font-size: 12px;
  text-transform: none;
}

.ranking-formula-note {
  margin: 0;
  color: rgba(220, 232, 247, 0.7);
  font-size: 13px;
  font-weight: 800;
}

.legacy-badge {
  display: inline-flex;
  width: max-content;
  border: 1px solid rgba(255, 205, 92, 0.42);
  border-radius: 999px;
  background: rgba(98, 64, 8, 0.4);
  color: #ffd56a;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 950;
}

.ranking-system-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.sponsor-preview {
  display: grid;
  place-items: center;
  min-height: 88px;
  border: 1px dashed rgba(93, 207, 255, 0.34);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(93, 207, 255, 0.1), transparent 62%),
    rgba(1, 7, 15, 0.7);
  color: rgba(220, 232, 247, 0.68);
  font-weight: 900;
}

.sponsor-preview img {
  max-height: 76px;
  max-width: 92%;
  object-fit: contain;
}

.court-logo-row {
  display: grid;
  grid-template-columns: minmax(92px, 120px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.court-logo-preview {
  display: grid;
  place-items: center;
  min-height: 58px;
  border: 1px dashed rgba(93, 207, 255, 0.34);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(93, 207, 255, 0.1), transparent 62%),
    rgba(1, 7, 15, 0.7);
  color: rgba(220, 232, 247, 0.68);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.court-logo-preview img {
  max-width: 100%;
  max-height: 46px;
  object-fit: contain;
}

.court-logo-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.score-modal-backdrop,
.player-history-backdrop,
.player-match-backdrop,
.player-profile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  background: rgba(8, 14, 12, 0.56);
  padding: 18px;
}

.score-modal,
.player-history-modal,
.player-match-modal,
.player-profile-modal {
  width: min(720px, 100%);
  max-height: min(86vh, 880px);
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.score-modal {
  width: min(620px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(93, 207, 255, 0.34);
  background:
    radial-gradient(circle at 22% 0%, rgba(93, 207, 255, 0.18), transparent 42%),
    radial-gradient(circle at 84% 12%, rgba(124, 255, 60, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(7, 28, 53, 0.98), rgba(1, 7, 15, 0.98));
  color: #f6faff;
  padding: 22px;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.score-modal-head {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.score-modal-head span {
  color: #7cff3c;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.score-modal-head h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.02;
  font-weight: 950;
}

.score-modal-head p,
.score-modal-featured {
  margin: 0;
  color: rgba(220, 232, 247, 0.74);
  font-weight: 850;
}

.score-modal-featured {
  border: 1px solid rgba(124, 255, 60, 0.22);
  border-radius: 10px;
  background: rgba(124, 255, 60, 0.08);
  padding: 10px 12px;
  margin-bottom: 12px;
}

.score-modal .score-picks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 8px;
}

.score-modal .score-pick {
  min-height: 64px;
  border: 1px solid rgba(93, 207, 255, 0.22);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 0%, rgba(93, 207, 255, 0.12), transparent 64%),
    rgba(1, 9, 20, 0.74);
  color: #f6faff;
  display: grid;
  place-items: center;
  gap: 2px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.score-modal .score-pick strong {
  font-size: 25px;
  line-height: 1;
  font-weight: 950;
}

.score-modal .score-pick span {
  color: rgba(220, 232, 247, 0.66);
  font-size: 12px;
  font-weight: 900;
}

.score-modal .score-pick:hover,
.score-modal .score-pick:focus-visible {
  border-color: rgba(124, 255, 60, 0.7);
  outline: none;
  box-shadow:
    0 0 0 3px rgba(124, 255, 60, 0.12),
    0 0 24px rgba(124, 255, 60, 0.16);
}

.score-modal .score-pick.featured-score {
  border-color: rgba(124, 255, 60, 0.56);
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 255, 60, 0.22), transparent 66%),
    linear-gradient(145deg, rgba(5, 52, 28, 0.9), rgba(1, 12, 22, 0.84));
}

.score-modal .score-pick.featured-score strong {
  color: #7cff3c;
}

.score-cancel {
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  border: 1px solid rgba(93, 207, 255, 0.28);
  border-radius: 10px;
  background: rgba(1, 7, 15, 0.62);
  color: rgba(246, 250, 255, 0.88);
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.score-cancel:hover,
.score-cancel:focus-visible {
  border-color: rgba(93, 207, 255, 0.52);
  outline: none;
}

.player-match-modal {
  background:
    radial-gradient(circle at 28% 12%, rgba(29, 145, 214, 0.2), transparent 34%),
    linear-gradient(145deg, rgba(4, 18, 36, 0.98), rgba(1, 8, 18, 0.98));
  color: #f6faff;
  border: 1px solid rgba(93, 207, 255, 0.34);
}

.player-profile-modal {
  width: min(980px, 100%);
  background:
    radial-gradient(circle at 18% 8%, rgba(124, 255, 60, 0.14), transparent 30%),
    radial-gradient(circle at 78% 18%, rgba(93, 207, 255, 0.14), transparent 32%),
    linear-gradient(145deg, rgba(4, 18, 36, 0.98), rgba(1, 8, 18, 0.98));
  color: #f6faff;
  border: 1px solid rgba(93, 207, 255, 0.34);
}

.player-profile-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.player-profile-head span,
.player-profile-section h3 {
  color: #7cff3c;
  text-transform: uppercase;
  font-weight: 950;
}

.player-profile-head h2 {
  margin: 3px 0;
  font-size: clamp(28px, 3vw, 48px);
  color: #fff;
}

.player-profile-head p {
  margin: 2px 0;
  color: rgba(220, 232, 247, 0.72);
  font-weight: 850;
}

.player-profile-avatar {
  width: 104px;
  height: 104px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(124, 255, 60, 0.6);
  background: linear-gradient(145deg, #71f05c, #4bc9d5);
  color: #06101f;
  font-size: 38px;
  font-weight: 950;
}

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

.player-profile-avatar span {
  color: #06101f;
  text-transform: uppercase;
}

.player-profile-section {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(93, 207, 255, 0.22);
  border-radius: 8px;
  background: rgba(5, 24, 46, 0.72);
}

.player-profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.player-profile-stats > div {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(93, 207, 255, 0.18);
  background: rgba(1, 8, 18, 0.54);
}

.player-profile-stats strong {
  display: block;
  color: #fff;
  font-size: 22px;
}

.player-profile-stats span {
  color: rgba(220, 232, 247, 0.68);
  font-weight: 850;
}

.player-profile-aliases,
.player-profile-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.player-profile-aliases span,
.player-profile-formats span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(93, 207, 255, 0.22);
  background: rgba(1, 8, 18, 0.54);
  color: #f6faff;
  font-weight: 900;
}

.player-profile-aliases button {
  border: 0;
  background: transparent;
  color: #ff8fa3;
  font-weight: 950;
  cursor: pointer;
}

.player-profile-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  align-items: end;
}

.player-profile-admin-grid label {
  display: grid;
  gap: 6px;
  color: rgba(220, 232, 247, 0.72);
  font-weight: 900;
}

.player-profile-admin-grid input {
  border: 1px solid rgba(93, 207, 255, 0.34);
  border-radius: 8px;
  background: rgba(1, 8, 18, 0.82);
  color: #f6faff;
  padding: 11px;
  font-weight: 900;
}

.player-profile-history {
  overflow: auto;
}

.player-profile-history table {
  width: 100%;
  border-collapse: collapse;
}

.player-profile-history th,
.player-profile-history td {
  padding: 10px;
  border-bottom: 1px solid rgba(93, 207, 255, 0.16);
  text-align: left;
}

.player-profile-history th {
  color: rgba(220, 232, 247, 0.72);
  text-transform: uppercase;
}

.player-match-section {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(93, 207, 255, 0.22);
  border-radius: 8px;
  background: rgba(5, 24, 46, 0.72);
}

.player-match-section h4 {
  margin: 0;
  color: #7cff3c;
  text-transform: uppercase;
  letter-spacing: 0;
}

.player-match-section p {
  margin: 0;
  color: rgba(220, 232, 247, 0.72);
  font-weight: 800;
}

.player-match-list {
  display: grid;
  gap: 8px;
}

.player-match-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(93, 207, 255, 0.18);
  border-radius: 8px;
  background: rgba(1, 8, 18, 0.54);
}

.player-match-row span,
.player-match-row small {
  display: block;
  color: rgba(220, 232, 247, 0.68);
  font-weight: 800;
}

.player-match-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.player-match-search input {
  border: 1px solid rgba(93, 207, 255, 0.34);
  border-radius: 8px;
  background: rgba(1, 8, 18, 0.82);
  color: #f6faff;
  padding: 12px;
  font-weight: 900;
}

.score-picks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.score-pick {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 10px;
}

.score-pick strong {
  font-size: 24px;
}

.admin-ranking-correction {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(93, 207, 255, 0.18);
}

.admin-ranking-correction label {
  display: grid;
  gap: 6px;
  color: rgba(220, 232, 247, 0.74);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.admin-ranking-correction select {
  min-height: 40px;
  border: 1px solid rgba(93, 207, 255, 0.28);
  border-radius: 8px;
  background: rgba(1, 7, 15, 0.66);
  color: #f6faff;
  padding: 8px 10px;
  font: inherit;
  font-weight: 900;
}

.club-import-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(93, 207, 255, 0.18);
  border-radius: 10px;
  background: rgba(1, 7, 15, 0.42);
}

.club-import-admin-grid label {
  display: grid;
  gap: 6px;
  color: rgba(220, 232, 247, 0.74);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.club-import-admin-grid input,
.club-import-admin-grid select {
  min-height: 40px;
  border: 1px solid rgba(93, 207, 255, 0.28);
  border-radius: 8px;
  background: rgba(1, 7, 15, 0.66);
  color: #f6faff;
  padding: 8px 10px;
  font: inherit;
  font-weight: 900;
}

.system-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid rgba(93, 207, 255, 0.22);
  background: rgba(1, 7, 15, 0.58);
  color: #f6faff;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.system-status-badge.status-ok,
.system-status-badge.status-ready {
  border-color: rgba(124, 255, 60, 0.44);
  color: #7cff3c;
}

.system-status-badge.status-warning,
.system-status-badge.status-high {
  border-color: rgba(255, 197, 72, 0.56);
  color: #ffd36a;
}

.system-status-badge.status-blocker {
  border-color: rgba(255, 72, 96, 0.6);
  color: #ff6f83;
}

.player-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.player-history-list {
  display: grid;
  gap: 10px;
}

.activity-player-profile-modal {
  width: min(980px, 100%);
}

.activity-player-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.activity-player-stats > div,
.activity-player-card {
  border: 1px solid rgba(93, 207, 255, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(93, 207, 255, 0.14), transparent 64%),
    rgba(1, 8, 18, 0.7);
  padding: 12px;
}

.activity-player-stats strong {
  display: block;
  color: #f6faff;
  font-size: 24px;
  font-weight: 950;
}

.activity-player-stats span,
.activity-player-card p {
  color: rgba(220, 232, 247, 0.7);
  font-weight: 850;
}

.activity-player-rounds h4,
.activity-players-head h3 {
  margin: 0;
  color: #7cff3c;
  text-transform: uppercase;
}

.activity-player-tabs {
  display: flex;
  gap: 8px;
  margin: 14px 0;
  padding: 4px;
  border: 1px solid rgba(93, 207, 255, 0.18);
  border-radius: 8px;
  background: rgba(1, 8, 18, 0.52);
}

.activity-player-tabs button {
  flex: 1 1 0;
  min-height: 42px;
  border: 1px solid rgba(93, 207, 255, 0.2);
  border-radius: 8px;
  background: rgba(7, 28, 53, 0.72);
  color: rgba(246, 250, 255, 0.72);
  font-weight: 950;
  cursor: pointer;
}

.activity-player-tabs button.active {
  border-color: rgba(124, 255, 60, 0.68);
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 255, 60, 0.2), transparent 68%),
    rgba(0, 50, 20, 0.72);
  color: #f6faff;
}

.activity-player-tab-panel {
  display: none;
}

.activity-player-tab-panel.active {
  display: block;
}

.activity-global-history {
  margin-top: 18px;
}

.global-player-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: 18px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid rgba(93, 207, 255, 0.28);
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 0%, rgba(124, 255, 60, 0.18), transparent 34%),
    radial-gradient(circle at 72% 18%, rgba(93, 207, 255, 0.18), transparent 38%),
    linear-gradient(145deg, rgba(7, 28, 53, 0.95), rgba(2, 12, 25, 0.98));
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.global-player-identity {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.global-player-avatar {
  flex: 0 0 108px;
  width: 108px;
  height: 108px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(124, 255, 60, 0.72);
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.28), transparent 32%),
    linear-gradient(145deg, rgba(124, 255, 60, 0.92), rgba(93, 207, 255, 0.72));
  box-shadow: 0 0 34px rgba(124, 255, 60, 0.22);
  color: #06172b;
  font-size: 40px;
  font-weight: 1000;
}

.global-player-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.global-player-kicker,
.global-player-section-title span,
.global-player-trend span {
  display: block;
  color: #7cff3c;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0;
  text-transform: uppercase;
}

.global-player-identity h4 {
  margin: 6px 0;
  color: #f6faff;
  font-size: clamp(30px, 3vw, 52px);
  line-height: 1.02;
}

.global-player-identity p {
  margin: 0;
  color: rgba(220, 232, 247, 0.72);
  font-size: 14px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.global-player-hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 10px;
}

.global-player-hero-stats div,
.global-player-hero-stats button,
.global-player-stat-card {
  min-width: 0;
  border: 1px solid rgba(93, 207, 255, 0.2);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(9, 44, 82, 0.82), rgba(1, 9, 20, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.global-player-hero-stats div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 14px 12px;
  text-align: center;
}

.global-player-hero-stats button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  font: inherit;
}

.global-player-hero-stats button:disabled {
  cursor: default;
}

.global-player-hero-stat {
  appearance: none;
}

.global-player-hero-stats strong {
  color: #7cff3c;
  font-size: clamp(20px, 1.7vw, 30px);
  line-height: 1;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.global-player-hero-stats span,
.global-player-stat-card p,
.global-player-event-metrics span {
  color: rgba(220, 232, 247, 0.68);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.global-player-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.global-player-stat-card {
  padding: 16px;
}

.global-player-stat-card span {
  display: inline-grid;
  place-items: center;
  min-width: 54px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(124, 255, 60, 0.12);
  border: 1px solid rgba(124, 255, 60, 0.26);
  color: #7cff3c;
  font-size: 11px;
  font-weight: 1000;
}

.global-player-stat-card p {
  margin: 14px 0 6px;
}

.global-player-stat-card strong {
  color: #f6faff;
  font-size: clamp(30px, 3vw, 48px);
  line-height: 1;
}

.global-player-trend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(93, 207, 255, 0.24);
  background: rgba(1, 10, 22, 0.82);
}

.global-player-trend strong {
  display: block;
  margin-top: 5px;
  color: #f6faff;
  font-size: clamp(22px, 2.4vw, 36px);
  line-height: 1.08;
}

.global-player-trend p {
  margin: 0;
  color: #7cff3c;
  font-size: 18px;
  font-weight: 1000;
}

.global-player-trend.down p {
  color: #ff6c7a;
}

.global-player-trend.neutral p {
  color: rgba(220, 232, 247, 0.78);
}

.global-player-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.global-player-section-title strong {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 34px;
  border-radius: 999px;
  background: rgba(124, 255, 60, 0.12);
  color: #7cff3c;
  border: 1px solid rgba(124, 255, 60, 0.26);
}

.global-player-timeline {
  display: grid;
  gap: 12px;
}

.global-player-event-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(93, 207, 255, 0.22);
  background:
    radial-gradient(circle at 90% 0%, rgba(93, 207, 255, 0.14), transparent 38%),
    linear-gradient(145deg, rgba(7, 28, 53, 0.94), rgba(1, 9, 20, 0.94));
}

.global-player-event-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: rgba(93, 207, 255, 0.58);
}

.global-player-event-card.place-gold {
  border-color: rgba(255, 208, 94, 0.62);
  box-shadow: 0 0 26px rgba(255, 208, 94, 0.1);
}

.global-player-event-card.place-gold::before {
  background: linear-gradient(180deg, #ffe38a, #d6a642);
}

.global-player-event-card.place-top3 {
  border-color: rgba(124, 255, 60, 0.54);
}

.global-player-event-card.place-top3::before {
  background: #7cff3c;
}

.global-player-event-card.place-top10 {
  border-color: rgba(93, 207, 255, 0.52);
}

.global-player-event-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(220, 232, 247, 0.72);
  font-weight: 950;
}

.global-player-event-top strong {
  color: #7cff3c;
}

.global-player-event-card.place-gold .global-player-event-top strong {
  color: #ffe38a;
}

.global-player-event-card h5 {
  margin: 12px 0 4px;
  color: #f6faff;
  font-size: clamp(21px, 2vw, 32px);
  line-height: 1.08;
}

.global-player-event-card p {
  margin: 0;
  color: rgba(220, 232, 247, 0.68);
  font-weight: 850;
}

.global-player-event-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.global-player-event-metrics div {
  padding: 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.global-player-event-metrics strong {
  display: block;
  color: #f6faff;
  font-size: 22px;
  line-height: 1;
  margin-bottom: 5px;
}

.global-player-empty {
  margin-top: 16px;
}

@media (max-width: 980px) {
  .global-player-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .global-player-hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .global-player-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .global-player-hero {
    padding: 14px;
  }

  .global-player-identity {
    align-items: flex-start;
    flex-direction: column;
  }

  .global-player-avatar {
    flex-basis: 86px;
    width: 86px;
    height: 86px;
    font-size: 32px;
  }

  .global-player-hero-stats,
  .global-player-stat-grid,
  .global-player-event-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .global-player-trend,
  .global-player-event-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .global-player-trend strong,
  .global-player-event-card h5 {
    overflow-wrap: anywhere;
  }
}

.activity-player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.activity-player-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.activity-player-card h4 {
  margin: 8px 0 4px;
  color: #f6faff;
  font-size: 20px;
}

.history-round-pill {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

/* Responsive */

@media (max-width: 980px) {
  .standings-results-area {
    grid-template-columns: minmax(0, 1fr);
  }

  .results-qr-card {
    width: min(100%, 320px);
    justify-self: center;
  }

  .public-results-podium {
    grid-template-columns: minmax(0, 1fr);
  }

  .activity-setup-view {
    grid-template-columns: minmax(0, 1fr);
  }

  .activity-setup-view .app-core {
    grid-template-columns: minmax(0, 1fr);
  }

  .help-layout {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .help-tabs {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .help-tabs button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

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

  .ranking-profile-grid,
  .profile-filters-grid,
  .ranking-export-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 780px) {
  .shell {
    padding: 14px;
  }

  .topbar,
  .activity-setup-view .players-header,
  .modal-head,
  .player-history-head {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions,
  .live-actions,
  .activity-setup-view .clubflow-brand-actions {
    justify-content: flex-start;
  }

  .activity-setup-view .clubflow-brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .activity-setup-view .clubflow-brand-banner {
    height: clamp(150px, 42vw, 230px);
    max-width: 100%;
    width: 100%;
  }

  body.tournament-active .round-tv-view .live-actions {
    justify-content: flex-end;
  }

  .activity-setup-view .field-grid,
  .activity-setup-view .players-stats-bar,
  .activity-setup-view .add-player,
  .confirm-summary,
  .confirm-actions,
  .share-row {
    grid-template-columns: minmax(0, 1fr);
  }

  body.tournament-active .shell {
    padding: 8px;
  }

  body.tournament-active .round-tv-view .match-card {
    min-height: 0;
    padding: 8px 10px;
  }

  body.tournament-active .round-tv-view .player-name {
    font-size: clamp(14px, 2.2vw, 22px);
  }

  body.tournament-active .round-tv-view .score {
    font-size: clamp(38px, 6.8vw, 68px);
  }

  .ranking-system-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .ranking-filters,
  .ranking-summary {
    grid-template-columns: minmax(0, 1fr);
  }

.ranking-profile-card-head,
.ranking-profile-toolbar {
  align-items: stretch;
  flex-direction: column;
}
}

.feature-admin-list {
  display: grid;
  gap: 14px;
}

.feature-admin-card {
  background: rgba(2, 16, 31, 0.72);
  border: 1px solid rgba(78, 191, 255, 0.24);
  border-radius: 16px;
  padding: 14px;
}

.feature-admin-card select {
  min-width: 140px;
}

.feature-admin-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.feature-admin-controls input,
.feature-admin-controls select {
  width: auto;
}

.feature-toggle-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin-top: 12px;
}

.feature-toggle {
  align-items: center;
  background: rgba(0, 34, 66, 0.72);
  border: 1px solid rgba(80, 190, 255, 0.22);
  border-radius: 999px;
  color: rgba(245, 249, 255, 0.9);
  display: flex;
  gap: 9px;
  padding: 9px 12px;
}

.feature-toggle input {
  accent-color: #74ff3f;
}

.feature-toggle span {
  align-items: center;
  background: rgba(116, 255, 63, 0.12);
  border: 1px solid rgba(116, 255, 63, 0.4);
  border-radius: 999px;
  color: #74ff3f;
  display: inline-flex;
  font-weight: 950;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.feature-gate-card {
  border-color: rgba(116, 255, 63, 0.28);
}

@media (min-width: 768px) and (max-width: 1024px) {
  .app-branding-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .activity-setup-view .clubflow-brand {
    gap: 14px;
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .activity-setup-view .clubflow-brand-banner {
    height: clamp(120px, 16vw, 165px);
    max-width: min(620px, 54vw);
    width: min(620px, 54vw);
  }
}

@media (max-width: 767px) {
  .app-branding-grid {
    grid-template-columns: 1fr;
  }

  .shell {
    padding: 8px;
  }

  .topbar {
    gap: 8px;
    margin-bottom: 8px;
  }

  .brand-link,
  .brand-pill {
    gap: 7px;
  }

  .brand-link img {
    height: 34px;
    width: 34px;
  }

  .brand-copy strong {
    font-size: 16px;
  }

  .brand-copy small {
    font-size: 10px;
  }

  .activity-setup-view .clubflow-brand {
    gap: 8px;
    margin-bottom: 8px;
    padding: 0 0 8px;
  }

  .activity-setup-view .clubflow-brand-banner {
    border-radius: 6px;
    height: clamp(82px, 24vw, 120px);
    max-width: 100%;
    width: 100%;
  }

  .activity-setup-view .clubflow-brand-actions {
    gap: 6px;
  }

  .modal-backdrop {
    align-items: start;
    padding: 8px;
  }

  .modal-card,
  .admin-modal-card {
    max-height: calc(100dvh - 16px);
    padding: 12px;
  }

  .admin-modal-card .modal-head h2,
  .ranking-modal-head h2 {
    font-size: clamp(24px, 8vw, 32px);
    margin-bottom: 4px;
  }

  .admin-modal-card .modal-head p,
  .ranking-modal-head p {
    font-size: 0.86rem;
    line-height: 1.25;
    margin: 0;
  }

  .login-panel {
    gap: 9px;
    padding: 10px;
  }

  .login-panel label {
    gap: 4px;
  }

  .image-upload-hint {
    font-size: 0.7rem;
    line-height: 1.25;
    margin-top: 3px;
  }
}
